GCC .LD file

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

cross mob
lola_1650581
Level 3
Level 3
First like received

Hi All:

     About the Linker Script File for gcc,I have some question to ask:

1:

pastedImage_4.png

   what  the "NOLOAD" and the "alignment"  is used for and how can I set the size of the custom section?

2: If the a variable of type const must be place in the section of " .rodata" or not? Can I place a variable of type const  in the section of the custom by myself?

0 Likes
1 Solution
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Which device are you using, PSoC4 or PSoC6?

The `(NOLOAD)' directive will mark a section to not be loaded at run time. the section will begin at the specified alignment. For example, if alignment is 4, it means the address of the section will be aligned with 4 byte.

Yes. You can place a constant in the section of the custom by yourself.

Thanks,

Ryan

View solution in original post

0 Likes
2 Replies
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Which device are you using, PSoC4 or PSoC6?

The `(NOLOAD)' directive will mark a section to not be loaded at run time. the section will begin at the specified alignment. For example, if alignment is 4, it means the address of the section will be aligned with 4 byte.

Yes. You can place a constant in the section of the custom by yourself.

Thanks,

Ryan

0 Likes

Hi:

  Thanks.It is PSOC4.

  I still have doubts when should I use a output section type of NOLOAD when I custom a section?

0 Likes