在线时间4 小时
UID275230
注册时间2009-3-8
NXP金币0
该用户从未签到
新手上路

- 积分
- 39
- 最后登录
- 1970-1-1
|
各位大神, 本人菜鸟一枚,刚入手FRDM_KL43Z。
从官网上下载了
FRDM-KL43Z Sample Code Package (REV 0)
本来想点个灯看一下,自己写的有问题,然后又找出了官方库自带的LED例程
结果编译后还是一样的错误
..\..\..\..\src\projects\frdm_projects\gpio_test\gpio_test.c(53): warning: #61-D: integer operation result is out of range
PORT_Init (PORTE, PORT_MODULE_ALT1_MODE, PIN_31, 0, NULL);
..\..\..\..\src\projects\frdm_projects\gpio_test\gpio_test.c(54): warning: #61-D: integer operation result is out of range
GPIO_Init (GPIOE, GPIO_PIN_OUTPUT, PIN_31);
..\..\..\..\src\projects\frdm_projects\gpio_test\gpio_test.c(55): warning: #61-D: integer operation result is out of range
GPIO_Clr (GPIOE, PIN_31);
..\..\..\..\src\projects\frdm_projects\gpio_test\gpio_test.c(78): error: #20: identifier "LED_GREEN" is undefined
GPIO_Set (GPIOD, LED_GREEN);
..\..\..\..\src\projects\frdm_projects\gpio_test\gpio_test.c(112): warning: #61-D: integer operation result is out of range
GPIO_Tgl (GPIOD, PIN_5); GPIO_Tgl (GPIOE, PIN_31);
..\..\..\..\src\projects\frdm_projects\gpio_test\gpio_test.c: 4 warnings, 1 error
".\debug\GPIO_Test.axf" - 1 Error(s), 4 Warning(s).
网上说出现此问题是1<<31错误导致的 需要改成(uint32)1<<31
但是查看寄存器列表,他已经做了。
#define PIN_5 (uint32)(1 << 5)
我已经完全按照官方例程来了啊,一样出错。。。
那么问题就来了,身为菜鸟,就找不到错误原因在哪里了。是不是库有问题还是怎么,求指导~
MDK版本 V5.13
Freescale package 用的最新的1.7
附件是工程。求指点。
|
评分
-
查看全部评分
|