Hello there,
I took a look on the source code of the enhanced FW and found a lot of new commands / enhancements for debugging and tracing. How can those enhancements be used? I am using linux and so I do not use bricxcc. Can nxc programs be debugged / traced / stepped via bricxcc?
Btw I am doing some research because of my idea of integrating the ric-file support in the enhanced FW and adding support for stripping it down (OnBrickProgramming, TryMe, Datalog). So I started to examine the changes John made...
Thank you!
Bye marvin
Enhanced FW and debugging / tracing / stepping
Enhanced FW and debugging / tracing / stepping
Bye Marvin
- "I think you ought to know I'm feeling very depressed." - (Android Marvin in "The Hitchhiker's Guide to the Galaxy" by Douglas Adams, 1978)
- "I think you ought to know I'm feeling very depressed." - (Android Marvin in "The Hitchhiker's Guide to the Galaxy" by Douglas Adams, 1978)
Re: Enhanced FW and debugging / tracing / stepping
Hmm, I'd be interested to know more about that too. Which version of the Enhanced firmware source are you referring to? I am only aware of v1.06 Enhanced Firmware Source being publicly accessible from the BricxCC website. (Unfortunately John Hansen does not tag the files so it's not easy to check the version without actually downloading the file).I took a look on the source code of the enhanced FW and found a lot of new commands / enhancements for debugging and tracing.
I'm currently working on implementing a CPU instruction level debugger for the NXT, but I haven't researched the NBC tracing issue yet.
Work in progress can be seen at http://git.ni.fr.eu.org/?p=tcwan/nxt-fi ... ;a=summary, though it is not in a working state yet. (i.e., don't try to compile this and run it on your NXT unless you have a JTAG Debugger setup for the NXT).
Re: Enhanced FW and debugging / tracing / stepping
The code that shows how to do this is in the BricxCC SVN repository. It uses the enhanced firmware's GetVMState and SetVMState direct commands. I haven't implemented support yet for breakpoints but the firmware (in theory) should check for and appropriately switch from the running state to the paused state if it hits a breakpoint. See uProgram.pas for most of the details. See FantomSpirit.pas for the actual direct command code. The symbol table generated by the compiler is used by the code in uProgram.pas to map between source code lines and VM code offsets as well as for variable names to variable indexes.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Who is online
Users browsing this forum: Semrush [Bot] and 1 guest