From ea9958a506aaf1bb1d297b8e9cb448a1b7d01fbf Mon Sep 17 00:00:00 2001 From: SummerGift Date: Wed, 26 Dec 2018 10:27:05 +0800 Subject: [PATCH] [bsp][stm32] sync bsp template file --- .../libraries/templates/stm32f10x/README.md | 2 +- .../libraries/templates/stm32f10x/board/board.c | 9 --------- .../libraries/templates/stm32f10x/board/board.h | 1 - .../libraries/templates/stm32f10x/rtconfig.py | 1 + .../libraries/templates/stm32f4xx/README.md | 2 +- .../libraries/templates/stm32f4xx/board/board.c | 9 --------- .../libraries/templates/stm32f4xx/board/board.h | 1 - .../libraries/templates/stm32f4xx/rtconfig.py | 1 + .../libraries/templates/stm32f7xx/README.md | 2 +- .../libraries/templates/stm32f7xx/board/board.c | 17 ----------------- .../libraries/templates/stm32f7xx/board/board.h | 5 ----- .../libraries/templates/stm32f7xx/rtconfig.py | 1 + .../libraries/templates/stm32l4xx/README.md | 2 +- .../libraries/templates/stm32l4xx/board/board.c | 9 --------- .../libraries/templates/stm32l4xx/board/board.h | 3 --- .../libraries/templates/stm32l4xx/rtconfig.py | 1 + 16 files changed, 8 insertions(+), 58 deletions(-) diff --git a/bsp/stm32/libraries/templates/stm32f10x/README.md b/bsp/stm32/libraries/templates/stm32f10x/README.md index 3c6df4d1ba..e7d97509ef 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/README.md +++ b/bsp/stm32/libraries/templates/stm32f10x/README.md @@ -28,7 +28,7 @@ - 常用外设 - LED:x个,DS0(红色,PB1),DS1(绿色,PB0) - 按键:x个,K0(兼具唤醒功能,PA0),K1(PC13) -- 常用接口:USB 转串口、SD 卡接口、以太网接口、LCD 接口、... +- 常用接口:USB 转串口、SD 卡接口、以太网接口、LCD 接口等 - 调试接口,标准 JTAG/SWD 开发板更多详细信息请参考【厂商名】 [xxx开发板介绍](https://xxx)。 diff --git a/bsp/stm32/libraries/templates/stm32f10x/board/board.c b/bsp/stm32/libraries/templates/stm32f10x/board/board.c index 36c127c5b7..33588783ec 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/board/board.c +++ b/bsp/stm32/libraries/templates/stm32f10x/board/board.c @@ -42,12 +42,3 @@ void SystemClock_Config(void) Error_Handler(); } } - -void MX_GPIO_Init(void) -{ - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOD_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - -} diff --git a/bsp/stm32/libraries/templates/stm32f10x/board/board.h b/bsp/stm32/libraries/templates/stm32f10x/board/board.h index 1c00e71dca..cc564baf4f 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/board/board.h +++ b/bsp/stm32/libraries/templates/stm32f10x/board/board.h @@ -33,6 +33,5 @@ extern int __bss_end; #define HEAP_END STM32_SRAM_END void SystemClock_Config(void); -void MX_GPIO_Init(void); #endif /* __BOARD_H__ */ diff --git a/bsp/stm32/libraries/templates/stm32f10x/rtconfig.py b/bsp/stm32/libraries/templates/stm32f10x/rtconfig.py index 79904118e5..40826ac99e 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32f10x/rtconfig.py @@ -36,6 +36,7 @@ if PLATFORM == 'gcc': CC = PREFIX + 'gcc' AS = PREFIX + 'gcc' AR = PREFIX + 'ar' + CXX = PREFIX + 'g++' LINK = PREFIX + 'gcc' TARGET_EXT = 'elf' SIZE = PREFIX + 'size' diff --git a/bsp/stm32/libraries/templates/stm32f4xx/README.md b/bsp/stm32/libraries/templates/stm32f4xx/README.md index 74a5ecae89..8026a8f499 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/README.md +++ b/bsp/stm32/libraries/templates/stm32f4xx/README.md @@ -28,7 +28,7 @@ - 常用外设 - LED:x个,DS0(红色,PB1),DS1(绿色,PB0) - 按键:x个,K0(兼具唤醒功能,PA0),K1(PC13) -- 常用接口:USB 转串口、SD 卡接口、以太网接口、LCD 接口、... +- 常用接口:USB 转串口、SD 卡接口、以太网接口、LCD 接口等 - 调试接口,标准 JTAG/SWD 开发板更多详细信息请参考【厂商名】 [xxx开发板介绍](https://xxx)。 diff --git a/bsp/stm32/libraries/templates/stm32f4xx/board/board.c b/bsp/stm32/libraries/templates/stm32f4xx/board/board.c index b3cf3b0754..9adbd0f32b 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/board/board.c +++ b/bsp/stm32/libraries/templates/stm32f4xx/board/board.c @@ -47,12 +47,3 @@ void SystemClock_Config(void) Error_Handler(); } } - -void MX_GPIO_Init(void) -{ - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOH_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - -} diff --git a/bsp/stm32/libraries/templates/stm32f4xx/board/board.h b/bsp/stm32/libraries/templates/stm32f4xx/board/board.h index f7944b4ed7..47a4822cb5 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/board/board.h +++ b/bsp/stm32/libraries/templates/stm32f4xx/board/board.h @@ -32,7 +32,6 @@ extern int __bss_end; #define HEAP_END STM32_SRAM_END void SystemClock_Config(void); -void MX_GPIO_Init(void); #endif diff --git a/bsp/stm32/libraries/templates/stm32f4xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32f4xx/rtconfig.py index 2e3b7cf492..3241586f69 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32f4xx/rtconfig.py @@ -36,6 +36,7 @@ if PLATFORM == 'gcc': CC = PREFIX + 'gcc' AS = PREFIX + 'gcc' AR = PREFIX + 'ar' + CXX = PREFIX + 'g++' LINK = PREFIX + 'gcc' TARGET_EXT = 'elf' SIZE = PREFIX + 'size' diff --git a/bsp/stm32/libraries/templates/stm32f7xx/README.md b/bsp/stm32/libraries/templates/stm32f7xx/README.md index 74a5ecae89..8026a8f499 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/README.md +++ b/bsp/stm32/libraries/templates/stm32f7xx/README.md @@ -28,7 +28,7 @@ - 常用外设 - LED:x个,DS0(红色,PB1),DS1(绿色,PB0) - 按键:x个,K0(兼具唤醒功能,PA0),K1(PC13) -- 常用接口:USB 转串口、SD 卡接口、以太网接口、LCD 接口、... +- 常用接口:USB 转串口、SD 卡接口、以太网接口、LCD 接口等 - 调试接口,标准 JTAG/SWD 开发板更多详细信息请参考【厂商名】 [xxx开发板介绍](https://xxx)。 diff --git a/bsp/stm32/libraries/templates/stm32f7xx/board/board.c b/bsp/stm32/libraries/templates/stm32f7xx/board/board.c index 0da45bd437..3b25738661 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/board/board.c +++ b/bsp/stm32/libraries/templates/stm32f7xx/board/board.c @@ -61,20 +61,3 @@ void SystemClock_Config(void) } } -void MX_GPIO_Init(void) -{ - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOH_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - -} - -#ifdef RT_USING_PIN -// int board_pin_init(void) -// { -// rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT); -// return 0; -// } -// INIT_BOARD_EXPORT(board_pin_init); -#endif /* RT_USING_PIN */ diff --git a/bsp/stm32/libraries/templates/stm32f7xx/board/board.h b/bsp/stm32/libraries/templates/stm32f7xx/board/board.h index 86fd25c980..e0e0ede564 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/board/board.h +++ b/bsp/stm32/libraries/templates/stm32f7xx/board/board.h @@ -16,10 +16,6 @@ #include "drv_common.h" #ifdef BSP_USING_GPIO -#include "drv_gpio.h" -/* Board Pin definitions */ -// #define LED0_PIN GET_PIN(H, 10) -#endif #define STM32_SRAM_SIZE 256 #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024) @@ -38,7 +34,6 @@ extern int __bss_end; #define HEAP_END STM32_SRAM_END void SystemClock_Config(void); -void MX_GPIO_Init(void); #endif diff --git a/bsp/stm32/libraries/templates/stm32f7xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32f7xx/rtconfig.py index ced944e0b6..fd2682b838 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32f7xx/rtconfig.py @@ -34,6 +34,7 @@ if PLATFORM == 'gcc': CXX = PREFIX + 'g++' AS = PREFIX + 'gcc' AR = PREFIX + 'ar' + CXX = PREFIX + 'g++' LINK = PREFIX + 'gcc' TARGET_EXT = 'elf' SIZE = PREFIX + 'size' diff --git a/bsp/stm32/libraries/templates/stm32l4xx/README.md b/bsp/stm32/libraries/templates/stm32l4xx/README.md index 3c6df4d1ba..e7d97509ef 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/README.md +++ b/bsp/stm32/libraries/templates/stm32l4xx/README.md @@ -28,7 +28,7 @@ - 常用外设 - LED:x个,DS0(红色,PB1),DS1(绿色,PB0) - 按键:x个,K0(兼具唤醒功能,PA0),K1(PC13) -- 常用接口:USB 转串口、SD 卡接口、以太网接口、LCD 接口、... +- 常用接口:USB 转串口、SD 卡接口、以太网接口、LCD 接口等 - 调试接口,标准 JTAG/SWD 开发板更多详细信息请参考【厂商名】 [xxx开发板介绍](https://xxx)。 diff --git a/bsp/stm32/libraries/templates/stm32l4xx/board/board.c b/bsp/stm32/libraries/templates/stm32l4xx/board/board.c index 5f8113f4d7..a64660e552 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/board/board.c +++ b/bsp/stm32/libraries/templates/stm32l4xx/board/board.c @@ -57,12 +57,3 @@ void SystemClock_Config(void) Error_Handler(); } } - -void MX_GPIO_Init(void) -{ - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOH_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - -} diff --git a/bsp/stm32/libraries/templates/stm32l4xx/board/board.h b/bsp/stm32/libraries/templates/stm32l4xx/board/board.h index 29e1ba4267..9e1f66bf24 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/board/board.h +++ b/bsp/stm32/libraries/templates/stm32l4xx/board/board.h @@ -32,8 +32,5 @@ extern int __bss_end; #define HEAP_END STM32_SRAM_END void SystemClock_Config(void); -void MX_GPIO_Init(void); #endif - - diff --git a/bsp/stm32/libraries/templates/stm32l4xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32l4xx/rtconfig.py index 50c1d8a0f7..d632114e2d 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32l4xx/rtconfig.py @@ -36,6 +36,7 @@ if PLATFORM == 'gcc': CC = PREFIX + 'gcc' AS = PREFIX + 'gcc' AR = PREFIX + 'ar' + CXX = PREFIX + 'g++' LINK = PREFIX + 'gcc' TARGET_EXT = 'elf' SIZE = PREFIX + 'size' -- GitLab