Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® Software > How to locate data in EEPROM for PSoC5 with GCC

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



How to locate data in EEPROM for PSoC5 with GCC
Moderator:
JFMD

Post Reply
Follow this topic



How to locate data in EEPROM for PSoC5 with GCC

wholloway posted on 05 Oct 2011 7:20 PM PST
Senior Member
13 Forum Posts

Can anyone help with this:

I use the line

const struct array[0x800] __attribute__ ((section ("EEPROMDATA")));

in the C source to place an array in the eeprom space.  I then added the linker custom flag

"-section-start EEPROMDATA=0x40008000" to provide an absolute load location.

The code compiles, and the map shows the variable assigned to the section EEPROMDATA, but it is located in the data section instead of at the eeprom location provided.

I know I can accomplish what is necessary with pointers to eeprom, but this approach allows the code to access structure elements directly.




Re: How to locate data in EEPROM for PSoC5 with GCC

me2 posted on 16 Oct 2011 06:16 PM PST
Senior Member
16 Forum Posts

This is an interesting question and I'd hope that some embedded C-experts would step in and answer.

Anyone?

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20