[bsp][stm32][nano] support nano version

stm32 BSPs to support nano version (RT_USING_NANO)

这个commit支持到stm32f7之前的BSP
This commit is contained in:
Meco Man 2023-12-03 01:33:34 +08:00
parent 860094e893
commit bb66d1ea50
305 changed files with 1030 additions and 785 deletions

View File

@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers"
default n
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers"
default n
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers"
default n
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers"
default n
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers"
default n
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -29,7 +29,7 @@ menu "On-chip Peripheral Drivers"
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -206,7 +206,7 @@ menu "On-chip Peripheral Drivers"
select RT_USING_WDT
default n
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers"
default n
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -33,7 +33,7 @@ menu "On-chip Peripheral Drivers"
default n
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -39,7 +39,7 @@ menu "On-chip Peripheral Drivers"
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -157,7 +157,7 @@ menu "On-chip Peripheral Drivers"
endchoice
endif
source "../libraries/HAL_Drivers/drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F072RB
bool
select SOC_SERIES_STM32F0
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2018-11-06 zylx first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED2 (user LED) pin: PA5 */
#define LED2_PIN GET_PIN(A, 5)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F072RB
bool
select SOC_SERIES_STM32F0
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_STLINK_TO_USART
bool "Enable STLINK TO USART (uart2)"
@ -166,7 +159,7 @@ menu "On-chip Peripheral Drivers"
endif
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-12-21 zylx first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f0xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F091RC
bool
select SOC_SERIES_STM32F0
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2018-11-06 zylx first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED2 pin: PA5 */
#define LED2_PIN GET_PIN(A, 5)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F091RC
bool
select SOC_SERIES_STM32F0
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_USB_TO_USART
@ -157,7 +150,7 @@ menu "On-chip Peripheral Drivers"
select RT_USING_WDT
default n
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-12-21 zylx first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f0xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103C8
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2019-03-08 obito0 first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PA1 */
#define LED0_PIN GET_PIN(A, 1)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103C8
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_USB_TO_USART
@ -79,7 +72,7 @@ menu "On-chip Peripheral Drivers"
default n
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2019-03-08 obito0 first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2019-03-08 obito0 first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PA1 */
#define LED0_PIN GET_PIN(B, 5)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_USB_TO_USART
@ -208,7 +201,7 @@ menu "On-chip Peripheral Drivers"
select RT_USING_CAN
default n
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2019-03-08 obito0 first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103RB
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2018-11-27 balanceTWK first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PC0 */
#define LED0_PIN GET_PIN(C, 0)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103RB
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_USB_TO_USART
@ -202,7 +195,7 @@ menu "On-chip Peripheral Drivers"
select RT_USING_WDT
default n
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 balanceTWK first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -12,8 +12,6 @@
#define __BOARD_H__
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -5,12 +5,16 @@
*
* Change Logs:
* Date Author Notes
* 2019-03-08 obito0 first version
* 2019-03-08 obito0 first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PB5 */
#define LED0_PIN GET_PIN(B, 5)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_USB_TO_USART
@ -242,7 +235,7 @@ menu "On-chip Peripheral Drivers"
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 SummerGift first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -24,8 +24,8 @@ config SOC_STM32F103C8
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
if !RT_USING_NANO
source "../libraries/Kconfig"
source "board/Kconfig"
endif

View File

@ -6,13 +6,16 @@
* Change Logs:
* Date Author Notes
* 2019-03-08 obito0 first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PC13 */
#define LED0_PIN GET_PIN(C, 13)
@ -29,12 +32,3 @@ int main(void)
rt_thread_mdelay(500);
}
}
#else
int main(void)
{
while (1)
{
rt_thread_mdelay(500);
}
}
#endif

View File

