@parrs
This might make it a bit easier to read, just imbedded your code

config.g

; Configuration file for Duet 3 (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Thu Sep 10 2020 12:31:28 GMT-0600 (Mountain Daylight Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Duet3" ; sets printer name M453 ; sets CNC mode ; Drives M569 P0.0 S0 ; physical drive 0.0 goes reverse M569 P0.1 S1 ; physical drive 0.1 goes forwards M569 P0.2 S1 ; physical drive 0.2 goes forwards M569 P0.3 S0 ; physical drive 0.3 goes reverse M569 P0.4 S0 ; physical drive 0.4 goes reverse M569 P0.5 S1 ; physical drive 0.5 goes forwards M569 P1.0 S1 ; physical drive 1.0 goes forwards M569 P1.1 S1 ; physical drive 1.1 goes forwards M569 P1.2 S1 ; physical drive 1.2 goes forwards M569 P2.1 S1 ; physical drive 2.1 goes forwards M569 P2.2 S0 ; physical drive 2.2 goes forwards M584 X0.0 Y0.1:0.2 Z0.4 U0.3 V0.5 B2.2 E1.0 ; set drive mapping M350 X32 Y32 Z64 U32 V64 B32 E16 I1 ; configure microstepping with interpolation M92 X800.00 Y795.9565 Z1592.718 U800.0 V1592.718 B70 E1000 ; set steps per mm M566 X800.00 Y800.00 Z800.00 U800.00 V800.00 B1000.00 E8000.00 ; set maximum instantaneous speed changes (mm/min) M203 X3000.00 Y3000.00 Z3000.00 U3000 V3000 B30000.00 E10000.00 ; set maximum speeds (mm/min) M201 X200.00 Y200.00 Z200.00 U200.00 V200.00 B500.0 E250.00 ; set accelerations (mm/s^2) M906 X2000 Y2000 Z2000 U2000 V2000 B2000 E1800 I100 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X85 Y0 Z0 U0 V0 B-500000 S1 ; set axis minima M208 X677 Y810 Z187.6 U615 V200 B500000 S0 ; set axis maxima. z default with 5/8 spoil board 190. ; Endstops M574 X2 S1 P"!io0.in" ; configure active-high endstop for low end on X via pin io0.in M574 Y1 S1 P"!io1.in+!io2.in" ; configure active-high endstop for low end on Y via pin io1.in M574 Z2 S1 P"!io4.in" ; configure active-high endstop for high end on Z via pin io2.in M574 U1 S1 P"!io3.in" ; configure active-high endstop for high end on U via pin io2.in M574 V2 S1 P"!io5.in" ; configure active-high endstop for high end on V via pin io2.in ; Z-Probe M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed M557 X15:215 Y15:195 S20 ; define mesh grid ; Heaters //M308 S0 P"temp0" Y"pt1000" R2200 ; configure sensor 0 as PT1000 on pin temp0 //M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0 //M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit //M140 H0 ; map heated bed to heater 0 //M143 H0 S120 ; set temperature limit for heater 0 to 120C //M308 S1 P"1.temp2" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin 1.temp2 //M950 H1 C"!out1" T1 ; create nozzle heater output on !out1 and map it to sensor 1 //M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit ; Fans //M950 F0 C"!out4" Q500 ; create fan 0 on pin !out4 and set its frequency //M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off //M950 F1 C"!out3" Q500 ; create fan 1 on pin !out3 and set its frequency //M106 P1 S1 H-1 ; set fan 1 value. Thermostatic control is turned off ; Tools M563 P0 S"Extruder" D0 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C M563 P1 S"Mill" F0 ;X3 ; define tool 1 (U axis mapped to X axis) G10 P1 X0 Y0 Z0 ; set tool 1 axis offsets G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C ;Spindle M453 S0 C"out9" R12000 T1 F100 ; creates spindle S0 sets PWM out to pin 9 ;Original code above ;//M563 P1 S"Mill" D1 F0 ; define tool 1 ;//G10 P1 X0 Y0 Z0 ; set tool 1 axis offsets ;//G10 P1 R0 S0 ; Custom settings are not defined ; Miscellaneous M501 ; load saved parameters from non-volatile memory

homeall.g

; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Thu Sep 10 2020 12:31:28 GMT-0600 (Mountain Daylight Time) T0 M116 G91 ; relative positioning G1 H1 Z200 F1200 ; move Z up stopping at the endstop G1 H1 V200 F1200 ; move V up stopping at the endstop G1 H2 Z-10 V-10 F6000 ; go back a few mm G92 Z187.6 V195 ; set Z and V position to axis minimum (you may want to adjust this) G1 H2 Z5 V5 F6000 ; lift Z and V relative to current position G1 H1 X+705 Y-816 U-705 F1800 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X-5 Y5 U5 F6000 ; go back a few mm G1 H1 X+705 Y-816 U-705 F360 ; move slowly to X and Y axis endstops once more (second pass) G90 ; absolute positioning G92 B0 ; Set position - B axis (rotary) to 0 ;T0 ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning

tfree0.g

; Operations to be done before switching from T0 to T1 (EXTRUDER TO MILL) ;TOOL ZERO MOVEMENTS (EXTRUDER) G90 ;ABSOLUTE COORDINATES G1 Z185 ;LIFT Z TO PARK LOCATION G1 X675 ;MOVE X TO PARK LOCATION (FAR RIGHT OF MACHINE)

tfree1.g

;Operations to be done before switching from T1 to T0 ;DO THESE NEED TO BE X AND Z VALUES OR U AND V?????????????????? G90 ;ABSOLUTE MOVEMENTS G1 Z185 ;LIFT T1 G1 X0 ;MOVE T1 TO PARK POSITION (LEFT SIDE OF MACHINE) ;THESE VALUES NEED TO MATCH TPRE1.G PARK VALUES AS THE MACHINE OVERWRITES TOOL LOCATION WHEN SWITCHING. NEEDS TO KNOW WHERE IT IS

tpre0.g

;Operations/configurations to be set when T0 selected - NOTE THIS OVERRIDES THE CONFIG.G PARAMETERS AFTER SWITCHING TOOLS ;NOTE: ENDSTOPS HAVE NOT BEEN RECONFIGURED FROM CONFIG.G - MAY NEED TO BE ;M451 ;SET TO FFF PRINT MODE M584 X0.0 Z0.4 U0.3 V0.5 ;SET DRIVE MAPPING (EXT NOW CONTROLLED BY X AND Z COMMANDS) - REMAP T1 TO U&V M350 X32 Z64 ;SET MICROSTEPPING M92 X800 Z1592.718 ;SET STEPS/MM (VALUE NEEDED FOR MILL Z AXIS - REMEMBER MILL AND EXTRUDER MAY BE DIFFERENT) **UPDATE** M566 X800 Z800 ;SET INSTANTANEOUS SPEED CHANGES (MM/MIN) M203 X3000 Z3000 ;SET MAXIMUM SPEEDS (MM/MIN) M201 X200 Z200 ;SET ACCELERATION (MM/S^2) M208 X85 S1 ;SETS AXIS MINIMUM (MAKE IT SO IT WONT COLLIDE WITH MILL) S1 DENOTES MIN WHERE S0 OR BLANK DENOTES MAX M208 X677 G92 X675 Z185 ;SET POSITION - SET TO MATCH PARK VALUES (TFREE0.G) SO SOFTWARE KNOWS WHERE TOOL IS AFTER SWITCHING

tpre1.g

;Operations/configurations to be set when T1 selected - NOTE THIS OVERRIDES THE CONFIG.G PARAMETERS AFTER SWITCHING TOOLS ;NOTE: ENDSTOPS HAVE NOT BEEN RECONFIGURED FROM CONFIG.G - MAY NEED TO BE M453 ;SET TO CNC MODE M584 X0.3 Z0.5 ;SET DRIVE MAPPING (MILL NOW CONTROLLED BY X AND Z COMMANDS) M350 X32 Z64 ;SET MICROSTEPPING M92 X800 Z1592.718 ;SET STEPS/MM (VALUE NEEDED FOR MILL Z AXIS - REMEMBER MILL AND EXTRUDER MAY BE DIFFERENT) M566 X800 Z800 ;SET INSTANTANEOUS SPEED CHANGES (MM/MIN) M203 X3000 Z3000 ;SET MAXIMUM SPEEDS (MM/MIN) M201 X200 Z200 ;SET ACCELERATION (MM/S^2) M208 X0 S1 ;SETS AXIS MINIMUM (S1 DENOTES MINIMUM WHERE S0 OR BLANK DENOTES MAX) M208 X615 ;SETS AXIS MAXIMUM (ENSURE CLEARANCE IS MAINTAINED IN RESPECT TO T0 IN PARK LOCATION) G92 X0 Z185 ;SET POSITION - SET TO MATCH PARK VALUES (TFREE1.G) SO SOFTWARE KNOWS WHERE TOOL IS AFTER SWITCHING