提交 3b472cb3 编写于 作者: S SummerGift

[bsp][stm32] optimize stm32 headfile

上级 bef1d557
...@@ -10,10 +10,6 @@ ...@@ -10,10 +10,6 @@
#include "drv_common.h" #include "drv_common.h"
#ifdef RT_USING_PIN
#include "drv_gpio.h"
#endif
#ifdef RT_USING_SERIAL #ifdef RT_USING_SERIAL
#include "drv_usart.h" #include "drv_usart.h"
#endif #endif
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <rtthread.h> #include <rtthread.h>
#include <rthw.h> #include <rthw.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
#define __DRV_DMA_H_ #define __DRV_DMA_H_
#include <rtthread.h> #include <rtthread.h>
#include "rtdevice.h" #include <board.h>
#include <rthw.h>
#include <drv_common.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -8,14 +8,11 @@ ...@@ -8,14 +8,11 @@
* 2019-01-08 zylx first version * 2019-01-08 zylx first version
*/ */
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h> #include <board.h>
#ifdef BSP_USING_LCD #ifdef BSP_USING_LCD
#include <lcd_port.h> #include <lcd_port.h>
#include <string.h> #include <string.h>
#include "drv_gpio.h"
//#define DRV_DEBUG //#define DRV_DEBUG
#define LOG_TAG "drv.lcd" #define LOG_TAG "drv.lcd"
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
* 2018-12-04 zylx first version * 2018-12-04 zylx first version
*/ */
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h> #include <board.h>
#ifdef BSP_USING_SDRAM #ifdef BSP_USING_SDRAM
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PB1 */ /* defined the LED0 pin: PB1 */
#define LED0_PIN GET_PIN(B, 1) #define LED0_PIN GET_PIN(B, 1)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f0xx.h> #include <stm32f0xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PB1 */ /* defined the LED0 pin: PB1 */
#define LED0_PIN GET_PIN(B, 1) #define LED0_PIN GET_PIN(B, 1)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f1xx.h> #include <stm32f1xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PB1 */ /* defined the LED0 pin: PB1 */
#define LED0_PIN GET_PIN(B, 1) #define LED0_PIN GET_PIN(B, 1)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f4xx.h> #include <stm32f4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f7xx.h> #include <stm32f7xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PB1 */ /* defined the LED0 pin: PB1 */
#define LED0_PIN GET_PIN(B, 1) #define LED0_PIN GET_PIN(B, 1)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32l4xx.h> #include <stm32l4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f0xx.h> #include <stm32f0xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PC0 */ /* defined the LED0 pin: PC0 */
#define LED0_PIN GET_PIN(C, 0) #define LED0_PIN GET_PIN(C, 0)
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
#ifndef __BOARD_H__ #ifndef __BOARD_H__
#define __BOARD_H__ #define __BOARD_H__
#include <rtthread.h>
#include <stm32f1xx.h> #include <stm32f1xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PF7 */ /* defined the LED0 pin: PF7 */
#define LED0_PIN GET_PIN(F, 7) #define LED0_PIN GET_PIN(F, 7)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f1xx.h> #include <stm32f1xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PE9 */ /* defined the LED0 pin: PE9 */
#define LED0_PIN GET_PIN(E, 9) #define LED0_PIN GET_PIN(E, 9)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f1xx.h> #include <stm32f1xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PF9 */ /* defined the LED0 pin: PF9 */
#define LED0_PIN GET_PIN(F, 9) #define LED0_PIN GET_PIN(F, 9)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f4xx.h> #include <stm32f4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PD14 */ /* defined the LED0 pin: PD14 */
#define LED0_PIN GET_PIN(D, 14) #define LED0_PIN GET_PIN(D, 14)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f4xx.h> #include <stm32f4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PA5 */ /* defined the LED0 pin: PA5 */
#define LED0_PIN GET_PIN(A, 5) #define LED0_PIN GET_PIN(A, 5)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f4xx.h> #include <stm32f4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -14,15 +14,12 @@ ...@@ -14,15 +14,12 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f4xx.h> #include <stm32f4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#ifdef BSP_USING_GPIO
#include "drv_gpio.h"
#endif
#define STM32_SRAM_SIZE (192) #define STM32_SRAM_SIZE (192)
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024) #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PB1 */ /* defined the LED0 pin: PB1 */
#define LED0_PIN GET_PIN(B, 1) #define LED0_PIN GET_PIN(B, 1)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f4xx.h> #include <stm32f4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PH10 */ /* defined the LED0 pin: PH10 */
#define LED0_PIN GET_PIN(H, 10) #define LED0_PIN GET_PIN(H, 10)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f4xx.h> #include <stm32f4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED2 pin: PB7 */ /* defined the LED2 pin: PB7 */
#define LED2_PIN GET_PIN(B, 7) #define LED2_PIN GET_PIN(B, 7)
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f4xx.h> #include <stm32f4xx.h>
#include "drv_common.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)
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED1 pin: PI1 */ /* defined the LED1 pin: PI1 */
#define LED1_PIN GET_PIN(I, 1) #define LED1_PIN GET_PIN(I, 1)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f7xx.h> #include <stm32f7xx.h>
#include "drv_common.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 (1024 * 1024) #define STM32_FLASH_SIZE (1024 * 1024)
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PB1 */ /* defined the LED0 pin: PB1 */
#define LED0_PIN GET_PIN(B, 1) #define LED0_PIN GET_PIN(B, 1)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f7xx.h> #include <stm32f7xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PH10 */ /* defined the LED0 pin: PH10 */
#define LED0_PIN GET_PIN(H, 10) #define LED0_PIN GET_PIN(H, 10)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f7xx.h> #include <stm32f7xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED1 pin: PB0 */ /* defined the LED1 pin: PB0 */
#define LED1_PIN GET_PIN(B, 0) #define LED1_PIN GET_PIN(B, 0)
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32f7xx.h> #include <stm32f7xx.h>
#include "drv_common.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 (2048 * 1024) #define STM32_FLASH_SIZE (2048 * 1024)
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PB3 */ /* defined the LED0 pin: PB3 */
#define LED0_PIN GET_PIN(B, 3) #define LED0_PIN GET_PIN(B, 3)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32l4xx.h> #include <stm32l4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) ...@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) 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('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include <board.h> #include <board.h>
#include "drv_gpio.h"
/* defined the LED0 pin: PE7 */ /* defined the LED0 pin: PE7 */
#define LED0_PIN GET_PIN(E, 7) #define LED0_PIN GET_PIN(E, 7)
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <rtthread.h> #include <rtthread.h>
#include <stm32l4xx.h> #include <stm32l4xx.h>
#include "drv_common.h" #include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册