Skip to main content
Visitor II
April 25, 2007
Question

Using IAP application note with RVDK

  • April 25, 2007
  • 5 replies
  • 1027 views
Posted on April 25, 2007 at 13:42

Using IAP application note with RVDK

    This topic has been closed for replies.

    5 replies

    Visitor II
    April 23, 2007
    Posted on April 23, 2007 at 11:13

    Hi,

    I want to try the AN2078 - STR7 In-Application Programming using UART, but the project was created with EWARM and I use RVDK. I searched on the forum but I didn't find a easy solution to convert EWARM projects to RVDK one. Is there a way to do that ? Or must I create a blank RVDK project and fight with the project setting to make it work?

    Thanks in advance

    Visitor II
    April 23, 2007
    Posted on April 23, 2007 at 16:13

    Hi tumnao,

    You can just use one example from the existing RVDK Examples library from

    ST as a template and then just copy/paste the Appli Note main files. It should work smoothly :)

    Rave.

    [ This message was edited by: Rave on 23-04-2007 21:48 ]

    Visitor II
    April 24, 2007
    Posted on April 24, 2007 at 07:52

    Thanks Rave and ibtiss for your quick replies. I tried different things like using the IAP v2 rvdk project with the IAP v3 sources files, or as Rave suggered a simple exemple in the library, but that didn't do the tricks.

    Here is my last attempt step by step :

    I copied

    \str71xlibstd\examples\gpio to \str71xlibstd\examples\iap.

    I added all theses file from the IAP rev3 :

    71x_conf.h

    7xx_flash.c

    7xx_flash.h

    common.c

    common.h

    download.c

    flash_conf.h

    flash_map.h

    main.c

    ymodem.c

    ymodem.h

    I added to project properties *COMPILE=arm/sources/files all the above .c files.

    I added ibtiss modification to the scat file.

    At compilation there was theses kind of errors :

    ''..\..\..\project\include\gpio.h'', line 62: Error: #20: identifier ''inline'' is undefined

    inline u8 GPIO_BitRead(GPIO_TypeDef *GPIOx, u8 Port_Pin)

    ^

    ''..\..\..\project\include\gpio.h'', line 62: Error: #101: ''u8'' has already been declared in the current scope

    inline u8 GPIO_BitRead(GPIO_TypeDef *GPIOx, u8 Port_Pin)

    ^

    ''..\..\..\project\include\gpio.h'', line 62: Error: #65: expected a '';''

    inline u8 GPIO_BitRead(GPIO_TypeDef *GPIOx, u8 Port_Pin)

    (..\..\.. refere to the str71xlibstd folder)

    So I modified 71x_conf.h ''#define inline inline'' line to ''#define inline __inline'' as I saw that in others working 71x_conf.h.

    I tried to recompile and get :

    c:\progra~1\arm\rvct\programs\2.1\526\st\win_32~1\armlink --list Listing.txt --entry Reset_Handler --scatter ..\scat.scf --symbols --map DebugRel\ymodem.o DebugRel\download.o DebugRel\common.o DebugRel\7xx_flash.o DebugRel\main.o DebugRel\71x_lib.o DebugRel\retarget.o DebugRel\71x_vect.o DebugRel\71x_init.o -o DebugRel\gpio.axf

    Error: L6630E: Invalid token start expected number or ( but found F at position 15 on line 34

    Error: L6629E: Unmatched parentheses expecting ) but found F at position 15 on line 34

    That make me think that I should also modify the entry point in the properties and what about the .s assembly files .... argh

    In short I am totaly lost with project properties, scatter file and other such low level settings. For my main project, I managed to get it work but I didn't really understant what I done.

    Is there a good documentation for beginners that I can read before asking stupid question ? :)

    [ This message was edited by: tumnao on 24-04-2007 11:52 ]

    Visitor II
    April 24, 2007
    Posted on April 24, 2007 at 12:27

    Ok, scatter file are more clear to me now (not completly, but more :) )

    Now I think my problem come from the 71x_init.s and the 71x_vect.s. In the IAP v3 they are placed under the EWARM folder, and I think this is because they are compiler dependant. Is this correct ? Anyways RVDK complain about syntax like ''MODULE ?program_start'' and ''RSEG IRQ_STACK:DATA(2)''.

    Anyone know RVDK and EWARM enough to explain me that ?

    Visitor II
    April 25, 2007
    Posted on April 25, 2007 at 13:42

    Ok I succeded in compiling the IAP v3 with RVDK...

    So I had this idea before you send me the .s file ibtiss (Theses file was from the standard STR7 library, right ?) I just had to remove reference to all the IRQ handler has the IAP don't define them.

    And by the way thank you for the scatter doc, it help me a lot.

    But all that bring me some new questions :

    1) Now the IAP work on my str7 eval board (MB393), but if I want to use it on my own hardware who use a str11f without external ram, am I limited in the size of the application that I can program with the IAP, as I only have 64k of internal ram ? (my application is actually of 140kb in debug)

    2) I think I must change the scatter file of my application if I want to program it with the IAP, as the load region won't be the same. Correct ?

    Anyway thank for the help so far