Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
flash
STM32F407
原子探索者407的BSP加片外FLASH编译失败
发布于 2021-06-27 17:46:29 浏览:1157
订阅该版
用的是`STUDIO 2.1.0` + 探索者 BSP 勾选了: 1. libc 2. spi bus device drivers 3. MTD NOR FLASH device drivers 4. fal 5. littleFS 之后编译,错误如下: ``` arm-none-eabi-gcc "../libraries/STM32F4xx_HAL/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_usart.c" arm-none-eabi-gcc "../libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f407xx.s" arm-none-eabi-gcc "../libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c" arm-none-eabi-gcc "../libraries/HAL_Drivers/drv_common.c" arm-none-eabi-gcc "../libraries/HAL_Drivers/drv_gpio.c" arm-none-eabi-gcc "../libraries/HAL_Drivers/drv_spi.c" arm-none-eabi-gcc "../libraries/HAL_Drivers/drv_usart.c" arm-none-eabi-gcc "../board/ports/spi_flash_init.c" arm-none-eabi-gcc "../board/CubeMX_Config/Src/stm32f4xx_hal_msp.c" arm-none-eabi-gcc "../board/board.c" arm-none-eabi-gcc "../applications/main.c" In file included from ../board/ports/spi_flash_init.c:12:0: D:\RT-ThreadStudio\workspace\EXPLORER\rt-thread\components\drivers\spi/spi_flash.h:28:33: error: field 'mtd_device' has incomplete type struct rt_mtd_nor_device mtd_device; ^ make: *** [board/ports/subdir.mk:18: board/ports/spi_flash_init.o] Error 1 make: *** Waiting for unfinished jobs.... "make -j8 all" terminated with exit code 2. Build might be incomplete. ```
查看更多
123
认证专家
2021-06-27
这家伙很懒,什么也没写!
楼主可看下这两个文档,能解决你的问题。 https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/application-note/components/dfs/an0012-dfs https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/application-note/components/sfud/an0048-sfud
2
个回答
默认排序
按发布时间排序
Juggernaut
2021-06-28
①②③
搞定,这个BSP里面居然还有个port文件夹,需要修改其中的flash init代码; --- ``` \ | / - RT - Thread Operating System / | \ 4.0.3 build Jun 28 2021 2006 - 2021 Copyright by rt-thread team [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud.c:862) The flash device manufacturer ID is 0xEF, memory type ID is 0x40, ca[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:132) Check SFDP header is OK. The reversion is V1.5, NPN is 0.[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:175) Check JEDEC basic flash parameter header is OK. The table id is[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:203) JEDEC basic flash parameter table info:[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:204) MSB-LSB 3 2 1 0[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0001] 0xFF 0xF9 0x20 0xE5[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0002] 0x07 0xFF 0xFF 0xFF[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0003] 0x6B 0x08 0xEB 0x44[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0004] 0xBB 0x42 0x3B 0x08[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0005] 0xFF 0xFF 0xFF 0xFE[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0006] 0x00 0x00 0xFF 0xFF[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0007] 0xEB 0x40 0xFF 0xFF[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0008] 0x52 0x0F 0x20 0x0C[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:207) [0009] 0x00 0x00 0xD8 0x10[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:215) 4 KB Erase is supported throughout the device. Command is 0x20.[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:234) Write granularity is 64 bytes or larger.[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:245) Target flash status register is non-volatile.[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:271) 3-Byte only addressing.[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:305) Capacity is 16777216 Bytes.[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:312) Flash device supports 4KB block erase. Command is 0x20.[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:312) Flash device supports 32KB block erase. Command is 0x52.[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud_sfdp.c:312) Flash device supports 64KB block erase. Command is 0xD8.[0m [32m[I/SFUD] Find a Winbond flash chip. Size is 16777216 bytes.[0m [0m[D/SFUD] (../rt-thread/components/drivers/spi/sfud/src/sfud.c:840) Flash device reset success.[0m [32m[I/SFUD] W25Q128 flash device is initialize success.[0m [32m[I/SFUD] Probe SPI flash W25Q128 by SPI device spi10 success.[0m [D/FAL] (fal_flash_init:63) Flash device | W25Q128 | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish. [32;22m[I/FAL] ==================== FAL partition table ====================[0m [32;22m[I/FAL] | name | flash_dev | offset | length |[0m [32;22m[I/FAL] -------------------------------------------------------------[0m [32;22m[I/FAL] | easyflash | W25Q128 | 0x00000000 | 0x00100000 |[0m [32;22m[I/FAL] | download | W25Q128 | 0x00100000 | 0x00700000 |[0m [32;22m[I/FAL] =============================================================[0m [32;22m[I/FAL] RT-Thread Flash Abstraction Layer (V0.5.0) initialize success.[0m [32;22m[I/FAL] The FAL MTD NOR device (download) created successfully[0m [32m[I/SFUD] Filesystem initialized![0m [0m[D/main] Hello RT-Thread![0m msh />list_device device type ref count -------- -------------------- ---------- download MTD Device 1 W25Q128 Block Device 0 spi10 SPI Device 0 spi2 SPI Bus 0 spi1 SPI Bus 0 uart1 Character Device 2 pin Miscellaneous Device 0 msh />echo "Hello, RT-THREAD~" hello.txt msh />ls Directory /: hello.txt 17 msh />cat hello.txt Hello, RT-THREAD~ msh /> ```
撰写答案
登录
注册新账号
关注者
0
被浏览
1.2k
关于作者
Juggernaut
①②③
提问
15
回答
109
被采纳
6
关注TA
发私信
相关问题
1
OTA 片上FLASH擦除失败
2
请问 怎么实现flash的FIFO存储呢
3
FAL初始化输出调试信息bug
4
spi1挂载w25q32失败
5
SD卡与外置flash(dg25q32)一起应用,挂载spi2总线上
6
w25q128 flash 怎么在电脑和开发板上切换挂载
7
RTT没有对FLASH进行操作的指令吗
8
求一份基于RTT系统封装好的STM32F1系列的FLASH操作程序
9
使用FAL接口写的片内flash的擦除函数会死掉
10
关于潘多拉flash操作例程的
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
简单两步配置RTT源码阅读环境 vsc+clangd
2
恩智浦[FRDM-MCXN947]初探 之 ADC与DAC
3
LVGL使用字库IC芯片显示中文
4
基于STM32H750和Rt-Thread的CANFD通信实现的记录(一)
5
freemodbus主机在freertos的适配,参考rtthread例程
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
UART
WIZnet_W5500
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
编译报错
Debug
SFUD
msh
rt_mq_消息队列_msg_queue
keil_MDK
ulog
MicroPython
C++_cpp
本月问答贡献
出出啊
1517
个答案
342
次被采纳
小小李sunny
1443
个答案
289
次被采纳
张世争
805
个答案
174
次被采纳
crystal266
547
个答案
161
次被采纳
whj467467222
1222
个答案
148
次被采纳
本月文章贡献
出出啊
1
篇文章
4
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
1
次点赞
crystal266
2
篇文章
2
次点赞
whj467467222
2
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部