This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Simulator Based C project (Non OS)

Note: This was originally posted on 11th June 2013 at http://forums.arm.com

Hello,

I am trying to create a couple of trivial C & ARM 7/9 assembly example projects on DS-5 to run using Simulation mode like I used to be able to do in RVDS without having to connect the host pc to a hardware. Nor do I want to involve linux for these trivial examples. To that extent these are bare-metal examples but only that I wont be connecting to any hardware. I think in Real View it used to be called a connection to RVISS  or something like that. I used to be able to teh  choose the ARM processor I was targeting inside that. I assume such programming is with  DS-5 too. When I look into debug configuration, I dont see an explicit ISS or simulator sounding name as target.

Can someone point me along the right direction for creating a clean, simple, simulator based C and Assembly projects in DS-5 professional edition?

Thanks.
  • Note: This was originally posted on 11th June 2013 at http://forums.arm.com

    There are two models included with DS-5, a Cortex-A8 and a mulit-core Corte-A9.  When you configure the Debug Connection look for "Cortex-A8 RTSM" or "RTSM_VE_Cortex_A9x4".  Under these select "Bare Metal Debug".
  • Note: This was originally posted on 12th June 2013 at http://forums.arm.com


    There are two models included with DS-5, a Cortex-A8 and a mulit-core Corte-A9.  When you configure the Debug Connection look for "Cortex-A8 RTSM" or "RTSM_VE_Cortex_A9x4".  Under these select "Bare Metal Debug".


    Thanks, I had an earlier version of DS-5 which did not have these models. Now I have updated to latest DS-5 and I am able to locate this RTSM in my DS-5. I have now selected Cortex A8 RTSM and Bare Metal Debug. I have now selected  the following and still facing some possible simple problems when I try to run the project: "Launching Hello World has encountered a problem. Error starting process" etc. basically I dont get to see a hello world printed in the console where I am expecting it to be showed.

    1. C Project-> Bare Metal Executable-> Hello World Project

    2. Run Configuration under "Main":I am specifying the project I am debugging( Hello World) from the workspace.

      2.1 Under C/C++ Application, I try selecting Search Project but it is unable to locate the binary, so I specify the .AXF file to be loaded after browsing for it.

      2.2 Build Configuration: I have selected: "Use workspace settings, Use Active .
      2.3 Select Configuration using C/C++ Application remains unchecked.

    3. Debug Configurations: Under Connections: Select Target- > UNder DS-5 Debugger, I selected New configuration and enabled Cortex A8 RTSM  -> Baremetal Debug -> Debug Cortex A8
    3.1 Under Connections tab-> Under Connections -> Model Parameters-> I have left it blank/
    3.2 Under Files Tab- > Application on Host to download -?> I have selected Hello World.ASF after clicking the workspace button below it.
    3.3 Under Files Tab->  There is also a File System button- which I have left un utilized.
    3.4 UNder Files Selection -> I have selected Load Symbol from file.
    3.5 Under Debugger Tab ->I have selected Debug from Symbol under Run Control


    I am able to build the project successfully in c/c++ project view. It gives zero errors. But when I right click on project name and try to run as stand alone C/C++ application it gives an error saying Binary not found. When I build the, there is a .axf file created in the workspace. I am able to connect to the target under DS-5 debug perspective and even single step the code after loading it but it still wont show me an STDIO window.

    So on one side I am unable to do a simple run as of the project after building it and another side, after launching DS-5 debug session, I am able to connect to target and single step but not view the output.

    Any help would be appreciated. Thanks.
  • Note: This was originally posted on 12th June 2013 at http://forums.arm.com


    But when I right click on project name and try to run as stand alone C/C++ application it gives an error saying Binary not found.

    Unfortunately the "Run as..." and "Debug as..." are Eclipse features for native host apps.  Using the Debug Configurations... dialog is the right thing for DS-5.  There is no running without debug in DS-5 (although you can do much the same by executing a 'continue' command automatically.


    I am able to connect to the target under DS-5 debug perspective and even single step the code after loading it but it still wont show me an STDIO window.

    Semihosting output should appear in the "App Console" view.  Semihosting is usually enabled automatically based on the symbols the image contains (if you're using armcc) but you can check the status with 'info semihosting'

    Note also that there are various bare-metal examples (e.g. fireworks) that are supplied with DS-5 that you can import.
  • Note: This was originally posted on 13th June 2013 at http://forums.arm.com


    Unfortunately the "Run as..." and "Debug as..." are Eclipse features for native host apps.  Using the Debug Configurations... dialog is the right thing for DS-5.  There is no running without debug in DS-5 (although you can do much the same by executing a 'continue' command automatically.

    [/size]
    Semihosting output should appear in the "App Console" view.  Semihosting is usually enabled automatically based on the symbols the image contains (if you're using armcc) but you can check the status with 'info semihosting'

    Note also that there are various bare-metal examples (e.g. fireworks) that are supplied with DS-5 that you can import.



    Ok, got it finally. It was a bit confusing but it was worth the effort trying figure things out. Some of the features are initially not very intuitive. There is a lot of redundancy on how to reach a particular setting, which adds to the confusion as well.

    AS for the semi-hosting output, I finally got it but although in the target console and not the apps console. Any idea why I am not getting the output in Apps console window Scott?

    P.S: So in DS-5 there is no way to write ARM-7TDMI program in Simulation mode? It seems wrong to me as RVDS had the ISS for almost all the ARM cores. Is there a work around for this?
  • Note: This was originally posted on 13th June 2013 at http://forums.arm.com

    I'm glad you've got it working.  If you could explain more about what was initially confusing that would be helpful.  By "redundancy" do you mean the various ways to get to the Debug Configuration dialog or something else?  (Sorry, I pointed you to App Console instead of Target Console.  The App Console is the stdio place when doing Linux app debug.)

    You can build for ARM7TDMI and run the code on the Cortex-A9 model, but there's no ARM7 model supplied.  (Although big-endian might be a problem; I'm not sure if Cortex-A9 supports BE32.)