9.4.5 Porting From CC2540 to CC2541 Project
This chapter describes how to port a CC2540 Project to work on a CC2541. Similar steps can be taken for the reverse direction.
- Create and select a new CC2540 project configuration based on the CC2541 configuration under Project -> Edit Configurations.
- In the project options, under general options, in the target tab, change the “Device” to CC2540F256.
- Under C/C++ Compiler, in the Preprocessor tab, define CC2540 (and make sure CC2541 is not defined).
- In the Workspace pane, under the TOOLS group, open buildConfig.cfg, and comment out the CC2541 define.
- In the Workspace pane, under the LIB group, exclude the 2541 library by right clicking on CC2541_BLE_peri.lib and selecting options. Then check “Exclude from build".
- Add the CC2540_BLE_peri.lib to the library group.
- You also have to ensure to exclude the CC2540 library from the other CC2541 configurations.