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

0