cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an application for UART IAP?

st3
Associate II
Posted on August 21, 2008 at 06:02

How to create an application for UART IAP?

5 REPLIES 5
st3
Associate II
Posted on May 17, 2011 at 12:42

Ref: Application Note

http://www.st.com/stonline/products/literature/an/13588.pdf

Quote:

The PDF documents (and readme file) state the requirement that the ''user'' application must start at 0x0800_2000.

I assume that the example proajects supplied must do this, but there is no description of how it is done - which is not very helpful when it comes to creating my own application!

See:

http://www.st.com/mcu/forums-cat-6742-23.html&start=7

The two requirements stated in the App Note are:

  1. The Vector Table must be located at 0x0800_2000

  2. The Application must be located at 0x0800_2000

    1. Can be done with an NVIC_SetVectorTable() call from the FWLib.

    For 2, I copied the Linker script from the provided example - but this didn't work.

    After a lot of investigation, I found that the Hex file contained a load of spurious data located from 0x2000_0108 - if I manually delete this from the Hex file, it works!

    Looking at the ELF file, this seems to correspond to a section called ''DISCARD''.

    So, the questions are:

jilisegiar
Associate II
Posted on May 17, 2011 at 12:42

There is a pre-configured example for RIDE which allows you to generate an application for IAP. see @:

IAP_AN/binary/template project/RIDE (AN2557)

st3
Associate II
Posted on May 17, 2011 at 12:42

Quote:

There is a pre-configured example for RIDE...

Yes, that's the problem - it is all pre-configured, and there's no explanation of how to configure your own application! :|

As I said, I took the Linker script from that example - and it doesn't work! :| :|

jilisegiar
Associate II
Posted on May 17, 2011 at 12:42

As I said you can start from this project. All needed steps are described in the readme file(IAP_AN/binary).

Regarding the linker file, you have to use stm32f10x_md_flash_offset.ld as linker with medium density devices and stm32f10x_hd_flash_offset.ld with high density devices.

What do you mean by it doesn't work!:can you give more details !

:-W

st3
Associate II
Posted on May 17, 2011 at 12:42

Quote:

you have to use stm32f10x_md_flash_offset.ld ...

That actually seems to be the source of the problem - causing this extra, spurious data in the HEX file.

Quote:

What do you mean by it doesn't work!:can you give more details !

The IAP application runs, and transfers the file successfully but, when I try to run the downloaded application, it doesn't start.

In the debugger, it just seems to cause a hard fault exception.

If I manually remove the spurious section from the HEX file, it all works fine.

Hence the original questions:

  • What is this spurious data?

  • Why is it there?

  • What do I need to do to properly create an IAP-compatible application?

    I guess the last one could probably be re-phrased as, ''what edits are required in stm32f10x_md_flash_offset.ld (or elsewhere?) to stop it generating this spurious section?''