On Fri, May 9, 2008 at 5:56 PM, Philip Levis <[EMAIL PROTECTED]> wrote:
> > On May 9, 2008, at 1:51 AM, Elvar Ólafsson wrote: > >> Hi everyone. >> >> I am trying to figure out how to use gdb with my tinyos 2 program. To >> start learning how gdb worked I decided to try it on the Blink application. >> I ran make micaz sim and everything compiled fine. >> >> Then I opened up emacs and started the gdb from there. Ran the following >> command in emacs: >> gdb /build/micaz/main.exe >> >> Everything starts fine but when it comes to adding breakpoints I have some >> problems. Typing: >> >> break *BlinkC$Boot$booted >> >> only results in >> >> No symbol "BlinkC$Boot$booted" in current context. >> >> I could however add breakpoints using C-x SPC in the source file in emacs. >> But now comes my big problem. When I run >> >> run 1 >> >> I get the following >> >> (gdb) run 1 >> Starting program: /opt/tinyos-2.x/apps/Blink/build/micaz/main.exe 1 >> /bin/bash: /opt/tinyos-2.x/apps/Blink/build/micaz/main.exe: cannot execute >> binary file >> /bin/bash: /opt/tinyos-2.x/apps/Blink/build/micaz/main.exe: Success >> >> Program exited with code 01. >> You can't do that without a process to debug >> >> What am I doing wrong? I have checked the access rights on the main.exe >> file and it has read, write and execute in all. Hope you guys can help me >> out with this so that I can use gdb to debug my code. >> >> With regards, >> > > > build/micaz/main.exe is an executable for an avr128 microcontroller; you > can't run it on your PC. Instead, you need to compile for TOSSIM, and then > use gdb on TOSSIM. The TOSSIM tutorial goes into how to do this. > > Phil Hi I did compile it for the TOSSIM, I ran *make micaz sim *as I wrote in the top of my previous message. Should I be using avr-gdb instead? With regards, Elvar Olafsson
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
