diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_common.c b/bsp/stm32/libraries/HAL_Drivers/drv_common.c index f67a498a2621fbd1d1f73035205d76bffd94baf0..dda79c9d0356e1335afe7a65fd751ea3412f8038 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_common.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_common.c @@ -10,10 +10,6 @@ #include "drv_common.h" -#ifdef RT_USING_PIN -#include "drv_gpio.h" -#endif - #ifdef RT_USING_SERIAL #include "drv_usart.h" #endif diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_common.h b/bsp/stm32/libraries/HAL_Drivers/drv_common.h index 751305eb71dd670bd58a7e7059ffab8749ad5893..bffedddcd05c5feef25bfcdde051a82d3dfde04e 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_common.h +++ b/bsp/stm32/libraries/HAL_Drivers/drv_common.h @@ -14,7 +14,6 @@ #include #include #include -#include #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_dma.h b/bsp/stm32/libraries/HAL_Drivers/drv_dma.h index 719cf80310970b70ca1c8de3022027acf3d5f74d..99ccaac2fd21c531f7c095a116a1de93b26a6b38 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_dma.h +++ b/bsp/stm32/libraries/HAL_Drivers/drv_dma.h @@ -12,9 +12,7 @@ #define __DRV_DMA_H_ #include -#include "rtdevice.h" -#include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_lcd.c b/bsp/stm32/libraries/HAL_Drivers/drv_lcd.c index 42a3aab034b6a24e45c4ed25734d78b7d852df5b..3f6de0286f2685b3382102ba09851c366c858696 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_lcd.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_lcd.c @@ -8,14 +8,11 @@ * 2019-01-08 zylx first version */ -#include -#include #include #ifdef BSP_USING_LCD #include #include -#include "drv_gpio.h" //#define DRV_DEBUG #define LOG_TAG "drv.lcd" diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_sdram.c b/bsp/stm32/libraries/HAL_Drivers/drv_sdram.c index c5964a3fe0f15893879aa344ec98299b8fc07e0d..97731ff3b110cbba144b4462e3ccc566b115507c 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_sdram.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_sdram.c @@ -8,8 +8,6 @@ * 2018-12-04 zylx first version */ -#include -#include #include #ifdef BSP_USING_SDRAM diff --git a/bsp/stm32/libraries/templates/stm32f0xx/SConstruct b/bsp/stm32/libraries/templates/stm32f0xx/SConstruct index 1676e02b25506a8d75070e2feba2bdf55e0a4e90..c120f925df4ab8d990e5e95e2fe56b1d671a93b9 100644 --- a/bsp/stm32/libraries/templates/stm32f0xx/SConstruct +++ b/bsp/stm32/libraries/templates/stm32f0xx/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/libraries/templates/stm32f0xx/applications/main.c b/bsp/stm32/libraries/templates/stm32f0xx/applications/main.c index 5054699c0dca4c67aa5ffa382d294bae78b1b1ad..68a938bbeb010051552b4482eaa967539b60fc63 100644 --- a/bsp/stm32/libraries/templates/stm32f0xx/applications/main.c +++ b/bsp/stm32/libraries/templates/stm32f0xx/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PB1 */ #define LED0_PIN GET_PIN(B, 1) diff --git a/bsp/stm32/libraries/templates/stm32f0xx/board/board.h b/bsp/stm32/libraries/templates/stm32f0xx/board/board.h index 58ece4a7c51bfc246a20642a9e1264373bd973f1..4ebecd04bc18332974c1061ed9375104045d477c 100644 --- a/bsp/stm32/libraries/templates/stm32f0xx/board/board.h +++ b/bsp/stm32/libraries/templates/stm32f0xx/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/libraries/templates/stm32f10x/SConstruct b/bsp/stm32/libraries/templates/stm32f10x/SConstruct index c28354a99db6725b666ec6eee89d3d4100034b9d..05326b2b755fed11adc30f979ea01faf8bb5cfd6 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/SConstruct +++ b/bsp/stm32/libraries/templates/stm32f10x/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/libraries/templates/stm32f10x/applications/main.c b/bsp/stm32/libraries/templates/stm32f10x/applications/main.c index 7c40c1518d6acdcb55b460e866cfea6bc408c3f2..d5b11f5a95ddb0b6fa36917b1f0768eec1c33983 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/applications/main.c +++ b/bsp/stm32/libraries/templates/stm32f10x/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PB1 */ #define LED0_PIN GET_PIN(B, 1) diff --git a/bsp/stm32/libraries/templates/stm32f10x/board/board.h b/bsp/stm32/libraries/templates/stm32f10x/board/board.h index 3613a683fcf3d4ac2b708e013bf9ca3b91718955..a6a0d6bd4f507e0c3e8dc8afe9de74f93931680f 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/board/board.h +++ b/bsp/stm32/libraries/templates/stm32f10x/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/libraries/templates/stm32f4xx/SConstruct b/bsp/stm32/libraries/templates/stm32f4xx/SConstruct index c1609bf526ab010946758d14981ddea9895a234b..1101c708bdc865d6c4825b93e872b4b485798261 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/SConstruct +++ b/bsp/stm32/libraries/templates/stm32f4xx/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/libraries/templates/stm32f4xx/applications/main.c b/bsp/stm32/libraries/templates/stm32f4xx/applications/main.c index 7c40c1518d6acdcb55b460e866cfea6bc408c3f2..d5b11f5a95ddb0b6fa36917b1f0768eec1c33983 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/applications/main.c +++ b/bsp/stm32/libraries/templates/stm32f4xx/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PB1 */ #define LED0_PIN GET_PIN(B, 1) diff --git a/bsp/stm32/libraries/templates/stm32f4xx/board/board.h b/bsp/stm32/libraries/templates/stm32f4xx/board/board.h index 77a3f20d0d1f85139795ec06973e92a392d499e5..3170398e8e3a0717e5c6e107452c3f80b634c706 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/board/board.h +++ b/bsp/stm32/libraries/templates/stm32f4xx/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/libraries/templates/stm32f7xx/SConstruct b/bsp/stm32/libraries/templates/stm32f7xx/SConstruct index 51333e0a9c574167b434251d83483ae160fbb9f4..b6053d64c214908969ed5d0416a4ea9167e9f4a1 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/SConstruct +++ b/bsp/stm32/libraries/templates/stm32f7xx/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/libraries/templates/stm32f7xx/board/board.h b/bsp/stm32/libraries/templates/stm32f7xx/board/board.h index e9c060842358272df4aabc86f8dd9e7d6f799e2e..5870c0ba7101ca6c463286b197c682bfee80c3ba 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/board/board.h +++ b/bsp/stm32/libraries/templates/stm32f7xx/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/libraries/templates/stm32l4xx/SConstruct b/bsp/stm32/libraries/templates/stm32l4xx/SConstruct index f28e552248cc6440b75fab3602942439f10563c9..e1989a9d815bbffd7e87d257337ad83e6e487ff4 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/SConstruct +++ b/bsp/stm32/libraries/templates/stm32l4xx/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/libraries/templates/stm32l4xx/applications/main.c b/bsp/stm32/libraries/templates/stm32l4xx/applications/main.c index 7c40c1518d6acdcb55b460e866cfea6bc408c3f2..d5b11f5a95ddb0b6fa36917b1f0768eec1c33983 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/applications/main.c +++ b/bsp/stm32/libraries/templates/stm32l4xx/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PB1 */ #define LED0_PIN GET_PIN(B, 1) diff --git a/bsp/stm32/libraries/templates/stm32l4xx/board/board.h b/bsp/stm32/libraries/templates/stm32l4xx/board/board.h index e90a5ecb73c78be73f4bfcb2470cbfbd6c1061ae..b8c4f1c01bc3aec69d98df5bff0104df1b3c5b3b 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/board/board.h +++ b/bsp/stm32/libraries/templates/stm32l4xx/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f091-st-nucleo/SConstruct b/bsp/stm32/stm32f091-st-nucleo/SConstruct index 1676e02b25506a8d75070e2feba2bdf55e0a4e90..c120f925df4ab8d990e5e95e2fe56b1d671a93b9 100644 --- a/bsp/stm32/stm32f091-st-nucleo/SConstruct +++ b/bsp/stm32/stm32f091-st-nucleo/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f091-st-nucleo/board/board.h b/bsp/stm32/stm32f091-st-nucleo/board/board.h index db0fa551623078c213e5ae63b21b28c4a50df969..09f9b327532b7a4e1217027495261738df6f18b5 100644 --- a/bsp/stm32/stm32f091-st-nucleo/board/board.h +++ b/bsp/stm32/stm32f091-st-nucleo/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f103-atk-nano/SConstruct b/bsp/stm32/stm32f103-atk-nano/SConstruct index c28354a99db6725b666ec6eee89d3d4100034b9d..05326b2b755fed11adc30f979ea01faf8bb5cfd6 100644 --- a/bsp/stm32/stm32f103-atk-nano/SConstruct +++ b/bsp/stm32/stm32f103-atk-nano/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f103-atk-nano/applications/main.c b/bsp/stm32/stm32f103-atk-nano/applications/main.c index e5b96d8280e0ffa381b53a1d2bcc29389358c139..ee8d9456050b4b444b0dd48dd0a40ee22ade656d 100644 --- a/bsp/stm32/stm32f103-atk-nano/applications/main.c +++ b/bsp/stm32/stm32f103-atk-nano/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PC0 */ #define LED0_PIN GET_PIN(C, 0) diff --git a/bsp/stm32/stm32f103-atk-nano/board/board.h b/bsp/stm32/stm32f103-atk-nano/board/board.h index 3613a683fcf3d4ac2b708e013bf9ca3b91718955..3598755cba1c458c972c034f4d21a2133c893721 100644 --- a/bsp/stm32/stm32f103-atk-nano/board/board.h +++ b/bsp/stm32/stm32f103-atk-nano/board/board.h @@ -11,9 +11,9 @@ #ifndef __BOARD_H__ #define __BOARD_H__ -#include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f103-fire-arbitrary/SConstruct b/bsp/stm32/stm32f103-fire-arbitrary/SConstruct index c28354a99db6725b666ec6eee89d3d4100034b9d..05326b2b755fed11adc30f979ea01faf8bb5cfd6 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/SConstruct +++ b/bsp/stm32/stm32f103-fire-arbitrary/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f103-fire-arbitrary/applications/main.c b/bsp/stm32/stm32f103-fire-arbitrary/applications/main.c index 4024c1ae3fa69b2018bcafe8e42cbe5f79470ccb..8d24c605fb2c07ab293e4e129bc5df4f8daec206 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/applications/main.c +++ b/bsp/stm32/stm32f103-fire-arbitrary/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PF7 */ #define LED0_PIN GET_PIN(F, 7) diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/board.h b/bsp/stm32/stm32f103-fire-arbitrary/board/board.h index 02ab04f8a02d7ed79927f55b34e8a4c7dc49410e..8e5df423e47fd433653efd4f36c0b3d66159ee2b 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/board.h +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f103-hw100k-ibox/SConstruct b/bsp/stm32/stm32f103-hw100k-ibox/SConstruct index c28354a99db6725b666ec6eee89d3d4100034b9d..05326b2b755fed11adc30f979ea01faf8bb5cfd6 100644 --- a/bsp/stm32/stm32f103-hw100k-ibox/SConstruct +++ b/bsp/stm32/stm32f103-hw100k-ibox/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f103-hw100k-ibox/applications/main.c b/bsp/stm32/stm32f103-hw100k-ibox/applications/main.c index 78265f712e5b5392691ffe0ccbec591b5f7d0543..126934d768e8363e507494f9085c1db141874b02 100644 --- a/bsp/stm32/stm32f103-hw100k-ibox/applications/main.c +++ b/bsp/stm32/stm32f103-hw100k-ibox/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PE9 */ #define LED0_PIN GET_PIN(E, 9) diff --git a/bsp/stm32/stm32f103-hw100k-ibox/board/board.h b/bsp/stm32/stm32f103-hw100k-ibox/board/board.h index 10cf07b635fc69e7bced0b77b2e475fff343bbf2..7ce08649d341883272abe11a40e996331d71593c 100644 --- a/bsp/stm32/stm32f103-hw100k-ibox/board/board.h +++ b/bsp/stm32/stm32f103-hw100k-ibox/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f407-atk-explorer/SConstruct b/bsp/stm32/stm32f407-atk-explorer/SConstruct index c1609bf526ab010946758d14981ddea9895a234b..1101c708bdc865d6c4825b93e872b4b485798261 100644 --- a/bsp/stm32/stm32f407-atk-explorer/SConstruct +++ b/bsp/stm32/stm32f407-atk-explorer/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f407-atk-explorer/applications/main.c b/bsp/stm32/stm32f407-atk-explorer/applications/main.c index b7bd6a12490e5bf9f80ac16ed3d2cd85f006caa3..ac192c83b1aae29681cb2235876d262f98aa7274 100644 --- a/bsp/stm32/stm32f407-atk-explorer/applications/main.c +++ b/bsp/stm32/stm32f407-atk-explorer/applications/main.c @@ -12,7 +12,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PF9 */ #define LED0_PIN GET_PIN(F, 9) diff --git a/bsp/stm32/stm32f407-atk-explorer/board/board.h b/bsp/stm32/stm32f407-atk-explorer/board/board.h index 10766c2682cf82fc3f881bc1d39071cf9a89585f..2d3f256119e7aa77a2326ad339074e739897cd4b 100644 --- a/bsp/stm32/stm32f407-atk-explorer/board/board.h +++ b/bsp/stm32/stm32f407-atk-explorer/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f407-st-discovery/SConstruct b/bsp/stm32/stm32f407-st-discovery/SConstruct index 8ecf112e9cfe6fcf5b5731beb9ea1f4ab5b01c85..f80a225c3b0ae44b8bae1ee575b59d0966dccc51 100644 --- a/bsp/stm32/stm32f407-st-discovery/SConstruct +++ b/bsp/stm32/stm32f407-st-discovery/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rtthread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f407-st-discovery/applications/main.c b/bsp/stm32/stm32f407-st-discovery/applications/main.c index 26a0e4ab1a39eebfbf0e6147e93e8ab84f7a34c9..c7ffc240cbf91100e38e147482801a3fe07ee58b 100644 --- a/bsp/stm32/stm32f407-st-discovery/applications/main.c +++ b/bsp/stm32/stm32f407-st-discovery/applications/main.c @@ -11,7 +11,6 @@ #include #include #include -#include "drv_gpio.h" /* defined the LED0 pin: PD14 */ #define LED0_PIN GET_PIN(D, 14) diff --git a/bsp/stm32/stm32f407-st-discovery/board/board.h b/bsp/stm32/stm32f407-st-discovery/board/board.h index da32925c91196f8a1f7cab8bc262f7c07d414077..3e8eb823e06302ab174ddfa0dccd9ca691265ed1 100644 --- a/bsp/stm32/stm32f407-st-discovery/board/board.h +++ b/bsp/stm32/stm32f407-st-discovery/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f411-st-nucleo/SConstruct b/bsp/stm32/stm32f411-st-nucleo/SConstruct index 8ecf112e9cfe6fcf5b5731beb9ea1f4ab5b01c85..f80a225c3b0ae44b8bae1ee575b59d0966dccc51 100644 --- a/bsp/stm32/stm32f411-st-nucleo/SConstruct +++ b/bsp/stm32/stm32f411-st-nucleo/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rtthread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f411-st-nucleo/applications/main.c b/bsp/stm32/stm32f411-st-nucleo/applications/main.c index 5e963c636dbed2765da30d604e2c76357ffdaad2..2745fa7b8b1626e3fbf29ed6fd88128a26dbc2a7 100644 --- a/bsp/stm32/stm32f411-st-nucleo/applications/main.c +++ b/bsp/stm32/stm32f411-st-nucleo/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PA5 */ #define LED0_PIN GET_PIN(A, 5) diff --git a/bsp/stm32/stm32f411-st-nucleo/board/board.h b/bsp/stm32/stm32f411-st-nucleo/board/board.h index 24269ebc2c77861298dab39409ca3c0fa54726b6..ad9cedaff02d4b58a2fa47e646a069827a8e257f 100644 --- a/bsp/stm32/stm32f411-st-nucleo/board/board.h +++ b/bsp/stm32/stm32f411-st-nucleo/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f429-armfly-v6/SConstruct b/bsp/stm32/stm32f429-armfly-v6/SConstruct index c1609bf526ab010946758d14981ddea9895a234b..1101c708bdc865d6c4825b93e872b4b485798261 100644 --- a/bsp/stm32/stm32f429-armfly-v6/SConstruct +++ b/bsp/stm32/stm32f429-armfly-v6/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f429-armfly-v6/board/board.h b/bsp/stm32/stm32f429-armfly-v6/board/board.h index 816b460a65cc2bea3be5bb5857e054ef0580bebc..f0ea803bb0b6b26d7c2a64a0dd14acc469347003 100644 --- a/bsp/stm32/stm32f429-armfly-v6/board/board.h +++ b/bsp/stm32/stm32f429-armfly-v6/board/board.h @@ -14,15 +14,12 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { #endif -#ifdef BSP_USING_GPIO -#include "drv_gpio.h" -#endif - #define STM32_SRAM_SIZE (192) #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024) diff --git a/bsp/stm32/stm32f429-atk-apollo/SConstruct b/bsp/stm32/stm32f429-atk-apollo/SConstruct index c1609bf526ab010946758d14981ddea9895a234b..1101c708bdc865d6c4825b93e872b4b485798261 100644 --- a/bsp/stm32/stm32f429-atk-apollo/SConstruct +++ b/bsp/stm32/stm32f429-atk-apollo/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f429-atk-apollo/applications/main.c b/bsp/stm32/stm32f429-atk-apollo/applications/main.c index 7c40c1518d6acdcb55b460e866cfea6bc408c3f2..d5b11f5a95ddb0b6fa36917b1f0768eec1c33983 100644 --- a/bsp/stm32/stm32f429-atk-apollo/applications/main.c +++ b/bsp/stm32/stm32f429-atk-apollo/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PB1 */ #define LED0_PIN GET_PIN(B, 1) diff --git a/bsp/stm32/stm32f429-atk-apollo/board/board.h b/bsp/stm32/stm32f429-atk-apollo/board/board.h index 7e8c6cfd9ec6e929014ad1e6a7e0e56f898d4d53..29f0e8a829b3b3bc6b9ef1c3d0abae071a29d759 100644 --- a/bsp/stm32/stm32f429-atk-apollo/board/board.h +++ b/bsp/stm32/stm32f429-atk-apollo/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f429-fire-challenger/SConstruct b/bsp/stm32/stm32f429-fire-challenger/SConstruct index c1609bf526ab010946758d14981ddea9895a234b..1101c708bdc865d6c4825b93e872b4b485798261 100644 --- a/bsp/stm32/stm32f429-fire-challenger/SConstruct +++ b/bsp/stm32/stm32f429-fire-challenger/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f429-fire-challenger/applications/main.c b/bsp/stm32/stm32f429-fire-challenger/applications/main.c index cee539b0832921b51d86455fcf7d321123a2d146..da0c169793130e5b79837a2e46b2d8f7be73e6ae 100644 --- a/bsp/stm32/stm32f429-fire-challenger/applications/main.c +++ b/bsp/stm32/stm32f429-fire-challenger/applications/main.c @@ -12,7 +12,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PH10 */ #define LED0_PIN GET_PIN(H, 10) diff --git a/bsp/stm32/stm32f429-fire-challenger/board/board.h b/bsp/stm32/stm32f429-fire-challenger/board/board.h index 8e1611eb7de7ee49557a40e9130ca4d0ee180eb7..03a2235f10e95eadbee30496f8d6c88bb60ef78e 100644 --- a/bsp/stm32/stm32f429-fire-challenger/board/board.h +++ b/bsp/stm32/stm32f429-fire-challenger/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f446-st-nucleo/SConstruct b/bsp/stm32/stm32f446-st-nucleo/SConstruct index c1609bf526ab010946758d14981ddea9895a234b..1101c708bdc865d6c4825b93e872b4b485798261 100644 --- a/bsp/stm32/stm32f446-st-nucleo/SConstruct +++ b/bsp/stm32/stm32f446-st-nucleo/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f446-st-nucleo/applications/main.c b/bsp/stm32/stm32f446-st-nucleo/applications/main.c index 20fa5347c0770b42c4bad3d10d4a42fa35ba8530..6559f1b50ce9a63265e7284ecb68d42fca4cda43 100644 --- a/bsp/stm32/stm32f446-st-nucleo/applications/main.c +++ b/bsp/stm32/stm32f446-st-nucleo/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED2 pin: PB7 */ #define LED2_PIN GET_PIN(B, 7) diff --git a/bsp/stm32/stm32f446-st-nucleo/board/board.h b/bsp/stm32/stm32f446-st-nucleo/board/board.h index bd9c494412772a4d5287c1c20bdfd1e3c153f7de..ec57a2f53bc791f77f779eaac574e262306ea555 100644 --- a/bsp/stm32/stm32f446-st-nucleo/board/board.h +++ b/bsp/stm32/stm32f446-st-nucleo/board/board.h @@ -15,6 +15,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000) #define STM32_FLASH_SIZE (512 * 1024) diff --git a/bsp/stm32/stm32f746-st-disco/SConstruct b/bsp/stm32/stm32f746-st-disco/SConstruct index 51333e0a9c574167b434251d83483ae160fbb9f4..b6053d64c214908969ed5d0416a4ea9167e9f4a1 100644 --- a/bsp/stm32/stm32f746-st-disco/SConstruct +++ b/bsp/stm32/stm32f746-st-disco/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f746-st-disco/applications/main.c b/bsp/stm32/stm32f746-st-disco/applications/main.c index ac6b12ff9e1268cfab0cf564e3b862a8d42f1044..669d889e5820fb1885ae39af7ecb67127ae5a203 100644 --- a/bsp/stm32/stm32f746-st-disco/applications/main.c +++ b/bsp/stm32/stm32f746-st-disco/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED1 pin: PI1 */ #define LED1_PIN GET_PIN(I, 1) diff --git a/bsp/stm32/stm32f746-st-disco/board/board.h b/bsp/stm32/stm32f746-st-disco/board/board.h index e8f5a1a96cb46f4086e9becf3a21f903484d02bd..98e3799e00d87d230b2f4a7e9b9ea8b0c0d3e115 100644 --- a/bsp/stm32/stm32f746-st-disco/board/board.h +++ b/bsp/stm32/stm32f746-st-disco/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000) #define STM32_FLASH_SIZE (1024 * 1024) diff --git a/bsp/stm32/stm32f767-atk-apollo/SConstruct b/bsp/stm32/stm32f767-atk-apollo/SConstruct index 20047ade781977ff5cc36717eaea4e03e01cddf3..dd77b5c1d3d8763d578147c3f3233bdab16e056c 100644 --- a/bsp/stm32/stm32f767-atk-apollo/SConstruct +++ b/bsp/stm32/stm32f767-atk-apollo/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f767-atk-apollo/applications/main.c b/bsp/stm32/stm32f767-atk-apollo/applications/main.c index 827c705f435ad224a9d74b8832e8a26a3a973c9d..7d7440f05c5a74c3a7ed83e319ccc10f7de1e104 100644 --- a/bsp/stm32/stm32f767-atk-apollo/applications/main.c +++ b/bsp/stm32/stm32f767-atk-apollo/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PB1 */ #define LED0_PIN GET_PIN(B, 1) diff --git a/bsp/stm32/stm32f767-atk-apollo/board/board.h b/bsp/stm32/stm32f767-atk-apollo/board/board.h index 7cd0f1b795f9afe77662204afe7c1a3b18ed6709..af2746bfeb034bb8521c835a0e4e6d63788e0a86 100644 --- a/bsp/stm32/stm32f767-atk-apollo/board/board.h +++ b/bsp/stm32/stm32f767-atk-apollo/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f767-fire-challenger/SConstruct b/bsp/stm32/stm32f767-fire-challenger/SConstruct index 20047ade781977ff5cc36717eaea4e03e01cddf3..dd77b5c1d3d8763d578147c3f3233bdab16e056c 100644 --- a/bsp/stm32/stm32f767-fire-challenger/SConstruct +++ b/bsp/stm32/stm32f767-fire-challenger/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f767-fire-challenger/applications/main.c b/bsp/stm32/stm32f767-fire-challenger/applications/main.c index 2f385a7c680dde25beefb0dccaf63699812585e8..4c6e5ddea594bef941d8dc8ac22e362b1dc27f01 100644 --- a/bsp/stm32/stm32f767-fire-challenger/applications/main.c +++ b/bsp/stm32/stm32f767-fire-challenger/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PH10 */ #define LED0_PIN GET_PIN(H, 10) diff --git a/bsp/stm32/stm32f767-fire-challenger/board/board.h b/bsp/stm32/stm32f767-fire-challenger/board/board.h index dd86a886d2d32eac03a5891d32cf476a955fce3d..fc3b8c86a9a87bee87eadf4da8fd568c52d9119d 100644 --- a/bsp/stm32/stm32f767-fire-challenger/board/board.h +++ b/bsp/stm32/stm32f767-fire-challenger/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32f767-st-nucleo/SConstruct b/bsp/stm32/stm32f767-st-nucleo/SConstruct index c84dbe3bddb326ab001e7b15373800c2b88295c2..73810718fb0d038ba10cec0f9f6aa1173a351c3a 100644 --- a/bsp/stm32/stm32f767-st-nucleo/SConstruct +++ b/bsp/stm32/stm32f767-st-nucleo/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32f767-st-nucleo/applications/main.c b/bsp/stm32/stm32f767-st-nucleo/applications/main.c index b627e5440c7244926eb723425543e45170887863..3a6d169faaa0b416fb9b8574c22a4b74ad121cbc 100644 --- a/bsp/stm32/stm32f767-st-nucleo/applications/main.c +++ b/bsp/stm32/stm32f767-st-nucleo/applications/main.c @@ -1,35 +1,34 @@ -/* - * Copyright (c) 2006-2018, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2018-11-06 SummerGift change to new framework - * 2019-1-10 e31207077 change to new framework - */ - -#include -#include -#include -#include "drv_gpio.h" - -/* defined the LED1 pin: PB0 */ -#define LED1_PIN GET_PIN(B, 0) - -int main(void) -{ - int count = 1; - /* set LED1 pin mode to output */ - rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); - - while (count++) - { - rt_pin_write(LED1_PIN, PIN_HIGH); - rt_thread_mdelay(500); - rt_pin_write(LED1_PIN, PIN_LOW); - rt_thread_mdelay(500); - } - - return RT_EOK; -} +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2018-11-06 SummerGift change to new framework + * 2019-1-10 e31207077 change to new framework + */ + +#include +#include +#include + +/* defined the LED1 pin: PB0 */ +#define LED1_PIN GET_PIN(B, 0) + +int main(void) +{ + int count = 1; + /* set LED1 pin mode to output */ + rt_pin_mode(LED1_PIN, PIN_MODE_OUTPUT); + + while (count++) + { + rt_pin_write(LED1_PIN, PIN_HIGH); + rt_thread_mdelay(500); + rt_pin_write(LED1_PIN, PIN_LOW); + rt_thread_mdelay(500); + } + + return RT_EOK; +} diff --git a/bsp/stm32/stm32f767-st-nucleo/board/board.h b/bsp/stm32/stm32f767-st-nucleo/board/board.h index 6ac957bc8d010a39117c604065810acd028f9222..3254264e9c043d7ce7900a0f291f9d2a16e30fd1 100644 --- a/bsp/stm32/stm32f767-st-nucleo/board/board.h +++ b/bsp/stm32/stm32f767-st-nucleo/board/board.h @@ -1,41 +1,42 @@ -/* - * Copyright (c) 2006-2018, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2018-11-5 SummerGift change to new framework - * 2019-1-10 e31207077 change to new framework - */ - -#ifndef __BOARD_H__ -#define __BOARD_H__ - -#include -#include -#include "drv_common.h" - -#define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000) -#define STM32_FLASH_SIZE (2048 * 1024) -#define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE)) - -#define STM32_SRAM_SIZE (512) -#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 HEAP_END STM32_SRAM_END - -void SystemClock_Config(void); - -#endif +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2018-11-5 SummerGift change to new framework + * 2019-1-10 e31207077 change to new framework + */ + +#ifndef __BOARD_H__ +#define __BOARD_H__ + +#include +#include +#include "drv_common.h" +#include "drv_gpio.h" + +#define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000) +#define STM32_FLASH_SIZE (2048 * 1024) +#define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE)) + +#define STM32_SRAM_SIZE (512) +#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 HEAP_END STM32_SRAM_END + +void SystemClock_Config(void); + +#endif diff --git a/bsp/stm32/stm32l432-st-nucleo/SConstruct b/bsp/stm32/stm32l432-st-nucleo/SConstruct index f28e552248cc6440b75fab3602942439f10563c9..e1989a9d815bbffd7e87d257337ad83e6e487ff4 100644 --- a/bsp/stm32/stm32l432-st-nucleo/SConstruct +++ b/bsp/stm32/stm32l432-st-nucleo/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32l432-st-nucleo/applications/main.c b/bsp/stm32/stm32l432-st-nucleo/applications/main.c index 50f76b2e87687845b6c04b27924d5d8796702562..e1755ec81ebaa24f6f05246590ab1e5bb10a26b4 100644 --- a/bsp/stm32/stm32l432-st-nucleo/applications/main.c +++ b/bsp/stm32/stm32l432-st-nucleo/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PB3 */ #define LED0_PIN GET_PIN(B, 3) diff --git a/bsp/stm32/stm32l432-st-nucleo/board/board.h b/bsp/stm32/stm32l432-st-nucleo/board/board.h index e2f50c33d8cc40de313bcffd7b583e3860c7a01a..5132b9654965b8ca1000bb0c155d8ea180eab8e6 100644 --- a/bsp/stm32/stm32l432-st-nucleo/board/board.h +++ b/bsp/stm32/stm32l432-st-nucleo/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" { diff --git a/bsp/stm32/stm32l475-atk-pandora/SConstruct b/bsp/stm32/stm32l475-atk-pandora/SConstruct index f28e552248cc6440b75fab3602942439f10563c9..e1989a9d815bbffd7e87d257337ad83e6e487ff4 100644 --- a/bsp/stm32/stm32l475-atk-pandora/SConstruct +++ b/bsp/stm32/stm32l475-atk-pandora/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/stm32/stm32l475-atk-pandora/applications/main.c b/bsp/stm32/stm32l475-atk-pandora/applications/main.c index 208dd4525f2d6cb3547e6226a42ba276f75ddafc..3c9af880b2f02b1c72228964831b27f4e9f9c7ad 100644 --- a/bsp/stm32/stm32l475-atk-pandora/applications/main.c +++ b/bsp/stm32/stm32l475-atk-pandora/applications/main.c @@ -11,7 +11,7 @@ #include #include #include -#include "drv_gpio.h" + /* defined the LED0 pin: PE7 */ #define LED0_PIN GET_PIN(E, 7) diff --git a/bsp/stm32/stm32l475-atk-pandora/board/board.h b/bsp/stm32/stm32l475-atk-pandora/board/board.h index e90a5ecb73c78be73f4bfcb2470cbfbd6c1061ae..b8c4f1c01bc3aec69d98df5bff0104df1b3c5b3b 100644 --- a/bsp/stm32/stm32l475-atk-pandora/board/board.h +++ b/bsp/stm32/stm32l475-atk-pandora/board/board.h @@ -14,6 +14,7 @@ #include #include #include "drv_common.h" +#include "drv_gpio.h" #ifdef __cplusplus extern "C" {