I am still mostly using Atmel Studio for ATSAMC21 / ATSAME51, now called Microchip Studio.
This is because everytime I tried to use MPLAB-X it ended badly and I know that Microchip made the Includes used in MPLAB-X incompatible, so I could not really re-use the code I already have anyways.
I am considering to use a different controller from a different manufacturer before switching over to MPLAB-X.
PlatformIO, as much as like to use it with VSCode, it does not really work for me with ATSAM since platform-atmelsam does not support Baremetal / CMSIS, at least not the official and "supported" version on
https://github.com/platformio/platform-atmelsam - it supports either Arduino or Zephyr.
There was a pull-request for CMSIS support and it works, but it completely got ignored.
And this is typical for PlatformIO, often enough you get Arduino support only, another example would be Raspberry Pi RP2040.
Needing to use a different controller than already is supported is another issue, I have two STM32 Nucleo boards that I can not use
with PlatformIO and I am waiting for support to catch on for over a year now.
Sometimes things break in PlatformIO, because of whatever and searching for the issue leads to tickets that are generally several years old,
at this point it is a good idea to remove PlatformIO and re-install it.
Ok, less ranting, more positivity.
Another option might be Segger Embedded Studio.
I have not tried to use it with ATSAM and recently had issues trying to use it with TIs TM4C, but did not get very far.
I just installed the ATSAMC21 and ATSAME51 support packges and setup a project for the ATSAME51.
And at least this results in a project that compiles.
But I am facing the same issue as with the TM4C, that main.c is exactly the same and there is nothing that is target specific and no hint how to go from there.
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int i;
for (i = 0; i < 100; i++) {
printf("Hello World %d!\n", i);
}
do {
i++;
} while (1);
}
Now what?
I want to program a micro-controller, not a x86 DOS box.
Microchip-Studio adds a #include "sam.h" which gives you all the includes for the controller.
And this seems to work for Segger Embedded Studio as well - I could not find any hint in regards of that though.
And most of the code with registers I imported into the main.c does not work, likely because Microchip f*cked up the includes.
Oh, yes: "Copyright (c) 2023 Microchip Technology Inc. and its subsidiaries.", splendid.

The packages are installed here:
C:\Users\****\AppData\Local\SEGGER\SEGGER Embedded Studio\v8\packages
And now I saw that for TM4C I probably need to include SEGGER_TM4C.h.
Apart from issues with the includes which Segger could help with by adding more target specific examples,
Segger Embedded Studio looks like an alternative to the Microchip Studio now.
The pain with the ATSAM includes though is entirely on Microchip and something I likely do not forgive Microchip.