PlatformIO Community

Uploading marlin code using a Mac

Hi,
I can upload the same marlin code using Windows PC. However, I’m having trouble uploading the code using Mac laptop.
The code compiles fine on Mac its just the uploading doesn’t and gives below error.


A fatal error occurred: Timed out waiting for packet content
*** [upload] Error 2
================================= [FAILED] Took 238.04 seconds =================================

Environment    Status    Duration
-------------  --------  ------------
mks_tinybee    FAILED    00:03:58.040
============================= 1 failed, 0 succeeded in 00:03:58.040 =============================
The terminal process "platformio 'run', '--target', 'upload'" terminated with exit code: 1.

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

Per https://raw.githubusercontent.com/makerbase-mks/MKS-TinyBee/main/hardware/MKS%20TinyBee%20V1.0_003/MKS%20TinyBee%20V1.0_003%20SCH.pdf the hardware has the proper auto-reset circuit with RTS and DTR.

Are you sure it’s using the correct serial port? What does PIO Home → Devices say what devices you have?

Did you install any additional drivers for the CH340 chip? That can cause problems, the Mac ones are supposed to be fine.

This is what it show on devices in PlatformIO

/dev/cu.usbserial-1460 USB Serial USB VID:PID=1A86:7523 LOCATION=20-6

Looks good.

Can you also not upload any (simple blinky) sketches to the ESP32 using Arduino IDE?

I’m sorry I’m not following you
Can you explain more.
I’m new into this thing

Thanks

I want to check whether the problem lies in PlatformIO or whether there’s a problem with your serial driver after all. For that, for reference, try uploading via the Arduino IDE.

  1. Download Arduino IDE 1.8.19 from https://www.arduino.cc/en/software
  2. Install the Arduino-ESP32 core in it like Installing — Arduino-ESP32 2.0.2 documentation says (latest 2.0.3 version)
  3. Use any code, can also be empty like
void setup() { }
void loop() { }
  1. Set the upload port in the tools menu
  2. Press the upload button.

Does it result in an error or in a successfull upload?