Thanks.
I'll be working on this tonight & tomorrow am.
You've been lots of help.
Some notes ...
I still get the undefined references to regs, even though they are defined static within the avr8-stub.c at line 550
static unsigned char regs[GDB_NUMREGBYTES]; /* Copy of all registers */
and used throughout avr8-stub.c
except at line 1946 in:
/* Note: The save and restore functions must be always inline,
otherwise the debug version will call these functions and
destroy the stack; The functions assume the stack is not touched.
*/
__attribute__((always_inline))
static inline void save_regs1 (void)
{
/* 20-6-2017
Nova verze, dle gdb.c co nejdrive zakazat preruseni */
asm volatile (
"push r0 \n"
"in r0, __SREG__ \n"
"cli \n" /* disable interrupts */
"sts regs+32, r0\n" /* save SREG to its place */
"pop r0 \n" /* restore r0 from stack */
"sts regs+31, r31\n" /* save R31 */
"sts regs+30, r30\n" /* save R30 */
"ldi r31, hi8(regs)\n" /* Z points to regs */
"ldi r30, lo8(regs)\n"
"std Z+29, r29\n"); /* save R29 */
/*"in r29, __SREG__\n");*/ /* get SREG */
/* Original verze, nebezpecna pokud se vola bez zakazanych preruseni, protoze
ISR muze poskodit obsah registru r31, r30...
Pro pouziti v ISR to neni problem, preruseni jsou zazakana ale pro breakpoint() by
to mohlo delat problemy... */
#if 0
asm volatile (
"sts regs+31, r31\n" /* save R31 */
"sts regs+30, r30\n" /* save R30 */
"ldi r31, hi8(regs)\n" /* Z points to regs */
"ldi r30, lo8(regs)\n"
"std Z+29, r29\n" /* save R29 */
"in r29, __SREG__\n"); /* get SREG */
#endif
}
As per your notes ...
I have no missing files in my solution
How do I enable Deep Search?
I've commented out all Serial references
When you refer to AVR GB Stub you mean avr8-stub..h
I've attached a zip of my entire solution
Abbott