diff --git a/boards/base/Embest-STM32-DMSTF4BB/example_chibios_2.x/Makefile b/boards/base/Embest-STM32-DMSTF4BB/example_chibios_2.x/Makefile index 4fcda523..a9ba950b 100644 --- a/boards/base/Embest-STM32-DMSTF4BB/example_chibios_2.x/Makefile +++ b/boards/base/Embest-STM32-DMSTF4BB/example_chibios_2.x/Makefile @@ -8,7 +8,7 @@ # See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables OPT_OS = chibios OPT_THUMB = yes - OPT_LINK_OPTIMIZE = yes + OPT_LINK_OPTIMIZE = no OPT_CPU = stm32m4 # uGFX settings diff --git a/boards/base/Embest-STM32-DMSTF4BB/example_chibios_3.x/Makefile b/boards/base/Embest-STM32-DMSTF4BB/example_chibios_3.x/Makefile index d4cc3001..31ce961c 100644 --- a/boards/base/Embest-STM32-DMSTF4BB/example_chibios_3.x/Makefile +++ b/boards/base/Embest-STM32-DMSTF4BB/example_chibios_3.x/Makefile @@ -8,7 +8,7 @@ # See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables OPT_OS = chibios OPT_THUMB = yes - OPT_LINK_OPTIMIZE = yes + OPT_LINK_OPTIMIZE = no OPT_CPU = stm32m4 # uGFX settings diff --git a/boards/base/STM32F429i-Discovery/example_chibios_2.x/Makefile b/boards/base/STM32F429i-Discovery/example_chibios_2.x/Makefile index 755b8cf9..6c1bb94c 100644 --- a/boards/base/STM32F429i-Discovery/example_chibios_2.x/Makefile +++ b/boards/base/STM32F429i-Discovery/example_chibios_2.x/Makefile @@ -8,7 +8,7 @@ # See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables OPT_OS = chibios OPT_THUMB = yes - OPT_LINK_OPTIMIZE = yes + OPT_LINK_OPTIMIZE = no OPT_CPU = stm32m4 # uGFX settings diff --git a/boards/base/STM32F429i-Discovery/example_chibios_3.x/Makefile b/boards/base/STM32F429i-Discovery/example_chibios_3.x/Makefile index 16611673..d7ee1d20 100644 --- a/boards/base/STM32F429i-Discovery/example_chibios_3.x/Makefile +++ b/boards/base/STM32F429i-Discovery/example_chibios_3.x/Makefile @@ -8,19 +8,19 @@ # See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables OPT_OS = chibios OPT_THUMB = yes - OPT_LINK_OPTIMIZE = yes + OPT_LINK_OPTIMIZE = no OPT_CPU = stm32m4 # uGFX settings # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables - GFXLIB = ../../resources/ugfx + GFXLIB = ../path/to/ugfx GFXBOARD = STM32F429i-Discovery GFXDEMO = modules/gdisp/basics # ChibiOS settings ifeq ($(OPT_OS),chibios) # See $(GFXLIB)/tools/gmake_scripts/os_chibios_x.mk for the list of variables - CHIBIOS = ../../resources/chibios_3.0.1 + CHIBIOS = ../path/to/chibios_3 CHIBIOS_VERSION = 3 CHIBIOS_BOARD = ST_STM32F429I_DISCOVERY CHIBIOS_CPUCLASS = ARMCMx diff --git a/boards/base/STM32F429i-Discovery/example_chibios_3.x/halconf.h b/boards/base/STM32F429i-Discovery/example_chibios_3.x/halconf.h index 6f80a255..4457240f 100644 --- a/boards/base/STM32F429i-Discovery/example_chibios_3.x/halconf.h +++ b/boards/base/STM32F429i-Discovery/example_chibios_3.x/halconf.h @@ -132,7 +132,7 @@ * @brief Enables the SERIAL subsystem. */ #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL TRUE +#define HAL_USE_SERIAL FALSE #endif /** @@ -146,7 +146,7 @@ * @brief Enables the SPI subsystem. */ #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE +#define HAL_USE_SPI TRUE #endif /** @@ -160,7 +160,7 @@ * @brief Enables the USB subsystem. */ #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE +#define HAL_USE_USB FALSE #endif /*===========================================================================*/ diff --git a/boards/base/STM32F429i-Discovery/example_chibios_3.x/mcuconf.h b/boards/base/STM32F429i-Discovery/example_chibios_3.x/mcuconf.h index 80417b89..6ce56da0 100644 --- a/boards/base/STM32F429i-Discovery/example_chibios_3.x/mcuconf.h +++ b/boards/base/STM32F429i-Discovery/example_chibios_3.x/mcuconf.h @@ -233,7 +233,7 @@ * SERIAL driver system settings. */ #define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 TRUE +#define STM32_SERIAL_USE_USART2 FALSE #define STM32_SERIAL_USE_USART3 FALSE #define STM32_SERIAL_USE_UART4 FALSE #define STM32_SERIAL_USE_UART5 FALSE @@ -251,18 +251,33 @@ #define STM32_SPI_USE_SPI1 FALSE #define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_USE_SPI4 FALSE +#define STM32_SPI_USE_SPI5 TRUE +#define STM32_SPI_USE_SPI6 FALSE #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) #define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) #define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) #define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_SPI_SPI5_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI5_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_SPI_SPI6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6) +#define STM32_SPI_SPI6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) #define STM32_SPI_SPI1_DMA_PRIORITY 1 #define STM32_SPI_SPI2_DMA_PRIORITY 1 #define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI4_DMA_PRIORITY 1 +#define STM32_SPI_SPI5_DMA_PRIORITY 1 +#define STM32_SPI_SPI6_DMA_PRIORITY 1 #define STM32_SPI_SPI1_IRQ_PRIORITY 10 #define STM32_SPI_SPI2_IRQ_PRIORITY 10 #define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_SPI4_IRQ_PRIORITY 10 +#define STM32_SPI_SPI5_IRQ_PRIORITY 10 +#define STM32_SPI_SPI6_IRQ_PRIORITY 10 #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") /* @@ -309,8 +324,8 @@ /* * USB driver system settings. */ -#define STM32_USB_USE_OTG1 TRUE -#define STM32_USB_USE_OTG2 FALSE +#define STM32_USB_USE_OTG1 FALSE +#define STM32_USB_USE_OTG2 TRUE #define STM32_USB_OTG1_IRQ_PRIORITY 14 #define STM32_USB_OTG2_IRQ_PRIORITY 14 #define STM32_USB_OTG1_RX_FIFO_SIZE 512 diff --git a/tools/gmake_scripts/os_chibios_2.mk b/tools/gmake_scripts/os_chibios_2.mk index 299f42ec..ffbbc3f5 100644 --- a/tools/gmake_scripts/os_chibios_2.mk +++ b/tools/gmake_scripts/os_chibios_2.mk @@ -60,13 +60,21 @@ ifeq ($(CHIBIOS_STM32LIB),yes) INCPATH += $(STM32INC) endif -INCPATH += $(PORTINC) $(KERNINC) $(OSALINC) \ - $(HALINC) $(PLATFORMINC) $(BOARDINC) +# Add include files +INCPATH += $(PORTINC) \ + $(KERNINC) \ + $(OSALINC) \ + $(HALINC) \ + $(PLATFORMINC) \ + $(BOARDINC) -SRC += $(PORTSRC) \ +# Add C files +SRC += $(PORTSRC) \ $(KERNSRC) \ $(HALSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ - $(OSALSRC) \ - $(PORTASM) + $(OSALSRC) + +# Add ASM files +SRC += $(PORTASM)