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

Can't config ARM compile tool

Hi,

I was import Hello World example from Linux_example.zip file (C:\Program Files\DS-5\examples\Linux_example.zip) and coding a short program.

When I try to debug the program, I'm confusing about the debug setting. It looks different from Hello World Project create by DS-5.

As attached file, ds-5_debug.jpg image is Hello World example import from DS-5 example file, and ds-5_debug_1.jpg is Hello World Project create by DS-5.

It seems like some configuration missing and I don't know how to config ARM compiler.

5825.zip
Parents
  • Hi William,

    If you are modifying the Hello World example for Linux, then it is compiled using GCC, not the ARM Compiler. Are you trying to create a Linux application, or a bare metal one?

    Here is the tutorial for Hello World for bare metal, which explains the compiler settings you need: http://ds.arm.com/developer-resources/tutorials/working-with-arm-ds-5/#creating-a-simple-hello-world-c-program-for-a-bare-metal-target

    For Linux, you need to:

    1. start a new C project, set the toolchain to DS-5 GCC

    2. right click on the project in the Project Explorer view and select properties

    3. under C/C++ Build > Settings > ... GCC C Compiler > Miscellaneous, add -marm -march=XXX -mfloat-abi=soft to the "other flags" box (leave the other flags in that box as they are)

    4. under GCC Linker > Miscellaneous > Linker Flags, add -marm -march=XXX -mfloat-abi=soft

    XXX needs to be replaced with the specific architecture version, (for example) armv4t (which will allow it to run on the Cortex-A8 FVP which is included in DS-5) - more info on the flags can be found here: http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

    5. create a new c source file in your project and add the Hello World code:

    #include <stdio.h>

    int main(int argc, char** argv)

    {

    printf("Hello world\n");

    return 0;

    }

    6. build and run your Hello World application.

    Hope this helps,

    Joe

Reply
  • Hi William,

    If you are modifying the Hello World example for Linux, then it is compiled using GCC, not the ARM Compiler. Are you trying to create a Linux application, or a bare metal one?

    Here is the tutorial for Hello World for bare metal, which explains the compiler settings you need: http://ds.arm.com/developer-resources/tutorials/working-with-arm-ds-5/#creating-a-simple-hello-world-c-program-for-a-bare-metal-target

    For Linux, you need to:

    1. start a new C project, set the toolchain to DS-5 GCC

    2. right click on the project in the Project Explorer view and select properties

    3. under C/C++ Build > Settings > ... GCC C Compiler > Miscellaneous, add -marm -march=XXX -mfloat-abi=soft to the "other flags" box (leave the other flags in that box as they are)

    4. under GCC Linker > Miscellaneous > Linker Flags, add -marm -march=XXX -mfloat-abi=soft

    XXX needs to be replaced with the specific architecture version, (for example) armv4t (which will allow it to run on the Cortex-A8 FVP which is included in DS-5) - more info on the flags can be found here: http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

    5. create a new c source file in your project and add the Hello World code:

    #include <stdio.h>

    int main(int argc, char** argv)

    {

    printf("Hello world\n");

    return 0;

    }

    6. build and run your Hello World application.

    Hope this helps,

    Joe

Children