Changing the heap size using the "linker_script.ld" in DAVE

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

cross mob
noureldin3010
Employee
Employee
5 sign-ins First reply posted First question asked

Hi,

I'm trying to change the heap size of XMC MCU using DAVE ... I tried to do that via the "linker_script.ld" file, but the size of the heap is defined as:

/* Heap - Bank1*/
Heap_Bank1_Size = Heap_Bank1_End - Heap_Bank1_Start;

I don't know where the numerical values of "Heap_Bank1_End" & "Heap_Bank1_Start" are defined

Can you please show where exactly in the linker_script.ld file I can change the stack/heap sizes?

Thanks,

0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

If you check the linker script in details, you could see commands like
Heap_Bank1_Start = .; 

The special linker dot ` . ' variable always contains the current output location counter. So this is being used to calculate the start and end address. You can search for linker command language guides for GNU to understand more about this.

Best Regards,
Vasanth

View solution in original post

0 Likes
4 Replies
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @noureldin3010 ,

Can you let us know which XMC device you are using?

Can you share us your linker script so that we can try it out at our end.

Regards,

Alakananda
0 Likes
lock attach
Attachments are accessible only for community members.

Hi Alakananda,

I'm currently using XMC4200 MCU ... the linker script is attached.

Thanks,

Nour

0 Likes

Hi Nour,

Following is the section I have mentioned.

Vasanth_0-1644468667226.png

Best Regards,
Vasanth

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

If you check the linker script in details, you could see commands like
Heap_Bank1_Start = .; 

The special linker dot ` . ' variable always contains the current output location counter. So this is being used to calculate the start and end address. You can search for linker command language guides for GNU to understand more about this.

Best Regards,
Vasanth

0 Likes