ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
Home
Support
当编译用于Texas Instruments (原Luminary Micro) Stellaris的程序时发生错误 Error: #20: Identifier is Undefined
当编译用于Texas Instruments (原Luminary Micro) Stellaris的程序时发生错误 Error: #20: Identifier is Undefined
主要软件:
主要软件版本: 1.0
主要软件修正版本: N/A
次要软件: N/A
问题: 我建立了一个工程,以Texas Instruments (原Luminary Micro) Stellaris芯片为目标,使用通用目标设置。但是当我编译时,我收到“Target not Created”提示,以及日志
Error: #20: Identifier "PIN" is Undefined.我应该如何成功编译?
解答: 自从LabVIEW Embedded for ARM发布后,又有很多芯片被加入了Stellaris系列,所以会造成对于一些新器件找不到引脚分布。这可以通过替换pin_map.h为新版本来解决。
- 从Texas Instruments Software Updates 下载最新软件包,例如SW-EK-LM3S8962-4694包拥有很多更新的引脚分布。
- 安装这个软件包,pin_map.h将被安装到
C:\StellarisWare\driverlib。你可以将这个更新的版本复制到你的LabVIEW工程文件中。它属于位于myproject\Application\1.1\include 的编译文件夹.
- 你也可以替换模板文件,这样新版本的文件将可以用于所有新工程。模板文件位于
C:\Program Files\National Instruments\LabVIEW 8.6\Targets\Keil\Embedded\RealView\Generic\LM3Sxxxx\Template\Include. 记得在替换已有文件之前,将其保存为pin_maps.h.bak,以便于你之后对其的恢复。
- 一些定义也需要更新。这因为有些引脚的名字已经随时间变化了,并且新文件没有了一些旧的定义。你需要做的是找到2776芯片对应部分(以"2776"搜索该文件)。当你到达该部分后,寻找对于"FAULT0"引脚的定义,一共有3处。将这三个复制到它们下面新的一行中,并把FAULT0重命名为FAULT。你完成后,它应该和下面的代码类似:
//*****************************************************************************
//
// LM3S2776 Port/Pin Mapping Definitions
//
//*****************************************************************************
#ifdef PART_LM3S2776
...
#define FAULT0_PERIPH (SYSCTL_PERIPH_GPIOE)
#define FAULT0_PORT (GPIO_PORTE_BASE)
#define FAULT0_PIN (GPIO_PIN_4)
// added definitions
#define FAULT_PERIPH (SYSCTL_PERIPH_GPIOE)
#define FAULT_PORT (GPIO_PORTE_BASE)
#define FAULT_PIN (GPIO_PIN_4)
...
- 这时,我们需要的
pin_map.h 完成了更新。
相关链接: Texas Instruments Software UpdatesKnowledgeBase 4YB93HBN: Porting LabVIEW to a Tier 2 Texas Instruments Stellaris Microcontroller
附件:
报告日期: 06/12/2009
最近更新: 04/27/2013
文档编号: 4YBA2IBN
Other Support Options
Ask the NI Community
Collaborate with other users in our discussion forums
Request Support from an Engineer
A valid service agreement may be required, and support options vary by country.