RP2040 Compilation error
-
@Th0mpy you'd be better off switching to beta 2 as there were a few bug fixes after beta 1
-
@Th0mpy said in RP2040 Compilation error:
The error "../src/RP2040/CanDeviceRP2040.cpp:414:14: error: 'ClearCurrentTaskNotifyCount' is not a member of 'TaskBase'" I get the same error if I set the target to SAMC21
You were using an older commit of RRFLibraries.
-
This post is deleted! -
Scratch that... Beta 2, different error now:
Building file: ../src/Hardware/RP2040/Main.cpp ../src/Heating/Heat.cpp: In function 'void Heat::TaskLoop(void*)': ../src/Heating/Heat.cpp:248:20: error: no matching function for call to 'CanMessageBuffer::CanMessageBuffer()' 248 | CanMessageBuffer buf; | ^~~ In file included from ../src/Heating/Heat.cpp:28: C:\Users\Chris Thompson\git\CANlib\src/CanMessageBuffer.h:28:2: note: candidate: 'CanMessageBuffer::CanMessageBuffer(CanMessageBuffer*)' 28 | CanMessageBuffer(CanMessageBuffer *prev) noexcept : next(prev) { } | ^~~~~~~~~~~~~~~~ C:\Users\Chris Thompson\git\CANlib\src/CanMessageBuffer.h:28:2: note: candidate expects 1 argument, 0 provided C:\Users\Chris Thompson\git\CANlib\src/CanMessageBuffer.h:25:7: note: candidate: 'constexpr CanMessageBuffer::CanMessageBuffer(const CanMessageBuffer&)' 25 | class CanMessageBuffer | ^~~~~~~~~~~~~~~~ C:\Users\Chris Thompson\git\CANlib\src/CanMessageBuffer.h:25:7: note: candidate expects 1 argument, 0 provided C:\Users\Chris Thompson\git\CANlib\src/CanMessageBuffer.h:25:7: note: candidate: 'constexpr CanMessageBuffer::CanMessageBuffer(CanMessageBuffer&&)' C:\Users\Chris Thompson\git\CANlib\src/CanMessageBuffer.h:25:7: note: candidate expects 1 argument, 0 provided Invoking: Cross G++ Compiler arm-none-eabi-g++ -std=gnu++17 -D__RP2040__ -DRPI_PICO -DRTOS -I"C:\Users\Chris Thompson\git\CoreN2G" -I"C:\Users\Chris Thompson\git\CANlib" -I"C:\Users\Chris Thompson\git\RRFLibraries" -I"C:\Users\Chris Thompson\git\FreeRTOS" -I"C:\Users\Chris Thompson\git\Duet3Expansion\src" -I"C:\Users\Chris Thompson\git\Duet3Expansion\src\Hardware\RP2040" -I"C:\Users\Chris Thompson\git\CoreN2G\src" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/boards/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/common/pico_base/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/common/pico_sync/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/common/pico_time/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/cmsis/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/hardware_base/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/hardware_dma/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/hardware_gpio/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/hardware_irq/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/hardware_sync/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/hardware_timer/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/hardware_watchdog/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/pico_platform/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Core/Include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2_common/cmsis/stub/CMSIS/Device/RaspberryPi/RP2040/Include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2040/hardware_regs/include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\RP2040\pico-sdk/src/rp2040/hardware_structs/include" -I"C:\Users\Chris Thompson\git\RRFLibraries\src" -I"C:\Users\Chris Thompson\git\CANlib\src" -I"C:\Users\Chris Thompson\git\FreeRTOS\src\include" -I"C:\Users\Chris Thompson\git\FreeRTOS\src\portable\GCC\ARM_CM0" -O3 -Wall -c -mcpu=cortex-m0plus -mthumb -mfp16-format=ieee -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib -Wundef -Wdouble-promotion -Werror=return-type -fsingle-precision-constant "-Wa,-ahl=Main.s" -MMD -MP -MF"src/Hardware/RP2040/Main.d" -MT"src/Hardware/RP2040/Main.o" -o "src/Hardware/RP2040/Main.o" "../src/Hardware/RP2040/Main.cpp" src/Heating/subdir.mk:30: recipe for target 'src/Heating/Heat.o' failed make[1]: *** [src/Heating/Heat.o] Error 1 make[1]: *** Waiting for unfinished jobs....
-
I dropped back to 3.5_DEV on CANLIB and the error went away. Still get a warning but it compiles now.
-
@Th0mpy which board are you compiling for?
-
@jay_s_uk I have the FLY SB2040, so I targeted the RPiPico.
-
@Th0mpy the pins are different. Use my fork as I have the sb2040 setup https://github.com/jaysuk/Duet3Expansion/tree/3.5-dev
-
@jay_s_uk Doing that now, that's a lot easier. I was just in the process of figuring that all out
Thanks buddy!
-
@jay_s_uk FYI, I get no error if I use the 3.5_DEV branch of CanLIB. I get the heat error if I use beta2.
-
@Th0mpy if you are using the RRF source code, either use the files tagged 3.5beta2 in all relevant repositories, or use the latest files on the 3.5-dev branch of all relevant repositories. Don't use a mix of 3.5beta2 and latest 3.5-dev files.
-
@Th0mpy How are you getting on with the FLY SB2040? I was looking at one of these due to its form factor.
-
@EdChamberlain It's working but I've taken small breaks to build some other hardware.
The core of the SB2040 toolboard is working great. I am looking into I2C in order to add an LIS3DH accelerometer, but the I2C libs aren't wired up into the RP2040 yet.
I had a few issues with my environment and now can compile both the 3.5 code for RP2040 and Jay's branch.
Does anyone know when I2C might be ready to test on the RP2040? I'm digging around but I'm getting a little lost.