#37227 - arog - Wed Mar 09, 2005 2:51 am
Hey all. I need some help here. I am trying to start working on a set of tutorials similar to the ones I created for HAM (for the GBA).
http://www.aaronrogers.com/ham/
I just started working on this yesterday and I am having some issues getting it working myself, so if you could point me in the right direction, that would be awesome!
http://www.aaronrogers.com/nintendods/
First of all, if someone feels like going through the actual Day 1 tutorial (Environment Setup) to see what I am missing or what is incorrect, I would appreciate it.
http://www.aaronrogers.com/nintendods/Day1/day1.php
Secondly, I think I am doing something wrong or missing something with ndslib. When I try to compile Joat's NDS template project http://www.bottledlight.com/ds/ds_project_template.zip, it never works. I edited CommonMakefile.in and added my paths to devkitarm and ndslib.
Here's what happens right now when I make all:
C:\devkitarm\projects\template>make all
rm -rf arm9/arm9.bin
rm -rf arm7/arm7.bin
make -C arm7 -I /c/devkitarm/projects/template
make[1]: Entering directory `/c/devkitarm/projects/template/arm7'
mv: missing file argument
Try `mv --help' for more information.
make[2]: [all] Error 1 (ignored)
arm-elf-g++.exe: ds_arm7.specs: No such file or directory
make[2]: *** [/c/devkitarm/projects/template/arm7/arm7.elf] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/devkitarm/projects/template/arm7'
make: *** [all] Error 2
TIA,
arog
Last edited by arog on Wed Mar 09, 2005 4:37 am; edited 1 time in total
#37228 - nix - Wed Mar 09, 2005 3:14 am
arog wrote: |
make -C arm7 -I /c/devkitarm/projects/template
make[1]: Entering directory `/c/devkitarm/projects/template/arm7'
mv: missing file argument
Try `mv --help' for more information.
|
Start there. It seems to me that make is failing, and then mv is like "uh, wheres the file I am supposed to be moving". So ya, start there.
#37237 - josath - Wed Mar 09, 2005 6:14 am
the mv command failing is not a problem...i got the template working, and i always get that mv error.
His problem is the error:
Code: |
arm-elf-g++.exe: ds_arm7.specs: No such file or directory |
I think what you need to do is get the 'ctrls' package and extract the contents of it to the lib folder in devkitarm. You should end up putting the file like devkitarm/arm-elf/lib/ds_arm7.specs
#37239 - arog - Wed Mar 09, 2005 7:23 am
Okay, I think that there are some issues with Joat's template (no offense intended). I got an updated version from someone who got it from DesktopMan and after a minor modification or two, it works well.
Anyone who's ready to get started, feel free to check it out:
http://www.aaronrogers.com/nintendods/Day1/day1.php
- Aaron Rogers
#37253 - GooseSerbus - Wed Mar 09, 2005 2:02 pm
I used your tutorial to set up from scratch since I was having some problems with that other tutorial and even though I was installing to my D: drive instead of C: I had no problems setting this up. Thanks for posting it!
- GooseSerbus
#37269 - Lynx - Wed Mar 09, 2005 7:18 pm
Well. I can confirm your directions on Windows2K Professional. But, since there aren't any instructions on building your own bin, I can't really say it was working. But, Tetris was running in Dualis.
#37270 - dovoto - Wed Mar 09, 2005 7:30 pm
I stuck a cheezy install batch into the cvs a few days back which builds the libs and the start up code then copies the crt's linkscripts and specs files to devkitarm. Before you run this you need to edit the first line in the batch to point to were you installed devkitarm (it is not enough for it to be in the path).
Alternatly you can go to the command prompt or shell, navigate to your ndslib directory, and type make then copy all the .o .ld and .specs files to C:\devkitARM\arm-elf\lib (or where ever you happen to have installed devkit).
Make sure after installing devkit on you machine (and minsys if you are a windows user like me from www.devkit.tk ) make sure you set your path up so it knows where to find the new stuff.
That aside, i spoke to WinterMute and he said he will be putting our startup files into the next release of devkitARM which should simplify things.
And day one of my tutor is up which does cover environment setup (although i think Aaron's is a bit better in that regaurd). There is also an example 2D demo as well as a zip file of ndslib which i will try to keep up to date.
www.drunkencoders.com
_________________
www.drunkencoders.com
#37272 - wintermute - Wed Mar 09, 2005 7:49 pm
I don't really recommend the putting things in the devkitARM folder approach. The best way to upgrade is to delete the entire folder & extract the new toolchain - extracting over the old folder is likely to cause problems.
A better layout would be something like this :-
[Images not permitted - Click here to view it]
Changing the name of the devkit folder is irrelevant really.
#37273 - arog - Wed Mar 09, 2005 8:07 pm
Quote: |
Well. I can confirm your directions on Windows2K Professional. But, since there aren't any instructions on building your own bin, I can't really say it was working. But, Tetris was running in Dualis. |
Thanks for verifying on Win2K.
Did the template compile okay for you?
- Aaron Rogers
#37274 - GooseSerbus - Wed Mar 09, 2005 8:32 pm
Quote: |
Before you run this you need to edit the first line in the batch to point to were you installed devkitarm (it is not enough for it to be in the path). |
That's exactly what I did to get mine to install to my D: drive instead of my C: drive, just by changing the
Code: |
SET DEVDIR=C:\devkitARM |
first line of the batch file to
Code: |
SET DEVDIR=D:\devkitARM |
and then I just ran the batch file which did not run initially, but I just opened and saved it again and it ran OK the second time (weird).
Then to compile the template I just had to edit the "CommonMakefile.in" file so that the
Code: |
#export PATH := /c/devkitarm/bin:/bin |
and the
Code: |
export NDSLIBPATH := /c/devkitarm/ndslib |
lines read
Code: |
#export PATH := /d/devkitarm/bin:/bin |
and
Code: |
export NDSLIBPATH := /d/devkitarm/ndslib |
instead. Then it compiled fine.
I know this is pretty simple to point out really but these points were not covered in the tutorial since it was assuming you used exactly the same paths. So it may be worth adding them (just in case?). FYI: I'm running on XP SP2.
-Goose Serbus
#37275 - arog - Wed Mar 09, 2005 8:56 pm
Quote: |
I don't really recommend the putting things in the devkitARM folder approach. The best way to upgrade is to delete the entire folder & extract the new toolchain - extracting over the old folder is likely to cause problems. |
I agree with you. I just wasn't sure what I should call the main directory so I never got around to doing it the "right" way. I'll come up with something and update the tutorial later today.
Thanks for the feedback.
- Aaron Rogers
#37282 - Lynx - Thu Mar 10, 2005 12:09 am
arog wrote: |
Thanks for verifying on Win2K.
Did the template compile okay for you?
- Aaron Rogers |
Not only did it compile ok, but after I got home, I was able to write it to a GBA Cart, and run it using PassMe! That's the part I didn't understand. The output of the template.ds.gba doesn't work on the emulator, and the arm9.bin doesn't either.
#37284 - DekuTree64 - Thu Mar 10, 2005 12:26 am
The arm9.bin does work in Dualis, the backdrop color just doesn't show unless you turn one of the BG layers on. Looks like a minor emu bug.
That is a very nice tutorial, just went straight through and everything worked. I'm looking forward to the show when all the hungry coders around here get their hands on the PassMes and start making demos :)
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#37287 - Spaceface - Thu Mar 10, 2005 12:42 am
I just want to say you're a God for making this and can't wait till it's finished!
#37289 - arog - Thu Mar 10, 2005 1:10 am
Quote: |
I just want to say you're a God for making this and can't wait till it's finished! |
I would love to agree with you, but the real "gods" are those who are figuring out how to hack the NDS, are writing the actual code/libraries I am writing about, and the NDS dev community in general for patiently putting up with my questions and offering tons of support.
By the way, I am in the process of rewriting the Day 1 tutorial to incorporate a ndsdev parent directory as wintermute suggested. It's taking me longer than I had hoped.
- Aaron Rogers
#37290 - TheChuckster - Thu Mar 10, 2005 2:15 am
You might want to update your tutorials. The install batch file didn't really work out too well and I had to manually fumble around with the paths of my cross compiler because it couldn't find the ndslib include files or the lib. After copying the include/ and lib/ directories from ndslib to the arm-elf/include and arm-elf/lib directories in my cross compiler respectively, it worked.
#37291 - arog - Thu Mar 10, 2005 2:19 am
Quote: |
By the way, I am in the process of rewriting the Day 1 tutorial to incorporate a ndsdev parent directory as wintermute suggested. It's taking me longer than I had hoped. |
Okay, it's done and ready for testing. The new structure looks like:
C:\ndsdev
---> devkitarm
---> emulators
---> msys
---> ndslib
---> projects
---> roms
If someone want to go through it (again) and make sure all is well, that would be awesome. I've had enough for a couple of days. My eyes are going buggy. :- P
- Aaron Rogers
#37292 - TheChuckster - Thu Mar 10, 2005 2:27 am
Oh and thanks very much for the helpful tutorial. You've inspired me to write my own on setting it up on Linux using the GNU ARM toolchain.
About the remark you made about the real DS gods being the hackers:
You shouldn't compare your achievements to others' but instead take pride in what you have personally done. Your work has proven to be helpful to several community members already and I am sure there are plenty of future DS homebrewers that will read it and learn.
EDIT: Well unfortunately I am not having the same success in Linux.
I successfully built ndslib only to find that I get the following error when trying to build Joat's template:
Code: |
/home/chuck/gnuarm-3.4.3/bin/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/lib/interwork/ds_arm7_crt0.o(.init+0x158): In function `CIDLoop':
: undefined reference to `fake_heap_end'
collect2: ld returned 1 exit status
make[2]: *** [/home/chuck/template/arm7/arm7.elf] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/chuck/template/arm7'
make: *** [all] Error 2 |
I can only think that some obscure code error in the library was revealed by GCC 3.4.3.
#37296 - Lynx - Thu Mar 10, 2005 4:23 am
#37298 - zazery - Thu Mar 10, 2005 5:14 am
Lynx wrote: |
Template demo from the tutorial running on DS |
Wow Lynx that's pretty cool it makes me want to make a PassMe even faster.
I'm right now going through this tutorial and I think that the picture under step 4 should show a picture of C:\ndsdev instead of C:\devkitARM.
When I was installing ndslib I came across the following errors. I rechecked to make sure the path was changed in the Install.bat file and it was correct. (SET DEVDIR=G:\ndsdev\devkitarm)
Code: |
copy crt files and linkerscript
to devkit arm lib directory?
(must be done manualy if not)
yes or no?yes
*.o
The system cannot find the file specified.
0 file(s) copied.
ds_arm7.ld
ds_arm7cart.ld
ds_arm9.ld
3 file(s) copied.
ds_arm7.specs
ds_arm7cart.specs
ds_arm9.specs
3 file(s) copied.
thumb\*.o
The system cannot find the file specified.
0 file(s) copied.
interwork\*.o
The system cannot find the file specified.
0 file(s) copied.
thumb\interwork\*.o
The system cannot find the file specified.
0 file(s) copied.
Press any key to continue . . .
|
#37300 - arog - Thu Mar 10, 2005 5:24 am
Quote: |
I'm right now going through this tutorial and I think that the picture under step 4 should show a picture of C:\ndsdev instead of C:\devkitARM. |
Ugh. Good call. I missed that during the update. Thanks.
As for the other problem, there are a couple of things you can try.
1) Delete the ndslib directory. Re-check it out from CVS. Fix the Install.bat and try again.
2) Try make clean and then make once again. Post the entire error message if it fails again.
- Aaron Rogers
#37301 - zazery - Thu Mar 10, 2005 5:37 am
Ok I found out that I added the msys environment variable incorrectly. It should have been obvious considering it didn't recognize 'make' as a command. Thanks for the great tutorial it was really helpful.
#37302 - arog - Thu Mar 10, 2005 5:40 am
Sweet. Glad you got it working.
I updated the page and Day1.pdf.
- Aaron Rogers
#37314 - wintermute - Thu Mar 10, 2005 10:53 am
TheChuckster wrote: |
EDIT: Well unfortunately I am not having the same success in Linux.
I successfully built ndslib only to find that I get the following error when trying to build Joat's template:
Code: | /home/chuck/gnuarm-3.4.3/bin/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/lib/interwork/ds_arm7_crt0.o(.init+0x158): In function `CIDLoop':
: undefined reference to `fake_heap_end'
collect2: ld returned 1 exit status
make[2]: *** [/home/chuck/template/arm7/arm7.elf] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/chuck/template/arm7'
make: *** [all] Error 2 |
I can only think that some obscure code error in the library was revealed by GCC 3.4.3. |
use devkitARM, not random gcc build xyz.
http://sourceforge.net/projects/devkitpro
#37348 - dagamer34 - Thu Mar 10, 2005 7:01 pm
I am having trouble download MSYS from every single sourceforge mirror. It always seems to freeze around 93%.
Could someone AIM send me the file? My screenname is dagamer43. Thanks.
_________________
Little kids and Playstation 2's don't mix. :(
#37352 - arog - Thu Mar 10, 2005 7:37 pm
#37354 - dagamer34 - Thu Mar 10, 2005 8:19 pm
Thanks.
_________________
Little kids and Playstation 2's don't mix. :(
#37363 - Lynx - Thu Mar 10, 2005 10:07 pm
TheChuckster, PhoenixRising (my brother) has successfully setup a DS dev environment under Linux and will have a tutorial available by tomorrow. He said it was pretty strait forward and only had to change a few minor things.
#37379 - josath - Fri Mar 11, 2005 1:15 am
there's no tutorial really needed for setting up in linux, i did it and it basically goes like this:
extract devkitarm (tar ...
extract ctrls (tar ...
checkout ndslib (cvs ...
compile ndslib (make)
extract template (unzip ...
edit makefile to point to your devkitarm & ndslib
compile template (make)
people with some experience w/ command line in linux should have no trouble at all.
#37386 - TheChuckster - Fri Mar 11, 2005 3:18 am
Yeah I knew what to do being an avid Linux user but I overlooked that there was a Linux version of DevkitARM and used GNU ARM instead causing the compiliation problems. Now that it is working, I can run roms in Dualis since it works perfectly in the latest Wine!
#37544 - arog - Sat Mar 12, 2005 10:54 pm
Since it seems that a lot of people want to install in a different directory (can't blame you), I went through the tutorial and marked the few spots where you have to make changes.
http://www.aaronrogers.com/nintendods/Day1/day1.php
Hope that helps.
Also, I've seen at least a few people struggling to get their Linux box setup for NDS development so I'll put together a guide for that , too, at some point. I know that dovoto is working on ndslib right now, so I'll wait until the dust settles.
- Aaron Rogers
#37559 - Lynx - Sun Mar 13, 2005 3:35 am
It should work "out of the box" now on Linux. The issues that we came accross were 1) case sensitivity and 2) a .cpp file missing.
#37565 - zazery - Sun Mar 13, 2005 5:32 am
Anyone know why ndslib now requires a password to access the CVS? I can't browse the CVS through Source Forge either, it hangs on loading the page.
#37566 - darkfader - Sun Mar 13, 2005 5:51 am
Perhaps it now contains features that could be used to illegal purposes? ;P
Ok, sorry. not true. no clue.
#37572 - Sebbo - Sun Mar 13, 2005 8:17 am
hmm, i've followed the directions on the site and read through this thread to see if any one else has the same problem (which they don't)
when i type make then hit enter in step 5 (compiling the template) i get:
Code: |
MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.
Error makefile 18: Command syntax error
Error makefile 19: Command syntax error
Error makefile 20: Command syntax error
*** 3 errors during make ***
|
i'm running XP Home without SP2 (ironically i had too many problems with SP2)
#37573 - arog - Sun Mar 13, 2005 8:37 am
Quote: |
Anyone know why ndslib now requires a password to access the CVS? I can't browse the CVS through Source Forge either, it hangs on loading the page. |
Yeah, this started happening earlier today. I have no idea what's going on or when it'll get fixed. In the mean time, just grab the ndslib.zip file from my site.
http://www.aaronrogers.com/nintendods/files/ndslib.zip
- Aaron Rogers
#37596 - tepples - Mon Mar 14, 2005 12:17 am
Sebbo wrote: |
when i type make then hit enter in step 5 (compiling the template) i get:
Code: |
MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.
|
|
That's not GNU Make; it's Borland Make. Most of the makefiles floating around for homebrew GBA and DS development assume that you've installed either the MSYS version of GNU Make or the MinGW version of GNU Make.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#37606 - Sebbo - Mon Mar 14, 2005 4:23 am
i have installed MSys tho...then again, i also have Borland Delphi and C# installed on this computer
can i get the template to compile through the MSys prompt?
#37607 - Sebbo - Mon Mar 14, 2005 4:28 am
nvm, i used the MSys bash and got it to make correctly
#37613 - Ryoku - Mon Mar 14, 2005 7:03 am
I seem to get a error when I try and compile the template code, if someone could tell me what I am doing wrong or point me in the wrong direction I would be eternally thankfull.
Code: |
C:\ndsdev\projects\template>make
rm -rf arm9/arm9.bin
rm -rf arm7/arm7.bin
make -C arm7 -I /c/ndsdev/projects/template
make[1]: Entering directory `/c/ndsdev/projects/template/arm7'
mv: missing file argument
Try `mv --help' for more information.
make[2]: [all] Error 1 (ignored)
built ... arm7.bin
make[1]: Leaving directory `/c/ndsdev/projects/template/arm7'
make -C arm9 -I /c/ndsdev/projects/template
make[1]: Entering directory `/c/ndsdev/projects/template/arm9'
mv: missing file argument
Try `mv --help' for more information.
make[2]: [all] Error 1 (ignored)
main.cpp
c:/ndsdev/projects/template/arm9/main.cpp: In function `int main(int, char**)':
c:/ndsdev/projects/template/arm9/main.cpp:32: error: `DISPLAY_CONTROL' undeclare
d (first use this function)
c:/ndsdev/projects/template/arm9/main.cpp:32: error: (Each undeclared identifier
is reported only once for each function it appears in.)
c:/ndsdev/projects/template/arm9/main.cpp:33: error: `SUB_DISPLAY_CONTROL' undec
lared (first use this function)
make[2]: *** [main.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/ndsdev/projects/template/arm9'
make: *** [all] Error 2 |
#37614 - Sebbo - Mon Mar 14, 2005 7:08 am
there are a couple of errors your supposed to get, just compare what you got to the screen shot on the site
i now get an error about not being able to process a g++ file just after the first error under the MSys bash
#37615 - Ryoku - Mon Mar 14, 2005 7:12 am
I apologize maybe I should of been more specific I understand we are supposed to receive some errors with the mv command (although I don't understand why) I was referring to the
Code: |
main.cpp
c:/ndsdev/projects/template/arm9/main.cpp: In function `int main(int, char**)':
c:/ndsdev/projects/template/arm9/main.cpp:32: error: `DISPLAY_CONTROL' undeclare
d (first use this function)
c:/ndsdev/projects/template/arm9/main.cpp:32: error: (Each undeclared identifier
is reported only once for each function it appears in.)
c:/ndsdev/projects/template/arm9/main.cpp:33: error: `SUB_DISPLAY_CONTROL' undec
lared (first use this function)
make[2]: *** [main.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/ndsdev/projects/template/arm9'
make: *** [all] Error 2 |
Error I was recieving, again if anyone could tell me why this is happening thankyou.
#37640 - arog - Mon Mar 14, 2005 5:12 pm
Quote: |
I seem to get a error when I try and compile the template code, if someone could tell me what I am doing wrong or point me in the wrong direction I would be eternally thankfull. |
There have been some modifications to ndslib since I posted the tutorial. I recommend you delete your ndslib directory and then get the ndslib.zip file from my site.
http://www.aaronrogers.com/nintendods/Day1/day1.php#ndslib_zip
While you are at it, grab the template.zip, too.
http://www.aaronrogers.com/nintendods/files/template.zip
There are going to be a few hiccups as ndslib is still very much in flux.
- Aaron Rogers[/code]
#37643 - Torlus - Mon Mar 14, 2005 6:24 pm
A small thing about the template.
As told in the tutorial, it doesn't do anything on current version of Dualis emulator (only shows two white screens). However, I managed to get it work on the emu eventually :
Find the following lines in the main.cpp file in ARM9 directory :
Code: |
DISPLAY_CR = MODE_0_2D;
SUB_DISPLAY_CR = MODE_0_2D;
|
and replace them by :
Code: |
DISPLAY_CR = MODE_0_2D | DISPLAY_BG0_ACTIVE;
SUB_DISPLAY_CR = MODE_0_2D | DISPLAY_BG0_ACTIVE;
|
Hopefully it should work on hardware too :)
_________________
GBA,GC,NGPC,GP32,FPGA,DS stuff at http://torlus.com/
#37647 - arog - Mon Mar 14, 2005 6:50 pm
Quote: |
Find the following lines in the main.cpp file in ARM9 directory |
Yeah, someone emailed me that code last week. I didn't get around to updating the code on my website yet.
- Aaron Rogers
#37722 - Ryoku - Tue Mar 15, 2005 9:31 am
Thankyou for the help Aaron, I took you're suggestions and the compiling is running smoothly.
#37733 - [mRg] - Tue Mar 15, 2005 2:53 pm
If people are having probs with grabbing ndslib from CVS (ie its asking for a password) dont fear, its just that SourceForge CVS is fudged at the moment.
Quote: |
2005-03-14 05:34:58 - Project CVS Service ) On 2005-03-13 a problem with the anonymous CVS server that hosts content for each project starting with the letters m, n, p, q, t, y and z is keeping access to data from pserver CVS, ViewCVS and nightly tarballs inaccessible. As we had already started synchronizing data to a new host, we are going to replace that host with the new one as soon as the data is all transferred. |
Hopefully they will get it fixed soon :?/
[mRg]
#41047 - X-Tender - Sun Apr 24, 2005 4:38 pm
Ryoku wrote: |
Thankyou for the help Aaron, I took you're suggestions and the compiling is running smoothly. |
hmm i also still ahve the same problem after dl those files ;/ ..
#41102 - arog - Mon Apr 25, 2005 5:01 am
Just grab the latest version of NDS Dev Env:
http://www.aaronrogers.com/nintendods/ndsdevenv.php
- Aaron Rogers
#41226 - Pacifist - Tue Apr 26, 2005 4:29 pm
I'm having trouble getting the template to display anything on hardware (after the addition of | DISPLAY_BG0_ACTIVE).
Does anyone else have it working?
#41245 - dafer - Tue Apr 26, 2005 11:01 pm
I had that problem to last week after following Aarons tutorial and the problem was an old version of the main in /boot. So the problem may be solved if you could replace that file with a newer version, could anyone link to some working code?
_________________
/As meningful to you as words written in water.