defragster
Senior Member+
I updated Github today with these fixes:
1. Reduce serial polling to 0.5 milliseconds. This should increase responsiveness. Will look at alternatives @defragster suggested.
2. Fix `p func()` that allows you to call most functions from GDB when it is stopped.
3. Improve install script.
4. Fix numerous bugs with SP and stack handling. It now steps into and over function calls more consistently.
It only really works with Teensy 4. I'm not going to bother getting Teensy 3 working.
Pulled code into github desktop to glance at changes - what fun.
This is semi-redundant but harmless since delay() as noted calls yield() - in gitstub.cpp:
Code:
delay(1);
yield();
This works to Assert - but just breaks/halts printing the next line - no msg as to why : #define ASSERT(expr) if (!(expr)) {asm volatile("svc #0x11");}
Changing this to 100us from 500 gave the prior 'ERROR' sooner and didn't run much faster (maybe 70/sec instead of 60) : #define GDB_POLL_INTERVAL_MICROSEC 1000
> so the slowdown may be PC side processing as well as multiple msg/parts to process? - setting to 1000us as above still runs at 54 loop()/sec - and 'ignore 1 10000' still results in GDB fail - 'Remote connection closed'
> Not sure if calling processGDB() too fast is bad? Being called on IntercalTimer_isr - it should be blocked from calling itself twice? - but if called from user code the timer could cause re-rentry?
> So adding yield()/polling calling may be bad - as the timer would still be needed to run in case it gets in a tight loop ... or lost.
Getting it working well on T_4.x's 1062 seems good given any trouble/differences on T_3.x family. Perhaps Paul will evolve his plan for debug if Arduino moves that way ... or everyone will just buy 1062's