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

Settings for RVDS 4.0 with ARM Cortex-A8 Processor

Note: This was originally posted on 20th May 2009 at http://forums.arm.com

Hi everyone,
  I am new to RVDS 4.0. I am able to run a simple application like  addition with other processors (ARM11).

#include <stdio.h>

int main()
{
float a,b,c;
a = 1.3; b = 2.6;
c = a+b;
printf("c = %f\n",c);

}



But, when i compile and run the same application for ARM Cortex-A8, its going to infinite loop.

################################################################################
##
Compiler Settings:
--arm --debug --cpu=Cortex-A8 --fpu=VFPv3 --fpmode=ieee_fixed -O1 --vectorize

Assembler Settings:
--arm -g --cpu=Cortex-A8 --fpu=VFPv3 --fpmode=ieee_fixed

Linker Settings:
--cpu=Cortex-A8 --fpu=VFPv3 --fpmode=ieee_fixed

################################################################################
##

*******************************

In RV Debbuer, i connected the target to ARM Cortex-A8. Its mode is set to SVC mode by default.
After loading the image, the Log window shows these messages:

Workspace: Opening Connections...
Workspace: connect "ARM_Cortex-A8_0@ISSM"
Attached to stopped device
Workspace: Init/Open done.
Warning: 88 registers defined for this core are not available from the target.

*******************************

*******************************************************
If the stop the program in between i observe the following instructions.

   S:00000818 00000000  ANDEQ    r0,r0,r0
   S:0000081C 00000000  ANDEQ    r0,r0,r0
   S:00000820 00000000  ANDEQ    r0,r0,r0
   S:00000824 00000000  ANDEQ    r0,r0,r0
   S:00000828 00000000  ANDEQ    r0,r0,r0
   S:0000082C 00000000  ANDEQ    r0,r0,r0
   S:00000830 00000000  ANDEQ    r0,r0,r0
   S:00000834 00000000  ANDEQ    r0,r0,r0
   S:00000838 00000000  ANDEQ    r0,r0,r0
   S:0000083C 00000000  ANDEQ    r0,r0,r0

*******************************************************

Can u any one please help me to solve this problem.


