SD Card fat32 #10
No reviewers
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#10
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "pca006132:sd-reader"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
fat32 working
Tested mounting the first partition, reading directories and reading content of
BOOT.BIN
. Not yet tested for complicated operations.Currently the functionalities are limited, as this is intended to only be used by the fatfs crate.
alloc
features are not yet tested as I cannot get the DDR RAM working in my board, and there is still no UART output for the raspberry pi 4 board.The implementation should be more readable now after refactoring yesterday.
When loading the bitstream from SD card, the data starting from 0x19D630 (relative to the file) are wrong. Still investigating the cause, possibly a bug in the SD reader module.
I see some buffering and fatfs support in the driver. I think it would be cleaner if they were separate modules (structs) that interface each other.
In general, this lgtm. I'm happy to merge working code now and help refactoring afterwards.
@ -0,0 +146,4 @@
self.seek(SeekFrom::Start(entry as u64 + 0x4))?;
self.read_exact(&mut buffer[..1])?;
match buffer[0] {
0x01 | 0x04 | 0x06 | 0x0B => (),
Four self-explanatory
const
would be nicer than those magic values.@ -45,1 +45,4 @@
ram::init_alloc_linker();
// let mut ddr_ram = ddr::DdrRam::new();
// info!("Init alloc ddr");
// ram::init_alloc_ddr(&mut ddr_ram);
Those lines should never be executed in the runtime.
The runtime is loaded in DDR and assumes that DDR is already initialized (either by SZL or by FSBL). And letting the allocator use the whole DDR, as would be the case when calling
init_alloc_ddr
, would corrupt the runtime.Merged manually.
Pull request closed