Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
9134f48d
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9134f48d
编写于
11月 17, 2017
作者:
lymzzyh
提交者:
Bernard Xiong
11月 17, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BSP][STM32F10x_HAL]Add mcu type choose in menuconfig
上级
e365ff54
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
907 addition
and
414 deletion
+907
-414
bsp/stm32f10x_HAL/.config
bsp/stm32f10x_HAL/.config
+81
-4
bsp/stm32f10x_HAL/KConfig
bsp/stm32f10x_HAL/KConfig
+137
-7
bsp/stm32f10x_HAL/Libraries/SConscript
bsp/stm32f10x_HAL/Libraries/SConscript
+36
-14
bsp/stm32f10x_HAL/drivers/board.h
bsp/stm32f10x_HAL/drivers/board.h
+179
-1
bsp/stm32f10x_HAL/drivers/drv_gpio.c
bsp/stm32f10x_HAL/drivers/drv_gpio.c
+82
-39
bsp/stm32f10x_HAL/drivers/stm32f1xx_hal_conf.h
bsp/stm32f10x_HAL/drivers/stm32f1xx_hal_conf.h
+2
-0
bsp/stm32f10x_HAL/project.uvoptx
bsp/stm32f10x_HAL/project.uvoptx
+211
-211
bsp/stm32f10x_HAL/project.uvprojx
bsp/stm32f10x_HAL/project.uvprojx
+97
-97
bsp/stm32f10x_HAL/rtconfig.h
bsp/stm32f10x_HAL/rtconfig.h
+80
-3
bsp/stm32f10x_HAL/rtconfig.py
bsp/stm32f10x_HAL/rtconfig.py
+2
-23
bsp/stm32f10x_HAL/stm32_rom.sct
bsp/stm32f10x_HAL/stm32_rom.sct
+0
-15
未找到文件。
bsp/stm32f10x_HAL/.config
浏览文件 @
9134f48d
...
...
@@ -98,6 +98,10 @@ CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_SDIO is not set
# CONFIG_RT_USING_SPI is not set
# CONFIG_RT_USING_WDT is not set
#
# Using USB
#
# CONFIG_RT_USING_USB_HOST is not set
# CONFIG_RT_USING_USB_DEVICE is not set
...
...
@@ -174,10 +178,83 @@ CONFIG_RT_USING_PIN=y
# miscellaneous packages
#
# CONFIG_PKG_USING_HELLO is not set
#
# BSP_SPECIAL CONFIG
#
# CONFIG_STM32F100C8 is not set
# CONFIG_STM32F100CB is not set
# CONFIG_STM32F100R8 is not set
# CONFIG_STM32F100RB is not set
# CONFIG_STM32F100RC is not set
# CONFIG_STM32F100RD is not set
# CONFIG_STM32F100RE is not set
# CONFIG_STM32F100V8 is not set
# CONFIG_STM32F100VB is not set
# CONFIG_STM32F100VC is not set
# CONFIG_STM32F100VD is not set
# CONFIG_STM32F100VE is not set
# CONFIG_STM32F100ZC is not set
# CONFIG_STM32F100ZD is not set
# CONFIG_STM32F100ZE is not set
# CONFIG_STM32F101C8 is not set
# CONFIG_STM32F101CB is not set
# CONFIG_STM32F101R8 is not set
# CONFIG_STM32F101RB is not set
# CONFIG_STM32F101RC is not set
# CONFIG_STM32F101RD is not set
# CONFIG_STM32F101RE is not set
# CONFIG_STM32F101RF is not set
# CONFIG_STM32F101RG is not set
# CONFIG_STM32F101T8 is not set
# CONFIG_STM32F101TB is not set
# CONFIG_STM32F101V8 is not set
# CONFIG_STM32F101VB is not set
# CONFIG_STM32F101VC is not set
# CONFIG_STM32F101VD is not set
# CONFIG_STM32F101VE is not set
# CONFIG_STM32F101VF is not set
# CONFIG_STM32F101VG is not set
# CONFIG_STM32F101ZC is not set
# CONFIG_STM32F101ZD is not set
# CONFIG_STM32F101ZE is not set
# CONFIG_STM32F101ZF is not set
# CONFIG_STM32F101ZG is not set
# CONFIG_STM32F102C8 is not set
# CONFIG_STM32F102CB is not set
# CONFIG_STM32F102R8 is not set
# CONFIG_STM32F102RB is not set
# CONFIG_STM32F103C8 is not set
# CONFIG_STM32F103CB is not set
# CONFIG_STM32F103R8 is not set
CONFIG_STM32F103RB
=
y
# CONFIG_STM32F103RC is not set
# CONFIG_STM32F103RD is not set
# CONFIG_STM32F103RE is not set
# CONFIG_STM32F103RF is not set
# CONFIG_STM32F103RG is not set
# CONFIG_STM32F103T8 is not set
# CONFIG_STM32F103TB is not set
# CONFIG_STM32F103V8 is not set
# CONFIG_STM32F103VB is not set
# CONFIG_STM32F103VC is not set
# CONFIG_STM32F103VD is not set
# CONFIG_STM32F103VE is not set
# CONFIG_STM32F103VF is not set
# CONFIG_STM32F103VG is not set
# CONFIG_STM32F103ZC is not set
# CONFIG_STM32F103ZD is not set
# CONFIG_STM32F103ZE is not set
# CONFIG_STM32F103ZF is not set
# CONFIG_STM32F103ZG is not set
# CONFIG_STM32F105R8 is not set
# CONFIG_STM32F105RB is not set
# CONFIG_STM32F105RC is not set
# CONFIG_STM32F105V8 is not set
# CONFIG_STM32F105VB is not set
# CONFIG_STM32F105VC is not set
# CONFIG_STM32F107RB is not set
# CONFIG_STM32F107RC is not set
# CONFIG_STM32F107VB is not set
# CONFIG_STM32F107VC is not set
# CONFIG_RT_USING_HSI is not set
CONFIG_RT_HSE_VALUE
=
8000000
CONFIG_STM32F10X_PIN_NUMBERS
=
64
# CONFIG_RT_USING_UART1 is not set
CONFIG_RT_USING_UART2
=
y
...
...
bsp/stm32f10x_HAL/KConfig
浏览文件 @
9134f48d
...
...
@@ -18,14 +18,144 @@ config $PKGS_DIR
source "$RTT_DIR/KConfig"
source "$PKGS_DIR/KConfig"
choice
prompt "Device type"
default STM32F103RB
config STM32F100RC
bool "STM32F100RC"
config STM32F100RD
bool "STM32F100RD"
config STM32F100RE
bool "STM32F100RE"
config STM32F100VC
bool "STM32F100VC"
config STM32F100VD
bool "STM32F100VD"
config STM32F100VE
bool "STM32F100VE"
config STM32F100ZC
bool "STM32F100ZC"
config STM32F100ZD
bool "STM32F100ZD"
config STM32F100ZE
bool "STM32F100ZE"
config STM32F101CB
bool "STM32F101CB"
config STM32F101RB
bool "STM32F101RB"
config STM32F101RC
bool "STM32F101RC"
config STM32F101RD
bool "STM32F101RD"
config STM32F101RE
bool "STM32F101RE"
config STM32F101RF
bool "STM32F101RF"
config STM32F101RG
bool "STM32F101RG"
config STM32F101TB
bool "STM32F101TB"
config STM32F101VB
bool "STM32F101VB"
config STM32F101VC
bool "STM32F101VC"
config STM32F101VD
bool "STM32F101VD"
config STM32F101VE
bool "STM32F101VE"
config STM32F101VF
bool "STM32F101VF"
config STM32F101VG
bool "STM32F101VG"
config STM32F101ZC
bool "STM32F101ZC"
config STM32F101ZD
bool "STM32F101ZD"
config STM32F101ZE
bool "STM32F101ZE"
config STM32F101ZF
bool "STM32F101ZF"
config STM32F101ZG
bool "STM32F101ZG"
config STM32F102CB
bool "STM32F102CB"
config STM32F102RB
bool "STM32F102RB"
config STM32F103C8
bool "STM32F103C8"
config STM32F103CB
bool "STM32F103CB"
config STM32F103R8
bool "STM32F103R8"
config STM32F103RB
bool "STM32F103RB"
config STM32F103RC
bool "STM32F103RC"
config STM32F103RD
bool "STM32F103RD"
config STM32F103RE
bool "STM32F103RE"
config STM32F103RF
bool "STM32F103RF"
config STM32F103RG
bool "STM32F103RG"
config STM32F103T8
bool "STM32F103T8"
config STM32F103TB
bool "STM32F103TB"
config STM32F103V8
bool "STM32F103V8"
config STM32F103VB
bool "STM32F103VB"
config STM32F103VC
bool "STM32F103VC"
config STM32F103VD
bool "STM32F103VD"
config STM32F103VE
bool "STM32F103VE"
config STM32F103VF
bool "STM32F103VF"
config STM32F103VG
bool "STM32F103VG"
config STM32F103ZC
bool "STM32F103ZC"
config STM32F103ZD
bool "STM32F103ZD"
config STM32F103ZE
bool "STM32F103ZE"
config STM32F103ZF
bool "STM32F103ZF"
config STM32F103ZG
bool "STM32F103ZG"
config STM32F105R8
bool "STM32F105R8"
config STM32F105RB
bool "STM32F105RB"
config STM32F105RC
bool "STM32F105RC"
config STM32F105V8
bool "STM32F105V8"
config STM32F105VB
bool "STM32F105VB"
config STM32F105VC
bool "STM32F105VC"
config STM32F107RB
bool "STM32F107RB"
config STM32F107RC
bool "STM32F107RC"
config STM32F107VB
bool "STM32F107VB"
config STM32F107VC
bool "STM32F107VC"
endchoice
config RT_USING_HSI
bool "Using HSI as clock source"
default n
config RT_HSE_VALUE
int "HSE Value"
default 8000000
depends on !RT_USING_HSI
if RT_USING_PIN
config STM32F10X_PIN_NUMBERS
int "number of stm32 pin numbers"
default 64
endif
if RT_USING_SERIAL
...
...
bsp/stm32f10x_HAL/Libraries/SConscript
浏览文件 @
9134f48d
...
...
@@ -53,34 +53,56 @@ STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_usb.c
STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_utils.c
"""
)
if
rtconfig
.
STM32_TYPE
==
'STM32F100xB'
or
rtconfig
.
STM32_TYPE
==
'STM32F100xE'
:
#device options
if
GetDepend
([
'STM32F100RC'
])
or
GetDepend
([
'STM32F100RC'
])
or
GetDepend
([
'STM32F100RC'
])
or
GetDepend
([
'STM32F100RD'
])
or
GetDepend
([
'STM32F100RE'
])
or
GetDepend
([
'STM32F100VD'
])
or
GetDepend
([
'STM32F100VE'
])
or
GetDepend
([
'STM32F100ZD'
])
or
GetDepend
([
'STM32F100ZE'
]):
STM32_TYPE
=
'STM32F100xE'
if
GetDepend
([
'STM32F101TB'
])
or
GetDepend
([
'STM32F101CB'
])
or
GetDepend
([
'STM32F101RB'
])
or
GetDepend
([
'STM32F101VB'
]):
STM32_TYPE
=
'STM32F101xB'
if
GetDepend
([
'STM32F101RC'
])
or
GetDepend
([
'STM32F101VC'
])
or
GetDepend
([
'STM32F101ZC'
])
or
GetDepend
([
'STM32F101RD'
])
or
GetDepend
([
'STM32F101RE'
])
or
GetDepend
([
'STM32F101VD'
])
or
GetDepend
([
'STM32F101VE'
])
or
GetDepend
([
'STM32F101ZD'
])
or
GetDepend
([
'STM32F101ZE'
]):
STM32_TYPE
=
'STM32F101xE'
if
GetDepend
([
'STM32F101RF'
])
or
GetDepend
([
'STM32F101RG'
])
or
GetDepend
([
'STM32F101VF'
])
or
GetDepend
([
'STM32F101VG'
])
or
GetDepend
([
'STM32F101ZF'
])
or
GetDepend
([
'STM32F101ZG'
]):
STM32_TYPE
=
'STM32F101xG'
if
GetDepend
([
'STM32F102CB'
])
or
GetDepend
([
'STM32F102RB'
]):
STM32_TYPE
=
'STM32F102xB'
if
GetDepend
([
'STM32F103T8'
])
or
GetDepend
([
'STM32F103TB'
])
or
GetDepend
([
'STM32F103C8'
])
or
GetDepend
([
'STM32F103CB'
])
or
GetDepend
([
'STM32F103R8'
])
or
GetDepend
([
'STM32F103RB'
])
or
GetDepend
([
'STM32F103V8'
])
or
GetDepend
([
'STM32F103VB'
]):
STM32_TYPE
=
'STM32F103xB'
if
GetDepend
([
'STM32F103RC'
])
or
GetDepend
([
'STM32F103VC'
])
or
GetDepend
([
'STM32F103ZC'
])
or
GetDepend
([
'STM32F103RD'
])
or
GetDepend
([
'STM32F103RE'
])
or
GetDepend
([
'STM32F103VD'
])
or
GetDepend
([
'STM32F103VE'
])
or
GetDepend
([
'STM32F103ZD'
])
or
GetDepend
([
'STM32F103ZE'
]):
STM32_TYPE
=
'STM32F103xE'
if
GetDepend
([
'STM32F103RF'
])
or
GetDepend
([
'STM32F103RG'
])
or
GetDepend
([
'STM32F103VF'
])
or
GetDepend
([
'STM32F103VG'
])
or
GetDepend
([
'STM32F103ZF'
])
or
GetDepend
([
'STM32F103ZG'
]):
STM32_TYPE
=
'STM32F103xG'
if
GetDepend
([
'STM32F105R8'
])
or
GetDepend
([
'STM32F105RB'
])
or
GetDepend
([
'STM32F105RC'
])
or
GetDepend
([
'STM32F105V8'
])
or
GetDepend
([
'STM32F105VB'
])
or
GetDepend
([
'STM32F105VC'
]):
STM32_TYPE
=
'STM32F105xC'
if
GetDepend
([
'STM32F107RB'
])
or
GetDepend
([
'STM32F107RC'
])
or
GetDepend
([
'STM32F107VB'
])
or
GetDepend
([
'STM32F107VC'
]):
STM32_TYPE
=
'STM32F107xC'
if
STM32_TYPE
==
'STM32F100xB'
or
STM32_TYPE
==
'STM32F100xE'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cec.c'
]
if
rtconfig
.
STM32_TYPE
==
'STM32F103x6'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xB'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xG'
or
rtconfig
.
STM32_TYPE
==
'STM32F105xC'
or
rtconfig
.
STM32_TYPE
==
'STM32F107xC'
:
if
STM32_TYPE
==
'STM32F103x6'
or
STM32_TYPE
==
'STM32F103xB'
or
STM32_TYPE
==
'STM32F103xE'
or
STM32_TYPE
==
'STM32F103xG'
or
STM32_TYPE
==
'STM32F105xC'
or
STM32_TYPE
==
'STM32F107xC'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_can.c'
]
if
rtconfig
.
STM32_TYPE
==
'STM32F100xB'
or
rtconfig
.
STM32_TYPE
==
'STM32F100xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F101xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F101xG'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xG'
or
rtconfig
.
STM32_TYPE
==
'STM32F105xC'
or
rtconfig
.
STM32_TYPE
==
'STM32F107xC'
:
if
STM32_TYPE
==
'STM32F100xB'
or
STM32_TYPE
==
'STM32F100xE'
or
STM32_TYPE
==
'STM32F101xE'
or
STM32_TYPE
==
'STM32F101xG'
or
STM32_TYPE
==
'STM32F103xE'
or
STM32_TYPE
==
'STM32F103xG'
or
STM32_TYPE
==
'STM32F105xC'
or
STM32_TYPE
==
'STM32F107xC'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dac.c'
]
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dac_ex.c'
]
if
rtconfig
.
STM32_TYPE
==
'STM32F107xC'
:
if
STM32_TYPE
==
'STM32F107xC'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_eth.c'
]
if
rtconfig
.
STM32_TYPE
==
'STM32F107xC'
or
rtconfig
.
STM32_TYPE
==
'STM32F105xC'
:
if
STM32_TYPE
==
'STM32F107xC'
or
STM32_TYPE
==
'STM32F105xC'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_hcd.c'
]
if
rtconfig
.
STM32_TYPE
==
'STM32F107xC'
or
rtconfig
.
STM32_TYPE
==
'STM32F105xC'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xG'
:
if
STM32_TYPE
==
'STM32F107xC'
or
STM32_TYPE
==
'STM32F105xC'
or
STM32_TYPE
==
'STM32F103xE'
or
STM32_TYPE
==
'STM32F103xG'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2s.c'
]
if
rtconfig
.
STM32_TYPE
==
'STM32F103xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xG'
:
if
STM32_TYPE
==
'STM32F103xE'
or
STM32_TYPE
==
'STM32F103xG'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_mmc.c'
]
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sd.c'
]
if
rtconfig
.
STM32_TYPE
==
'STM32F101xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F101xG'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xG'
:
if
STM32_TYPE
==
'STM32F101xE'
or
STM32_TYPE
==
'STM32F103xE'
or
STM32_TYPE
==
'STM32F101xG'
or
STM32_TYPE
==
'STM32F103xG'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_nand.c'
]
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pccard.c'
]
if
rtconfig
.
STM32_TYPE
==
'STM32F101xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F101xG'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xG'
or
rtconfig
.
STM32_TYPE
==
'STM32F100xE'
:
if
STM32_TYPE
==
'STM32F101xE'
or
STM32_TYPE
==
'STM32F103xE'
or
STM32_TYPE
==
'STM32F101xG'
or
STM32_TYPE
==
'STM32F103xG'
or
STM32_TYPE
==
'STM32F100xE'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_nor.c'
]
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c'
]
if
rtconfig
.
STM32_TYPE
==
'STM32F102x6'
or
rtconfig
.
STM32_TYPE
==
'STM32F102xB'
or
rtconfig
.
STM32_TYPE
==
'STM32F103x6'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xB'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xE'
or
rtconfig
.
STM32_TYPE
==
'STM32F103xG'
or
rtconfig
.
STM32_TYPE
==
'STM32F105xC'
or
rtconfig
.
STM32_TYPE
==
'STM32F107xC'
:
if
STM32_TYPE
==
'STM32F102x6'
or
STM32_TYPE
==
'STM32F102xB'
or
STM32_TYPE
==
'STM32F103x6'
or
STM32_TYPE
==
'STM32F103xB'
or
STM32_TYPE
==
'STM32F103xE'
or
STM32_TYPE
==
'STM32F103xG'
or
STM32_TYPE
==
'STM32F105xC'
or
STM32_TYPE
==
'STM32F107xC'
:
src
=
src
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd.c'
]
+
[
'STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pcd_ex.c'
]
# starupt scripts for each STM32 kind
...
...
@@ -102,11 +124,11 @@ startup_scripts['STM32F107xC'] = 'startup_stm32f107xc.s'
# add for startup script
if
rtconfig
.
CROSS_TOOL
==
'gcc'
:
src
=
src
+
[
'CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/'
+
startup_scripts
[
rtconfig
.
STM32_TYPE
]]
src
=
src
+
[
'CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/'
+
startup_scripts
[
STM32_TYPE
]]
elif
rtconfig
.
CROSS_TOOL
==
'keil'
:
src
=
src
+
[
'CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/'
+
startup_scripts
[
rtconfig
.
STM32_TYPE
]]
src
=
src
+
[
'CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/'
+
startup_scripts
[
STM32_TYPE
]]
elif
rtconfig
.
CROSS_TOOL
==
'iar'
:
src
=
src
+
[
'CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/'
+
startup_scripts
[
rtconfig
.
STM32_TYPE
]]
src
=
src
+
[
'CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/'
+
startup_scripts
[
STM32_TYPE
]]
path
=
[
cwd
+
'/CMSIS/Device/ST/STM32F1xx/Include'
,
cwd
+
'/STM32F1xx_HAL_Driver/Inc'
,
...
...
@@ -115,7 +137,7 @@ path = [cwd + '/CMSIS/Device/ST/STM32F1xx/Include',
if
GetDepend
([
'RT_USING_RTT_CMSIS'
]):
path
+=
[
RTT_ROOT
+
'/components/CMSIS/Include'
]
CPPDEFINES
=
[
'USE_HAL_DRIVER'
,
rtconfig
.
STM32_TYPE
]
CPPDEFINES
=
[
'USE_HAL_DRIVER'
,
STM32_TYPE
]
group
=
DefineGroup
(
'STM32_HAL'
,
src
,
depend
=
[
''
],
CPPPATH
=
path
,
CPPDEFINES
=
CPPDEFINES
)
Return
(
'group'
)
bsp/stm32f10x_HAL/drivers/board.h
浏览文件 @
9134f48d
...
...
@@ -19,6 +19,184 @@
#include "stm32f1xx_hal.h"
/* board configuration */
#if \
defined(STM32F101TB)||\
defined(STM32F103T8)||\
defined(STM32F103TB)
#define STM32F10X_PIN_NUMBERS 36
#elif \
defined(STM32F101CB)||\
defined(STM32F102CB)||\
defined(STM32F103C8)||\
defined(STM32F103CB)
#define STM32F10X_PIN_NUMBERS 48
#elif \
defined(STM32F100RC)||\
defined(STM32F100RD)||\
defined(STM32F100RE)||\
defined(STM32F101RB)||\
defined(STM32F101RC)||\
defined(STM32F101RD)||\
defined(STM32F101RE)||\
defined(STM32F101RF)||\
defined(STM32F101RG)||\
defined(STM32F102RB)||\
defined(STM32F103R8)||\
defined(STM32F103RB)||\
defined(STM32F103RC)||\
defined(STM32F103RD)||\
defined(STM32F103RE)||\
defined(STM32F103RF)||\
defined(STM32F103RG)||\
defined(STM32F105R8)||\
defined(STM32F105RB)||\
defined(STM32F105RC)||\
defined(STM32F107RB)||\
defined(STM32F107RC)
#define STM32F10X_PIN_NUMBERS 64
#elif \
defined(STM32F100VC)||\
defined(STM32F100VD)||\
defined(STM32F100VE)||\
defined(STM32F101VB)||\
defined(STM32F101VC)||\
defined(STM32F101VD)||\
defined(STM32F101VE)||\
defined(STM32F101VF)||\
defined(STM32F101VG)||\
defined(STM32F103V8)||\
defined(STM32F103VB)||\
defined(STM32F103VC)||\
defined(STM32F103VD)||\
defined(STM32F103VE)||\
defined(STM32F103VF)||\
defined(STM32F103VG)||\
defined(STM32F105V8)||\
defined(STM32F105VB)||\
defined(STM32F105VC)||\
defined(STM32F107VB)||\
defined(STM32F107VC)
#define STM32F10X_PIN_NUMBERS 100
#elif \
defined(STM32F100ZC)||\
defined(STM32F100ZD)||\
defined(STM32F100ZE)||\
defined(STM32F101ZC)||\
defined(STM32F101ZD)||\
defined(STM32F101ZE)||\
defined(STM32F101ZF)||\
defined(STM32F101ZG)||\
defined(STM32F103ZC)||\
defined(STM32F103ZD)||\
defined(STM32F103ZE)||\
defined(STM32F103ZF)||\
defined(STM32F103ZG)
#define STM32F10X_PIN_NUMBERS 144
#endif
#if \
defined(STM32F100RC)||\
defined(STM32F100VC)||\
defined(STM32F100ZC)
#define STM32_SRAM_SIZE 24
//#define STM32F100xE
#elif \
defined(STM32F100RD)||\
defined(STM32F100RE)||\
defined(STM32F100VD)||\
defined(STM32F100VE)||\
defined(STM32F100ZD)||\
defined(STM32F100ZE)
#define STM32_SRAM_SIZE 32
//#define STM32F100xE
#elif \
defined(STM32F101TB)||\
defined(STM32F101CB)||\
defined(STM32F101RB)||\
defined(STM32F101VB)
#define STM32_SRAM_SIZE 16
//#define STM32F101xB
#elif \
defined(STM32F101RC)||\
defined(STM32F101VC)||\
defined(STM32F101ZC)
#define STM32_SRAM_SIZE 32
//#define STM32F101xE
#elif \
defined(STM32F101RD)||\
defined(STM32F101RE)||\
defined(STM32F101VD)||\
defined(STM32F101VE)||\
defined(STM32F101ZD)||\
defined(STM32F101ZE)
#define STM32_SRAM_SIZE 48
//#define STM32F101xE
#elif \
defined(STM32F101RF)||\
defined(STM32F101RG)||\
defined(STM32F101VF)||\
defined(STM32F101VG)||\
defined(STM32F101ZF)||\
defined(STM32F101ZG)
#define STM32_SRAM_SIZE 80
//#define STM32F101xG
#elif \
defined(STM32F102CB)||\
defined(STM32F102RB)
#define STM32_SRAM_SIZE 16
//#define STM32F102xB
#elif \
defined(STM32F103T8)||\
defined(STM32F103TB)||\
defined(STM32F103C8)||\
defined(STM32F103CB)||\
defined(STM32F103R8)||\
defined(STM32F103RB)||\
defined(STM32F103V8)||\
defined(STM32F103VB)
#define STM32_SRAM_SIZE 20
//#define STM32F103xB
#elif \
defined(STM32F103RC)||\
defined(STM32F103VC)||\
defined(STM32F103ZC)
#define STM32_SRAM_SIZE 48
//#define STM32F103xE
#elif \
defined(STM32F103RD)||\
defined(STM32F103RE)||\
defined(STM32F103VD)||\
defined(STM32F103VE)||\
defined(STM32F103ZD)||\
defined(STM32F103ZE)
#define STM32_SRAM_SIZE 64
//#define STM32F103xE
#elif \
defined(STM32F103RF)||\
defined(STM32F103RG)||\
defined(STM32F103VF)||\
defined(STM32F103VG)||\
defined(STM32F103ZF)||\
defined(STM32F103ZG)
#define STM32_SRAM_SIZE 96
//#define STM32F103xG
#elif \
defined(STM32F105R8)||\
defined(STM32F105RB)||\
defined(STM32F105RC)||\
defined(STM32F105V8)||\
defined(STM32F105VB)||\
defined(STM32F105VC)
#define STM32_SRAM_SIZE 64
//#define STM32F105xC
#elif \
defined(STM32F107RB)||\
defined(STM32F107RC)||\
defined(STM32F107VB)||\
defined(STM32F107VC)
#define STM32_SRAM_SIZE 64
//#define STM32F107xC
#endif
/* whether use board external SRAM memory */
// <e>Use external SRAM memory on the board
...
...
@@ -34,7 +212,7 @@
// <o> Internal SRAM memory size[Kbytes] <8-64>
// <i>Default: 64
#define STM32_SRAM_SIZE 20
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
#ifdef __CC_ARM
extern
int
Image
$$
RW_IRAM1
$$
ZI
$$
Limit
;
...
...
bsp/stm32f10x_HAL/drivers/drv_gpio.c
浏览文件 @
9134f48d
...
...
@@ -34,46 +34,50 @@ static void GPIOB_CLK_ENABLE(void)
__HAL_RCC_GPIOB_CLK_ENABLE
();
#endif
}
static
void
GPIOC_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOC_CLK_ENABLE
__HAL_RCC_GPIOC_CLK_ENABLE
();
#endif
}
#if (STM32F10X_PIN_NUMBERS >48)
#if (STM32F10X_PIN_NUMBERS >36)
static
void
GPIOC_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOC_CLK_ENABLE
__HAL_RCC_GPIOC_CLK_ENABLE
();
#endif
}
#if (STM32F10X_PIN_NUMBERS >48)
static
void
GPIOD_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOD_CLK_ENABLE
__HAL_RCC_GPIOD_CLK_ENABLE
();
#endif
}
#if (STM32F10X_PIN_NUMBERS >64)
static
void
GPIOE_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOE_CLK_ENABLE
__HAL_RCC_GPIOE_CLK_ENABLE
();
#endif
}
static
void
GPIOF_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOF_CLK_ENABLE
__HAL_RCC_GPIOF_CLK_ENABLE
();
#endif
}
static
void
GPIOG_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOG_CLK_ENABLE
__HAL_RCC_GPIOG_CLK_ENABLE
();
#endif
}
static
void
GPIOH_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOH_CLK_ENABLE
__HAL_RCC_GPIOH_CLK_ENABLE
();
#endif
}
#endif
static
void
GPIOD_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOD_CLK_ENABLE
__HAL_RCC_GPIOD_CLK_ENABLE
();
#endif
}
#if (STM32F10X_PIN_NUMBERS >64)
static
void
GPIOE_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOE_CLK_ENABLE
__HAL_RCC_GPIOE_CLK_ENABLE
();
#endif
}
#if (STM32F10X_PIN_NUMBERS >100)
static
void
GPIOF_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOF_CLK_ENABLE
__HAL_RCC_GPIOF_CLK_ENABLE
();
#endif
}
static
void
GPIOG_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOG_CLK_ENABLE
__HAL_RCC_GPIOG_CLK_ENABLE
();
#endif
}
static
void
GPIOH_CLK_ENABLE
(
void
)
{
#ifdef __HAL_RCC_GPIOH_CLK_ENABLE
__HAL_RCC_GPIOH_CLK_ENABLE
();
#endif
}
#endif
#endif
#endif
#endif
/* STM32 GPIO driver */
struct
pin_index
...
...
@@ -86,6 +90,45 @@ struct pin_index
static
const
struct
pin_index
pins
[]
=
{
#if (STM32F10X_PIN_NUMBERS == 36)
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
__STM32_PIN
(
7
,
A
,
0
),
__STM32_PIN
(
8
,
A
,
1
),
__STM32_PIN
(
9
,
A
,
2
),
__STM32_PIN
(
10
,
A
,
3
),
__STM32_PIN
(
11
,
A
,
4
),
__STM32_PIN
(
12
,
A
,
5
),
__STM32_PIN
(
13
,
A
,
6
),
__STM32_PIN
(
14
,
A
,
7
),
__STM32_PIN
(
15
,
B
,
0
),
__STM32_PIN
(
16
,
B
,
1
),
__STM32_PIN
(
17
,
B
,
2
),
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
__STM32_PIN
(
20
,
A
,
8
),
__STM32_PIN
(
21
,
A
,
9
),
__STM32_PIN
(
22
,
A
,
10
),
__STM32_PIN
(
23
,
A
,
11
),
__STM32_PIN
(
24
,
A
,
12
),
__STM32_PIN
(
25
,
A
,
13
),
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
__STM32_PIN
(
28
,
A
,
14
),
__STM32_PIN
(
29
,
A
,
15
),
__STM32_PIN
(
30
,
B
,
3
),
__STM32_PIN
(
31
,
B
,
4
),
__STM32_PIN
(
32
,
B
,
5
),
__STM32_PIN
(
33
,
B
,
6
),
__STM32_PIN
(
34
,
B
,
7
),
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
#endif
#if (STM32F10X_PIN_NUMBERS == 48)
__STM32_PIN_DEFAULT
,
__STM32_PIN_DEFAULT
,
...
...
bsp/stm32f10x_HAL/drivers/stm32f1xx_hal_conf.h
浏览文件 @
9134f48d
...
...
@@ -101,6 +101,8 @@
* This value is used by the RCC HAL module to compute the system frequency
* (when HSE is used as system clock source, directly or through the PLL).
*/
#define HSE_VALUE ((unsigned int)RT_HSE_VALUE)
#if !defined (HSE_VALUE)
#if defined(USE_STM3210C_EVAL)
#define HSE_VALUE 25000000U
/*!< Value of the External oscillator in Hz */
...
...
bsp/stm32f10x_HAL/project.uvoptx
浏览文件 @
9134f48d
此差异已折叠。
点击以展开。
bsp/stm32f10x_HAL/project.uvprojx
浏览文件 @
9134f48d
此差异已折叠。
点击以展开。
bsp/stm32f10x_HAL/rtconfig.h
浏览文件 @
9134f48d
...
...
@@ -90,6 +90,9 @@
/* RT_USING_SDIO is not set */
/* RT_USING_SPI is not set */
/* RT_USING_WDT is not set */
/* Using USB */
/* RT_USING_USB_HOST is not set */
/* RT_USING_USB_DEVICE is not set */
...
...
@@ -149,9 +152,83 @@
/* miscellaneous packages */
/* PKG_USING_HELLO is not set */
/* BSP_SPECIAL CONFIG */
/* STM32F100C8 is not set */
/* STM32F100CB is not set */
/* STM32F100R8 is not set */
/* STM32F100RB is not set */
/* STM32F100RC is not set */
/* STM32F100RD is not set */
/* STM32F100RE is not set */
/* STM32F100V8 is not set */
/* STM32F100VB is not set */
/* STM32F100VC is not set */
/* STM32F100VD is not set */
/* STM32F100VE is not set */
/* STM32F100ZC is not set */
/* STM32F100ZD is not set */
/* STM32F100ZE is not set */
/* STM32F101C8 is not set */
/* STM32F101CB is not set */
/* STM32F101R8 is not set */
/* STM32F101RB is not set */
/* STM32F101RC is not set */
/* STM32F101RD is not set */
/* STM32F101RE is not set */
/* STM32F101RF is not set */
/* STM32F101RG is not set */
/* STM32F101T8 is not set */
/* STM32F101TB is not set */
/* STM32F101V8 is not set */
/* STM32F101VB is not set */
/* STM32F101VC is not set */
/* STM32F101VD is not set */
/* STM32F101VE is not set */
/* STM32F101VF is not set */
/* STM32F101VG is not set */
/* STM32F101ZC is not set */
/* STM32F101ZD is not set */
/* STM32F101ZE is not set */
/* STM32F101ZF is not set */
/* STM32F101ZG is not set */
/* STM32F102C8 is not set */
/* STM32F102CB is not set */
/* STM32F102R8 is not set */
/* STM32F102RB is not set */
/* STM32F103C8 is not set */
/* STM32F103CB is not set */
/* STM32F103R8 is not set */
#define STM32F103RB
/* STM32F103RC is not set */
/* STM32F103RD is not set */
/* STM32F103RE is not set */
/* STM32F103RF is not set */
/* STM32F103RG is not set */
/* STM32F103T8 is not set */
/* STM32F103TB is not set */
/* STM32F103V8 is not set */
/* STM32F103VB is not set */
/* STM32F103VC is not set */
/* STM32F103VD is not set */
/* STM32F103VE is not set */
/* STM32F103VF is not set */
/* STM32F103VG is not set */
/* STM32F103ZC is not set */
/* STM32F103ZD is not set */
/* STM32F103ZE is not set */
/* STM32F103ZF is not set */
/* STM32F103ZG is not set */
/* STM32F105R8 is not set */
/* STM32F105RB is not set */
/* STM32F105RC is not set */
/* STM32F105V8 is not set */
/* STM32F105VB is not set */
/* STM32F105VC is not set */
/* STM32F107RB is not set */
/* STM32F107RC is not set */
/* STM32F107VB is not set */
/* STM32F107VC is not set */
/* RT_USING_HSI is not set */
#define RT_HSE_VALUE 8000000
#define STM32F10X_PIN_NUMBERS 64
/* RT_USING_UART1 is not set */
#define RT_USING_UART2
...
...
bsp/stm32f10x_HAL/rtconfig.py
浏览文件 @
9134f48d
...
...
@@ -8,27 +8,6 @@ CROSS_TOOL='gcc'
if
os
.
getenv
(
'RTT_CC'
):
CROSS_TOOL
=
os
.
getenv
(
'RTT_CC'
)
#device options
# STM32_TYPE =
# 'STM32F100xB'
# 'STM32F100xE'
# 'STM32F101x6'
# 'STM32F101xB'
# 'STM32F101xE'
# 'STM32F101xG'
# 'STM32F102x6'
# 'STM32F102xB'
# 'STM32F103x6'
# 'STM32F103xB'
# 'STM32F103xE'
# 'STM32F103xG'
# 'STM32F105xC'
# 'STM32F107xC'
STM32_TYPE
=
'STM32F103xB'
# lcd panel options
# 'FMT0371','ILI932X', 'SSD1289'
RT_USING_LCD_TYPE
=
'SSD1289'
# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
...
...
@@ -38,7 +17,7 @@ if CROSS_TOOL == 'gcc':
EXEC_PATH
=
'/usr/local/gcc-arm-none-eabi-5_4-2016q3/bin/'
elif
CROSS_TOOL
==
'keil'
:
PLATFORM
=
'armcc'
EXEC_PATH
=
'C:/Keil'
EXEC_PATH
=
'C:/Keil
v5
'
elif
CROSS_TOOL
==
'iar'
:
PLATFORM
=
'iar'
IAR_PATH
=
'C:/Program Files/IAR Systems/Embedded Workbench 6.0 Evaluation'
...
...
@@ -111,7 +90,7 @@ elif PLATFORM == 'iar':
LINK
=
'ilinkarm'
TARGET_EXT
=
'out'
DEVICE
=
' -D USE_
STDPERIPH_DRIVER'
+
' -D STM32F10X_HD
'
DEVICE
=
' -D USE_
HAL_DRIVER
'
CFLAGS
=
DEVICE
CFLAGS
+=
' --diag_suppress Pa050'
...
...
bsp/stm32f10x_HAL/stm32_rom.sct
已删除
100644 → 0
浏览文件 @
e365ff54
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00020000 { ; load region size_region
ER_IROM1 0x08000000 0x00020000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20000000 0x00005000 { ; RW data
.ANY (+RW +ZI)
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录