getting set up to hack firmware
-
thank you for clarifying the branches and configurations..
So I believe I have all of the correct branches and configurations set in my project..
I also installed the new release of Gnu Tools ARM Embedded..
however, when I attempt to compile RepRapFirmware I get errors while building the file: ../src/Movement/Kinematics/HangprinterKinematics.cpphere are some of the first error messages..
'class FixedMatrix<float, 9, 9>' has no member named 'Fill' CoreKinematics.cpp /RepRapFirmware/src/Movement/Kinematics line 50 C/C++ Problem
'class FixedMatrix<float, 9, 9>' has no member named 'Fill' CoreKinematics.cpp /RepRapFirmware/src/Movement/Kinematics line 129 C/C++ Problem
could not convert 'normalMatrix.FixedMatrix<double, 9, 10>::GaussJordan(((double*)numFactors), (numFactors + 1))' from 'void' to 'bool' HangprinterKinematics.cpp /RepRapFirmware/src/Movement/Kinematics line 426 C/C++ Problem
I have attached the console output below..
Building file: ../src/Movement/Kinematics/HangprinterKinematics.cpp
Invoking: Cross G++ Compiler
arm-none-eabi-g++ -D__SAM4E8E__ -DRTOS -DDUET_NG -D_XOPEN_SOURCE -I"C:\Eclipse\Firmware-dev\CoreNG\cores\arduino" -I"C:\Eclipse\Firmware-dev\CoreNG\libraries\Flash" -I"C:\Eclipse\Firmware-dev\CoreNG\libraries\SharedSpi" -I"C:\Eclipse\Firmware-dev\CoreNG\libraries\Storage" -I"C:\Eclipse\Firmware-dev\CoreNG\libraries\Wire" -I"C:\Eclipse\Firmware-dev\CoreNG\asf" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\common\utils" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\common\services\clock" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\common\services\ioport" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\sam\drivers" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\sam\services\flash_efc" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\sam\utils" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\sam\utils\cmsis\sam4e\include" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\sam\utils\header_files" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\sam\utils\preprocessor" -I"C:\Eclipse\Firmware-dev\CoreNG\asf\thirdparty\CMSIS\Include" -I"C:\Eclipse\Firmware-dev\CoreNG\variants\duetNG" -I"C:\Eclipse\Firmware-dev\RepRapFirmware\src" -I"C:\Eclipse\Firmware-dev\RepRapFirmware\src\DuetNG" -I"C:\Eclipse\Firmware-dev\RepRapFirmware\src\Networking" -I"C:\Eclipse\Firmware-dev\DuetWiFiSocketServer\src\include" -I"C:\Eclipse\Firmware-dev\FreeRTOS\src\include" -I"C:\Eclipse\Firmware-dev\FreeRTOS\src\portable\GCC\ARM_CM4F" -I"C:\Eclipse\Firmware-dev\RRFLibraries\src" -O2 -Wall -c -std=gnu++17 -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib -Wdouble-promotion -fsingle-precision-constant "-Wa,-ahl=HangprinterKinematics.s" -MMD -MP -MF"src/Movement/Kinematics/HangprinterKinematics.d" -MT"src/Movement/Kinematics/HangprinterKinematics.o" -o "src/Movement/Kinematics/HangprinterKinematics.o" "../src/Movement/Kinematics/HangprinterKinematics.cpp"
../src/Movement/Kinematics/CoreKinematics.cpp: In member function 'void CoreKinematics::Recalc()':
../src/Movement/Kinematics/CoreKinematics.cpp:36:42: error: invalid conversion from 'size_t' {aka 'unsigned int'} to 'float*' [-fpermissive]
const bool ok = tempMatrix.GaussJordan(MaxAxes, 2 * MaxAxes);
^~~~~~~
In file included from ../src/Movement/Kinematics/Kinematics.h:12,
from ../src/Movement/Kinematics/ZLeadscrewKinematics.h:11,
from ../src/Movement/Kinematics/CoreKinematics.h:11,
from ../src/Movement/Kinematics/CoreKinematics.cpp:8:
C:\Eclipse\Firmware-dev\RRFLibraries\src/Math/Matrix.h:87:93: note: initializing argument 1 of 'void FixedMatrix<T, ROWS, COLS>::GaussJordan(T*, size_t) [with T = float; unsigned int ROWS = 9; unsigned int COLS = 18; size_t = unsigned int]'
template<class T, size_t ROWS, size_t COLS> void FixedMatrix<T, ROWS, COLS>::GaussJordan(T solution, size_t numRows)
~^~~~~~
../src/Movement/Kinematics/CoreKinematics.cpp:36:62: error: void value not ignored as it ought to be
const bool ok = tempMatrix.GaussJordan(MaxAxes, 2 * MaxAxes);
^
../src/Movement/Kinematics/CoreKinematics.cpp:50:18: error: 'class FixedMatrix<float, 9, 9>' has no member named 'Fill'
forwardMatrix.Fill(0.0);
^~~~
../src/Movement/Kinematics/CoreKinematics.cpp: In constructor 'CoreKinematics::CoreKinematics(KinematicsType)':
../src/Movement/Kinematics/CoreKinematics.cpp:129:16: error: 'class FixedMatrix<float, 9, 9>' has no member named 'Fill'
inverseMatrix.Fill(0.0);
^~~~
src/Movement/Kinematics/subdir.mk:39: recipe for target 'src/Movement/Kinematics/CoreKinematics.o' failed
make: *** [src/Movement/Kinematics/CoreKinematics.o] Error 1
make: *** Waiting for unfinished jobs....
../src/Movement/Kinematics/HangprinterKinematics.cpp: In member function 'virtual bool HangprinterKinematics::DoAutoCalibration(size_t, const RandomProbePointSet&, const StringRef&)':
../src/Movement/Kinematics/HangprinterKinematics.cpp:426:33: error: invalid conversion from 'size_t' {aka 'unsigned int'} to 'double' [-fpermissive]
if (!normalMatrix.GaussJordan(numFactors, numFactors + 1))
^~~~~~~~~~
In file included from ../src/Movement/Kinematics/Kinematics.h:12,
from ../src/Movement/Kinematics/HangprinterKinematics.h:11,
from ../src/Movement/Kinematics/HangprinterKinematics.cpp:8:
C:\Eclipse\Firmware-dev\RRFLibraries\src/Math/Matrix.h:87:93: note: initializing argument 1 of 'void FixedMatrix<T, ROWS, COLS>::GaussJordan(T*, size_t) [with T = double; unsigned int ROWS = 9; unsigned int COLS = 10; size_t = unsigned int]'
template<class T, size_t ROWS, size_t COLS> void FixedMatrix<T, ROWS, COLS>::GaussJordan(T solution, size_t numRows)
~^~~~~~
../src/Movement/Kinematics/HangprinterKinematics.cpp:426:32: error: could not convert 'normalMatrix.FixedMatrix<double, 9, 10>::GaussJordan(((double)numFactors), (numFactors + 1))' from 'void' to 'bool'
if (!normalMatrix.GaussJordan(numFactors, numFactors + 1))
~~~^
../src/Movement/Kinematics/HangprinterKinematics.cpp:426:59: error: in argument to unary !
if (!normalMatrix.GaussJordan(numFactors, numFactors + 1))
^
src/Movement/Kinematics/subdir.mk:39: recipe for target 'src/Movement/Kinematics/HangprinterKinematics.o' failed
make: *** [src/Movement/Kinematics/HangprinterKinematics.o] Error 114:16:44 Build Failed. 12 errors, 0 warnings. (took 18s.607ms)
-
You have incompatible versions or branches of projects RepRapFirmware and RRFLibraries in your Eclipse workspace.
-
so I was able to build the latest beta pre-lease 2.03beta2 using the updated recipe from the build instructions:
- package: branch: configuration
- RepRapFirmware: main: Duet2_RTOS
- CoreNG: main: SAM4E8E_RTOS
- FreeRTOS: main: SAM4E
- RRFLibraries: main: SAM4E_RTOS
- DuetWiFiSocketServer: dev: Release
I think I may still have the wrong configuration set for RepRapFirmware as I'm using the Duet2 Wifi and the DuetNG folder containing the file Pins_DuetNG.h is still greyed out..
Pins_DuetNG.h was the file kazolar mentions modifying in the forums to add additional motor control channels.. under my current build I have access to Pins_Duet.h should I start with this file instead?
Is Duet2_RTOS the correct configuration of RepRapFirmware for my Duet2 Wifi board? It builds without error and when I uploaded it to the board, the web interface reports back "RepRapFirmware for Duet 2 WiFi/Ethernet" for the firmware name. The possible configurations for RepRapFirmware are below:
Alligator
Duet085
Duet085_RTOS
Duet2_RTOS
Duet3_V03
Duet3_V05
DuetM_RTOS
PCCB_08
PCCB_08X5
PCCB_10
RADDS_RTOS
SAME70XPLDThank you for taking a look at this.
-
Duet2_RTOS is the correct configuration for the Duet WiFi/Ethernet, but you should use the dev branch of every project except FreeRTOS.
-
So I have modified my build as you suggested and now have the following:
RepRapFirmware: dev: Duet2_RTOS
CoreNG: dev: SAM4E8E_RTOS
FreeRTOS: main: SAM4E
RRFLibraries: dev: SAM4E_RTOS
DuetWiFiSocketServer: dev: Releasewhen I build I get errors.. see the build log attached.
0_1553634404249_build log.txtthanks.
-
Update your RepRapFirmware project source files from the latest commit. A few days ago I accepted a PR from another user, but it turned out to be incompatible with other commits I had made recently. So the commit that implemented that PR doesn't build.
-
So I got that to build without errors.. thanks!
however the RepRapFirmware\src\DuetNG folder and the file Pins_DuetNG.h are still greyed out..
Pins_DuetNG.h was the file kazolar mentions modifying in the forums to add additional motor control channels..
under my current build I have access to RepRapFirmware\src\Duet\Pins_Duet.h should I start with this file instead?
Thanks for your help
-
You have selected the wrong configuration of the RepRapFirmware to build. Select the Duet2 configuration. Then the DuetNG folder will not be greyed out.
-
After a break, I'm back to work on the firmware..
Here's an image of my project folder from eclipse
-
The Duet_NG folder that is greyed out is the important one. I sometimes find that Eclipse greys out the wrong folder. Changing the configuration to a different one and then back again usually fixes it. However, when the wrong folder is greyed out, the build still works.
The version of Eclipse that I currently use is 2019-03.