I’m new to the whole tool chain here (not an embedded dev) so it’s likely a configuration issue.
From within PIO I can upload to my target on /dev/ttyACM0, however once the upload happens the device disappears – I would post a screenshot, but I can only post one per message, so I’ll share that I see the device when I click on the extension “devices” (and see it on the OS, linux), and here is a shot of what looks like upload is working:
However, after this the device is gone from the OS and the devices link in the PIO extension doesn’t show any available ports. When I try to monitor I get asked for the port (and an empty list is given).
I will note that the device seems to work fine with the arduino ide 2, and that when I uploaded code via that route I could monitor it from within PIO.
Where should I be digging to try and understand why the device upload isn’t working correctly?
Apologies, I’m just using the default project main.cpp for an MWE:
#include <Arduino.h>
// put function declarations here:
int myFunction(int, int);
void setup() {
// put your setup code here, to run once:
int result = myFunction(2, 3);
}
void loop() {
// put your main code here, to run repeatedly:
}
// put function definitions here:
int myFunction(int x, int y) {
return x + y;
}
I did have a different one too that was my development code trying to use the IMU, but even this one above doesn’t seem to run.
I did this, but symptoms are the same. The board “unmounts” as a device after the upload, which seems to be the issue. I don’t know whether the code is running on the board or not, but the device shouldn’t need to be reset between uploads, right?
Right – I press upload, I wait awhile (several minutes), then hit monitor, but the device is no longer connected (no /dev/ttyACM0). Is there a configuration for uploading that I can verify works/doesn’t work? I don’t know much about the toolchain, apologies.
Ok, so, I must have messed up when copying from the medium article. I thought I needed to build your PR against the PIO source myself and then deploy it, but it’s way easier than that – just replacing my ini file to point to your URL and things are dynamically pulled down. Reload, and now things just work.
I’m not sure what I did wrong, but using the following platform.ini and reloading the project and things are good!