SAMMY-C21 cannot compile
-
Hey everyone! (sorry posted under wrong category previously)
I am playing around and wanted to change some of the options on the SAMMY (i.e. disable stepper, that kind of thing) but I followed the instructions on github to compile the Sammy-C21 firmware and I get error after error. I am having a nightmare of a time. I have not made any changes yet and I cannot ever get the thing to compile correctly with just the stock firmware.
Ideally I'd like to compile a release version as well.
I pulled the repositories according to the readme:
*Duet3Expansion: master
*RRFLibraries: dev
*CANlib: master
*FreeRTOS: master(I had to add CoreN2G as well to solve a few other errors I was seeing)
I have to assume that the software compiles on someone's machine so I assume it's something I've done (or haven't done). I've been playing around with it for the better part of today, any pointers that anyone can give me?
Here's the important outputs form the console.
arm-none-eabi-g++ -std=gnu++17 -D__SAMC21G18A__=1 -DRTOS -I"C:\Users\Chris Thompson\git\RRFLibraries\src" -I"C:\Users\Chris Thompson\git\FreeRTOS\src\include" -I"C:\Users\Chris Thompson\git\FreeRTOS\src\portable\GCC\ARM_CM0" -I"C:\Users\Chris Thompson\git\CoreN2G\src" -I"C:\Users\Chris Thompson\git\CoreN2G\src\atmel\SAMC21_DFP\1.2.176\samc21\include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\arm\CMSIS\5.4.0\CMSIS\Core\Include" -O2 -Wall -c -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib -Wundef -Wdouble-promotion -fsingle-precision-constant "-Wa,-ahl=Isqrt.s" -MMD -MP -MF"src/Math/Isqrt.d" -MT"src/Math/Isqrt.o" -o "src/Math/Isqrt.o" "../src/Math/Isqrt.cpp" ../src/Math/Isqrt.cpp: In function 'uint32_t isqrt64(uint64_t)': ../src/Math/Isqrt.cpp:17:28: error: 'cpu_irq_save' was not declared in this scope 17 | const irqflags_t flags = cpu_irq_save(); | ^~~~~~~~~~~~ ../src/Math/Isqrt.cpp:21:3: error: 'cpu_irq_restore' was not declared in this scope 21 | cpu_irq_restore(flags); | ^~~~~~~~~~~~~~~ ../src/Math/Isqrt.cpp:33:27: error: 'cpu_irq_save' was not declared in this scope 33 | const irqflags_t flags = cpu_irq_save(); | ^~~~~~~~~~~~ ../src/Math/Isqrt.cpp:38:2: error: 'cpu_irq_restore' was not declared in this scope 38 | cpu_irq_restore(flags); | ^~~~~~~~~~~~~~~ src/Math/subdir.mk:24: recipe for target 'src/Math/Isqrt.o' failed make: *** [src/Math/Isqrt.o] Error 1 make: *** Waiting for unfinished jobs.... Finished building: ../src/RTOSIface/RTOSIface.cpp
arm-none-eabi-g++ -std=gnu++17 -D__SAMC21G18A__ -DSAMMYC21 -DRTOS -I"C:\Users\Chris Thompson\git\CoreN2G" -I"C:\Users\Chris Thompson\git\Duet3Expansion\src" -I"C:\Users\Chris Thompson\git\Duet3Expansion\src\Hardware\SAMC21" -I"C:\Users\Chris Thompson\git\CoreN2G\src" -I"C:\Users\Chris Thompson\git\CoreN2G\src\SAME5x_C21" -I"C:\Users\Chris Thompson\git\CoreN2G\src\SAME5x_C21\SAMC21\hal\include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\SAME5x_C21\SAMC21\hal\utils\include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\SAME5x_C21\SAMC21\hri" -I"C:\Users\Chris Thompson\git\CoreN2G\src\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"C:\Users\Chris Thompson\git\CoreN2G\src\atmel\SAMC21_DFP\1.2.176\samc21\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 -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib -Wundef -Wdouble-promotion -Werror=return-type -fsingle-precision-constant "-Wa,-ahl=DDA.s" -MMD -MP -MF"src/Movement/DDA.d" -MT"src/Movement/DDA.o" -o "src/Movement/DDA.o" "../src/Movement/DDA.cpp" ../src/Movement/Kinematics/LinearDeltaKinematics.cpp: In member function 'void LinearDeltaKinematics::Recalc()': ../src/Movement/Kinematics/LinearDeltaKinematics.cpp:73:12: error: 'fastSqrtf' was not declared in this scope 73 | + fastSqrtf(D2[axis] - ((axis < UsualNumTowers) ? fsquare(radius) : fsquare(towerX[axis]) + fsquare(towerY[axis]))) | ^~~~~~~~~ ../src/Movement/Kinematics/LinearDeltaKinematics.cpp: In member function 'float LinearDeltaKinematics::Transform(const float*, size_t) const': ../src/Movement/Kinematics/LinearDeltaKinematics.cpp:85:10: error: 'fastSqrtf' was not declared in this scope 85 | return fastSqrtf(D2[axis] - fsquare(machinePos[X_AXIS] - towerX[axis]) - fsquare(machinePos[Y_AXIS] - towerY[axis])) | ^~~~~~~~~ ../src/Movement/Kinematics/LinearDeltaKinematics.cpp: In member function 'void LinearDeltaKinematics::ForwardTransform(float, float, float, float*) const': ../src/Movement/Kinematics/LinearDeltaKinematics.cpp:115:32: error: 'fastSqrtf' was not declared in this scope 115 | const float z = (minusHalfB - fastSqrtf(fsquare(minusHalfB) - A * C)) / A; | ^~~~~~~~~ src/Movement/Kinematics/subdir.mk:27: recipe for target 'src/Movement/Kinematics/LinearDeltaKinematics.o' failed make[1]: *** [src/Movement/Kinematics/LinearDeltaKinematics.o] Error 1
-
@th0mpy I suggest you use either the 3.3-dev branches of all four projects, or the 3.4-dev branches.