I have tried nearly every troubleshooting method I can find and nothing seems to work.
I'm using a Longan CanBed V1.2e CANBED V1 - Longan Docs that uses Atmega32U4 chipset. With IDE 2.0.4.
For testing I'm just trying to upload the basic BLINK
/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
I usually get the following error.
Sketch uses 3956 bytes (13%) of program storage space. Maximum is 28672 bytes.
Global variables use 149 bytes (5%) of dynamic memory, leaving 2411 bytes for local variables. Maximum is 2560 bytes.
avrdude: ser_open(): can't open device "\\.\COM12": Access is denied.
Failed uploading: uploading error: exit status 1
The Com port value might change depending on where I have it plugged in or my sequence of testing.
Right now, the Bootloader shows as Com 12, but after bootload it shows as Com 8.
Normally after Bootload, the LED just blinks (by default), sometimes I do something (unknown what) and it stops blinking after Bootload. I have followed the Bootloader replacement. Arduino Leonardo Bootloader Replacement - iFixit Repair Guide
Which brings it back to a mode where it just blinks after Bootloading.
I have tried both Arduino as ISP and Arduino as ISP (Atmega32U4) with the same results.
The vendor at this point has suggested holding the reset button and releasing just after the program compiles. It's extremely hard to time this correctly as it happens so quick, but also doesn't make any difference.
Any help would be greatly appreciated.