24 lines
1.1 KiB
Markdown
24 lines
1.1 KiB
Markdown
# OriginCar GCC build
|
|
|
|
This keeps the original Keil project intact and adds an ARM GCC build for the
|
|
STM32F407ZG. It reuses the GCC startup file, linker script, SVD and OpenOCD
|
|
tooling from ../../stm32/stm32f407-gcc-framework.
|
|
|
|
## Commands
|
|
|
|
make -j8 # debug ELF/HEX/BIN with -O0 -g3
|
|
make release # size-optimized release build
|
|
make flash # build, program, verify and reset through DAPLink
|
|
make debug-server # OpenOCD on localhost:3333
|
|
make linkscope-info # print the ELF path and observable globals
|
|
|
|
The LinkScope symbol file is build/debug/OriginCar.elf. Start OpenOCD with
|
|
make debug-server, then select external OpenOCD in LinkScope and connect to
|
|
localhost:3333. The OpenOCD target accepts four GDB connections so VS Code
|
|
Cortex-Debug and LinkScope can share it.
|
|
|
|
The Homebrew cross compiler has no newlib, so GCC_COMPAT supplies the small C
|
|
runtime surface used by this legacy project. Its printf supports integer,
|
|
string, character, hexadecimal and pointer formats; floating-point formatting
|
|
is intentionally not included.
|