gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Announcements And Comments > devkitARM release 15

#50050 - wintermute - Thu Aug 04, 2005 8:46 pm

http://devkitpro.sourceforge.net/

#50054 - tepples - Thu Aug 04, 2005 9:51 pm

In the announcement, you wrote:
bin2s updated to exclude file path from labels

Was the default behavior changed, or was the new behavior put behind a switch the way Info-ZIP's Zip and UnZip tools do it?

Code:

E:\>zip
Copyright (C) 1990-1999 Info-ZIP
Type 'zip "-L"' for software license.
[...]
  -r   recurse into directories     -j   junk (don't record) directory names
[...]

E:\>unzip
UnZip 5.41 of 16 April 2000, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports to the authors at Zip-Bugs@lists.wku.edu; see README for details.
[...]
  -j  junk paths (do not make directories)   -v  be verbose/print version info
[...]

E:\>


_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#50074 - wintermute - Fri Aug 05, 2005 12:39 am

Currently I've just changed the default behaviour with bin2s. Is there a need for the labels to contain the full pathname?

Part of this was to enable bin2s to work properly within the automated makefiles used in the example projects.

gbfs hasn't been changed.

#50090 - zazery - Fri Aug 05, 2005 8:37 am

I have previously had some problems building the example files. After installing devkitARM r15, it seems that I am getting a few more errors. I made sure to checkout the example files again so I shouldn't have any problem in case some files were left over, even after doing a 'make clean'.

I'm still learning about the gcc compiler and make files, however it looks like there is a quotation make missing from the error statement when checking for the DEVKITARM system variable. Then it says on line 59 (-fomit-frame-pointer\) that it's missing a separator.

Here is the output when I compile the examples without modifying the makefile in the PCXView project, as explained above.
Code:
C:\examples\gba>make
make[1]: Entering directory `/c/examples/gba/PCXView'
Makefile:6: Extraneous text after `ifeq' directive
Makefile:8: Extraneous text after `endif' directive
: No such file or directoryevkitARM/gba_rules
Makefile:30: *** missing separator.  Stop.
make[1]: Leaving directory `/c/examples/gba/PCXView'
make[1]: Entering directory `/c/examples/gba/PlayBoyScout'
make[2]: *** No rule to make target `ScoutSplash.o', needed by `/c/examples/gba/
PlayBoyScout/PlayBoyScout_mb.elf'.  Stop.
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/examples/gba/PlayBoyScout'
make[1]: Entering directory `/c/examples/gba/SimpleBGScroll'
main.c
c:/examples/gba/SimpleBGScroll/source/main.c:47:32: error: r6502_portfont_bin.h:
 No such file or directory
c:/examples/gba/SimpleBGScroll/source/main.c: In function 'main':
c:/examples/gba/SimpleBGScroll/source/main.c:215: error: 'r6502_portfont_bin' un
declared (first use in this function)
c:/examples/gba/SimpleBGScroll/source/main.c:215: error: (Each undeclared identi
fier is reported only once
c:/examples/gba/SimpleBGScroll/source/main.c:215: error: for each function it ap
pears in.)
make[2]: *** [main.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/examples/gba/SimpleBGScroll'
make[1]: Entering directory `/c/examples/gba/XbooLoad'
XbooLoad.c
linking multiboot
built ... XbooLoad_mb.gba
ROM fixed!
make[1]: Leaving directory `/c/examples/gba/XbooLoad'
make[1]: Entering directory `/c/examples/gba/mbv2print'
mbv2print.c
linking cartridge
built ... sprite.gba
ROM fixed!
make[1]: Leaving directory `/c/examples/gba/mbv2print'

C:\examples\gba>


Hopefully just a silly error on my part.

#50154 - tepples - Sat Aug 06, 2005 2:16 am

zazery wrote:
Here is the output when I compile the examples without modifying the makefile in the PCXView project, as explained above.
Code:
C:\examples\gba>make
make[1]: Entering directory `/c/examples/gba/PCXView'
Makefile:6: Extraneous text after `ifeq' directive
Makefile:8: Extraneous text after `endif' directive
: No such file or directoryevkitARM/gba_rules

It could be a line ending problem (UNIX \n vs. Windows \r\n).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#50155 - notb4dinner - Sat Aug 06, 2005 2:23 am

Would it be possible for the OSX builds that appeared for r12 and r13 to continue?

#50217 - wintermute - Sat Aug 06, 2005 5:32 pm

notb4dinner wrote:
Would it be possible for the OSX builds that appeared for r12 and r13 to continue?


Hopefully.

We've been having trouble keeping people around with the time & resources to do the builds.

#50225 - wintermute - Sat Aug 06, 2005 6:57 pm

tepples wrote:
zazery wrote:
Here is the output when I compile the examples without modifying the makefile in the PCXView project, as explained above.
Code:
C:\examples\gba>make
make[1]: Entering directory `/c/examples/gba/PCXView'
Makefile:6: Extraneous text after `ifeq' directive
Makefile:8: Extraneous text after `endif' directive
: No such file or directoryevkitARM/gba_rules

It could be a line ending problem (UNIX \n vs. Windows \r\n).


Yep, that looks like exactly what the problem is - make sure your cvs client checks out with unix endings.

#50228 - zazery - Sat Aug 06, 2005 7:11 pm

You're right, works great now. Thanks tepples and wintermute.

#50730 - notb4dinner - Fri Aug 12, 2005 1:20 pm

I've just had a go at building devkitARM on OSX using the build script on CVS. I'm using the script to download the appropriate packages. After downloading and extracting a few of the packages it dies with the following:
Code:
patch: **** Can't open patch file /Users/matt/Desktop/devkitr15/dkarm/patches/binutils-2.16.1.patch : No such file or directory
Error patching binutils


Edit: Damn I'm stupid. Remember kiddies download EVERYTHING in the buildscripts module...

#51288 - wintermute - Thu Aug 18, 2005 12:19 am

notb4dinner wrote:
I've just had a go at building devkitARM on OSX using the build script on CVS. I'm using the script to download the appropriate packages. After downloading and extracting a few of the packages it dies with the following:
Code:
patch: **** Can't open patch file /Users/matt/Desktop/devkitr15/dkarm/patches/binutils-2.16.1.patch : No such file or directory
Error patching binutils


Edit: Damn I'm stupid. Remember kiddies download EVERYTHING in the buildscripts module...


did you manage to get it to build?

If not, the latest release is now available for OS X

http://www.devkitpro.org/

#51294 - notb4dinner - Thu Aug 18, 2005 12:44 am

Nah, it crapped out building the tools and I couldn't be bothered dealing with it.

Thanks for the build Mr Spiv.

Edit: ndstool is dying with 'Illegal instruction'. Do we know what architecture Mr. Spiv built this on/for?

#51373 - tepples - Thu Aug 18, 2005 9:08 pm

"r15" is the program counter. Now that you've run out of registers, will you change the numbering system? :-)
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#51402 - MumblyJoe - Fri Aug 19, 2005 5:14 am

Was the numbering system zero indexed? I don't remember r0? Anyway tepples, we have two CPU's now so winty can start at r0b now. That would confuse some people.
_________________
www.hungrydeveloper.com
Version 2.0 now up - guaranteed at least 100% more pleasing!

#52152 - chishm - Sat Aug 27, 2005 2:08 pm

Since shared IWRAM is no longer included in either link script, how do we use it besides hardcoded pointers? Was there any reason why it was removed from the ARM9 linkscript, and if so, is it going to be in the ARM7 one?

#52155 - wintermute - Sat Aug 27, 2005 3:27 pm

chishm wrote:
Since shared IWRAM is no longer included in either link script, how do we use it besides hardcoded pointers? Was there any reason why it was removed from the ARM9 linkscript, and if so, is it going to be in the ARM7 one?


It was removed because it isn't fixed and needs special treatment best left to the end user. Some method of using it may be implemented later but it probably won't be via attributes. For now I strongly suggest ignoring it.

#52183 - chishm - Sun Aug 28, 2005 4:04 am

I guess I will need to customise the link scripts so I can use it for code. Is there any way to use my own link scripts and crt0 files without placing them in the lib directory. That way I can keep the customised code with the project.

#52201 - wintermute - Sun Aug 28, 2005 11:29 am

chishm wrote:
I guess I will need to customise the link scripts so I can use it for code. Is there any way to use my own link scripts and crt0 files without placing them in the lib directory. That way I can keep the customised code with the project.


Why do you need to use it for code? What happens if the libaries use shared iwram in some way that's incompatible with your use?

Shared iwram is also a bit of a misnomer given that it's paged. The intent would seem to be to use it for fast data transfer between processors. I suspect (but haven't tested this yet) that the two pages are mirrored and can be used as if both pages occupy the same 16k area.

#52205 - chishm - Sun Aug 28, 2005 12:01 pm

This is for a one off project - a GBAMP boot menu. It is the only place that I can run code from that is almost guaranteed not to be overwritten with another binary. It only needs a small file loader in there, so I don't intend to use many library functions. It would be good to know whether it is paged between the two processors.

#52245 - gladius - Sun Aug 28, 2005 6:03 pm

I'd like to second the request for custom linkscript/crt's. For my purposes, I needed the shared iwram to be assigned to the arm7. If custom linkscripts/crt break the libraries, that is the fault of the coder, not you.

#52400 - wintermute - Tue Aug 30, 2005 2:13 pm

chishm wrote:
This is for a one off project - a GBAMP boot menu. It is the only place that I can run code from that is almost guaranteed not to be overwritten with another binary. It only needs a small file loader in there, so I don't intend to use many library functions. It would be good to know whether it is paged between the two processors.


Wouldn't you be better off putting your loader in the gbamp firmware?

#52434 - chishm - Tue Aug 30, 2005 10:41 pm

wintermute wrote:
Wouldn't you be better off putting your loader in the gbamp firmware?

That's what I'm doing, but I can't run it from the firmware itself because there are some bits of data in certain locations it needs in order to run normally. Also, I need at least 1KB of variables in a place that won't be overwritten with binaries in order to use the CF card. So I'll repeat my question: Is there any way to use custom link scripts? Thanks.

#52464 - tepples - Wed Aug 31, 2005 3:04 am

Ever played with the -fPIC option? It lets you generate "position independent" code that relies only on PC-relative addressing so that no matter where in RAM the code is copied, it'll still run. At least Burton Radons' JPEG decoder uses it.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#53022 - ribrdb2 - Mon Sep 05, 2005 3:35 pm

chishm wrote:
So I'll repeat my question: Is there any way to use custom link scripts? Thanks.

You could look at the GNU ld manpage, I think it's -T option or something like that. You could also look at the .spec files that come with dev kit arm to see how it does it. We have a custom spec file for each project that tells gdb to include the custom crt's and link scripts.

#53047 - Quirky - Mon Sep 05, 2005 7:25 pm

I seem to remember rather clumsily using Jeff's crt0.s and linkscript with devkitarm at first until I realised the correct way to do things. You can do it with -nostartfiles -Tlnkscript (replace lnkscript with whatever file you use) and link with crt0.o first. This may not work on the DS of course.

#53088 - chishm - Tue Sep 06, 2005 12:52 am

Thanks for the help, unfortunately its a little too late. I have already made the linkscript and crt0 and used a custom spec file in the lib directory. This is okay, since rather than being for a specific program, the linkscript and startup file are designed for any program to be run from the GBAMP firmware, so I will probably reuse them.
ribrdb2 wrote:
We have a custom spec file for each project that tells gdb to include the custom crt's and link scripts.

How do you do that?

EDIT: Okay, I figured it out, just give the full path to the spec file.