您好、TI!
由于我们使用4×4 RSM,所以我想将代码从2640R2F 7X7移动至4x4。
我参考以下文档步骤进行修改,但我认为2640R2F 仍然使用7X7电路板配置。
以下是我使用的步骤:
从现有的 CC2640R2_LAUNCHXL 复制现有的板级配置文件并重命名 CC2640R2DK_4XS
2.删除 CC2640R2_LAUNCHXL.c 和 CC2640R2_LAUNCHXL.h
3.将 CC2640R2DK_4XS.c CC2640R2DK_4XS.h Board.h 从 \source\ti\ble5stack\boards\CC2640R2DK_4XS 导入 CC2640R2DK_4XS 文件。
4.修改中的 board.c 和 board.h \source\ti\ble5stack\target
为了验证2640R2F 是否 使用自定义板文件配置、因此我标记 CC2640R2_LAUNCHXL。
测试结果显示错误、未进入定制板级配置文件。
board.c
#if defined(CC2640R2DK_CXS) || defined (CC2640R2DK_4XS) \ || defined (CC2640R2DK_5XD) || defined (CC2640R2DK_7ID) #include "./cc2640r2em/cc2640r2em_board.c" //#elif defined(CC2640R2_LAUNCHXL) //#include "./cc2640r2lp/cc2640r2lp_board.c" #elif defined(CC2640R2_RC) #include "./cc2640r2rc/cc2640r2rc_board.c" #elif defined(CC26X2R1_LAUNCHXL) #include "./cc2652r1lp/cc2642r1lp_board.c" #elif defined(CC13X2R1_LAUNCHXL) #include "./cc1352r1lp/cc1352r1lp_board.c" #elif defined(CC2640R2DK_4XS) #include "../../boards/CC2640R2DK_4XS/Board.h" #include "../../boards/CC2640R2DK_4XS/CC2640R2DK_4XS.c" #else // unknown board #error "***ERROR*** Invalid Board Specified! Please see board.h for options." #endif
board.h
#if defined(CC2640R2DK_CXS) || defined (CC2640R2DK_4XS) \ || defined (CC2640R2DK_5XD) || defined (CC2640R2DK_7ID) #include "./cc2640r2em/cc2640r2em_board.h" //#elif defined(CC2640R2_LAUNCHXL) //#include "./cc2640r2lp/cc2640r2lp_board.h" #elif defined(CC26X2R1_LAUNCHXL) #include "./cc2652r1lp/cc2642r1lp_board.h" #elif defined(CC2640R2_RC) #include "./cc2640r2rc/cc2640r2rc_board.h" #elif defined(CC13X2R1_LAUNCHXL) #include "./cc1352r1lp/cc1352r1lp_board.h" #elif defined(CC2640R2DK_4XS) #include "../../boards/CC2640R2DK_4XS/Board.h" #else // unknown board #error "***ERROR*** Invalid Board Specified! Please see board.h for options." #endif
此致、
迈克