CC2640例程序编译Performing Pre-Build Action Error问题
此贴关键: 预编译失败原因各有不同,但都可以到工程目录下的iar\config\configPkg\.errorlog中查看和解决(太坑了,IDE上只报了一个错误,没有具体原因)。
1. 问题原因: IAR 默认安装路径有空格
2. 解决方案:
方案一: 重装IAR, 将默认路径修改为不含空格的路径,包括IAR自己的两级目录名称也不能含空格。
方案二: 直接修改现有安装路径,然后到注册表中对应的全部修改一遍(我就是这么干的,很耗时)
“IAR Systems\Embedded Workbench 8.0” 修改为 ”IAR_Systems\Embedded_Workbench_8.0”
3. 判断依据:错误日志中有“E:/ProgramFiles/IAR: not found”,而这是我的IAR安装路径的一部分。
预编译错误时,错误日志输出路径:C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650lp\simple_peripheral\iar\config\configPkg\.errorlog
4. 当前环境:
4.1 8.1.11的IAR FOR ARM;
4.2 2.2.01.08的蓝牙协议栈;
4.3 WIN10;
4.4 所有BLE相关软件都按默认路径安装到C:\ti下。
4.5 官方代码直接编译,simplelink\ble_sdk_2_02_01_18\examples\cc2650em\simple_peripheral
Building configuration: cc2650em_app - FlashROM
Updating build tree...
Performing Pre-Build Action
Error while running "C:\ti\xdctools_3_32_00_06_core/xs" --xdcpath="C:\ti\tirtos_cc13xx_cc26xx_2_20_01_08\products\tidrivers_cc13xx_cc26xx_2_20_01_10\packages;C:\ti\tirtos_cc13xx_cc26xx_2_20_01_08\products\bios_6_46_01_38\
packages" iar.tools.configuro -c "E:\ProgramFiles\IAR Systems\Embedded Workbench 8.0\arm" --cc "E:\ProgramFiles\IAR Systems\Embedded Workbench 8.0\arm\bin\iccarm.exe" --device "CC2650F128" --compileOptions "dummy.c
-D AUTO_ADV=FALSE -D CC2650DK_7ID -D CC26XX -D Display_DISABLE_ALL -D HEAPMGR_SIZE=0 -D ICALL_MAX_NUM_ENTITIES=6 -D ICALL_MAX_NUM_TASKS=4 -D POWER_SAVING -D USE_ICALL -D
xdc_runtime_Assert_DISABLE_ALL -D xdc_runtime_Log_DISABLE_ALL --diag_suppress Pa050 -o C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\FlashROM\Obj --debug --endian=little
--cpu=Cortex-M3 -f C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/config/build_components.opt -f C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\
stack\build_config.opt -f C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\config\configPkg\compiler.opt.defs -f C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\
config\iar_boundary.bdef -e --fpu=None --dlib_config \"E:\ProgramFiles\IAR Systems\Embedded Workbench 8.0\arm\INC\c\DLib_Config_Normal.h\" -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\
..\..\..\..\src/controller/cc26xx/inc\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/inc\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\
src/common/cc26xx\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/icall/inc\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/inc\ -I C:\ti\
simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/profiles/batt/cc26xx\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/profiles/dev_info\ -I C:\ti\
simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/profiles/hid_dev/cc26xx\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/profiles/hid_dev_kbd\
-I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/profiles/hid_dev_kbd/cc26xx\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\
src/profiles/roles\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/profiles/roles/cc26xx\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\
src/profiles/scan_param\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/profiles/scan_param/cc26xx\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\
app\..\..\..\..\..\src/target\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src\components/hal/src/inc\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\
..\..\src\components/hal/src/target/_common\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src\components/hal/src/target/_common/cc26xx\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\
examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src\components/hal/src/target/cc2650/rom\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src\components/heapmgr\ -I C:\ti\simplelink\
ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src\components/icall/src/inc\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src\components/osal/src/inc\ -I C:\ti\
simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src\components/services/src/saddr\ -I C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src\
components/services/src/sdata\ -I C:\ti\tirtos_cc13xx_cc26xx_2_20_01_08\products\cc26xxware_2_24_02_17393\ -I C:\ti\tirtos_cc13xx_cc26xx_2_20_01_08\products\tidrivers_cc13xx_cc26xx_2_20_01_10\packages\ -Ohz" --linkOptions "-o
C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\FlashROM\Exe\hid_emu_kbd_cc2650em_app.out --map C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\FlashROM\
List\hid_emu_kbd_cc2650em_app.map --config C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src/common/cc26xx/iar/cc26xx_app.icf --keep __vector_table -f C:\ti\simplelink\
ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\config\configPkg\linker.cmd -f C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\config\iar_boundary.xcl C:\ti\simplelink\
ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\..\..\..\..\..\src\rom\common_rom_releases\03282014\common_rom.symbols C:\ti\tirtos_cc13xx_cc26xx_2_20_01_08\products\cc26xxware_2_24_02_17393\driverlib\bin\
iar\driverlib.lib --entry __iar_program_start --vfe --text_out locale" --profile release --projFile "C:\ti\simplelink\ble_sdk_2_02_01_18\examples\cc2650em\hid_emu_kbd_t\iar\app\cc2650em_app.ewp"
谢谢分享!Mark一下!