Open Elephant42 opened 2 years ago
I have the same issue. Any fix?
I have the same issue. Any fix?
None so far...
The problem lies in the file fs/include/fs/ffdiskio.h has a definition of bsp as a global variable. But every source file that includes it duplicates the global causing that link error. I changed the definition to:
extern BlockDeviceParams bdp[FF_VOLUMES];
and added the global declaration to fs/src/ffdiskio.c:
BlockDeviceParams bdp[FF_VOLUMES];
The problem lies in the file fs/include/fs/ffdiskio.h has a definition of bsp as a global variable. But every source file that includes it duplicates the global causing that link error. I changed the definition to:
extern BlockDeviceParams bdp[FF_VOLUMES];
and added the global declaration to fs/src/ffdiskio.c:
BlockDeviceParams bdp[FF_VOLUMES];
Thanks - I'm working on other stuff right now but will try your fix when I get some time.
Seems to be running. I'm wondering how this got built like this :)
Sorry -- while I'm sure I've made an error here, the binary that gets attached to github is built on every commit. So I can only imagine that some compiler versions are fussier than others. I'll look into this when I'm back at my desk, probably next week.
No shade meant by my comment. I was just surprised this wasn't picked up. I built this on Manjaro Linux. I did notice a difference in size of the .uf2 file between my build and the binary your provide. Both seem to work the same though.
Any clues?
[build] [100%] Linking CXX executable cpicom.elf [build] c:/util/devel/gcc-arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: CMakeFiles/cpicom.dir/fs/src/ffdiskio.c.obj:C:\Users\steve\source\repos\Temp\cpicom\fs\include/fs/ffdiskio.h:11: multiple definition of
bdp'; CMakeFiles/cpicom.dir/fs/src/ff.c.obj:C:\Users\steve\source\repos\Temp\cpicom\fs\include/fs/ffdiskio.h:11: first defined here [build] c:/util/devel/gcc-arm/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: CMakeFiles/cpicom.dir/fs/src/filesystemfat.c.obj:C:\Users\steve\source\repos\Temp\cpicom\fs\include/fs/ffdiskio.h:11: multiple definition of
bdp'; CMakeFiles/cpicom.dir/fs/src/ff.c.obj:C:\Users\steve\source\repos\Temp\cpicom\fs\include/fs/ffdiskio.h:11: first defined here [build] collect2.exe: error: ld returned 1 exit status