Problems uploading to Pinguino PIC32 OTG

Hey all,

I am struggling with uploading some code to my Pinguino PIC32 OTG Board (Details) which shall be supported by PlatformIO (Reference) since the OTG and the “normal” device are almost the same (please correct me, if I’m wrong).

I implemented some code and compiled it without errors. Once I wanted to upload it to the board, I got the following error message:

Looking for upload port...
Error: Please specify `upload_port` for environment or use global `--upload-port` option.
For some development platforms it can be a USB flash drive (i.e. /media/<user>/<device name>)
*** [upload] Explicit exit, status 1
 [ERROR] Took 3.32 seconds 
CMakeFiles\PLATFORMIO_UPLOAD.dir\build.make:56: recipe for target 'CMakeFiles/PLATFORMIO_UPLOAD' failed
mingw32-make.exe[3]: *** [CMakeFiles/PLATFORMIO_UPLOAD] Error 1
CMakeFiles\Makefile2:177: recipe for target 'CMakeFiles/PLATFORMIO_UPLOAD.dir/all' failed
mingw32-make.exe[2]: *** [CMakeFiles/PLATFORMIO_UPLOAD.dir/all] Error 2
CMakeFiles\Makefile2:189: recipe for target 'CMakeFiles/PLATFORMIO_UPLOAD.dir/rule' failed
mingw32-make.exe[1]: *** [CMakeFiles/PLATFORMIO_UPLOAD.dir/rule] Error 2
Makefile:156: recipe for target 'PLATFORMIO_UPLOAD' failed
mingw32-make.exe: *** [PLATFORMIO_UPLOAD] Error 2

Which indicates that the board is not recognized by PlatformIO. I started to search for a solution:

I ran the command:

platformio device list

Which does not return anything (only a single \n or \r, perhaps). I have the following toolchains installed:

================
Platform atmelavr
--------
Updating atmelavr @ 1.3.1:      [Up-to-date]
Updating toolchain-atmelavr @ 1.40902.0:        [Up-to-date]
Updating framework-arduinoavr @ 1.10612.1:      [Up-to-date]
Updating tool-avrdude @ 1.60300.0:      [Up-to-date]

Platform microchippic32
--------
Updating microchippic32 @ 1.3.0:        [Up-to-date]
Updating framework-arduinomicrochippic32 @ 1.10301.0:   [Up-to-date]
Updating toolchain-microchippic32 @ 1.40803.142:        [Up-to-date]
Updating tool-pic32prog @ 2.20104.0:    [Up-to-date]

Library Manager
=============== 

This indicates that I have the correct toolchain, doesn’t it?

Based on my Windows Device Manager, I have installed the device drivers for my Pinguino PIC32 correctly (“This device is working properly.”).

And, of course, my PIC32 device is in Bootloader mode.

Any help appreciated so that I can finally start using CLion with Platformio on my Windows Computer :slight_smile:

Regards

Please provide an output of pio device list command when board is connected.

Sure.

With boot mode:

C:\Users\kraljic>platformio device list

C:\Users\kraljic>

Without boot mode:

C:\Users\kraljic>platformio device list

C:\Users\kraljic>

As you can see, PIO doesn’t see your board. Why? Did you install all drivers? Do you see it as COM port in system device manager?

I don’t know why, and that is exactly my question :slight_smile: My Device Manager tells me that my device driver is set up correctly. Using the Pinguino IDE, I can upload everything (but as far as I’ve seen, it is not necessary that the Pinguino IDE gets a COM port).

Taking a view at the COM Ports section of my device manager, there is no connected device listed.

This might be the issue- but I don’t know how to solve this. I’d really like to use pio, but I cannot set it up properly.

You’ll find a couple of Screenshots attached to this post, all created while my board was in bootloader mode.
Any help appreciated!

Plese report this issue to Issues · platformio/platform-microchippic32 · GitHub

Did you have already a look at it?

Hi

I am reviving this topic since I have found a solution to this problem. According to this article, this boards come with a bootloader that is compatible only with Pinguino IDE. So, it will be necessary to change the bootloader so that this board is compatible with platformio.

Greetings!