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