Problem building Firmware for DUET Wifi



  • Hello,

    I'm still struggling to build the firmware. I try to follow the instructions. I can successfully build CoreNG, FreeRTOS and RRFLibraries. After having built all those I get stuck building RepRapFirmware (Duet2_RTOS) with the first error saying:

    Invoking: Cross G++ Compiler
    arm-none-eabi-g++ -D__SAM4E8E__ -DRTOS -DDUET_NG -D_XOPEN_SOURCE -I"C:\Eclipse\Firmware\CoreNG\cores\arduino" -I"C:\Eclipse\Firmware\CoreNG\libraries\Flash" -I"C:\Eclipse\Firmware\CoreNG\libraries\SharedSpi" -I"C:\Eclipse\Firmware\CoreNG\libraries\Storage" -I"C:\Eclipse\Firmware\CoreNG\libraries\Wire" -I"C:\Eclipse\Firmware\CoreNG\asf" -I"C:\Eclipse\Firmware\CoreNG\asf\common\utils" -I"C:\Eclipse\Firmware\CoreNG\asf\common\services\clock" -I"C:\Eclipse\Firmware\CoreNG\asf\common\services\ioport" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\drivers" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\services\flash_efc" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\utils" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\utils\cmsis\sam4e\include" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\utils\header_files" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\utils\preprocessor" -I"C:\Eclipse\Firmware\CoreNG\asf\thirdparty\CMSIS\Include" -I"C:\Eclipse\Firmware\CoreNG\variants\duetNG" -I"C:\Eclipse\Firmware\RepRapFirmware\src" -I"C:\Eclipse\Firmware\RepRapFirmware\src\DuetNG" -I"C:\Eclipse\Firmware\RepRapFirmware\src\Networking" -I"C:\Eclipse\Firmware\DuetWiFiSocketServer\src\include" -I"C:\Eclipse\Firmware\FreeRTOS\src\include" -I"C:\Eclipse\Firmware\FreeRTOS\src\portable\GCC\ARM_CM4F" -I"C:\Eclipse\Firmware\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=DriverMode.s" -MMD -MP -MF"src/Movement/StepperDrivers/DriverMode.d" -MT"src/Movement/StepperDrivers/DriverMode.o" -o "src/Movement/StepperDrivers/DriverMode.o" "../src/Movement/StepperDrivers/DriverMode.cpp"
    In file included from ../src/Networking/ESP8266WiFi/WiFiSocket.cpp:10:0:
    ../src/Networking/ESP8266WiFi/WiFiInterface.h:131:22: error: 'NumWiFiTcpSockets' was not declared in this scope
    WiFiSocket *sockets[NumWiFiTcpSockets];
    ^~~~~~~~~~~~~~~~~

    Any help is greatly appreciated!


  • administrators

    Looks like you haven't added project DuetWiFiSocketServer to your workspace, or you have the wrong version. File MessageFormats.h from that project supplies that definition.



  • Thanks, I was indeed on master with the DuetWiFiSocketServer. With dev it resolved this problem (now having some linking problems). Just to be sure I'm using the following branches:

    CoreNG: master
    FreeRTOS: master
    RRFLibraries: master
    DuetWiFiSocketServer: dev
    RepRapFirmware: v2-dev


  • administrators

    Yes that's correct.



  • Finally I could build the firmware. However my repositories were pretty messy by playing around so much. Therefore I decided to build fresh with all the right versions. Unfortunately now I'm hitting a wall with:

    Building file: ../src/FilamentMonitors/LaserFilamentMonitor.cpp
    ../src/GCodes/GCodes.cpp: In member function 'void GCodes::Init()':
    ../src/GCodes/GCodes.cpp:190:20: error: 'class UARTClass' has no member named 'SetInterruptCallback'; did you mean 'setInterruptPriority'?
    SERIAL_AUX_DEVICE.SetInterruptCallback(GCodes::CommandEmergencyStop);
    ^~~~~~~~~~~~~~~~~~~~
    setInterruptPriority

    I would prefer not to go around and first build the wrong branches to get it running again...


  • administrators

    Check out the latest CoreNG source code. That definition is in a file that I committed yesterday. I also committed more changes to RepRapFirmware and FreeRTOS.



  • Thanks, now it is building again! 🙂

    My findings during the build process for the Duet Wifi were:

    1. Getting the right branches (and matching versions):

    CoreNG: master
    FreeRTOS: master
    RRFLibraries: master
    DuetWiFiSocketServer: dev
    RepRapFirmware: v2-dev

    additionally I needed (not mentioned in the howto):
    CoreESP8266: dev

    1. For the DuetWifiSocketServer and the CoreESP8266 I needed the xtensa-lx106-elf-gcc cross-compiler. I found in a project file that you used one that came with an Arduino package. So I also installed the Arduino Package ESP8266 which provided the corresponding compiler and set the paths correspondingly.

    2. I needed to manually add some paths when files could not be found.

    Maybe this info is useful for someone trying to do the same.



  • @mwinterm would you be able to provide a link for the xtensa-lx106-elf-gcc cross-compiler? This is the only remaining issue I cannot seem to solve and I have tried downloading from several sources but they do not seem to work. It would really appreciate if you could provide some information on this.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.