Browse Source

[stm32] support nano version
- G0
- G4
- L0
- L4

Meco Man 1 year ago
parent
commit
1b0dae2bb0
100 changed files with 280 additions and 234 deletions
  1. 1 0
      bsp/stm32/libraries/HAL_Drivers/drivers/drv_pm.c
  2. 7 0
      bsp/stm32/stm32g070-st-nucleo/Kconfig
  3. 5 1
      bsp/stm32/stm32g070-st-nucleo/applications/main.c
  4. 0 7
      bsp/stm32/stm32g070-st-nucleo/board/Kconfig
  5. 2 1
      bsp/stm32/stm32g070-st-nucleo/board/board.c
  6. 0 3
      bsp/stm32/stm32g070-st-nucleo/board/board.h
  7. 7 0
      bsp/stm32/stm32g071-st-nucleo/Kconfig
  8. 5 1
      bsp/stm32/stm32g071-st-nucleo/applications/main.c
  9. 0 7
      bsp/stm32/stm32g071-st-nucleo/board/Kconfig
  10. 2 1
      bsp/stm32/stm32g071-st-nucleo/board/board.c
  11. 0 3
      bsp/stm32/stm32g071-st-nucleo/board/board.h
  12. 7 0
      bsp/stm32/stm32g431-st-nucleo/Kconfig
  13. 5 1
      bsp/stm32/stm32g431-st-nucleo/applications/main.c
  14. 0 7
      bsp/stm32/stm32g431-st-nucleo/board/Kconfig
  15. 2 1
      bsp/stm32/stm32g431-st-nucleo/board/board.c
  16. 0 3
      bsp/stm32/stm32g431-st-nucleo/board/board.h
  17. 7 0
      bsp/stm32/stm32g474-st-nucleo/Kconfig
  18. 5 1
      bsp/stm32/stm32g474-st-nucleo/applications/main.c
  19. 0 7
      bsp/stm32/stm32g474-st-nucleo/board/Kconfig
  20. 2 1
      bsp/stm32/stm32g474-st-nucleo/board/board.c
  21. 0 3
      bsp/stm32/stm32g474-st-nucleo/board/board.h
  22. 7 0
      bsp/stm32/stm32g491-st-nucleo/Kconfig
  23. 5 1
      bsp/stm32/stm32g491-st-nucleo/applications/main.c
  24. 0 7
      bsp/stm32/stm32g491-st-nucleo/board/Kconfig
  25. 2 1
      bsp/stm32/stm32g491-st-nucleo/board/board.c
  26. 0 3
      bsp/stm32/stm32g491-st-nucleo/board/board.h
  27. 7 0
      bsp/stm32/stm32l010-st-nucleo/Kconfig
  28. 5 1
      bsp/stm32/stm32l010-st-nucleo/applications/main.c
  29. 0 7
      bsp/stm32/stm32l010-st-nucleo/board/Kconfig
  30. 2 1
      bsp/stm32/stm32l010-st-nucleo/board/board.c
  31. 0 3
      bsp/stm32/stm32l010-st-nucleo/board/board.h
  32. 7 0
      bsp/stm32/stm32l053-st-nucleo/Kconfig
  33. 5 1
      bsp/stm32/stm32l053-st-nucleo/applications/main.c
  34. 0 7
      bsp/stm32/stm32l053-st-nucleo/board/Kconfig
  35. 2 1
      bsp/stm32/stm32l053-st-nucleo/board/board.c
  36. 0 3
      bsp/stm32/stm32l053-st-nucleo/board/board.h
  37. 7 0
      bsp/stm32/stm32l412-st-nucleo/Kconfig
  38. 5 1
      bsp/stm32/stm32l412-st-nucleo/applications/main.c
  39. 0 7
      bsp/stm32/stm32l412-st-nucleo/board/Kconfig
  40. 2 1
      bsp/stm32/stm32l412-st-nucleo/board/board.c
  41. 0 3
      bsp/stm32/stm32l412-st-nucleo/board/board.h
  42. 7 0
      bsp/stm32/stm32l431-BearPi/Kconfig
  43. 5 1
      bsp/stm32/stm32l431-BearPi/applications/main.c
  44. 0 7
      bsp/stm32/stm32l431-BearPi/board/Kconfig
  45. 2 1
      bsp/stm32/stm32l431-BearPi/board/board.c
  46. 0 3
      bsp/stm32/stm32l431-BearPi/board/board.h
  47. 7 0
      bsp/stm32/stm32l432-st-nucleo/Kconfig
  48. 5 1
      bsp/stm32/stm32l432-st-nucleo/applications/main.c
  49. 0 7
      bsp/stm32/stm32l432-st-nucleo/board/Kconfig
  50. 2 1
      bsp/stm32/stm32l432-st-nucleo/board/board.c
  51. 0 3
      bsp/stm32/stm32l432-st-nucleo/board/board.h
  52. 7 0
      bsp/stm32/stm32l433-ali-startkit/Kconfig
  53. 5 1
      bsp/stm32/stm32l433-ali-startkit/applications/main.c
  54. 0 7
      bsp/stm32/stm32l433-ali-startkit/board/Kconfig
  55. 1 0
      bsp/stm32/stm32l433-ali-startkit/board/board.c
  56. 0 2
      bsp/stm32/stm32l433-ali-startkit/board/board.h
  57. 7 0
      bsp/stm32/stm32l433-st-nucleo/Kconfig
  58. 5 1
      bsp/stm32/stm32l433-st-nucleo/applications/main.c
  59. 0 7
      bsp/stm32/stm32l433-st-nucleo/board/Kconfig
  60. 2 1
      bsp/stm32/stm32l433-st-nucleo/board/board.c
  61. 0 3
      bsp/stm32/stm32l433-st-nucleo/board/board.h
  62. 7 0
      bsp/stm32/stm32l452-st-nucleo/Kconfig
  63. 5 1
      bsp/stm32/stm32l452-st-nucleo/applications/main.c
  64. 0 7
      bsp/stm32/stm32l452-st-nucleo/board/Kconfig
  65. 2 1
      bsp/stm32/stm32l452-st-nucleo/board/board.c
  66. 0 3
      bsp/stm32/stm32l452-st-nucleo/board/board.h
  67. 7 0
      bsp/stm32/stm32l475-st-discovery/Kconfig
  68. 5 1
      bsp/stm32/stm32l475-st-discovery/applications/main.c
  69. 0 7
      bsp/stm32/stm32l475-st-discovery/board/Kconfig
  70. 1 0
      bsp/stm32/stm32l475-st-discovery/board/board.c
  71. 0 3
      bsp/stm32/stm32l475-st-discovery/board/board.h
  72. 7 0
      bsp/stm32/stm32l476-st-nucleo/Kconfig
  73. 6 2
      bsp/stm32/stm32l476-st-nucleo/applications/main.c
  74. 0 7
      bsp/stm32/stm32l476-st-nucleo/board/Kconfig
  75. 2 0
      bsp/stm32/stm32l476-st-nucleo/board/board.c
  76. 1 3
      bsp/stm32/stm32l476-st-nucleo/board/board.h
  77. 7 0
      bsp/stm32/stm32l496-ali-developer/Kconfig
  78. 5 1
      bsp/stm32/stm32l496-ali-developer/applications/main.c
  79. 0 7
      bsp/stm32/stm32l496-ali-developer/board/Kconfig
  80. 1 0
      bsp/stm32/stm32l496-ali-developer/board/board.c
  81. 0 2
      bsp/stm32/stm32l496-ali-developer/board/board.h
  82. 7 0
      bsp/stm32/stm32l496-st-discovery/Kconfig
  83. 5 1
      bsp/stm32/stm32l496-st-discovery/applications/main.c
  84. 0 7
      bsp/stm32/stm32l496-st-discovery/board/Kconfig
  85. 2 1
      bsp/stm32/stm32l496-st-discovery/board/board.c
  86. 0 3
      bsp/stm32/stm32l496-st-discovery/board/board.h
  87. 7 0
      bsp/stm32/stm32l496-st-nucleo/Kconfig
  88. 5 1
      bsp/stm32/stm32l496-st-nucleo/applications/main.c
  89. 0 7
      bsp/stm32/stm32l496-st-nucleo/board/Kconfig
  90. 1 1
      bsp/stm32/stm32l496-st-nucleo/board/board.c
  91. 0 3
      bsp/stm32/stm32l496-st-nucleo/board/board.h
  92. 7 0
      bsp/stm32/stm32l4r5-st-nucleo/Kconfig
  93. 5 1
      bsp/stm32/stm32l4r5-st-nucleo/applications/main.c
  94. 0 7
      bsp/stm32/stm32l4r5-st-nucleo/board/Kconfig
  95. 2 1
      bsp/stm32/stm32l4r5-st-nucleo/board/board.c
  96. 0 3
      bsp/stm32/stm32l4r5-st-nucleo/board/board.h
  97. 7 0
      bsp/stm32/stm32l4r9-st-eval/Kconfig
  98. 6 3
      bsp/stm32/stm32l4r9-st-eval/applications/main.c
  99. 0 7
      bsp/stm32/stm32l4r9-st-eval/board/Kconfig
  100. 2 1
      bsp/stm32/stm32l4r9-st-eval/board/board.c

