Depending upon the Em_EEPROM v2.x configuration settings ie., size, wear level factor and redundant copy Em_EEPROM component converts the data indices to actual physical address. It is not straight forward to decode the Em_EEPROM physical address from bootloader project.
Instead of Em_EEPROM component, user can us flash read/write API in bootloader and bootloadable projects to update custom data to intended device flash rows. Please refer Flash_Example available in PSoC Creator to get started.
User can write custom data to PSoC device flash which contains application code and data. uint32 CySysFlashWriteRow(uint32 rowNum, const uint8 rowData) updates flash rowNum with custom rowData. It does not require seperate flash component. However, user needs to ensure that the rownumber is after the application flash area and place in checksum exclude region. For more details, please refer to PSoC 4 system reference guide.
As per the Em_EEPROM configuration window, I assume that the Em_EEPROM is used to store data without wear leveling or redundant copy. You can staright away use flash row write API to store the data at required flash rows. This custom flash row can be read using address pointers in bootloader component. This has been demonstrated in code example: Flash_Example available in PSoC Creator (File > Code Example)
Thanks for your answer.
I have been able to go by this path by using the Flash_Example you mentioned.
I did not need to checksum exclude the row i wrote / read too, the example does the job reading / writing from bootloader and application.
How can I know the amount of rows of application + bootloader use to place my_data in correct location?
Bootloadable validation calculates checksum from the application image start address till the valid end, instead of the device flash end. If the bootloadable application code and data overlaps with the test flash row used to store the custom data, bootloadable application validation might fail. Hence, it is recommended to use Checksum exclude region to place the flash varibale.
You can refer to <Project_Name>.map file to understand the placed memory address, size in bytes etc., Hope it helps.