Uwes Blog

Projects, thoughts and more

mbed Online Compiler and LPC800

in categories ARM, C++

I have build some of the small LPC800 Breakout Boards.

To program them with the online mbed compiler, the resulting bin files have to be changed with the following command:

arm-none-eabi-objcopy -I binary -O ihex mbed_blink_LPC812.bin mbed_blink_LPC812.hex

The arm compiler toolchain should be installed in your path.

Here a small sample program for blinking an LED:

// ------------------------------------------------------------------------------
// Copyright by Uwe Arzt mailto:mail@uwe-arzt.de, https://uwe-arzt.de
// under BSD License, see https://uwe-arzt.de/bsd-license
// ------------------------------------------------------------------------------
#include "mbed.h"

DigitalOut LED(P0_0);

int main(int argc, char* argv[]) {
    while(true) {
        wait(0.5);
        LED = !LED;
    
    }      
}

You can program the resulting hex file with FlashMagic and a USB to serial Adapter.

I use FlashMagic on Windows(inside a virtual machine), because on Mac OS X the installation of XQuartz is required.

FlashMagic Screenshot

and the result:

Blinking LPC812