Updating ChibiOS 3.x build system support
This commit is contained in:
parent
2fc483e152
commit
4eb0dbb1e3
@ -8,7 +8,7 @@
|
|||||||
# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
|
# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
|
||||||
OPT_OS = chibios
|
OPT_OS = chibios
|
||||||
OPT_THUMB = yes
|
OPT_THUMB = yes
|
||||||
OPT_LINK_OPTIMIZE = yes
|
OPT_LINK_OPTIMIZE = no
|
||||||
OPT_CPU = stm32m4
|
OPT_CPU = stm32m4
|
||||||
|
|
||||||
# uGFX settings
|
# uGFX settings
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
|
# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
|
||||||
OPT_OS = chibios
|
OPT_OS = chibios
|
||||||
OPT_THUMB = yes
|
OPT_THUMB = yes
|
||||||
OPT_LINK_OPTIMIZE = yes
|
OPT_LINK_OPTIMIZE = no
|
||||||
OPT_CPU = stm32m4
|
OPT_CPU = stm32m4
|
||||||
|
|
||||||
# uGFX settings
|
# uGFX settings
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
|
# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
|
||||||
OPT_OS = chibios
|
OPT_OS = chibios
|
||||||
OPT_THUMB = yes
|
OPT_THUMB = yes
|
||||||
OPT_LINK_OPTIMIZE = yes
|
OPT_LINK_OPTIMIZE = no
|
||||||
OPT_CPU = stm32m4
|
OPT_CPU = stm32m4
|
||||||
|
|
||||||
# uGFX settings
|
# uGFX settings
|
||||||
|
@ -8,19 +8,19 @@
|
|||||||
# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
|
# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
|
||||||
OPT_OS = chibios
|
OPT_OS = chibios
|
||||||
OPT_THUMB = yes
|
OPT_THUMB = yes
|
||||||
OPT_LINK_OPTIMIZE = yes
|
OPT_LINK_OPTIMIZE = no
|
||||||
OPT_CPU = stm32m4
|
OPT_CPU = stm32m4
|
||||||
|
|
||||||
# uGFX settings
|
# uGFX settings
|
||||||
# See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
|
# See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
|
||||||
GFXLIB = ../../resources/ugfx
|
GFXLIB = ../path/to/ugfx
|
||||||
GFXBOARD = STM32F429i-Discovery
|
GFXBOARD = STM32F429i-Discovery
|
||||||
GFXDEMO = modules/gdisp/basics
|
GFXDEMO = modules/gdisp/basics
|
||||||
|
|
||||||
# ChibiOS settings
|
# ChibiOS settings
|
||||||
ifeq ($(OPT_OS),chibios)
|
ifeq ($(OPT_OS),chibios)
|
||||||
# See $(GFXLIB)/tools/gmake_scripts/os_chibios_x.mk for the list of variables
|
# 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_VERSION = 3
|
||||||
CHIBIOS_BOARD = ST_STM32F429I_DISCOVERY
|
CHIBIOS_BOARD = ST_STM32F429I_DISCOVERY
|
||||||
CHIBIOS_CPUCLASS = ARMCMx
|
CHIBIOS_CPUCLASS = ARMCMx
|
||||||
|
@ -132,7 +132,7 @@
|
|||||||
* @brief Enables the SERIAL subsystem.
|
* @brief Enables the SERIAL subsystem.
|
||||||
*/
|
*/
|
||||||
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||||
#define HAL_USE_SERIAL TRUE
|
#define HAL_USE_SERIAL FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -146,7 +146,7 @@
|
|||||||
* @brief Enables the SPI subsystem.
|
* @brief Enables the SPI subsystem.
|
||||||
*/
|
*/
|
||||||
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||||
#define HAL_USE_SPI FALSE
|
#define HAL_USE_SPI TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -160,7 +160,7 @@
|
|||||||
* @brief Enables the USB subsystem.
|
* @brief Enables the USB subsystem.
|
||||||
*/
|
*/
|
||||||
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||||
#define HAL_USE_USB TRUE
|
#define HAL_USE_USB FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -233,7 +233,7 @@
|
|||||||
* SERIAL driver system settings.
|
* SERIAL driver system settings.
|
||||||
*/
|
*/
|
||||||
#define STM32_SERIAL_USE_USART1 FALSE
|
#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_USART3 FALSE
|
||||||
#define STM32_SERIAL_USE_UART4 FALSE
|
#define STM32_SERIAL_USE_UART4 FALSE
|
||||||
#define STM32_SERIAL_USE_UART5 FALSE
|
#define STM32_SERIAL_USE_UART5 FALSE
|
||||||
@ -251,18 +251,33 @@
|
|||||||
#define STM32_SPI_USE_SPI1 FALSE
|
#define STM32_SPI_USE_SPI1 FALSE
|
||||||
#define STM32_SPI_USE_SPI2 FALSE
|
#define STM32_SPI_USE_SPI2 FALSE
|
||||||
#define STM32_SPI_USE_SPI3 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_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_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_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_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_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_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_SPI1_DMA_PRIORITY 1
|
||||||
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||||
#define STM32_SPI_SPI3_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_SPI1_IRQ_PRIORITY 10
|
||||||
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
|
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
|
||||||
#define STM32_SPI_SPI3_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")
|
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -309,8 +324,8 @@
|
|||||||
/*
|
/*
|
||||||
* USB driver system settings.
|
* USB driver system settings.
|
||||||
*/
|
*/
|
||||||
#define STM32_USB_USE_OTG1 TRUE
|
#define STM32_USB_USE_OTG1 FALSE
|
||||||
#define STM32_USB_USE_OTG2 FALSE
|
#define STM32_USB_USE_OTG2 TRUE
|
||||||
#define STM32_USB_OTG1_IRQ_PRIORITY 14
|
#define STM32_USB_OTG1_IRQ_PRIORITY 14
|
||||||
#define STM32_USB_OTG2_IRQ_PRIORITY 14
|
#define STM32_USB_OTG2_IRQ_PRIORITY 14
|
||||||
#define STM32_USB_OTG1_RX_FIFO_SIZE 512
|
#define STM32_USB_OTG1_RX_FIFO_SIZE 512
|
||||||
|
@ -60,13 +60,21 @@ ifeq ($(CHIBIOS_STM32LIB),yes)
|
|||||||
INCPATH += $(STM32INC)
|
INCPATH += $(STM32INC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
INCPATH += $(PORTINC) $(KERNINC) $(OSALINC) \
|
# Add include files
|
||||||
$(HALINC) $(PLATFORMINC) $(BOARDINC)
|
INCPATH += $(PORTINC) \
|
||||||
|
$(KERNINC) \
|
||||||
|
$(OSALINC) \
|
||||||
|
$(HALINC) \
|
||||||
|
$(PLATFORMINC) \
|
||||||
|
$(BOARDINC)
|
||||||
|
|
||||||
SRC += $(PORTSRC) \
|
# Add C files
|
||||||
|
SRC += $(PORTSRC) \
|
||||||
$(KERNSRC) \
|
$(KERNSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
$(OSALSRC) \
|
$(OSALSRC)
|
||||||
$(PORTASM)
|
|
||||||
|
# Add ASM files
|
||||||
|
SRC += $(PORTASM)
|
||||||
|
Loading…
Reference in New Issue
Block a user