Getting Started
This guide covers building, flashing, and basic operation of the AddVantage PPG firmware.
Prerequisites
Toolchain
Install the ARM GCC toolchain:
macOS:
brew install arm-none-eabi-gcc
Linux:
apt install gcc-arm-none-eabi
Windows: Download from Arm Developer
Build Tools
CMake 3.20+
Ninja (recommended) or Make
# macOS
brew install cmake ninja
# Linux
apt install cmake ninja-build
Hardware
SEGGER J-Link debugger (J-Link EDU or commercial)
USB-serial adapter for UART (57600 baud)
PCAN-USB adapter for CAN validation (optional)
Building the Firmware
Quick Build
mkdir build && cd build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=../arm-gcc-toolchain.cmake ..
ninja
This produces:
build/addvantage3.elf- Debug symbols for debuggingbuild/addvantage3.hex- Flash image
Build Options
Option |
Description |
|---|---|
|
Optimized build |
|
Debug symbols, no optimization |
Flashing
Using the Flash Script
python tools/flash.py build/addvantage3.hex
The script uses J-Link serial 50114603 to avoid the GUI picker dialog.
Manual J-Link Commands
JLinkExe -device MKE06Z128xxx4 -if SWD -speed 4000 -autoconnect 1
# In J-Link commander:
loadfile build/addvantage3.hex
r # reset
g # go
Serial Console
Connect to the UART at 57600 baud:
# macOS
screen /dev/cu.usbmodem* 57600
# Linux
screen /dev/ttyUSB0 57600
# Windows
putty -serial COM3 -sercfg 57600,8,n,1
Boot Output
After reset, you’ll see:
addvantage PPG V3.2.7 250kbit
d0g0e99p0r0t0c0v0k0b250f327w1x0y100z0V3.2.7
Password required:
Password
Default password: tribune
After authentication, commands are available:
f- Factory reset + engine profile selectiong- Toggle gas flow enablem- Memory dumpv- Toggle VT100 displayo- Output configuration
First Run Checklist
Flash firmware
Connect serial console
Verify boot message shows correct version
Enter password
Press
ffor factory resetSelect engine profile (1-18)
Verify telemetry output shows sensor readings
Troubleshooting
No Serial Output
Check baud rate (57600)
Verify TX/RX connections (TX from MCU → RX on adapter)
Try different USB-serial adapter
Boot Loops
If the device continuously resets (multiple version strings in output):
Watchdog may not be disabled properly
Check
startup_wdog.Sis correctly included in build
J-Link Connection Failed
Verify SWD connections (SWDIO, SWCLK, GND, VTref)
Try lower speed:
-speed 1000Check target voltage (3.3V)
Next Steps
Read the CAN Protocol guide for J1939 integration
See Telemetry Format for data interpretation
Use the Test Harness for automated validation