Building Firmware on MacOS for Duet 0.8.5



  • So I've been following the instructions for building the firmware from the Duet3D GitHub location. I've got everything installed, and it appears CoreNG, RRFLibraries, FreeRTOS all build, but I keep getting this error trying to generate RepRapFirmware for the Duet0.8.5

    Building target: RepRapFirmware.elf
    Invoking: Cross G++ Linker
    arm-none-eabi-gcc -L"/Users/pdbeal/git/CoreNG/SAM3X8E" -L"/Users/pdbeal/git/CoreNG/SAM3X8E" -L"/Users/pdbeal/git/RRFLibraries/SAM3X" -Os -Wl,--gc-sections -Wl,--fatal-warnings -mcpu=cortex-m3 -T"/Users/pdbeal/git/CoreNG/variants/duet/linker_scripts/gcc/flash.ld" -Wl,-Map,"/Users/pdbeal/git/RepRapFirmware/Duet085/RepRapFirmware.map" -o "RepRapFirmware.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 "/Users/pdbeal/eclipse-workspace/CoreNG/SAM3X8E/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/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/Hardware/Cache.o ./src/Hardware/DmacManager.o ./src/Hardware/I2C.o ./src/Hardware/IoPorts.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/Duet/MCP4461/MCP4461.o  ./src/Duet/Lwip/lwip/src/netif/ppp/auth.o ./src/Duet/Lwip/lwip/src/netif/ppp/chap.o ./src/Duet/Lwip/lwip/src/netif/ppp/chpms.o ./src/Duet/Lwip/lwip/src/netif/ppp/fsm.o ./src/Duet/Lwip/lwip/src/netif/ppp/ipcp.o ./src/Duet/Lwip/lwip/src/netif/ppp/lcp.o ./src/Duet/Lwip/lwip/src/netif/ppp/magic.o ./src/Duet/Lwip/lwip/src/netif/ppp/md5.o ./src/Duet/Lwip/lwip/src/netif/ppp/pap.o ./src/Duet/Lwip/lwip/src/netif/ppp/ppp.o ./src/Duet/Lwip/lwip/src/netif/ppp/ppp_oe.o ./src/Duet/Lwip/lwip/src/netif/ppp/randm.o ./src/Duet/Lwip/lwip/src/netif/ppp/vj.o  ./src/Duet/Lwip/lwip/src/netif/etharp.o ./src/Duet/Lwip/lwip/src/netif/ethernetif.o ./src/Duet/Lwip/lwip/src/netif/slipif.o  ./src/Duet/Lwip/lwip/src/core/snmp/asn1_dec.o ./src/Duet/Lwip/lwip/src/core/snmp/asn1_enc.o ./src/Duet/Lwip/lwip/src/core/snmp/mib2.o ./src/Duet/Lwip/lwip/src/core/snmp/mib_structs.o ./src/Duet/Lwip/lwip/src/core/snmp/msg_in.o ./src/Duet/Lwip/lwip/src/core/snmp/msg_out.o  ./src/Duet/Lwip/lwip/src/core/ipv4/autoip.o ./src/Duet/Lwip/lwip/src/core/ipv4/icmp.o ./src/Duet/Lwip/lwip/src/core/ipv4/igmp.o ./src/Duet/Lwip/lwip/src/core/ipv4/inet.o ./src/Duet/Lwip/lwip/src/core/ipv4/inet_chksum.o ./src/Duet/Lwip/lwip/src/core/ipv4/ip.o ./src/Duet/Lwip/lwip/src/core/ipv4/ip_addr.o ./src/Duet/Lwip/lwip/src/core/ipv4/ip_frag.o  ./src/Duet/Lwip/lwip/src/core/def.o ./src/Duet/Lwip/lwip/src/core/dhcp.o ./src/Duet/Lwip/lwip/src/core/dns.o ./src/Duet/Lwip/lwip/src/core/lwip_init.o ./src/Duet/Lwip/lwip/src/core/lwip_timers_141.o ./src/Duet/Lwip/lwip/src/core/mem.o ./src/Duet/Lwip/lwip/src/core/memp.o ./src/Duet/Lwip/lwip/src/core/netif.o ./src/Duet/Lwip/lwip/src/core/pbuf.o ./src/Duet/Lwip/lwip/src/core/raw.o ./src/Duet/Lwip/lwip/src/core/stats.o ./src/Duet/Lwip/lwip/src/core/sys.o ./src/Duet/Lwip/lwip/src/core/tcp.o ./src/Duet/Lwip/lwip/src/core/tcp_in.o ./src/Duet/Lwip/lwip/src/core/tcp_out.o ./src/Duet/Lwip/lwip/src/core/udp.o  ./src/Duet/Lwip/lwip/src/api/api_lib.o ./src/Duet/Lwip/lwip/src/api/api_msg.o ./src/Duet/Lwip/lwip/src/api/err.o ./src/Duet/Lwip/lwip/src/api/netbuf.o ./src/Duet/Lwip/lwip/src/api/netdb.o ./src/Duet/Lwip/lwip/src/api/netifapi.o ./src/Duet/Lwip/lwip/src/api/sockets.o ./src/Duet/Lwip/lwip/src/api/tcpip.o  ./src/Duet/Lwip/contrib/apps/netbios/netbios.o  ./src/Duet/Lwip/contrib/apps/mdns/mdns_responder.o  ./src/Duet/EMAC/ethernet_phy.o ./src/Duet/EMAC/ethernet_sam.o ./src/Duet/EMAC/ethernetif.o  ./src/Duet/ConnectionState.o ./src/Duet/Network.o ./src/Duet/NetworkTransaction.o ./src/Duet/Webserver.o  ./src/CAN/CanInterface.o ./src/CAN/CanMessageBuffer.o ./src/CAN/CanSender.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 -lCoreNG -lRRFLibraries -Wl,--end-group -lm
    arm-none-eabi-gcc: error: /Users/pdbeal/eclipse-workspace/CoreNG/SAM3X8E/cores/arduino/syscalls.o: No such file or directory
    make: *** [RepRapFirmware.elf] Error 1
    "make -j3 all" terminated with exit code 2. Build might be incomplete.
    
    22:21:00 Build Failed. 1 errors, 3 warnings. (took 35s.679ms)
    

    I can indeed see that the file in question does not exist, but not sure why its not being build when I build CoreNG?

    This is what I see after building CoreNG

    Building target: libCoreNG.a
    Invoking: Cross GCC Archiver
    arm-none-eabi-ar -r  "libCoreNG.a"  ./variants/duet/exceptions.o ./variants/duet/startup_sam3x.o ./variants/duet/system_sam3x.o ./variants/duet/variant.o  ./libraries/Wire/Wire.o  ./libraries/Storage/ctrl_access.o ./libraries/Storage/sd_mmc.o ./libraries/Storage/sd_mmc_mem.o ./libraries/Storage/sd_mmc_spi.o  ./libraries/SharedSpi/SharedSpi.o  ./libraries/Flash/DueFlashStorage.o  ./cores/arduino/USB/USBSerial.o  ./cores/arduino/AnalogIn.o ./cores/arduino/AnalogOut.o ./cores/arduino/Print.o ./cores/arduino/Reset.o ./cores/arduino/RingBuffer.o ./cores/arduino/Stream.o ./cores/arduino/UARTClass.o ./cores/arduino/USARTClass.o ./cores/arduino/WInterrupts.o ./cores/arduino/WMath.o ./cores/arduino/abi.o ./cores/arduino/hooks.o ./cores/arduino/itoa.o ./cores/arduino/new.o ./cores/arduino/syscalls.o ./cores/arduino/watchdog.o ./cores/arduino/wiring.o ./cores/arduino/wiring_digital.o ./cores/arduino/wiring_shift.o  ./asf/sam/services/flash_efc/flash_efc.o  ./asf/sam/drivers/wdt/wdt.o  ./asf/sam/drivers/usart/usart.o  ./asf/sam/drivers/uotghs/uotghs_device.o  ./asf/sam/drivers/uart/uart.o  ./asf/sam/drivers/twi/twi.o  ./asf/sam/drivers/trng/trng.o  ./asf/sam/drivers/tc/tc.o  ./asf/sam/drivers/supc/supc.o  ./asf/sam/drivers/spi/spi.o  ./asf/sam/drivers/rstc/rstc.o  ./asf/sam/drivers/pwm/pwm.o  ./asf/sam/drivers/pmc/pmc.o ./asf/sam/drivers/pmc/sleep.o  ./asf/sam/drivers/pio/pio.o  ./asf/sam/drivers/pdc/pdc.o  ./asf/sam/drivers/matrix/matrix.o  ./asf/sam/drivers/hsmci/hsmci.o  ./asf/sam/drivers/gpbr/gpbr.o  ./asf/sam/drivers/emac/emac.o  ./asf/sam/drivers/efc/efc.o  ./asf/sam/drivers/dmac/dmac.o  ./asf/sam/drivers/dacc/dacc.o  ./asf/sam/drivers/chipid/chipid.o  ./asf/sam/drivers/adc/adc.o  ./asf/common/utils/interrupt/interrupt_sam_nvic.o  ./asf/common/services/usb/udc/udc.o  ./asf/common/services/usb/class/cdc/device/udi_cdc.o ./asf/common/services/usb/class/cdc/device/udi_cdc_desc.o  ./asf/common/services/sleepmgr/sam/sleepmgr.o  ./asf/common/services/clock/sam3x/sysclk.o   
    arm-none-eabi-ar: creating libCoreNG.a
    Finished building target: libCoreNG.a
     
    
    22:14:16 Build Finished. 0 errors, 0 warnings. (took 7s.858ms)
    


  • did you clean rrf after building freertos, coreng etc?


  • administrators

    @PDBeal said in Building Firmware on MacOS for Duet 0.8.5:

    arm-none-eabi-gcc -L"/Users/pdbeal/git/CoreNG/SAM3X8E" -L"/Users/pdbeal/git/CoreNG/SAM3X8E" ...
    -Wl,--start-group "/Users/pdbeal/eclipse-workspace/CoreNG/SAM3X8E/cores/arduino/syscalls.o"

    You appear to be referring to the CoreNG project in two different Eclipse workspaces.



  • Well, that was it. I never noticed that. What's strange was I told Eclipse to use /Users/pdbeal/eclipse-workspace/ as the workspace, but then when it added all the git repositories it put them in /Users/pdbeal/git/.

    Changing my Eclipse Workspace to /Users/pdbeal/git/ and re-imported all the git repos, solved that issue and it all compiled.

    One thing I've noticed is my RepRapFirmware.bin file is a little smaller than the one from your github repo for 1.26.1.

    398620 - mine
    409648 - github repo


  • administrators

    @PDBeal said in Building Firmware on MacOS for Duet 0.8.5:

    One thing I've noticed is my RepRapFirmware.bin file is a little smaller than the one from your github repo for 1.26.1.

    That's probably caused by using different versions of gcc and the C libraries.


Log in to reply