Browse Source

[bsp][stm32] update template

SummerGift 6 years ago
parent
commit
79cb96bc9e

+ 7 - 1
bsp/stm32/libraries/templates/stm32f0xx/board/SConscript

@@ -23,7 +23,13 @@ elif rtconfig.CROSS_TOOL == 'keil':
     src += [startup_path_prefix + '/STM32F0xx_HAL/CMSIS/Device/ST/STM32F0xx/Source/Templates/arm/startup_stm32f091xc.s']
 elif rtconfig.CROSS_TOOL == 'iar':
     src += [startup_path_prefix + '/STM32F0xx_HAL/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/startup_stm32f091xc.s']
-    
+
+# STM32F030x6 || STM32F030x8 || STM32F031x6
+# STM32F038xx || STM32F042x6 || STM32F048xx
+# STM32F070x6 || STM32F051x8 || STM32F058xx
+# STM32F071xB || STM32F072xB || STM32F078xx
+# STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
+# You can select chips from the list above
 CPPDEFINES = ['STM32F091xC']
 group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
 Return('group')

+ 4 - 0
bsp/stm32/libraries/templates/stm32f0xx/board/board.h

@@ -15,6 +15,10 @@
 #include <stm32f0xx.h>
 #include "drv_common.h"
 
+#define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
+#define STM32_FLASH_SIZE             (256 * 1024)
+#define STM32_FLASH_END_ADDRESS      ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
+
 /* Internal SRAM memory size[Kbytes] <8-64>, Default: 64*/
 #define STM32_SRAM_SIZE      32
 #define STM32_SRAM_END       (0x20000000 + STM32_SRAM_SIZE * 1024)

+ 7 - 1
bsp/stm32/libraries/templates/stm32f10x/board/SConscript

@@ -23,7 +23,13 @@ elif rtconfig.CROSS_TOOL == 'keil':
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/startup_stm32f103xb.s']
 elif rtconfig.CROSS_TOOL == 'iar':
     src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xb.s']
-    
+
+# STM32F100xB || STM32F100xE || STM32F101x6
+# STM32F101xB || STM32F101xE || STM32F101xG
+# STM32F102x6 || STM32F102xB || STM32F103x6
+# STM32F103xB || STM32F103xE || STM32F103xG
+# STM32F105xC || STM32F107xC)
+# You can select chips from the list above
 CPPDEFINES = ['STM32F103xB']
 group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
 Return('group')

+ 4 - 0
bsp/stm32/libraries/templates/stm32f10x/board/board.h

@@ -15,6 +15,10 @@
 #include <stm32f1xx.h>
 #include "drv_common.h"
 
+#define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
+#define STM32_FLASH_SIZE             (128 * 1024)
+#define STM32_FLASH_END_ADDRESS      ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
+
 /* Internal SRAM memory size[Kbytes] <8-64>, Default: 64*/
 #define STM32_SRAM_SIZE      20
 #define STM32_SRAM_END       (0x20000000 + STM32_SRAM_SIZE * 1024)

+ 7 - 0
bsp/stm32/libraries/templates/stm32f4xx/board/SConscript

@@ -24,6 +24,13 @@ elif rtconfig.CROSS_TOOL == 'keil':
 elif rtconfig.CROSS_TOOL == 'iar':
     src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f407xx.s']
 
+# STM32F405xx) || STM32F415xx) || STM32F407xx) || STM32F417xx)
+# STM32F427xx) || STM32F437xx) || STM32F429xx) || STM32F439xx)
+# STM32F401xC) || STM32F401xE) || STM32F410Tx) || STM32F410Cx)
+# STM32F410Rx) || STM32F411xE) || STM32F446xx) || STM32F469xx)
+# STM32F479xx) || STM32F412Cx) || STM32F412Rx) || STM32F412Vx)
+# STM32F412Zx) || STM32F413xx) || STM32F423xx)
+# You can select chips from the list above
 CPPDEFINES = ['STM32F407xx']
 group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
 

+ 4 - 0
bsp/stm32/libraries/templates/stm32f4xx/board/board.h

@@ -15,6 +15,10 @@
 #include <stm32f4xx.h>
 #include "drv_common.h"
 
