Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
红岛
rt-thread
提交
c4d0c915
R
rt-thread
项目概览
红岛
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
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,发现更多精彩内容 >>
提交
c4d0c915
编写于
8月 21, 2019
作者:
T
tyustli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp] [stm32] fix drv_flash_l4.c bug
上级
d682c354
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
62 addition
and
8 deletion
+62
-8
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c
+5
-5
bsp/stm32/stm32l452-st-nucleo/board/Kconfig
bsp/stm32/stm32l452-st-nucleo/board/Kconfig
+5
-3
bsp/stm32/stm32l452-st-nucleo/board/SConscript
bsp/stm32/stm32l452-st-nucleo/board/SConscript
+1
-0
bsp/stm32/stm32l452-st-nucleo/board/ports/fal_cfg.h
bsp/stm32/stm32l452-st-nucleo/board/ports/fal_cfg.h
+51
-0
未找到文件。
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c
浏览文件 @
c4d0c915
...
...
@@ -12,8 +12,8 @@
#ifdef BSP_USING_ON_CHIP_FLASH
#include "drv_config.h"
#include "drv_flash.h"
#include "drv_flash.h"
#if defined(PKG_USING_FAL)
#include "fal.h"
#endif
...
...
@@ -53,8 +53,8 @@ static uint32_t GetPage(uint32_t Addr)
static
uint32_t
GetBank
(
uint32_t
Addr
)
{
uint32_t
bank
=
0
;
#if
defined (STM32L432xx)
bank
=
FLASH_BANK_1
;
#if
ndef FLASH_BANK_2
bank
=
FLASH_BANK_1
;
#else
if
(
READ_BIT
(
SYSCFG
->
MEMRMP
,
SYSCFG_MEMRMP_FB_MODE
)
==
0
)
{
...
...
@@ -135,7 +135,7 @@ int stm32_flash_write(rt_uint32_t addr, const uint8_t *buf, size_t size)
LOG_E
(
"ERROR: write outrange flash size! addr is (0x%p)
\n
"
,
(
void
*
)(
addr
+
size
));
return
-
RT_EINVAL
;
}
if
(
addr
%
8
!=
0
)
{
LOG_E
(
"write addr must be 8-byte alignment"
);
...
...
bsp/stm32/stm32l452-st-nucleo/board/Kconfig
浏览文件 @
c4d0c915
...
...
@@ -29,8 +29,8 @@ menu "On-chip Peripheral Drivers"
bool "Enable UART1 RX DMA"
depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
default n
config BSP_USING_UART2
config BSP_USING_UART2
bool "Enable UART2"
default y
...
...
@@ -60,7 +60,9 @@ menu "On-chip Peripheral Drivers"
select BSP_SPI1_TX_USING_DMA
default n
endif
config BSP_USING_ON_CHIP_FLASH
bool "Enable on-chip FLASH"
default n
menuconfig BSP_USING_I2C1
bool "Enable I2C1 BUS (software simulation)"
default n
...
...
bsp/stm32/stm32l452-st-nucleo/board/SConscript
浏览文件 @
c4d0c915
...
...
@@ -14,6 +14,7 @@ CubeMX_Config/Src/stm32l4xx_hal_msp.c
path
=
[
cwd
]
path
+=
[
cwd
+
'/CubeMX_Config/Inc'
]
path
+=
[
cwd
+
'/ports'
]
startup_path_prefix
=
SDK_LIB
...
...
bsp/stm32/stm32l452-st-nucleo/board/ports/fal_cfg.h
0 → 100644
浏览文件 @
c4d0c915
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2018-12-5 SummerGift first version
*/
#ifndef _FAL_CFG_H_
#define _FAL_CFG_H_
#include <rtthread.h>
#include <board.h>
#if defined(BSP_USING_ON_CHIP_FLASH)
extern
const
struct
fal_flash_dev
stm32_onchip_flash
;
#endif
/* BSP_USING_ON_CHIP_FLASH */
/* ========================= Device Configuration ========================== */
#ifdef BSP_USING_ON_CHIP_FLASH
#define ONCHIP_FLASH_DEV &stm32_onchip_flash,
#else
#define ONCHIP_FLASH_DEV
#endif
/* BSP_USING_ON_CHIP_FLASH */
/* flash device table */
#define FAL_FLASH_DEV_TABLE \
{ \
ONCHIP_FLASH_DEV \
}
/* ====================== Partition Configuration ========================== */
#ifdef FAL_PART_HAS_TABLE_CFG
#ifdef BSP_USING_ON_CHIP_FLASH
#define ONCHIP_FLASH_PATITION {FAL_PART_MAGIC_WROD, "app", "onchip_flash", 0, 496 * 1024, 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash", 496* 1024, 16 * 1024, 0},
#else
#define ONCHIP_FLASH_PATITION
#endif
/* partition table */
#define FAL_PART_TABLE \
{ \
ONCHIP_FLASH_PATITION \
}
#endif
/* FAL_PART_HAS_TABLE_CFG */
#endif
/* _FAL_CFG_H_ */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录