Error about "collect2.exe: error: ld returned 1 exit status"

Hello everyone. I now have a FreeRTOS project, and there is a problem compiling, as the title shows. I don’t know why this is, can you solve this problem for me?

Here is the project source code source code

  • FreeRTOS folder must be inside src/ otherwise it won’t be compiled…
  • Keil and IAR folders from the FreeRTOS/ports directory must be deleted, they contain source code meant for the assembler of these toolchains. Only GCC must prevail
  • include paths in build_flags must be adapted accordingly
  • needs additional build flags -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp so that the assembly builds correctly (see here)

Fixed project: here.

2 Likes

Also you did not choose a FreeRTOS heap, is that wanted?

Thank you for your answer. I have changed the project file according to your prompt, but there are still errors. I can’t understand the “platformio.ini” of “platformIO”. It is a bit difficult for me to configure it.

Here is the changed project source code

changed

Did you see my download link? It should work for reference (https://drive.google.com/file/d/1cEiz0KXbT4IO96QakhHlN6vcuwhOcPMT/view?usp=sharing)

Have you changed the files in this link? Why is it the same as what I uploaded?:grinning::grinning:

You are right, I somehow zipped the wrong file… Redoing…

See https://drive.google.com/open?id=1N1a3NgcL7ovc7z69JzA2VMnwuiM42fbL

Thank you for your answer. You solved a big problem for me.

1 Like