Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Generating the initial project

  • STM32CubeMX
    • Makefile project
    • Use HAL libraries

Building with the Makefile

  • GCC/G++ version 6.3.1
    • Relies on newlib
  • Line added to linker option
    • "-specs=nosys.specs"
      • Adds function definitions for missing libc syscalls
      • These functions can be retargeted
        • "_write" is retargeted in Core/Src/write.c
        • printf uses this version of _write
  • Makefile also modified to use g++ and build C++ sources
  • run "make" to build
    • make all → builds all code
    • make flash → flashes latest built binary using st-link (requires st-link debugger)
    • make erase → erases flash on chip
    • make program → build all code and then flash it
    • make -B → forces a new build regardless of updates

Using the serial monitor

  • Run "cu -l /dev/ttyACM0 -s 115200" or "screen /dev/ttyACM0 115200"
    • Note: this is for Linux
  • Any serial monitor will work
  • No labels