From: Carlo Caione on 3 May 2010 09:06 Hi, I was trying to setup an environment to compile programs for an STM32. One of the steps is to write a linker script. Now my question is: what does the linker script depend on? I think that it depends on the the compiler used. But, how can I write from scratch a new linker script? I suppose I have to know which are the sections present in my object file. But they are so much dependent on the compiler? Thanks, -- Carlo --- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: FreeRTOS info on 3 May 2010 09:25 On 03/05/2010 14:06, Carlo Caione wrote: > Hi, > I was trying to setup an environment to compile programs for an STM32. > One of the steps is to write a linker script. > Now my question is: what does the linker script depend on? > I think that it depends on the the compiler used. But, how can > I write from scratch a new linker script? I suppose I have to > know which are the sections present in my object file. But > they are so much dependent on the compiler? > > Thanks, > > -- > Carlo > > --- news://freenews.netfront.net/ - complaints: news(a)netfront.net --- Yes - it is very dependent on the compiler being used, although you don't mention the compiler you are actually using. Normal practice would be to start with a linker script from an example project provided with your compiler (or from the microcontroller vendors site, or otherwise found elsewhere) that targets the microcontroller you are using. If the microcontroller derivative is the same (same memory map) then the chances are you won't even have to modify it. [just noticed this was posted to gnu.gcc too, so I would guess you are using GCC]. -- Regards, Richard. + http://www.FreeRTOS.org Designed for Microcontrollers. More than 7000 downloads per month. + http://www.SafeRTOS.com Certified by TÜV as meeting the requirements for safety related systems.
From: Carlo Caione on 3 May 2010 09:59 On 03/05/2010 15:25, FreeRTOS info wrote: > Yes - it is very dependent on the compiler being used, although you > don't mention the compiler you are actually using. > > Normal practice would be to start with a linker script from an example > project provided with your compiler (or from the microcontroller vendors > site, or otherwise found elsewhere) that targets the microcontroller you > are using. If the microcontroller derivative is the same (same memory > map) then the chances are you won't even have to modify it. > > [just noticed this was posted to gnu.gcc too, so I would guess you are > using GCC]. Sorry for crossposting. Yes, I would use ARM EABI Lite version of the CodeSourcery G++. Thank you for your reply. And it is a nice coincidence because I'm trying to put FreeRTOS on STM32 using Eclipse + CodeSourcery + openOCD. Regards, -- Carlo --- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: FreeRTOS info on 3 May 2010 10:02 On 03/05/2010 14:59, Carlo Caione wrote: > On 03/05/2010 15:25, FreeRTOS info wrote: > >> Yes - it is very dependent on the compiler being used, although you >> don't mention the compiler you are actually using. >> >> Normal practice would be to start with a linker script from an example >> project provided with your compiler (or from the microcontroller vendors >> site, or otherwise found elsewhere) that targets the microcontroller you >> are using. If the microcontroller derivative is the same (same memory >> map) then the chances are you won't even have to modify it. >> >> [just noticed this was posted to gnu.gcc too, so I would guess you are >> using GCC]. > > Sorry for crossposting. > Yes, I would use ARM EABI Lite version of the CodeSourcery G++. > Thank you for your reply. And it is a nice coincidence because I'm > trying to put FreeRTOS on STM32 using Eclipse + CodeSourcery + openOCD. In which case, maybe this link will help you: http://sites.google.com/a/stf12.net/developer-sw-fw/eclipse-demo -- Regards, Richard. + http://www.FreeRTOS.org Designed for Microcontrollers. More than 7000 downloads per month. + http://www.SafeRTOS.com Certified by TÜV as meeting the requirements for safety related systems.
From: Grant Edwards on 3 May 2010 10:26 On 2010-05-03, Carlo Caione <carlo.caione(a)gmail.com> wrote: > I was trying to setup an environment to compile programs for an > STM32. One of the steps is to write a linker script. Now my question > is: what does the linker script depend on? I think that it depends on > the the compiler used. It depends on the compiler used (you need to know what section names to expect) and on the linker used (you need to know the syntax and semantics for linker scripts). > But, how can I write from scratch a new linker script? 1) Read the manuals for the linker and compiler. 2) Look at existing linker scripts. > I suppose I have to know which are the sections present in my object > file. Yes. > But they are so much dependent on the compiler? Yes. -- Grant Edwards grant.b.edwards Yow! Gee, I feel kind of at LIGHT in the head now, gmail.com knowing I can't make my satellite dish PAYMENTS!
|
Pages: 1 Prev: In search of (agile?) change management resource Next: Disable hsync/vsync on a TFT |