#150908 - Alphanoob - Thu Feb 14, 2008 10:22 pm
I have just downloaded devkitpro using the devkitpro updater, and I am sitting reading the example given in a guide. I copy and paste it to the programmers notepad and then attempt to run it on my DS (using superkey/supercard lite combo on my flashed DSL). It doesn't work, and I am now very confused, and can't figure out:
1. How to change it from .nds to .sc.nds (or .ds.gba, which also works).
2. How to make it usable on my DS at all... please help a noob in need!
Also, if there is something simpler that I can start out programming with, plz tell me. I have made multiple programs on my Ti-83 calculator, but that seems like a joke compared to this stuff. If there is a better way to start out, I am open to suggestions.
#150910 - tepples - Thu Feb 14, 2008 10:28 pm
As of a few versions of devkitARM ago, ndstool automatically adds a header that works in both .nds and sc.nds modes. At least it works on my cousins' SuperCard SD adapters.
If your program doesn't run on a DS or in NO$GBA, then there may be a problem with the code itself. Have you tried compiling any of the examples that come with libnds and running them? Specifically, can you get C:\devkitpro\examples\nds\templates\arm9 to work in NO$GBA or on your SuperCard?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#150911 - Alphanoob - Thu Feb 14, 2008 10:39 pm
so it should just work? I mean, how to i know that I put the right ending on the file. There are so many files in the folder that it downloaded for me I can't tell what half of them are.
note: I don't have an emulator, i am trying to keep my downloads to a minimum.
#150912 - tepples - Thu Feb 14, 2008 10:43 pm
Alphanoob wrote: |
note: I don't have an emulator, i am trying to keep my downloads to a minimum. |
At 150 KiB, NO$GBA is one of the smallest emulators I've seen. How would that violate your minimum?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#150913 - Alphanoob - Thu Feb 14, 2008 10:44 pm
rofl, didnt know that. I havent even glanced at emulators... thought having a real ds would work fine. could u explain how I would use it? (i think i may get it now)
#150917 - Alphanoob - Thu Feb 14, 2008 11:13 pm
ok, now that I am using the emulator I
1. Can't find the example program
and 2. Can't run most of my normal ones that work on my DSL.
Are there some advanced options I have to set, am I an idiot, or is it just not working right.
(Answer 2 is very likely, by the way)
I was trying to test it out running a brickbreak game, and it just went black. I play this game on my ds quite often tho.
edit: I still dont see a single .nds file in the nds example folder.
#150945 - bean_xp - Fri Feb 15, 2008 6:27 pm
To get the NDS file, you need to compile the source code. The example program tepples is referring to, is produced then the example source code is built from the files found in it's directory.
A lot of compiled programs will not run on emulators, due to the emulators being released incomplete, however the example projects downloaded with DevKitARM will run on most emulators once the projects have been compiled.
#150952 - Alphanoob - Fri Feb 15, 2008 9:27 pm
so how would I go about compiling the example program... I am a serious newbie at this stuff.
#150954 - Dwedit - Fri Feb 15, 2008 10:54 pm
Run msys, change to the directory, run make.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#150957 - Alphanoob - Sat Feb 16, 2008 1:17 am
do i need some specific program to run makefile? I am looking at the msys folder and not quite seeing what you are looking at. there is a makefile prgrm right by the example, but I dont know what to run it with.
#150962 - Dwedit - Sat Feb 16, 2008 1:52 am
You start the msys Bash shell either by running bash.exe (from the bin folder) or msys.bat.
From there, you need to use unix style commands to navigate to the directory, such as "cd" to change directory, "ls" to list all files in a directory, or "make" to execute any makefile script named "makefile".
For example:
go to C:\devkitpro\msys
run msys.bat
cd C:/devkitpro/examples/nds (you need to use forward slashes within bash)
ls (you see a screen full of directory names)
To go back a directory, use "cd .."
Before you try to compile any of the example programs, make sure you have declared environment variables DEVKITARM and DEVKITPRO. I have DEVKITARM=/c/devkitPro/devkitARM and DEVKITPRO=/c/devkitPro
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#151054 - Alphanoob - Sun Feb 17, 2008 8:04 pm
so where would it be if it wasnt in the bin folder. I checked devkitARM's bin folder and all I saw was arm-eabi-gccbug. Am I missing something here, or is my devkit just messed up?
#151158 - Alphanoob - Wed Feb 20, 2008 5:38 am
Found it!!!!! I tried loading devkitpro onto a computer that wasnt a vista, and it loaded properly. Thanks for the help guys, i wouldnt have known that I had a problem other than not understanding this stuff without u. =)
#151160 - Alphanoob - Wed Feb 20, 2008 6:00 am
one final question. when I say "make makefile" in bash, it replies "make: nothing to be done for makefile", why is this?
#151170 - tepples - Wed Feb 20, 2008 1:21 pm
The argument to Make specifies the target that you are going to build:
Make assumes the makefile itself is called makefile.[1] If you want to specify a different makefile, use the -f switch:
[1]GNU Make actually tries a few different names, but makefile is the most commonly used.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#151176 - Cearn - Wed Feb 20, 2008 3:28 pm
A makefile will only run those rules of which the targets (outputs) are out of date with the prerequisites (inputs). So if the .nds is already there and was more recently modified than the .c files, there's "nothing to be done by the makefile".
If you want it to recompile, either run 'make clean' or change some of the source files.
#151199 - Alphanoob - Wed Feb 20, 2008 10:00 pm
ok, now I am just confused. I am trying to compile the realtimeclock example, and it just won't work. ive tried "make -f makefile", "make makefile", "make dsmakefile", and stuff like that, and the stupid thing wont work. I know almost for sure that the machines stupid operator is the problem, so if someone could just tell me the exact stuff to enter to run it, it would be much appreciated. (I hope I am not becoming too annoying with this topic, and apologize if I am.)
#151200 - Alphanoob - Wed Feb 20, 2008 10:06 pm
OMG =). scratch that last post. I read back a bit and found out what i did wrong. i didnt tell it what DEVKITPRO= and DEVKITARM=. thought it saved that stuff. I will stop bugging u geniuses... for now. chances are i will be back in an hour for some other noob Q's. thank you sooooo much.