Hi,<br><br>I'm new to RTEMS, and I am wanting to do a mcf5329 BSP.  I also have a mcf5235BCC so I thought I would try to get RTEMS going on the 5235 first given there is already a BSP for it.  Once I have RTEMS working nicely and understood on the 5235, i'll start the BSP for the 5329.  I have downloaded the latest (as of 2 days ago) fedora rpm's (m68k-rtems4.9) toolchain, obtained the latest CVS head and can build RTEMS and the example hello_world_c okay.  I also downloaded from sourceforge the m68k-bdm-1.4-pre1.tar.bz2 package, built and installed the m68k-bdm-gdbserver.  I have the parallel port P&E wiggler that came with the 5235 EVB, and I can seemingly talk to the board (bdm-chk works until the SRAM test, which fails and I am assuming because RAMBAR is not set).<br>
<br>I have attached my gdb init script, that initializes SDRAM, and I can successfully load the hello elf file.  I can step through a few instructions but it fails when setting the SR register:<br><br>313         move.w  d0, (0x40140000)<br>
Current language:  auto; currently asm<br>(gdb) nexti<br>314         move.l  #0x01000000,d0              | Set system frequency to 150 MHz<br>(gdb) nexti<br>315         move.l  d0, (0x40120000)<br>(gdb) nexti<br>316         move.w  #0x2700,sr                  | Disable interrupts<br>
(gdb) nexti<br>m68k-bdm: error: Invalid target command<br>Remote failure reply: E01<br><br>Mind you, it doesn't fail here all the time, but seems rather intermittent which is concerning.  If I skip over this bit, It fails at the first jsr call, as the stack pointer $sp is seemingly uninitialized.  If I set SP to something reasonable (0x2000fffc) then it fails at the first call to an rts.  I have also noted that after stepping through a jsr, the stack pointer is set back to 0xffffffff, not SP-4 as expected.  Both the A7 and otherA7 registers seem to be nuked by executing a jsr too.<br>
<br>Anyway that is some context, now for my questions :D.<br><br>1) Does anyone have a gdbinit script for the 5235, or can anyone see something obviously wrong with the one I have attached.<br>2) Any ideas why the setting of the SR register fails sometimes (more often than not).<br>
3) What is the common way to setup the stack pointer when debugging from memory?  I understand that when running from flash it is set from the vector table. Should I add code to the 5235 BSP to set the stack pointer when debugging from ram?<br>
4) does bdm-chk work out of the box with the 5235 (ie, should it pass all tests) or will I need to configure it.  I haven't looked into this yet, so please answer this one only if you know off the top of your head.<br>
<br>Oh, also, is anyone else working on a 5329 port?<br><br>Any help would be greatly appreciated.  I do feel I am missing something simple.<br><br>Cheers,<br><br>Matt Riek.<br>