Flash Location of Bonding Information in PSoC 4 BLE – KBA222472

Version 2

    Version: **


    Translation - Japanese: PSoC 4 BLEのボンディング情報のフラッシュの場所 - KBA222472 - Community Translated (JA)



    Where is the bonding information stored in Flash for PSoC® 4 BLE? Can it be excluded to do „Full protection‟ of Flash?



    In PSoC 4 BLE, it is difficult to find the bonding data location and exclude it because each time you modify the code, the location may change.

    A workaround is to patch the linker script and assign a constant address for the .cy_checksum_exclude section. The bonding information is configured to place the “cyBle_flashstorage” at  CY_SECTION(".cy_checksum_exclude").

         1. Open project with BLE in PSoC Creator.

         2. Copy the generated linker script to a location in a project outside of “Generated Sources”.

         3. Right-click on a project name in Workspace Explorer and select Build Settings…

         4. Open “Linker” tree item and select Custom Linker Script. Enter the path and name of the custom linker script.

         5. Modify the custom linker script to have “.cy_checksum_exclude” section placed at a fixed address (for example,  0x1fc00). You can choose any arbitrary value, aligned to flash row boundary).


    For GCC, modify the following line in the cm0gcc.ld file. The difference is highlighted in red.


        .cy_checksum_exclude : { KEEP(*(.cy_checksum_exclude)) } > rom


        .cy_checksum_exclude 0x1fc00: { KEEP(*(.cy_checksum_exclude)) } > rom


         6. You can now do full protection for bytes up to the limit which you have chosen to save Bonding information in flash.