2013-06-13 08:16 AM
HELLO
I want to upgrade the fırware of my design by usb stick , I am using the example given with the discovery board where I need a binary image of my Project myproject.BIN, I am using keil so I can generate hex file of my Project , how can I convert hex file to binary file inorder to use it? Thank you2013-06-21 01:30 AM
>Do you have some interrupts enabled in the Boot Loader? ?
Clive, if bootloader uses interrupts, that are not used in the main application - do we need to disable it before JumpToApplication ? In my current project I use USB in bootloader, but Main Application does not use USB.2013-06-21 04:49 AM
2013-06-21 05:08 AM
Clive, if bootloader uses interrupts, that are not used in the main application - do we need to disable it before JumpToApplication? In my current project I use USB in bootloader, but Main Application does not use USB.
Well if the boot loader was considerate it would tear down the resources that were no longer in use. The problem with interrupts is whether the app has code to handle them, if the vectors are not specified they will weakly link to a default handler, where spurious interrupt will get dumped. If that handler is an infinite loop your product will seize up. Best not to leave unused/unhandled interrupts enabled.2013-06-21 05:24 AM
You should be single stepping rather than using breakpoints once you get to the area of failure.
If you have already set up the clocks and PLLs, you wouldn't need to do that again in SystemInit(), just change SCB->VTOR That it calls the LOWER Boot Loader Handler suggests it either hasn't got to the end of SystemInit(), or the vector table address hasn't been set properly (yet). None of this stuff however is magic, it just needs some rigor in the debugging and analysis of the code being executed.2013-06-21 07:35 AM
2013-06-21 09:00 AM
where should I set the vector table ? in the bootloader code before it jump to the application code ? or in the application code ? or in both ? what should be its value? 0x8000?
Well in my Boot Loader / App designs I set the appropriate vector table in SystemInit() based on a linker generated address for the table being used. I also don't dump into the App with assorted interrupts configured. That would cause all manner of problems with initialization of RAM structures or other things which can't get handed off cleanly or safely. The goal is to reduce the dependencies each has on the other, and let the linker build free standing and independent code. Ideally the hand off should be done with near reset conditions, and minimally the App should know exactly what state it is inheriting from the Boot Loader. The Boot Loader would effectively set SCB->VTOR = 0x08000000; and the App would effectively set SCB->VTOR = 0x08008000; The linker generates the address for __Vectors and I don't have to think about it.
2013-07-04 07:20 AM