Current Debug Processes


scrapheap

Still Fresh
Joined
Oct 31, 2006
Messages
28
While we are waiting for the kernel so someone can get the usb networking working how are people debuging their software?

The reason I ask is because I have tried to create a program that uses SDL to put an image on the screen and then wait for a key press before relaunching the menu. But it just seems to hang. I have put in code to open a file and write it's messages to that but it doesn't seem to even get my program loaded. I tried putting a shell script wrapper around my program and using that to call my program with redirect stdout and stderr but I can't see the script in the launcher app on the Wiz.
 
I've only started hacking up code for WIZ this week, but for the last few days I've had to resort to redirecting stderr and stdout to text files .. its terribly frustrating to have to do this for the first 'startup period' of app development, when libs and the build system have to settle down a bit and you're not quite sure if things are broken because of the environment or because of bad code .. so what it means is, I run my app, remount the SD card, read the txt files, re-build, re-copy, umount the SD, run the app again, and so on.

Very, very un-fun.

So tonight I will make the serial cable, I think this is honestly the only way forward possible for debugging and building/testing sessions for me, for now, at least until I can get a console going within my app using something like sdlconsole and so on ..

I tried putting a shell script wrapper around my program and using that to call my program with redirect stdout and stderr but I can't see the script in the launcher app on the Wiz.

Sure its got the right extension (.gpe)? Got the shebang (#!/bin/sh) and all that?
 
yeah at this point you don't even need a debugger ;)

You use the explorer thing to pick and launch your .gpe app.

If you want it to show up in the app launcher per se, you need to make up a .ini file or something (I forge,t ED talked about it in one of his posts) and then it can show up in the menu. I've not worried about that myself, but probably should, though I imagine someone will or has created a tool to en-masse spit out the necessary files to make .gpe's show up in the launcher menu.

Anyway, name your shellscript right, and it'll show up in the explorer thing. Habve it run your app, and redirect output if you need.

But mindfull of file cache.. stderr (or stdout with cache shut off or fflush etc) .. remember if your app crashes, anything in the stdout cache in your app isn't going out, so you'll want uncached writes (and not many of them if you value performance :) -- you can also set up some (re)mount options to cache on exit, and do a 'sync' if you need, etc..

But fr debugging, life on the Wiz sort of stinks. Get friendly with SD ejects :p

jeff
 
torpor said:
So tonight I will make the serial cable, I think this is honestly the only way forward possible for debugging and building/testing sessions for me, for now, at least until I can get a console going within my app using something like sdlconsole and so on ..
I'm really looking forward to your usb networking module. So it is sad that you decided to make the serial cable before working on the module.

But I understand debugging the kernel modules also requires a console. Hope the cable will advance the release date.

Anyway, how often do you join #wizdev? I have been there since yesterday.
 
Last edited by a moderator:
Having serial+USB cable does help, I can transfer files and run stuff without any replugging or SD card swapping.
My process looks like this: insert USB modules on wiz, mount it as storage device on PC, transfer files, unmount, remove modules, test/run stuff, repeat..
 
notaz said:
Having serial+USB cable does help, I can transfer files and run stuff without any replugging or SD card swapping.
My process looks like this: insert USB modules on wiz, mount it as storage device on PC, transfer files, unmount, remove modules, test/run stuff, repeat..
I guess your cable supports both serial and USB guest, right? That seems to be good for development.

I got an development board from GPH by visiting the company, and am currently using it. It supports serial and USB host, but not USB guest. So I can't mount Wiz as a storage device on PC while using the serial connection. Therefore I send compiled binaries to Wiz by using the serial, which is terribly slow. That's why I want USB networking.
 
Last edited by a moderator:
notaz said:
Hm, actually I have one of those, do they also make different ones?
No, mine is the same. Then I must have missed the correct way.

Can you explain how to mount Wiz as a storage during the serial connection in detail? I have a serial cable and a 24-pin cable. Is there anything needed?
 
Last edited by a moderator:
No, just connect serial cable to j6 and standard miniUSB cable to con5. Then on your serial terminal program press ctrl-C to close the menu, and you should have root shell. You can run now
Code:
insmod lf1000_udc.ko
umount /mnt/sd
insmod g_file_storage.ko file=/dev/mmcblk0p1 removable=1 stall=0
and your PC should see your SD as mass storage device. Copy what you need and unmount ("safely remove hardware" or how is it called if you are on Windows). Then again on Wiz run
Code:
rmmod g_file_storage.ko
mount -t vfat /dev/mmcblk0p1 /mnt/sd
You can probably skip SD unmount/mount on Wiz, but Linux might not see your file changes in that case. You can put the commands in shell scripts to make it more convenient. g_file_storage on Wiz is a bit unstable and you might need insmod/rmmod it several times for PC to see your SD.
 
notaz said:
No, just connect serial cable to j6 and standard miniUSB cable to con5.
Thanks for your detailed explanation. I didn't know there is a miniUSB port on the board. Now I can see the output when I connect Wiz to PC.

The only problem is either the cable or the port is not good. If I move or touch something, the power lamp flickers and the connection breaks. I changed the cable to a new one, but the same problem exists...
 
Last edited by a moderator:
Back
Top