Browse Source

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

stm32 BSPs to support nano version (RT_USING_NANO)

这个commit支持到stm32f7之前的BSP
Meco Man 1 year ago
parent
commit
bb66d1ea50
100 changed files with 334 additions and 261 deletions
  1. 1 1
      bsp/stm32/libraries/templates/stm32f0xx/board/Kconfig
  2. 1 1
      bsp/stm32/libraries/templates/stm32f10x/board/Kconfig
  3. 1 1
      bsp/stm32/libraries/templates/stm32f2xx/board/Kconfig
  4. 1 1
      bsp/stm32/libraries/templates/stm32f4xx/board/Kconfig
  5. 1 1
      bsp/stm32/libraries/templates/stm32f7xx/board/Kconfig
  6. 1 1
      bsp/stm32/libraries/templates/stm32h7xx/board/Kconfig
  7. 1 1
      bsp/stm32/libraries/templates/stm32l1xx/board/Kconfig
  8. 1 1
      bsp/stm32/libraries/templates/stm32l4xx/board/Kconfig
  9. 1 1
      bsp/stm32/libraries/templates/stm32l5xx/board/Kconfig
  10. 1 1
      bsp/stm32/libraries/templates/stm32mp1xx/board/Kconfig
  11. 1 1
      bsp/stm32/libraries/templates/stm32wbxx/board/Kconfig
  12. 10 0
      bsp/stm32/stm32f072-st-nucleo/Kconfig
  13. 5 1
      bsp/stm32/stm32f072-st-nucleo/applications/main.c
  14. 1 8
      bsp/stm32/stm32f072-st-nucleo/board/Kconfig
  15. 2 1
      bsp/stm32/stm32f072-st-nucleo/board/board.c
  16. 0 3
      bsp/stm32/stm32f072-st-nucleo/board/board.h
  17. 10 0
      bsp/stm32/stm32f091-st-nucleo/Kconfig
  18. 5 1
      bsp/stm32/stm32f091-st-nucleo/applications/main.c
  19. 1 8
      bsp/stm32/stm32f091-st-nucleo/board/Kconfig
  20. 2 1
      bsp/stm32/stm32f091-st-nucleo/board/board.c
  21. 0 3
      bsp/stm32/stm32f091-st-nucleo/board/board.h
  22. 10 0
      bsp/stm32/stm32f103-100ask-mini/Kconfig
  23. 5 1
      bsp/stm32/stm32f103-100ask-mini/applications/main.c
  24. 1 8
      bsp/stm32/stm32f103-100ask-mini/board/Kconfig
  25. 2 1
      bsp/stm32/stm32f103-100ask-mini/board/board.c
  26. 0 3
      bsp/stm32/stm32f103-100ask-mini/board/board.h
  27. 10 0
      bsp/stm32/stm32f103-100ask-pro/Kconfig
  28. 5 1
      bsp/stm32/stm32f103-100ask-pro/applications/main.c
  29. 1 8
      bsp/stm32/stm32f103-100ask-pro/board/Kconfig
  30. 2 1
      bsp/stm32/stm32f103-100ask-pro/board/board.c
  31. 0 3
      bsp/stm32/stm32f103-100ask-pro/board/board.h
  32. 10 0
      bsp/stm32/stm32f103-atk-nano/Kconfig
  33. 5 1
      bsp/stm32/stm32f103-atk-nano/applications/main.c
  34. 1 8
      bsp/stm32/stm32f103-atk-nano/board/Kconfig
  35. 2 1
      bsp/stm32/stm32f103-atk-nano/board/board.c
  36. 0 2
      bsp/stm32/stm32f103-atk-nano/board/board.h
  37. 10 0
      bsp/stm32/stm32f103-atk-warshipv3/Kconfig
  38. 6 2
      bsp/stm32/stm32f103-atk-warshipv3/applications/main.c
  39. 1 8
      bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig
  40. 2 1
      bsp/stm32/stm32f103-atk-warshipv3/board/board.c
  41. 0 3
      bsp/stm32/stm32f103-atk-warshipv3/board/board.h
  42. 1 1
      bsp/stm32/stm32f103-blue-pill/Kconfig
  43. 5 11
      bsp/stm32/stm32f103-blue-pill/applications/main.c
  44. 1 1
      bsp/stm32/stm32f103-blue-pill/board/Kconfig
  45. 2 8
      bsp/stm32/stm32f103-blue-pill/board/board.c
  46. 0 3
      bsp/stm32/stm32f103-blue-pill/board/board.h
  47. 10 0
      bsp/stm32/stm32f103-dofly-M3S/Kconfig
  48. 6 3
      bsp/stm32/stm32f103-dofly-M3S/applications/main.c
  49. 1 8
      bsp/stm32/stm32f103-dofly-M3S/board/Kconfig
  50. 2 1
      bsp/stm32/stm32f103-dofly-M3S/board/board.c
  51. 0 3
      bsp/stm32/stm32f103-dofly-M3S/board/board.h
  52. 10 0
      bsp/stm32/stm32f103-dofly-lyc8/Kconfig
  53. 6 2
      bsp/stm32/stm32f103-dofly-lyc8/applications/main.c
  54. 1 8
      bsp/stm32/stm32f103-dofly-lyc8/board/Kconfig
  55. 2 1
      bsp/stm32/stm32f103-dofly-lyc8/board/board.c
  56. 0 2
      bsp/stm32/stm32f103-dofly-lyc8/board/board.h
  57. 10 0
      bsp/stm32/stm32f103-fire-arbitrary/Kconfig
  58. 5 1
      bsp/stm32/stm32f103-fire-arbitrary/applications/main.c
  59. 1 8
      bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig
  60. 2 2
      bsp/stm32/stm32f103-fire-arbitrary/board/board.c
  61. 0 3
      bsp/stm32/stm32f103-fire-arbitrary/board/board.h
  62. 10 0
      bsp/stm32/stm32f103-gizwits-gokitv21/Kconfig
  63. 5 2
      bsp/stm32/stm32f103-gizwits-gokitv21/applications/main.c
  64. 1 8
      bsp/stm32/stm32f103-gizwits-gokitv21/board/Kconfig
  65. 2 1
      bsp/stm32/stm32f103-gizwits-gokitv21/board/board.c
  66. 0 3
      bsp/stm32/stm32f103-gizwits-gokitv21/board/board.h
  67. 10 0
      bsp/stm32/stm32f103-hw100k-ibox/Kconfig
  68. 5 1
      bsp/stm32/stm32f103-hw100k-ibox/applications/main.c
  69. 1 8
      bsp/stm32/stm32f103-hw100k-ibox/board/Kconfig
  70. 2 1
      bsp/stm32/stm32f103-hw100k-ibox/board/board.c
  71. 0 3
      bsp/stm32/stm32f103-hw100k-ibox/board/board.h
  72. 10 0
      bsp/stm32/stm32f103-onenet-nbiot/Kconfig
  73. 5 1
      bsp/stm32/stm32f103-onenet-nbiot/applications/main.c
  74. 1 8
      bsp/stm32/stm32f103-onenet-nbiot/board/Kconfig
  75. 2 1
      bsp/stm32/stm32f103-onenet-nbiot/board/board.c
  76. 0 2
      bsp/stm32/stm32f103-onenet-nbiot/board/board.h
  77. 10 0
      bsp/stm32/stm32f103-yf-ufun/Kconfig
  78. 5 1
      bsp/stm32/stm32f103-yf-ufun/applications/main.c
  79. 1 8
      bsp/stm32/stm32f103-yf-ufun/board/Kconfig
  80. 2 1
      bsp/stm32/stm32f103-yf-ufun/board/board.c
  81. 0 3
      bsp/stm32/stm32f103-yf-ufun/board/board.h
  82. 10 0
      bsp/stm32/stm32f103-ys-f1pro/Kconfig
  83. 5 1
      bsp/stm32/stm32f103-ys-f1pro/applications/main.c
  84. 1 8
      bsp/stm32/stm32f103-ys-f1pro/board/Kconfig
  85. 2 1
      bsp/stm32/stm32f103-ys-f1pro/board/board.c
  86. 0 3
      bsp/stm32/stm32f103-ys-f1pro/board/board.h
  87. 10 0
      bsp/stm32/stm32f107-uc-eval/Kconfig
  88. 5 1
      bsp/stm32/stm32f107-uc-eval/applications/main.c
  89. 1 8
      bsp/stm32/stm32f107-uc-eval/board/Kconfig
  90. 2 1
      bsp/stm32/stm32f107-uc-eval/board/board.c
  91. 0 3
      bsp/stm32/stm32f107-uc-eval/board/board.h
  92. 10 0
      bsp/stm32/stm32f207-st-nucleo/Kconfig
  93. 5 1
      bsp/stm32/stm32f207-st-nucleo/applications/main.c
  94. 1 8
      bsp/stm32/stm32f207-st-nucleo/board/Kconfig
  95. 2 1
      bsp/stm32/stm32f207-st-nucleo/board/board.c
  96. 0 3
      bsp/stm32/stm32f207-st-nucleo/board/board.h
  97. 10 0
      bsp/stm32/stm32f302-st-nucleo/Kconfig
  98. 11 7
      bsp/stm32/stm32f302-st-nucleo/applications/main.c
  99. 0 7
      bsp/stm32/stm32f302-st-nucleo/board/Kconfig
  100. 2 1
      bsp/stm32/stm32f302-st-nucleo/board/board.c