@ -188,7 +188,7 @@ menu "On-chip Peripheral Drivers"
select RT_USING_USB_DEVICE
default n
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2019-03-08 obito0 first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{
@ -51,10 +52,3 @@ void SystemClock_Config(void)
Error_Handler();
}
}
#ifdef RT_USING_NANO
void rt_hw_board_init(void)
{
}
#endif

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include <drv_common.h>
#include <drv_gpio.h>
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -5,13 +5,16 @@
*
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
* 2019-04-09 WillianChan add stm32f103-dofly-M3S BSP
* 2019-04-09 WillianChan first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PE5 */
#define LED0_PIN GET_PIN(E, 5)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_SDIO_SDCARD
@ -136,7 +129,7 @@ menu "On-chip Peripheral Drivers"
select RT_USING_SDIO
select RT_USING_DFS
default n
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -9,7 +9,8 @@
* 2019-04-09 WillianChan add stm32f103-dofly-M3S BSP
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -12,10 +12,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103C8
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,12 +6,16 @@
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include "drv_gpio.h"
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PB8 */
#define LED0_PIN GET_PIN(B, 8)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103C8
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
endmenu
@ -32,7 +25,7 @@ menu "On-chip Peripheral Drivers"
depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
default n
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 SummerGift first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,9 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000)
#define STM32_FLASH_SIZE (64 * 1024)

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2018-11-5 SummerGift first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PF7 */
#define LED0_PIN GET_PIN(F, 7)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_USB_TO_USART
@ -310,7 +303,7 @@ menu "On-chip Peripheral Drivers"
int "USB PULL UP STATUS"
default 0
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,8 +8,8 @@
* 2018-11-06 balanceTWK first version
*/
#include <rtthread.h>
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103C8
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -5,12 +5,15 @@
*
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED4 pin: PB1 */
#define LED4_PIN GET_PIN(B, 1)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103C8
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
endmenu
@ -78,7 +71,7 @@ menu "On-chip Peripheral Drivers"
range 1 216
default 16
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 SummerGift first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
/**
* @brief System Clock Configuration

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PE9 */
#define LED0_PIN GET_PIN(E, 9)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_RS485_OR_RS232
bool "Enable RS485/RS232 (uart4 be shared)"
@ -216,7 +209,7 @@ menu "On-chip Peripheral Drivers"
bool "Enable Watchdog Timer"
select RT_USING_WDT
default n
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 SummerGift first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103RB
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2018-11-27 balanceTWK first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PC0 */
#define LED0_PIN GET_PIN(C, 0)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103RB
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_USB_TO_USART
@ -68,7 +61,7 @@ menu "On-chip Peripheral Drivers"
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 balanceTWK first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
/**
* @brief System Clock Configuration

View File

@ -12,8 +12,6 @@
#define __BOARD_H__
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103RC
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED3 pin: PA3 */
#define LED3_PIN GET_PIN(A, 3)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103RC
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
endmenu
@ -101,7 +94,7 @@ menu "On-chip Peripheral Drivers"
select RT_USING_DFS_ELMFAT
default n
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 SummerGift first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2022-09-01 liYony first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED1 pin: PB0 */
#define LED1_PIN GET_PIN(B, 0)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F103ZE
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
endmenu
@ -34,7 +27,7 @@ menu "On-chip Peripheral Drivers"
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 SummerGift first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
/**
* @brief System Clock Configuration

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F107VC
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -7,11 +7,15 @@
* Date Author Notes
* 2018-11-06 SummerGift change to new framework
* 2019-01-12 whj add stm32f107-uc-Eval bsp
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED1 pin: PD13 */
#define LED1_PIN GET_PIN(D, 13)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F107VC
bool
select SOC_SERIES_STM32F1
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
config BSP_USING_USB_TO_USART
@ -41,7 +34,7 @@ menu "On-chip Peripheral Drivers"
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 SummerGift change to new framework
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,8 +15,18 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F207ZG
bool
select SOC_SERIES_STM32F2
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,11 +6,15 @@
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PB14 */
#define LED0_PIN GET_PIN(B, 14)

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F207ZG
bool
select SOC_SERIES_STM32F2
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
endmenu
@ -28,7 +21,7 @@ menu "On-chip Peripheral Drivers"
default y
endif
source "../libraries/HAL_Drivers/Kconfig"
source "$BSP_DIR/../libraries/HAL_Drivers/drivers/Kconfig"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 SummerGift first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

View File

@ -11,10 +11,7 @@
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f2xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern "C" {

View File

@ -15,7 +15,17 @@ config PKGS_DIR
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F302R8
bool
select SOC_SERIES_STM32F3
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
if !RT_USING_NANO
source "board/Kconfig"
endif

View File

@ -6,25 +6,29 @@
* Change Logs:
* Date Author Notes
* 2018-11-06 SummerGift first version
* 2023-12-03 Meco Man support nano version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
#include <rtthread.h>
#include <drv_gpio.h>
#ifndef RT_USING_NANO
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PB13 */
#define LED0_PIN GET_PIN(B, 13)
int main(void)
{
/* LED pin: PB13 */
rt_uint16_t led = rt_pin_get("PB.13");
/* set LED pin mode to output */
rt_pin_mode(led, PIN_MODE_OUTPUT);
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
while (1)
{
rt_pin_write(led, PIN_HIGH);
rt_pin_write(LED0_PIN, PIN_HIGH);
rt_thread_mdelay(500);
rt_pin_write(led, PIN_LOW);
rt_pin_write(LED0_PIN, PIN_LOW);
rt_thread_mdelay(500);
}

View File

@ -1,12 +1,5 @@
menu "Hardware Drivers Config"
config SOC_STM32F302R8
bool
select SOC_SERIES_STM32F3
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
endmenu

View File

@ -8,7 +8,8 @@
* 2018-11-06 SummerGift first version
*/
#include "board.h"
#include <board.h>
#include <drv_common.h>
void SystemClock_Config(void)
{

Some files were not shown because too many files have changed in this diff Show More