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: Why can't Persistent_app projects access locations after 0x34000?

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

Hello,

Why can't Persistent_app projects access locations after 0x34000?

Is it because $BOUND $0x34000 in the map prevents access to locations after 0x34000? Where to modify (not found in CMD)?

Call NVS_ read/write interface cannot access locations after 0x34000, such as NVS_ Write (0x34001, 0x77, 1); an error will be reported, but the locations before 0x34001 can read and write Flash.

  • Hello Lily,

    Please review the Flash Layout for On-Chip OAD section of the BLE5-Stack User's Guide.  OAD_IMG_B (FLASH_END) is 0x34000, OAD_IMG_A (HDR_START) is 0x38000, and the space in-between is flash memory reserved by SysConfig -> NVS -> CONFIG_NVSINTERNAL for the user application.  CONFIG_NVSINTERNAL in never opened by the persistent application, as is expected given that it should not alter the main BLE application's reserved NV memory, hence the NVS function errors observed.  You will need to modify the SysConfig NVS module and command linker files (.cmd) of both the persistent and main applications, and possible the bim_onchip as well, to change the memory allocations.

    Regards,
    Ryan

  • Hello Ryan,

    You will need to modify the SysConfig NVS module and command linker files (.cmd) of both the persistent and main applications, and possible the bim_onchip as well, to change the memory allocations.

    How should we modify of what you said above? 

  • Part Number: LAUNCHXL-CC26X2R1

    My request: User application partition is 0-0x28000(160k), persistent0x28000 -0x50000(160K), bim_onchip(8k), Ccfg+NV (24k), Total 352k
    And the user application can read and write persistent and ccfg+NV(24k) partitions
    Persistent can read and write the user application and ccfg+NV(24k) partitions
    The bim_onchip can read and write the user application and ccfg+NV(24k) partitions
    How do I modify it?
    Test yourself as follows
    Engineering: Persistent

    erro;

    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

    simple_peripheral_oad_onchip:

    The CMD for persistent and simple_peripheral_oad_onchip is modified as follows: 

    However, persistent flushes the 0-0x28000 address of simple_peripheral_oad_onchip with an error. 

  • I've already shared the NVS module location within SysConfig, and the command linker files are located at <sdk_source>/examples/rtos/LP_CC2652R7/ble5stack/<project_name>/tirtos7/ticlang/cc13x2x7_cc26x2x7_app_tirtos7.cmd as expressed in the Project Properties -> CCS Build -> Arm Linker -> File Search Path.  Specific changes are dependent on your application needs, which have not been made clear given I've already stated that NVS alterations are expected from the BLE application project and not from the persistent application.

    Regards,
    Ryan

  • app 0-0x28000 (160k), persistent 0x2E000-0x56000 (160K), bim_onchip+CCFG(8k), NV 0x28000-0x2E000 (24k):

    CONFIG_NVSINTERNAL: Region Base 0x28000 and Region Size 0x6000
    CONFIG_NVSINTERNAL1: Region Base 0 and Region Size 0x28000
    IMG_A_FLASH_START: 0x2E000

    Apply to both app and persistent projects.

    Regards,
    Ryan

  • thank you,I'm sorry I don't understand why I posted to the e2e forum under this post. 

    Part Number: LAUNCHXL-CC26X2R1

    My request: User application partition is 0-0x28000(160k), persistent0x28000 -0x50000(160K), bim_onchip(8k), Ccfg+NV (24k), Total 352k
    And the user application can read and write persistent and ccfg+NV(24k) partitions

    Regards,
    Alex

  • I merged the threads since they were so similar.  I provided a valid and adequate solution configuration given the expected memory layout for OAD projects.  Any further application changes must be accomplished by the developer.

    Regards,
    Ryan

  • Thank you I get it ,The customer has now updated his response to the question :

    I hope that both B and A can use NVS_write to flash the other side, A, B and BIM can read and write SNV 

    ”IMG_A_FLASH_START: 0x2E000“ 

    This modification, the app still cannot flush persistent projects

    Partition B (app)

    Partition A (persistent) 

    Regards,
    Alex

  • Although not the intent of the original design, it is certainly possible for multiple concurrent applications to access SNV.  Please note that the BIM is not designed for TI Driver usage and will have to increase its memory space for NVS functions, furthermore the applications will have to coordinate opening and closing the NVS TI Driver to properly transfer control during runtime.  They should make sure this function is absolutely necessary before attempting to incorporate it.

    This modification, the app still cannot flush persistent projects

    This will need to be further described with more details.

    Regards,
    Ryan