]> begriffs open source - meson-cross/blob - README.md
Scripts for choice of debuggers
[meson-cross] / README.md
1 ### Meson cross-compilation config
2
3 Contains build settings for STM32 chips. Architectures to be added
4 as needed.
5
6 Requires:
7 * arm-none-eabi-gcc
8 * arm-none-eabi-gdb
9 * picolibc
10 * openocd
11 * ddd
12
13 #### Usage
14
15 Set up a new build directory:
16
17 ```sh
18 git submodule add \
19     https://dev.begriffs.com/git/meson-cross cross
20
21 meson setup \
22     --cross-file cross/armv7m/cortex-m4/st/nucleo-f411re/cross.ini \
23     --cross-file cross/armv7m/gcc.ini \
24     build
25 ```
26
27 The architecture also provides two helper commands, `flash_cmd` and
28 `debug_cmd` so that your main meson.build file can be shorter:
29
30 ```meson
31 subdir('cross/armv7m')
32
33 run_target('flash', command: [flash_cmd, /* image */])
34 run_target('debug', command: [debug_cmd, /* image */])
35 ```