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.

Coding > Using VBA 1.7.2 with VHAM and Insight

#60696 - gmiller - Sun Nov 13, 2005 11:32 pm

I am teaching a class in GBA development at FullSail where we are focusing on the GBA from and architecture point of view. I have been using the VHAM for some time (without the HAM libraries or macros) to demonstrate what is happening when hardware is manipulated. The issues I have run into is a problem (I think) with the VBA SDL version when doing debugging. I am having no issues with breakpoints (even in Interrupt code) but 50% of my students are haveing issues where one of the following happens:

1. VBA crashed when starting (sometimes removing or adding MULTIBOOT fixes this) when doing simple no HAM but macro code.

2. Insight will start and the auto break at main will work but a continue cause VBA to crash.

All students are starting with the same version of everything and I have tried to confirm that what they are running is all the same but every time I test on my system I do not have any problems. I am waiting to get the loaner from one of my students so I can investigate the issue but I have to wait till his laptop get back from repair at HP. If anyone can throw a little light on this I would appreciate it. Looking through the threads it would appear that falling back to 1.7 of VBA would be a step but it does not address the inconsistancies in the experience. I will compare all releases of code between my machine and the students once I have the machine and try to discover what combination is messing me up. Prior to this class these same students used cygwin (with insight) to develop code to understand other aspects of machine architecture (binay representation, cache memory, virtual memory ...) and had no problems. I noticed that the compiler and other utilites use an older version of cygwin1.dll that I had many issues with when doing TCP/IP and pthreads.

#60747 - wintermute - Mon Nov 14, 2005 1:32 pm

It may be worth trying with the non cygwin build of Insight provided by the devkitPro project.

http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=146412&release_id=310959

One of the motivating factors in putting together the devkitPro toolchains was continuing problems with cygwin dependent tools of the kind you describe here. For me, it proved almost impossible to make such tools coexist peacefully on one machine without random crashes for no readily apparent reason.

Unfortunately recent versions of gcc/binutils have changed how thumb functions are represented in the ELF files and it's not currently possible to use gdb or Insight to debug thumb code compiled with devkitARM after release 8. ARM code can be debugged quite happily.

Work is currently being done on this issue and we hope to have a more recent Insight/gdb build available soon.

For what it's worth, the most recent SDL version of VBA appears to work quite happily with this version of Insight. I've been working with 1.8.x (CVS HEAD) of VBA while tracking the thumb instruction problem.

#60761 - gmiller - Mon Nov 14, 2005 4:07 pm

Thanks for the update. I understand the cygwin issue quite well (I have been fighting it for quite some time). I have been using the default and updated tools from the VHAM installation (some use cygwin, others do not) so I will try replacing the tools with the ones you refered to and see how it goes. Of course I will test it on my machine first to be sure that I have not broken anything in a woring configuration and then try applying the fixes to a broken configuration.

#62944 - gmiller - Wed Dec 07, 2005 1:43 am

I have tried different solutions to the debugging issue. I replaced the cygwin dll files in the tools area and that stablized the debugger for some people but not all. I replaced the insight debugger with the one you recommended and that works but does have the thumb mode issue so I am back to the original insight. I have modified the vham tool to work with all of these changes by munging (sorry that ages me) the make files to get this to work. I can debug most code with the configuration I have other than some strange stuff with DMA. The debugger seem to lock up during a DMA set up but I do not know where the hangup is (insight or the SDL vba) so I have moved on. If there is anyone who has suggestion I am open for them. I want my students to stay at the C/C++ source level because they are leaning X86 assembly at the same time and I do not want them to have to leam ARM assembly at the same time.

#62964 - wintermute - Wed Dec 07, 2005 8:37 am

I've put together a new Insight package from CVS HEAD which seems to work well with my limited testing so far.

http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=150769&release_id=372054

There's also a recent build of the SDL VBA found here -> http://www.devkitpro.org/downloads.shtml

One think I've noticed is that VBA 1.8.0 seems to crash (or at least this build does) if it finds a .cfg file from previous versions. I've patched VBA to understand the new thumb debug info so the built in debugger works with devkitARM compiled ELFs and fixed the crash on exit after debugging with Insight/Gdb.

#63241 - hobby16 - Sat Dec 10, 2005 11:55 am

wintermute wrote:
I've put together a new Insight package from CVS HEAD which seems to work well with my limited testing so far.

http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=150769&release_id=372054

There's also a recent build of the SDL VBA found here -> http://www.devkitpro.org/downloads.shtml

I had crash problem with Insight of the Install Pack.
Then I use the links you provide and all is great NOW.
Thank you !!!!