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

DS5 Community edition - Unable to debug VFP instructions in assembly file

Hi 

I am using DS5 Community edition. I am able to run calender_Armv7-A_GCC example under bare metal for ARMv7-A.

I modified the project and added a assembly coded file to test my application.

The assembly coded file(.S) has VFP instructions such as :  vdup.f32, vmov.f32

Using below options in Makefile, I am able to get the code compiled and create an executable:

-mcpu=Cortex-A9 -mfloat-abi=soft -mfpu=neon

However, when i try to debug - the control is looping at the first VFP instruction (such as vdup.f32, vmov.f32) and not coming out of execution to next instruction.

Any suggestions on what could be the issue - Am i missing some thing here?

Thanks in advance.

Kapil

  • Hi Kapil,

    My guess is that you haven't enabled the VFP and NEON on the Cortex-A9 in the start-up code. By default these blocks are disabled out of reset for power-saving (i.e. only turn them on when required).

    So when the first vfp instruction is encounted, an UNDEF exception would be taken, but the behaviour here will depend if any vector tables have been defined, and also what the model might do.

    You need to look at the 'startup_Cortex-A9_GCC' example and try copying and including the startup.S file.

    In here are the essential lines  of :

    //==================================================================
    // Switch on the VFP and NEON hardware
    //=================================================================

            MOV     r0, #0x40000000
            VMSR    FPEXC, r0                   // Write FPEXC register, EN bit set

    Which enables access to coprocessors 10 and 11 for NEON and VFP.

    Another alternative would be to build and run the 'startup_Cortex-A9_GCC' on the model, then download and run your modified calender example, withou restarting/reloading the model inbetween.

    This was, the startup_Cortex-A9 code will enable the NEON and VFP blocks, and they will still be enabled when you run your code.

    I hope that helps ?

    Regards,

    Stuart