You are using an2560 with a Ramps 1.4, but which GRBL did you flashed to the arduino board? The original GRBL or the one I modified?
The cpu_map_atmega2560.h file is different and maybe that’s the issue. I modified that file to work with the ControlPCB board and not with the Ramps.
If you want to control your Thor with Ramps boards you will need 2 units. The first one for the first 3 articulations and the other one for the last 3 articulations. I did it years ago flashing the original GRBL code to the arduinos and sending a gcode to each board separately.
Marlin could be a better option (for testing at least) as it allows you to control 5 stepper motors (X,Y,Z,E1,E2) so you can control 5 articulations with just 1 ramps.
Hope it helps!