# Olimex LPC-MT-2138 Sample Code

**URL:** <https://community.sparkfun.com/t/olimex-lpc-mt-2138-sample-code/13877>\
**Category:** MicroMod\
**Tags:** arm-lpc\
**Created:** [January 5, 2010, 2:37am UTC](https://community.sparkfun.com/t/olimex-lpc-mt-2138-sample-code/13877 "2010-01-05T02:37:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmeklenburg](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@jmeklenburg](https://community.sparkfun.com/u/jmeklenburg)\
**Post date:** [January 5, 2010, 2:37am UTC](https://community.sparkfun.com/t/olimex-lpc-mt-2138-sample-code/13877/1 "2010-01-05T02:37:21Z")

</div>

I’m an Electrical & Computer Engineering student working on a project for school. We’ve decided to use the Olimex LPC-MT-2138 to implement our design, but and I’m trying to get our board up and running.

I’m using the ARM-JTAG dongle from Olimex to connect the board to my computer. I’m using IAR Kickstart for ARM as the IDE and H-JTAG to download and debug. I’ve also successfully downloaded a precompiled working .hex file through the RS232 port on the board using the Philips Flash Utility. I got the precompiled code from here: [http://soft.mado.at/lpc2138.htm](http://soft.mado.at/lpc2138.htm). When I compile the code myself in IAR, not only is the .hex file much smaller (~5K vs. 15K), but it does not work.

I would love to be able to get my compiler working so I can run that code, and also this code, from the Olimex site: [http://www.olimex.com/dev/soft/arm/LPC/ … \_relay.zip](http://www.olimex.com/dev/soft/arm/LPC/LPC-MT2138-butt_led_buzz_relay.zip). It is a very simple program that will be great in helping me get started (once I can get it to compile and run!).

I’m having IAR generate the hex files by enabling the additional output (intel extended) in the project options. What am I doing wrong in IAR that is preventing my .hex files from working?

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![stevech](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@stevech](https://community.sparkfun.com/u/stevech)\
**Post date:** [January 5, 2010, 3:03am UTC](https://community.sparkfun.com/t/olimex-lpc-mt-2138-sample-code/13877/2 "2010-01-05T03:03:13Z")

</div>

Glad to help - I use the Olimex 2106 and 2129 boards, IAR compiler (licensed) and a J-Link JTAG.

With this, I install the J-Link and config the project to use it. Then all I do is click compile & download (via JTAG). And use hardware/firemware breakpoints.

You can of course download via the serial port if you disable JTAG.
