TI中文支持网
TI专业的中文技术问题搜集分享网站

IAR编译CC2640R2错误

之前在另外一台电脑上编译没有问题,换了台电脑编译就出错了,重装了几次SDK和IAR都没有用,errorlog中的错误信息如下:

warning: xdc.cfg.Program: "C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/kernel/tirtos/packages/ti/sysbios/hal/Hwi.xs", line 181: xdc.cfg.Program stack: For IAR targets, Program.stack is ignored. The C and Hwi stack sizes are determined by the size of the CSTACK section definition within the linker command file.
C:/Users/ganguo/AppData/Local/Temp/make9496-1.sh: 1: Syntax error: "(" unexpected
gmake[1]: *** [rom_sysbios.obj] Error 2
gmake[1]: *** Waiting for unfinished jobs….
C:/Users/ganguo/AppData/Local/Temp/make9496-1.sh: 1: Syntax error: "(" unexpected
gmake[1]: *** [rom_arm_m3_IntrinsicsSupport_asm_iar_lib.obj] Error 2
C:/Users/ganguo/AppData/Local/Temp/make9496-2.sh: 1: Syntax error: "(" unexpected
C:/Users/ganguo/AppData/Local/Temp/make9496-1.sh: 1: Syntax error: "(" unexpected
gmake[1]: *** [rom_arm_m3_Hwi_asm_switch_iar_lib.obj] Error 2
gmake[1]: *** [rom_arm_m3_Hwi_asm_iar_lib.obj] Error 2
C:/Users/ganguo/AppData/Local/Temp/make9496-3.sh: 1: Syntax error: "(" unexpected
gmake[1]: *** [rom_arm_m3_TaskSupport_asm_iar_lib.obj] Error 2
gmake: *** [C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/examples/rtos/CC2640R2_LAUNCHXL/ble5stack/multi_role/tirtos/iar/config/src/sysbios/rom_sysbios.arm3] Error 2
error: xdc.cfg.SourceDir: "C:/ti/xdctools_3_50_02_20_core/packages/xdc/cfg/SourceDir.xs", line 209: xdc.cfg.SourceDir : Build of generated source libraries failed: exit status = 2:

