Problem building Duet2
-
I hate to post this since I should be able to get it working, but i've wasted a day and hoped you could help...
I'm just not able to build the latest (3.3) although I was fine building 3.2.
The build documentation is slightly inconsistent, so I'm not entirely sure what's required. It says to build 3.3 you need CoreN2G (3.3-dev) but I think I need CoreNG (dev). So, at the moment I now have both of them - but I've tried only one or the other as well with no success.
I've followed the build instructions carefully, but haven't reinstalled Eclipse. When I went back to (my) older code it built ok.
The build seems to work ok for all of the projects except RepRapFirmware.
If I don't have the CoreN2G project, when I run the build from Eclipse it doesn't give anything useful as an error (make all failed...) so instead I ran a command prompt and ran make all in the Duet2 folder and a bunch of files compile ok, but then I get...
Building file: ../src/bossa/Applet.cpp Invoking: Cross G++ Compiler arm-none-eabi-g++ -std=gnu++17 -D__SAM4E8E__ -DRTOS -DDUET_NG -D_XOPEN_SOURCE -I"C:\eclipse\Firmware\RepRapFirmware\src" -I"C:\eclipse\Firmware\RepRapFirmware\src\Hardware\SAM4E" -I"C:\eclipse\Firmware\RepRapFirmware\src\DuetNG" -I"C:\eclipse\Firmware\RepRapFirmware\src\Networking" -I"C:\eclipse\Firmware\DuetWiFiSocketServer\src\include" -I"C:\eclipse\Firmware\FreeRTOS\src\include" -I"C:\eclipse\Firmware\FreeRTOS\src\portable\GCC\ARM_CM4F" -I"C:\eclipse\Firmware\RRFLibraries\src" -Os -Wall -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fexceptions -nostdlib -Wundef -Wdouble-promotion -Werror=return-type -Wsuggest-override -fsingle-precision-constant "-Wa,-ahl=Applet.s" -fstack-usage -MMD -MP -MF"src/bossa/Applet.d" -MT"src/bossa/Applet.o" -o "src/bossa/Applet.o" "../src/bossa/Applet.cpp" In file included from C:\eclipse\Firmware\RepRapFirmware\src/GCodes/GCodeException.h:11, from ../src/bossa/Samba.h:37, from ../src/bossa/Applet.h:34, from ../src/bossa/Applet.cpp:29: C:\eclipse\Firmware\RepRapFirmware\src/RepRapFirmware.h:49:10: fatal error: Core.h: No such file or directory 49 | #include "Core.h" | ^~~~~~~~ compilation terminated. src/bossa/subdir.mk:42: recipe for target 'src/bossa/Applet.o' failed
If I do have the CoreN2G project I instead get this:
RapFirmware\RepRapFirmware\Duet2>make all Building file: ...... [lines removed...] "C:\eclipse\Firmware\RRFLibraries\src" -Os -Wall -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fexceptions -nostdlib -Wundef -Wdouble-promotion -Werror=return-type -Wsuggest-override -fsingle-precision-constant "-Wa,-ahl=Flasher.s" -fstack-usage -MMD -MP -MF"src/bossa/Flasher.d" -MT"src/bossa/Flasher.o" -o "src/bossa/Flasher.o" "../src/bossa/Flasher.cpp" In file included from ../src/bossa/Flasher.cpp:31: C:\eclipse\Firmware\RepRapFirmware\src/Platform/RepRap.h:27:10: fatal error: General/function_ref.h: No such file or directory 27 | #include <General/function_ref.h> | ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. src/bossa/subdir.mk:42: recipe for target 'src/bossa/Flasher.o' failed make[1]: *** [src/bossa/Flasher.o] Error 1 makefile:96: recipe for target 'all' failed make: *** [all] Error 2
And I have no function_ref.h file that I can find anywhere so I'm confused.
Please help.
Mark
-
@markz looks like you have the wrong branch of RRFLibraries in your workspace. You need branch 3.3-dev.
-
@dc42 Here's my library versioning unless there some caching that I can't see.
-
@markz if you are up to date with RRFLibraries 3.3-dev then function_ref.h should be in src/General.
-
@dc42 Yay, thank you very much. It was a cascade of whack-a-mole.
a) It appears that I need both CoreNG and CoreN2G in the build. I set CoreN2G to Sam4e_sdhc and it built and seems ok (?)
b) for some reason my rrflibraries was 23 commits behind even though it spec'ed 3.3-dev (?) and I did a pull to update it. I had done this in earlier start-over tries, but without the CoreN2G it failed.
c) eclipse still won't build. I get this error:
08:20:31 **** Incremental Build of configuration Duet2 for project RepRapFirmware **** make -j8 all c:/program files/gnu arm eclipse/build tools/2.6-201507152002/bin/sh: C:/Program: not found make: *** [all] Error 127 makefile:96: recipe for target 'all' failed "make -j8 all" terminated with exit code 2. Build might be incomplete. 08:20:33 Build Failed. 2 errors, 0 warnings. (took 1s.467ms)
but I can manually go to the Duet2 folder, run make all and it completes so. I suspect maybe my path is too long or there's a space character it doesn't like even though I'm using the gnu arm eclipse make. Ah well.
Thanks.
Mark
Addendum: apparently I don't need CoreNG anymore, since I just built ok without it. When you have time could you please update the table in section 15 of https://github.com/Duet3D/RepRapFirmware/wiki/Building-RepRapFirmware. Thanks so much.
-
@markz said in Problem building Duet2:
a) It appears that I need both CoreNG and CoreN2G in the build.
You do not need CoreNG in the build, it isn't used by RRF 3.3.
-
@dc42 Yeah, thanks I just noticed. I really really appreciate the help.