Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Simple GBA (and maybe DS) compiler/assembler | |
Pages: 1 2Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 5691/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-12-05 07:10 AM Link | Quote
Well even though I still need that new motherboard, I'm bored silly without being able to program something, so I decided to set up the relatively simple Gameboy environment I generally use and work on some stuff there. That got me thinking that I should really get into GBA development (and DS eventually, since it's basically GBA and then some). Well the first thing I need is some way to write code. I'd prefer C, but ASM will do just fine too as long as the instruction set isn't needlessly painful (and I haven't heard anything to suggest that it is). What I'm looking for most is simplicity. I've been using tniASM for my Gameboy stuff and I love it because it's so damn simple; it doesn't optimize or auto-anything. (Maybe auto-Nintendo-logo would be nice, but yeah.) So does anyone know a good GBA/DS compiler/assembler similar to this?
Ramsus

Octoballoon
Level: 19

Posts: 133/162
EXP: 34651
For next: 1126

Since: 01-24-05
From: United States

Since last post: 39 days
Last activity: 71 days
Posted on 07-12-05 09:58 AM Link | Quote
GCC has an ARM target, so you can just build an arm-thumb-elf cross-compiler with GNU binutils and gcc (configure it with the --target=arm-thumb-elf flag, you can get the sources from ftp.gnu.org ). From there you just have to compile the program and strip it of the header with objcopy. You might also want newlib for a C library.

You might need Cygwin to do it in windows though.

HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 5695/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-12-05 12:33 PM Link | Quote
Yeah... I'm not really familliar with Linux. Perhaps you could explain that in a bit more detail? I understand what you're saying, I'm just not entirely sure how to do it. (And yeah, Windows for now. )
Ramsus

Octoballoon
Level: 19

Posts: 134/162
EXP: 34651
For next: 1126

Since: 01-24-05
From: United States

Since last post: 39 days
Last activity: 71 days
Posted on 07-12-05 03:45 PM Link | Quote
http://devkitadv.sourceforge.net/index.html

GCC with the right target for GBA dev, all prebuilt and pre-packaged. I looked around for it earlier, but I didn't find it until just now.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 5704/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-12-05 10:47 PM Link | Quote
Cool, thanks. So I just write plain old C and compile it with this? What about DS, is there anything available yet?
interdpth

Rex
Level: 36

Posts: 485/527
EXP: 294398
For next: 13712

Since: 03-20-04

Since last post: 10 days
Last activity: 31 days
Posted on 07-13-05 01:09 AM Link | Quote
Or contact me and i'll show you wonders.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 5717/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-13-05 04:12 AM Link | Quote
OK, so... I downloaded it, installed it, made a test program, and compiled it:
gcc: installation problem, cannot exec `as': No such file or directory

So I did what the FAQ says to do in this case:
gcc: installation problem, cannot exec `as': No such file or directory

I still don't get why gcc is so popular.
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 1469/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 07-13-05 06:09 AM Link | Quote
I use to use a thing called ham, came with a bunch of libs and everything, and was easy to install, only thing is unless you pay, it has a splash screen at the beginning of the game, it uses gcc, but it installs everything for you, so its really easy to get started, and theres an ide for it as well... anyway, heres the url if your interested http://ngine.de
Ramsus

Octoballoon
Level: 19

Posts: 135/162
EXP: 34651
For next: 1126

Since: 01-24-05
From: United States

Since last post: 39 days
Last activity: 71 days
Posted on 07-13-05 08:03 AM Link | Quote
Originally posted by HyperHacker
OK, so... I downloaded it, installed it, made a test program, and compiled it:
gcc: installation problem, cannot exec `as': No such file or directory

So I did what the FAQ says to do in this case:
gcc: installation problem, cannot exec `as': No such file or directory

I still don't get why gcc is so popular.


GCC is so popular because it's free and open source, it's been around for years and has a good optimizer, it conforms very well to language standards, and it targets just about everything (even embedded systems). Most of the time, it gets packaged with some sort of IDE or development kit that makes it easy to install and use though (i.e. Apple's Xcode), or it's being used by open source developers who are used to building software from sources and think VI and GNU autotools are the best.

It's everything you could ask for in a compiler, but GCC is just that, a compiler. It's just a small part of the picture. You need binutils to actually assemble and link programs, a standard C library like glibc (for UNIX), msvcrt (for Windows), or newlib (for embedded systems), and an editor with make or an IDE to manage builds.

So unless you're used to UNIX development using commandline tools like make, autotools, and an editor, it's a pain to set up yourself and the use directly. I thought the devkit I linked actually had an installer or something. Sorry about that.

Anyway, make sure you downloaded and unzipped at the very least (for C development): binutils, core, gcc, and newlib (why did he even put these in separate archives?), and then set your PATH up properly. You'll also want the debugger (insight) for when you've started coding.

And there's nothing between you and the GBA hardware. You can directly address it with pointers, but there are some good GBA graphics and sound libraries around by now that make it easier. You'll want the newlib C library too, unless you feel like writing your own memory and string functions.

Seriously check out that HAM devkit though. It's exactly the type of thing I'd suggest had I found it earlier.


(edited by Ramsus on 07-12-05 11:06 PM)
sloat

Level: 16

Posts: 72/85
EXP: 18044
For next: 2212

Since: 05-21-04
From: South Central Delaware

Since last post: 19 days
Last activity: 5 hours
Posted on 07-13-05 09:33 AM Link | Quote
checkout www.devkit.tk.
it also uses gcc and is still being worked on, unlike devkit advance. also uses a newer version of gcc.
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 1471/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 07-13-05 09:28 PM Link | Quote
devkit.tk is a cool one, it also has a devkitpsp..that would be pretty cool to try out, if there was a psp emulator.

I also believe devkitarm has some ds functions...not 100% sure though.


(edited by Dcahrakos on 07-13-05 12:34 PM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 5723/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-14-05 05:00 AM Link | Quote
I like the idea of using gcc, it just seems like something so widely used should be a little easier to use. The thing that gets me most is that even if you specify filenames in quotes, it still trips up on spaces, so you have to use the MS-DOS path. No other program I know of has that restriction; you can execute edit.com "C:\Some path with spaces\a file omg.txr" just fine.

But enough ranting. I did install all of those packages (and nothing else yet, actually). As far as PATH goes, I had removed all that stuff it added (figure there's no reason I can't just run it from where it's installed, like I do with MinGW), but that didn't work (couldn't find its files). So I hacked up a batch file to set it, then reset it after compiling, and that got it to run but it just gives me that same error.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 3542/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 07-14-05 05:39 AM Link | Quote
it seems you need a few UNIX utilities...

i think HH, that you are better off installing Cygwin, compiling an ARM enabled gcc in that emulated unix environment, and then produce your GBA programs that way.

but anyways, it seems gcc can't find the assembler... that is what as is... maybe you can add the path to 'as.exe' to the path

as for the path in quotes problem, have you tried reversing the '\' to be '/'


(edited by neotransotaku on 07-13-05 08:40 PM)
Ramsus

Octoballoon
Level: 19

Posts: 137/162
EXP: 34651
For next: 1126

Since: 01-24-05
From: United States

Since last post: 39 days
Last activity: 71 days
Posted on 07-14-05 08:36 AM Link | Quote
GCC is a widely used UNIX program. The Windows console uses a lot of DOS conventions and is about as far from UNIX as you can get with a console (even file name and path conventions are different, like the above post mentioned, don't ever use \ with GCC), so of course getting GCC to even run on Windows was a feat in itself.

Besides, it's not like a lot of people use spaces in their source code's filenames, so nobody bothers finding and eliminating that bug. Nobody bothers making GCC use regular Windows/DOS commandline conventions either, since most people who would use it on Windows are UNIX nuts, and in a UNIX environment, GCC is just like every other C compiler.

Anyway, what are the actual errors you've been getting in each case? If you provide specific quotes with any relevant environment variable settings and batch scripts and what you're typing in the shell, then maybe someone can help.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 5738/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-14-05 09:45 PM Link | Quote
That is the exact error.
gcc: installation problem, cannot exec `as': No such file or directory
That's if I set up the path right, otherwise it can't even find gcc.
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 1489/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 07-14-05 09:47 PM Link | Quote
if you install ham, or devkitadv, it sets up gcc and everything for you, I think ham has all the tools and stuff you need to work it without any other modifications, I know it worked for me right after install when I used it before.
Ramsus

Octoballoon
Level: 19

Posts: 138/162
EXP: 34651
For next: 1126

Since: 01-24-05
From: United States

Since last post: 39 days
Last activity: 71 days
Posted on 07-15-05 12:57 AM Link | Quote
Originally posted by HyperHacker
That is the exact error.
gcc: installation problem, cannot exec `as': No such file or directory
That's if I set up the path right, otherwise it can't even find gcc.


You never went into detail on how you were running the program, what the layout of the installed files were, and how you installed/set up the files and the environment, which is what I was more interested in than the vague error message you keep posting. You kind of explained what you were trying to do, but it was too unclear to pick out a specific problem.

Anyway, if as.exe is in the same directory (bin) as gcc.exe and ld.exe, and that directory is in the path, then all I can suggest is to delete everything and use some other build/version like the one HAM includes.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 5757/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-15-05 05:53 AM Link | Quote
...OK, now I feel stupid. I forgot binutils. It works now, but the program doesn't. (Just a printf, with stdio.h included.) The Nintendo logo is zeroed out - does that matter in VBA? - and all the palettes/graphics are empty... so how do I include the logo and graphics? (I read in one of the docs that I would have to supply my own logo, no problem, but there's still the question of how I put it in the ROM. )

Also the forward slash didn't work either. It still chokes at spaces. I even tried putting a backslash before the space to escape it (IIRC, you can do that in Linux) but it didn't work.
interdpth

Rex
Level: 36

Posts: 488/527
EXP: 294398
For next: 13712

Since: 03-20-04

Since last post: 10 days
Last activity: 31 days
Posted on 07-15-05 05:55 AM Link | Quote
Set up the screens
dma some data
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 5759/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 07-15-05 06:38 AM Link | Quote
Maybe you could be a little more specific? I don't even really know what sort of functions are available for the GBA with this. Where would I look for that, the include files?


(edited by HyperHacker on 07-14-05 09:39 PM)
Pages: 1 2Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Simple GBA (and maybe DS) compiler/assembler | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.013 seconds.