新建一个工程,编译环境是keil_5.11,用的芯片是
MK21FN1M0AVMC12,调用KSDK1.1.0_K21FA_1.0.0里面的
库函数总是编译出错。。。期望各位工程师们的解答。
例如:调用
KSDK1.1.0_K21FA_1.0.0/platform/hal/src/gpio(fsl_gpio_hal.
c)
编译错误如下:compiling fsl_gpio_hal.c...
..\..\..\..\platform\hal\inc\fsl_gpio_hal.h(98): warning: #260-D:
explicit type is missing ("int" assumed)
static inline void GPIO_HAL_SetPortDir(uint32_t baseAddr,
uint32_t direction)
..\..\..\..\platform\hal\inc\fsl_gpio_hal.h(98): error: #65:
expected a ";"
static inline void GPIO_HAL_SetPortDir(uint32_t baseAddr,
uint32_t direction)
..\..\..\..\platform\hal\inc\fsl_gpio_hal.h(156): warning: #12-D:
parsing restarts here after previous syntax error
void GPIO_HAL_WritePinOutput(uint32_t baseAddr, uint32_t
pin, uint32_t output);
..\..\..\..\platform\hal\inc\fsl_gpio_hal.h(165): error: #757:
variable "inline" is not a type name
static inline uint32_t GPIO_HAL_ReadPinOutput(uint32_t
baseAddr, uint32_t pin)
..\..\..\..\platform\hal\inc\fsl_gpio_hal.h(165): error: #101:
"uint32_t" has already been declared in the current scope
static inline uint32_t GPIO_HAL_ReadPinOutput(uint32_t
baseAddr, uint32_t pin)
..\..\..\..\platform\hal\inc\fsl_gpio_hal.h(165): error: #65:
expected a ";"
static inline uint32_t GPIO_HAL_ReadPinOutput(uint32_t
baseAddr, uint32_t pin)
..\..\..\..\platform\hal\src\gpio\fsl_gpio_hal.c(77): warning: At
end of source: #12-D: parsing restarts here after previous
syntax error
..\..\..\..\platform\hal\src\gpio\fsl_gpio_hal.c: 3 warnings, 4
errors
|