Atmel SAMD21G to SAMD21J

Because of the lack of I/Os i would like to use an SAMD21J instead of the SAM21G thats on the MKR1010...

When looking at the datasheet, the SAM21G is acutally completely identical to the J version in means of pin names, for example PA04 has the exact same function as on the G version. This can be seen on page 28 of this Datasheet

Is it possible to just add the missing pins of the J version to the current G version?

It would be really helpfull and professional to make this possible, else it would be needed to place an i/o expander or something like that. But it would be way better to just have the more pin processor

I found a bootloader from Atmel University for the SAMD21J18.

Is the variant.cpp dependant of the boatloder? Can i use the SAMD21J18 boatloader from AtmelUniversity but use my own variant.cpp or the variant.cpp from MKR1010?

As far is i know, variant has nothing to do with the bootloader on AVR8.

I compiled a variant adafruit bootloader for ATSAMDJ18A with windows make with slight makefile modifications, with a black magic probe and a very ugly but functional breadboard. This was my first attempt at something like this, I have to say the extensive troubleshooting was worth the outcome. I have found no arduino boards with the ATSAMD21J, and I have been limited to the arduino zero pins. I think this is a worthy project, This board is multifunctional with circuitpython, Atmel embedded C, arduino, and marlin, and marlin pinouts for most consumer gcode machines limit multiaxis and/or multi extruder potential for CNC and 3DP machines alike. To your point, having direct processor pins is more instantaneous for a variety of applications, more efficient, and more compact (especially in this case).

This link explains the process of adding custom arduino boards of any compatible architecture,

through the creation or modification of an existing chip configuration in arduino source. If I am able to create a generic variant or multifunctional alternative pin variants for the SAMD21J, I will post it to git alongside this wisdom.

If I fail to do so, let this forum represent, through my findings, the full extent of the community initiative for the SAMD21J.

Thank you OP,