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.

Beginners > Strange errors in VHAM, can't deploy with XBOO

#166895 - miamicanes - Mon Feb 23, 2009 8:05 am

Is there a "howto" somewhere that walks you through building a project using Visual HAM, then uploading it to a GBA using a XBOO cable under Vista (where presumably you have to use something like PortTalk's AllowIO to enable direct access to the parallel port hardware)?

I'm having multiple problems. For one thing, when I hit f7 to build + run in VBA, I get the following output:

Quote:
c:/apps/gbaHAM/gcc-arm/bin/arm-thumb-elf-as.exe -mthumb-interwork c:/apps/gbaHAM/system/crt0.s -ocrt0.o
c:/apps/gbaHAM/gcc-arm/bin/arm-thumb-elf-gcc.exe -I c:/apps/gbaHAM/gcc-arm/include -I c:/apps/gbaHAM/gcc-arm/arm-thumb-elf/include -I c:/apps/gbaHAM/include -I c:/apps/gbaHAM/system -c -DHAM_HAM -DHAM_MULTIBOOT -DHAM_ENABLE_MBV2LIB -O2 -DHAM_WITH_LIBHAM -mthumb-interwork -mlong-calls -Wall -save-temps -fverbose-asm -nostartfiles main.c -o main.o
3 [main] arm-thumb-elf-gcc 6404 fork_copy: linked dll data/bss pass 0 failed, 0x32F000..0x32F040, done 0, windows pid 6456, Win32 error 487
c:/apps/gbaHAM/gcc-arm/bin/arm-thumb-elf-ld.exe -L c:/apps/gbaHAM/gcc-arm/lib/gcc-lib/arm-thumb-elf/3.3.2/interwork -L c:/apps/gbaHAM/gcc-arm/lib/gcc-lib/arm-thumb-elf/3.3.2 -L c:/apps/gbaHAM/gcc-arm/arm-thumb-elf/lib/interwork -L c:/apps/gbaHAM/gcc-arm/arm-thumb-elf/lib -L c:/apps/gbaHAM/gcc-arm/lib --script c:/apps/gbaHAM/system/lnkscript-afm -o demo.elf crt0.o main.o -lafm -lham -lm -lstdc++ -lsupc++ -lgcc -lc -lgcc
c:/apps/gbaHAM/gcc-arm/bin/arm-thumb-elf-objcopy.exe -v -O binary demo.elf demo.gba
copy from demo.elf(elf32-littlearm) to demo.gba(binary)
------------------------------------------------------------------
HAM Win32 installation information:

HAM version: 2.8 in c:/apps/gbaHAM
GCC/GDB version: 3.3.2 / 6.0
Newlib/Binutils: 1.11.0 / 2.14
Krawall ena/regged: /
------------------------------------------------------------------
c:/apps/gbaHAM/tools/win32/rm -f *.o *.i *.ii
c:/apps/gbaHAM/tools/win32/gbafix.exe demo.gba -tdemo
ROM fixed!
c:/apps/gbaHAM/tools/win32/vba.exe demo.gba


Note the "487 error". Nevertheless, it seems to run under VBA.

Problem #2: the only way to kill VBA is with task manager.

Problem #3: I can't deploy it to my GBA/SP. Here's the output when I hit f8 with the cable I built connected and the GBA/SP powered up:

Quote:
c:/apps/gbaHAM/gcc-arm/bin/arm-thumb-elf-as.exe -mthumb-interwork c:/apps/gbaHAM/system/crt0.s -ocrt0.o
c:/apps/gbaHAM/gcc-arm/bin/arm-thumb-elf-gcc.exe -I c:/apps/gbaHAM/gcc-arm/include -I c:/apps/gbaHAM/gcc-arm/arm-thumb-elf/include -I c:/apps/gbaHAM/include -I c:/apps/gbaHAM/system -c -DHAM_HAM -DHAM_MULTIBOOT -DHAM_ENABLE_MBV2LIB -O2 -DHAM_MBV2_USED -DHAM_DEBUGGER -DHAM_WITH_LIBHAM -mthumb-interwork -mlong-calls -Wall -save-temps -fverbose-asm -nostartfiles main.c -o main.o
4 [main] arm-thumb-elf-gcc 4220 fork_copy: linked dll data/bss pass 0 failed, 0x8AF000..0x8AF040, done 0, windows pid 4212, Win32 error 87
1034954 [main] arm-thumb-elf-gcc 4220 fork_copy: linked dll data/bss pass 0 failed, 0x8AF000..0x8AF040, done 0, windows pid 6220, Win32 error 87
3138306 [main] arm-thumb-elf-gcc 4220 fork_copy: linked dll data/bss pass 0 failed, 0x8AF000..0x8AF040, done 0, windows pid 6428, Win32 error 87
7223148 [main] arm-thumb-elf-gcc 4220 fork_copy: linked dll data/bss pass 0 failed, 0x8AF000..0x8AF040, done 0, windows pid 6520, Win32 error 87

c:/apps/gbaHAM/gcc-arm/bin/arm-thumb-elf-ld.exe -L c:/apps/gbaHAM/gcc-arm/lib/gcc-lib/arm-thumb-elf/3.3.2/interwork -L c:/apps/gbaHAM/gcc-arm/lib/gcc-lib/arm-thumb-elf/3.3.2 -L c:/apps/gbaHAM/gcc-arm/arm-thumb-elf/lib/interwork -L c:/apps/gbaHAM/gcc-arm/arm-thumb-elf/lib -L c:/apps/gbaHAM/gcc-arm/lib --script c:/apps/gbaHAM/system/lnkscript-afm -o demo.elf crt0.o main.o -lafm -lham -lm -lstdc++ -lsupc++ -lgcc -lc -lgcc
c:/apps/gbaHAM/gcc-arm/bin/arm-thumb-elf-objcopy.exe -v -O binary demo.elf demo.gba
copy from demo.elf(elf32-littlearm) to demo.gba(binary)
------------------------------------------------------------------
HAM Win32 installation information:

HAM version: 2.8 in c:/apps/gbaHAM
GCC/GDB version: 3.3.2 / 6.0
Newlib/Binutils: 1.11.0 / 2.14
Krawall ena/regged: /
------------------------------------------------------------------
c:/apps/gbaHAM/tools/win32/rm -f *.o *.i *.ii
c:/apps/gbaHAM/tools/win32/mb.exe -c -x 500 -w 50 -s demo.gba
3 [main] sh 7032 proc_subproc: Couldn't duplicate my handle<0x3C> for pid 7076, Win32 error 6
make: *** [mbv2] Error 1


I know about the problems with NT/Win2k/XP/Vista and parallel ports, and I launched VHAM itself using PortTalk's AllowIO.exe:

C:\apps\gbaHAM\vham>allowio vham.exe 0x378

Unfortunately, I'm not even sure whether that's the problem, one of several problems, or irrelevant because it's dying long before that even has a chance to BE the problem ;-)

So... any ideas or suggestions as to where to start?

#166921 - miamicanes - Tue Feb 24, 2009 3:50 am

Well, I found one big, huge problem: XBOO != MBV2.

Using XCOMMS_win32 with UserPort, I was able to successfully flash vham-samples\vham_c_helloworld to my SP.

New Problem(*): For some reason, I can't power up my GBA/SP with the XBOO cable connected. I have to physically unplug it, power up while holding down select+start, THEN connect the cable. I have a hunch I screwed up the cable somewhere along the line, but I'm not quite sure where. Any ideas?

(*)OK, not exactly a NEW problem... I had the same behavior last night. It's just that last night, I wasn't even making it far enough for this specific problem to be on the radar ;)