7 years, 3 months ago.

How to define a offset in mbed online compiler

Hello community, I have compile several projects with the online compiler and have got binary files, which are running well on mbed. Now, I would like do the next step to develop a own hardware, based on LPC1768 with an SD card interface. I would like use a bootloader, which are get the actual firmware from SD and put it into the flash. The bootloader is working well, but it is neccesarry, that the bin-application file starts on 0x4000, with adapt interrupt table. I have build a small test application (blinking led) with Keil uVision, and it is working well, with the specified offset. Unfortunalety, I can't export my target application from mbed online compiler to uVision4 or LPXCpresso, becauseI got many, many errors due build process with external offline-compiler. Furthermore, I use a "fix" bootloader hex-file and I can't change the BL because a part of sources are lost. Therefore, I would like know, how I can configure the mbed online compiler to put an offset into the exported bin-file ?

Many thanks in advance Marco

Dear Marco, could you please teach me how to jump from a mBed firmware to a Keil firmware? How to jump to a 0x4000 flash offset firmware. Thanks in advance.

posted by Bruno Cavalcanti 18 Oct 2017

3 Answers

6 years, 1 month ago.

It would be nice if mbed allow user to set boot loader offset.

5 years ago.

Bump, according to Martin, "mbed" was looking to improving this, has there anything happened in the last 2 years?

Not really from mbed.... However the gcc4mbed method works flawlessly. Google it and download the latest from github, You will have to know which linker files to edit for offsetting the code.

posted by Bill Bellis 22 Aug 2016
7 years, 3 months ago.

Hello Marco Haufe,

one way to do it, is to include mbed-src library to your project, and edit scatter file for your target to reflect your offset and other changes needed (using target LPC1768). We are looking at improving this.

Can you elaborate: " Unfortunalety, I can't export my target application from mbed online compiler to uVision4 or LPXCpresso, becauseI got many, many errors due build process with external offline-compiler".

Regards, 0xc0170

Hello Martin, thanks for your response. I am a newbie on ARM and mbed, but have many expiriences with BASCOM and AVR. Therefore, I don't know waht is a scatter file and where I can find it ? But first, I know, that my mbed.project is only working with a older version of the mbed library. Where I can find the mbed-src, of that mbed library from my running application ? About your second question, I am using sometimes uVision4, Verion 4.03. With simple mbed-online compiler projects, I have problems to export it to my uVision4, too. I think, I may be better, to update my uVision4 installation and will try it again.

posted by Marco Haufe 04 Jun 2014

Hello Martin Kojtal,

Any update on setting a base offset using the online compiler? I am about to start using an Ethernet Bootloader and need to be able to compile the application with an offset of 0x2000

posted by David Godfrey 12 Sep 2014

I am interested in knowing how to do this as well. I have tried altering the scatter file by changing the address of the load region and execute region but the online compiler doesn't like it and gives errors. Could someone from mbed please let us know how to do this.

posted by Tim Barry 03 Oct 2014

Anybody was able to get a solution to this?

posted by Balazs Harmath 26 Nov 2014