Skip to main content
sami
Associate III
June 13, 2013
Question

UPGRADING APPLICATION FIRMWARE BY USB STICK

  • June 13, 2013
  • 26 replies
  • 3654 views
Posted on June 13, 2013 at 17:16

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 you
    This topic has been closed for replies.

    26 replies

    sami
    samiAuthor
    Associate III
    June 15, 2013
    Posted on June 15, 2013 at 10:37

    Any help here ?

    Tesla DeLorean
    Guru
    June 15, 2013
    Posted on June 15, 2013 at 13:41

    Any help here ?

    Don't poke me, I don't like it.
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    June 15, 2013
    Posted on June 15, 2013 at 14:58

    0x0800819D is likely the address of ResetHandler, not the base of the vector table that points to it. It should be the 32-bit value at 0x08008004

    So, does the data at 0x08008000 reflect that of your file?

    When you step your debugger across the JumpToApplication() is the code it is executing correct? It should look like the code in startup_stm32fxxx.s. Does the call to SystemInit() cause failure, or a fault?
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    sami
    samiAuthor
    Associate III
    June 20, 2013
    Posted on June 20, 2013 at 11:29

    Sorry Clive for poke I dont mean that .

    sami
    samiAuthor
    Associate III
    June 20, 2013
    Posted on June 20, 2013 at 14:05

    I still could not solve ,

    While debugging Jump_To_Application(), the program jumps to the 0x8000819c then

    it stucks in the address  0x80001B6 defualt  handler

    any idea for this problem ?

    Thank you

    Tesla DeLorean
    Guru
    June 20, 2013
    Posted on June 20, 2013 at 14:33

    You're re-describing the problem again, I need to see different details.

    I'd need to see the data at/around 0x08008000 thru 0x080081FF

    I'd need to see the disassembly code at the point you jump to the application, and the code it lands on.

    You cut-n-paste, or provide screen shots.
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    sami
    samiAuthor
    Associate III
    June 20, 2013
    Posted on June 20, 2013 at 16:27

    The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6cV&d=%2Fa%2F0X0000000bru%2FxCYZgfQBz6kKps24MpeHV7JV5c.lRbd5a3cIaCdwk_8&asPdf=false
    Tesla DeLorean
    Guru
    June 20, 2013
    Posted on June 20, 2013 at 18:10

    Ok, that's a good start. I was interested in the Boot Loader code where you jump to the Application code.

    Do you have some interrupts enabled in the Boot Loader? Which ones? Are these handled in the App? or do the dump into DefaultHandler?

    Can you step across the transition?

    Can you step into ResetHandler 0x0800818D?

    How about SystemInit() 0x0800B761, or _main 0x08008189

    Are there interrupts being enabled in the App?

    Does the relocation of the Vector Table (SCB->VTOR) that occurs in SystemInit() point to the right location?
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    sami
    samiAuthor
    Associate III
    June 21, 2013
    Posted on June 21, 2013 at 09:44

    yes I have interrupt enabled in the bootloader , but those interrupts enabled incase if button is pressed and go to bootloader incase not pressed it goes directly to the application and does not enable those inturrepts ,

    void TIM2_IRQHandler(void)

    void OTG_FS_IRQHandler(void)

    void EXTI0_IRQHandler(void)

    void EXTI_IRQHandler(void)

    void SysTick_Handler(void)

    also i use those interupts in my application too .

    after debugging,   I can reach the to  SystemInit() 0x0800B761  after i set break point there.

    also I can debug arround SystemInit() 0x0800B761 after i set a break point too .

    but after that i can debug because it stucks.

    alexandr
    Associate II
    June 21, 2013
    Posted on June 21, 2013 at 10:30

    >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.