We've been trying to test out the new LPCXpresso IDE (essentially a free, 128KB-limited version of Code Red's Red Suite) and our own LPC1114 Reference Design, but since we haven't yet set up a 32-bit development environment to be able to make use of the LPC-Link built into the LPCXpresso boards (there are no 64-bit drivers available yet) we were just going to fallback to good old-fashion FlashMagic, and upload the compiled hex files via ISP. Unfortunately, that meant that we needed a good old-fashion Intel hex file as well!
While LPCXpresso can generate Intel hex files, you need to make a small adjustment to the project settings to do so:
- Right-click on your project in the Project Explorer window, and select Properties from the pop-up menu.
- Expand C/C++ Build on the left-hand side of the Properties dialogue, and select Settings.
- In Settings, switch to the Build Steps tab, and you should see a screen similar to the this:
- The post-build command to generate an Intel hex file is already present (at least in v3.1 of LPCXpresso), but it is commented out. You need to replace the text in Post-build steps / Command as follows:
Original Text
arm-none-eabi-size ${BuildArtifactFileName}; # arm-none-eabi-objcopy -O ihex ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.hex ;
Replacement Text
arm-none-eabi-size ${BuildArtifactFileName}; arm-none-eabi-objcopy -O ihex ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.hex ;
After that, build your project as normal and a .hex file should also be generated in the build folder (for example, /Debug). Please note that you will need to make the same change to both the Debug and Release configurations if you wish to generate Intel hex files for both build types.
For more information on configuring the build output for Code Red, you might want to have a look at Generating srec (Motorola S format), binary, ihex (Intel Hex) files on the Code Red wiki.