AnsweredAssumed Answered

stm3220G-EVAL DFU image templet (TASKING)

Question asked by johnsson.fredrik on Sep 4, 2013
Latest reply on Sep 5, 2013 by johnsson.fredrik
I'm trying to create a dfu image in TASKING for stm3220G-EVAL. For bootloader I'm using "STM322xG-EVAL_USBD-FS" from the STM32_USB-Host-Device_Lib_V2.1.0 library.  
The binary templet example in STM32_USB-Host-Device_Lib_V2.1.0 works fine in IAR and EWARM, but for TASKING there is only a example for STM324xG-EVAL.
I can flash the DFU files I've created from the IAR and EWARM examples, and they work fine.
I have edited the STM324xG-EVAL projekt to fit my board and created a DFU file from it, even no issues in DfuSe when i flash the board with it.  
Only problem is when I RESET my board the new image doesn't load, I've checked that the dfu file flashes 0x0800C000 (if I look at the Device Memory in STM32-ST-LINK Utility after flashing the board).
In system_stm32f2xx.c
#define VECT_TAB_OFFSET  0xC000
This by itself does not change what address it flashes.  
#  define __VECTOR_TABLE_ROM_ADDR       0x0800C000
memory STM32F2xx_Flash
    mau = 8;
    type = rom;
    size = __FLASH_SIZE;
    map ( size = __FLASH_SIZE, dest_offset=0x0800C000, dest=bus:ARM:local_bus);
If I edit these (0x0800C000 instead of 0x08000000) in the stm32f2xx.lsl file it changes the flash memory.

This is from the app.c file. APP_DEFAULT_ADD is 0x0800C000.
  /* Check if the Key push-button on STM32-EVAL Board is pressed */
  if (STM_EVAL_PBGetState(Button_KEY) != 0x00)
  { /* Test if user code is programmed starting from address 0x800C000 */
    if (((*(__IO uint32_t*)APP_DEFAULT_ADD) & 0x2FFE0000 ) == 0x20000000)
    { /* Jump to user application */
      JumpAddress = *(__IO uint32_t*) (APP_DEFAULT_ADD + 4);
      Jump_To_Application = (pFunction) JumpAddress;
      /* Initialize user application's Stack Pointer */
      __set_MSP(*(__IO uint32_t*) APP_DEFAULT_ADD);
  } /* Otherwise enters DFU mode to allow user to program his application */
"JumpAddress = *(__IO uint32_t*) (APP_DEFAULT_ADD + 4);"
Jump to reset handler (__START)?
I've changed this (APP_DEFAULT_ADD + 4) to fit my vector table, but no change.
I don't know if this problem is related to TASKING or ST, or me not seeing the obvious.
Any help would be much appreciated, will ofcourse provide any debugging information that is needed. thanks!