As stated in previous blog my learning cycle still grows with a reasonable speed. I struggled a few days in finding my way in the world of GDB, the linux debugging tool. Not only GDB was new for me but also the fact of doing the session remotely from within avr32 studio.
So I first started in making the Belkin access point up and running. This was still configured as DHCP and WEP encrypted. I changed my Philips router to the WEP again because I suppressed encryption due to the new ubuntu on my laptop. But in fact this was easy to enable again and now all my network devices work with the same WEP password. I connected the NGW on the access point but it the fix IP was not visible anywhere on the network. After a bit searching I suddenly realized that I didn't add the MAC of the NGW in the remote access table of the router yet. That solved indeed the problem. Happy as I was to have my chain completely set up, as it will be running live. I tried a few basic protocols over the network like a simple telnet session, NFS, samba and HTTP all seems to work properly. Now I don't have the NGW on my desk anymore but it locates in the electrical closet now, which is in the garage. I will shoot a picture later on and post it. Fully operational I must say!
At the same time setting this up I was also experimenting with remote debugging because the linux distribution on the NGW had a gdbserver installed. I tried and tried and tried but still having errors the moment gdbserver started the application. Sometimes I got "cannot access address ..." sometimes "segmentation fault". I changed several properties on the debug tab in the studio but still the same. I posted something on the avrfreaks network but no answer. Yesterday finally I saw where the problem could come from. Until now I always used the default "gdb" as client program to start within the studio. I did a find on my laptop and I got 100 hits on gdb like programs! Of course I had the wrong client, which works only with i86 gdbserver. I changed this by pointing to avr32-linux-gdb and oeps I was in ! This can be signaled as an error to the developers of the avr studio in my opinion. I tried a few debug features and all seems to work, even the viewing of the default register bank of AVR32 like R0-R12, SP,PC and LR. The special AVR32 registers like PIOA were undefined which is kind a normal without a JTAGICE and running in linux user space.
Doing al this I’d realized that a good understanding of the principles of linux permission is indispensable. I noticed for instance that if a C program tries to access a driver by IOCTL function and the user who started this program has no RW permissions on the driver modules all calls fail. It's easy to solve in doing chmod o=rw [driver] so that "others" can access too, assumed that the driver was started by root. But still if you are not familiar with that kind of protection it takes some time to get used to.
In the meanwhile a friend of mine is also started on the new IO board, which will be connected to the NGW. Totally based on the i2c protocol. I will dedicate a few blogs on this item in a few weeks when the PCB is finished and when I can go into details.
Maybe the first I’m going to try now is registering the no-ip.com site to be able to access my webserver on the NGW from anywhere on the internet. This works already but every time my ISP address changes I must use another address. I will start trying to compile and link the client daemon against the AVR32 chain because it’s really necessary to have this running undependably of any laptop or desktop pc.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment