Dual core blinky program for the LPC4337 using CPM chip libraries. A program running on the cortex-M4 core blinks one LED, while the cortex-M0 independently blinks another LED.
This projects assumes a lpc4337-based lpc4330-xplorer board, however it is easily adapted to different board configurations.
NOTE: this project assumes a flash-based lpc43xx microcontroller, such as the lpc4337. (there are also flashless lpc43xx microcontrollers that don't have internal flash memory).
- Arm Embedded Toolchain
- A Black Magic Probe or OpenOCD in combination with a JTAG LockPick tiny 2
- CMake
These need to be installed and available in your PATH.
Clone the project, and inside the project folder do:
cp config.cmake.example config.cmake
# review the settings in config.cmake
mkdir build
cd build
cmake ..
make
This assumes you have a Black Magic Probe connected, or OpenOCD installed and the LockPick tiny 2 connected.
run this from the build dir, see build step
make flash
If everything went right, the firmware should be running and blinking some LEDS.
This project uses the CPM package manager, which is basically a few lines of CMake logic. The CMakeLists.txt contains a list of dependencies, which are automatically checked out. After building the firmware, all dependencies are found in build/cpm_packages/modules/
The script automatically tries to connect to the Black Magic Probe. If it cannot be found, it falls back to OpenOCD. If the firmware tries to flash via OpenOCD, it means that your probe is not detected properly. You can specify the Black Magic Probe in config.cmake:
cp config.cmake.example config.cmake
# edit this line to match your Black Magic Device
set(BLACKMAGIC_DEV /dev/ttyBmpGdb)