Bambino-210 Manual/Offline Toolchains
From Manuals
Contents |
Offline Toolchains
The online compiler covered in the previous chapter is the fastest way to start programming mbed applications. There is no software to install and the toolchain is actively managed for you. Yet some projects require full debugging capabilities, custom library builds, group source code control and other options not currently available on the online compiler. This chapter covers how to use offline toolchains to build both your application as well as the mbed library.
The Micromint Bambino implements the mbed HDK on-board using an additional microcontroller (NXP LPC11U35) with the mbed CMSIS-DAP firmware. Offline compilers can use the mbed HDK for debugging by configuring their toolchain debug options to CMSIS-DAP. To use external JTAG probes an alternate firmware is required as described in Appendix B.
Keil MDK
GCC-ARM
Rebuilding mbed Libraries
The source code for the mbed library is open source and can be downloaded from the mbed mainline repository or the Micromint repository. To recompile it please follow these steps:
1. Install a compatible ARM toolchain. The mbed port for LPC4330 targets currently supports the Keil MDK, GCC ARM and GCC LPCXpresso toolchains. Firmware at Micromint is mostly developed using Keil MDK 4.73.
2. Install Python 2.7. The mbed build scripts are written in Python.
3. Install the mbed Library Sources. This includes full source code for all supported multiple microcontrollers and boards.
4. Edit workspace_tools/private_settings.py to reflect your toolchain directories.
from os.path import join armcc = "keil" ARM_PATH = "C:/Keil/ARM" ARM_BIN = join(ARM_PATH, "ARMCC", "bin") ARM_INC = join(ARM_PATH, "INC") ARM_LIB = join(ARM_PATH, "RV31", "LIB") GCC_ARM_PATH = "C:/Program Files (x86)/GNU Tools ARM Embedded/4.8 2014q2/bin" GCC_CR_PATH = "C:/nxp/LPCXpresso_7.5.0_254/lpcxpresso/tools/bin" IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 6.5/arm"
5. Compile the base mbed libraries. These are typical commands to change to the source directory, setup compiler environment and build the bootloader. Note that the Python directory in the PATH may be different in your development system.
cd mbed-master SET PATH=C:\Windows\system32;C:\Windows;C:\Python27 python workspace_tools/build.py -v -r -m LPC4330_M4 -t ARM > build.log python workspace_tools/build.py -v -r -m LPC4330_M4 -t GCC_ARM >> build.log
If your build is successful, the mbed libraries and headers for the LPC4330 will be available in the ..\build directory. If not, check the build.log file. For more documentation on these procedures please visit the mbed tools site.
