PlatformIO does not see my device/USB

Greetings everyone.

Hope you are well.

I have an issue complying Marlin for my 3d printer. I have done it multiple times by on my old laptop (Windows). However, I have received a new one and it’s IOS and PlatoformIO does not see my USB.

In the PlatformIO under device/serial, there are only 2 device listed:

  1. /dev/cu.BoseQuietComfort35-SPPD
  2. /dev/cu.Bluetooth-Incoming-Port

Although, under logical, I can see my SD card/USB:

  1. /Volumes/SD

I have read https://docs.platformio.org/en/latest/projectconf/section_env_upload.html?utm_medium=piohome&utm_source=platformio#upload-port and non of those advice works.

In the file platformIO.ini, I have written:

platform = atmelavr
framework = arduino
board = megaatmega2560
build_flags = ${common.build_flags}
board_build.f_cpu = 16000000L
lib_deps = ${common.lib_deps}
TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
src_filter = ${common.default_src_filter} +<src/HAL/HAL_AVR>
monitor_speed = 250000
upload_port = /volume/sd*

Still does not allow me to comply. That is what is coming out from the terminal:

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//)
*** [upload] Explicit exit, status 1
=============================================================== [FAILED] Took 37.33 seconds ===============================================================

Environment Status Duration


megaatmega2560 FAILED 00:00:37.326
========================================================== 1 failed, 0 succeeded in 00:00:37.326 ==========================================================
The terminal process “pio ‘run’, ‘–target’, ‘upload’” terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.
terminal:

I will appreciate your help.

Thanks
Dan

PlatformIO sees the USB serial port when your Mac sees it. Please unplug the USB port, display the system log, then replug the USB, display the system log again and post the new output that has appeared in comparison to the last time.

Hope I have done it correctly. I have uploaded ss to my google drive (quite a big size).

If it’s so big that it has to be uploaded to Google Drive something is wrong. The system log should just have a few (like, 10?) new lines regarding the USB device that is being plugged in, if it was detected by the kernel – not the whole kernel log.

Also I don’t have access to that google drive link.

I have done a screenshot, that is why the file was big.

Before:

Nov 27 13:01:41 Daniels-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.shared.05000000-0300-0000-0000-000000000000[72760]): Service exited due to SIGKILL | sent by mds[71]
Nov 27 13:01:42 Daniels-MBP com.apple.appkit.xpc.openAndSavePanelService[72768]: assertion failed: 20B29: libxpc.dylib + 88537 [DC50F7DD-1C4B-3BD2-A54D-C5D7D97A3718]: 0x89
Nov 27 13:02:04 Daniels-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0E000000-0200-0000-0000-000000000000[72762]): Service exited due to SIGKILL | sent by mds[71]
Nov 27 13:02:10 Daniels-MBP com.apple.xpc.launchd[1]: Coalition Cache Hit: app<application.com.apple.Console.1152921500311973764.1152921500311973769(501)> [26007]
Nov 27 13:02:30 Daniels-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0E000000-0300-0000-0000-000000000000[72776]): Service exited due to SIGKILL | sent by mds[71]

After:

Nov 27 13:02:10 Daniels-MBP com.apple.xpc.launchd[1]: Coalition Cache Hit: app<application.com.apple.Console.1152921500311973764.1152921500311973769(501)> [26007]
Nov 27 13:02:30 Daniels-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0E000000-0300-0000-0000-000000000000[72776]): Service exited due to SIGKILL | sent by mds[71]
Nov 27 13:02:39 Daniels-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0E000000-0400-0000-0000-000000000000[72782]): Service exited due to SIGKILL | sent by mds[71]
Nov 27 13:02:45 Daniels-MBP mdsync[72793]: objc[72793]: Class MDSPathFilter is implemented in both /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata and /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/mdsync. One of the two will be used. Which one is undefined.
Nov 27 13:02:52 Daniels-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.shared.04000000-0100-0000-0000-000000000000[72775]): Service exited due to SIGKILL | sent by mds[71]

Hm okay seems like Apple’s dmesg doesn’t contain information about plugged in USB devices at all.

Just to verify: When you plug in that 3D printer board, you see it on your Mac as SD card folder? That appears under /Volumes/SD? But then you mis-typed that exact name in /volume/sd*? Or should it appear as a serial port?

I am not connecting the 3D printer board. I have took the MicroSD card and plug it in to the Mac via adapter (Tried 2 of them already).

Also, I’ve tried with /Volumes/SD and still does’t work.

I’m not really familiar with upload to SD card but I note a difference:

/Volumes/SD
 upload_port = /volume/sd*

Note the missing s in the second sample (in the word Volumes).

If in doubt, just execute a normal build, and the final lines will tell you where the firmware binary will be located at. (.pio/build/<environment>/firmware.bin likely). Can you copy that manually to the SD card?

That was a mistake, I changed it. Still does not work. I have attached the ss from VS.

I’ve tried that one but can’t figure out how to change to the different location let say somewhere in my disk.

The upload protocol for the atmega2560 is wiring and it will invoke AVRDude. It does not have an upload_protocol option to copy the firmware to the given upload_port, as I read the code. Has this ever worked before?

I’m pretty sure some of the marlin firmware instruction docs say if updating the firmware via SD card to compile it, and then copy the file yourself. Setting upload_port to a file path is not valid… as a filesystem is not a port, etc, etc.

In other words, you buld it, rather than build and upload, and then copy the resulting compiled firmware file to the (micro)SD card.

From the marlin docs: Installing Marlin (PlatformIO with VSCode) | Marlin Firmware

‘firmware.bin’ file

Some newer boards require the firmware.bin file to be copied onto the onboard SD card, and then you >must reboot the printer to complete the install. PlatformIO will try to copy the file automatically if the >board is connected and your PC can see the SD card, but this may not always work.

Bin file location

In these cases, you’ll need to locate the firmware.bin file and copy it over to the SD card manually.