diff options
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | board/board-stm32f0-discovery.h | 2 | ||||
-rw-r--r-- | contrib/adc-mkl27z.c (renamed from mcu/adc-mkl27z.c) | 0 | ||||
-rw-r--r-- | contrib/adc-stm32f103.c (renamed from mcu/adc-stm32f103.c) | 0 | ||||
-rw-r--r-- | example-led/Makefile | 2 | ||||
-rw-r--r-- | mcu/sys-stm32f0.c (renamed from mcu/sys-stm32f030.c) | 0 | ||||
-rw-r--r-- | mcu/sys-stm32f0.h (renamed from mcu/sys-stm32f030.h) | 4 | ||||
-rw-r--r-- | rules.mk | 2 | ||||
-rw-r--r-- | sys.h | 4 |
9 files changed, 26 insertions, 3 deletions
@@ -1,3 +1,18 @@ +2016-06-02 Niibe Yutaka <gniibe@fsij.org> + + * contrib/adc-mkl27z.c: Move from mcu. + * contrib/adc-stm32f103.c: Move from mcu. + + * example-led/Makefile (CHIP): Define as stm32f0. + + * mcu/sys-stm32f0.h: Rename from sys-stm32f030.h, + as we share it among STM32F030 and STM32F050. + * mcu/sys-stm32f0.c: Likewise. + + * board/board-stm32f0-discovery.h (MCU_STM32F0): Define. + + * sys.h: Support STM32F0. + 2016-06-01 NIIBE Yutaka <gniibe@fsij.org> * chopstx.h (chx_fatal): Remove weak attribute from declaration. diff --git a/board/board-stm32f0-discovery.h b/board/board-stm32f0-discovery.h index 38ae214..48aa3d3 100644 --- a/board/board-stm32f0-discovery.h +++ b/board/board-stm32f0-discovery.h @@ -1,6 +1,8 @@ #define BOARD_NAME "STM32F0 Discovery" #define BOARD_ID 0xde4b4bc1 +#define MCU_STM32F0 1 + /* * Running at 48MHz with HSI as clock source. * diff --git a/mcu/adc-mkl27z.c b/contrib/adc-mkl27z.c index 19f9f5b..19f9f5b 100644 --- a/mcu/adc-mkl27z.c +++ b/contrib/adc-mkl27z.c diff --git a/mcu/adc-stm32f103.c b/contrib/adc-stm32f103.c index 6a8076e..6a8076e 100644 --- a/mcu/adc-stm32f103.c +++ b/contrib/adc-stm32f103.c diff --git a/example-led/Makefile b/example-led/Makefile index b490fb1..d7d978c 100644 --- a/example-led/Makefile +++ b/example-led/Makefile @@ -10,7 +10,7 @@ LDSCRIPT= sample.ld ### LDSCRIPT= sample.ld.m3 CSRC = sample.c -CHIP=stm32f030 +CHIP=stm32f0 USE_SYS = yes ################################### diff --git a/mcu/sys-stm32f030.c b/mcu/sys-stm32f0.c index f811b97..f811b97 100644 --- a/mcu/sys-stm32f030.c +++ b/mcu/sys-stm32f0.c diff --git a/mcu/sys-stm32f030.h b/mcu/sys-stm32f0.h index ddd83af..bd2d87d 100644 --- a/mcu/sys-stm32f030.h +++ b/mcu/sys-stm32f0.h @@ -16,8 +16,12 @@ #endif extern const uint8_t sys_version[8]; +#if defined(USE_SYS3) || defined(USE_SYS_BOARD_ID) extern const uint32_t sys_board_id; extern const uint8_t sys_board_name[]; +#else +# define SYS_BOARD_ID BOARD_ID +#endif typedef void (*handler)(void); extern handler vector[16]; @@ -13,7 +13,7 @@ ifneq ($(USE_USB),) CSRC += $(CHOPSTX)/mcu/usb-$(CHIP).c endif ifneq ($(USE_ADC),) -CSRC += $(CHOPSTX)/mcu/adc-$(CHIP).c +CSRC += $(CHOPSTX)/contrib/adc-$(CHIP).c endif INCDIR += $(CHOPSTX) @@ -1,5 +1,7 @@ -#ifdef MCU_KINETIS_L +#if defined(MCU_KINETIS_L) #include "mcu/sys-mkl27z.h" +#elif defined(MCU_STM32F0) +#include "mcu/sys-stm32f0.h" #else #include "mcu/sys-stm32f103.h" #endif |