+ 1 - 1
bsp/stm32/libraries/templates/stm32f0xx/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32f10x/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32f2xx/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32f4xx/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32f7xx/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32h7xx/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32l1xx/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32l4xx/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32l5xx/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32mp1xx/board/Kconfig

@@ -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
 

+ 1 - 1
bsp/stm32/libraries/templates/stm32wbxx/board/Kconfig

@@ -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
 

+ 10 - 0
bsp/stm32/stm32f072-st-nucleo/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f072-st-nucleo/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f072-st-nucleo/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f072-st-nucleo/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f072-st-nucleo/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f091-st-nucleo/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f091-st-nucleo/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f091-st-nucleo/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f091-st-nucleo/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f091-st-nucleo/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f103-100ask-mini/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f103-100ask-mini/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-100ask-mini/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-100ask-mini/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f103-100ask-mini/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f103-100ask-pro/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f103-100ask-pro/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-100ask-pro/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-100ask-pro/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f103-100ask-pro/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f103-atk-nano/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f103-atk-nano/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-atk-nano/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-atk-nano/board/board.c

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

+ 0 - 2
bsp/stm32/stm32f103-atk-nano/board/board.h

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

+ 10 - 0
bsp/stm32/stm32f103-atk-warshipv3/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 6 - 2
bsp/stm32/stm32f103-atk-warshipv3/applications/main.c

