Pin Loon's Wiki
  • Welcome to my technical notes
  • About Me
  • Linux
    • Basic commands
    • Controller Area Network (CAN)
    • Disk
    • Ethernet
    • Systemd Service
    • SSH
  • Microcontroller / Single Board Computer
    • Debugger / Compiler
    • Raspberry Pi 4
  • Application Platform
    • Docker
    • Docker Compose
  • Application Notes
    • Dataype Overflow
    • Macros
    • Wrong Casting
    • Variadic Function
  • Git
    • Create SSH Keys
    • Git submodule
  • VPN
    • Wireguard Setup on Azure
Powered by GitBook
On this page
  • OpenOCD
  • Compiler's option
  • References
  1. Microcontroller / Single Board Computer

Debugger / Compiler

OpenOCD

  • Installation

$ sudo apt update
$ sudo apt install openocd
  • You can refer to directory to get some configuration file for debugger

    $ cd /usr/local/share/openocd/scripts/board
    $ cat stm32h7x3i_eval.cfg
  • You should see something like this:

source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32h7x_dual_bank.cfg]

reset_config srst_only

Compiler's option

  • When we are linking libary for stm32 target, we may need to set the flag by ourselves, we can refer Makefile generated by CubeMX

  • For example

-mthumb -mabi=aapcs
## For cortex M4
-mcpu=cortex-m4
-mfpu=fpv4-sp-d16
-mfloat-abi=hard

## For cortex M7
-mcpu=cortex-m7
-mfpu=fpv5-sp-d16
-mfloat-abi=hard

References

PreviousSSHNextRaspberry Pi 4

Last updated 3 years ago

https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html