+#define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
+#define STM32_FLASH_SIZE             (1024 * 1024)
+#define STM32_FLASH_END_ADDRESS      ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
+
 #define STM32_SRAM_SIZE           128
 #define STM32_SRAM_END            (0x20000000 + STM32_SRAM_SIZE * 1024)
 

+ 4 - 0
bsp/stm32/libraries/templates/stm32f7xx/board/SConscript

@@ -17,6 +17,10 @@ elif rtconfig.CROSS_TOOL == 'keil':
 elif rtconfig.CROSS_TOOL == 'iar':
     src += [cwd + '/../../libraries/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/iar/startup_stm32f767xx.s']
 
+# STM32F756xx || STM32F746xx || STM32F745xx || STM32F767xx  || 
+# STM32F769xx || STM32F777xx || STM32F779xx || STM32F722xx  || 
+# STM32F723xx || STM32F732xx || STM32F733xx || STM32F730xx  || STM32F750xx
+# You can select chips from the list above
 CPPDEFINES = ['STM32F767xx']
 group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
 

+ 4 - 3
bsp/stm32/libraries/templates/stm32f7xx/board/board.h

@@ -15,9 +15,11 @@
 #include <stm32f7xx.h>
 #include "drv_common.h"
 
-#ifdef BSP_USING_GPIO
+#define STM32_FLASH_START_ADRESS     ((uint32_t)0x08000000)
+#define STM32_FLASH_SIZE             (1024 * 1024)
+#define STM32_FLASH_END_ADDRESS      ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
 
-#define STM32_SRAM_SIZE           256
+#define STM32_SRAM_SIZE           (512)
 #define STM32_SRAM_END            (0x20000000 + STM32_SRAM_SIZE * 1024)
 
 #if defined(__CC_ARM) || defined(__CLANG_ARM)
@@ -36,4 +38,3 @@ extern int __bss_end;
 void SystemClock_Config(void);
 
 #endif
-

+ 9 - 0
bsp/stm32/libraries/templates/stm32l4xx/board/SConscript

@@ -24,6 +24,15 @@ elif rtconfig.CROSS_TOOL == 'keil':
 elif rtconfig.CROSS_TOOL == 'iar':
     src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l475xx.s']
 
+# STM32L412xx || STM32L422xx || STM32L431xx
+# STM32L432xx || STM32L433xx || STM32L442xx
+# STM32L443xx || STM32L451xx || STM32L452xx
+# STM32L462xx || STM32L471xx || STM32L475xx
+# STM32L476xx || STM32L485xx || STM32L486xx
+# STM32L496xx || STM32L4A6xx || STM32L4R5xx
+# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx
+# STM32L4S7xx || STM32L4S9xx
+# You can select chips from the list above	
 CPPDEFINES = ['STM32L475xx']
 group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
 

+ 10 - 14
bsp/stm32/libraries/templates/stm32l4xx/board/board.h

@@ -15,22 +15,18 @@
 #include <stm32l4xx.h>
 #include "drv_common.h"
 
-#define STM32_SRAM_SIZE         96
-#define STM32_SRAM_END          (0x20000000 + STM32_SRAM_SIZE * 1024)
-
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
-extern int Image$$RW_IRAM1$$ZI$$Limit;
-#define HEAP_BEGIN      (&Image$$RW_IRAM1$$ZI$$Limit)
-#elif __ICCARM__
-#pragma section="CSTACK"
-#define HEAP_BEGIN      (__segment_end("CSTACK"))
-#else
-extern int __bss_end;
-#define HEAP_BEGIN      (&__bss_end)
-#endif
+#define STM32_FLASH_START_ADRESS       ((uint32_t)0x08000000)
+#define STM32_FLASH_SIZE               (512 * 1024)
+#define STM32_FLASH_END_ADDRESS        ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
+
+#define STM32_SRAM1_SIZE               (96)
+#define STM32_SRAM1_START              (0x20000000)
+#define STM32_SRAM1_END                (STM32_SRAM1_START + STM32_SRAM1_SIZE * 1024)
 
-#define HEAP_END        STM32_SRAM_END
+#define HEAP_BEGIN                     STM32_SRAM1_START
+#define HEAP_END                       STM32_SRAM1_END
 
 void SystemClock_Config(void);
 
 #endif
+