Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4 Forum Discussions

TamirM
Level 2
Level 2
25 sign-ins First like given 10 questions asked

Hello,

I would like to preform the following.

Save by the application some info on the Emulated EEPROM and then access this information while in boot mode.

is this possible?

if yes, how?

 

Thanks

0 Likes
1 Solution
BiBi_1928986
Level 7
Level 7
500 replies posted 250 replies posted 250 sign-ins

Hello.

A search of the forum shows this topic has been covered many-many times.

https://community.infineon.com/t5/PSoC-5-3-1/Store-a-variable-in-PSoC-5LP-flash-at-a-fixed-address/m...

https://community.infineon.com/t5/PSoC-4/PSoC4-Em-EEPROM-2-0-Fixed-Address/m-p/107072

Basically, store the data at a fixed address and both Bootloader and Bootloadable can have access to the data.

An alternate way is to use SFLASH.

Good luck with your project.

View solution in original post

0 Likes
8 Replies
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @TamirM ,

What do you mean by boot mode?

Is it bootloader application?

Regards,

Alakananda
0 Likes
TamirM
Level 2
Level 2
25 sign-ins First like given 10 questions asked

Hi @Alakananda_BG ,

I have a bootloadable app which uses Emulated EEPROM.

I want to access the parameters saved to the Emulated EEPROM by the bootloadable app from the bootloader

0 Likes
BiBi_1928986
Level 7
Level 7
500 replies posted 250 replies posted 250 sign-ins

Hello.

A search of the forum shows this topic has been covered many-many times.

https://community.infineon.com/t5/PSoC-5-3-1/Store-a-variable-in-PSoC-5LP-flash-at-a-fixed-address/m...

https://community.infineon.com/t5/PSoC-4/PSoC4-Em-EEPROM-2-0-Fixed-Address/m-p/107072

Basically, store the data at a fixed address and both Bootloader and Bootloadable can have access to the data.

An alternate way is to use SFLASH.

Good luck with your project.

0 Likes
TamirM
Level 2
Level 2
25 sign-ins First like given 10 questions asked

Thanks, but i still need assistance with some of the steps:

step 7: "search for the following declaration:
.cy_checksum_exclude : { KEEP(*(.cy_checksum_exclude)) } >rom"

I've found: "

.cy_checksum_exclude ((LENGTH(rom) - CY_FLASH_ROW_SIZE * CY_APPL_MAX) - CY_CHECKSUM_EXCLUDE_SIZE): { KEEP(*(.cy_checksum_exclude)) }


/* Bootloadable applications only: verify that size of the data in the section is within the specified limit. */
cy_checksum_exclude_size = (CY_APPL_LOADABLE == 1) ? SIZEOF(.cy_checksum_exclude) : 0;
ASSERT(cy_checksum_exclude_size <= CY_CHECKSUM_EXCLUDE_SIZE, "CY_BOOT: Section .cy_checksum_exclude size exceedes specified limit.")"

  1. should the new lines be between "KEEP(*(.cy_checksum_exclude))" and "y_checksum_exclude_size"?
  2. how can I tell the valid memory addresses space for <EEPROM_Address> to avoid overlapping with the memory space used by the application?

when i compile i see this at the end:

Flash used: 94696 of 131072 bytes (72.2%). Bootloader: 11008 bytes. Application: 83560 bytes. Metadata: 128 bytes.

My Em_EEPROM actual size (bytes) is 16384.

so i wrote in the linker script:

"EM_EEPROM_START_ADDRESS = 0x1BF80;
.my_emulated_eeprom EM_EEPROM_START_ADDRESS :
{
KEEP(*(.my_emulated_eeprom))
} >rom"

(131072  - 128 - 16384) = 0x1BF80

is that correct?

0 Likes

This was recently posted.  It may help.  Has links to FLASH allocation structure and explanation.
Emulated EEPROM on PSoC4 - Infineon Developer Community

Maybe   can shed some light on the issue with linker script.  I'm not an expert on that topic.

 

0 Likes

Thanks for the response.

looking forward for @Alakananda_BG 's assistance.

more info:

Device: CY8C4247AZI-M485

the edited linker script:

TamirM_1-1650453844391.png

(131072  - 128 - 16384 - 1) = 0x1BF7F

Em_EEPROM definitions from bootloadable:

TamirM_2-1650453911630.png

Bootloadable configuration:

TamirM_3-1650453958157.png

Em_EEPROM init at the Bootloadable:

TamirM_4-1650454026793.png

 

 

0 Likes
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @TamirM ,

Can you let us know from which document you are referring to "step 7: "search for the following declaration"?

The memory space.png image which you have attached in your previous response is not opening at our end can you reattach it?

Regards,

 

Alakananda
0 Likes

Hi @Alakananda_BG ,

I'm referring to the "Emulated EEPROM" datasheet, step 7 under the title "Placing EEPROM Storage at Fixed Address".

 

Memory Space:

TamirM_0-1650867743524.png

 

0 Likes