Thanks in Advance
Divya
  • Note: This was originally posted on 27th May 2009 at http://forums.arm.com

    Hi Divya,

         I think during compilation you might have selected your target as "Cortex-A8".But if you want to use this target, then this will require initialization code in order to work. See Application Note 133 at www.arm.com/documentation/Application_Notes.

    select target as "Cortex-A8NoNEON" in RVCT,then it works.


    Regards,
    satish

    Hi everyone,
      I am new to RVDS 4.0. I am able to run a simple application like  addition with other processors (ARM11).

    #include <stdio.h>

    int main()
    {
    float a,b,c;
    a = 1.3; b = 2.6;
    c = a+b;
    printf("c = %f\n",c);

    }



    But, when i compile and run the same application for ARM Cortex-A8, its going to infinite loop.

    ################################################################################
    ##
    Compiler Settings:
    --arm --debug --cpu=Cortex-A8 --fpu=VFPv3 --fpmode=ieee_fixed -O1 --vectorize

    Assembler Settings:
    --arm -g --cpu=Cortex-A8 --fpu=VFPv3 --fpmode=ieee_fixed

    Linker Settings:
    --cpu=Cortex-A8 --fpu=VFPv3 --fpmode=ieee_fixed

    ################################################################################
    ##

    *******************************

    In RV Debbuer, i connected the target to ARM Cortex-A8. Its mode is set to SVC mode by default.
    After loading the image, the Log window shows these messages:

    Workspace: Opening Connections...
    Workspace: connect "ARM_Cortex-A8_0@ISSM"
    Attached to stopped device
    Workspace: Init/Open done.
    Warning: 88 registers defined for this core are not available from the target.

    *******************************

    *******************************************************
    If the stop the program in between i observe the following instructions.

       S:00000818 00000000  ANDEQ    r0,r0,r0
       S:0000081C 00000000  ANDEQ    r0,r0,r0
       S:00000820 00000000  ANDEQ    r0,r0,r0
       S:00000824 00000000  ANDEQ    r0,r0,r0
       S:00000828 00000000  ANDEQ    r0,r0,r0
       S:0000082C 00000000  ANDEQ    r0,r0,r0
       S:00000830 00000000  ANDEQ    r0,r0,r0
       S:00000834 00000000  ANDEQ    r0,r0,r0
       S:00000838 00000000  ANDEQ    r0,r0,r0
       S:0000083C 00000000  ANDEQ    r0,r0,r0

    *******************************************************

    Can u any one please help me to solve this problem.


    Thanks in Advance
    Divya
  • Note: This was originally posted on 27th May 2009 at http://forums.arm.com

    I suspec the FPU is the cause...

    When building for a FPU the generated code will assume the FPU is enabled (and correctly) configurred before you reach the C library initialization.  The FPU is disabled out of reset, so it is up to the reset handler

    As I'm guessing you don't have a reset handler the FPU will still be disabled when you reach the C library init.  The C library init tries to access the FPU, fails and takes an exception.  So you end up executing junk.

    Try building with "--cpu 7-A"  or using the below link to set up the FPU:
    [url="http://infocenter.arm.com/help/topic/com.arm.doc.dai0098a/index.html"]http://infocenter.arm.com/help/topic/com.a...098a/index.html[/url]
  • Note: This was originally posted on 18th August 2010 at http://forums.arm.com

    Hi everyone,
      I am new to RVDS 4.0. I am able to run a simple application like  addition with other processors (ARM11).

    #include <stdio.h>

    int main()
    {
    float a,b,c;
    a = 1.3; b = 2.6;
    c = a+b;
    printf("c = %f\n",c);

    }



    But, when i compile and run the same application for ARM Cortex-A8, its going to infinite loop.

    ################################################################################
    ##
    Compiler Settings:
    --arm --debug --cpu=Cortex-A8 --fpu=VFPv3 --fpmode=ieee_fixed -O1 --vectorize

    Assembler Settings:
    --arm -g --cpu=Cortex-A8 --fpu=VFPv3 --fpmode=ieee_fixed

    Linker Settings:
    --cpu=Cortex-A8 --fpu=VFPv3 --fpmode=ieee_fixed

    ################################################################################
    ##

    *******************************

    In RV Debbuer, i connected the target to ARM Cortex-A8. Its mode is set to SVC mode by default.
    After loading the image, the Log window shows these messages:

    Workspace: Opening Connections...
    Workspace: connect "ARM_Cortex-A8_0@ISSM"
    Attached to stopped device
    Workspace: Init/Open done.
    Warning: 88 registers defined for this core are not available from the target.

    *******************************

    *******************************************************
    If the stop the program in between i observe the following instructions.

       S:00000818 00000000  ANDEQ    r0,r0,r0
       S:0000081C 00000000  ANDEQ    r0,r0,r0
       S:00000820 00000000  ANDEQ    r0,r0,r0
       S:00000824 00000000  ANDEQ    r0,r0,r0
       S:00000828 00000000  ANDEQ    r0,r0,r0
       S:0000082C 00000000  ANDEQ    r0,r0,r0
       S:00000830 00000000  ANDEQ    r0,r0,r0
       S:00000834 00000000  ANDEQ    r0,r0,r0
       S:00000838 00000000  ANDEQ    r0,r0,r0
       S:0000083C 00000000  ANDEQ    r0,r0,r0

    *******************************************************

    Can u any one please help me to solve this problem.


    Thanks in Advance
    Divya


    Hi Divya

    If you want to use the code running on RVDebugger 4.0, you have to follow the steps.
    1. You have to use scatter.scat, init.s, Initcache.s and retarget.c : These are the files you will get generally with the sample examples. These files are used to allocate the memory for code, stack and heap etc.
    2. You have to enable the debug options in compiler and source line debug in assembler.

    Then you can able to get the code running properly on RVDEBUGGER 4.0

    Thanks and Regards
    Sridhar Artham