Hi,
I am just wondering. Is there any work in progress on low level disk I/O functions that are required by the FatFs module?
Thanks. Arjan.
FatFs - Generic FAT File System Module
13 posts
- Posts: 90
- Joined: Sat Sep 08, 2012 1:59 pm
Hi
Yes I believe Dexos is about to release some code see....
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=72&t=25606
post 8
He is building a bare metal OS and USB and Fatfs are work in progress....
Dave H
Yes I believe Dexos is about to release some code see....
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=72&t=25606
post 8
He is building a bare metal OS and USB and Fatfs are work in progress....
Dave H
- Posts: 77
- Joined: Tue Jan 03, 2012 7:10 pm
Arjan wrote:Hi,
I am just wondering. Is there any work in progress on low level disk I/O functions that are required by the FatFs module?
Thanks. Arjan.
As tritonium pointed out, i am working on such functions, they will be included in the next ver of DexBasic.
If you need them in the mean time, let me know and i will post them.
Note: they are just raw read\write sectors from sd card.
Batteries not included, Some assembly required.
I'd like to see your disk I/O code if you're up for posting it, DexOs. Cheers.
- Posts: 24
- Joined: Wed Oct 31, 2012 11:59 am
Joeboy wrote:I'd like to see your disk I/O code if you're up for posting it, DexOs. Cheers.
Sure, i am going to release all the code to DexBasic and DexOS RPI port on Xmas Day, it my present to the RPI community
Hope people will add to it.
But if you can not wait until Xmas, PM me.
PS: Nice sound code
Batteries not included, Some assembly required.
Ok that's cool. Looking forward to unzipping my xmas present.
- Posts: 24
- Joined: Wed Oct 31, 2012 11:59 am
Hi Dexos,
With reference to http://elm-chan.org/fsw/ff/en/appnote.html#port, I may assume that you have currently implemented the following functions,
. disk_intitialize
. disk_status
. disk_read
. disk_write
Correct?
Thanks.
With reference to http://elm-chan.org/fsw/ff/en/appnote.html#port, I may assume that you have currently implemented the following functions,
. disk_intitialize
. disk_status
. disk_read
. disk_write
Correct?
Thanks.
- Posts: 90
- Joined: Sat Sep 08, 2012 1:59 pm
Arjan wrote:Hi Dexos,
With reference to http://elm-chan.org/fsw/ff/en/appnote.html#port, I may assume that you have currently implemented the following functions,
. disk_intitialize
. disk_status
. disk_read
. disk_write
Correct?
Thanks.
Yes, i have implemented all those functions
Batteries not included, Some assembly required.
Hi DexOs,
Thanks for the source code!
I did some fist look and I have found the following functions in your code :
*. InitialSDcard --> FatFS DSTATUS disk_status (BYTE drv)
*. ReadSingleBlock --> Could be part of FatFS DRESULT disk_read (
BYTE drv, /* Physical drive nmuber (0..) */
BYTE *buff, /* Data buffer to store read data */
DWORD sector, /* Sector address (LBA) */
BYTE count /* Number of sectors to read (1..128) */
)
for reading just one sector -->
[code]
if (count == 1) { /* Single block read */
@ ReadSingleBlock -> sector
}
else { /* Multiple block read */
if (send_cmd(CMD18, sector) == 0) { /* READ_MULTIPLE_BLOCK */
do {
if (!rcvr_datablock(buff, 512)) break;
buff += 512;
} while (--count);
send_cmd(CMD12, 0); /* STOP_TRANSMISSION */
}
}
[/code]
And I am not able to find the implementation for :
DSTATUS disk_status (
BYTE drv /* Physical drive nmuber (0..) */
)
Please advice. Thanks.
Regards, Arjan
Thanks for the source code!
I did some fist look and I have found the following functions in your code :
*. InitialSDcard --> FatFS DSTATUS disk_status (BYTE drv)
*. ReadSingleBlock --> Could be part of FatFS DRESULT disk_read (
BYTE drv, /* Physical drive nmuber (0..) */
BYTE *buff, /* Data buffer to store read data */
DWORD sector, /* Sector address (LBA) */
BYTE count /* Number of sectors to read (1..128) */
)
for reading just one sector -->
[code]
if (count == 1) { /* Single block read */
@ ReadSingleBlock -> sector
}
else { /* Multiple block read */
if (send_cmd(CMD18, sector) == 0) { /* READ_MULTIPLE_BLOCK */
do {
if (!rcvr_datablock(buff, 512)) break;
buff += 512;
} while (--count);
send_cmd(CMD12, 0); /* STOP_TRANSMISSION */
}
}
[/code]
And I am not able to find the implementation for :
DSTATUS disk_status (
BYTE drv /* Physical drive nmuber (0..) */
)
Please advice. Thanks.
Regards, Arjan
- Posts: 90
- Joined: Sat Sep 08, 2012 1:59 pm
The disk_status return drive number, which in the RPI case theres only one.
It also returns media removal, media change and disk_initialize function failed.
So for now you can just write a function, that just tests a var for initialize OK, that is set when you call initialize function, if that function return without error you set the var to 1 , which means media present and initialize OK, if not its 0 which means initialize error or media not present .
If you need i can write this function and add a media change part to it.
Any more ? just ask.
It also returns media removal, media change and disk_initialize function failed.
So for now you can just write a function, that just tests a var for initialize OK, that is set when you call initialize function, if that function return without error you set the var to 1 , which means media present and initialize OK, if not its 0 which means initialize error or media not present .
If you need i can write this function and add a media change part to it.
Any more ? just ask.
Batteries not included, Some assembly required.
Hi DexOS,
I have created an Eclipse CDT (C/C++ Development Tooling) project for the FatFs code. And with the attached stub (mmc.c) I was able to compile the code.
However, when including your code I noticed that the DexBasicSource is not gcc-as compatible. So unfortunately I am not able to use your code without modification.
Any ideas here? Thanks. Arjan
I have created an Eclipse CDT (C/C++ Development Tooling) project for the FatFs code. And with the attached stub (mmc.c) I was able to compile the code.
However, when including your code I noticed that the DexBasicSource is not gcc-as compatible. So unfortunately I am not able to use your code without modification.
Any ideas here? Thanks. Arjan
- Posts: 90
- Joined: Sat Sep 08, 2012 1:59 pm
Arjan wrote:Hi DexOS,
I have created an Eclipse CDT (C/C++ Development Tooling) project for the FatFs code. And with the attached stub (mmc.c) I was able to compile the code.
However, when including your code I noticed that the DexBasicSource is not gcc-as compatible. So unfortunately I am not able to use your code without modification.
Any ideas here? Thanks. Arjan
I will convert the fasmarm to gcc-asm compatible, for you, but i can not do it until the weekend.
Batteries not included, Some assembly required.
Hi DexOS,
Thank you!
I am waiting new hardware and I am still in the process of writing the application with its documentation. So I am not in that hurry
Thanks again. Regards, Arjan
Thank you!
I am waiting new hardware and I am still in the process of writing the application with its documentation. So I am not in that hurry
Thanks again. Regards, Arjan
- Posts: 90
- Joined: Sat Sep 08, 2012 1:59 pm