@@ -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 <board.h>
 #include <rtthread.h>
+#include <drv_gpio.h>
+#ifndef RT_USING_NANO
 #include <rtdevice.h>
-#include <board.h>
+#endif /* RT_USING_NANO */
 
 /* defined the LED0 pin: PB5 */
 #define LED0_PIN    GET_PIN(B, 5)

+ 1 - 8
bsp/stm32/stm32f103-atk-warshipv3/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-atk-warshipv3/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f103-atk-warshipv3/board/board.h

@@ -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" {

+ 1 - 1
bsp/stm32/stm32f103-blue-pill/Kconfig

@@ -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

+ 5 - 11
bsp/stm32/stm32f103-blue-pill/applications/main.c

@@ -6,13 +6,16 @@
  * Change Logs:
  * Date           Author       Notes
  * 2019-03-08     obito0       first version
+ * 2023-12-03     Meco Man     support nano version
  */
 
+#include <board.h>
 #include <rtthread.h>
+#include <drv_gpio.h>
+#ifndef RT_USING_NANO
 #include <rtdevice.h>
-#include <board.h>
+#endif /* RT_USING_NANO */
 
-#ifndef 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

+ 1 - 1
bsp/stm32/stm32f103-blue-pill/board/Kconfig

@@ -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
 

+ 2 - 8
bsp/stm32/stm32f103-blue-pill/board/board.c

@@ -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

+ 0 - 3
bsp/stm32/stm32f103-blue-pill/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f103-dofly-M3S/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 6 - 3
bsp/stm32/stm32f103-dofly-M3S/applications/main.c

