diff --git a/demos/STM32/NIL-STM32C031C6-NUCLEO64/Makefile b/demos/STM32/NIL-STM32C031C6-NUCLEO64/Makefile index 07af00779..6603cfa20 100644 --- a/demos/STM32/NIL-STM32C031C6-NUCLEO64/Makefile +++ b/demos/STM32/NIL-STM32C031C6-NUCLEO64/Makefile @@ -99,13 +99,13 @@ include $(CHIBIOS)/os/license/license.mk # Startup files. include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32c0xx.mk # HAL-OSAL files (optional). -#include $(CHIBIOS)/os/hal/hal.mk -#include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk -#include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk -#include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk +include $(CHIBIOS)/os/hal/hal.mk +include $(CHIBIOS)/os/hal/ports/STM32/STM32C0xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_C031C6/board.mk +include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # RTOS files (optional). -#include $(CHIBIOS)/os/nil/nil.mk -#include $(CHIBIOS)/os/common/ports/ARMv6-M/compilers/GCC/mk/port.mk +include $(CHIBIOS)/os/nil/nil.mk +include $(CHIBIOS)/os/common/ports/ARMv6-M/compilers/GCC/mk/port.mk # Auto-build files in ./source recursively. include $(CHIBIOS)/tools/mk/autobuild.mk # Other files (optional). @@ -150,10 +150,10 @@ CPPWARN = -Wall -Wextra -Wundef # # List all user C define here, like -D_DEBUG=1 -UDEFS = -DSTM32C031xx +UDEFS = # Define ASM defines here -UADEFS = -DSTM32C031xx +UADEFS = # List all user directories here UINCDIR = diff --git a/demos/STM32/NIL-STM32C031C6-NUCLEO64/cfg/mcuconf.h b/demos/STM32/NIL-STM32C031C6-NUCLEO64/cfg/mcuconf.h index 3e0c00855..6b6fd3c2d 100644 --- a/demos/STM32/NIL-STM32C031C6-NUCLEO64/cfg/mcuconf.h +++ b/demos/STM32/NIL-STM32C031C6-NUCLEO64/cfg/mcuconf.h @@ -145,7 +145,7 @@ * SERIAL driver system settings. */ #define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART2 TRUE /* * SIO driver system settings. diff --git a/os/hal/ports/STM32/STM32C0xx/hal_lld.h b/os/hal/ports/STM32/STM32C0xx/hal_lld.h index d9d32dad8..eac21669c 100644 --- a/os/hal/ports/STM32/STM32C0xx/hal_lld.h +++ b/os/hal/ports/STM32/STM32C0xx/hal_lld.h @@ -481,11 +481,11 @@ #error "Using a wrong mcuconf.h file, STM32C0xx_MCUCONF not defined" #endif -#if defined(STM32C011xx) && !defined(STM32G011_MCUCONF) -#error "Using a wrong mcuconf.h file, STM32G011_MCUCONF not defined" +#if defined(STM32C011xx) && !defined(STM32C011_MCUCONF) +#error "Using a wrong mcuconf.h file, STM32C011_MCUCONF not defined" -#elif defined(STM32C031xx) && !defined(STM32G031_MCUCONF) -#error "Using a wrong mcuconf.h file, STM32G031_MCUCONF not defined" +#elif defined(STM32C031xx) && !defined(STM32C031_MCUCONF) +#error "Using a wrong mcuconf.h file, STM32C031_MCUCONF not defined" #endif diff --git a/os/hal/ports/STM32/STM32C0xx/platform.mk b/os/hal/ports/STM32/STM32C0xx/platform.mk index a3c0cbc5f..8cfcb1598 100644 --- a/os/hal/ports/STM32/STM32C0xx/platform.mk +++ b/os/hal/ports/STM32/STM32C0xx/platform.mk @@ -1,12 +1,12 @@ # Required platform files. PLATFORMSRC := $(CHIBIOS)/os/hal/ports/common/ARMCMx/nvic.c \ - $(CHIBIOS)/os/hal/ports/STM32/STM32G0xx/stm32_isr.c \ - $(CHIBIOS)/os/hal/ports/STM32/STM32G0xx/hal_lld.c \ - $(CHIBIOS)/os/hal/ports/STM32/STM32G0xx/hal_efl_lld.c + $(CHIBIOS)/os/hal/ports/STM32/STM32C0xx/stm32_isr.c \ + $(CHIBIOS)/os/hal/ports/STM32/STM32C0xx/hal_lld.c \ + $(CHIBIOS)/os/hal/ports/STM32/STM32C0xx/hal_efl_lld.c # Required include directories. PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \ - $(CHIBIOS)/os/hal/ports/STM32/STM32G0xx + $(CHIBIOS)/os/hal/ports/STM32/STM32C0xx # Optional platform files. ifeq ($(USE_SMART_BUILD),yes) @@ -27,19 +27,16 @@ endif # Drivers compatible with the platform. include $(CHIBIOS)/os/hal/ports/STM32/LLD/ADCv5/driver.mk -include $(CHIBIOS)/os/hal/ports/STM32/LLD/DACv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/EXTIv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/GPIOv2/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/I2Cv2/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/RCCv1/driver.mk -include $(CHIBIOS)/os/hal/ports/STM32/LLD/RNGv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/RTCv3/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/SPIv2/driver_v2.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/SYSTICKv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/TIMv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/USARTv3/driver.mk -include $(CHIBIOS)/os/hal/ports/STM32/LLD/USBv2/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/xWDGv1/driver.mk # Shared variables