Trying to debug some custom code and getting stuck... I was trying to display some variable values by populating the TunerStudio dashboard with dummy values, e.g., have the TPS or CLT guage read the value of a variable. Having trouble getting that to happen, after reading through the *can.c and *misc.c sections. Is this a valid approach? Has anyone done it?
Also curious what the hardcore developers use. Does a 9x12/ms2 simulator exist? Or perhaps old school logic analyzer? I don't expect to reproduce those environments, but surely something exists...
Thanks!
MS2 debugging
Moderators: jsmcortina, muythaibxr
-
- Site Admin
- Posts: 39622
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: MS2 debugging
On MS2, I found that storing data to "gpioadcX" was easiest. Nothing else is using that so there's no mixup about where the data is coming from.
I have never used a simulator for the microcontroller.
James
I have never used a simulator for the microcontroller.
James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Re: MS2 debugging
Thanks, that works
Re: MS2 debugging
I did find one tool that was extremely useful… ubug12. This connects to the monitor/bootstrap code through serial port 1, and allows at memory and registers. It also has support for breakpoints and single step, but monitor in the base 9s12 doesn’t seem to support that. Some special tool needed to update that…
Since it requires use of serial port, it can’t be used “live”. What I’ve been doing is letting the board get into an interesting state, then installing the bootstrap jumper and hitting reset. I can then connect to the cpu and access memory contents.
Should be able to use it live by compiling with addresses for second serial port so the monitor port is left alone. If possible to solder into port 2 cpu connections could imagine using port 1 for debugger and port 2 for ms. But no way these eyes and hands are up to the task
Since it requires use of serial port, it can’t be used “live”. What I’ve been doing is letting the board get into an interesting state, then installing the bootstrap jumper and hitting reset. I can then connect to the cpu and access memory contents.
Should be able to use it live by compiling with addresses for second serial port so the monitor port is left alone. If possible to solder into port 2 cpu connections could imagine using port 1 for debugger and port 2 for ms. But no way these eyes and hands are up to the task