3.4 version compilation issues
-
I am trying to build the firmware from source but I am getting the following error
17:02:55 **** Incremental Build of configuration Duet2 for project RepRapFirmware **** make -j8 all Building file: ../src/Platform/Platform.cpp Invoking: Cross G++ Compiler arm-none-eabi-g++ -std=gnu++17 -D__SAM4E8E__ -DRTOS -DDUET_NG -D_XOPEN_SOURCE -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\SAM4S_4E_E70" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\SAM4S_4E_E70\SAM4E" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\SAM4S_4E_E70\asf\common\utils" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\arm\CMSIS\5.4.0\CMSIS\Core\Include" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\SAM4S_4E_E70\asf\sam\utils\cmsis\sam4e\include" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\SAM4S_4E_E70\asf" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\SAM4S_4E_E70\asf\sam\utils" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\SAM4S_4E_E70\asf\sam\utils\preprocessor" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\SAM4S_4E_E70\asf\sam\utils\header_files" -I"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\src\SAM4S_4E_E70\asf\sam\drivers" -I"C:\Users\Ashley\Documents\GitHub\Modified\RepRapFirmware\src" -I"C:\Users\Ashley\Documents\GitHub\Modified\RepRapFirmware\src\Hardware\SAM4E" -I"C:\Users\Ashley\Documents\GitHub\Modified\RepRapFirmware\src\DuetNG" -I"C:\Users\Ashley\Documents\GitHub\Modified\RepRapFirmware\src\Networking" -I"C:\Users\Ashley\Documents\GitHub\Modified\DuetWiFiSocketServer\src\include" -I"C:\Users\Ashley\Documents\GitHub\Modified\FreeRTOS\src\include" -I"C:\Users\Ashley\Documents\GitHub\Modified\FreeRTOS\src\portable\GCC\ARM_CM4F" -I"C:\Users\Ashley\Documents\GitHub\Modified\RRFLibraries\src" -Os -Wall -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fexceptions -nostdlib -Wundef -Wdouble-promotion -Werror=return-type -Wsuggest-override -fsingle-precision-constant "-Wa,-ahl=Platform.s" -fstack-usage -MMD -MP -MF"src/Platform/Platform.d" -MT"src/Platform/Platform.o" -o "src/Platform/Platform.o" "../src/Platform/Platform.cpp" Finished building: ../src/Platform/Platform.cpp Building target: Duet2CombinedFirmware.elf Invoking: Cross G++ Linker arm-none-eabi-gcc -L"C:\Users\Ashley\Documents\GitHub\Modified\CoreN2G\SAM4E_SDHC_USB_RTOS" -L"C:\Users\Ashley\Documents\GitHub\Modified\RRFLibraries\SAM4E_RTOS" -L"C:\Users\Ashley\Documents\GitHub\Modified\FreeRTOS\SAM4E" --specs=nosys.specs -Os -Wl,--gc-sections -Wl,--fatal-warnings -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -T"C:\Users\Ashley\Documents\GitHub\Modified\RepRapFirmware\src\Hardware\SAM4E\sam4e8e_flash.ld" -Wl,-Map,"C:\Users\Ashley\Documents\GitHub\Modified\RepRapFirmware\Duet2/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 ./src/libcpp/eh_alloc.o ./src/libcpp/vterminate.o ./src/libc/memcmp.o ./src/libc/memcpy.o ./src/libc/memmove.o ./src/libc/memset.o ./src/libc/nano-mallocr.o ./src/libc/strptime.o ./src/bossa/Applet.o ./src/bossa/BossaFlash.o ./src/bossa/Device.o ./src/bossa/EefcFlash.o ./src/bossa/Flasher.o ./src/bossa/Samba.o ./src/bossa/WordCopyApplet.o ./src/bossa/WordCopyArm.o ./src/Tools/Filament.o ./src/Tools/Spindle.o ./src/Tools/Tool.o ./src/Storage/CRC16.o ./src/Storage/CRC32.o ./src/Storage/EmbeddedFiles.o ./src/Storage/FileInfoParser.o ./src/Storage/FileStore.o ./src/Storage/MassStorage.o ./src/PrintMonitor/PrintMonitor.o ./src/Platform/Heap.o ./src/Platform/Logger.o ./src/Platform/OutputMemory.o ./src/Platform/Platform.o ./src/Platform/PortControl.o ./src/Platform/RepRap.o ./src/Platform/Roland.o ./src/Platform/Scanner.o ./src/Platform/Tasks.o ./src/ObjectModel/GlobalVariables.o ./src/ObjectModel/ObjectModel.o ./src/ObjectModel/Variable.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/MdnsResponder.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/FtpResponder.o ./src/Networking/HttpResponder.o ./src/Networking/Network.o ./src/Networking/NetworkBuffer.o ./src/Networking/NetworkInterface.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/FiveBarScaraKinematics.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/RoundBedKinematics.o ./src/Movement/Kinematics/ScaraKinematics.o ./src/Movement/Kinematics/ZLeadscrewKinematics.o ./src/Movement/HeightControl/HeightController.o ./src/Movement/BedProbing/Grid.o ./src/Movement/BedProbing/RandomProbePointSet.o ./src/Movement/AxisShaper.o ./src/Movement/DDA.o ./src/Movement/DDARing.o ./src/Movement/DriveMovement.o ./src/Movement/ExtruderShaper.o ./src/Movement/Move.o ./src/Movement/MoveSegment.o ./src/Movement/RawMove.o ./src/Movement/StepTimer.o ./src/Libraries/sha1/sha1.o ./src/Libraries/sd_mmc/ctrl_access.o ./src/Libraries/sd_mmc/sd_mmc.o ./src/Libraries/sd_mmc/sd_mmc_mem.o ./src/Libraries/sd_mmc/sd_mmc_spi.o ./src/Libraries/Fatfs/diskio.o ./src/Libraries/Fatfs/fattime_rtc.o ./src/Libraries/Fatfs/ff.o ./src/Libraries/Fatfs/ffunicode.o ./src/InputMonitors/InputMonitor.o ./src/Heating/Sensors/AdditionalOutputSensor.o ./src/Heating/Sensors/CpuTemperatureSensor.o ./src/Heating/Sensors/CurrentLoopTemperatureSensor.o ./src/Heating/Sensors/DhtSensor.o ./src/Heating/Sensors/LinearAnalogSensor.o ./src/Heating/Sensors/RemoteSensor.o ./src/Heating/Sensors/RtdSensor31865.o ./src/Heating/Sensors/SensorWithPort.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/Heater.o ./src/Heating/HeaterMonitor.o ./src/Heating/LocalHeater.o ./src/Heating/RemoteHeater.o ./src/Heating/TemperatureError.o ./src/Hardware/SharedSpi/SharedSpiClient.o ./src/Hardware/SharedSpi/SharedSpiDevice.o ./src/Hardware/SAM4E/Devices.o ./src/Hardware/SAM4E/Main.o ./src/Hardware/ExceptionHandlers.o ./src/Hardware/I2C.o ./src/Hardware/IoPorts.o ./src/Hardware/NonVolatileMemory.o ./src/Hardware/SoftwareReset.o ./src/GPIO/GpInPort.o ./src/GPIO/GpOutPort.o ./src/GCodes/GCodeBuffer/BinaryParser.o ./src/GCodes/GCodeBuffer/ExpressionParser.o ./src/GCodes/GCodeBuffer/GCodeBuffer.o ./src/GCodes/GCodeBuffer/StringParser.o ./src/GCodes/GCodeException.o ./src/GCodes/GCodeFileInfo.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/GCodes4.o ./src/GCodes/ObjectTracker.o ./src/GCodes/RestorePoint.o ./src/GCodes/StraightProbeSettings.o ./src/GCodes/Trigger.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/Fan.o ./src/Fans/FansManager.o ./src/Fans/LedStripDriver.o ./src/Fans/LocalFan.o ./src/Fans/RemoteFan.o ./src/Endstops/Endstop.o ./src/Endstops/EndstopsManager.o ./src/Endstops/LocalZProbe.o ./src/Endstops/RemoteZProbe.o ./src/Endstops/StallDetectionEndstop.o ./src/Endstops/SwitchEndstop.o ./src/Endstops/ZProbe.o ./src/Endstops/ZProbeEndstop.o ./src/DuetNG/DueXn.o ./src/DuetNG/Pins_DuetNG.o ./src/DuetNG/SX1509.o ./src/Display/Lcd/ST7920/Lcd7920.o ./src/Display/Lcd/ST7567/Lcd7567.o ./src/Display/Lcd/Fonts/glcd11x14.o ./src/Display/Lcd/Fonts/glcd7x11.o ./src/Display/Lcd/Lcd.o ./src/Display/Display.o ./src/Display/Menu.o ./src/Display/MenuItem.o ./src/Display/RotaryEncoder.o ./src/Comms/AuxDevice.o ./src/Comms/FirmwareUpdater.o ./src/Comms/PanelDueUpdater.o ./src/ClosedLoop/ClosedLoop.o ./src/CAN/CanInterface.o ./src/CAN/CanMessageGenericConstructor.o ./src/CAN/CanMotion.o ./src/CAN/CommandProcessor.o ./src/CAN/ExpansionManager.o ./src/Accelerometers/Accelerometers.o ./src/Accelerometers/LIS3DH.o ./src/RepRapFirmware.o -lCoreN2G -lRRFLibraries -lFreeRTOS -lsupc++ -Wl,--end-group -lm c:/program files (x86)/gnu tools arm embedded/7 2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: Duet2CombinedFirmware.elf section `.ARM.exidx' will not fit in region `rom' c:/program files (x86)/gnu tools arm embedded/7 2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `rom' overflowed by 3880 bytes collect2.exe: error: ld returned 1 exit status makefile:94: recipe for target 'Duet2CombinedFirmware.elf' failed make: *** [Duet2CombinedFirmware.elf] Error 1 17:02:58 Build Failed. 4 errors, 0 warnings. (took 2s.980ms)
This only happens when the build configuration of RepRapFirmware is Duet2. It complies just fine if the build configuration is Duet2_SBC. Furthermore, the wiki says to use CoreN2G for version 3.4 but later says to use SAM4E8E configuration. However CoreN2G does not have SAM4E8E configuration but CoreNG does. This is how my working directory looks like :
How can I build version 3.4?
-
@jazbaatbadalgaye you definitely need CoreN2G for RRF 3.4. I was recently able to build 3.4 dev but am away from my home computer right now so you'll need to wait until later tonight for me to fill you in on details, unless someone else steps in.
The error message says the bin file is too big to fit the processor used. Is this a build with your changes added, or is it an attempt to build RRF3.4-dev from the tip of the repo?
-
@jazbaatbadalgaye you must use CoreN2G not CoreNG. The build configuration of CoreN2G needed by RRF is SAM4E_SDHC_USB_RTOS.
The current RRF 3.4-dev build for Duet 2 produces a binary that is only 2656 bytes smaller than the flash memory size available. Therefore, if you add more than a small amount of additional code, or you use a different compiler version that generates less compact code, then the binary will be too large and the linker will produce that error message.