Replies: 4 comments 6 replies
-
Hmm. Is it a big problem to create a new custom target to hold the linker script? Isn't it just a few lines of JSON plus a few lines of CMake? |
Beta Was this translation helpful? Give feedback.
-
The linker script depends on the target hardware, but is also application dependent. E.g., I want to use lvgl graphics and this needs buffers and the position is relevant as DMA is not working with all RAM types. DMA is difficult because these different RAM and bus structure. I have created a number of custom targets, but it requires more than just a linker script. Many times my custom targets were not compiling because changes in mbed-os were not compatible with targets.json or pinnames.h. So the single modification of the linker script is much easier to maintain. My PR for adding a custom linker script is working already, I want to test it now with the multiple distro feature. |
Beta Was this translation helpful? Give feedback.
-
I think it is good to have things connected - #103 BR, Jan |
Beta Was this translation helpful? Give feedback.
-
What do you think about adding an example building script in the docs, like this one:
I know it can be made more generic but at least there is an example and it makes the development cycle much easier. |
Beta Was this translation helpful? Give feedback.
-
It took some time for me to figure out how the linker scripts where created, As far as I understand:
please confirm someone that this right.
Now I see a need for custom linker scripts without having the overhead of creating a new target. Custom allocation becomes neccessary when dealing with DMA, large buffers or aligned buffers and MPU settings for D-Cache.
The custom linker script could be set in the applications CMakeLists and provide a my-modified.ld also as raw linker script. When set, the mbed_set_linker_script.cmake will use the custom script instead of the default.
Beta Was this translation helpful? Give feedback.
All reactions