ERROR: .cyeeprom data will not fit in EEPROM

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

cross mob
lock attach
Attachments are accessible only for community members.
cadi_1014291
Level 6
Level 6
25 likes received 10 likes received 10 likes given

Hi,

   

I like to test Creator with new GNU ARM Embedded Toolchains, recently version 6.2 was released, so i installed it and set Creator to use it, now i'm unable to build the attached project, which is not using the EEPROM at all.

   

Creator is throwing the following error:

   

ERROR: .cyeeprom data will not fit in EEPROM
collect2.exe: error: ld returned 1 exit status
The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

   

 

   

Using version 5.4 of the GNU ARM Toolchain compile the same project successfully.

   

 

   

 

   

So, my question would be:

   

Why is the EEPROM used on the design if i'm not implicitly using it?

   

It does save any PSoC configuration?

   

Any pointer to cyeeprom usage on projects that doesn't use the EEPROM component would be appreciated.

   

Thanks in advance and happy holidays.

   

Carlos

   

 

   

This post is kind of a follow-up of this other post http://www.cypress.com/forum/psoc-creator-software/unable-debug-newer-version-arm-gnu-toolchain

0 Likes
1 Solution
PeVo_1249246
Level 3
Level 3
10 replies posted 5 replies posted Welcome!

I have found that when making the linker script cm3gcc.ld .cyeeprom section to look like:

   
  .cyeeprom (0x90200000 + ee_offset) :   {       . = ALIGN(4);     KEEP(*(.cyeeprom))     ASSERT(. <= (0x90200000 + ee_offset + ee_size), ".cyeeprom data will not fit in EEPROM");   } :NONE 
   

Then the ASSERT will not fail. It is also possible to add into one of C files a line:

   
static uint8_t dummy __attribute__ ((section(".cyeeprom"),unused));
   

And then a single byte will be inserted into the section. Thus initiating the '.' counter for linker. This dummy approach seems to interfere with miniprog3, as into the hex file a single zero byte will be inserted for writing into EEPROm. miniprog3 will fail on it.

View solution in original post

6 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

​In the Programming Specification document for PSoC5LP-

   

http://www.cypress.com/file/119651/download

   

At page#09-10,It is mentioned that"Note that CPU is not involved in Flash/NVL/EEPROM programming. This operation is completed locally by SPC block through the NVL"

   

Please go through this document,you will get more information regarding EEPROM programming

0 Likes
cadi_1014291
Level 6
Level 6
25 likes received 10 likes received 10 likes given

Hi ANKS,

   

I updated the original post, now the project is attached there. I'm not using EEPROM on the project so looking around it seems to be a linker problem.

   

Hope this posts are not annoying, i know i should use the toolchain provided by cypress (4.9).

   

Thanks in advance

   

Carlos

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Your issue may be  resolved  with the latest versions of PSoC CREATOR

cadi_1014291
Level 6
Level 6
25 likes received 10 likes received 10 likes given

Great news!!, is there any planned date for the release?

   

Thanks

   

Carlos

0 Likes
PeVo_1249246
Level 3
Level 3
10 replies posted 5 replies posted Welcome!

I have found that when making the linker script cm3gcc.ld .cyeeprom section to look like:

   
  .cyeeprom (0x90200000 + ee_offset) :   {       . = ALIGN(4);     KEEP(*(.cyeeprom))     ASSERT(. <= (0x90200000 + ee_offset + ee_size), ".cyeeprom data will not fit in EEPROM");   } :NONE 
   

Then the ASSERT will not fail. It is also possible to add into one of C files a line:

   
static uint8_t dummy __attribute__ ((section(".cyeeprom"),unused));
   

And then a single byte will be inserted into the section. Thus initiating the '.' counter for linker. This dummy approach seems to interfere with miniprog3, as into the hex file a single zero byte will be inserted for writing into EEPROm. miniprog3 will fail on it.

Hi,

it did the trick when linking with default settings in Arm GNU.

I had to add the volatile flag to the dummy variable, otherwise it was being optimized with O2

@static volatile uint8_t dummy __attribute__ ((section(".cyeeprom"),unused)); 

Thank you

0 Likes