bug in lm32 port
Jukka Pietarinen
jukka.pietarinen at mrf.fi
Tue Apr 7 05:23:42 UTC 2009
Hi Michael,
Michael Walle wrote:
> attached is a patch that fixes this issue. The vectors now use indirect calls
> both for the reset and the interrupt vector.
>
> For the reset vector we can basically use any register (expect for r1-r3 which
> are the arguments for boot_card()).
>
> For the interrupt vector, we can't use any other register than r0 without
> saving them to the stack. (_ISR_Handler clears r0 right at the beginning)
Thanks for the patch.
> @Jukka:
> The unused vectors destroy r7 before jumping to the debug handler (that may
> not be existent at all).
> Maybe it is better to jump to dead_end or anything like a panic screen (if
> that is possible with rtems). What was your intention to 'manually' jump to
> DEBA? Maybe im getting something wrong here.
> The real debug traps always maps to the DEBA base address.
I agree jumping to dead_end makes more sense. I cannot recall, I think
this was somewhere in the Lattice docs - I could be wrong.
I'm still struggling with getting the lm32-rtems4.10-gdb to work with
TCP2JTAGVC2 from Lattice. After connecting to the target gdb talks to
TCP2JTAGVC2 but fails with the 'g' command:
GNU gdb (GDB) 6.8.50.20090329
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
--target=lm32-rtems4.10".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file hello.exe
Reading symbols from
/media/psf/Home/b-rtems/lm32-rtems4.10/c/lm32_evr/testsuites/samples/hello/hello.exe...done.
(gdb) target remote 10.211.55.4:1000
Remote debugging using 10.211.55.4:1000
warning: Remote failure reply:
Remote 'g' packet reply is too long:
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400800004007b5c04007b5c000000010400000000000000000000000000000000000000
So it looks like the stub returns a different number of registers than
gdb expects. I'm not at all familiar with the gdb sources but I'm
digging around...
Thanks,
Jukka
More information about the users
mailing list