Page 1 of 1

CAN Due Upload Issues

Posted: Sat Sep 18, 2021 1:06 am
by P.S.Mangelsdorf
Not sure if this is the best place for this question but I'm beating my head against a wall.

I'm attempting to use the EVTV CANDue V2 board with Damien's Ampera/Volt charger code. I'm having a problem with uploading from the Arduino IDE to the board.

I installed the FTDI driver, as recommended by the ESP32 documentation, and the IDE now sees the 2 COM ports. The problem is no matter which one I select, the Arduino IDE is telling me that no device is found on that COM port.

I'm sure this is something stupid I'm missing but I can't for the life of me figure out what it is.

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 1:13 am
by Bratitude
which port on due are you physically connected to?

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 1:17 am
by P.S.Mangelsdorf
The built in USB-B port

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 1:27 am
by P.S.Mangelsdorf
Also, I tried setting the board as both Native USB and Programming Port, no difference.

I also tried holding down the boot button while uploading, no dice there either.

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 2:43 am
by Bratitude
Are the due board cores installed in the ide?

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 2:51 am
by P.S.Mangelsdorf
Yes, I have the Due board selected. Everything compiles fine but then when it attempts the upload it says it there's no board on the selected port. I had to install the FTDI usb driver just to get it to show the port at all.

The available ports change based on which USB port of my computer I use, so its detecting the board but then can't find it? If that makes sense.

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 4:17 am
by Bratitude
Okay good good, is the board wired up to anything else ? or is it just “raw” no additional changes other than the USB cable?

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 4:56 am
by thEVan
I’ve been able to upload fine to my CAN DUE 2 board from evtv through the USB port.
Have you tried a different usb cable? I had an issue where one cable from an arduino uno kit that i bought used would not work. A different cable worked fine.
Posting my settings in case something stands out to you.
Board: ESP32 Dev Module
Upload speed: 921600
Cpu freq: 240mhz wifi/bt
Flash freq: 80mhz
Flash mode: QIO
Flash size: 4Mb (32Mb)
Partition scheme: Default 4Mb with spiffs
Core debug level: none
Psram: disabled

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 11:50 am
by P.S.Mangelsdorf
Ok, I was being dumb and had the board set to "Arduino Due" not ESP32. Now that I fixed that, I got a new compiling issue I didn't have before. Any thoughts?

Code: Select all

Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

In file included from C:\Users\psman\Documents\06_Projects\MSP\Volt Charger gen1\AmperaCharger-main\Ampera_charger_V1\Ampera_charger_V1.ino:15:0:

C:\Users\psman\Documents\Arduino\libraries\due_wire-master/due_wire.h:25:25: fatal error: include/twi.h: No such file or directory

compilation terminated.

exit status 1

Error compiling for board ESP32 Dev Module.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 2:21 pm
by Bratitude
due_wire is ether not installed or corrupted

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 2:23 pm
by P.S.Mangelsdorf
Bratitude wrote: Sat Sep 18, 2021 2:21 pm due_wire is ether not installed or corrupted
Its installed and I've tried reinstalling it. It compiles fine for Arduino Due but doesn't compile for ESP32.

Re: CAN Due Upload Issues

Posted: Sat Sep 18, 2021 3:37 pm
by P.S.Mangelsdorf
Ok so I ended up re-writing/simplifying the code, and got it to upload. Now to see if it actually works.