js: "C:/ti/xdctools_3_50_02_20_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
xdctools_3_50_02_20_core\gmake.exe: *** [package/cfg/app_ble_prm3.xdl] Error 1
xdctools_3_50_02_20_core\gmake.exe: *** Deleting file `package/cfg/app_ble_prm3.xdl'
xdctools_3_50_02_20_core\gmake.exe: *** [package/cfg/app_ble_prm3.xdl] Deleting file `package/cfg/app_ble_prm3.h'
xdctools_3_50_02_20_core\gmake.exe: *** [package/cfg/app_ble_prm3.xdl] Deleting file `package/cfg/app_ble_prm3.c'

Yue TANG:

是按照如下过程导入的吗? 公司环境有无限制一些软件的运行?

file:///C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/docs/ble5stack/ble_user_guide/html/cc2640/developing_in_iar.html

Developing with IAR

Installing IAR

The IAR toolchain contains many features beyond the scope of this document. More information and documentation can be found at IAR.com.

Check the BLE5-Stack 1.00.01.04 release notes to see which IAR version to use and any required workarounds. Object code produced by IAR may differ in size and performance as compared to CCS produced object code.

The following procedure describes installing and configuring the correct version of IAR and the necessary tools.

Install IAR Embedded Workbench for ARM

Download and install IAR EW ARM

To get IAR, choose one of the following methods:

Download the IAR Embedded Workbench 30-Day Evaluation Edition – This version of IAR is free, has full functionality, and includes all of the standard features. The size-limited Kickstart evaluation option is not compatible with this SDK.
Purchase the full-featured version of IAR Embedded Workbench – For complete BLE application development using the CC2640R2F, TI recommends purchasing the complete version of IAR without any restrictions. You can find the information on purchasing the complete version of IAR.

Attention

The version required is stated in the release notes. Opening IAR project files with a previous version of IAR may cause project file corruption.

Show Build Messages

TI recommends showing all the build output messages for full verbosity during building. To do this, go to Tools -> Optionsand set Show Build Messages to All (see Figure 16.)

../_images/image15.png

Figure 16. Show All Build Messages in IAR

Opening IAR Projects

Note

TI-RTOS driver and kernel examples are imported for IAR rather than supplied as pre-configured IAR workspace files. Instructions on how to create these projects are found here: Creating TI-RTOS (driver/kernel) Applications in IAR Embedded Workbench

This section describes how to open and build an existing project and references the simple_peripheral project. All of the BLE5-Stack projects included in the development kit have a similar structure.

Open the IAR Embedded Workbench IDE from the Start Menu.

Open an IAR workspace project: File -> Open -> Workspace…

For this example, select<SDK_INSTALL_DIR>\examples\rtos\CC2640R2_LAUNCHXL\ble5stack\simple_peripheral\tirtos\iar\ble5_simple_peripheral.eww

Yue TANG:

This workspace file is for the simple_peripheral project. When selected, the files associated with the workspace become visible in the Workspace pane on the left side of the screen. See Figure 17.

Select either project as the active project by clicking the respective tab at the bottom of the workspace pane. In Figure 17., the Overview tab is selected. This tab displays the file structure for both projects simultaneously. In this case, use the drop-down menu at the top of the workspace pane to select the active project. Each of these projects produces a separate downloadable object. The simple_peripheral sample project is the primary reference target for the description of a generic application in this guide. The simple_peripheral project implements a basic BLE5-Stack peripheral device including a GATT server with GATT services. This project can be a framework for developing peripheral-role applications.

BLE5-Stack IAR project build configurations

This and all BLE5-Stack project workspaces contain various projects and build configurations as shown in Table 7. *_StackLibrary build configurations build the stack as a library as described in Stack Library Configuration (_stack_library).

Table 7. Available IAR project build configurations¶

Project typeProject’s build configurationCompatible project complement

Application
FlashROM
Stack – FlashROM

FlashROM_StackLibrary
Stack – FlashROM_StackLibrary

FlashROM_StackLibrary_RCOSC
Stack – FlashROM_StackLibrary

FlashROM_OAD_ImgB
Stack – FlashROM

FlashROM_OAD_Offchip
Stack – FlashROM

Stack
FlashROM_Library
Application – FlashROM_Library

FlashROM
Application – FlashROM

Compile and Download

For all build configurations, the stack project should always be built before the application project.

For projects where the stack is built as a library:

Build the stack library project.

Select the stack project.
Select Project -> Make to build the stack.

Build the application project.

Select the application project.
Select Project -> Make to build the application.

Load the whole application

To download and debug: Select Project -> Download and Debug
To download without debugging: Select Project -> Download -> Download Active Application

Note

Application project that consume the stack in a library form will not have hard defined image boundaries.

After the initial build, if the stack project is not modified, only the application project needs to be rebuilt.

For projects where the stack and application are split images (not a library):

Build the stack project.

Select the stack project.
Select Project -> Make to build the stack.

Build the application project.

Select the application project.
Select Project -> Make to build the application.

Load the stack project.

Select Project -> Download -> Download Active Application to download the stack project.

Load the application project.

To download and debug: Select Project -> Download and Debug
To download without debugging: Select Project -> Download -> Download Active Application

Note

The stack project defines the flash and RAM boundary parameters used by the application project. Any modifications to the stack project require a rebuild of the stack project, followed by a rebuild of the application project to use the new boundary settings. See Frontier Tool.

After the initial build, if the stack project is not modified, only the application project needs to be rebuilt.

When the application is downloaded (that is, flash memory programmed), you can debug without reflashing the device. Go to Project -> Debug without Downloading.

Caution

Do not modify the CPU Variant in the project settings. All sample projects are configured with a CPU type, and changing this setting (that is, from CC2640R2F) may result in build errors.

Sample applications that implement the Over the Air Download (OAD) firmware update capability require the Boot Image Manager (BIM) project to be built. Refer to the Over the Air Download (OAD) section for more details.

Accessing Preprocessor Symbols

Various C preprocessor symbols may need to be set or adjusted at the project level. The following procedure describes how to access and modify preprocessor symbols.

Open the Project’s Options and select the C/C++ Compiler Category.
Open the Preprocessor tab.
View the Defined symbols box (see Figure 18.).
Add or edit the preprocessor symbols.

../_images/image38.jpeg

Figure 18. IAR Defined Symbols Box

Accessing Linker Symbols

Linker symbols may need to be set or adjusted at the project level in order to control the memory layout of the generated image. The following procedure describes how to access and modify linker symbols.

Open the Project’s Options and select the Linker Category.
Open the Config tab.
View the Configuration File symbol definitions box (see Figure 19.).
Add or edit the preprocessor symbols.

../_images/iar_linker_opts.png

Figure 19. IAR Defined Symbols Box

Resetting the CC2640R2F in IAR

Select the Board Reset option from the following Reset (back arrow) Debug Menu drop-down box.

../_images/image182.jpeg

Figure 20. IAR Board Reset

赞(0)
未经允许不得转载:TI中文支持网 » IAR编译CC2640R2错误
分享到: 更多 (0)