Skip to content

How to pass flags to ardruino-cli upload #1696

@glennswest

Description

@glennswest

Bug Report

Need a way of passing flags to programming tool..

Current behavior

arduino-cli upload -p /dev/cu.usbmodem53190055101 --fqbn m5stack:esp32:m5stack-paper i2CGateHA
esptool.py v3.1
Serial port /dev/cu.usbmodem53190055101
Connecting....
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 08:3a:f2:66:4c:bc
Uploading stub...

A fatal error occurred: Failed to write to target RAM (result was 01070000)
Error during Upload: Failed uploading: uploading error: exit status 2

Looking at how Arduino IDE does it, there is missing flags

Expected behavior

/Users/gwest/Library/Arduino15/packages/m5stack/tools/esptool_py/3.1.0/esptool --chip esp32 --port /dev/cu.wchusbserial53190055101 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 16MB 0xe000 /Users/gwest/Library/Arduino15/packages/m5stack/hardware/esp32/2.0.2/tools/partitions/boot_app0.bin 0x1000 /var/folders/_c/13l9r6915lj20tbq4ldn8jhr0000gn/T/arduino_build_617997/I2CGateHa.ino.bootloader.bin 0x10000 /var/folders/_c/13l9r6915lj20tbq4ldn8jhr0000gn/T/arduino_build_617997/I2CGateHa.ino.bin 0x8000 /var/folders/_c/13l9r6915lj20tbq4ldn8jhr0000gn/T/arduino_build_617997/I2CGateHa.ino.partitions.bin

esptool.py v3.1
Serial port /dev/cu.wchusbserial53190055101
Connecting.....
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 08:3a:f2:66:4c:bc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00010000 to 0x00117fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 493.8 kbit/s)...
Hash of data verified.
Flash params set to 0x024f
Compressed 17104 bytes to 11804...
Wrote 17104 bytes (11804 compressed) at 0x00001000 in 0.5 seconds (effective 285.9 kbit/s)...
Hash of data verified.
Compressed 1077792 bytes to 664781...
Wrote 1077792 bytes (664781 compressed) at 0x00010000 in 8.9 seconds (effective 970.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 129...
Wrote 3072 bytes (129 compressed) at 0x00008000 in 0.1 seconds (effective 372.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Environment

  • CLI version (output of arduino-cli version):
  • arduino-cli Version: 0.21.1 Commit: 9fcbb39 Date: 2022-02-23T16:42:40Z
  • OS and platform:
  • OSX Monterey 12.3

Hardware: M5stack paper v1.1

Metadata

Metadata

Assignees

Labels

status: waiting for informationMore information must be provided before work can proceedtype: supportOT: Request for help using the project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions