2008-12-01 06:25 AM
Problem with jumpingto user app. from bootloader
2011-05-17 03:54 AM
After much consideration I've decided to write my own USB bootloader. I know, I know DFU really works and everything, but frankly PC side of DFU code is a mess.
Besides IMHO if all I want is to dump .hex file into a chip the whole DFU architecture a bit excessive. So..... Now when I offended everybody.... :) Loader works.... Flash content seemed to be correct when compared against file.... Problem seems to be in either __MSR_MSP(*(vu32*) 0x8003000); or Jump_To_Application(); I am using Rowley CW 1.7 toolchain..... Anybody can gove me any pointers what can go wrong here?2011-05-17 03:54 AM
Hi,
You can refer tohttp://www.st.com/stonline/products/support/micro/files/an2557.zip
& a boot-loader implementation reference code with RS232. Could you please detail what is the problem when you use the debugger ? is it a stack overflow ? Wrong Program Counter ? etc.. Cheers, STOne-32.2011-05-17 03:54 AM
I also use CW 1.7. Have you done the following
1) Set the vector table location to where your app starts (above the bootloader).E.g. // Set the Vector Table base location after bootloader (0x08003000) NVIC_SetVectorTable(NVIC_VectTab_FLASH, BOOTLOADER_LEN); 2) Modify the memory map xml file. Mine is called ST_STM32F103VB_MemoryMap_Release.xml. I copied this from Rowley into my project before editing it. You need to change the address (and size) of the ''FLASH'' memory segment. Scroll to the end to find this section. I couldn't post it because the bb does not like XML in posts. 3) The default stack size in CW is quite small so look to increase this using the project editor. [ This message was edited by: trevor on 27-11-2008 15:46 ]2011-05-17 03:54 AM
Quote:
On 27-11-2008 at 11:30, Anonymous wrote: I also use CW 1.7. Have you done the following 1) Set the vector table location to where your app starts (above the bootloader).E.g. // Set the Vector Table base location after bootloader (0x08003000) NVIC_SetVectorTable(NVIC_VectTab_FLASH, BOOTLOADER_LEN); 2) Modify the memory map xml file. Mine is called ST_STM32F103VB_MemoryMap_Release.xml. I copied this from Rowley into my project before editing it. You need to change the address (and size) of the ''FLASH'' memory segment. Scroll to the end to find this section. I couldn't post it because the bb does not like XML in posts. 3) The default stack size in CW is quite small so look to increase this using the project editor. [ This message was edited by: trevor on 27-11-2008 15:46 ] 1,2 is done and should be correct.... after all application loads and runs fine using DFU.... 3. should be fine also because of (1,2) and it runs fine in stand alone mode.2011-05-17 03:54 AM
Need more info then. Maybe you could post the code.
2011-05-17 03:54 AM
Quote:
On 26-11-2008 at 20:48, Anonymous wrote: Hi, You can refer tohttp://www.st.com/stonline/products/support/micro/files/an2557.zip
& a boot-loader implementation reference code with RS232. Could you please detail what is the problem when you use the debugger ? is it a stack overflow ? Wrong Program Counter ? etc.. Cheers, STOne-32. That is what I basically done - I took your example and modified it for load with USB instead of RS232. It seems that it should be pretty straight forward - bootloader size grew a bit ( probably due to USB implementation ), but it still easily fits into 0x3000 assign for DFU type loader. The rest of the code is pretty much straight copy, so it has to be something really damn.... on my part. I forget to mention that project loads and runs fine when loaded with DFU loader.... so it is probably NOT anything inside the project itself.2011-05-17 03:54 AM
Quote:
On 01-12-2008 at 19:33, Anonymous wrote: Need more info then. Maybe you could post the code. Here it is..... Due to size issues didn't include library files and device maps.... Otherwise all there...