SEARCH
TOOLBOX
LANGUAGES
modified on 11 February 2015 at 20:12 ••• 47,508 views

Bambino-200 Manual/Rebuild mbed Firmware

From Manuals

(Difference between revisions)
Jump to: navigation, search
 
(5 intermediate revisions not shown)
Line 1: Line 1:
[[Category: Bambino-200_Manual|06]]
[[Category: Bambino-200_Manual|06]]
==Command Line Build==
==Command Line Build==
-
All mbed firmware used in the Bambino 200 is open source and can be downloaded from the [http://github.com/micromint Micromint repository]. To recompile it please follow these steps:
+
The source code for the mbed library is open source and can be downloaded from the [http://github.com/mbedmicro/mbed mbed mainline repository] or the [http://github.com/micromint Micromint repository]. To recompile it please follow these steps:
-
1. Install a compatible ARM toolchain. Currently the [http://www.keil.com/arm/selector.asp Keil MDK] and [http://www.iar.com/en/Products/IAR-Embedded-Workbench/ IAR EWARM] are supported. Firmware at Micromint is mostly developed using Keil MDK 4.73. Releases are also tested with [http://launchpad.net/gcc-arm-embedded GCC ARM] and [http://code-red-tech.com/products.php GCC Code Red toolchain].
+
1. Install a compatible ARM toolchain. The mbed port for LPC4330 targets currently supports the [http://www.keil.com/arm/mdk.asp Keil MDK], [http://launchpad.net/gcc-arm-embedded GCC ARM] and [http://www.lpcware.com/lpcxpresso/download GCC LPCXpresso] toolchains. The Keil MDK is the main ARM toolchain at Micromint.
2. Install [http://www.python.org/getit/ Python 2.7]. The mbed build scripts are written in Python.
2. Install [http://www.python.org/getit/ Python 2.7]. The mbed build scripts are written in Python.
-
3. Install the [https://github.com/mbedmicro/mbed/archive/master.zip mbed Library Sources]. This includes full source code for multiple mbed libraries. The Micromint port of mbed to the LPC43XX is included in the master distribution.
+
3. Install the [https://github.com/mbedmicro/mbed/archive/master.zip mbed Library Sources]. This includes full source code for all supported multiple microcontrollers and boards.
-
4. 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.
+
4. Edit workspace_tools/private_settings.py to reflect your toolchain directories.
-
  cd \mbed-master
+
from os.path import join
 +
 +
# ARM
 +
armcc = "keil"
 +
ARM_PATH = "C:/Keil/ARM"
 +
ARM_BIN = join(ARM_PATH, "ARMCC", "bin")
 +
ARM_INC = join(ARM_PATH, "ARMCC", "include")
 +
ARM_LIB = join(ARM_PATH, "ARMCC", "lib")
 +
 +
# GCC ARM
 +
GCC_ARM_PATH = "C:/Program Files (x86)/GNU Tools ARM Embedded/4.8 2014q2/bin"
 +
 +
# GCC CodeRed
 +
GCC_CR_PATH = "C:/nxp/LPCXpresso_7.5.0_254/lpcxpresso/tools/bin"
 +
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
  SET PATH=C:\Windows\system32;C:\Windows;C:\Python27
-
  python workspace_tools/build.py -v -m LPC4330_M4 -t ARM >build.log
+
  python workspace_tools/build.py -v -r -m LPC4330_M4 -t ARM > build.log
-
  python workspace_tools/build.py -v -m LPC4330_M0 -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 M4 and M0 cores will be available in the ..\build directory. If not, check the build.log file.
+
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 [https://developer.mbed.org/handbook/mbed-tools mbed tools] site.
==IDE Build==
==IDE Build==

Current revision as of 20:12, 11 February 2015

Command Line Build

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. The Keil MDK is the main ARM toolchain at Micromint.

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

# ARM
armcc = "keil"
ARM_PATH = "C:/Keil/ARM"
ARM_BIN = join(ARM_PATH, "ARMCC", "bin")
ARM_INC = join(ARM_PATH, "ARMCC", "include")
ARM_LIB = join(ARM_PATH, "ARMCC", "lib")

# GCC ARM
GCC_ARM_PATH = "C:/Program Files (x86)/GNU Tools ARM Embedded/4.8 2014q2/bin"

# GCC CodeRed
GCC_CR_PATH = "C:/nxp/LPCXpresso_7.5.0_254/lpcxpresso/tools/bin"

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.

IDE Build

When implementing new or modified mbed functionality, a large percentage of the development time is spent debugging and troubleshooting code changes. To improve prodctivity, our implementation includes project files to build and debug the mbed library with the Keil MDK. These allow you to access a full featured ARM development environment and debugger. A JTAG is required for debugging.

mbed project for Keil MDK
mbed project for Keil MDK

For production builds, the mbed build system should be used.


NEXT: Hardware

PREVIOUS: Rebuild NetMF Firmware