Linker script - idea behind/documentation of xmc4500.ld

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

cross mob
Not applicable
Hi there,

I am trying to understand the idea of some parts of the linker script delivered for xmc4500 by infineon. I am not a linker script expert but I read a lot of documentation to be able to understand the basics. I want to write a linker script for a bare metal c/c++ embedded environment, if anybody knows a good source of documentation for this please give me a hint.

Questions (about xmc4500.ld, Template version 1.1 dated 26 Aug 2013, supplied with Dave 3.1.10):

* The MEMORY regions for RAM have the attributes (!RX), I would expect that they should have (RWX)(PSRAM) or (RW)(DSRAM1/2). Why are they setup this way?

* Within the .text section the input sections .glue*, .v4* and .vfp11_veneer are included.
.glue* is normaly used for ARM <-> Thumb interwork, but the xmc4500 is a cortex M4 not supporting ARM instructions
.v4 section is for a patch of the ARMv4 Core to support the BX instruction
.vfp11_veneer is for the Vector Floating Point Coprocessor (is not available on xmc4500)
Are these input sections fragments of a generic arm linker script? Is it save to delete them?

* The LMA is always mapped to the _uncached region and the VMA to the cached region ( | 0x04000000 in script). What is the reason for this? For what purpose is the physical memory of the XMC mapped twice (cached/uncached) within the memory map?

* I haven't found the Heap_Bank2/3 within the Dave Software, is this for future implementations? Can I use the memories for different purposes without getting trouble?

* DMA_Descriptors.o: is this file part of the autocode generated by Dave?

* Debug part (.debug, DWARF...). I want to write my own .ld, is it good practice to copy this part from the default linker script of the gcc tools ( ld.exe --verbose)? Or is it better to use the part from the Infineon template?

* Is there a good documentation of the gcc internal sections like gnu.linkonce ARM.exidx .ARM.extab.and so on?

Thanks a lot for your help, have a nice weekend!

Best regards,

1 Reply
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

Hi Mario,

It has been 8 years since you've asked this question.. Did you manage to find the answers 🙂  ?