#11056 - Wildginger - Wed Sep 24, 2003 8:42 pm
Hi all,
What sound engines do you all use?
In the recent compo, there were some good music in the games, but I struggled to get sound in mine, I got sound effects, but not music. I did it using the odd tutorial here and there, but I see theres lots of engines available.
Which ones are the best / easiest to use?
Also, I noticed most of these require you to be using crt0.s and a makefile. I dont, I just use a bat file with the following info in:
==============================================
path=c:\gba development\gba\bin
g++ -o KA.elf CMainGame.cpp main.cpp bg.cpp CSoundEngine.cpp CLevel.cpp cMapFunctions.cpp CLetters.cpp
objcopy -O binary KA.elf KA.bin
pause
KA.bin
==============================================
how would I incorporate crt0.s into that?
Sorry if this is way basic, but Im not too 'up' on makefiles etc - once upon a time, the above method worked, and then I just went from there.
Any help would be GREATLY appreciated, and would make Kitchen Acadamy, much better :-)
Cheers,
Jim.
_________________
---
Wildginger (aka JimTownsend)
#11064 - tepples - Thu Sep 25, 2003 1:34 am
I use the Tri Engine, which is my own original work. It can be found in TOD. It mixes Dsound in mono and can play music through Dsound and the GBC channels, but it's not yet ready for public consumption for several reasons, mostly involving lack of stereo mixing support, lack of a graphical music sequence editor (sequences are currently written in a musical assembly language and compiled to my own module format[1]), and lack of time to produce documentation. Once I do get it done, it will be released under the GNU LGPL.
[1] I didn't "just use S3M" because I wanted something where each voice could have a separate order list so that I didn't have to cut and paste my drum and bass lines every time the melody changed a bit.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#11067 - DekuTree64 - Thu Sep 25, 2003 2:37 am
I used Krawall in my compo entry. It's really easy to set up, but it takes quite a bit of IWRAM. AAS (http://www.apex-designs.net/tools_aas.html)is currently the fastest mixer around, and only takes 2.5K IWRAM. The only reason I didn't use it is it only supports 4 channel MODs (8 channels total though, so you still have plenty for SFX), and my song has 8 channels, so I'd suggest checking it out if you don't need bunches of channels in your music.
If you try writing your own mixer, beware, it can consume your life very quickly. It's really fun though^_^
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku
#11236 - jd - Mon Sep 29, 2003 7:18 pm
DekuTree64 wrote: |
AAS (http://www.apex-designs.net/tools_aas.html) is currently the fastest mixer around, and only takes 2.5K IWRAM. The only reason I didn't use it is it only supports 4 channel MODs (8 channels total though, so you still have plenty for SFX), and my song has 8 channels, so I'd suggest checking it out if you don't need bunches of channels in your music. |
Just thought I'd write to let you know that AAS has now been expanded to support 1-8 channel MODs, better redundancy checking and a few other things. The latest release can be found here:
http://www.apex-designs.net/tools_aas.html
#11254 - Sweex - Tue Sep 30, 2003 11:06 am
I've used AAS in Critical Velocity and it was quite easy to get working. Also fairly easy to play sound effects.
_________________
If everything fails, read the manual: If even that fails, post on forum!
#11273 - Wildginger - Tue Sep 30, 2003 9:45 pm
Hi All,
Thanks for the replies, ASS looks really good, but I dont use a makefile, and AAS does. It seems to use crt0.s for the callback function or something, and I just cant seem to get crt0.s to be build with my project.
Can anyone tell me how I can get crt0.s into my project without using a makefile? Or get the required callback working in my project? I tried compiling crt0.s with the rest of my source files but got loads of warnings about multiple definitions.
I even tried making a new makefile project in VisualC++ using the files in the AASExample, but I got nowhere - Got it building ok, but couldnt get a rom to be built for the life of me.
As Ive said, Im not clued up on makefiles at all.
Cheers,
_________________
---
Wildginger (aka JimTownsend)
#11307 - jd - Thu Oct 02, 2003 12:38 am
Wildginger wrote: |
Can anyone tell me how I can get crt0.s into my project without using a makefile? Or get the required callback working in my project? I tried compiling crt0.s with the rest of my source files but got loads of warnings about multiple definitions.
|
I can't claim to be an expert either, but I'll do my best. Basically, a makefile has a set of rules in it that specify what the "make" tool should do to certain input files and types. To use it, just launch devkitadv, go to the folder with the makefile in it and type "make". Anyway, I had a go at converting the AASExample makefile into a .bat file and this is what I came up with:
Code: |
path=c:\devkitadv-r5-beta-3\bin
conv2aas AAS_Data
arm-agb-elf-as -mthumb-interwork -o AAS_Data.o AAS_Data.s
arm-agb-elf-gcc -mthumb -O3 -ffixed-r14 -funroll-loops -ILibAAS -mthumb-interwork -fomit-frame-pointer -mapcs-32 -mcpu=arm7tdmi -ffast-math -fno-exceptions -fno-rtti -c AASExample.c -o AASExample.o
arm-agb-elf-gcc -mthumb-interwork -Xlinker -Map map.out -nostartfiles -Tlnkscript -o AASExample.tmp crt0.o AAS_Data.o AASExample.o -LLibAAS -lAAS
objcopy -O binary AASExample.tmp AASExample.gba
pause
AASExample.gba
|
This code has been tested under devkitadv-r5-beta-3 - you'll need to change the path on your setup. The key differences between this and your make.bat are as follows:
1) The C/ASM files are being explicitly compiled into different .o files and then linked together. This allows different options to be used depending on what's best for that file. You also need to use the -mthumb-interwork option if you're mixing ARM and thumb code.
2) The .c files (which by default go into ROM) are being compiled to the thumb instruction set. I believe the default (which was what was being used in your original make.bat) is ARM code, which is very slow when executed from ROM. I'm also passing lots of other options, partially to work around bugs in GCC's thumb output (-ffixed-r14, -mlong-calls), partially to improve performance (-ffast-math, -funroll-loops) and partially to disable features I'm not using (-fno-exceptions, -fno-rtti). You may not want/need some of these options in your project.
3) At the linking phase, the default start files are being disabled and crt0.s (compiled to crt0.o) is being used instead. It's also being linked to the AAS library and a map.out file is being produced (this can be used to find out the addresses of your global variables and other useful information).
#11425 - Wildginger - Mon Oct 06, 2003 3:26 pm
Hi there,
Thanks for that reply, its helped a lot and Im on my way now, but Im still not quite there.
When you run the above batch file, does it build cleanly? At the moment, I am getting a lot of warnings about multiple instances of variables in crt0 (Im not at my PC at the moment, so cant remember exactly), and I also get "undefined reference to main" and undefined reference to "InterruptProcess". Im running this batch file against the example.
Im trying different things to correct it at the moment, hence my lack of reply over the last few days, but is there anything you can think of that would cause the above? Im sure its something basic and simple Ive missed!
Thanks again, and I'll keep on trying.
Jim.
_________________
---
Wildginger (aka JimTownsend)
#11428 - jd - Mon Oct 06, 2003 6:51 pm
Wildginger wrote: |
When you run the above batch file, does it build cleanly?
|
Yes.
Wildginger wrote: |
At the moment, I am getting a lot of warnings about multiple instances of variables in crt0 (Im not at my PC at the moment, so cant remember exactly), and I also get "undefined reference to main" and undefined reference to "InterruptProcess". Im running this batch file against the example.
Im trying different things to correct it at the moment, hence my lack of reply over the last few days, but is there anything you can think of that would cause the above? Im sure its something basic and simple Ive missed!
|
It sounds like some built-in default startup code is still being linked in, although I'm not sure why that would happen as the "-nostartfiles" option included at the link phase in the makefile/make.bat is supposed to prevent this. Would it be possible to download devkitadv-r5-beta3 and use that instead of your current build environment? The latest version of DevKit Advance is available here:
http://devkitadv.sourceforge.net/
#11434 - Wildginger - Mon Oct 06, 2003 9:22 pm
Hello again,
I was actually using devkitadv-r5-beta3, although it didnt have arm-agb-elf-gcc, or at least not in bin directory, so I copied it from previous setup.
Just to make sure, I downloaded the example again, made a batch file using your above example, and ran it. The output was as follows:
Code: |
C:\GBA DEVELOPMENT\AAS\AASExample>path=c:\devkitadv-r5-beta-3\bin
C:\GBA DEVELOPMENT\AAS\AASExample>conv2aas AAS_Data
/---------------------------------------------\
| Conv2AAS v1.05 WAV, RAW & MOD -> AAS |
| Copyright (c) 2003, Apex Designs |
\---------------------------------------------/
Adding WAV Ambulance.wav...Done!
Adding RAW Boom.raw...Done!
Adding MOD FlatOutLies.mod...4 channels...Done!
song_length:32 last_pattern:23
Writing AAS_SampleData (Unique:31 Actual:31 Length:155828)...Done!
Writing AAS_PatternData (Unique:63 Actual:96 Length:16128)...Done!
C:\GBA DEVELOPMENT\AAS\AASExample>arm-agb-elf-as -mthumb-interwork -o AAS_Data.o AAS_Data.s
C:\GBA DEVELOPMENT\AAS\AASExample>arm-agb-elf-as -mthumb-interwork -o crt0.o crt0.s
C:\GBA DEVELOPMENT\AAS\AASExample>arm-agb-elf-gcc -mthumb -O3 -ffixed-r14 -funroll-loops -ILibAAS -mthumb-interwork -fom
it-frame-pointer -mapcs-32 -mcpu=arm7tdmi -ffast-math -fno-exceptions -fno-rtti -c AASExample.c -o AASExample.o
C:\GBA DEVELOPMENT\AAS\AASExample>arm-agb-elf-gcc -mthumb-interwork -Xlinker -nostartfiles -Tlnkscript -o AASExample.tmp
crt0.o AAS_Data.o AASExample.o -LLibAAS -lAAS
crt0.o: In function `_start':
crt0.o(.text+0x0): multiple definition of `_start'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x0): fir
st defined here
crt0.o: In function `__boot_method':
crt0.o(.text+0xc4): multiple definition of `__boot_method'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0xc4): fi
rst defined here
crt0.o: In function `__slave_number':
crt0.o(.text+0xc5): multiple definition of `__slave_number'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0xc5): fi
rst defined here
crt0.o: In function `__FarProcedure':
crt0.o(.text+0x186): multiple definition of `__FarFunction'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x25c): f
irst defined here
crt0.o: In function `__FarProcedure':
crt0.o(.text+0x186): multiple definition of `__FarProcedure'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x25c): f
irst defined here
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\bin\ld.exe: section .iwram [080340a8
-> 08034a73] overlaps section .rodata [0802d908 -> 080340c7]
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\bin\ld.exe: section .ewram [08034a7c
-> 08035863] overlaps section .jcr [08034a7c -> 08034a7f]
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o: In function `_
_crt0_multiboot_start':
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0xe0): un
defined reference to `__load_start_footer'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o: In function `_
_crt0_reset':
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1c0): u
ndefined reference to `__memmap_rom_start'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1d8): u
ndefined reference to `__appended_start'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1e4): u
ndefined reference to `__load_start_data'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1e8): u
ndefined reference to `__load_stop_data'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1f8): u
ndefined reference to `__load_start_ewram'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x204): u
ndefined reference to `__load_start_iwram'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.footer+0x0): u
ndefined reference to `__load_stop_appended'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.footer+0x4): u
ndefined reference to `__load_start_appended'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.footer+0x8): u
ndefined reference to `__load_stop_appended'
collect2: ld returned 1 exit status
crt0.o: In function `_start':
crt0.o(.text+0x0): multiple definition of `_start'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x0): fir
st defined here
crt0.o: In function `__boot_method':
crt0.o(.text+0xc4): multiple definition of `__boot_method'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0xc4): fi
rst defined here
crt0.o: In function `__slave_number':
crt0.o(.text+0xc5): multiple definition of `__slave_number'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0xc5): fi
rst defined here
crt0.o: In function `__FarProcedure':
crt0.o(.text+0x186): multiple definition of `__FarFunction'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x25c): f
irst defined here
crt0.o: In function `__FarProcedure':
crt0.o(.text+0x186): multiple definition of `__FarProcedure'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x25c): f
irst defined here
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\bin\ld.exe: section .iwram [080340a8
-> 08034a73] overlaps section .rodata [0802d908 -> 080340c7]
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\bin\ld.exe: section .ewram [08034a7c
-> 08035863] overlaps section .jcr [08034a7c -> 08034a7f]
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o: In function `_
_crt0_multiboot_start':
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0xe0): un
defined reference to `__load_start_footer'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o: In function `_
_crt0_reset':
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1c0): u
ndefined reference to `__memmap_rom_start'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1d8): u
ndefined reference to `__appended_start'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1e4): u
ndefined reference to `__load_start_data'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1e8): u
ndefined reference to `__load_stop_data'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x1f8): u
ndefined reference to `__load_start_ewram'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.text+0x204): u
ndefined reference to `__load_start_iwram'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.footer+0x0): u
ndefined reference to `__load_stop_appended'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.footer+0x4): u
ndefined reference to `__load_start_appended'
c:\devkitadv-r5-beta-3\bin\..\lib\gcc-lib\arm-agb-elf\3.2.2\..\..\..\..\arm-agb-elf\lib\interwork\crt0.o(.footer+0x8): u
ndefined reference to `__load_stop_appended'
C:\GBA DEVELOPMENT\AAS\AASExample>objcopy -O binary AASExample.tmp AASExample.gba
objcopy: AASExample.tmp: No such file or directory
C:\GBA DEVELOPMENT\AAS\AASExample>pause
Press any key to continue . . .
|
All I changed was to add the converting of crt0.s to crt0.o, and I removed map.out option, as it complained about file not found.
Any ideas? Ive noticed that this time, Im not getting "undefined reference to main" - just quite a few more warnings etc . . .
I'll keep trying in the mean time, and thanks for your time . . .
_________________
---
Wildginger (aka JimTownsend)
#11454 - jd - Tue Oct 07, 2003 7:17 pm
Wildginger wrote: |
I was actually using devkitadv-r5-beta3, although it didnt have arm-agb-elf-gcc, or at least not in bin directory, so I copied it from previous setup.
|
That's a bad sign - they're definitely included in the archives (I've just checked.) Did you download and install all the archives correctly? The ones I've installed are:
agb-win-binutils-r5-beta-3.zip
agb-win-core-r5-beta-3.zip
agb-win-gcc-r5-beta-3.zip
agb-win-insight-r5-beta-3.zip
agb-win-libstdcpp-r5-beta-3.zip
agb-win-newlib-r5-beta-3.zip
I think "agb-win-insight-r5-beta-3.zip" is optional, I'm not sure about the others. ("agb-win-gcc-r5-beta-3.zip" is the one with arm-agb-elf-gcc in it. All these archives should be extracted to c:\
Incidentally, since you're now using devkitadv, you can quite easily use the standard makefile by launching devkitadv (double click on "c:\devkitadv-r5-beta-3\devkit-advance-r5-beta-3") cd'ing to the AASExample folder (I recommend installing it in "c:\devkitadv-r5-beta-3\projects\AASExample") and then typing "make". (You'll need to modify "Makefile" slightly so that the "CROSS = /devkitadv/bin/" line reads "CROSS = arm-agb-elf-" instead.) It might be useful to try compiling it this way as it would rule out any mistakes in make.bat as the cause of the problems.
Wildginger wrote: |
All I changed was to add the converting of crt0.s to crt0.o, and I removed map.out option, as it complained about file not found.
|
Not explicitly assembling crt0.s in the make.bat I suggested was a mistake on my part. Having said that, it shouldn't be necessary to remove the map.out option - the cause of this is probably related to the missing files mentioned above.
#11463 - Wildginger - Tue Oct 07, 2003 11:15 pm
Well, Im finally there :)
Not sure what happened with missing files etc, but a reinstall of devkit made sure everything was there.
I had to comment out gbafix in the makefile, but apart from that, everything now works fine. As for the batch file, that still wont work, but now the makefile setup is working, I'll stick with it.
My last game was written in c++, and I had a quick go at linking it up with AAS, but I had a few problems, like "undefined reference to InterruptProcess" etc, but as Im starting a new game, I might just go with C for now. Been hacking about with these sound problems for too long now!
Anyways, cheers jd, you've been a massive help, and AAS looks / sounds excellent. Now for the game . . .
_________________
---
Wildginger (aka JimTownsend)
#11475 - jd - Wed Oct 08, 2003 6:11 am
Wildginger wrote: |
I had to comment out gbafix in the makefile, but apart from that, everything now works fine. As for the batch file, that still wont work, but now the makefile setup is working, I'll stick with it.
|
Yes, sorry, I forgot to mention about removing the reference to gbafix - although I'd recommend installing it if you send a ROM to a publisher as the ROM won't work on a Nintendo cartridge without being gbafixed first.
Wildginger wrote: |
My last game was written in c++, and I had a quick go at linking it up with AAS, but I had a few problems, like "undefined reference to InterruptProcess" etc, but as Im starting a new game, I might just go with C for now. Been hacking about with these sound problems for too long now!
|
It should be possible to amend the makefile to compile c++ - just add a rule that compiles .cpp files in a similar way to .c files.
#11498 - Wildginger - Wed Oct 08, 2003 8:44 pm
So what would I have to change in the make file? Ive changed gcc to g++,
added:
Code: |
%.o: %.cpp
$(CC) $(DEFAULT) $(INCLUDES) $(CFLAGS) -c $< -o $@ |
and changed the SRC to:
Code: |
# Files you want to go in ROM (AAS_Data.o must go first)
SRC = AAS_Data.o CMainGame.o CSoundEngine.o CLetters.o CLevel.o CMapFunctions.o bg.o main_file.o
|
but unforunately Im still getting undefined reference to InterruptProcess and 3 other undefined references. My InterruptProcess() is not in a class, its in main_file.cpp.
Oh yeah, Ive changed the crt0.s file to include c++ support as well.
Any ideas? I'll get there one day,
Jim.
P.S. heres the output I get:
crt0.o: In function 'intr_main':
crt0.o(.iwram+0x8): undefined reference to 'InterruptProcess'
then I get undefined reference to the following
'__appended_end'
'__heap_limit'
__appended_start
which are apparantly in function '_sbrk' (agb-sbrk.o)
_________________
---
Wildginger (aka JimTownsend)
#11519 - jd - Thu Oct 09, 2003 5:51 am
Wildginger wrote: |
but unforunately Im still getting undefined reference to InterruptProcess and 3 other undefined references. My InterruptProcess() is not in a class, its in main_file.cpp.
|
You need to declare InterruptProcess as follows to stop C++ from mangling the function's name:
Code: |
extern "C" void InterruptProcess()
|
Wildginger wrote: |
then I get undefined reference to the following
'__appended_end'
'__heap_limit'
__appended_start
which are apparantly in function '_sbrk' (agb-sbrk.o)
|
I guess your C++ code is being linked with agb-sbrk.o, and this expects "__appended_end", "__heap_limit" and "__appended_start" to be defined in the linkerscript. There's a default one in "C:\devkitadv-r5-beta-3\crtls\lnkscript" but the makefile included with AAS overrides this, hence the problems.
Assuming you can't stop agb-sbrk.o from being linked with your project, you'll either need to modify AAS's lnkscript to include these definitions (although exactly what you'll need to set them to I'm not sure) or you'll need to modify the devkitadv lnkscript to include the definitions that AAS needs. (It's annoying that there's so many different lnkscripts floating around.) I've hacked a version together that seems to work, although I can't vouch for it 100%. Use the board's pm feature to let me know your email address if you want me to send it to you.