@@ -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 <board.h>
 #include <rtthread.h>
+#include <drv_gpio.h>
+#ifndef RT_USING_NANO
 #include <rtdevice.h>
-#include <board.h>
+#endif /* RT_USING_NANO */
 
 /* defined the LED0 pin: PE5 */
 #define LED0_PIN    GET_PIN(E, 5)

+ 1 - 8
bsp/stm32/stm32f103-dofly-M3S/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-dofly-M3S/board/board.c

@@ -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)
 {

+ 0 - 3
bsp/stm32/stm32f103-dofly-M3S/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f103-dofly-lyc8/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 6 - 2
bsp/stm32/stm32f103-dofly-lyc8/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-dofly-lyc8/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-dofly-lyc8/board/board.c

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

+ 0 - 2
bsp/stm32/stm32f103-dofly-lyc8/board/board.h

@@ -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)

+ 10 - 0
bsp/stm32/stm32f103-fire-arbitrary/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f103-fire-arbitrary/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-fire-arbitrary/board/Kconfig

@@ -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
 

+ 2 - 2
bsp/stm32/stm32f103-fire-arbitrary/board/board.c

@@ -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)
 {

+ 0 - 3
bsp/stm32/stm32f103-fire-arbitrary/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f103-gizwits-gokitv21/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 2
bsp/stm32/stm32f103-gizwits-gokitv21/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-gizwits-gokitv21/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-gizwits-gokitv21/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f103-gizwits-gokitv21/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f103-hw100k-ibox/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f103-hw100k-ibox/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-hw100k-ibox/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-hw100k-ibox/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f103-hw100k-ibox/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f103-onenet-nbiot/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f103-onenet-nbiot/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-onenet-nbiot/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-onenet-nbiot/board/board.c

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

+ 0 - 2
bsp/stm32/stm32f103-onenet-nbiot/board/board.h

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

+ 10 - 0
bsp/stm32/stm32f103-yf-ufun/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f103-yf-ufun/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-yf-ufun/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-yf-ufun/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f103-yf-ufun/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f103-ys-f1pro/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f103-ys-f1pro/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f103-ys-f1pro/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f103-ys-f1pro/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f103-ys-f1pro/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f107-uc-eval/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f107-uc-eval/applications/main.c

@@ -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 <board.h>
 #include <rtthread.h>
+#include <drv_gpio.h>
+#ifndef RT_USING_NANO
 #include <rtdevice.h>
-#include <board.h>
+#endif /* RT_USING_NANO */
 
 /* defined the LED1 pin: PD13 */
 #define LED1_PIN    GET_PIN(D, 13)

+ 1 - 8
bsp/stm32/stm32f107-uc-eval/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f107-uc-eval/board/board.c

@@ -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)
 {

+ 0 - 3
bsp/stm32/stm32f107-uc-eval/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f207-st-nucleo/Kconfig

@@ -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"
+
+if !RT_USING_NANO
 source "board/Kconfig"
+endif
 

+ 5 - 1
bsp/stm32/stm32f207-st-nucleo/applications/main.c

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

+ 1 - 8
bsp/stm32/stm32f207-st-nucleo/board/Kconfig

@@ -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
 

+ 2 - 1
bsp/stm32/stm32f207-st-nucleo/board/board.c

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

+ 0 - 3
bsp/stm32/stm32f207-st-nucleo/board/board.h

@@ -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" {

+ 10 - 0
bsp/stm32/stm32f302-st-nucleo/Kconfig

@@ -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

+ 11 - 7
bsp/stm32/stm32f302-st-nucleo/applications/main.c

@@ -6,25 +6,29 @@
  * Change Logs:
  * Date           Author       Notes
  * 2018-11-06     SummerGift   first version
+ * 2023-12-03     Meco Man     support nano version
  */
 
+#include <board.h>
 #include <rtthread.h>
+#include <drv_gpio.h>
+#ifndef RT_USING_NANO
 #include <rtdevice.h>
-#include <board.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);
     }
 

+ 0 - 7
bsp/stm32/stm32f302-st-nucleo/board/Kconfig

@@ -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

+ 2 - 1
bsp/stm32/stm32f302-st-nucleo/board/board.c

@@ -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 changed in this diff