usb bootloader and UART printf

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

usb bootloader and UART printf

913 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Mon Apr 26 10:34:22 MST 2010
I'm modifing the RDB1768 USB bootloader.
And I need to see what's in the buffer before write it to flash.
So I'm trying to use the example RDB1768cmsis_UART_printf to print parts of the buffer through UART.

The problem is: when I try to delete the file I get a HardFault_Handler.

There is only one printf, in the begining of the main file:

int main (void)
{
   UART0_Init(115200); // Setup UART0 to 9600 baud
   printf("test");
...


Any tip?

Renan
0 Kudos
Reply
4 Replies

887 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Thu May 27 13:50:00 MST 2010
Well, I didn't have much time to work on that bootloader.
Yesterday I restarted the job on it, and the problem didn't happened anymore.

Renan
0 Kudos
Reply

887 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Apr 27 05:09:48 MST 2010
Ok, thanks for the confirmation.

I've just tried merging code from the RDB1768cmsis_UART_print example into the RDB1768cmsis_usb_bootloader, so that I get an initial printf displaying to the terminal on my PC when the bootloader begins running. And deleting firmware.bin still works fine.

If you are getting a hard fault, then you can tell where in your sources this is being caused by looking at the VECTPC pseudo-register that is displayed in the Core Register view when the hard fault is trapped. If you hover your mouse over VECTPC, it will do a lookup on the address and the tooltip will show you where in your code that is.

Hopefully from there, you should be able to find and fix the cause of the fault.

Regards,
CodeRedSupport
0 Kudos
Reply

887 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by renan on Tue Apr 27 04:25:15 MST 2010
Sorry for not posting enough information.

By "delete the file", I mean when there is only the second bootloader in flash, or when you press the joystick button, the windows explorer opens showing me the contents of the flash in a file called "firnware.bin".

Renan
0 Kudos
Reply

887 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Apr 26 12:57:45 MST 2010

Quote:

The problem is: when I try to delete the file I get a HardFault_Handler.

Sorry, can you explain in more detail what you mean by "delete the file"?

Regards,
CodeRedSupport
0 Kudos
Reply