#100124 - Edelnutte - Sat Aug 26, 2006 12:15 pm
Hi folks,
I'm trying to make an English-German Dictionary for the GBA (which was supposed to be for DS, that was before I had a GBMicro :P )
Anyway, because the Wordlist is 7MByte of data, I want the list to be an object file so that the compilation won't take ages.
First I heard of Converting the binary (my wordlist obviously) into an *.s file and then use arm-eabi-gcc to receive an *.o file.
I couldn't get this work and after a little googling around I found out that it should also be possible to convert it via objcopy, but I found out that the arguments have changed and I can't compile my program with the *.o file I get from arm-eabi-objcopy.exe
This is the command I use for converting with the actual version of arm-eabi-objcopy.exe I think.
Code: |
arm-eabi-objcopy -I binary -O elf32-littlearm -g --readonly-text list.txt list.o |
I would be damn happy If someone could help me getting rid off the compiling errors by letting me know the right options to use.
#100134 - wintermute - Sat Aug 26, 2006 1:56 pm
Where are you planning on putting this 7MB of data?
The DS has 4MB of RAM.
You'd be much better off using libfat and accessing it as a normal data file.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#100158 - poslundc - Sat Aug 26, 2006 4:31 pm
Tip: when asking questions about errors with command-line tools, it's generally a good idea to post the error.
Try googling up the man page for objcopy and see what the command line options are.
This should be fine for the GBA so long as the data gets placed into a constant section (.text or .rodata), which means it will get placed on the ROM. If it's for the DS, then as Wintermute says, you won't be able to store the entire thing in RAM.
Dan.
#100160 - tepples - Sat Aug 26, 2006 4:37 pm
wintermute wrote: |
Where are you planning on putting this 7MB of data?
The DS has 4MB of RAM. |
Edelnutte wrote: |
I'm trying to make an English-German Dictionary for the GBA (which was supposed to be for DS, that was before I had a GBMicro :P ) |
It's more than likely a GBA program intended to run on a NOR card or a NAND+RAM card. The dictionary would be placed somewhere in GBA ROM space (more than likely in 0x08000000-0x087FFFFF), as poslundc points out. The only time this would interfere would be on the GBA Movie Player v2, in which case I'd recommend using the FAT library to read dictionary entries from the CF card.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#100167 - Edelnutte - Sat Aug 26, 2006 5:32 pm
Thanks for your replies, I already managed to convert it (it worked with arme-eabi-ld.real.exe I received a .ext file and had no problems using it with the final objcopy)
The problem with the errors was well it was a lot!
Of course I put the data into ROM, It's placed between 0x08017e48 and 0x086eccb2(in Normal Rom). If it works on my EFA 512 I'll think about a MP Version.
Does anybody know how I can avoid to work with the adress, I mean for searching the query I would start at 0x08017e48[0] But this doesn't work if the Rom is put with serveral others because the position changed.
#100170 - tepples - Sat Aug 26, 2006 5:49 pm
The objcopy program (whether arm-eabi-objcopy or bin2s|arm-eabi-as) should create a name for this object, which you can use from within your C program instead of using a raw address. If you have multiple GBA programs on your EFA card, each one will be loaded into 0x08000000 by the flash card's bankswitch circuitry. It may be simpler for you to use GBFS for something like this.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#100428 - Edelnutte - Sun Aug 27, 2006 9:06 pm
I think I'll test it with the Adress Method on Emulator, and if it works on Emulator I change the Object file with an Include File (IAfter debugging I don't care about compilation time), so it should run on most Flashcards shouldn't it?
#100433 - tepples - Sun Aug 27, 2006 9:41 pm
There is almost never an excuse to hardcode addresses within ROM. The few exceptions involve cards with I/O in ROM space, such as CF and SD adapters. Using the symbolic name that objcopy produces will make your code more maintainable both for you and for others.
First discover the symbolic name:
Code: |
arm-eabi-nm -n theobjectfile.o |
Then use the symbolic name:
Code: |
extern unsigned char theSymbol[]; |
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#101212 - Edelnutte - Sun Sep 03, 2006 9:47 pm
I finally managed to imply the Wordlist with the bin2o tool (from the tools section)
But now I have another Problem: I need an 8x8 Font. I'm not capable of making one by myself (already tried - what a waste of time!) and I could't find one anywhere. Does anybody know where I can get one, of xourse one to use freely?
#101220 - tepples - Sun Sep 03, 2006 10:36 pm
In which format do you need the fonts?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#101259 - Edelnutte - Mon Sep 04, 2006 1:56 am
Ah dammit I forgot the most Important thing. I need them In an ASCII table! Because otherwise I would need to convert the text and if its ASCII I can just use the numbers of the char as the number of the tile in the map
#101298 - kusma - Mon Sep 04, 2006 8:54 am
Edelnutte wrote: |
Ah dammit I forgot the most Important thing. I need them In an ASCII table! Because otherwise I would need to convert the text and if its ASCII I can just use the numbers of the char as the number of the tile in the map |
or: you could use a translation-table, and save vram for the tiles not in use!
#101334 - tepples - Mon Sep 04, 2006 3:11 pm
But how much VRAM would that save? Having tiles for all characters in Windows code page 1252 (ISO-8859-1 plus 32 extra characters) would use only 8 KiB of the GBA's VRAM. In a dictionary app (like Touch Dic without the touch), what would the extra VRAM be useful for anyway?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.