I have a new board designed based on the TWR-MCF5225X board and I managed to get code programmed onto it through the BDM port but it doesn't run very far. I tried a few different projects that I know work on the eval board OK, and through the debugger I determined they are halting at various spots.
For example, one project was created through the new project wizard for the 52259 (not eval board) with minimal hardware support, and the code runs up to the following line in the __copy_rom_sections_to_ram function in the startcf.c file:
__copy_rom_section( (char *)info->Target,(char *)info->Source, info->Size);
Another project was created from the wizard again but with full hardware support, and then it ran up to the end of the pll_init function in the mcf52259_sysinit.c file (then it jumps to address 0x0). That was with CLKMOD0 and CLKMOD1 pulled high. When they are pulled low it stops at the following line in the same function:
MCF_CLOCK_SYNCR = MCF_CLOCK_SYNCR_MFD(3) | MCF_CLOCK_SYNCR_CLKSRC| MCF_CLOCK_SYNCR_PLLMODE | MCF_CLOCK_SYNCR_PLLEN ;
If I comment that line, it makes it through to the the rts line in mcf5xxx_wr_vbr in the exceptions.c file.
If I do some simple GPIO pin toggling before these instructions, it works OK, until it hits these instructions. So it seems there is some hardware issue that's causing the problem, but I can figure out what it could be. At the moment the board is very simple - most of the peripheral pins are not connected (they will be, but the parts are not yet populated on this prototype), and only a few GPIO are wired to some basic switch inputs and LED outputs. There is an external 48MHz crystal, and the XTAL, VDDPLL, and RCON_B pins are pulled high. That's pretty much it, aside from the BDM port.
I'm using CodeWarrior for ColdFire v7.1.2 and have the latest drivers for the debug adapter (P&E USB Multilink for CodeFire).
I'm really stumped on this and would appreciate any thoughts or suggestions.