I had this while compiling my code. Anyone to help me?

build/src/main.o:(.bss.FrontRight+0x0): first defined here

build/src/robot-config.o:(.bss.RearLeft+0x0): multiple definition of `RearLeft’

build/src/main.o:(.bss.RearLeft+0x0): first defined here

build/src/robot-config.o:(.bss.RearRight+0x0): multiple definition of `RearRight’

build/src/main.o:(.bss.RearRight+0x0): first defined here

make: *** [build/My.elf] Error 1

[error]: make process closed with exit code : 2

you are defining some global intances (presumably motors) more than once.
don’t define in more than one source file
don’t include .cpp files inside other .cpp files.

2 Likes

I defined it in the robot configuration

My main program also had the motors defined. I found out when I checked the include folder

Thanks for the support

1 Like