Correction to previous platformio.ini: It should have been
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
upload_protocol = custom
upload_flags =
-device
MIMXRT1062xxxxA
-if
jtag
-autoconnect
1
-NoGui
1
-CommanderScript
upload.jlink
upload_command = $PROJECT_PACKAGES_DIR/tool-jlink/JLink.exe $UPLOAD_FLAGS
But that doesn’t change a lot regarding the initial problem.