Support with building new firmware for Duet Wifi
-
It looks like project RRFLibraries is missing from your workspace.
-
Im getting these errors as i try to build RRFLibraries-dev. downloaded from dev branch
16:21:07 **** Incremental Build of configuration SAM4E_RTOS for project RRFLibraries-dev ****
make all
Building file: ../src/RTOSIface/RTOSIface.cpp
Invoking: Cross G++ Compiler
arm-none-eabi-g++ -std=gnu++17 -D__SAM4E8E__ -DRTOS -O3 -Wall -c -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=RTOSIface.s" -MMD -MP -MF"src/RTOSIface/RTOSIface.d" -MT"src/RTOSIface/RTOSIface.o" -o "src/RTOSIface/RTOSIface.o" "../src/RTOSIface/RTOSIface.cpp"
In file included from ../src/RTOSIface/RTOSIface.cpp:8:
../src/RTOSIface/RTOSIface.h:19:11: fatal error: FreeRTOS.h: No such file or directoryinclude "FreeRTOS.h"
^~~~~~~~~~~~
compilation terminated.
src/RTOSIface/subdir.mk:18: recipe for target 'src/RTOSIface/RTOSIface.o' failed
make: *** [src/RTOSIface/RTOSIface.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.16:21:08 Build Failed. 3 errors, 0 warnings. (took 266ms)
-
It sounds to me that you don't have all the projects you downloaded in the same Eclipse workspace.
-
I have the following files in the workspace:
RepRapFirmware: dev- Duet2_RTOS build config
CoreNG: dev- SAM3X8E build config
FreeRTOS: main - SAM4E build config
RRFLibraries: dev- SAM4E_RTOS build config
DuetWiFiSocketServer: dev -Release build configi was only able to successfully build CoreNG and FreeRTOS, other three fail to build.
-
Remove the -dev suffix from the project names in your Eclipse workspace.
-
Changed the manes of all projects, and I was able to build CoreNG, FreeRTOS and RRFLibraries. While building DuetWifiSocketServer ( release config) i am getting the following errors. The Readme file in your repo suggests adding XtensaGccPath. how do i find this on my system or do i have to download and add this seperately?
13:34:23 **** Incremental Build of configuration Release for project DuetWiFiSocketServer ****
make -j8 all
Building file: ../src/Connection.cpp
Building file: ../src/HSPI.cpp
Building file: ../src/Listener.cpp
Invoking: Cross G++ Compiler
xtensa-lx106-elf-g++ -std=gnu++11 -D__ets__ -DICACHE_FLASH -DF_CPU=80000000L -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=10606 -DLWIP_OPEN_SRC -Os -Wall -c -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -ffunction-sections -fdata-sections "-Wa,-ahl=Connection.s" -MMD -MP -MF"src/Connection.d" -MT"src/Connection.o" -o "src/Connection.o" "../src/Connection.cpp"
Invoking: Cross G++ Compiler
Invoking: Cross G++ Compiler
xtensa-lx106-elf-g++ -std=gnu++11 -D__ets__ -DICACHE_FLASH -DF_CPU=80000000L -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=10606 -DLWIP_OPEN_SRC -Os -Wall -c -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -ffunction-sections -fdata-sections "-Wa,-ahl=HSPI.s" -MMD -MP -MF"src/HSPI.d" -MT"src/HSPI.o" -o "src/HSPI.o" "../src/HSPI.cpp"
xtensa-lx106-elf-g++ -std=gnu++11 -D__ets__ -DICACHE_FLASH -DF_CPU=80000000L -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=10606 -DLWIP_OPEN_SRC -Os -Wall -c -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -ffunction-sections -fdata-sections "-Wa,-ahl=Listener.s" -MMD -MP -MF"src/Listener.d" -MT"src/Listener.o" -o "src/Listener.o" "../src/Listener.cpp"
c:/program files/gnu arm eclipse/build tools/2.6-201507152002/bin/sh: xtensa-lx106-elf-g++: not found
c:/program files/gnu arm eclipse/build tools/2.6-201507152002/bin/sh: xtensa-lx106-elf-g++: not found
src/subdir.mk:30: recipe for target 'src/Connection.o' failed
make: *** [src/Connection.o] Error 127
src/subdir.mk:30: recipe for target 'src/HSPI.o' failed
Building file: ../src/Misc.cpp
make: *** Waiting for unfinished jobs....
make: *** [src/HSPI.o] Error 127
c:/program files/gnu arm eclipse/build tools/2.6-201507152002/bin/sh: xtensa-lx106-elf-g++: not found
src/subdir.mk:30: recipe for target 'src/Listener.o' failed
make: *** [src/Listener.o] Error 127
Invoking: Cross G++ Compiler
xtensa-lx106-elf-g++ -std=gnu++11 -D__ets__ -DICACHE_FLASH -DF_CPU=80000000L -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=10606 -DLWIP_OPEN_SRC -Os -Wall -c -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -ffunction-sections -fdata-sections "-Wa,-ahl=Misc.s" -MMD -MP -MF"src/Misc.d" -MT"src/Misc.o" -o "src/Misc.o" "../src/Misc.cpp"
c:/program files/gnu arm eclipse/build tools/2.6-201507152002/bin/sh: xtensa-lx106-elf-g++: not found
src/subdir.mk:30: recipe for target 'src/Misc.o' failed
make: *** [src/Misc.o] Error 127
"make -j8 all" terminated with exit code 2. Build might be incomplete.13:34:23 Build Failed. 9 errors, 0 warnings. (took 285ms)
-
Probably the easiest way to install xtensa-gcc is to install a recent version of Arduino, then in Boards Manager install the ESP8266 add-on.
-
what path do i set for esp8266? i cannot locate the esp8266 folder in ...\arduino\hardware
I also downloaded esp8266 toolchain from http://gnutoolchains.com/esp8266/ which has xtensa-gcc because I coudnt locate the arduino path.
Im still getting the same errors as before for DuetWiFiSocketServer -
do i decided not to build the duetwifisocketserver project, but directly build reprapfirmware. i ended up avoiding most of the errors i was getting but now im stuck at this:
Finished building: ../src/ZProbeProgrammer.cpp
Finished building: ../src/RepRap.cpp
Finished building: ../src/Platform.cpp
Building target: Duet2CombinedFirmware.elf
Invoking: Cross G++ Linker
arm-none-eabi-gcc -L"C:\eclipse\Firmware\FreeRTOS\SAM4E" -L"C:\eclipse\Firmware\RRFLibraries\SAM4E_RTOS" -Os --specs=nano.specs -Wl,--gc-sections -Wl,--fatal-warnings -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -T"C:\eclipse\Firmware\CoreNG\variants\duetNG\linker_scripts\gcc\flash.ld" -Wl,-Map,"C:\eclipse\Firmware\RepRapFirmware\Duet2_RTOS/Duet2CombinedFirmware.map" -o "Duet2CombinedFirmware.elf" -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "C:\eclipse\Firmware/CoreNG/SAM4E8E_RTOS/cores/arduino/syscalls.o" ./src/Tools/Filament.o ./src/Tools/Tool.o ./src/Storage/CRC32.o ./src/Storage/FileInfoParser.o ./src/Storage/FileStore.o ./src/Storage/MassStorage.o ./src/ObjectModel/ObjectModel.o ./src/Networking/W5500Ethernet/Wiznet/Internet/DHCP/dhcp.o ./src/Networking/W5500Ethernet/Wiznet/Ethernet/W5500/w5500.o ./src/Networking/W5500Ethernet/Wiznet/Ethernet/WizSpi.o ./src/Networking/W5500Ethernet/Wiznet/Ethernet/socketlib.o ./src/Networking/W5500Ethernet/Wiznet/Ethernet/wizchip_conf.o ./src/Networking/W5500Ethernet/W5500Interface.o ./src/Networking/W5500Ethernet/W5500Socket.o ./src/Networking/ESP8266WiFi/WiFiInterface.o ./src/Networking/ESP8266WiFi/WiFiSocket.o ./src/Networking/ESP8266WiFi/WifiFirmwareUploader.o ./src/Networking/FirmwareUpdater.o ./src/Networking/FtpResponder.o ./src/Networking/HttpResponder.o ./src/Networking/Network.o ./src/Networking/NetworkBuffer.o ./src/Networking/NetworkResponder.o ./src/Networking/TelnetResponder.o ./src/Networking/UploadingNetworkResponder.o ./src/Movement/StepperDrivers/DriverMode.o ./src/Movement/StepperDrivers/TMC22xx.o ./src/Movement/StepperDrivers/TMC2660.o ./src/Movement/StepperDrivers/TMC51xx.o ./src/Movement/Kinematics/CoreKinematics.o ./src/Movement/Kinematics/HangprinterKinematics.o ./src/Movement/Kinematics/Kinematics.o ./src/Movement/Kinematics/LinearDeltaKinematics.o ./src/Movement/Kinematics/PolarKinematics.o ./src/Movement/Kinematics/RotaryDeltaKinematics.o ./src/Movement/Kinematics/ScaraKinematics.o ./src/Movement/Kinematics/ZLeadscrewKinematics.o ./src/Movement/BedProbing/Grid.o ./src/Movement/BedProbing/RandomProbePointSet.o ./src/Movement/DDA.o ./src/Movement/DDARing.o ./src/Movement/DriveMovement.o ./src/Movement/Move.o ./src/Movement/StepTimer.o ./src/Libraries/sha1/sha1.o ./src/Libraries/Fatfs/diskio.o ./src/Libraries/Fatfs/fattime_rtc.o ./src/Libraries/Fatfs/ff.o ./src/Libraries/Fatfs/ffunicode.o ./src/Heating/Sensors/CpuTemperatureSensor.o ./src/Heating/Sensors/CurrentLoopTemperatureSensor.o ./src/Heating/Sensors/DhtSensor.o ./src/Heating/Sensors/RtdSensor31865.o ./src/Heating/Sensors/SpiTemperatureSensor.o ./src/Heating/Sensors/TemperatureSensor.o ./src/Heating/Sensors/Thermistor.o ./src/Heating/Sensors/ThermocoupleSensor31855.o ./src/Heating/Sensors/ThermocoupleSensor31856.o ./src/Heating/Sensors/TmcDriverTemperatureSensor.o ./src/Heating/FOPDT.o ./src/Heating/Heat.o ./src/Heating/HeaterProtection.o ./src/Heating/Pid.o ./src/Heating/TemperatureError.o ./src/GCodes/GCodeBuffer.o ./src/GCodes/GCodeInput.o ./src/GCodes/GCodeMachineState.o ./src/GCodes/GCodeQueue.o ./src/GCodes/GCodes.o ./src/GCodes/GCodes2.o ./src/GCodes/GCodes3.o ./src/GCodes/RestorePoint.o ./src/FilamentMonitors/Duet3DFilamentMonitor.o ./src/FilamentMonitors/FilamentMonitor.o ./src/FilamentMonitors/LaserFilamentMonitor.o ./src/FilamentMonitors/PulsedFilamentMonitor.o ./src/FilamentMonitors/RotatingMagnetFilamentMonitor.o ./src/FilamentMonitors/SimpleFilamentMonitor.o ./src/Fans/DotStarLed.o ./src/Fans/Fan.o ./src/Fans/Tacho.o ./src/DuetNG/DueXn.o ./src/DuetNG/SX1509.o ./src/Display/ST7920/glcd11x14.o ./src/Display/ST7920/glcd7x11.o ./src/Display/ST7920/lcd7920.o ./src/Display/Display.o ./src/Display/Menu.o ./src/Display/MenuItem.o ./src/Display/RotaryEncoder.o ./src/CAN/CanInterface.o ./src/CAN/CanMessageBuffer.o ./src/CAN/CanSender.o ./src/DmacManager.o ./src/IoPorts.o ./src/Logger.o ./src/OutputMemory.o ./src/Platform.o ./src/PortControl.o ./src/PrintMonitor.o ./src/RepRap.o ./src/RepRapFirmware.o ./src/Roland.o ./src/Scanner.o ./src/SoftTimer.o ./src/Spindle.o ./src/Tasks.o ./src/ZProbe.o ./src/ZProbeProgrammer.o -lCoreNG -lFreeRTOS -lRRFLibraries -Wl,--end-group -lm
arm-none-eabi-gcc: error: C:\eclipse\Firmware/CoreNG/SAM4E8E_RTOS/cores/arduino/syscalls.o: No such file or directory
makefile:69: recipe for target 'Duet2CombinedFirmware.elf' failed
make: *** [Duet2CombinedFirmware.elf] Error 1
"make -j8 all" terminated with exit code 2. Build might be incomplete.13:09:44 Build Failed. 2 errors, 0 warnings. (took 13s.779ms)
I checked the path for syscalls.o and the file exists in the directory.
-
Are you sure you built the SAM4E_RTOS configuration of CoreNG?
-
Thanks for all the help! finally got a build running.
im writing a code to add a linear voltage pyrometer. i have written the code but now im getting the following error:Return without value, in function returning non-void GCodeBuffer.cpp /RepRapFirmware/src/GCodes line 501 Code Analysis Problem
-
That error is caused by Eclipse getting confused by 3 functions that are mistakenly declared with return type "const void" instead of just "void". The files compile correctly. You can avoid the error messages by changing the 3 instances of "const void" in each of GCodeBuffer.h and GCodeBuffer.cpp to just "void". That change will be included in my next commit.
-
Thanks for that correction. All projects build.
-
hey @dc42, I was able to use the custom firmware. I want to change the name( instead of 2.03beta3 (2019-03-25b6)) to something that i wont mix up with the original version. any suggestions on how i should do that?
-
The version text is defined in file Version.h.
-
Thanks a lot.