More Secondary USB Bootloader with Rowley

After a lengthy support back and forth with the fine folks at Rowley Crossworks, we are at a stand still … hoping somebody can give us an "AH HA" moment!  I can send the project files if somebody with Crossworks wants to look. Anyway, we are using the NXP/Phillips USB Secondary Bootloader (AN10759.pdf on their site).  It works fine with their samples built with the Keil toolchain. The FreeRTOS Rowley demo works great "out of the box", but when we make the settings changes in Crossworks to rebuild the demo to use 0x2000 as the starting address (and remap the interrupts), it doesn’t work. The Rowley folks used a JTAG debugger (we’re evaluating their tool, so we don’t have a compatible JTAG device yet) and the result was: <B>If I debug your FreeRTOS app it starts up (again under debugger control) and dies on the call to vTaskStartScheduler. Interrupts seem to be routed OK.,</b>

More Secondary USB Bootloader with Rowley

Is this an ARM7 device? If so dyeing on vTaskStartScheduler() probably means the chip is not in Supervisor mode. Put a break point on vTaskStartScheduler() then check the mode.

More Secondary USB Bootloader with Rowley

Yep, it’s an ARM7 device … We can’t, since I don’t have a compatible JTAG device for Crossworks … what do we need to do to do to put it in Supervisor mode?

More Secondary USB Bootloader with Rowley

To elaborate: - LPC2368 ARM7
- MCB2300 development
   board Trying to get FreeRTOS to run in the target mode with bootloader using evaluation license on Crossworks. If I can get that to work, then we’re golden and we’ll buy the Crossworks setup and go to town!

More Secondary USB Bootloader with Rowley

If Rowley have been debugging your code ask them to check the processor is in Supervisor mode.

More Secondary USB Bootloader with Rowley

<*grin*>  Well, they kicked us over here. We have SUPERVISOR mode defined in the .s file, BTW

More Secondary USB Bootloader with Rowley

The start up assembly file will switch into each mode, set up a stack for that mode, before switching into the next mode (modes being IRQ, FIQ, Supervisor, User, etc).  You have to ensure that before calling main() you leave the processor in Supervisor mode.  Also never go into User mode but instead go into System mode, otherwise you will not be able to get out of User mode without making a system call. The same will be true before you call the FreeRTOS application from your boot loader – make sure you are in Supervisor mode. Regards.

More Secondary USB Bootloader with Rowley

We are using the supplied .s file (with the demo) except for the offset of the Memory Map to start at 0x2000 … the "SUPERVISOR" define is defined in the .s file … So, I’m not quite sure what you are saying?

More Secondary USB Bootloader with Rowley

**GOT IT!** We were chasing it in the wrong file … it was in the way the bootloader was exiting (not the way FreeRTOS was starting).  *DOH* Thanks millions for the help!