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.

CC2640R2F-Q1: Memory placement in flash area

Part Number: CC2640R2F-Q1

Hi,

A customer doesn't want to fuse the code in the last flash page except ccfg.

is it okay to set the flash meomory like below ?

any side effect ?

BLE stack version : simplelink_cc2640r2_sdk_2_40_00_32

define region FLASH               = mem:[from FLASH_START to FLASH_END];

// Code and RO Data
//place in FLASH_ALL { readonly };
place in FLASH { readonly };

 

  • Hi Albert,
    I am assigning this to one of the experts to comment
  • Hi Albert,

    What do you mean by "fuse"? And what is the intended effect of your change to the linker file?

    It's not possible to write-protect smaller memory areas than sectors, if that is what is meant by fuse.

    BR,
    Aslak
  • Hi  Aslak,

    "fuse" means  downloading a firmware(Hex file) on a flash memory.

    The intend of the linker file is not to wirte application firmware at the last page of  flash.

    The customer want that data in SNV area including a bonding info  has to be unchanged after OTA.  so they just want to updata the application+ BLE stack  area.

    When  the default  simple_peripheral project is compiled and downloaded by using CCS, the last page  of flash is not written except ccfg area( please see the below). so they was able to upate the  new firmware from the address of 0H to just before the  SNV.

    Due to the lack of flash memory , the customer had to use a IAR compiler.  When  the simple_peripheral project  was compiled  with the default linke file and downloaded by using IAR compiler, the last page is written like below.  

    define region FLASH               = mem:[from FLASH_START to FLASH_END];
    define region FLASH_ALL           = mem:[from FLASH_START to FLASH_END] |
                                             FLASH_LAST_PAGE;

    // Code and RO Data
    place in FLASH_ALL { readonly };

    so they wasn't able to update the  new firmware from the  0H to the before SNV. because some of software code were written in the last page of flash.

    when using below  linker file setting,  the customer oberseved that last page was not written.

    define region FLASH               = mem:[from FLASH_START to FLASH_END];
    define region FLASH_ALL           = mem:[from FLASH_START to FLASH_END] |
                                             FLASH_LAST_PAGE;

    // Code and RO Data
    place in FLASH { readonly };

    They wants to know if  this setting is correct or not.

  • Hi,

    Yes they can, and it is correct. The example OAD projects should already be using linker files that exclude the last sector and instead reserve that sector for the the BIM project (which is then the project that contains CCFG)

    BR,
    Aslak