absolute ram address

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

cross mob
RoBo_293926
Level 1
Level 1
5 sign-ins First question asked First reply posted
        I developed a project with the PSOC3 using the keyword "_at_ " to assign absolute memory addresses to be read from Modbus. I changed the project with a device I tried PSOC5 is the use of the statement " __attribute__ ((section (".EEPROMDATA")));" but does not work. can you help me? thanks Roberto italy   
0 Likes
1 Solution
Anonymous
Not applicable

 Remeber that the variable MUST be used(accessed) in your code, else it would be optimised out.

View solution in original post

0 Likes
7 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

PSoC3 uses a different compiler (Keil C51) than PSoC5 (GCC). So according to www.keil.com/support/docs/2829.htm you need to use pointers instead.

   

Alternatively you can do this while linking the code: sourceware.org/binutils/docs/ld/SECTIONS.html#SECTIONS

0 Likes
Anonymous
Not applicable

 I think I post the answer awhile ago but cannot remember when. Shall check.

0 Likes
Anonymous
Not applicable

OK, found it

   

www.cypress.com/?app=forum&id=2233&rID=55749

0 Likes
Anonymous
Not applicable

 Remeber that the variable MUST be used(accessed) in your code, else it would be optimised out.

0 Likes
RoBo_293926
Level 1
Level 1
5 sign-ins First question asked First reply posted
        I do not know how to use the variable MUST can you help me?   
0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

'MUST' is not the name of a variable. hl meant that your code needs to use the variable which is used to reference to RAM address. Otherwise the compiler will remove it during compile or linking, and may reuse this address for something else.

0 Likes
Anonymous
Not applicable

Thanks hli

0 Likes