-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
163 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"version": 1, | ||
"author": "mp-se", | ||
"editor": "wokwi", | ||
"parts": [ | ||
{ | ||
"type": "wokwi-esp32-devkit-v1", | ||
"id": "esp", | ||
"top": 46.17, | ||
"left": -11.69, | ||
"rotate": 90, | ||
"attrs": { "psramSize": "2", "firmwareOffset": "0" } | ||
} | ||
], | ||
"connections": [ | ||
[ "esp:TX0", "$serialMonitor:RX", "", [] ], | ||
[ "esp:RX0", "$serialMonitor:TX", "", [] ] | ||
], | ||
"serialMonitor": { "display": "always", "newline": "lf", "convertEol": false }, | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Name,Type,SubType,Offset,Size,Flags | ||
nvs,data,nvs,0x9000,0x5000 | ||
otadata,data,ota,0xe000,0x2000 | ||
app0,app,ota_0,0x10000,0x1c0000 | ||
app1,app,ota_1,0x1d0000,0x1c0000 | ||
spiffs,data,spiffs,0x390000,0x60000 | ||
coredump,data,coredump,0x3F0000,0x10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Import("env") | ||
|
||
APP_BIN = "$BUILD_DIR/${PROGNAME}.bin" | ||
MERGED_BIN = "$BUILD_DIR/${PROGNAME}_merged.bin" | ||
BOARD_CONFIG = env.BoardConfig() | ||
|
||
|
||
def merge_bin(source, target, env): | ||
# The list contains all extra images (bootloader, partitions, eboot) and | ||
# the final application binary | ||
flash_images = env.Flatten(env.get("FLASH_EXTRA_IMAGES", [])) + ["$ESP32_APP_OFFSET", APP_BIN] | ||
|
||
# Run esptool to merge images into a single binary | ||
env.Execute( | ||
" ".join( | ||
[ | ||
"$PYTHONEXE", | ||
"$OBJCOPY", | ||
"--chip", | ||
BOARD_CONFIG.get("build.mcu", "esp32"), | ||
"merge_bin", | ||
"--fill-flash-size", | ||
BOARD_CONFIG.get("upload.flash_size", "4MB"), | ||
"-o", | ||
MERGED_BIN, | ||
] | ||
+ flash_images | ||
) | ||
) | ||
|
||
# Add a post action that runs esptoolpy to merge available flash images | ||
env.AddPostAction(APP_BIN , merge_bin) | ||
|
||
# Patch the upload command to flash the merged binary at address 0x0 | ||
env.Replace( | ||
UPLOADERFLAGS=[ | ||
] | ||
+ ["0x0", MERGED_BIN], | ||
UPLOADCMD='"$PYTHONEXE" "$UPLOADER" $UPLOADERFLAGS', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[wokwi] | ||
version = 1 | ||
firmware = '.pio/build/esplib32async-wokwi/firmware_merged.bin' | ||
elf = '.pio/build/esplib32async-wokwi/firmware.elf' | ||
|
||
[[net.forward]] | ||
from = "localhost:8180" | ||
to = "target:80" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters