Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaobo07
rt-thread
提交
5e0810e7
R
rt-thread
项目概览
Xiaobo07
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5e0810e7
编写于
6月 09, 2022
作者:
Thomas_Fly
提交者:
GitHub
6月 09, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp][stm32l496zg] add on-chip feature (#6056)
* [bsp][stm32l496zg] add on-chip feature
上级
8b60b58b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
82 addition
and
21 deletion
+82
-21
bsp/stm32/stm32l496-st-nucleo/applications/main.c
bsp/stm32/stm32l496-st-nucleo/applications/main.c
+1
-1
bsp/stm32/stm32l496-st-nucleo/board/Kconfig
bsp/stm32/stm32l496-st-nucleo/board/Kconfig
+3
-0
bsp/stm32/stm32l496-st-nucleo/board/SConscript
bsp/stm32/stm32l496-st-nucleo/board/SConscript
+2
-20
bsp/stm32/stm32l496-st-nucleo/board/fal_cfg.h
bsp/stm32/stm32l496-st-nucleo/board/fal_cfg.h
+33
-0
bsp/stm32/stm32l496-st-nucleo/board/mnt_onchip.c
bsp/stm32/stm32l496-st-nucleo/board/mnt_onchip.c
+43
-0
未找到文件。
bsp/stm32/stm32l496-st-nucleo/applications/main.c
浏览文件 @
5e0810e7
/*
* Copyright (c) 2006-202
1
, RT-Thread Development Team
* Copyright (c) 2006-202
2
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
bsp/stm32/stm32l496-st-nucleo/board/Kconfig
浏览文件 @
5e0810e7
...
...
@@ -96,6 +96,9 @@ menu "On-chip Peripheral Drivers"
endif
config BSP_USING_ON_CHIP_FLASH
select RT_USING_DFS
select RT_USING_DFS_ELMFAT
select RT_USING_FAL
bool "Enable on-chip FLASH"
default n
...
...
bsp/stm32/stm32l496-st-nucleo/board/SConscript
浏览文件 @
5e0810e7
...
...
@@ -12,32 +12,14 @@ board.c
CubeMX_Config/Src/stm32l4xx_hal_msp.c
'''
)
if
GetDepend
([
'BSP_USING_QSPI_FLASH'
]):
src
+=
Glob
(
'ports/drv_qspi_flash.c'
)
if
GetDepend
(
'BSP_USING_SPI_LCD'
):
src
=
src
+
[
'ports/drv_lcd.c'
]
if
GetDepend
([
'BSP_USING_ON_CHIP_FLASH'
]):
src
+=
Glob
(
'mnt_onchip.c'
)
if
GetDepend
([
'BSP_USING_SDCARD'
]):
src
+=
Glob
(
'ports/sdcard_port.c'
)
if
GetDepend
([
'BSP_USING_ICM20608'
])
or
GetDepend
([
'BSP_USING_AHT10'
]):
src
+=
Glob
(
'ports/sensor_port.c'
)
if
GetDepend
([
'BSP_USING_AUDIO'
]):
src
+=
Glob
(
'ports/audio/drv_es8388.c'
)
src
+=
Glob
(
'ports/audio/drv_sound.c'
)
if
GetDepend
([
'BSP_USING_AUDIO_RECORD'
]):
src
+=
Glob
(
'ports/audio/drv_mic.c'
)
path
=
[
cwd
]
path
+=
[
cwd
+
'/CubeMX_Config/Inc'
]
path
+=
[
cwd
+
'/ports'
]
if
GetDepend
([
'BSP_USING_AUDIO'
]):
path
+=
[
cwd
+
'/ports/audio'
]
startup_path_prefix
=
SDK_LIB
if
rtconfig
.
PLATFORM
in
[
'gcc'
]:
...
...
bsp/stm32/stm32l496-st-nucleo/board/fal_cfg.h
0 → 100644
浏览文件 @
5e0810e7
/*
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-06-08 supperthomas first version
*/
#ifndef _FAL_CFG_H_
#define _FAL_CFG_H_
#include <rtconfig.h>
#include <board.h>
extern
const
struct
fal_flash_dev
stm32_onchip_flash
;
/* flash device table */
#define FAL_FLASH_DEV_TABLE \
{ \
&stm32_onchip_flash \
}
/* ====================== Partition Configuration ========================== */
#ifdef FAL_PART_HAS_TABLE_CFG
/* partition table */
#define FAL_PART_TABLE \
{ \
{FAL_PART_MAGIC_WORD, "app", "onchip_flash", 0, 512*1024, 0}, \
{FAL_PART_MAGIC_WORD, "flash", "onchip_flash", 512*1024, 512*1024, 0}, \
}
#endif
#endif
/* _FAL_CFG_H_ */
bsp/stm32/stm32l496-st-nucleo/board/mnt_onchip.c
0 → 100644
浏览文件 @
5e0810e7
/*
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-06-08 supperthomas first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include "fal.h"
#include <dfs_fs.h>
#ifdef RT_USING_DFS
#include <dfs_fs.h>
int
mnt_init
(
void
)
{
fal_init
();
#define FS_PARTITION_NAME "flash"
struct
rt_device
*
mtd_dev
;
mtd_dev
=
fal_blk_device_create
(
FS_PARTITION_NAME
);
if
(
dfs_mount
(
FS_PARTITION_NAME
,
"/"
,
"elm"
,
0
,
0
)
==
0
)
{
rt_kprintf
(
"Filesystem initialized!"
);
}
else
{
dfs_mkfs
(
"elm"
,
FS_PARTITION_NAME
);
if
(
dfs_mount
(
FS_PARTITION_NAME
,
"/"
,
"elm"
,
0
,
0
)
!=
0
)
{
rt_kprintf
(
"Failed to initialize filesystem!"
);
}
}
return
0
;
}
INIT_ENV_EXPORT
(
mnt_init
);
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录