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

To build custom test function (not main) with arm-none-eabi-gcc

Hello Everyone,

I am trying to build test function which looks like below:

test.c

#include<stdio.h>

int mymain(int argc, char **argv) {

    printf("Hellow World!\n");

    return 0;

}

and I am using following build command to build the code.

arm-none-eabi-gcc --specs=nosys.specs -march=armv8-m.main -mthum -O0 -t -Wl, -emymain -T my.ld test.c -o test

Below is the error:

../../arm-none-eabi/bin/ld: cannot find : No such file or directory

collect2: error: ld returned 1 exit status

My requirement:

I need to build this simple test code to get final executable ELF with entry address -> mymain.

I really need some inputs to get over this error.
You inputs with details help me in understanding in a better way.

Thanks.

- Vinay

Parents
  • Do you use the latest gcc version?

    Please try latest https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads based on your host OS type.

    Features:

    • All GCC 6 features, plus latest mainline features:
        + Full ARMv8-M support including atomics and Security Extensions
        + ARM PURECODE support for ARMv7-M and ARMv8-M Baseline and Mainline
        + Co-processor intrinsics support
        + Cortex-M23 and Cortex-M33 support
        + -mthumb optional for Cortex-M devices
    • Support for OS-retargeting of locking routines in newlib
    • Advanced SIMD-optimized memchr implementation in newlib
    • Enable setting options for Windows installer on command line
Reply
  • Do you use the latest gcc version?

    Please try latest https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads based on your host OS type.

    Features:

    • All GCC 6 features, plus latest mainline features:
        + Full ARMv8-M support including atomics and Security Extensions
        + ARM PURECODE support for ARMv7-M and ARMv8-M Baseline and Mainline
        + Co-processor intrinsics support
        + Cortex-M23 and Cortex-M33 support
        + -mthumb optional for Cortex-M devices
    • Support for OS-retargeting of locking routines in newlib
    • Advanced SIMD-optimized memchr implementation in newlib
    • Enable setting options for Windows installer on command line
Children
No data