+ 1 - 0
bsp/stm32/libraries/HAL_Drivers/drivers/drv_pm.c

@@ -10,6 +10,7 @@
 
 
 #include <board.h>
 #include <board.h>
 #include <drv_lptim.h>
 #include <drv_lptim.h>
+#include <rtdevice.h>
 
 
 static void uart_console_reconfig(void)
 static void uart_console_reconfig(void)
 {
 {

+ 7 - 0
bsp/stm32/stm32g070-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32G070RB
+    bool
+    select SOC_SERIES_STM32G0
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32G070RB
-    bool
-    select SOC_SERIES_STM32G0
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_USB_TO_UART
     config BSP_USING_USB_TO_UART

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

@@ -8,7 +8,8 @@
  * 2020-7-1       NU-LL        first version
  * 2020-7-1       NU-LL        first version
  */
  */
 
 
-#include "board.h"
+#include <board.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

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

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

+ 7 - 0
bsp/stm32/stm32g071-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32G071RB
+    bool
+    select SOC_SERIES_STM32G0
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32G071RB
-    bool
-    select SOC_SERIES_STM32G0
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_USB_TO_USART
     config BSP_USING_USB_TO_USART

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

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

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

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

+ 7 - 0
bsp/stm32/stm32g431-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32G431RB
+    bool
+    select SOC_SERIES_STM32G4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

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

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

@@ -9,7 +9,8 @@
  * 2019-10-03     xuzhuoyi     add stm32g431-st-nucleo bsp
  * 2019-10-03     xuzhuoyi     add stm32g431-st-nucleo bsp
  */
  */
 
 
-#include "board.h"
+#include <board.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

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

@@ -12,10 +12,7 @@
 #ifndef __BOARD_H__
 #ifndef __BOARD_H__
 #define __BOARD_H__
 #define __BOARD_H__
 
 
-#include <rtthread.h>
 #include <stm32g4xx.h>
 #include <stm32g4xx.h>
-#include "drv_common.h"
-#include "drv_gpio.h"
 
 
 #define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
 #define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
 #define STM32_FLASH_SIZE             (128 * 1024)
 #define STM32_FLASH_SIZE             (128 * 1024)

+ 7 - 0
bsp/stm32/stm32g474-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32G474RE
+    bool
+    select SOC_SERIES_STM32G4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32G474RE
-    bool
-    select SOC_SERIES_STM32G4
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_STLINK_TO_USART
     config BSP_USING_STLINK_TO_USART

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

@@ -9,7 +9,8 @@
  * 2019-10-03     xuzhuoyi     add stm32g431-st-nucleo bsp
  * 2019-10-03     xuzhuoyi     add stm32g431-st-nucleo bsp
  */
  */
 
 
-#include "board.h"
+#include <board.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

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

@@ -12,10 +12,7 @@
 #ifndef __BOARD_H__
 #ifndef __BOARD_H__
 #define __BOARD_H__
 #define __BOARD_H__
 
 
-#include <rtthread.h>
 #include <stm32g4xx.h>
 #include <stm32g4xx.h>
-#include "drv_common.h"
-#include "drv_gpio.h"
 
 
 #define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
 #define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
 #define STM32_FLASH_SIZE             (128 * 1024)
 #define STM32_FLASH_SIZE             (128 * 1024)

+ 7 - 0
bsp/stm32/stm32g491-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32G491RE
+    bool
+    select SOC_SERIES_STM32G4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

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

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

@@ -8,7 +8,8 @@
  * 2023-12-04     Supperthomas First version
  * 2023-12-04     Supperthomas First version
  */
  */
 
 
-#include "board.h"
+#include <board.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

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

@@ -12,10 +12,7 @@
 #ifndef __BOARD_H__
 #ifndef __BOARD_H__
 #define __BOARD_H__
 #define __BOARD_H__
 
 
-#include <rtthread.h>
 #include <stm32g4xx.h>
 #include <stm32g4xx.h>
-#include "drv_common.h"
-#include "drv_gpio.h"
 
 
 #define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
 #define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
 #define STM32_FLASH_SIZE             (512 * 1024)
 #define STM32_FLASH_SIZE             (512 * 1024)

+ 7 - 0
bsp/stm32/stm32l010-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L010RB
+    bool
+    select SOC_SERIES_STM32L0
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L010RB
-    bool
-    select SOC_SERIES_STM32L0
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_USB_TO_USART
     config BSP_USING_USB_TO_USART

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

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

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

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

+ 7 - 0
bsp/stm32/stm32l053-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L053R8
+    bool
+    select SOC_SERIES_STM32L0
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L053R8
-    bool
-    select SOC_SERIES_STM32L0
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_USB_TO_USART
     config BSP_USING_USB_TO_USART

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

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

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

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

+ 7 - 0
bsp/stm32/stm32l412-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L412RB
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

@@ -6,11 +6,15 @@
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes
  * 2020-04-24     luhuadong    first version
  * 2020-04-24     luhuadong    first version
+ * 2023-12-03     Meco Man     support nano version
  */
  */
 
 
+#include <board.h>
 #include <rtthread.h>
 #include <rtthread.h>
+#include <drv_gpio.h>
+#ifndef RT_USING_NANO
 #include <rtdevice.h>
 #include <rtdevice.h>
-#include <board.h>
+#endif /* RT_USING_NANO */
 
 
 /* defined the LD4 pin: PB13 */
 /* defined the LD4 pin: PB13 */
 #define LD4_PIN    GET_PIN(B, 13)
 #define LD4_PIN    GET_PIN(B, 13)

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L412RB
-    bool
-    select SOC_SERIES_STM32L4
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
     config BSP_USING_STLINK_TO_USART
     config BSP_USING_STLINK_TO_USART
         bool "Enable STLINK TO USART (uart2)"
         bool "Enable STLINK TO USART (uart2)"

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

@@ -8,7 +8,8 @@
  * 2020-04-24     luhuadong    first version
  * 2020-04-24     luhuadong    first version
  */
  */
 
 
-#include "board.h"
+#include <board.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

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

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

+ 7 - 0
bsp/stm32/stm32l431-BearPi/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L431RC
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

+ 5 - 1
bsp/stm32/stm32l431-BearPi/applications/main.c

@@ -6,11 +6,15 @@
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes
  * 2019-01-11     RiceChen    first edition
  * 2019-01-11     RiceChen    first edition
+ * 2023-12-03     Meco Man     support nano version
  */
  */
 
 
+#include <board.h>
 #include <rtthread.h>
 #include <rtthread.h>
+#include <drv_gpio.h>
+#ifndef RT_USING_NANO
 #include <rtdevice.h>
 #include <rtdevice.h>
-#include <board.h>
+#endif /* RT_USING_NANO */
 
 
 /* defined the LED pin: PC13 */
 /* defined the LED pin: PC13 */
 #define LED0_PIN    GET_PIN(C, 13)
 #define LED0_PIN    GET_PIN(C, 13)

+ 0 - 7
bsp/stm32/stm32l431-BearPi/board/Kconfig

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L431RC
-    bool
-    select SOC_SERIES_STM32L4
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "On-chip Peripheral Drivers"
 menu "On-chip Peripheral Drivers"
 
 
     config BSP_USING_GPIO
     config BSP_USING_GPIO

+ 2 - 1
bsp/stm32/stm32l431-BearPi/board/board.c

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

+ 0 - 3
bsp/stm32/stm32l431-BearPi/board/board.h

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

+ 7 - 0
bsp/stm32/stm32l432-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L432KC
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L432KC
-    bool
-    select SOC_SERIES_STM32L4
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
     config BSP_USING_STLINK_TO_USART
     config BSP_USING_STLINK_TO_USART
         bool "Enable STLINK TO USART (uart2)"
         bool "Enable STLINK TO USART (uart2)"

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

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

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

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

+ 7 - 0
bsp/stm32/stm32l433-ali-startkit/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L433CC
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

+ 5 - 1
bsp/stm32/stm32l433-ali-startkit/applications/main.c

@@ -6,11 +6,15 @@
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes
  * 2021-12-05     supperthomas      first version
  * 2021-12-05     supperthomas      first version
+ * 2023-12-03     Meco Man     support nano version
  */
  */
 
 
+#include <board.h>
 #include <rtthread.h>
 #include <rtthread.h>
+#include <drv_gpio.h>
+#ifndef RT_USING_NANO
 #include <rtdevice.h>
 #include <rtdevice.h>
-#include <board.h>
+#endif /* RT_USING_NANO */
 
 
 #define LED1_PIN                       GET_PIN(B, 2)
 #define LED1_PIN                       GET_PIN(B, 2)
 int main(void)
 int main(void)

+ 0 - 7
bsp/stm32/stm32l433-ali-startkit/board/Kconfig

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L433CC
-    bool
-    select SOC_SERIES_STM32L4
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_STLINK_TO_USART
     config BSP_USING_STLINK_TO_USART

+ 1 - 0
bsp/stm32/stm32l433-ali-startkit/board/board.c

@@ -9,6 +9,7 @@
  */
  */
 
 
 #include <board.h>
 #include <board.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

+ 0 - 2
bsp/stm32/stm32l433-ali-startkit/board/board.h

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

+ 7 - 0
bsp/stm32/stm32l433-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L433RC
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

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

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

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

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

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

+ 7 - 0
bsp/stm32/stm32l452-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L452RE
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

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

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

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

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

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

+ 7 - 0
bsp/stm32/stm32l475-st-discovery/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L475VG
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

+ 5 - 1
bsp/stm32/stm32l475-st-discovery/applications/main.c

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

+ 0 - 7
bsp/stm32/stm32l475-st-discovery/board/Kconfig

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

+ 1 - 0
bsp/stm32/stm32l475-st-discovery/board/board.c

@@ -9,6 +9,7 @@
  */
  */
 
 
 #include <board.h>
 #include <board.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

+ 0 - 3
bsp/stm32/stm32l475-st-discovery/board/board.h

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

+ 7 - 0
bsp/stm32/stm32l476-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L476RG
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

+ 6 - 2
bsp/stm32/stm32l476-st-nucleo/applications/main.c

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

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L476RG
-    bool
-    select SOC_SERIES_STM32L4
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_STLINK_TO_USART
     config BSP_USING_STLINK_TO_USART

+ 2 - 0
bsp/stm32/stm32l476-st-nucleo/board/board.c

@@ -10,6 +10,8 @@
  */
  */
 
 
 #include <board.h>
 #include <board.h>
+#include <rtconfig.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

+ 1 - 3
bsp/stm32/stm32l476-st-nucleo/board/board.h

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

+ 7 - 0
bsp/stm32/stm32l496-ali-developer/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L496VG
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

+ 5 - 1
bsp/stm32/stm32l496-ali-developer/applications/main.c

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

+ 0 - 7
bsp/stm32/stm32l496-ali-developer/board/Kconfig

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L496VG
-    bool
-    select SOC_SERIES_STM32L4
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_STLINK_TO_USART
     config BSP_USING_STLINK_TO_USART

+ 1 - 0
bsp/stm32/stm32l496-ali-developer/board/board.c

@@ -9,6 +9,7 @@
  */
  */
 
 
 #include <board.h>
 #include <board.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

+ 0 - 2
bsp/stm32/stm32l496-ali-developer/board/board.h

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

+ 7 - 0
bsp/stm32/stm32l496-st-discovery/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L496AG
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

+ 5 - 1
bsp/stm32/stm32l496-st-discovery/applications/main.c

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

+ 0 - 7
bsp/stm32/stm32l496-st-discovery/board/Kconfig

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

+ 2 - 1
bsp/stm32/stm32l496-st-discovery/board/board.c

@@ -8,7 +8,8 @@
  * 2023-5-22     Rain Park   first version
  * 2023-5-22     Rain Park   first version
  */
  */
 
 
-#include "board.h"
+#include <board.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

+ 0 - 3
bsp/stm32/stm32l496-st-discovery/board/board.h

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

+ 7 - 0
bsp/stm32/stm32l496-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L496ZG
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

@@ -6,11 +6,15 @@
  * Change Logs:
  * Change Logs:
  * Date           Author       Notes
  * Date           Author       Notes
  * 2020-03-14     super_mcu    first version
  * 2020-03-14     super_mcu    first version
+ * 2023-12-03     Meco Man     support nano version
  */
  */
 
 
+#include <board.h>
 #include <rtthread.h>
 #include <rtthread.h>
+#include <drv_gpio.h>
+#ifndef RT_USING_NANO
 #include <rtdevice.h>
 #include <rtdevice.h>
-#include <board.h>
+#endif /* RT_USING_NANO */
 
 
 /* defined the LED2 pin: PB7 */
 /* defined the LED2 pin: PB7 */
 #define LED2_PIN    GET_PIN(B, 7)
 #define LED2_PIN    GET_PIN(B, 7)

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L496ZG
-    bool
-    select SOC_SERIES_STM32L4
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_STLINK_TO_USART
     config BSP_USING_STLINK_TO_USART

+ 1 - 1
bsp/stm32/stm32l496-st-nucleo/board/board.c

@@ -10,7 +10,7 @@
  */
  */
 
 
 #include <board.h>
 #include <board.h>
-#include <rtthread.h>
+#include <drv_common.h>
 
 
 void SystemClock_Config(void)
 void SystemClock_Config(void)
 {
 {

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

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

+ 7 - 0
bsp/stm32/stm32l4r5-st-nucleo/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L4R5ZI
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

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

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

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

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-    config SOC_STM32L4R5ZI
-        bool
-        select SOC_SERIES_STM32L4
-        select RT_USING_COMPONENTS_INIT
-        select RT_USING_USER_MAIN
-        default y
-
     menu "Onboard Peripheral Drivers"
     menu "Onboard Peripheral Drivers"
         config BSP_USING_STLINK_TO_USART
         config BSP_USING_STLINK_TO_USART
             bool "Enable STLINK TO USART (lpuart1)"
             bool "Enable STLINK TO USART (lpuart1)"

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

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

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

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

+ 7 - 0
bsp/stm32/stm32l4r9-st-eval/Kconfig

@@ -15,6 +15,13 @@ config PKGS_DIR
     option env="PKGS_ROOT"
     option env="PKGS_ROOT"
     default "packages"
     default "packages"
 
 
+config SOC_STM32L4R9AI
+    bool
+    select SOC_SERIES_STM32L4
+    select RT_USING_COMPONENTS_INIT
+    select RT_USING_USER_MAIN
+    default y
+
 source "$RTT_DIR/Kconfig"
 source "$RTT_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "$PKGS_DIR/Kconfig"
 source "../libraries/Kconfig"
 source "../libraries/Kconfig"

+ 6 - 3
bsp/stm32/stm32l4r9-st-eval/applications/main.c

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

+ 0 - 7
bsp/stm32/stm32l4r9-st-eval/board/Kconfig

@@ -1,12 +1,5 @@
 menu "Hardware Drivers Config"
 menu "Hardware Drivers Config"
 
 
-config SOC_STM32L4R9AI
-    bool
-    select SOC_SERIES_STM32L4
-    select RT_USING_COMPONENTS_INIT
-    select RT_USING_USER_MAIN
-    default y
-
 menu "Onboard Peripheral Drivers"
 menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_STLINK_TO_USART
     config BSP_USING_STLINK_TO_USART

+ 2 - 1
bsp/stm32/stm32l4r9-st-eval/board/board.c

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

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