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.

CC1350: How to modified the FLASH_BASE to 0x1000 on rfPacketErrorRate sample project

Part Number: CC1350
Other Parts Discussed in Thread: CC2650, SYSBIOS

Dears,

Could you please advise how to modified  the FLASH_BASE to 0x1000 on rfPacketErrorRate project (C:\ti\simplelink_cc13x0_sdk_1_30_00_06\examples\rtos\CC1350_LAUNCHXL\drivers\rfPacketErrorRate)? Thanks!

I want to build a custom boot loader project. The boot loader code will be allocated to flash 0x0000 to 0x1000 address, and the application code (based on rfPacketErrorRate project) allocated to flash 0x1000 to 0x20000 address.

For the application code (based on rfPacketErrorRate project), I tried to modified the FLASH_BASE to 0x1000  < CC1350_LAUNCHXL_TIRTOS.cmd > and rebuild. There still have “.resetVecs” on 0x0000 address.

 

Below are the modified < CC1350_LAUNCHXL_TIRTOS.cmd >

#define FLASH_BASE              0x1000
#define FLASH_SIZE              0x1F000 

And I got below .map file:

MEMORY CONFIGURATION

         name            origin    length      used     unused   attr    fill
----------------------  --------  ---------  --------  --------  ----  --------
  FLASH                 00001000   0001f000  0000fea8  0000f158  R  X
  SRAM                  20000000   00005000  00003c2d  000013d3  RW X


SEGMENT ALLOCATION MAP

run origin  load origin   length   init length attrs members
----------  ----------- ---------- ----------- ----- -------
00000000    00000000    0000003c   0000003c    r--
  00000000    00000000    0000003c   0000003c    r-- .resetVecs
00001000    00001000    0000a664   0000a664    r-x
  00001000    00001000    0000003c   0000003c    r-- .const:ti_sysbios_knl_Task_Object__PARAMS__C
  0000103c    0000103c    0000a628   0000a628    r-x .text
0000103c    0000103c    000004b4   000004b4    r--
  0000103c    0000103c    00000034   00000034    r-- .const:ti_sysbios_knl_Mailbox_Object__PARAMS__C
  00001070    00001070    00000030   00000030    r-- .const:ti_sysbios_family_arm_m3_Hwi_Object__PARAMS__C
  000010a0    000010a0    0000002c   0000002c    r-- .const:ti_sysbios_hal_Hwi_Object__PARAMS__C
  000010cc    000010cc    00000028   00000028    r-- .const:ti_sysbios_heaps_HeapMem_Module__FXNS__C
  000010f4    000010f4    00000028   00000028    r-- .const:ti_sysbios_knl_Swi_Object__PARAMS__C
  0000111c    0000111c    00000024   00000024    r-- .const:ti_sysbios_gates_GateHwi_Module__FXNS__C

  • Hey Gavin,

    you can change the location of your reset vectors in your app.cfg file, but having your reset vectors at 0x1000 will conflict with some RTOS ROM pointers. You can have TI-RTOS run from flash to remedy this, but it will consume some flash. The other option is to place your reset vectors at 0x1500 and run RTOS in ROM. Also the device will always start execution at 0x0, so the bootloader will need to jump to the location of your reset vectors in to execute your application.

    Add the following changes in release.cfg:
    /* Put reset vector after RCFG pointers */
    m3Hwi.resetVectorAddress = 0x1500;
  • hey Gavin,
    I have the same problem as you,i use the CC2650_LAUNCHXL. i cannt change the FLASH_BASE to 0x1000,when it was changed to 0x1000, the error appeared when build the Project,it says : error #10264:DEFAULT memory range overlaps existing range FLASH.

    help!
  • Hey Brocklobsta,
    I have the same problem as Gavin,i use the CC2650_LAUNCHXL. i cannt change the FLASH_BASE to 0x1000,when it was changed to 0x1000, the error appeared when build the Project,it says : error #10264:DEFAULT memory range overlaps existing range FLASH.
  • Hey,

    Follow the instructions in my previous post. You must change the location of your reset vectors to be inside your flash region. By default they are placed at 0x0.

  • i changed the reset vectors(in the .cfg) as you said,but it still appeared: error #10264:default memory range existing memory range FLASH when rebuild the project.

  • Interesting I ran through the steps I mentioned above and it works for me. Can you describe your changes in more detail so we can figure out whats different between my project and yours? Keep in mind the release.cfg is part of the tirtos_builds_CC1350_LAUNCHXL_release_ccs project. If you change the reset vector to 0x1000, you must TI-RTOS in Flash instead of rom. To do this comment out the following lines in release.cfg:

    var ROM = xdc.useModule('ti.sysbios.rom.ROM');
    ROM.romName = ROM.CC1350;
  • I have successfully change FLASH BASE address based on the post, summary as followed:
    Totally three place need to be changed:
    1. cmd file: Change FLASH BASE & SIZE:
    #define FLASH_BASE 0x1000
    #define FLASH_SIZE 0x1F000

    2. cfg file: Change reset vector to the same address
    /* Put reset vector after RCFG pointers */
    m3Hwi.resetVectorAddress = 0x1000;

    3. cfg file: use BIOS from default in ROM to in Flash.
    Reason is that when using BIOS from ROM it demands certain code lays at fix addresses in FLASH on first flash page. (Which is the same page that we want our boot to lay in. )
    /* ================ ROM configuration ================ */
    /*
    * To use BIOS in flash, comment out the code block below.
    */
    /*
    var ROM = xdc.useModule('ti.sysbios.rom.ROM');
    if (Program.cpu.deviceName.match(/CC26/)) {
    ROM.romName = ROM.CC2650;
    }
    else if (Program.cpu.deviceName.match(/CC13/)) {
    ROM.romName = ROM.CC1350;
    }
    */

    After that , could successfully change the flash base, then could create a customized bootloader on CC26xx or CC13xx.

    Vivian