Invert endstop axes

Hey everyone, nearing complete on my new primo build, and long story short, I built where X and Y axis endstops were to be at MAX (back-right), with home at MIN (bottom-left).

After connecting all the wiring and testing, all axes move the correct direction on jogging, but homing is attempting to go to min still, which would just crash since there’s no endstops there.

I’ve seen a few posts in this forum, on reprap/marlin forums, etc… where I can change the direction of endstops when homing in the configuration.h, and rebuild the firmware… but like others, I get ‘X_MAX was not declared in this scope’, (and same for Y when attempting), and am not finding any clear advice on how to fix this. Recommendations have included editing pieces of configuration_adv.h, to home and make a macro that then moves the origin where I want it, and a couple of others…but none of them provided where/what specifically to be changed.

The “have it home and make a macro to move it” seems backwards to me, as I’d essentially pretend the machine is rotated 180, and max for axes would be bottom-left?

If someone knows what I need to edit in configuration.h and configuration_adv.h to rebuild with max for homing, that would be ideal, but am open to suggestions, just may need a little directions so I don’t botch this.

Thanks in advance for any help!

When I last tried changing the home_dir to +1 on dual axis, Marlin couldn’t use the x_min endstop for x2_min. So you had to use 3 endstop pins for each dual axis. Xmax for x1_max, Xmin was unused, and Zmax or something for x2_max. You want to reverse 2 dual axis, so that is 6 endstops. No room for Z. And I’m not even sure you can use Zmin.

Unless that has changed, I don’t have a solution for you.

The “home first” workaround is for people sho aant to hit one button and have the machine move to the far right. You would need your endstops and 0,0 at the bottom left, home the machine, and then use a premade command to move it to 300,300, on the far right side.

You say you want the endstops on the far right. You may be able to figure something out, but I don’t have an easy solution for you. I would drop that requirement and move the endstops to the near left.