This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC26X2R1: persistent_app工程为什么不能访问0x34000以后的位置?

Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: SYSCONFIG

是不是因为map中$BOUND$0x34000 导致不能访问0x34000以后位置?在哪里修改(CMD中未发现)?

  • 您好,

    不是很确定您问题的意思,能具体明确一下吗?不过在oad_onchip示例里面,地址是被默认分配的,persistent app默认位置是 0x34000 到 0x38000。

  • 调用NVS_read/write接口无法访问0x34000后面位置,如NVS_write(0x34001, 0x77, 1);就会报错,但是0x34001前的位置就可以读写Flash

  • 您好,

    请参看BLE5-Stack User's Guide其中的Flash Layout for On-Chip OAD 部分。OAD_IMG_B (FLASH_END) 为 0x34000,OAD_IMG_A (HDR_START) 为 0x38000,中间的空间是 SysConfig -> NVS -> CONFIG_NVSINTERNAL 为用户应用程序(user application)保留的闪存。CONFIG_NVSINTERNAL 不能被persistent应用程序打开,它不能更改main BLE 应用程序的reserved NV内存,因此导致到 NVS 函数错误。

    您需要修改persistent应用程序和main应用程序的 SysConfig NVS 模块和命令链接器文件 (.cmd),也可能需要修改 bim_onchip,以更改内存分配。

  • 我的诉求:user application划分分区为0-0x28000(160k), persistent0x28000 -0x50000(160K),  bim_onchip(8k), ccfg+NV(24k), 总计352k

    且user application可以读写persistent和ccfg+NV(24k)分区

    persistent可以读写user application和ccfg+NV(24k)分区

    bim_onchip可以读写user application和ccfg+NV(24k)分区

    我应如何修改?

    自己测试如下

    工程:persistent

    1、

    2、

    3、

    4、报错

    makefile:184: recipe for target 'persistent app_CC26X2R1_LAUNCHXL_tirtos7_ticlang.out' failed
    error #10324-D: BOUND section ".TI.bound:flashBuf0" spans the boundary of an existing memory range FLASH_IMG_HDR
    error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. run placement with alignment fails for section ".TI.bound:flashBuf0" size 0x28000
    error #10010: errors encountered during linking; "persistent app_CC26X2R1_LAUNCHXL_tirtos7_ticlang.out" not built

  • 您好,

    您的这个问题和本帖主题无关,麻烦您重新开帖提问。

    感谢您的支持和理解。

    本帖将关闭。

  • 您需要修改persistent应用程序和main应用程序的 SysConfig NVS 模块和命令链接器文件 (.cmd),也可能需要修改 bim_onchip,以更改内存分配。

    应如何修改?

  • 您好,

    之前有说NVS模块部分位于sysconfig的位置(SysConfig -> NVS -> CONFIG_NVSINTERNAL

    .cmd文件可以查看工程的Properties -> CCS Build -> Arm Linker -> File Search Path有说到在SDK中您打开的工程示例的根目录(比如simplelink_cc13xx_cc26xx_sdk_7_10_01_24\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\basic_ble\tirtos7\ticlang中)

    具体的更改取决于您实际的需求。NVS更改应该在BLE的应用程序而不是persistent程序。

    此外我们不保证您这么修改会发生什么问题因为这些操作没有经过严密的验证,只能给出理论解释,希望您可以理解。