Duet3Bootloader compilation pt.2 - SAME5x target
-
Hi, I need to build customized bootloader for SAME51 chip. Unfortunately, there are some issues:
../src/BoardType.cpp: In function 'unsigned int ReadAndQuantise(uint8_t, const uint16_t*, size_t)': ../src/BoardType.cpp:106:37: error: 'ReadChannel' is not a member of 'AnalogIn' 106 | const uint16_t reading = AnalogIn::ReadChannel(CommonAdcDevice, chan); | ^~~~~~~~~~~ ../src/BoardType.cpp: In function 'bool IdentifyBoard(CanAddress&, bool&, bool&)': ../src/BoardType.cpp:177:13: error: 'Init' is not a member of 'AnalogIn' 177 | AnalogIn::Init(CommonAdcDevice); | ^~~~ ../src/BoardType.cpp:180:13: error: 'Disable' is not a member of 'AnalogIn' 180 | AnalogIn::Disable(CommonAdcDevice); // finished using the ADC | ^~~~~~~
I see that all implementation of AnalogIn namespace for SAME5x chip (./src/SAME5x_C21/SAME5x/AnalogIn.cpp) goes excluded since it's completely under "#ifdef RTOS" condition, while in bootloader RTOS is not used. Are there errors in the source files, or am I missing something in my workspace setup? Thank you in advance.
P.S. Used branches and configs:
-
RRFLibraries 3.4-dev/SAME51
-
list itemCoreN2G 3.4-dev/SAME5x_CAN
-
list itemDuet3Bootloader dev/SAME5x
-
list itemCANLib 3.4-dev/SAME51_nonRTOS
All local branches updated 1.07.2023
-
-
@Arplyu the current dev branch of Duet3Bootloader needs the 3.5-dev branches of the other projects. The AnalogIn functions for non-RTOS builds of CoreN2G are in file SimpleAnalogIn.cpp.
-
@dc42 Thank you very much for quick reply! I changed branches to 3.5-dev, and the old issues are gone now. However, there is one new issue
../src/Bootloader.cpp: In function 'void GetBlock(uint32_t, uint32_t&)': ../src/Bootloader.cpp:211:30: error: 'CanMessageBuffer::CanMessageBuffer(CanMessageBuffer*)' is private within this context 211 | CanMessageBuffer buf(nullptr); | ^ In file included from ../src/Bootloader.cpp:22: /mnt/NTFSD/DEV/3DTech-Brinter/RRF-Brinter/CANlib/src/CanMessageBuffer.h:186:2: note: declared private here 186 | CanMessageBuffer(CanMessageBuffer *prev) noexcept : next(prev), managed(true) { } | ^~~~~~~~~~~~~~~~
Seems like moving CanMessageBuffer(CanMessageBuffer *prev) to public fixes the issue, but could you please check if the public repo contains the latest changes? Now the latest commit in 3.5-dev is 8eda57b890b2768bf5b16fcb692f98f68cad5e16.
Thank you!
-
@Arplyu I've just committed a correction to the Duet3Bootloader project. I hadn't compiled it since making changes to CANlib.
-
@dc42 Thanks!