How to create an application for UART IAP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2008-08-20 9:02 PM
How to create an application for UART IAP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 3:42 AM
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:- The Vector Table must be located at 0x0800_2000
- 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:
- What is this spurious data?
- Why is it there?
- What do I need to do to properly create an IAP-compatible application? EDIT: [ This message was edited by: st7 on 19-08-2008 14:27 ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 3:42 AM
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)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 3:42 AM
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! :| :|- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 3:42 AM
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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 3:42 AM
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?''
