Skip to main content
Visitor II
November 10, 2005
Question

Need help with IAP for IAR

  • November 10, 2005
  • 3 replies
  • 992 views
Posted on November 10, 2005 at 04:15

Need help with IAP for IAR

    This topic has been closed for replies.

    3 replies

    Visitor II
    November 8, 2005
    Posted on November 08, 2005 at 05:34

    Note, I'm using IAR compiler...

    I'm trying to load my bootloader into flash and then on startup have the loader run from ram, but I don't think my cstartup.s and linkarm.xcl files are right. I've seen examples in the forum for realview using 71x_init.s and scat.s, but IAR doesn't use scat files.

    so far I figure I need to call ?main in cstartup.s, I read that is what copies flash to ram, and then calls the main routine. How should I configure my linkarm.xcl file? and is there any other configuration settings to note?

    I will be able to verify if my boot loader is copied to ram if I can sector erase Bank0 Sector 7 for example.

    thanks for any help

    Visitor II
    November 9, 2005
    Posted on November 09, 2005 at 05:22

    Hallo,

    I use IAR compiler with external flash, too. In the attachment you will find startupcode and IAR-configuration file using RAM and internal flash.

    Regards

    Jörg

    ________________

    Attachments :

    IARStartup.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1OM&d=%2Fa%2F0X0000000bmS%2Fv9JHqL1Ef5adkDVzmybkOlNKkzRq5GHO18iMk.anV44&asPdf=false
    Visitor II
    November 10, 2005
    Posted on November 10, 2005 at 04:15

    thanks for the reply but im just trying internal flash now.

    i've attached a simple program that is supposed to copy itself from internal flash (bank0sector0, 0x40000000) to ram (64k on chip ram)

    then in the main it calls an erase bank 0 sector 7 function to verify its running in ram, not flash.

    looks like im way off on this one, any pointers on how to get this to work?

    ________________

    Attachments :

    cstartup.s79 : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1FQ&d=%2Fa%2F0X0000000bmQ%2Ff7YEj_GeFEAUDfCEoAV_M8sXD.0gwvT2oRNESA0iqEs&asPdf=false

    lnkarm.xcl : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1OL&d=%2Fa%2F0X0000000bmP%2Fbt7wBT3ZdRmkAXO1EouTIF6hMxYrVVADDV4Zr5aAIOY&asPdf=false

    main.c.bak : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1HB&d=%2Fa%2F0X0000000bmM%2FsYtSg77p5z3A4G0U2IcX_gt1dgYQp4IkHiTfgTGM_JY&asPdf=false

    vect.s79 : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1OG&d=%2Fa%2F0X0000000bmN%2FW.Q77pyTzlvTW83txW12XF.BbO2GqzMvaYa9tIlpmOg&asPdf=false