Before proceeding with the commands, ensure you have the following installed:
make
gcc-arm-none-eabi
ordocker
Python 3.7+
andpip
(for flashing and debugging)
The following quick commands are available for convenience:
make upgrade
: Executesmake clean
,make
, andmake flash
sequentially.
To build the firmware using Makefile, run:
make clean && make
We use pyOCD for cross-platform compatibility and to support the latest versions. OpenOCD is not used in this process.
First, install pyOCD
using pip
:
python -m pip install -U pyocd
Next, install the pack for the target MCU:
pyocd pack install M032BTAIAAN
Finally, flash the MCU with the following command:
make flash
To debug the firmware manually, use the following commands:
Start the GDB server with pyOCD
:
pyocd gdbserver -t M032BTAIAAN --elf Source\build\TRSP_UART_Central.elf
In the GDB command line, connect to the target and load the firmware:
(gdb) target remote localhost:3333
(gdb) monitor reset halt
(gdb) load
To build the documentation, run:
make docs
- On Windows:
choco install -y pandoc miktex
- On macOS:
brew install pandoc
brew install --cask mactex-no-gui
- On Linux:
sudo apt-get update && sudo apt-get install -y pandoc texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- Then, install the required extensions:
make docs-install