none
STARTUPTEXT Macro in WEC2013 RRS feed

  • Question

  • Hi all,

    I am working on WEC 2013 porting from WEC 7 on imx6 board.

    I am using STARTUPTEXT macro to define entry point in startup.s file as,

     STARTUPTEXT

    LEAF_ENTRY StartUp

    ...

    LEAF_END

    In WEC 7 STARTUPTEXT will assign the code in the .astart segment,but in the WEC 2013 it will declare the code area in the .text (code) segment . For more information refer following link,

    (http://msdn.microsoft.com/en-us/library/jj919376.aspx).

    How to differentiate startup code in the .text area from the other code ,if there is no .astart area?

    How I can put my startup code of WEC 2013 in the .astart area to make it work?

    Thank You.

    With Regards,

    Kavya.


    kavya

    Tuesday, September 3, 2013 8:23 AM

Answers

All replies

  • Specify the area you want it in:

    AREA |.astart|,ALIGN=4,CODE,READONLY


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Thursday, September 5, 2013 12:51 AM
    Moderator
  • Thanks for the reply Michel verhagen.

    I specified AREA |.astart|,ALIGN=4,CODE,READONLY before the function StartUp. Still its keeping the following area in ".text" instead of ".astart" segment. In WEC 7 same statement is putting area in .astart area.

    Is there any other method for declaring .astart?


    kavya


    • Edited by Kavya D.C Thursday, September 5, 2013 4:29 AM grammer
    Thursday, September 5, 2013 4:28 AM
  • Vinoth has just posted an excellent blog post explaining why you can't do this in WEC2013 anymore:

    http://www.e-consystems.com/blog/windowsce/?p=981&utm_source=rss&utm_medium=rss&utm_campaign=wec2013-%25e2%2580%2593-understanding-startuptext-macro

    This does lead to some problems with the iMX range and IVT tables, but there are ways to solve that. Are you using a Freescale iMX CPU?


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Monday, September 16, 2013 10:48 AM
    Moderator
  • Thanks for the reply.

    yes.I am using freescale imx6x CPU.what kind of problem it will cause?

    How to solve this ivt and startup section problem ?


    kavya

    Monday, September 16, 2013 11:42 AM
  • All you need to do is make sure the ivt table is the first section in the file. You can name that section however you want, for instance .aivt. The sections are alphabetically sorted, so starting with the letter a will make sure it is the first one.

    You can also download the WEC2013 iMX6 BSP from Freescale to see how they solved it.


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Monday, September 16, 2013 10:30 PM
    Moderator
  • I am able to make my ivt table at the beginning of the eboot.nb0 file(as a first section) and i am specifying startup entry address in the IVT table. Still its not jumping to the startup entry point. Any changes required in ivt_init file?

    I couldn't find WEC 2013 imx6 BSP from freescale in their website.

    Thanks for the reply.


    kavya

    Wednesday, September 18, 2013 6:22 AM
  • Hope this blog will shade some lights to your issue

    WEC2013 Understanding STARTUPTEXT Macro - Part 2


    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best
    Vinoth.R
    www.e-consystems.com
    http://vinoth-vinothblog.blogspot.com

    • Proposed as answer by Erwin Zwart Monday, October 7, 2013 8:39 PM
    • Marked as answer by Kavya D.C Tuesday, October 8, 2013 5:11 AM
    Friday, September 20, 2013 3:10 PM
  • Hi Kavya

    What I would suggest is to use a JTAG debugger. This will give you a better idea of the processor state at each point. It will be easier for you to check why is not jumping to the startup entry point. This tool was really helpful during the development of our WEC2013 iMX6 BSPs.

    Regards

    Adeneo-Embedded Dev Team

    www.adeneo-embedded.com

    Thursday, October 3, 2013 9:38 PM