Coder Social home page Coder Social logo

无法找到 FreeRTOS.h,DSTATUS、DWORD 等变量名未定义,sd_diskio.cpp 中某些函数未定义等问题的解决方法。 about peak HOT 2 OPEN

peng-zhihui avatar peng-zhihui commented on July 18, 2024
无法找到 FreeRTOS.h,DSTATUS、DWORD 等变量名未定义,sd_diskio.cpp 中某些函数未定义等问题的解决方法。

from peak.

Comments (2)

MXuanZero avatar MXuanZero commented on July 18, 2024

花了一下午时间终于解决了,我们将以下代码复制到 diskio.h 的第 12 行。这个地方最初应该只有一行 typedef BYTE DSTATUS;

/* Status of Disk Functions */
/* This type MUST be 8 bit */
typedef unsigned char	BYTE;
typedef BYTE			DSTATUS;	//最初
/* These types MUST be 16 bit */
typedef short			SHORT;
typedef unsigned short	WORD;
typedef unsigned short	WCHAR;

/* These types MUST be 16 bit or 32 bit */
typedef int				INT;
typedef unsigned int	UINT;

/* These types MUST be 32 bit */
typedef long			LONG;
typedef uint32_t		DWORD;

**补充1:**倘若无法找到 FreeRTOS.h,我们只是要将工程中出现 FreeRTOS.h 的地方改成 freertos/FreeRTOS.h 就行了。

**补充2:**倘若出现类似于 error: 'ff_diskio_get_drive' was not declared in this scope 这种 FATFS 系统的函数找不到的错误。我们要将 #include "diskio_impl.h" 添加到 sd_diskio.cpp 中。

image-20220822182305399

==**请注意:**以上方法虽然可以成功编译,但我并没有烧到板子上去,所以也不知道能不能成!如果有人成功的话麻烦告知一下。==

from peak.

LiangTY avatar LiangTY commented on July 18, 2024

DSTATUS、DWORD等问题,可以把#include "ff.h"放在#include "diskio.h"前面,让ff.h先编译即可。
image

from peak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.