From d7285a20d9bfd1335b72bfcfd09b9a723415f0da Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sun, 21 Mar 2021 16:42:06 -0400 Subject: [PATCH] move firmware source into source folder --- .gitignore | 5 +++-- Makefile | 13 ++++++++----- {board => source/board}/board.mk | 8 ++++---- {board => source/board}/board_h7.c | 0 {board => source/board}/board_l4.c | 0 {board => source/board}/h7/board.h | 0 {board => source/board}/l4/board.h | 0 {cfg => source/cfg}/chconf.h | 0 {cfg => source/cfg}/halconf.h | 0 {cfg => source/cfg}/mcuconf.h | 0 {cfg => source/cfg}/mcuconf_h7.h | 0 {cfg => source/cfg}/mcuconf_l4.h | 0 STM32H723xG.ld => source/ld/STM32H723xG.ld | 0 STM32L476xG.ld => source/ld/STM32L476xG.ld | 0 14 files changed, 15 insertions(+), 11 deletions(-) rename {board => source/board}/board.mk (58%) rename {board => source/board}/board_h7.c (100%) rename {board => source/board}/board_l4.c (100%) rename {board => source/board}/h7/board.h (100%) rename {board => source/board}/l4/board.h (100%) rename {cfg => source/cfg}/chconf.h (100%) rename {cfg => source/cfg}/halconf.h (100%) rename {cfg => source/cfg}/mcuconf.h (100%) rename {cfg => source/cfg}/mcuconf_h7.h (100%) rename {cfg => source/cfg}/mcuconf_l4.h (100%) rename STM32H723xG.ld => source/ld/STM32H723xG.ld (100%) rename STM32L476xG.ld => source/ld/STM32L476xG.ld (100%) diff --git a/.gitignore b/.gitignore index 36cb465..808c653 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -build **/.* -gui/stmdspgui **/*.o **/*.so perf* +build +eagle/*#* +gui/stmdspgui diff --git a/Makefile b/Makefile index 360811d..bec5309 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ endif # Imported source files and paths. CHIBIOS := ./ChibiOS_20.3.2 -CONFDIR := ./cfg +CONFDIR := ./source/cfg BUILDDIR := ./build DEPDIR := ./.dep @@ -121,13 +121,16 @@ ifeq ($(TARGET_PLATFORM),H7) else include $(CHIBIOS)/os/hal/ports/STM32/STM32L4xx/platform.mk endif -include ./board/board.mk +include ./source/board/board.mk include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Auto-build files in ./source recursively. -include $(CHIBIOS)/tools/mk/autobuild.mk +#include $(CHIBIOS)/tools/mk/autobuild.mk +ALLCSRC += $(wildcard source/*.c) +ALLCPPSRC += $(wildcard source/*.cpp) +ALLASMSRC += $(wildcard source/*.s) # Other files (optional). #include $(CHIBIOS)/test/lib/test.mk #include $(CHIBIOS)/test/rt/rt_test.mk @@ -135,9 +138,9 @@ include $(CHIBIOS)/tools/mk/autobuild.mk # Define linker script file here ifeq ($(TARGET_PLATFORM),H7) - LDSCRIPT = STM32H723xG.ld + LDSCRIPT = source/ld/STM32H723xG.ld else - LDSCRIPT = STM32L476xG.ld + LDSCRIPT = source/ld/STM32L476xG.ld endif # C sources that can be compiled in ARM or THUMB mode depending on the global diff --git a/board/board.mk b/source/board/board.mk similarity index 58% rename from board/board.mk rename to source/board/board.mk index f6df51a..155285a 100644 --- a/board/board.mk +++ b/source/board/board.mk @@ -1,15 +1,15 @@ # List of all the board related files. ifeq ($(TARGET_PLATFORM),H7) - BOARDSRC = ./board/board_h7.c + BOARDSRC = ./source/board/board_h7.c else - BOARDSRC = ./board/board_l4.c + BOARDSRC = ./source/board/board_l4.c endif # Required include directories ifeq ($(TARGET_PLATFORM),H7) - BOARDINC = ./board/h7 + BOARDINC = ./source/board/h7 else - BOARDINC = ./board/l4 + BOARDINC = ./source/board/l4 endif # Shared variables diff --git a/board/board_h7.c b/source/board/board_h7.c similarity index 100% rename from board/board_h7.c rename to source/board/board_h7.c diff --git a/board/board_l4.c b/source/board/board_l4.c similarity index 100% rename from board/board_l4.c rename to source/board/board_l4.c diff --git a/board/h7/board.h b/source/board/h7/board.h similarity index 100% rename from board/h7/board.h rename to source/board/h7/board.h diff --git a/board/l4/board.h b/source/board/l4/board.h similarity index 100% rename from board/l4/board.h rename to source/board/l4/board.h diff --git a/cfg/chconf.h b/source/cfg/chconf.h similarity index 100% rename from cfg/chconf.h rename to source/cfg/chconf.h diff --git a/cfg/halconf.h b/source/cfg/halconf.h similarity index 100% rename from cfg/halconf.h rename to source/cfg/halconf.h diff --git a/cfg/mcuconf.h b/source/cfg/mcuconf.h similarity index 100% rename from cfg/mcuconf.h rename to source/cfg/mcuconf.h diff --git a/cfg/mcuconf_h7.h b/source/cfg/mcuconf_h7.h similarity index 100% rename from cfg/mcuconf_h7.h rename to source/cfg/mcuconf_h7.h diff --git a/cfg/mcuconf_l4.h b/source/cfg/mcuconf_l4.h similarity index 100% rename from cfg/mcuconf_l4.h rename to source/cfg/mcuconf_l4.h diff --git a/STM32H723xG.ld b/source/ld/STM32H723xG.ld similarity index 100% rename from STM32H723xG.ld rename to source/ld/STM32H723xG.ld diff --git a/STM32L476xG.ld b/source/ld/STM32L476xG.ld similarity index 100% rename from STM32L476xG.ld rename to source/ld/STM32L476xG.ld