mirror of
https://gitcode.com/gh_mirrors/ar/arduino-littlefs-upload.git
synced 2025-08-06 18:24:30 +08:00
Fix Mac ESP32 upload command (#24)
* Fix Mac ESP32 upload command Fixes #23 * Minor stringification clean up
This commit is contained in:

committed by
GitHub

parent
9fc058afc3
commit
da80f52703
Binary file not shown.
@ -2,7 +2,7 @@
|
|||||||
"name": "arduino-littlefs-upload",
|
"name": "arduino-littlefs-upload",
|
||||||
"displayName": "arduino-littlefs-upload",
|
"displayName": "arduino-littlefs-upload",
|
||||||
"description": "Build and uploads LittleFS filesystems for the Arduino-Pico RP2040 core, ESP8266 core or ESP32 core under Arduino IDE 2.2.1 or higher",
|
"description": "Build and uploads LittleFS filesystems for the Arduino-Pico RP2040 core, ESP8266 core or ESP32 core under Arduino IDE 2.2.1 or higher",
|
||||||
"version": "1.1.3",
|
"version": "1.1.4",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.82.0"
|
"vscode": "^1.82.0"
|
||||||
},
|
},
|
||||||
|
@ -203,7 +203,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
|
|
||||||
// Windows exes need ".exe" suffix
|
// Windows exes need ".exe" suffix
|
||||||
let ext = (platform() === 'win32') ? ".exe" : "";
|
let ext = (platform() === 'win32') ? ".exe" : "";
|
||||||
let extEspTool = (platform() === 'win32') ? ".exe" : ".py";
|
let extEspTool = (platform() === 'win32') ? ".exe" : ((platform() === 'darwin') ? "" : ".py");
|
||||||
let mklittlefs = "mklittlefs" + ext;
|
let mklittlefs = "mklittlefs" + ext;
|
||||||
|
|
||||||
let tool = undefined;
|
let tool = undefined;
|
||||||
@ -284,10 +284,10 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
uploadOpts = ["--chip", esp32variant, "--port", serialPort, "--baud", String(uploadSpeed),
|
uploadOpts = ["--chip", esp32variant, "--port", serialPort, "--baud", String(uploadSpeed),
|
||||||
"--before", "default_reset", "--after", "hard_reset", "write_flash", "-z",
|
"--before", "default_reset", "--after", "hard_reset", "write_flash", "-z",
|
||||||
"--flash_mode", flashMode, "--flash_freq", flashFreq, "--flash_size", "detect", String(fsStart), imageFile];
|
"--flash_mode", flashMode, "--flash_freq", flashFreq, "--flash_size", "detect", String(fsStart), imageFile];
|
||||||
if (platform() === 'win32') {
|
if ((platform() === 'win32') || (platform() === 'darwin')) {
|
||||||
cmdApp = espTool; // Have binary EXE on Win32
|
cmdApp = espTool; // Have binary EXE on Mac/Windows
|
||||||
} else {
|
} else {
|
||||||
cmdApp = "python3"; // Not shipped, assumed installed
|
cmdApp = "python3"; // Not shipped, assumed installed on Linux
|
||||||
uploadOpts.unshift(espTool); // Need to call Python3
|
uploadOpts.unshift(espTool); // Need to call Python3
|
||||||
}
|
}
|
||||||
} else { // esp8266
|
} else { // esp8266
|
||||||
|
Reference in New Issue
Block a user