Page 1 of 1

firmware debugging

Posted: Tue Jan 26, 2016 10:16 pm
by bsundahl
How do you guys do debugging on this platform? This probably applies to Megasquirt code as much as GPIO. I havnt had any success getting a debugger to run.

I can load code the "megasquirt way" using MS Download. That works, but then I dont have any debugger. I can use it this way, but it makes the debugging process slow and painful.

If I try to load code directly from CodeWarrior over the serial port (using the "Monitor" target), the code starts to download, then I get an error message "Error while writing to 7000..7200. No memory at this address". It then continues to download more code. The debugger appears to be working, but the code wont run.
And even if it did, I am pretty the serial port will be reconfigured for TunerStudio as soon as I run the code, so I would lose my debugger connection.

If I try to load code from CodeWarrior over the P&E Multilink cable (using the "P&E ICD" target), the code seems to download, and I can start single stepping thru startup code in Start12.c. Seems good until I click RUN, then I seem to start hitting illegal opcodes.
This also wipes out the serial monitor, which I then have to reload before I can go back to either of the other methods.

Does anyone use a debugger with this system? Any tips on how to make it work?

Thanks a bunch.
-bill

Re: firmware debugging

Posted: Wed Jan 27, 2016 5:24 pm
by Bernard Fife
Does anyone use a debugger with this system?
Bill,

I don't use the debugger (though I have P&E cables, etc.). I use a stim and actual inputs and outputs (plus various user input parameters for input and output channels to test internal values, states, and register contents; plus a scope of course). That way I am using only the actual code to test.

Lance.