Hi,
I have been experimenting using breakpoints in the IDE Debugger and have noticed that I can only set them in some places. I get a little exclamation, unresolved breakpoint. Can someone clue me in on where they can be used.
Cheers
Matt
Debug breakpoints in the IDE.
-
- Active Member
- Posts: 50
- Joined: Sat Feb 13, 2010 12:04 pm
-
- Respected Member
- Posts: 279
- Joined: Fri Dec 11, 2009 1:34 pm
Are you compiling your code in debug configuration? It disables optimisations and should allow you to put a breakpoint anywhere.
-
- Active Member
- Posts: 50
- Joined: Sat Feb 13, 2010 12:04 pm
I have tried cleaning the project and hitting the debug button from the debug view. Does that automatically compile with the debug or do I have to edit the make file? Sorry I am pretty new at this.
-
- Respected Member
- Posts: 279
- Joined: Fri Dec 11, 2009 1:34 pm
Try selecting the arrow beside the build 'hammer' icon and choose "Debug" rather than "Release". Then hit the debug button to run.Matt wrote:I have tried cleaning the project and hitting the debug button from the debug view. Does that automatically compile with the debug or do I have to edit the make file? Sorry I am pretty new at this.
-
- Active Member
- Posts: 50
- Joined: Sat Feb 13, 2010 12:04 pm
I am working on the XMOS TCPIP v1.2 It does not seem to have any other build options other than "XMOS Compiler Collection (XCC)".
I have had a look at another project and can see that therer is other build configurations so I can see what your talking about. I can I make another build config that has debuging for the project I am working on.
Thanks for you help
I have had a look at another project and can see that therer is other build configurations so I can see what your talking about. I can I make another build config that has debuging for the project I am working on.
Thanks for you help
-
- Respected Member
- Posts: 279
- Joined: Fri Dec 11, 2009 1:34 pm
Ah I didn't realise its using a custom make file to compile. I think this complicates things slightly as the file will need edited directly to change the optimisation level. Perhaps someone more experienced with these can suggest how to go about changing it.
I also understand that disabling optimisations or putting breakpoints in the TCP stack can break it, so they're only beneficial for understanding how the code works, rather than debugging its real time operation.
I also understand that disabling optimisations or putting breakpoints in the TCP stack can break it, so they're only beneficial for understanding how the code works, rather than debugging its real time operation.
-
- Active Member
- Posts: 50
- Joined: Sat Feb 13, 2010 12:04 pm
I have read xcc87.pdf section on compiler directives and it seems that -g is the debug option. This is already used in the make file for the TCPiP Stack. It also has heavy Optimisation Options -O3. I think that this is what is killing my ability to debug but without the optimisation the project does not work.
I while ago I posted saying that I could not get the simple TCPiP stack demo to work. The reason why is that without code optimisation set to 3 the debug fills with warnings about the header not matching the length.
I while ago I posted saying that I could not get the simple TCPiP stack demo to work. The reason why is that without code optimisation set to 3 the debug fills with warnings about the header not matching the length.
-
- New User
- Posts: 3
- Joined: Wed Jun 30, 2010 2:01 pm
Hi, I'm working with the AVB reference design and have also some debug problems. I can turn on -O0 and -g. The application still works. But I don't get debug information for .c files within the IDE. For .xc files it works. Is there another configuration for debugging .c files? :?
-
- Respected Member
- Posts: 363
- Joined: Thu Dec 10, 2009 10:17 pm
C files have separate compiler settings so go check in the project propertys what each compiler is set to.
Oh and yes the TCP/IP demo is horrible. The new one that you can download is better coded. Also a useful pice of documentation is the uIP stack pdf manuals as it covers a lot on how to use the stack so you can reverse engineer the code easier. I gave a shot at modifying the code to something easier to use, but its far from done( you can download it in the projects)
Oh and yes the TCP/IP demo is horrible. The new one that you can download is better coded. Also a useful pice of documentation is the uIP stack pdf manuals as it covers a lot on how to use the stack so you can reverse engineer the code easier. I gave a shot at modifying the code to something easier to use, but its far from done( you can download it in the projects)
-
- New User
- Posts: 3
- Joined: Wed Jun 30, 2010 2:01 pm
Hi Berni,
thank you for the hint, but I couldn't find it.
The options for the compiler are set in the Makefiles, I think. At least I changed it there. I get: No line 453 in file "myfile.c". In the Debug IDE I get "Unresolved breakpoint" if I add a breakpoint in an line of an .c file.
and
mi_cmd_var_create: unable to create variable object.
also the .gdbinit file is missing.
Thanks in advance.
thank you for the hint, but I couldn't find it.
The options for the compiler are set in the Makefiles, I think. At least I changed it there. I get: No line 453 in file "myfile.c". In the Debug IDE I get "Unresolved breakpoint" if I add a breakpoint in an line of an .c file.
and
mi_cmd_var_create: unable to create variable object.
also the .gdbinit file is missing.
Thanks in advance.