Place section

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

cross mob
Anonymous
Not applicable

Hi, all.

   

I have the CY8C5868AXI-LP035, the Creator 3.0 and i use the GCC compiler.

   

How can i place a section (for ex MySection) to an adress 0x10000?

   

Thanks.

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

What is inside does not matter. A section is an area of code or date that is collected by the linker to be placed to a specific address, either automatically or manually (user supplied options). TEXT or LITERAL are standard areas used by C-language.

View solution in original post

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Follow this thread http://www.cypress.com/?app=forum&id=2233&rID=86631 there are hints how to tell the linker to place a section at a fixed address.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

What is inside the section?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

What is inside does not matter. A section is an area of code or date that is collected by the linker to be placed to a specific address, either automatically or manually (user supplied options). TEXT or LITERAL are standard areas used by C-language.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Thank's Bob.

I tryed your link.
But I can't to get a positive result.

   

What i did:

   

1. I apply the "command line" "-Wl,--section-start=.CRCDATA=0x10000" (See the picture "linker.png", pls).

   

2. I put the string
"const unsigned char ucCRCdata[5] __attribute__ ((section (".CRCDATA"))) = {0xAA, 0xbb, 0xcc, 0xdd, 0xee};"
to the main.cpp file.

   

3. And in debuger i see zeros.

   

What did i wrong?

0 Likes
Anonymous
Not applicable

Thanks!

   

I resolved the problem.

   

The linker delited my section becouse I didn't use the ucCRCdata.

   

And I added a string to the main() "volatile u08 i = ucCRCdata[0];"

   

And all.

   

Thanks!

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Fine to hear that, you are always welcome!

   

 

   

Bob

0 Likes