Build system and libraries for ChibiOS-based embedded software.
Basic usage:
- Add this repository as git submodule for your project, e.g.:
git submodule add https://github.com/Zubax/zubax_chibios firmware/zubax_chibios
- Execute
git submodule update --init
from this repository's root - Define the ChibiOS configuration headers:
chconf.h
halconf.h
mcuconf.h
board.h
- Make sure
chconf.h
ends with#include <zubax_chibios/sys/chconf_tail.h>
- Make sure
halconf.h
ends with#include <zubax_chibios/sys/halconf_tail.h>
- Write the makefile:
- List the source files in
CSRC
CPPSRC
- List the include directories in
UINCDIR
- Define
PROJECT
andSERIAL_CLI_PORT_NUMBER
- Include
zubax_chibios/rules_<target-mcu>.mk
, e.g.include zubax_chibios/rules_stm32f105_107.mk
- List the source files in
- Open your Eclipse project
- Go Eclipse → Window → Preferences → Run/Debug → Launching → Default Launchers:
- Select
GDB Hardware Debugging
→[Debug]
, then tick onlyLegacy GDB Hardware Debugging Launcher
, and make sure that the option for GDB (DSF) is disabled.
- Select
- Go Eclipse → Run → Debug Configurations:
- Invoke the context menu for
GDB Hardware Debugging
, select New. - Tab
Debugger
:- Set the field
GDB Command
toarm-none-eabi-gdb
(or other if necessary). - Untick
Use remote target
.
- Set the field
- Tab
Startup
:- If a boot loader is used, make sure that
Image offset
is configured correctly. - Enter the following in the field
Initialization Commands
:
- If a boot loader is used, make sure that
- Invoke the context menu for
target extended <BLACK_MAGIC_SERIAL_PORT>
monitor swdp_scan # Use jtag_scan instead if necessary
attach 1