summaryrefslogtreecommitdiff
path: root/firmware/test/fat
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/test/fat')
-rw-r--r--firmware/test/fat/Makefile17
-rw-r--r--firmware/test/fat/main.c5
2 files changed, 9 insertions, 13 deletions
diff --git a/firmware/test/fat/Makefile b/firmware/test/fat/Makefile
index 74d2628ab7..3e04724f67 100644
--- a/firmware/test/fat/Makefile
+++ b/firmware/test/fat/Makefile
@@ -1,26 +1,21 @@
1FIRMWARE = ../.. 1FIRMWARE = ../..
2 2
3export BUILDDATE=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
4export CPU=arm
5export TARGET=-DIPOD_VIDEO
6export TARGET_INC=-I$(FIRMWARE)/target/arm/ipod/video -I$(FIRMWARE)/target/arm/ipod -I$(FIRMWARE)/target/arm
7
8DRIVERS = ../../drivers 3DRIVERS = ../../drivers
9EXPORT = ../../export 4EXPORT = ../../export
10 5
11INCLUDE = -I$(EXPORT) -I$(FIRMWARE)/include 6BUILDDATE=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
12 7INCLUDE = -I$(EXPORT) -I$(FIRMWARE)/include -I$(FIRMWARE)/target/hosted -I$(FIRMWARE)/target/hosted/sdl
13DEFINES = -DTEST_FAT -DDEBUG -DCRT_DISPLAY -DDISK_WRITE -DHAVE_FAT16SUPPORT -D__PCTOOL__ 8DEFINES = -DTEST_FAT -DDEBUG -DDISK_WRITE -DHAVE_FAT16SUPPORT -D__PCTOOL__
14 9
15CFLAGS = -g -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) -I. $(INCLUDE) $(BUILDDATE) -I$(FIRMWARE)/libc/include 10CFLAGS = -g -m32 -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) $(BUILDDATE) -I. $(INCLUDE) -I$(FIRMWARE)/libc/include
16SIMFLAGS = -g -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) -I. $(INCLUDE) 11SIMFLAGS = -g -m32 -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) -I. $(INCLUDE)
17 12
18TARGET = fat 13TARGET = fat
19 14
20all: $(TARGET) 15all: $(TARGET)
21 16
22$(TARGET): fat.o ata-sim.o main.o disk.o dir.o file.o ctype.o unicode.o strlcpy.o 17$(TARGET): fat.o ata-sim.o main.o disk.o dir.o file.o ctype.o unicode.o strlcpy.o
23 gcc -g -o fat $+ -lfl 18 gcc -g -m32 -o fat $+
24 19
25fat.o: $(DRIVERS)/fat.c $(EXPORT)/fat.h $(EXPORT)/ata.h 20fat.o: $(DRIVERS)/fat.c $(EXPORT)/fat.h $(EXPORT)/ata.h
26 $(CC) $(CFLAGS) -c $< -o $@ 21 $(CC) $(CFLAGS) -c $< -o $@
diff --git a/firmware/test/fat/main.c b/firmware/test/fat/main.c
index a9220d15b7..756f326bb3 100644
--- a/firmware/test/fat/main.c
+++ b/firmware/test/fat/main.c
@@ -9,6 +9,7 @@
9#include "dir.h" 9#include "dir.h"
10#include "file.h" 10#include "file.h"
11#include "ata.h" 11#include "ata.h"
12#include "storage.h"
12 13
13void dbg_dump_sector(int sec); 14void dbg_dump_sector(int sec);
14void dbg_dump_buffer(unsigned char *buf, int len, int offset); 15void dbg_dump_buffer(unsigned char *buf, int len, int offset);
@@ -432,7 +433,7 @@ void dbg_tail(char* name)
432 if( rc > 0 ) 433 if( rc > 0 )
433 { 434 {
434 buf[rc]=0; 435 buf[rc]=0;
435 printf("%d:\n%s\n", strlen(buf), buf); 436 printf("%d:\n%s\n", (int)strlen(buf), buf);
436 } 437 }
437 else if ( rc == 0 ) { 438 else if ( rc == 0 ) {
438 DEBUGF("EOF\n"); 439 DEBUGF("EOF\n");
@@ -463,7 +464,7 @@ int dbg_head(char* name)
463 if( rc > 0 ) 464 if( rc > 0 )
464 { 465 {
465 buf[rc]=0; 466 buf[rc]=0;
466 printf("%d:\n%s\n", strlen(buf), buf); 467 printf("%d:\n%s\n", (int)strlen(buf), buf);
467 } 468 }
468 else if ( rc == 0 ) { 469 else if ( rc == 0 ) {
469 DEBUGF("EOF\n"); 470 DEBUGF("EOF\n");