feat(core): micropython板卡烧录固件时支持调整波特率
This commit is contained in:
@@ -54,6 +54,10 @@ import * as MicroPythonSerialGenerators from './generators/serial';
|
|||||||
import * as MicroPythonSystemGenerators from './generators/system';
|
import * as MicroPythonSystemGenerators from './generators/system';
|
||||||
import * as MicroPythonWeatherGenerators from './generators/weather';
|
import * as MicroPythonWeatherGenerators from './generators/weather';
|
||||||
|
|
||||||
|
import * as MicroPythonZhHans from './language/zh-hans';
|
||||||
|
import * as MicroPythonZhHant from './language/zh-hant';
|
||||||
|
import * as MicroPythonEn from './language/en';
|
||||||
|
|
||||||
import { Python } from './python_generator';
|
import { Python } from './python_generator';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@@ -111,5 +115,8 @@ export {
|
|||||||
MicroPythonSerialGenerators,
|
MicroPythonSerialGenerators,
|
||||||
MicroPythonSystemGenerators,
|
MicroPythonSystemGenerators,
|
||||||
MicroPythonWeatherGenerators,
|
MicroPythonWeatherGenerators,
|
||||||
|
MicroPythonZhHans,
|
||||||
|
MicroPythonZhHant,
|
||||||
|
MicroPythonEn,
|
||||||
Python
|
Python
|
||||||
};
|
};
|
||||||
9
boards/default_src/micropython/language/en.js
Normal file
9
boards/default_src/micropython/language/en.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import * as Mixly from 'mixly';
|
||||||
|
import TEMPLATE from '../template/board-config-message.html';
|
||||||
|
|
||||||
|
const { XML } = Mixly;
|
||||||
|
|
||||||
|
export const MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED = XML.render(TEMPLATE, {
|
||||||
|
title: 'Burn Speed',
|
||||||
|
message: 'To select the flashing speed, change the Burn Speed. This value will be used for flashing the code to the device. If you have issues while flashing the device at high speed, try to decrease this value. This could be due to the external serial-to-USB chip limitations.'
|
||||||
|
});
|
||||||
9
boards/default_src/micropython/language/zh-hans.js
Normal file
9
boards/default_src/micropython/language/zh-hans.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import * as Mixly from 'mixly';
|
||||||
|
import TEMPLATE from '../template/board-config-message.html';
|
||||||
|
|
||||||
|
const { XML } = Mixly;
|
||||||
|
|
||||||
|
export const MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED = XML.render(TEMPLATE, {
|
||||||
|
title: '烧录速度',
|
||||||
|
message: '要选择烧录速度,请更改“Burn Speed”,此值将用于向设备烧录代码。如果在用较高的烧录速度时出现问题,请尝试减小此值,这可能是由于外部串行到USB芯片的限制。'
|
||||||
|
});
|
||||||
9
boards/default_src/micropython/language/zh-hant.js
Normal file
9
boards/default_src/micropython/language/zh-hant.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import * as Mixly from 'mixly';
|
||||||
|
import TEMPLATE from '../template/board-config-message.html';
|
||||||
|
|
||||||
|
const { XML } = Mixly;
|
||||||
|
|
||||||
|
export const MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED = XML.render(TEMPLATE, {
|
||||||
|
title: '燒錄速度',
|
||||||
|
message: '要選擇燒錄速度,請更改“Burn Speed”,此值將用於向設備燒錄程式碼。如果在用較高的燒錄速度時出現問題,請嘗試减小此值,這可能是由於外部串列到USB晶片的限制。'
|
||||||
|
});
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<div>
|
||||||
|
<h5 style="
|
||||||
|
font-weight: bold;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
user-select: text;
|
||||||
|
">{{-d.title}}</h5>
|
||||||
|
<div>
|
||||||
|
{{# if (d.message) { }}
|
||||||
|
<p style="white-space: normal;user-select: text;padding-bottom: 5px;">
|
||||||
|
{{-d.message}}
|
||||||
|
</p>
|
||||||
|
{{# } }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -71,7 +71,10 @@ import {
|
|||||||
MicroPythonSensorOnBoardGenerators,
|
MicroPythonSensorOnBoardGenerators,
|
||||||
MicroPythonSerialGenerators,
|
MicroPythonSerialGenerators,
|
||||||
MicroPythonSystemGenerators,
|
MicroPythonSystemGenerators,
|
||||||
MicroPythonWeatherGenerators
|
MicroPythonWeatherGenerators,
|
||||||
|
MicroPythonZhHans,
|
||||||
|
MicroPythonZhHant,
|
||||||
|
MicroPythonEn
|
||||||
} from '@mixly/micropython';
|
} from '@mixly/micropython';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -90,6 +93,11 @@ import './css/color_esp32c3_mixgocc.css';
|
|||||||
|
|
||||||
Object.assign(Blockly.Variables, Variables);
|
Object.assign(Blockly.Variables, Variables);
|
||||||
Object.assign(Blockly.Procedures, Procedures);
|
Object.assign(Blockly.Procedures, Procedures);
|
||||||
|
|
||||||
|
Object.assign(Blockly.Lang.ZhHans, MicroPythonZhHans);
|
||||||
|
Object.assign(Blockly.Lang.ZhHant, MicroPythonZhHant);
|
||||||
|
Object.assign(Blockly.Lang.En, MicroPythonEn);
|
||||||
|
|
||||||
Blockly.Python = Python;
|
Blockly.Python = Python;
|
||||||
Blockly.generator = Python;
|
Blockly.generator = Python;
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,48 @@
|
|||||||
{
|
{
|
||||||
"board": {
|
"board": {
|
||||||
"mpython": "micropython:educore:educore"
|
"mpython": {
|
||||||
|
"key": "micropython:educore:educore",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"language": "MicroPython",
|
"language": "MicroPython",
|
||||||
"burn": {
|
"burn": {
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:educore:educore": {
|
"micropython:educore:educore": {
|
||||||
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud 115200 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32c2 --port {com} --baud 460800 --after=no_reset_stub write_flash 0x0 \"{indexPath}/build/Mixgo_Mini_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"",
|
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud {baudrate} --after=no_reset_stub write_flash -e 0x0 \"{indexPath}/build/Mixgo_Mini_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"",
|
||||||
"special": [
|
"special": [
|
||||||
{
|
{
|
||||||
"name": "Firmware No Ble With SSL",
|
"name": "Firmware No Ble With SSL",
|
||||||
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud 115200 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32c2 --port {com} --baud 460800 --after=no_reset_stub write_flash 0x0 \"{indexPath}/build/Mixgo_Mini_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud {baudrate} --after=no_reset_stub write_flash -e 0x0 \"{indexPath}/build/Mixgo_Mini_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Firmware With Ble No SSL",
|
"name": "Firmware With Ble No SSL",
|
||||||
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud 115200 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32c2 --port {com} --baud 460800 --after=no_reset_stub write_flash 0x0 \"{indexPath}/build/Mixgo_Mini_lib_ble-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud {baudrate} --after=no_reset_stub write_flash -e 0x0 \"{indexPath}/build/Mixgo_Mini_lib_ble-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,10 @@ import {
|
|||||||
MicroPythonSensorOnBoardGenerators,
|
MicroPythonSensorOnBoardGenerators,
|
||||||
MicroPythonSerialGenerators,
|
MicroPythonSerialGenerators,
|
||||||
MicroPythonSystemGenerators,
|
MicroPythonSystemGenerators,
|
||||||
MicroPythonWeatherGenerators
|
MicroPythonWeatherGenerators,
|
||||||
|
MicroPythonZhHans,
|
||||||
|
MicroPythonZhHant,
|
||||||
|
MicroPythonEn
|
||||||
} from '@mixly/micropython';
|
} from '@mixly/micropython';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -82,6 +85,11 @@ import './css/color_esp32_mixgo.css';
|
|||||||
|
|
||||||
Object.assign(Blockly.Variables, Variables);
|
Object.assign(Blockly.Variables, Variables);
|
||||||
Object.assign(Blockly.Procedures, Procedures);
|
Object.assign(Blockly.Procedures, Procedures);
|
||||||
|
|
||||||
|
Object.assign(Blockly.Lang.ZhHans, MicroPythonZhHans);
|
||||||
|
Object.assign(Blockly.Lang.ZhHant, MicroPythonZhHant);
|
||||||
|
Object.assign(Blockly.Lang.En, MicroPythonEn);
|
||||||
|
|
||||||
Blockly.Python = Python;
|
Blockly.Python = Python;
|
||||||
Blockly.generator = Python;
|
Blockly.generator = Python;
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,133 @@
|
|||||||
{
|
{
|
||||||
"board": {
|
"board": {
|
||||||
"MixGo": "micropython:esp32:mixgo",
|
"MixGo": {
|
||||||
"MixGo PE": "micropython:esp32:mixgo_pe",
|
"key": "micropython:esp32:mixgo",
|
||||||
"mPython": "micropython:esp32:mpython",
|
"config": [
|
||||||
"ESP32 Generic(4MB)": "micropython:esp32:generic"
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"MixGo PE": {
|
||||||
|
"key": "micropython:esp32:mixgo_pe",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mPython": {
|
||||||
|
"key": "micropython:esp32:mpython",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ESP32 Generic(4MB)": {
|
||||||
|
"key": "micropython:esp32:generic",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"language": "MicroPython",
|
"language": "MicroPython",
|
||||||
"burn": {
|
"burn": {
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32:mixgo": {
|
"micropython:esp32:mixgo": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/Mixgo_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --port {com} --baud {baudrate} write_flash -e 0x1000 \"{indexPath}/build/Mixgo_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:mixgo_pe": {
|
"micropython:esp32:mixgo_pe": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/Mixgo_PE_lib-v1.25.0.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --port {com} --baud {baudrate} write_flash -e 0x1000 \"{indexPath}/build/Mixgo_PE_lib-v1.25.0.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:generic": {
|
"micropython:esp32:generic": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/Generic_ESP32_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --port {com} --baud {baudrate} write_flash -e 0x1000 \"{indexPath}/build/Generic_ESP32_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:mpython": {
|
"micropython:esp32:mpython": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/mPython_lib-v1.25.0.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --port {com} --baud {baudrate} write_flash -e 0x1000 \"{indexPath}/build/mPython_lib-v1.25.0.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
|
|||||||
@@ -73,7 +73,10 @@ import {
|
|||||||
MicroPythonSensorOnBoardGenerators,
|
MicroPythonSensorOnBoardGenerators,
|
||||||
MicroPythonSerialGenerators,
|
MicroPythonSerialGenerators,
|
||||||
MicroPythonSystemGenerators,
|
MicroPythonSystemGenerators,
|
||||||
MicroPythonWeatherGenerators
|
MicroPythonWeatherGenerators,
|
||||||
|
MicroPythonZhHans,
|
||||||
|
MicroPythonZhHant,
|
||||||
|
MicroPythonEn
|
||||||
} from '@mixly/micropython';
|
} from '@mixly/micropython';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -93,6 +96,11 @@ import './css/color_esp32c3_mixgocc.css';
|
|||||||
|
|
||||||
Object.assign(Blockly.Variables, Variables);
|
Object.assign(Blockly.Variables, Variables);
|
||||||
Object.assign(Blockly.Procedures, Procedures);
|
Object.assign(Blockly.Procedures, Procedures);
|
||||||
|
|
||||||
|
Object.assign(Blockly.Lang.ZhHans, MicroPythonZhHans);
|
||||||
|
Object.assign(Blockly.Lang.ZhHant, MicroPythonZhHant);
|
||||||
|
Object.assign(Blockly.Lang.En, MicroPythonEn);
|
||||||
|
|
||||||
Blockly.Python = Python;
|
Blockly.Python = Python;
|
||||||
Blockly.generator = Python;
|
Blockly.generator = Python;
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,81 @@
|
|||||||
{
|
{
|
||||||
"board": {
|
"board": {
|
||||||
"MixGo MINI": "micropython:esp32c2:mixgo_mini",
|
"MixGo MINI": {
|
||||||
"ESP32C2 Generic(4M)": "micropython:esp32c2:generic_4M"
|
"key": "micropython:esp32c2:mixgo_mini",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ESP32C2 Generic(4M)": {
|
||||||
|
"key": "micropython:esp32c2:generic_4M",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"language": "MicroPython",
|
"language": "MicroPython",
|
||||||
"burn": {
|
"burn": {
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32c2:mixgo_mini": {
|
"micropython:esp32c2:mixgo_mini": {
|
||||||
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud 115200 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32c2 --port {com} --baud 460800 --after=no_reset_stub write_flash 0x0 \"{indexPath}/build/Mixgo_Mini_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"",
|
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud {baudrate} --after=no_reset_stub write_flash -e 0x0 \"{indexPath}/build/Mixgo_Mini_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"",
|
||||||
"special": [
|
"special": [
|
||||||
{
|
{
|
||||||
"name": "Firmware For General Application",
|
"name": "Firmware For General Application",
|
||||||
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud 115200 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32c2 --port {com} --baud 460800 --after=no_reset_stub write_flash 0x0 \"{indexPath}/build/Mixgo_Mini_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud {baudrate} --after=no_reset_stub write_flash -e 0x0 \"{indexPath}/build/Mixgo_Mini_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Firmware Optimize For V2.x Board",
|
"name": "Firmware Optimize For V2.x Board",
|
||||||
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud 115200 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32c2 --port {com} --baud 460800 --after=no_reset_stub write_flash 0x0 \"{indexPath}/build/Mixgo_Mini_v2_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud {baudrate} --after=no_reset_stub write_flash -e 0x0 \"{indexPath}/build/Mixgo_Mini_v2_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"micropython:esp32c2:generic_2M": {
|
"micropython:esp32c2:generic_2M": {
|
||||||
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c2 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Generic_C2_lib-v1.25.0.bin\" "
|
"command": "\"{esptool}\" --chip esp32c2 --port {com} --baud {baudrate} write_flash -e 0x0 \"{indexPath}/build/Generic_C2_lib-v1.25.0.bin\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
|
|||||||
@@ -71,7 +71,10 @@ import {
|
|||||||
MicroPythonSensorOnBoardGenerators,
|
MicroPythonSensorOnBoardGenerators,
|
||||||
MicroPythonSerialGenerators,
|
MicroPythonSerialGenerators,
|
||||||
MicroPythonSystemGenerators,
|
MicroPythonSystemGenerators,
|
||||||
MicroPythonWeatherGenerators
|
MicroPythonWeatherGenerators,
|
||||||
|
MicroPythonZhHans,
|
||||||
|
MicroPythonZhHant,
|
||||||
|
MicroPythonEn
|
||||||
} from '@mixly/micropython';
|
} from '@mixly/micropython';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -88,6 +91,11 @@ import './css/color_esp32c3_mixgocc.css';
|
|||||||
|
|
||||||
Object.assign(Blockly.Variables, Variables);
|
Object.assign(Blockly.Variables, Variables);
|
||||||
Object.assign(Blockly.Procedures, Procedures);
|
Object.assign(Blockly.Procedures, Procedures);
|
||||||
|
|
||||||
|
Object.assign(Blockly.Lang.ZhHans, MicroPythonZhHans);
|
||||||
|
Object.assign(Blockly.Lang.ZhHant, MicroPythonZhHant);
|
||||||
|
Object.assign(Blockly.Lang.En, MicroPythonEn);
|
||||||
|
|
||||||
Blockly.Python = Python;
|
Blockly.Python = Python;
|
||||||
Blockly.generator = Python;
|
Blockly.generator = Python;
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,133 @@
|
|||||||
{
|
{
|
||||||
"board": {
|
"board": {
|
||||||
"MixGo ME": "micropython:esp32c3:mixgo_me",
|
"MixGo ME": {
|
||||||
"MixGo CC": "micropython:esp32c3:mixgo_cc",
|
"key": "micropython:esp32c3:mixgo_me",
|
||||||
"MixGo Car 4.2": "micropython:esp32c3:mixgocar_c3",
|
"config": [
|
||||||
"ESP32C3 Generic(UART)": "micropython:esp32c3:generic"
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"MixGo CC": {
|
||||||
|
"key": "micropython:esp32c3:mixgo_cc",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"MixGo Car 4.2": {
|
||||||
|
"key": "micropython:esp32c3:mixgocar_c3",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ESP32C3 Generic(UART)": {
|
||||||
|
"key": "micropython:esp32c3:generic",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"language": "MicroPython",
|
"language": "MicroPython",
|
||||||
"burn": {
|
"burn": {
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32c3:mixgo_cc": {
|
"micropython:esp32c3:mixgo_cc": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Mixgo_CC_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud {baudrate} write_flash -e 0x0 \"{indexPath}/build/Mixgo_CC_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32c3:mixgo_me": {
|
"micropython:esp32c3:mixgo_me": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Mixgo_ME_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud {baudrate} write_flash -e 0x0 \"{indexPath}/build/Mixgo_ME_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32c3:mixgocar_c3": {
|
"micropython:esp32c3:mixgocar_c3": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Mixgo_Car_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud {baudrate} write_flash -e 0x0 \"{indexPath}/build/Mixgo_Car_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32c3:generic": {
|
"micropython:esp32c3:generic": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Generic_C3_UART_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud {baudrate} write_flash -e 0x0 \"{indexPath}/build/Generic_C3_UART_lib-v1.23.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
|
|||||||
@@ -73,7 +73,10 @@ import {
|
|||||||
MicroPythonSensorOnBoardGenerators,
|
MicroPythonSensorOnBoardGenerators,
|
||||||
MicroPythonSerialGenerators,
|
MicroPythonSerialGenerators,
|
||||||
MicroPythonSystemGenerators,
|
MicroPythonSystemGenerators,
|
||||||
MicroPythonWeatherGenerators
|
MicroPythonWeatherGenerators,
|
||||||
|
MicroPythonZhHans,
|
||||||
|
MicroPythonZhHant,
|
||||||
|
MicroPythonEn
|
||||||
} from '@mixly/micropython';
|
} from '@mixly/micropython';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -88,6 +91,11 @@ import './css/color_esp32s2_mixgoce.css';
|
|||||||
|
|
||||||
Object.assign(Blockly.Variables, Variables);
|
Object.assign(Blockly.Variables, Variables);
|
||||||
Object.assign(Blockly.Procedures, Procedures);
|
Object.assign(Blockly.Procedures, Procedures);
|
||||||
|
|
||||||
|
Object.assign(Blockly.Lang.ZhHans, MicroPythonZhHans);
|
||||||
|
Object.assign(Blockly.Lang.ZhHant, MicroPythonZhHant);
|
||||||
|
Object.assign(Blockly.Lang.En, MicroPythonEn);
|
||||||
|
|
||||||
Blockly.Python = Python;
|
Blockly.Python = Python;
|
||||||
Blockly.generator = Python;
|
Blockly.generator = Python;
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +1,89 @@
|
|||||||
{
|
{
|
||||||
"board": {
|
"board": {
|
||||||
"MixGo CE": "micropython:esp32s2:mixgo_ce",
|
"MixGo CE": {
|
||||||
"ESP32S2 Generic": "micropython:esp32s2:generic"
|
"key": "micropython:esp32s2:mixgo_ce",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ESP32S2 Generic": {
|
||||||
|
"key": "micropython:esp32s2:generic",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"language": "MicroPython",
|
"language": "MicroPython",
|
||||||
"burn": {
|
"burn": {
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32s2:mixgo_ce": {
|
"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_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"",
|
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud {baudrate} --after=no_reset write_flash -e 0x1000 \"{indexPath}/build/Mixgo_CE_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"",
|
||||||
"special": [
|
"special": [
|
||||||
{
|
{
|
||||||
"name": "Default",
|
"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_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud {baudrate} --after=no_reset write_flash -e 0x1000 \"{indexPath}/build/Mixgo_CE_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ESP-AT-mode",
|
"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 {baudrate} --after=no_reset write_flash -e 0x0000 \"{indexPath}/build/MixGo-CE_AT-T17_R18.bin\""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"micropython:esp32s2:generic": {
|
"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_lib-v1.25.0.bin\"",
|
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud {baudrate} --after=no_reset write_flash -e 0x1000 \"{indexPath}/build/Generic_S2_lib-v1.25.0.bin\"",
|
||||||
"special": [
|
"special": [
|
||||||
{
|
{
|
||||||
"name": "Default",
|
"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_lib-v1.25.0.bin\""
|
"command": "\"{esptool}\" --chip esp32s2 --port {com} --baud {baudrate} --after=no_reset write_flash -e 0x1000 \"{indexPath}/build/Generic_S2_lib-v1.25.0.bin\""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ESP-AT-mode",
|
"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 {baudrate} --after=no_reset write_flash -e 0x0000 \"{indexPath}/build/MixGo-CE_AT-T17_R18.bin\""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,10 @@ import {
|
|||||||
MicroPythonSensorOnBoardGenerators,
|
MicroPythonSensorOnBoardGenerators,
|
||||||
MicroPythonSerialGenerators,
|
MicroPythonSerialGenerators,
|
||||||
MicroPythonSystemGenerators,
|
MicroPythonSystemGenerators,
|
||||||
MicroPythonWeatherGenerators
|
MicroPythonWeatherGenerators,
|
||||||
|
MicroPythonZhHans,
|
||||||
|
MicroPythonZhHant,
|
||||||
|
MicroPythonEn
|
||||||
} from '@mixly/micropython';
|
} from '@mixly/micropython';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -90,6 +93,11 @@ import './css/color_esp32s2_mixgoce.css';
|
|||||||
|
|
||||||
Object.assign(Blockly.Variables, Variables);
|
Object.assign(Blockly.Variables, Variables);
|
||||||
Object.assign(Blockly.Procedures, Procedures);
|
Object.assign(Blockly.Procedures, Procedures);
|
||||||
|
|
||||||
|
Object.assign(Blockly.Lang.ZhHans, MicroPythonZhHans);
|
||||||
|
Object.assign(Blockly.Lang.ZhHant, MicroPythonZhHant);
|
||||||
|
Object.assign(Blockly.Lang.En, MicroPythonEn);
|
||||||
|
|
||||||
Blockly.Python = Python;
|
Blockly.Python = Python;
|
||||||
Blockly.generator = Python;
|
Blockly.generator = Python;
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,102 @@
|
|||||||
{
|
{
|
||||||
"board": {
|
"board": {
|
||||||
"元控青春": "micropython:esp32s3:mixgo_nova",
|
"元控青春": {
|
||||||
"元控自强": "micropython:esp32s3:mixgo_sant",
|
"key": "micropython:esp32s3:mixgo_nova",
|
||||||
"S3_generic":"micropython:esp32s3:generic"
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"元控自强": {
|
||||||
|
"key": "micropython:esp32s3:mixgo_sant",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"S3_generic": {
|
||||||
|
"key": "micropython:esp32s3:generic",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"language": "MicroPython",
|
"language": "MicroPython",
|
||||||
"burn": {
|
"burn": {
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32s3:mixgo_sant": {
|
"micropython:esp32s3:mixgo_sant": {
|
||||||
"command": "\"{esptool}\" --chip esp32s3 --port {com} --baud 460800 --before default_reset --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s3 --port {com} --baud 460800 --after hard_reset write_flash 0x0 \"{indexPath}/build/Mixgo_Sant_lib-v1.13.0.bin\" 0xE00000 \"{indexPath}/../micropython/build/HZK16_GBK.bin\""
|
"command": "\"{esptool}\" --chip esp32s3 --port {com} --baud {baudrate} --after hard_reset write_flash -e 0x0 \"{indexPath}/build/Mixgo_Sant_lib-v1.13.0.bin\" 0xE00000 \"{indexPath}/../micropython/build/HZK16_GBK.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32s3:mixgo_nova": {
|
"micropython:esp32s3:mixgo_nova": {
|
||||||
"command": "\"{esptool}\" --chip esp32s3 --port {com} --baud 460800 --before default_reset --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s3 --port {com} --baud 460800 --after hard_reset write_flash 0x0 \"{indexPath}/build/Mixgo_Nova_lib-v1.21.0.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32s3 --port {com} --baud {baudrate} --after hard_reset write_flash -e 0x0 \"{indexPath}/build/Mixgo_Nova_lib-v1.21.0.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32s3:generic": {
|
"micropython:esp32s3:generic": {
|
||||||
"command": "\"{esptool}\" --chip esp32s3 --port {com} --baud 460800 --after=no_reset_stub erase_flash && \"{esptool}\" --chip esp32s3 --port {com} --baud 460800 --after=no_reset write_flash 0x0 \"{indexPath}/build/Generic_S3_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32s3 --port {com} --baud {baudrate} --after=no_reset write_flash -e 0x0 \"{indexPath}/build/Generic_S3_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ import {
|
|||||||
MicroPythonSensorOnBoardGenerators,
|
MicroPythonSensorOnBoardGenerators,
|
||||||
MicroPythonSerialGenerators,
|
MicroPythonSerialGenerators,
|
||||||
MicroPythonSystemGenerators,
|
MicroPythonSystemGenerators,
|
||||||
MicroPythonWeatherGenerators
|
MicroPythonWeatherGenerators,
|
||||||
|
MicroPythonZhHans,
|
||||||
|
MicroPythonZhHant,
|
||||||
|
MicroPythonEn
|
||||||
} from '@mixly/micropython';
|
} from '@mixly/micropython';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -80,6 +83,11 @@ import './css/color_esp32_mixgo.css';
|
|||||||
|
|
||||||
Object.assign(Blockly.Variables, Variables);
|
Object.assign(Blockly.Variables, Variables);
|
||||||
Object.assign(Blockly.Procedures, Procedures);
|
Object.assign(Blockly.Procedures, Procedures);
|
||||||
|
|
||||||
|
Object.assign(Blockly.Lang.ZhHans, MicroPythonZhHans);
|
||||||
|
Object.assign(Blockly.Lang.ZhHant, MicroPythonZhHant);
|
||||||
|
Object.assign(Blockly.Lang.En, MicroPythonEn);
|
||||||
|
|
||||||
Blockly.Python = Python;
|
Blockly.Python = Python;
|
||||||
Blockly.generator = Python;
|
Blockly.generator = Python;
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,102 @@
|
|||||||
{
|
{
|
||||||
"board": {
|
"board": {
|
||||||
"飞乙": "micropython:esp32c3:feiyi",
|
"飞乙": {
|
||||||
"超霸大师": "micropython:esp32:mixbot",
|
"key": "micropython:esp32c3:feiyi",
|
||||||
"机器人大师": "micropython:esp32:rm_e1"
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"超霸大师": {
|
||||||
|
"key": "micropython:esp32:mixbot",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"机器人大师": {
|
||||||
|
"key": "micropython:esp32:rm_e1",
|
||||||
|
"config": [
|
||||||
|
{
|
||||||
|
"key": "BurnSpeed",
|
||||||
|
"label": "Burn Speed",
|
||||||
|
"messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "460800",
|
||||||
|
"label": "460800"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "115200",
|
||||||
|
"label": "115200"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "230400",
|
||||||
|
"label": "230400"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "921600",
|
||||||
|
"label": "921600"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"language": "MicroPython",
|
"language": "MicroPython",
|
||||||
"burn": {
|
"burn": {
|
||||||
"type": "command",
|
"type": "command",
|
||||||
"portSelect": "all",
|
"portSelect": "all",
|
||||||
"micropython:esp32c3:feiyi": {
|
"micropython:esp32c3:feiyi": {
|
||||||
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud 460800 erase_flash && \"{esptool}\" --chip esp32c3 --port {com} --baud 460800 write_flash 0x0 \"{indexPath}/build/Mixgo_FeiYi_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
"command": "\"{esptool}\" --chip esp32c3 --port {com} --baud {baudrate} write_flash -e 0x0 \"{indexPath}/build/Mixgo_FeiYi_lib-v1.25.0.bin\" 0X3A0000 \"{indexPath}/../micropython/build/HZK12.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:rm_e1": {
|
"micropython:esp32:rm_e1": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/RM_E1_lib-v1.25.0.bin\""
|
"command": "\"{esptool}\" --port {com} --baud {baudrate} write_flash -e 0x1000 \"{indexPath}/build/RM_E1_lib-v1.25.0.bin\""
|
||||||
},
|
},
|
||||||
"micropython:esp32:mixbot": {
|
"micropython:esp32:mixbot": {
|
||||||
"command": "\"{esptool}\" --chip esp32 --port {com} --baud 460800 erase_flash && \"{esptool}\" --port {com} --baud 460800 write_flash 0x1000 \"{indexPath}/build/MixBot_lib-v1.25.0.bin\""
|
"command": "\"{esptool}\" --port {com} --baud {baudrate} write_flash -e 0x1000 \"{indexPath}/build/MixBot_lib-v1.25.0.bin\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
|
|||||||
@@ -518,6 +518,9 @@ BU.burnByCmd = function (port, command) {
|
|||||||
const { mainStatusBarTabs } = Mixly;
|
const { mainStatusBarTabs } = Mixly;
|
||||||
const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output');
|
const statusBarTerminal = mainStatusBarTabs.getStatusBarById('output');
|
||||||
statusBarTerminal.setValue(Msg.Lang['shell.burning'] + '...\n');
|
statusBarTerminal.setValue(Msg.Lang['shell.burning'] + '...\n');
|
||||||
|
command = MString.tpl(command, {
|
||||||
|
baudrate: Boards.getSelectedBoardConfigParam('BurnSpeed') ?? '460800'
|
||||||
|
});
|
||||||
BU.runCmd('burn', port, command);
|
BU.runCmd('burn', port, command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,8 +75,6 @@ BU.progressLayer = new LayerProgress({
|
|||||||
cancelDisplay: false
|
cancelDisplay: false
|
||||||
});
|
});
|
||||||
|
|
||||||
const BAUD = goog.platform() === 'darwin' ? 460800 : 921600;
|
|
||||||
|
|
||||||
if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) {
|
if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) {
|
||||||
FSWrapper.setupFilesystem(path.join(Env.boardDirPath, 'build'));
|
FSWrapper.setupFilesystem(path.join(Env.boardDirPath, 'build'));
|
||||||
}
|
}
|
||||||
@@ -265,10 +263,11 @@ BU.burnWithEsptool = async (binFile, erase) => {
|
|||||||
let esploader = null;
|
let esploader = null;
|
||||||
let transport = null;
|
let transport = null;
|
||||||
try {
|
try {
|
||||||
|
const baudrate = Boards.getSelectedBoardConfigParam('BurnSpeed') ?? '460800';
|
||||||
transport = new Transport(port, false);
|
transport = new Transport(port, false);
|
||||||
esploader = new ESPLoader({
|
esploader = new ESPLoader({
|
||||||
transport,
|
transport,
|
||||||
baudrate: BAUD,
|
baudrate,
|
||||||
terminal: {
|
terminal: {
|
||||||
clean() {
|
clean() {
|
||||||
statusBarTerminal.setValue('');
|
statusBarTerminal.setValue('');
|
||||||
@@ -281,7 +280,7 @@ BU.burnWithEsptool = async (binFile, erase) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let chip = await esploader.main();
|
await esploader.main();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Debug.error(error);
|
Debug.error(error);
|
||||||
statusBarTerminal.addValue(`\n${error.toString()}\n`);
|
statusBarTerminal.addValue(`\n${error.toString()}\n`);
|
||||||
|
|||||||
Reference in New Issue
Block a user