ERROR: The command 'arm-none-eabi-gcc.exe' failed with exit code '1'. Chanage toolchain?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

I got a error.

"

collect2.exe: error: ld returned 1 exit status

The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

"

It looks like the error is pointing no where and i do not understand why this happens.

I have readup on the error and found out that i need to change the toolchain to ARM GCC Generic in the build menu.

After that i located the build in the main folder and now i get this error.

ERROR: Could not locate the binaries for the generic tool chain "ARM GCC Generic" in the selected path "C:\Users\Daan Brinkers\Dropbox\! Stage CLS 04-09-2017 05-02-2018\PSoC programma's\Final Project\Final Project\FINAL PROJECT CY8C5888AXI-LP096.cydsn". The following are the missing binaries: "arm-none-eabi-as.exe"

How can i fix this? I read something about a linking problem too but i don't know how to fix this.

i added the project file as attachment.

thank you for your help in advance.

Best Regards,


Daan

0 Likes
1 Solution
Anonymous
Not applicable

Hello Daan,

There is no need to change the toolchain. When you receive such an error, you can go to the Output list for more information instead of the notice list.

Here is a picture with the cause of the errors in your project.

pastedImage_0.png

Problem seems that the linker finds multiple definitions of a variable with the same name, and can't decide which one to use.

Looking at your project, the cause of the error seems to be that you define the variables in a header file. Every time this header file is included in a .C file, these variables will be created. Resulting in multiple definitions.

You could either declare this variables static, so that every .c file has its own set. (Probably not what you desire).

Or you could move the declaration of these variables into the .c file that uses them, and declare them as extern in a header file if you need them elsewhere.

View solution in original post

3 Replies
Anonymous
Not applicable

Hello Daan,

There is no need to change the toolchain. When you receive such an error, you can go to the Output list for more information instead of the notice list.

Here is a picture with the cause of the errors in your project.

pastedImage_0.png

Problem seems that the linker finds multiple definitions of a variable with the same name, and can't decide which one to use.

Looking at your project, the cause of the error seems to be that you define the variables in a header file. Every time this header file is included in a .C file, these variables will be created. Resulting in multiple definitions.

You could either declare this variables static, so that every .c file has its own set. (Probably not what you desire).

Or you could move the declaration of these variables into the .c file that uses them, and declare them as extern in a header file if you need them elsewhere.

Anonymous
Not applicable

Hello cfmm,

Thank you for your reply, I worked hard on fixing it and i just did. The declaration of the enumeration.

I had it like this -> enum Name { ENUM DATA } variable = something;

and it should have been -> enum Name { ENUM DATA } variable;

and declare the variable somewhere else in the start of the main lus as something.

Thank you for your help and have a nice day,

Daan

0 Likes

Daan,

You can put initialization code in the *.c file preamble

enum Name { ENUM DATA } variable = something;

And *.h file

enum Name { ENUM DATA } variable;

odissey1

0 Likes