Cortex m3:致命错误:inc/hw_ints.h:没有这样的文件或目录

Cortex m3:致命错误:inc/hw_ints.h:没有这样的文件或目录,c,cortex-m3,gpio,C,Cortex M3,Gpio,我与Cortex M3、Stellaris®LM3S6965评估委员会合作。如果我按下一个按钮,我试图使led亮起。但它总是给我一个错误时,建设 在程序中,我基本上检查按钮的状态,然后启用led。我是新手,我尝试过搜索,但我真的找不到有用的东西 非常感谢 我目前的计划 #include "inc/hw_types.h" #include "inc/hw_memmap.h" #include "driverlib/sysctl.h" #include "driverlib/gpio.h" cha

我与Cortex M3、Stellaris®LM3S6965评估委员会合作。如果我按下一个按钮,我试图使led亮起。但它总是给我一个错误时,建设

在程序中,我基本上检查按钮的状态,然后启用led。我是新手,我尝试过搜索,但我真的找不到有用的东西

非常感谢

我目前的计划

#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"

char rawInputActive(void);

int main(void)
{
    volatile unsigned long ulLoop;

    /* Enable all the GPIO ports that I use*/
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);

    /* Config the pins (input, output,..)*/
    GPIOPinTypeGPIOInput(GPIO_PORTF_BASE, GPIO_PIN_1);  // select
    GPIOPinTypeGPIOInput(GPIO_PORTE_BASE, GPIO_PIN_0);  // up
    GPIOPinTypeGPIOInput(GPIO_PORTE_BASE, GPIO_PIN_1);  // down
    GPIOPinTypeGPIOInput(GPIO_PORTE_BASE, GPIO_PIN_2);  // left
    GPIOPinTypeGPIOInput(GPIO_PORTE_BASE, GPIO_PIN_3);  // right

    GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_0); // led
    GPIOPadConfigSet(GPIO_PORTF_BASE,GPIO_PIN_1,GPIO_STRENGTH_2MA,GPIO_PIN_TYPE_STD_WPU);

    /* Enable the clock for the GPIO ports.*/
    SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |
                       SYSCTL_XTAL_8MHZ);


    while(1)
    {
        volatile int iDelay;
        volatile int read;

        if(GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_1) == 0){
            GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_0, GPIO_PIN_0); // Led select
            //ret |= 1;
            for(iDelay = 0; iDelay < 3000; iDelay++);
            GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_0, ~GPIO_PIN_0);
            while(GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_1) == 0){}
            for(iDelay = 0; iDelay < 3000; iDelay++);
        }

    }
}

您需要将
-I lm3slib
添加到编译器标志中。这会告诉编译器查找该目录,该目录似乎是文件所在的位置

不应该
#包括“inc/hw_types.h”
真的是
#包括
?另一个同样包括…同样的错误,我甚至尝试了完整路径(#include“C:/projects/new/butdown/lm3slib/inc/hw_types.h”),但这也不起作用。现在它说的是
[cc]arm none eabi gcc-mcpu=cortex-m3-mthumb-Wall-F功能部分-g-I lm3slib-O0-c-DLM3S6965-IC:\projects\new\putton c:\projects\new\putton\cmsis\core\cm3.c:\projects\new\putton\main.c:\projects\new\putton\driverlib\sysctl.c:\projects\new\putton\putton\putton\lm3slib\driverlib\gpio.cC:\projects\new\butdown\lm3slib\driverlib\interrupt.C:\projects\new\butdown\startup\startup\startup\u lm3s.C:\projects\new\butdown\lm3slib\driverlib\cpu.C[cc]arm none eabi gcc:error:lm3slib:没有这样的文件或目录构建失败
我想这意味着您需要为该库提供正确的路径……:)对不起,今天大部分时间都不在,该睡觉了。
GCC HOME: C:\Program Files (x86)\GNU Tools ARM Embedded\4.6 2012q2\bin
    compile:
        [mkdir] Skipping C:\projects\new\PushButton\Debug\bin because it already exists.
        [mkdir] Skipping C:\projects\new\PushButton\Debug\obj because it already exists.
           [cc] Starting dependency analysis for 2 files.
           [cc] Parsing ..\..\cmsis\core_cm3.c
           [cc] Parsing ..\..\startup\startup_lm3s.c
           [cc] 2 files are up to date.
           [cc] 0 files to be recompiled from dependency analysis.
           [cc] 5 total files to be compiled.
           [cc] arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Wall -ffunction-sections -O0 -g -c -DLM3S6965 -IC:\projects\new\PushButton C:\projects\new\PushButton\main.c C:\projects\new\PushButton\lm3slib\driverlib\sysctl.c C:\projects\new\PushButton\lm3slib\driverlib\gpio.c C:\projects\new\PushButton\lm3slib\driverlib\interrupt.c C:\projects\new\PushButton\lm3slib\driverlib\cpu.c
           [cc] C:\projects\new\PushButton\main.c:21:26: fatal error: inc/hw_types.h: No such file or directory
           [cc] compilation terminated.
           [cc] C:\projects\new\PushButton\lm3slib\driverlib\sysctl.c:32:25: fatal error: inc/hw_ints.h: No such file or directory
           [cc] compilation terminated.
           [cc] C:\projects\new\PushButton\lm3slib\driverlib\gpio.c:32:25: fatal error: inc/hw_gpio.h: No such file or directory
           [cc] compilation terminated.
           [cc] C:\projects\new\PushButton\lm3slib\driverlib\interrupt.c:32:25: fatal error: inc/hw_ints.h: No such file or directory
           [cc] compilation terminated.
           [cc] C:\projects\new\PushButton\lm3slib\driverlib\cpu.c:26:27: fatal error: driverlib/cpu.h: No such file or directory
           [cc] compilation terminated.

    BUILD FAILED
    Total time: 0 seconds