Update: micropython esp32s2板卡调整配置项

This commit is contained in:
王立帮
2024-10-14 20:25:08 +08:00
parent 3eec19ff4a
commit f260227486
3 changed files with 52 additions and 25 deletions

View File

@@ -8,17 +8,31 @@
"type": "command",
"portSelect": "all",
"micropython:esp32s2:mixgo_ce": {
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/MixGo_CE-0x1000-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/MixGo_CE-0x1000-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"",
"special": [
{
"name": "Default",
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/MixGo_CE-0x1000-V1.19.1.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
},
{
"name": "ESP-AT-mode",
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x0000 \"{indexPath}/build/MixGo-CE_AT-T17_R18.bin\""
}
]
},
"micropython:esp32s2:generic": {
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/Generic_S2_0x1000-V1.19.1.bin\""
},
"special": [
{
"name": "ESP-AT-mode",
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x0000 \"{indexPath}/build/MixGo-CE_AT-T17_R18.bin\""
}
]
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/Generic_S2_0x1000-V1.19.1.bin\"",
"special": [
{
"name": "Default",
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x1000 \"{indexPath}/build/Generic_S2_0x1000-V1.19.1.bin\""
},
{
"name": "ESP-AT-mode",
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s2 --port {com} --baud 460800 --after=no_reset write_flash 0x0000 \"{indexPath}/build/MixGo-CE_AT-T17_R18.bin\""
}
]
}
},
"upload": {
"type": "command",

View File

@@ -139,7 +139,6 @@ Python.init = function () {
}
}
Python.finish = function (code) {
// Convert the definitions dictionary into a list.
if (code !== "") {
@@ -177,7 +176,7 @@ Python.finish = function (code) {
if (loops.length > 0)
return definitions.join('\n') + '\n' + functions.join('\n') + '\n' + setups.join('') + '\n' + code + 'while True:\n' + loops.join('') + codeEnd.join('\n');
return definitions.join('\n') + '\n' + functions.join('\n') + '\n' + setups.join('') + '\n' + code + codeEnd.join('\n');
};
}
/**
@@ -188,7 +187,7 @@ Python.finish = function (code) {
*/
Python.scrubNakedValue = function (line) {
return line + '\n';
};
}
/**
* Encode a string as a properly escaped Python string, complete with quotes.
@@ -211,7 +210,7 @@ Python.quote_ = function (string) {
}
}
return quote + string + quote;
};
}
/**
* Encode a string as a properly escaped multiline Python string, complete
@@ -224,7 +223,7 @@ Python.multiline_quote_ = function (string) {
// Can't use goog.string.quote since % must also be escaped.
string = string.replace(/'''/g, '\\\'\\\'\\\'');
return '\'\'\'' + string + '\'\'\'';
};
}
/**
* Common tasks for generating Python from blocks.
@@ -264,7 +263,7 @@ Python.scrub_ = function (block, code, opt_thisOnly) {
var nextBlock = block.nextConnection && block.nextConnection.targetBlock();
var nextCode = opt_thisOnly ? '' : Python.blockToCode(nextBlock);
return commentCode + code + nextCode;
};
}
/**
* Gets a property and adjusts the value, taking into account indexing, and
@@ -305,4 +304,4 @@ Python.getAdjustedInt = function (block, atId, opt_delta, opt_negate) {
}
}
return at;
};
}