nuttx/boards/arm/stm32
chao an 6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
..
axoloti build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
b-g431b-esc1 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
b-g474e-dpow1 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
clicker2-stm32 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
cloudctrl build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
common build: add initial cmake build system 2023-07-08 13:50:48 +08:00
emw3162 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
et-stm32-stamp build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
fire-stm32v2 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
hymini-stm32v build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
maple build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
mikroe-stm32f4 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f4x1re build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f103rb build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f207zg build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f302r8 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f303re build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f303ze build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f334r8 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f410rb build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f412zg build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f429zi build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-f446re build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-g431kb build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-g431rb build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-g474re build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
nucleo-l152re build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
olimex-stm32-e407 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
olimex-stm32-h405 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
olimex-stm32-h407 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
olimex-stm32-p107 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
olimex-stm32-p207 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
olimex-stm32-p407 symtab: Remove the unnessary inclusion of nuttx/symtab.h 2023-07-06 09:24:02 -03:00
olimexino-stm32 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
omnibusf4 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
photon build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
shenzhou build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm32_tiny build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm32butterfly2 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm32f3discovery build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm32f4discovery build: add initial cmake build system 2023-07-08 13:50:48 +08:00
stm32f103-minimum build: add initial cmake build system 2023-07-08 13:50:48 +08:00
stm32f334-disco build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm32f411-minimum build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm32f411e-disco build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm32f429i-disco build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm32ldiscovery build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm32vldiscovery build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm3210e-eval build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm3220g-eval build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
stm3240g-eval build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00
viewtool-stm32f107 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX) 2023-06-23 00:11:25 +03:00