Duet3Bootloader compilation
-
Hi, could anybody confirm if the compilation instructions available in the bootloader repository's readme are still valid? Or if not, are there correct instructions available anywhere else? To me it looks like the instructions from readme are outdated, or I do something wrong. Thanks!
-
@Arplyu Do you mean here? https://github.com/Duet3D/Duet3Bootloader#build-instructions
Are you getting error messages when compiling?Possibly cross reference installation and usage with the RRF instructions https://github.com/Duet3D/RepRapFirmware/wiki/Building-RepRapFirmware
Ian
-
@Arplyu do you mean the bootloader for CAN-connected expansion boards, or the bootloader for the Mini5+ ?
-
@droftarts Thanks for reply! Yes, I used those instructions. I chose the branches as said in the instructions. I don't remember, where I saw the build configs for bootloader, but AFAIR there should be non-RTOS configs. So I selected SAMC21_nonRTOS for CANLib, SAMC21 for RRFLibraries and SAMMYC21 for the main project. The target board for which I want to build the bootloader is SAMMYC21. So, as a result I get the following error when compiling RRFLibraries:
../src/Math/Isqrt.cpp:7:11: fatal error: Core.h: No such file or directory 7 | # include <Core.h> | ^~~~~~~~
which possiblyt refers to Core.h from CoreN2G (???), however nothing is said that this should be added to the workspace (anyways, adding CoreN2G didn't help and induced even more errors). In turn, error in RRFLIbraries doesn't allow to compile the main project.
-
@dc42 sorry, I missed your reply while was writing my response to @droftarts . Yes, I mean bootloader for CAN-boards, more precisely for SAMMYC21
-
@Arplyu yes you need to include CoreN2G in your workspace. I have updated the build instructions at https://github.com/Duet3D/Duet3Bootloader/blob/master/README.md to reflect this and also to correct the current branch names of the various projects.
What changes are you looking to make to the bootloader?
-
@dc42 thank you for the reply.
My goals are 1. research interest 2. adding own configuration to the expansion board firmware and a corresponding binary name to the bootloader (to update via CAN). The new config will be based on SAMMYC21, therefore I try to build first the standard SAMMYC21 configuration.I tried with adding CoreN2G project (config SAMC21_nonRTOS) and setting branch names according to the updated instructions. However, compilation failed again. I've tried in both Linux and Windows (I used to work with RRF3 in Linux during last 1.5 years and everything has always been ok; I haven't had any problems with compilation for expansion board firmware in Linux neither).
The errors were similar in both systems:../src/Bootloader.cpp: In function 'void GetBlock(uint32_t, uint32_t&)': ../src/Bootloader.cpp:211:19: error: no matching function for call to 'CanMessageBuffer::CanMessageBuffer()' 211 | CanMessageBuffer buf; | ^~~ In file included from ../src/Bootloader.cpp:22: /mnt/NTFSD/DEV/DUET_BOOTLOADER/CANlib/src/CanMessageBuffer.h:28:2: note: candidate: 'CanMessageBuffer::CanMessageBuffer(CanMessageBuffer*)' 28 | CanMessageBuffer(CanMessageBuffer *prev) noexcept : next(prev) { } | ^~~~~~~~~~~~~~~~ /mnt/NTFSD/DEV/DUET_BOOTLOADER/CANlib/src/CanMessageBuffer.h:28:2: note: candidate expects 1 argument, 0 provided /mnt/NTFSD/DEV/DUET_BOOTLOADER/CANlib/src/CanMessageBuffer.h:25:7: note: candidate: 'constexpr CanMessageBuffer::CanMessageBuffer(const CanMessageBuffer&)' 25 | class CanMessageBuffer | ^~~~~~~~~~~~~~~~ /mnt/NTFSD/DEV/DUET_BOOTLOADER/CANlib/src/CanMessageBuffer.h:25:7: note: candidate expects 1 argument, 0 provided /mnt/NTFSD/DEV/DUET_BOOTLOADER/CANlib/src/CanMessageBuffer.h:25:7: note: candidate: 'constexpr CanMessageBuffer::CanMessageBuffer(CanMessageBuffer&&)' /mnt/NTFSD/DEV/DUET_BOOTLOADER/CANlib/src/CanMessageBuffer.h:25:7: note: candidate expects 1 argument, 0 provided make[1]: *** [src/subdir.mk:26: src/Bootloader.o] Error 1 make: *** [makefile:56: all] Error 2
-
@Arplyu there is an incompatibility between the branches or versions of files in CANlib and Duet3Bootloader. Check that you are using the latest commits on the branches that I listed in the readme file.
-
@dc42 thanks, and sorry for taking your time with this problem. I've double checked, I'm pretty sure I use the latest commits on exactly those branches. Just in case:
CANLib
d2210cd9cdde4e40c4c575b273b58ddc75600b91CoreN2G
de512d3ce8c7add8c7230a102086b652f036f26eBootloader
a3a9567a427e9749796ec037e2c989d7ff571005RRFLibraries
a7260b7073f5b0a7e6940587ae34a0584f8ceee7 -
@Arplyu I'm sorry, Eclipse was showing that my working copy of Duet3Bootloader was in sync with the remote, but in fact it wasn't and the remote was missing a change. Please update Duet3Bootloader and try again.
-
@dc42 Thanks a lot! Now it compiles
-
-