Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
嗨,你的益达!
rt-thread
提交
26ac8065
R
rt-thread
项目概览
嗨,你的益达!
/
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看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
26ac8065
编写于
6月 05, 2023
作者:
T
tangzz98
提交者:
GitHub
6月 05, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp][stm32] add STM32F334 NUCLEO BSP (#7600)
上级
ccc8e7ce
变更
36
展开全部
隐藏空白更改
内联
并排
Showing
36 changed file
with
12419 addition
and
0 deletion
+12419
-0
.github/workflows/action.yml
.github/workflows/action.yml
+1
-0
bsp/stm32/README.md
bsp/stm32/README.md
+3
-0
bsp/stm32/stm32f334-st-nucleo/.config
bsp/stm32/stm32f334-st-nucleo/.config
+968
-0
bsp/stm32/stm32f334-st-nucleo/.gitignore
bsp/stm32/stm32f334-st-nucleo/.gitignore
+42
-0
bsp/stm32/stm32f334-st-nucleo/Kconfig
bsp/stm32/stm32f334-st-nucleo/Kconfig
+21
-0
bsp/stm32/stm32f334-st-nucleo/README.md
bsp/stm32/stm32f334-st-nucleo/README.md
+104
-0
bsp/stm32/stm32f334-st-nucleo/SConscript
bsp/stm32/stm32f334-st-nucleo/SConscript
+15
-0
bsp/stm32/stm32f334-st-nucleo/SConstruct
bsp/stm32/stm32f334-st-nucleo/SConstruct
+60
-0
bsp/stm32/stm32f334-st-nucleo/applications/SConscript
bsp/stm32/stm32f334-st-nucleo/applications/SConscript
+15
-0
bsp/stm32/stm32f334-st-nucleo/applications/main.c
bsp/stm32/stm32f334-st-nucleo/applications/main.c
+32
-0
bsp/stm32/stm32f334-st-nucleo/board/.ignore_format.yml
bsp/stm32/stm32f334-st-nucleo/board/.ignore_format.yml
+6
-0
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/.mxproject
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/.mxproject
+25
-0
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc
...stm32f334-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc
+125
-0
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/Inc/main.h
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/Inc/main.h
+69
-0
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/Inc/stm32f3xx_hal_conf.h
...34-st-nucleo/board/CubeMX_Config/Inc/stm32f3xx_hal_conf.h
+359
-0
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/Inc/stm32f3xx_it.h
...tm32f334-st-nucleo/board/CubeMX_Config/Inc/stm32f3xx_it.h
+66
-0
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/Src/stm32f3xx_hal_msp.c
...334-st-nucleo/board/CubeMX_Config/Src/stm32f3xx_hal_msp.c
+146
-0
bsp/stm32/stm32f334-st-nucleo/board/Kconfig
bsp/stm32/stm32f334-st-nucleo/board/Kconfig
+37
-0
bsp/stm32/stm32f334-st-nucleo/board/SConscript
bsp/stm32/stm32f334-st-nucleo/board/SConscript
+36
-0
bsp/stm32/stm32f334-st-nucleo/board/board.c
bsp/stm32/stm32f334-st-nucleo/board/board.c
+46
-0
bsp/stm32/stm32f334-st-nucleo/board/board.h
bsp/stm32/stm32f334-st-nucleo/board/board.h
+50
-0
bsp/stm32/stm32f334-st-nucleo/board/linker_scripts/link.icf
bsp/stm32/stm32f334-st-nucleo/board/linker_scripts/link.icf
+28
-0
bsp/stm32/stm32f334-st-nucleo/board/linker_scripts/link.lds
bsp/stm32/stm32f334-st-nucleo/board/linker_scripts/link.lds
+157
-0
bsp/stm32/stm32f334-st-nucleo/board/linker_scripts/link.sct
bsp/stm32/stm32f334-st-nucleo/board/linker_scripts/link.sct
+15
-0
bsp/stm32/stm32f334-st-nucleo/figures/board.png
bsp/stm32/stm32f334-st-nucleo/figures/board.png
+0
-0
bsp/stm32/stm32f334-st-nucleo/project.ewd
bsp/stm32/stm32f334-st-nucleo/project.ewd
+2834
-0
bsp/stm32/stm32f334-st-nucleo/project.ewp
bsp/stm32/stm32f334-st-nucleo/project.ewp
+2324
-0
bsp/stm32/stm32f334-st-nucleo/project.eww
bsp/stm32/stm32f334-st-nucleo/project.eww
+10
-0
bsp/stm32/stm32f334-st-nucleo/project.uvoptx
bsp/stm32/stm32f334-st-nucleo/project.uvoptx
+1016
-0
bsp/stm32/stm32f334-st-nucleo/project.uvprojx
bsp/stm32/stm32f334-st-nucleo/project.uvprojx
+754
-0
bsp/stm32/stm32f334-st-nucleo/rtconfig.h
bsp/stm32/stm32f334-st-nucleo/rtconfig.h
+241
-0
bsp/stm32/stm32f334-st-nucleo/rtconfig.py
bsp/stm32/stm32f334-st-nucleo/rtconfig.py
+184
-0
bsp/stm32/stm32f334-st-nucleo/template.ewp
bsp/stm32/stm32f334-st-nucleo/template.ewp
+2031
-0
bsp/stm32/stm32f334-st-nucleo/template.eww
bsp/stm32/stm32f334-st-nucleo/template.eww
+10
-0
bsp/stm32/stm32f334-st-nucleo/template.uvoptx
bsp/stm32/stm32f334-st-nucleo/template.uvoptx
+192
-0
bsp/stm32/stm32f334-st-nucleo/template.uvprojx
bsp/stm32/stm32f334-st-nucleo/template.uvprojx
+397
-0
未找到文件。
.github/workflows/action.yml
浏览文件 @
26ac8065
...
...
@@ -112,6 +112,7 @@ jobs:
SUB_RTT_BSP
:
-
"
stm32/stm32f207-st-nucleo"
-
"
stm32/stm32f302-st-nucleo"
-
"
stm32/stm32f334-st-nucleo"
-
"
stm32/stm32f401-st-nucleo"
-
"
stm32/stm32f401-weact-blackpill"
-
"
stm32/stm32f405-smdz-breadfruit"
...
...
bsp/stm32/README.md
浏览文件 @
26ac8065
...
...
@@ -24,6 +24,9 @@ STM32 系列 BSP 目前支持情况如下表所示:
|
[
stm32f107-uc-eval
](
stm32f107-uc-eval
)
| uC/Eval STM32F107 评估板(中国版) |
|
**F2 系列**
| |
|
[
stm32f207-st-nucleo
](
stm32f207-st-nucleo
)
| ST 官方 STM32F207-nucleo 开发板 |
|
**F3 系列**
| |
|
[
stm32f302-st-nucleo
](
stm32f302-st-nucleo
)
| ST 官方 STM32F302-nucleo 开发板 |
|
[
stm32f334-st-nucleo
](
stm32f334-st-nucleo
)
| ST 官方 STM32F334-nucleo 开发板 |
|
**F4 系列**
| |
|
[
stm32f401-st-nucleo
](
stm32f401-st-nucleo
)
| ST 官方 STM32F401 Nucleo-64 开发板 |
|
[
stm32f405-smdz-breadfruit
](
stm32f405-smdz-breadfruit
)
| 三木电子 SM1432F405 开发板 |
...
...
bsp/stm32/stm32f334-st-nucleo/.config
0 → 100644
浏览文件 @
26ac8065
此差异已折叠。
点击以展开。
bsp/stm32/stm32f334-st-nucleo/.gitignore
0 → 100644
浏览文件 @
26ac8065
*.pyc
*.map
*.dblite
*.elf
*.bin
*.hex
*.axf
*.exe
*.pdb
*.idb
*.ilk
*.old
build
Debug
documentation/html
packages/
*~
*.o
*.obj
*.out
*.bak
*.dep
*.lib
*.i
*.d
.DS_Stor*
.config 3
.config 4
.config 5
Midea-X1
*.uimg
GPATH
GRTAGS
GTAGS
.vscode
JLinkLog.txt
JLinkSettings.ini
DebugConfig/
RTE/
settings/
*.uvguix*
cconfig.h
bsp/stm32/stm32f334-st-nucleo/Kconfig
0 → 100644
浏览文件 @
26ac8065
mainmenu "RT-Thread Configuration"
config BSP_DIR
string
option env="BSP_ROOT"
default "."
config RTT_DIR
string
option env="RTT_ROOT"
default "../../.."
config PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "../libraries/Kconfig"
source "board/Kconfig"
bsp/stm32/stm32f334-st-nucleo/README.md
0 → 100644
浏览文件 @
26ac8065
# STM32F334-Nucleo-64 开发板 BSP 说明
## 简介
本文档为 RT-Thread 开发团队为 STM32F334-Nucleo-64 开发板的 BSP (板级支持包) 说明。
主要内容如下:
-
开发板资源介绍
-
BSP 快速上手
-
进阶使用方法
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
## 开发板介绍
STM32F334-Nucleo-64 是意法半导体推出的一款基于 ARM Cortex-M4 内核的开发板,最高主频为 72 Mhz,该开发板具有丰富的板载资源,可以充分发挥 STM32F334R8 的芯片性能。
开发板外观如下图所示:
![
board
](
figures/board.png
)
该开发板常用
**板载资源**
如下:
-
MCU:STM32F334R8T6,主频 72MHz,64KB FLASH ,12KB RAM
-
常用外设
-
LED:1个,LD2(绿色,PA5)
-
按键:1个,B1
-
调试接口,板载 ST-LINK 调试器。
开发板更多详细信息请参考意法半导体
[
STM32F334-Nucleo-64 开发板介绍
](
https://www.st.com/en/evaluation-tools/nucleo-f334r8.html
)
。
## 外设支持
本 BSP 目前对外设的支持情况如下:
|
**片上外设**
|
**支持情况**
|
**备注**
|
| :------------ | :----------: | :-----------------------------------: |
| GPIO | 支持 | PA0, PA1... ---> PIN: 0, 1...63 |
| UART | 支持 | UART2 |
## 使用说明
使用说明分为如下两个章节:
-
快速上手
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
-
进阶使用
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
### 快速上手
本 BSP 为开发者提供 MDK4、MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
#### 硬件连接
使用 Type-A to Mini-B 线连接开发板和 PC 供电。
#### 编译下载
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
> 工程默认配置使用 ST-LINK 仿真器下载程序,点击下载按钮即可下载程序到开发板
#### 运行结果
下载程序成功之后,系统会自动运行,绿色 LED 会周期性闪烁。
连接开发板对应串口到 PC, 在终端工具里打开相应的串口,复位设备后,可以看到 RT-Thread 的输出信息:
```
bash
\
| /
- RT - Thread Operating System
/ |
\
5.0.1 build Jun 3 2023 01:29:39
2006 - 2022 Copyright by RT-Thread team
msh
>
```
### 进阶使用
此 BSP 默认只开启了 GPIO 和 串口2 的功能,若需要利用 ENV 工具对BSP 进行配置,步骤如下:
1.
在 bsp 下打开 env 工具。
2.
输入
`menuconfig`
命令配置工程,配置好之后保存退出。
3.
输入
`pkgs --update`
命令更新软件包。
4.
输入
`scons --target=mdk4/mdk5/iar`
命令重新生成工程。
本章节更多详细的介绍请参考
[
STM32 系列 BSP 外设驱动使用教程
](
../docs/STM32系列BSP外设驱动使用教程.md
)
。
## 注意事项
-
暂无
## 联系人信息
维护人:
-
[
tangzz98
](
https://github.com/tangzz98
)
, 邮箱:
<tangz98@outlook.com>
bsp/stm32/stm32f334-st-nucleo/SConscript
0 → 100644
浏览文件 @
26ac8065
# for module compiling
import
os
Import
(
'RTT_ROOT'
)
from
building
import
*
cwd
=
GetCurrentDir
()
objs
=
[]
list
=
os
.
listdir
(
cwd
)
for
d
in
list
:
path
=
os
.
path
.
join
(
cwd
,
d
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
path
,
'SConscript'
)):
objs
=
objs
+
SConscript
(
os
.
path
.
join
(
d
,
'SConscript'
))
Return
(
'objs'
)
bsp/stm32/stm32f334-st-nucleo/SConstruct
0 → 100644
浏览文件 @
26ac8065
import
os
import
sys
import
rtconfig
if
os
.
getenv
(
'RTT_ROOT'
):
RTT_ROOT
=
os
.
getenv
(
'RTT_ROOT'
)
else
:
RTT_ROOT
=
os
.
path
.
normpath
(
os
.
getcwd
()
+
'/../../..'
)
sys
.
path
=
sys
.
path
+
[
os
.
path
.
join
(
RTT_ROOT
,
'tools'
)]
try
:
from
building
import
*
except
:
print
(
'Cannot found RT-Thread root directory, please check RTT_ROOT'
)
print
(
RTT_ROOT
)
exit
(
-
1
)
TARGET
=
'rt-thread.'
+
rtconfig
.
TARGET_EXT
DefaultEnvironment
(
tools
=
[])
env
=
Environment
(
tools
=
[
'mingw'
],
AS
=
rtconfig
.
AS
,
ASFLAGS
=
rtconfig
.
AFLAGS
,
CC
=
rtconfig
.
CC
,
CFLAGS
=
rtconfig
.
CFLAGS
,
AR
=
rtconfig
.
AR
,
ARFLAGS
=
'-rc'
,
CXX
=
rtconfig
.
CXX
,
CXXFLAGS
=
rtconfig
.
CXXFLAGS
,
LINK
=
rtconfig
.
LINK
,
LINKFLAGS
=
rtconfig
.
LFLAGS
)
env
.
PrependENVPath
(
'PATH'
,
rtconfig
.
EXEC_PATH
)
if
rtconfig
.
PLATFORM
in
[
'iccarm'
]:
env
.
Replace
(
CCCOM
=
[
'$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'
])
env
.
Replace
(
ARFLAGS
=
[
''
])
env
.
Replace
(
LINKCOM
=
env
[
"LINKCOM"
]
+
' --map rt-thread.map'
)
Export
(
'RTT_ROOT'
)
Export
(
'rtconfig'
)
SDK_ROOT
=
os
.
path
.
abspath
(
'./'
)
if
os
.
path
.
exists
(
SDK_ROOT
+
'/libraries'
):
libraries_path_prefix
=
SDK_ROOT
+
'/libraries'
else
:
libraries_path_prefix
=
os
.
path
.
dirname
(
SDK_ROOT
)
+
'/libraries'
SDK_LIB
=
libraries_path_prefix
Export
(
'SDK_LIB'
)
# prepare building environment
objs
=
PrepareBuilding
(
env
,
RTT_ROOT
,
has_libcpu
=
False
)
stm32_library
=
'STM32F3xx_HAL'
rtconfig
.
BSP_LIBRARY_TYPE
=
stm32_library
# include libraries
objs
.
extend
(
SConscript
(
os
.
path
.
join
(
libraries_path_prefix
,
stm32_library
,
'SConscript'
),
variant_dir
=
os
.
path
.
join
(
'build/libraries/'
,
stm32_library
),
duplicate
=
0
))
# include drivers
objs
.
extend
(
SConscript
(
os
.
path
.
join
(
libraries_path_prefix
,
'HAL_Drivers'
,
'SConscript'
),
variant_dir
=
'build/libraries/HAL_Drivers'
,
duplicate
=
0
))
# make a building
DoBuilding
(
TARGET
,
objs
)
bsp/stm32/stm32f334-st-nucleo/applications/SConscript
0 → 100644
浏览文件 @
26ac8065
from
building
import
*
import
os
cwd
=
GetCurrentDir
()
src
=
Glob
(
'*.c'
)
CPPPATH
=
[
cwd
]
group
=
DefineGroup
(
'Applications'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
)
list
=
os
.
listdir
(
cwd
)
for
item
in
list
:
if
os
.
path
.
isfile
(
os
.
path
.
join
(
cwd
,
item
,
'SConscript'
)):
group
=
group
+
SConscript
(
os
.
path
.
join
(
item
,
'SConscript'
))
Return
(
'group'
)
bsp/stm32/stm32f334-st-nucleo/applications/main.c
0 → 100644
浏览文件 @
26ac8065
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2023-06-05 tangzz98 first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>
int
main
(
void
)
{
/* LED pin: PB13 */
rt_uint16_t
led
=
rt_pin_get
(
"PA.5"
);
/* set LED pin mode to output */
rt_pin_mode
(
led
,
PIN_MODE_OUTPUT
);
while
(
1
)
{
rt_pin_write
(
led
,
PIN_HIGH
);
rt_thread_mdelay
(
500
);
rt_pin_write
(
led
,
PIN_LOW
);
rt_thread_mdelay
(
500
);
}
return
RT_EOK
;
}
bsp/stm32/stm32f334-st-nucleo/board/.ignore_format.yml
0 → 100644
浏览文件 @
26ac8065
# files format check exclude path, please follow the instructions below to modify;
# If you need to exclude an entire folder, add the folder path in dir_path;
# If you need to exclude a file, add the path to the file in file_path.
dir_path
:
-
CubeMX_Config
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/.mxproject
0 → 100644
浏览文件 @
26ac8065
[PreviousLibFiles]
LibFiles=Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_tim.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_tim_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_uart.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_usart.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_uart_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_def.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_rcc.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_rcc_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_bus.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_rcc.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_crs.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_system.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_utils.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_gpio.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_gpio_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_gpio.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_dma_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_dma.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_dma.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_cortex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_cortex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_pwr.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_pwr_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_pwr.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_flash.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_flash_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_i2c.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_i2c_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_exti.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_exti.h;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_uart.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_uart_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_gpio.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_dma.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_cortex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c_ex.c;Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_exti.c;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_tim.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_tim_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_uart.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_usart.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_uart_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_def.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_rcc.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_rcc_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_bus.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_rcc.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_crs.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_system.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_utils.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_gpio.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_gpio_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_gpio.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_dma_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_dma.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_dma.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_cortex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_cortex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_pwr.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_pwr_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_pwr.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_flash.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_flash_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_i2c.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_i2c_ex.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_hal_exti.h;Drivers\STM32F3xx_HAL_Driver\Inc\stm32f3xx_ll_exti.h;Drivers\CMSIS\Device\ST\STM32F3xx\Include\stm32f334x8.h;Drivers\CMSIS\Device\ST\STM32F3xx\Include\stm32f3xx.h;Drivers\CMSIS\Device\ST\STM32F3xx\Include\system_stm32f3xx.h;Drivers\CMSIS\Device\ST\STM32F3xx\Source\Templates\system_stm32f3xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h;
[PreviousUsedKeilFiles]
SourceFiles=..\Core\Src\main.c;..\Core\Src\stm32f3xx_it.c;..\Core\Src\stm32f3xx_hal_msp.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_uart.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_uart_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_gpio.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_dma.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_cortex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_exti.c;..\Drivers\CMSIS\Device\ST\STM32F3xx\Source\Templates\system_stm32f3xx.c;..\Core\Src\system_stm32f3xx.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_tim_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_uart.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_uart_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_rcc_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_gpio.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_dma.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_cortex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pwr_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_flash_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_i2c_ex.c;..\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_exti.c;..\Drivers\CMSIS\Device\ST\STM32F3xx\Source\Templates\system_stm32f3xx.c;..\Core\Src\system_stm32f3xx.c;;;
HeaderPath=..\Drivers\STM32F3xx_HAL_Driver\Inc;..\Drivers\STM32F3xx_HAL_Driver\Inc\Legacy;..\Drivers\CMSIS\Device\ST\STM32F3xx\Include;..\Drivers\CMSIS\Include;..\Core\Inc;
CDefines=USE_HAL_DRIVER;STM32F334x8;USE_HAL_DRIVER;USE_HAL_DRIVER;
[PreviousGenFiles]
AdvancedFolderStructure=true
HeaderFileListSize=3
HeaderFiles#0=..\Core\Inc\stm32f3xx_it.h
HeaderFiles#1=..\Core\Inc\stm32f3xx_hal_conf.h
HeaderFiles#2=..\Core\Inc\main.h
HeaderFolderListSize=1
HeaderPath#0=..\Core\Inc
HeaderFiles=;
SourceFileListSize=3
SourceFiles#0=..\Core\Src\stm32f3xx_it.c
SourceFiles#1=..\Core\Src\stm32f3xx_hal_msp.c
SourceFiles#2=..\Core\Src\main.c
SourceFolderListSize=1
SourcePath#0=..\Core\Src
SourceFiles=;
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/CubeMX_Config.ioc
0 → 100644
浏览文件 @
26ac8065
#MicroXplorer Configuration settings - do not modify
CAD.formats=
CAD.pinconfig=
CAD.provider=
File.Version=6
GPIO.groupedBy=
KeepUserPlacement=false
Mcu.CPN=STM32F334R8T6
Mcu.Family=STM32F3
Mcu.IP0=NVIC
Mcu.IP1=RCC
Mcu.IP2=SYS
Mcu.IP3=USART2
Mcu.IPNb=4
Mcu.Name=STM32F334R(6-8)Tx
Mcu.Package=LQFP64
Mcu.Pin0=PC14 / OSC32_IN
Mcu.Pin1=PC15 / OSC32_OUT
Mcu.Pin2=PF0 / OSC_IN
Mcu.Pin3=PF1 / OSC_OUT
Mcu.Pin4=PA2
Mcu.Pin5=PA3
Mcu.Pin6=PA13
Mcu.Pin7=PA14
Mcu.Pin8=VP_SYS_VS_Systick
Mcu.PinsNb=9
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F334R8Tx
MxCube.Version=6.8.1
MxDb.Version=DB.6.0.81
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
PA13.Mode=Serial_Wire
PA13.Signal=SYS_JTMS-SWDIO
PA14.Mode=Serial_Wire
PA14.Signal=SYS_JTCK-SWCLK
PA2.Mode=Asynchronous
PA2.Signal=USART2_TX
PA3.Mode=Asynchronous
PA3.Signal=USART2_RX
PC14\ /\ OSC32_IN.Mode=LSE-External-Oscillator
PC14\ /\ OSC32_IN.Signal=RCC_OSC32_IN
PC15\ /\ OSC32_OUT.Mode=LSE-External-Oscillator
PC15\ /\ OSC32_OUT.Signal=RCC_OSC32_OUT
PF0\ /\ OSC_IN.Mode=HSE-External-Oscillator
PF0\ /\ OSC_IN.Signal=RCC_OSC_IN
PF1\ /\ OSC_OUT.Mode=HSE-External-Oscillator
PF1\ /\ OSC_OUT.Signal=RCC_OSC_OUT
PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false
ProjectManager.CompilerOptimize=6
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=false
ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=true
ProjectManager.DeletePrevious=true
ProjectManager.DeviceId=STM32F334R8Tx
ProjectManager.FirmwarePackage=STM32Cube FW_F3 V1.11.4
ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x200
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=0
ProjectManager.MainLocation=Core/Src
ProjectManager.NoMain=false
ProjectManager.PreviousToolchain=
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=CubeMX_Config.ioc
ProjectManager.ProjectName=CubeMX_Config
ProjectManager.ProjectStructure=
ProjectManager.RegisterCallBack=
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=MDK-ARM V5
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_USART2_UART_Init-USART2-false-HAL-true
RCC.ADC12outputFreq_Value=72000000
RCC.AHBFreq_Value=72000000
RCC.APB1CLKDivider=RCC_HCLK_DIV2
RCC.APB1Freq_Value=36000000
RCC.APB1TimFreq_Value=72000000
RCC.APB2Freq_Value=72000000
RCC.APB2TimFreq_Value=72000000
RCC.CortexFreq_Value=72000000
RCC.FCLKCortexFreq_Value=72000000
RCC.FamilyName=M
RCC.HCLKFreq_Value=72000000
RCC.HRTIM1Freq_Value=72000000
RCC.HSEPLLFreq_Value=8000000
RCC.HSE_VALUE=8000000
RCC.HSIPLLFreq_Value=4000000
RCC.HSI_VALUE=8000000
RCC.I2C1Freq_Value=8000000
RCC.IPParameters=ADC12outputFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HRTIM1Freq_Value,HSEPLLFreq_Value,HSE_VALUE,HSIPLLFreq_Value,HSI_VALUE,I2C1Freq_Value,LSI_VALUE,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtual,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSourceVirtual,TIM1Freq_Value,TIM2Freq_Value,USART1Freq_Value,VCOOutput2Freq_Value
RCC.LSI_VALUE=40000
RCC.MCOFreq_Value=72000000
RCC.PLLCLKFreq_Value=72000000
RCC.PLLMCOFreq_Value=72000000
RCC.PLLMUL=RCC_PLL_MUL9
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
RCC.RTCFreq_Value=40000
RCC.RTCHSEDivFreq_Value=250000
RCC.SYSCLKFreq_VALUE=72000000
RCC.SYSCLKSourceVirtual=RCC_SYSCLKSOURCE_PLLCLK
RCC.TIM1Freq_Value=72000000
RCC.TIM2Freq_Value=72000000
RCC.USART1Freq_Value=36000000
RCC.VCOOutput2Freq_Value=8000000
USART2.IPParameters=VirtualMode-Asynchronous
USART2.VirtualMode-Asynchronous=VM_ASYNC
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
board=custom
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/Inc/main.h
0 → 100644
浏览文件 @
26ac8065
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f3xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void
Error_Handler
(
void
);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif
/* __MAIN_H */
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/Inc/stm32f3xx_hal_conf.h
0 → 100644
浏览文件 @
26ac8065
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32f3xx_hal_conf.h
* @brief HAL configuration file.
******************************************************************************
* @attention
*
* Copyright (c) 2016 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F3xx_HAL_CONF_H
#define __STM32F3xx_HAL_CONF_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* ########################## Module Selection ############################## */
/**
* @brief This is the list of modules to be used in the HAL driver
*/
#define HAL_MODULE_ENABLED
/*#define HAL_ADC_MODULE_ENABLED */
/*#define HAL_CRYP_MODULE_ENABLED */
/*#define HAL_CAN_MODULE_ENABLED */
/*#define HAL_CEC_MODULE_ENABLED */
/*#define HAL_NAND_MODULE_ENABLED */
/*#define HAL_NOR_MODULE_ENABLED */
/*#define HAL_PCCARD_MODULE_ENABLED */
/*#define HAL_SRAM_MODULE_ENABLED */
/*#define HAL_HRTIM_MODULE_ENABLED */
/*#define HAL_OPAMP_MODULE_ENABLED */
/*#define HAL_SDADC_MODULE_ENABLED */
/*#define HAL_TSC_MODULE_ENABLED */
/*#define HAL_COMP_MODULE_ENABLED */
/*#define HAL_CRC_MODULE_ENABLED */
/*#define HAL_CRYP_MODULE_ENABLED */
/*#define HAL_DAC_MODULE_ENABLED */
/*#define HAL_I2S_MODULE_ENABLED */
/*#define HAL_IWDG_MODULE_ENABLED */
/*#define HAL_LCD_MODULE_ENABLED */
/*#define HAL_LPTIM_MODULE_ENABLED */
/*#define HAL_RNG_MODULE_ENABLED */
/*#define HAL_RTC_MODULE_ENABLED */
/*#define HAL_SPI_MODULE_ENABLED */
/*#define HAL_TIM_MODULE_ENABLED */
#define HAL_UART_MODULE_ENABLED
/*#define HAL_USART_MODULE_ENABLED */
/*#define HAL_IRDA_MODULE_ENABLED */
/*#define HAL_SMARTCARD_MODULE_ENABLED */
/*#define HAL_SMBUS_MODULE_ENABLED */
/*#define HAL_WWDG_MODULE_ENABLED */
/*#define HAL_PCD_MODULE_ENABLED */
#define HAL_GPIO_MODULE_ENABLED
#define HAL_EXTI_MODULE_ENABLED
/* #define HAL_CAN_LEGACY_MODULE_ENABLED */
#define HAL_DMA_MODULE_ENABLED
#define HAL_RCC_MODULE_ENABLED
#define HAL_FLASH_MODULE_ENABLED
#define HAL_PWR_MODULE_ENABLED
#define HAL_CORTEX_MODULE_ENABLED
#define HAL_I2C_MODULE_ENABLED
/* ########################## HSE/HSI Values adaptation ##################### */
/**
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
* 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).
*/
#if !defined (HSE_VALUE)
#define HSE_VALUE ((uint32_t)8000000)
/*!< Value of the External oscillator in Hz */
#endif
/* HSE_VALUE */
/**
* @brief In the following line adjust the External High Speed oscillator (HSE) Startup
* Timeout value
*/
#if !defined (HSE_STARTUP_TIMEOUT)
#define HSE_STARTUP_TIMEOUT ((uint32_t)100)
/*!< Time out for HSE start up, in ms */
#endif
/* HSE_STARTUP_TIMEOUT */
/**
* @brief Internal High Speed oscillator (HSI) value.
* This value is used by the RCC HAL module to compute the system frequency
* (when HSI is used as system clock source, directly or through the PLL).
*/
#if !defined (HSI_VALUE)
#define HSI_VALUE ((uint32_t)8000000)
/*!< Value of the Internal oscillator in Hz*/
#endif
/* HSI_VALUE */
/**
* @brief In the following line adjust the Internal High Speed oscillator (HSI) Startup
* Timeout value
*/
#if !defined (HSI_STARTUP_TIMEOUT)
#define HSI_STARTUP_TIMEOUT ((uint32_t)5000)
/*!< Time out for HSI start up */
#endif
/* HSI_STARTUP_TIMEOUT */
/**
* @brief Internal Low Speed oscillator (LSI) value.
*/
#if !defined (LSI_VALUE)
#define LSI_VALUE ((uint32_t)40000)
#endif
/* LSI_VALUE */
/*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations
in voltage and temperature. */
/**
* @brief External Low Speed oscillator (LSE) value.
*/
#if !defined (LSE_VALUE)
#define LSE_VALUE ((uint32_t)32768)
/*!< Value of the External Low Speed oscillator in Hz */
#endif
/* LSE_VALUE */
/**
* @brief Time out for LSE start up value in ms.
*/
#if !defined (LSE_STARTUP_TIMEOUT)
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000)
/*!< Time out for LSE start up, in ms */
#endif
/* LSE_STARTUP_TIMEOUT */
/**
* @brief External clock source for I2S peripheral
* This value is used by the I2S HAL module to compute the I2S clock source
* frequency, this source is inserted directly through I2S_CKIN pad.
* - External clock generated through external PLL component on EVAL 303 (based on MCO or crystal)
* - External clock not generated on EVAL 373
*/
#if !defined (EXTERNAL_CLOCK_VALUE)
#define EXTERNAL_CLOCK_VALUE ((uint32_t)8000000)
/*!< Value of the External oscillator in Hz*/
#endif
/* EXTERNAL_CLOCK_VALUE */
/* Tip: To avoid modifying this file each time you need to use different HSE,
=== you can define the HSE value in your toolchain compiler preprocessor. */
/* ########################### System Configuration ######################### */
/**
* @brief This is the HAL system configuration section
*/
#define VDD_VALUE ((uint32_t)3300)
/*!< Value of VDD in mv */
#define TICK_INT_PRIORITY ((uint32_t)15)
/*!< tick interrupt priority (lowest by default) */
#define USE_RTOS 0
#define PREFETCH_ENABLE 1
#define INSTRUCTION_CACHE_ENABLE 0
#define DATA_CACHE_ENABLE 0
#define USE_SPI_CRC 0U
#define USE_HAL_ADC_REGISTER_CALLBACKS 0U
/* ADC register callback disabled */
#define USE_HAL_CAN_REGISTER_CALLBACKS 0U
/* CAN register callback disabled */
#define USE_HAL_COMP_REGISTER_CALLBACKS 0U
/* COMP register callback disabled */
#define USE_HAL_CEC_REGISTER_CALLBACKS 0U
/* CEC register callback disabled */
#define USE_HAL_DAC_REGISTER_CALLBACKS 0U
/* DAC register callback disabled */
#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U
/* SRAM register callback disabled */
#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U
/* SMBUS register callback disabled */
#define USE_HAL_NAND_REGISTER_CALLBACKS 0U
/* NAND register callback disabled */
#define USE_HAL_NOR_REGISTER_CALLBACKS 0U
/* NOR register callback disabled */
#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U
/* PCCARD register callback disabled */
#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U
/* HRTIM register callback disabled */
#define USE_HAL_I2C_REGISTER_CALLBACKS 0U
/* I2C register callback disabled */
#define USE_HAL_UART_REGISTER_CALLBACKS 0U
/* UART register callback disabled */
#define USE_HAL_USART_REGISTER_CALLBACKS 0U
/* USART register callback disabled */
#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U
/* IRDA register callback disabled */
#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U
/* SMARTCARD register callback disabled */
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U
/* WWDG register callback disabled */
#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U
/* OPAMP register callback disabled */
#define USE_HAL_RTC_REGISTER_CALLBACKS 0U
/* RTC register callback disabled */
#define USE_HAL_SPI_REGISTER_CALLBACKS 0U
/* SPI register callback disabled */
#define USE_HAL_I2S_REGISTER_CALLBACKS 0U
/* I2S register callback disabled */
#define USE_HAL_TIM_REGISTER_CALLBACKS 0U
/* TIM register callback disabled */
#define USE_HAL_TSC_REGISTER_CALLBACKS 0U
/* TSC register callback disabled */
#define USE_HAL_PCD_REGISTER_CALLBACKS 0U
/* PCD register callback disabled */
/* ########################## Assert Selection ############################## */
/**
* @brief Uncomment the line below to expanse the "assert_param" macro in the
* HAL drivers code
*/
/* #define USE_FULL_ASSERT 1U */
/* Includes ------------------------------------------------------------------*/
/**
* @brief Include module's header file
*/
#ifdef HAL_RCC_MODULE_ENABLED
#include "stm32f3xx_hal_rcc.h"
#endif
/* HAL_RCC_MODULE_ENABLED */
#ifdef HAL_GPIO_MODULE_ENABLED
#include "stm32f3xx_hal_gpio.h"
#endif
/* HAL_GPIO_MODULE_ENABLED */
#ifdef HAL_EXTI_MODULE_ENABLED
#include "stm32f3xx_hal_exti.h"
#endif
/* HAL_EXTI_MODULE_ENABLED */
#ifdef HAL_DMA_MODULE_ENABLED
#include "stm32f3xx_hal_dma.h"
#endif
/* HAL_DMA_MODULE_ENABLED */
#ifdef HAL_CORTEX_MODULE_ENABLED
#include "stm32f3xx_hal_cortex.h"
#endif
/* HAL_CORTEX_MODULE_ENABLED */
#ifdef HAL_ADC_MODULE_ENABLED
#include "stm32f3xx_hal_adc.h"
#endif
/* HAL_ADC_MODULE_ENABLED */
#ifdef HAL_CAN_MODULE_ENABLED
#include "stm32f3xx_hal_can.h"
#endif
/* HAL_CAN_MODULE_ENABLED */
#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
#include "stm32f3xx_hal_can_legacy.h"
#endif
/* HAL_CAN_LEGACY_MODULE_ENABLED */
#ifdef HAL_CEC_MODULE_ENABLED
#include "stm32f3xx_hal_cec.h"
#endif
/* HAL_CEC_MODULE_ENABLED */
#ifdef HAL_COMP_MODULE_ENABLED
#include "stm32f3xx_hal_comp.h"
#endif
/* HAL_COMP_MODULE_ENABLED */
#ifdef HAL_CRC_MODULE_ENABLED
#include "stm32f3xx_hal_crc.h"
#endif
/* HAL_CRC_MODULE_ENABLED */
#ifdef HAL_DAC_MODULE_ENABLED
#include "stm32f3xx_hal_dac.h"
#endif
/* HAL_DAC_MODULE_ENABLED */
#ifdef HAL_FLASH_MODULE_ENABLED
#include "stm32f3xx_hal_flash.h"
#endif
/* HAL_FLASH_MODULE_ENABLED */
#ifdef HAL_SRAM_MODULE_ENABLED
#include "stm32f3xx_hal_sram.h"
#endif
/* HAL_SRAM_MODULE_ENABLED */
#ifdef HAL_NOR_MODULE_ENABLED
#include "stm32f3xx_hal_nor.h"
#endif
/* HAL_NOR_MODULE_ENABLED */
#ifdef HAL_NAND_MODULE_ENABLED
#include "stm32f3xx_hal_nand.h"
#endif
/* HAL_NAND_MODULE_ENABLED */
#ifdef HAL_PCCARD_MODULE_ENABLED
#include "stm32f3xx_hal_pccard.h"
#endif
/* HAL_PCCARD_MODULE_ENABLED */
#ifdef HAL_HRTIM_MODULE_ENABLED
#include "stm32f3xx_hal_hrtim.h"
#endif
/* HAL_HRTIM_MODULE_ENABLED */
#ifdef HAL_I2C_MODULE_ENABLED
#include "stm32f3xx_hal_i2c.h"
#endif
/* HAL_I2C_MODULE_ENABLED */
#ifdef HAL_I2S_MODULE_ENABLED
#include "stm32f3xx_hal_i2s.h"
#endif
/* HAL_I2S_MODULE_ENABLED */
#ifdef HAL_IRDA_MODULE_ENABLED
#include "stm32f3xx_hal_irda.h"
#endif
/* HAL_IRDA_MODULE_ENABLED */
#ifdef HAL_IWDG_MODULE_ENABLED
#include "stm32f3xx_hal_iwdg.h"
#endif
/* HAL_IWDG_MODULE_ENABLED */
#ifdef HAL_OPAMP_MODULE_ENABLED
#include "stm32f3xx_hal_opamp.h"
#endif
/* HAL_OPAMP_MODULE_ENABLED */
#ifdef HAL_PCD_MODULE_ENABLED
#include "stm32f3xx_hal_pcd.h"
#endif
/* HAL_PCD_MODULE_ENABLED */
#ifdef HAL_PWR_MODULE_ENABLED
#include "stm32f3xx_hal_pwr.h"
#endif
/* HAL_PWR_MODULE_ENABLED */
#ifdef HAL_RTC_MODULE_ENABLED
#include "stm32f3xx_hal_rtc.h"
#endif
/* HAL_RTC_MODULE_ENABLED */
#ifdef HAL_SDADC_MODULE_ENABLED
#include "stm32f3xx_hal_sdadc.h"
#endif
/* HAL_SDADC_MODULE_ENABLED */
#ifdef HAL_SMARTCARD_MODULE_ENABLED
#include "stm32f3xx_hal_smartcard.h"
#endif
/* HAL_SMARTCARD_MODULE_ENABLED */
#ifdef HAL_SMBUS_MODULE_ENABLED
#include "stm32f3xx_hal_smbus.h"
#endif
/* HAL_SMBUS_MODULE_ENABLED */
#ifdef HAL_SPI_MODULE_ENABLED
#include "stm32f3xx_hal_spi.h"
#endif
/* HAL_SPI_MODULE_ENABLED */
#ifdef HAL_TIM_MODULE_ENABLED
#include "stm32f3xx_hal_tim.h"
#endif
/* HAL_TIM_MODULE_ENABLED */
#ifdef HAL_TSC_MODULE_ENABLED
#include "stm32f3xx_hal_tsc.h"
#endif
/* HAL_TSC_MODULE_ENABLED */
#ifdef HAL_UART_MODULE_ENABLED
#include "stm32f3xx_hal_uart.h"
#endif
/* HAL_UART_MODULE_ENABLED */
#ifdef HAL_USART_MODULE_ENABLED
#include "stm32f3xx_hal_usart.h"
#endif
/* HAL_USART_MODULE_ENABLED */
#ifdef HAL_WWDG_MODULE_ENABLED
#include "stm32f3xx_hal_wwdg.h"
#endif
/* HAL_WWDG_MODULE_ENABLED */
/* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT
/**
* @brief The assert_param macro is used for function's parameters check.
* @param expr If expr is false, it calls assert_failed function
* which reports the name of the source file and the source
* line number of the call that failed.
* If expr is true, it returns no value.
* @retval None
*/
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
void
assert_failed
(
uint8_t
*
file
,
uint32_t
line
);
#else
#define assert_param(expr) ((void)0U)
#endif
/* USE_FULL_ASSERT */
#ifdef __cplusplus
}
#endif
#endif
/* __STM32F3xx_HAL_CONF_H */
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/Inc/stm32f3xx_it.h
0 → 100644
浏览文件 @
26ac8065
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32f3xx_it.h
* @brief This file contains the headers of the interrupt handlers.
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F3xx_IT_H
#define __STM32F3xx_IT_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
void
NMI_Handler
(
void
);
void
HardFault_Handler
(
void
);
void
MemManage_Handler
(
void
);
void
BusFault_Handler
(
void
);
void
UsageFault_Handler
(
void
);
void
SVC_Handler
(
void
);
void
DebugMon_Handler
(
void
);
void
PendSV_Handler
(
void
);
void
SysTick_Handler
(
void
);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
#ifdef __cplusplus
}
#endif
#endif
/* __STM32F3xx_IT_H */
bsp/stm32/stm32f334-st-nucleo/board/CubeMX_Config/Src/stm32f3xx_hal_msp.c
0 → 100644
浏览文件 @
26ac8065
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32f3xx_hal_msp.c
* @brief This file provides code for the MSP Initialization
* and de-Initialization codes.
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN TD */
/* USER CODE END TD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
/* USER CODE END Define */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN Macro */
/* USER CODE END Macro */
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* External functions --------------------------------------------------------*/
/* USER CODE BEGIN ExternalFunctions */
/* USER CODE END ExternalFunctions */
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* Initializes the Global MSP.
*/
void
HAL_MspInit
(
void
)
{
/* USER CODE BEGIN MspInit 0 */
/* USER CODE END MspInit 0 */
__HAL_RCC_SYSCFG_CLK_ENABLE
();
__HAL_RCC_PWR_CLK_ENABLE
();
/* System interrupt init*/
/* USER CODE BEGIN MspInit 1 */
/* USER CODE END MspInit 1 */
}
/**
* @brief UART MSP Initialization
* This function configures the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void
HAL_UART_MspInit
(
UART_HandleTypeDef
*
huart
)
{
GPIO_InitTypeDef
GPIO_InitStruct
=
{
0
};
if
(
huart
->
Instance
==
USART2
)
{
/* USER CODE BEGIN USART2_MspInit 0 */
/* USER CODE END USART2_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USART2_CLK_ENABLE
();
__HAL_RCC_GPIOA_CLK_ENABLE
();
/**USART2 GPIO Configuration
PA2 ------> USART2_TX
PA3 ------> USART2_RX
*/
GPIO_InitStruct
.
Pin
=
GPIO_PIN_2
|
GPIO_PIN_3
;
GPIO_InitStruct
.
Mode
=
GPIO_MODE_AF_PP
;
GPIO_InitStruct
.
Pull
=
GPIO_NOPULL
;
GPIO_InitStruct
.
Speed
=
GPIO_SPEED_FREQ_HIGH
;
GPIO_InitStruct
.
Alternate
=
GPIO_AF7_USART2
;
HAL_GPIO_Init
(
GPIOA
,
&
GPIO_InitStruct
);
/* USER CODE BEGIN USART2_MspInit 1 */
/* USER CODE END USART2_MspInit 1 */
}
}
/**
* @brief UART MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param huart: UART handle pointer
* @retval None
*/
void
HAL_UART_MspDeInit
(
UART_HandleTypeDef
*
huart
)
{
if
(
huart
->
Instance
==
USART2
)
{
/* USER CODE BEGIN USART2_MspDeInit 0 */
/* USER CODE END USART2_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USART2_CLK_DISABLE
();
/**USART2 GPIO Configuration
PA2 ------> USART2_TX
PA3 ------> USART2_RX
*/
HAL_GPIO_DeInit
(
GPIOA
,
GPIO_PIN_2
|
GPIO_PIN_3
);
/* USER CODE BEGIN USART2_MspDeInit 1 */
/* USER CODE END USART2_MspDeInit 1 */
}
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
bsp/stm32/stm32f334-st-nucleo/board/Kconfig
0 → 100644
浏览文件 @
26ac8065
menu "Hardware Drivers Config"
config SOC_STM32F334R8
bool
select SOC_SERIES_STM32F3
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
menu "Onboard Peripheral Drivers"
endmenu
menu "On-chip Peripheral Drivers"
config BSP_USING_GPIO
bool "Enable GPIO"
select RT_USING_PIN
default y
menuconfig BSP_USING_UART
bool "Enable UART"
default y
select RT_USING_SERIAL
if BSP_USING_UART
config BSP_USING_UART2
bool "Enable UART2"
default y
endif
endmenu
menu "Board extended module Drivers"
endmenu
endmenu
bsp/stm32/stm32f334-st-nucleo/board/SConscript
0 → 100644
浏览文件 @
26ac8065
import
os
import
rtconfig
from
building
import
*
Import
(
'SDK_LIB'
)
cwd
=
GetCurrentDir
()
# add general drivers
src
=
Split
(
'''
board.c
CubeMX_Config/Src/stm32f3xx_hal_msp.c
'''
)
path
=
[
cwd
]
path
+=
[
cwd
+
'/CubeMX_Config/Inc'
]
startup_path_prefix
=
SDK_LIB
if
rtconfig
.
PLATFORM
in
[
'gcc'
]:
src
+=
[
startup_path_prefix
+
'/STM32F3xx_HAL/CMSIS/Device/ST/STM32F3xx/Source/Templates/gcc/startup_stm32f334x8.s'
]
elif
rtconfig
.
PLATFORM
in
[
'armcc'
,
'armclang'
]:
src
+=
[
startup_path_prefix
+
'/STM32F3xx_HAL/CMSIS/Device/ST/STM32F3xx/Source/Templates/arm/startup_stm32f334x8.s'
]
elif
rtconfig
.
PLATFORM
in
[
'iccarm'
]:
src
+=
[
startup_path_prefix
+
'/STM32F3xx_HAL/CMSIS/Device/ST/STM32F3xx/Source/Templates/iar/startup_stm32f334x8.s'
]
# (STM32F301x8) || (STM32F302x8) || (STM32F318xx)
# (STM32F302xC) || (STM32F303xC) || (STM32F358xx)
# (STM32F303x8) || (STM32F334x8) || (STM32F328xx)
# (STM32F302xE) || (STM32F303xE) || (STM32F398xx)
# (STM32F373xC) || (STM32F378xx)
# You can select chips from the list above
CPPDEFINES
=
[
'STM32F334x8'
]
group
=
DefineGroup
(
'Drivers'
,
src
,
depend
=
[
''
],
CPPPATH
=
path
,
CPPDEFINES
=
CPPDEFINES
)
Return
(
'group'
)
bsp/stm32/stm32f334-st-nucleo/board/board.c
0 → 100644
浏览文件 @
26ac8065
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2023-06-05 tangzz98 first version
*/
#include "board.h"
void
SystemClock_Config
(
void
)
{
RCC_OscInitTypeDef
RCC_OscInitStruct
=
{
0
};
RCC_ClkInitTypeDef
RCC_ClkInitStruct
=
{
0
};
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct
.
OscillatorType
=
RCC_OSCILLATORTYPE_HSE
;
RCC_OscInitStruct
.
HSEState
=
RCC_HSE_ON
;
RCC_OscInitStruct
.
HSEPredivValue
=
RCC_HSE_PREDIV_DIV1
;
RCC_OscInitStruct
.
HSIState
=
RCC_HSI_ON
;
RCC_OscInitStruct
.
PLL
.
PLLState
=
RCC_PLL_ON
;
RCC_OscInitStruct
.
PLL
.
PLLSource
=
RCC_PLLSOURCE_HSE
;
RCC_OscInitStruct
.
PLL
.
PLLMUL
=
RCC_PLL_MUL9
;
if
(
HAL_RCC_OscConfig
(
&
RCC_OscInitStruct
)
!=
HAL_OK
)
{
Error_Handler
();
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct
.
ClockType
=
RCC_CLOCKTYPE_HCLK
|
RCC_CLOCKTYPE_SYSCLK
|
RCC_CLOCKTYPE_PCLK1
|
RCC_CLOCKTYPE_PCLK2
;
RCC_ClkInitStruct
.
SYSCLKSource
=
RCC_SYSCLKSOURCE_PLLCLK
;
RCC_ClkInitStruct
.
AHBCLKDivider
=
RCC_SYSCLK_DIV1
;
RCC_ClkInitStruct
.
APB1CLKDivider
=
RCC_HCLK_DIV2
;
RCC_ClkInitStruct
.
APB2CLKDivider
=
RCC_HCLK_DIV1
;
if
(
HAL_RCC_ClockConfig
(
&
RCC_ClkInitStruct
,
FLASH_LATENCY_2
)
!=
HAL_OK
)
{
Error_Handler
();
}
}
bsp/stm32/stm32f334-st-nucleo/board/board.h
0 → 100644
浏览文件 @
26ac8065
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2023-06-05 tangzz98 first version
*/
#ifndef __BOARD_H__
#define __BOARD_H__
#include <rtthread.h>
#include <stm32f3xx.h>
#include "drv_common.h"
#include "drv_gpio.h"
#ifdef __cplusplus
extern
"C"
{
#endif
#define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000)
#define STM32_FLASH_SIZE (64 * 1024)
#define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
#define STM32_SRAM_SIZE 12
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
#if defined(__ARMCC_VERSION)
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
);
#ifdef __cplusplus
}
#endif
#endif
bsp/stm32/stm32f334-st-nucleo/board/linker_scripts/link.icf
0 → 100644
浏览文件 @
26ac8065
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
define symbol __ICFEDIT_region_ROM_end__ = 0x08010000;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x20003000;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x0400;
define symbol __ICFEDIT_size_heap__ = 0x000;
/**** End of ICF editor section. ###ICF###*/
define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
initialize by copy { readwrite };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
place in RAM_region { readwrite, last block CSTACK};
bsp/stm32/stm32f334-st-nucleo/board/linker_scripts/link.lds
0 → 100644
浏览文件 @
26ac8065
/*
* linker script for STM32F4xx with GNU ld
* bernard.xiong 2009-10-14
*/
/* Program Entry, set to mark it as "used" and avoid gc */
MEMORY
{
ROM (rx) : ORIGIN = 0x08000000, LENGTH = 64k /* 64KB flash */
RAM (rw) : ORIGIN = 0x20000000, LENGTH = 12k /* 12K sram */
}
ENTRY(Reset_Handler)
_system_stack_size = 0x400;
SECTIONS
{
.text :
{
. = ALIGN(4);
_stext = .;
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
*(.text) /* remaining code */
*(.text.*) /* remaining code */
*(.rodata) /* read-only data (constants) */
*(.rodata*)
*(.glue_7)
*(.glue_7t)
*(.gnu.linkonce.t*)
/* section information for finsh shell */
. = ALIGN(4);
__fsymtab_start = .;
KEEP(*(FSymTab))
__fsymtab_end = .;
. = ALIGN(4);
__vsymtab_start = .;
KEEP(*(VSymTab))
__vsymtab_end = .;
/* section information for initial. */
. = ALIGN(4);
__rt_init_start = .;
KEEP(*(SORT(.rti_fn*)))
__rt_init_end = .;
. = ALIGN(4);
PROVIDE(__ctors_start__ = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
. = ALIGN(4);
_etext = .;
} > ROM = 0
/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
/* This is used by the startup in order to initialize the .data secion */
_sidata = .;
} > ROM
__exidx_end = .;
/* .data section which is used for initialized data */
.data : AT (_sidata)
{
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_sdata = . ;
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
PROVIDE(__dtors_end__ = .);
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} >RAM
.stack :
{
. = ALIGN(4);
_sstack = .;
. = . + _system_stack_size;
. = ALIGN(4);
_estack = .;
} >RAM
__bss_start = .;
.bss :
{
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */
_sbss = .;
*(.bss)
*(.bss.*)
*(COMMON)
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
*(.bss.init)
} > RAM
__bss_end = .;
_end = .;
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
* Symbols in the DWARF debugging sections are relative to the beginning
* of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
}
bsp/stm32/stm32f334-st-nucleo/board/linker_scripts/link.sct
0 → 100644
浏览文件 @
26ac8065
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00010000 { ; load region size_region
ER_IROM1 0x08000000 0x00010000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20000000 0x00003000 { ; RW data
.ANY (+RW +ZI)
}
}
bsp/stm32/stm32f334-st-nucleo/figures/board.png
0 → 100644
浏览文件 @
26ac8065
2.8 MB
bsp/stm32/stm32f334-st-nucleo/project.ewd
0 → 100644
浏览文件 @
26ac8065
此差异已折叠。
点击以展开。
bsp/stm32/stm32f334-st-nucleo/project.ewp
0 → 100644
浏览文件 @
26ac8065
此差异已折叠。
点击以展开。
bsp/stm32/stm32f334-st-nucleo/project.eww
0 → 100644
浏览文件 @
26ac8065
<?xml version="1.0" encoding="iso-8859-1"?>
<workspace>
<project>
<path>
$WS_DIR$\project.ewp
</path>
</project>
<batchBuild/>
</workspace>
bsp/stm32/stm32f334-st-nucleo/project.uvoptx
0 → 100644
浏览文件 @
26ac8065
此差异已折叠。
点击以展开。
bsp/stm32/stm32f334-st-nucleo/project.uvprojx
0 → 100644
浏览文件 @
26ac8065
此差异已折叠。
点击以展开。
bsp/stm32/stm32f334-st-nucleo/rtconfig.h
0 → 100644
浏览文件 @
26ac8065
此差异已折叠。
点击以展开。
bsp/stm32/stm32f334-st-nucleo/rtconfig.py
0 → 100644
浏览文件 @
26ac8065
import
os
# toolchains options
ARCH
=
'arm'
CPU
=
'cortex-m4'
CROSS_TOOL
=
'gcc'
# bsp lib config
BSP_LIBRARY_TYPE
=
None
if
os
.
getenv
(
'RTT_CC'
):
CROSS_TOOL
=
os
.
getenv
(
'RTT_CC'
)
if
os
.
getenv
(
'RTT_ROOT'
):
RTT_ROOT
=
os
.
getenv
(
'RTT_ROOT'
)
# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if
CROSS_TOOL
==
'gcc'
:
PLATFORM
=
'gcc'
EXEC_PATH
=
r
'C:\Users\XXYYZZ'
elif
CROSS_TOOL
==
'keil'
:
PLATFORM
=
'armcc'
EXEC_PATH
=
r
'C:/Keil_v5'
elif
CROSS_TOOL
==
'iar'
:
PLATFORM
=
'iccarm'
EXEC_PATH
=
r
'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if
os
.
getenv
(
'RTT_EXEC_PATH'
):
EXEC_PATH
=
os
.
getenv
(
'RTT_EXEC_PATH'
)
BUILD
=
'debug'
if
PLATFORM
==
'gcc'
:
# toolchains
PREFIX
=
'arm-none-eabi-'
CC
=
PREFIX
+
'gcc'
AS
=
PREFIX
+
'gcc'
AR
=
PREFIX
+
'ar'
CXX
=
PREFIX
+
'g++'
LINK
=
PREFIX
+
'gcc'
TARGET_EXT
=
'elf'
SIZE
=
PREFIX
+
'size'
OBJDUMP
=
PREFIX
+
'objdump'
OBJCPY
=
PREFIX
+
'objcopy'
DEVICE
=
' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS
=
DEVICE
+
' -Dgcc'
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS
=
DEVICE
+
' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
CPATH
=
''
LPATH
=
''
if
BUILD
==
'debug'
:
CFLAGS
+=
' -O2 -gdwarf-2 -g'
AFLAGS
+=
' -gdwarf-2'
else
:
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
# toolchains
CC
=
'armcc'
CXX
=
'armcc'
AS
=
'armasm'
AR
=
'armar'
LINK
=
'armlink'
TARGET_EXT
=
'axf'
DEVICE
=
' --cpu Cortex-M4.fp '
CFLAGS
=
'-c '
+
DEVICE
+
' --apcs=interwork --c99'
AFLAGS
=
DEVICE
+
' --apcs=interwork '
LFLAGS
=
DEVICE
+
' --scatter "board\linker_scripts\link.sct" --info sizes --info totals --info unused --info veneers --list rt-thread.map --strict'
CFLAGS
+=
' -I'
+
EXEC_PATH
+
'/ARM/ARMCC/include'
LFLAGS
+=
' --libpath='
+
EXEC_PATH
+
'/ARM/ARMCC/lib'
CFLAGS
+=
' -D__MICROLIB '
AFLAGS
+=
' --pd "__MICROLIB SETA 1" '
LFLAGS
+=
' --library_type=microlib '
EXEC_PATH
+=
'/ARM/ARMCC/bin/'
if
BUILD
==
'debug'
:
CFLAGS
+=
' -g -O2'
AFLAGS
+=
' -g'
else
:
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'armclang'
:
# toolchains
CC
=
'armclang'
CXX
=
'armclang'
AS
=
'armasm'
AR
=
'armar'
LINK
=
'armlink'
TARGET_EXT
=
'axf'
DEVICE
=
' --cpu Cortex-M4.fp '
CFLAGS
=
' --target=arm-arm-none-eabi -mcpu=cortex-m4 '
CFLAGS
+=
' -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 '
CFLAGS
+=
' -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar '
CFLAGS
+=
' -gdwarf-3 -ffunction-sections '
AFLAGS
=
DEVICE
+
' --apcs=interwork '
LFLAGS
=
DEVICE
+
' --info sizes --info totals --info unused --info veneers '
LFLAGS
+=
' --list rt-thread.map '
LFLAGS
+=
r
' --strict --scatter "board\linker_scripts\link.sct" '
CFLAGS
+=
' -I'
+
EXEC_PATH
+
'/ARM/ARMCLANG/include'
LFLAGS
+=
' --libpath='
+
EXEC_PATH
+
'/ARM/ARMCLANG/lib'
EXEC_PATH
+=
'/ARM/ARMCLANG/bin/'
if
BUILD
==
'debug'
:
CFLAGS
+=
' -g -O1'
# armclang recommend
AFLAGS
+=
' -g'
else
:
CFLAGS
+=
' -O2'
CXXFLAGS
=
CFLAGS
CFLAGS
+=
' -std=c99'
POST_ACTION
=
'fromelf --bin $TARGET --output rtthread.bin
\n
fromelf -z $TARGET'
elif
PLATFORM
==
'iccarm'
:
# toolchains
CC
=
'iccarm'
CXX
=
'iccarm'
AS
=
'iasmarm'
AR
=
'iarchive'
LINK
=
'ilinkarm'
TARGET_EXT
=
'out'
DEVICE
=
'-Dewarm'
CFLAGS
=
DEVICE
CFLAGS
+=
' --diag_suppress Pa050'
CFLAGS
+=
' --no_cse'
CFLAGS
+=
' --no_unroll'
CFLAGS
+=
' --no_inline'
CFLAGS
+=
' --no_code_motion'
CFLAGS
+=
' --no_tbaa'
CFLAGS
+=
' --no_clustering'
CFLAGS
+=
' --no_scheduling'
CFLAGS
+=
' --endian=little'
CFLAGS
+=
' --cpu=Cortex-M4'
CFLAGS
+=
' -e'
CFLAGS
+=
' --fpu=VFPv4_sp'
CFLAGS
+=
' --dlib_config "'
+
EXEC_PATH
+
'/arm/INC/c/DLib_Config_Normal.h"'
CFLAGS
+=
' --silent'
AFLAGS
=
DEVICE
AFLAGS
+=
' -s+'
AFLAGS
+=
' -w+'
AFLAGS
+=
' -r'
AFLAGS
+=
' --cpu Cortex-M4'
AFLAGS
+=
' --fpu VFPv4_sp'
AFLAGS
+=
' -S'
if
BUILD
==
'debug'
:
CFLAGS
+=
' --debug'
CFLAGS
+=
' -Oh'
else
:
CFLAGS
+=
' -Oh'
LFLAGS
=
' --config "board/linker_scripts/link.icf"'
LFLAGS
+=
' --entry __iar_program_start'
CXXFLAGS
=
CFLAGS
EXEC_PATH
=
EXEC_PATH
+
'/arm/bin/'
POST_ACTION
=
'ielftool --bin $TARGET rtthread.bin'
def
dist_handle
(
BSP_ROOT
,
dist_dir
):
import
sys
cwd_path
=
os
.
getcwd
()
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
BSP_ROOT
),
'tools'
))
from
sdk_dist
import
dist_do_building
dist_do_building
(
BSP_ROOT
,
dist_dir
)
bsp/stm32/stm32f334-st-nucleo/template.ewp
0 → 100644
浏览文件 @
26ac8065
此差异已折叠。
点击以展开。
bsp/stm32/stm32f334-st-nucleo/template.eww
0 → 100644
浏览文件 @
26ac8065
<?xml version="1.0" encoding="iso-8859-1"?>
<workspace>
<project>
<path>
$WS_DIR$\template.ewp
</path>
</project>
<batchBuild/>
</workspace>
bsp/stm32/stm32f334-st-nucleo/template.uvoptx
0 → 100644
浏览文件 @
26ac8065
此差异已折叠。
点击以展开。
bsp/stm32/stm32f334-st-nucleo/template.uvprojx
0 → 100644
浏览文件 @
26ac8065
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录