You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-1
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,30 @@ cp -R include fatfs /opt/toolchains/dc/kos/addons
15
15
make
16
16
```
17
17
18
+
### Build Options
19
+
You can customize the build with the following options:
20
+
-`DEBUG=1` - Enable debug output (disabled by default)
21
+
-`DMA_BUF=0` - Disable DMA buffer (enabled by default)
22
+
-`SD_CHECK_CRC=1` - Enable CRC checking for SD cards (disabled by default)
23
+
24
+
Examples:
25
+
```console
26
+
# Build with defaults
27
+
make
28
+
29
+
# Build with CRC checking for SD cards
30
+
make SD_CHECK_CRC=1
31
+
32
+
# Build without DMA buffer
33
+
make DMA_BUF=0
34
+
```
35
+
18
36
## Usage
19
37
- Add `#include <fatfs.h>` in your C source file.
20
38
- Add `-lfatfs` in your `Makefile` on the line which builds your program, e.g.:
21
39
-`kos-cc -o $(TARGET) $(OBJS) -lfatfs`
22
40
- Simply call `fs_fat_mount_sd()` to mount a FAT partition to `/sd` and/or call `fs_fat_mount_ide()` to mount a FAT partition to `/ide`.
23
41
- Additionally, you can use other block devices by calling `fs_fat_mount()` with the appropriate parameters for the target device -- see `fatfs.h` for more information.
24
-
- To reduce memory usage you can disable DMA buffer, look in `Makefile`.
0 commit comments