mirror of https://github.com/arendst/Tasmota.git
Merge pull request #15493 from Jason2866/development
remove fixed address 0x10000 for firmware
This commit is contained in:
commit
a0ad780893
|
@ -30,8 +30,12 @@
|
||||||
"arduino": {
|
"arduino": {
|
||||||
"flash_extra_images": [
|
"flash_extra_images": [
|
||||||
[
|
[
|
||||||
"0x2E0000",
|
"0x10000",
|
||||||
"variants/tasmota/tasmota32-minicustom.bin"
|
"variants/tasmota/tasmota32-minicustom.bin"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"0x3B0000",
|
||||||
|
"variants/tasmota/littlefs.bin"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino":{
|
||||||
|
"ldscript": "esp32c3_out.ld"
|
||||||
|
},
|
||||||
|
"core": "esp32",
|
||||||
|
"extra_flags": "-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=0 -DESP32_4M -DESP32C3",
|
||||||
|
"f_cpu": "160000000L",
|
||||||
|
"f_flash": "80000000L",
|
||||||
|
"flash_mode": "dout",
|
||||||
|
"mcu": "esp32c3",
|
||||||
|
"variant": "esp32c3",
|
||||||
|
"partitions": "esp32_partition_app2880k_spiffs320k.csv"
|
||||||
|
},
|
||||||
|
"connectivity": [
|
||||||
|
"wifi"
|
||||||
|
],
|
||||||
|
"debug": {
|
||||||
|
"openocd_target": "esp32c3.cfg"
|
||||||
|
},
|
||||||
|
"frameworks": [
|
||||||
|
"arduino",
|
||||||
|
"espidf"
|
||||||
|
],
|
||||||
|
"name": "Espressif Generic ESP32-C3 4M Flash, Tasmota 1856k Code/OTA, 320k FS",
|
||||||
|
"upload": {
|
||||||
|
"arduino": {
|
||||||
|
"flash_extra_images": [
|
||||||
|
[
|
||||||
|
"0x10000",
|
||||||
|
"variants/tasmota/tasmota32c3-minicustom.bin"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"0x3B0000",
|
||||||
|
"variants/tasmota/littlefs.bin"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"flash_size": "4MB",
|
||||||
|
"maximum_ram_size": 327680,
|
||||||
|
"maximum_size": 4194304,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 460800
|
||||||
|
},
|
||||||
|
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html",
|
||||||
|
"vendor": "Espressif"
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
# Name, Type, SubType, Offset, Size, Flags
|
# Name, Type, SubType, Offset, Size, Flags
|
||||||
nvs, data, nvs, 0x9000, 0x5000,
|
nvs, data, nvs, 0x9000, 0x5000,
|
||||||
otadata, data, ota, 0xe000, 0x2000,
|
otadata, data, ota, 0xe000, 0x2000,
|
||||||
app0, app, ota_0, 0x10000, 0x2D0000,
|
factory, app, factory, 0x10000,0xD0000,
|
||||||
factory, app, factory, 0x2E0000,0xD0000,
|
app0, app, ota_0, 0xE0000, 0x2D0000,
|
||||||
spiffs, data, spiffs, 0x3B0000,0x50000,
|
spiffs, data, spiffs, 0x3B0000,0x50000,
|
||||||
|
|
|
|
@ -22,6 +22,7 @@ platform = env.PioPlatform()
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
import csv
|
||||||
|
|
||||||
sys.path.append(join(platform.get_package_dir("tool-esptoolpy")))
|
sys.path.append(join(platform.get_package_dir("tool-esptoolpy")))
|
||||||
import esptool
|
import esptool
|
||||||
|
@ -31,7 +32,21 @@ def esp32_create_combined_bin(source, target, env):
|
||||||
|
|
||||||
# The offset from begin of the file where the app0 partition starts
|
# The offset from begin of the file where the app0 partition starts
|
||||||
# This is defined in the partition .csv file
|
# This is defined in the partition .csv file
|
||||||
app_offset = 0x10000
|
app_offset = 0x10000 # default value
|
||||||
|
with open(env.BoardConfig().get("build.partitions")) as csv_file:
|
||||||
|
print("Read partitions from ",env.BoardConfig().get("build.partitions"))
|
||||||
|
csv_reader = csv.reader(csv_file, delimiter=',')
|
||||||
|
line_count = 0
|
||||||
|
for row in csv_reader:
|
||||||
|
if line_count == 0:
|
||||||
|
print(f'{", ".join(row)}')
|
||||||
|
line_count += 1
|
||||||
|
else:
|
||||||
|
print(f'{row[0]} {row[1]} {row[2]} {row[3]} {row[4]}')
|
||||||
|
line_count += 1
|
||||||
|
if(row[0] == 'app0'):
|
||||||
|
app_offset = int(row[3],base=16)
|
||||||
|
# print("Got app_offset from .csv:", row[3])
|
||||||
|
|
||||||
new_file_name = env.subst("$BUILD_DIR/${PROGNAME}.factory.bin")
|
new_file_name = env.subst("$BUILD_DIR/${PROGNAME}.factory.bin")
|
||||||
sections = env.subst(env.get("FLASH_EXTRA_IMAGES"))
|
sections = env.subst(env.get("FLASH_EXTRA_IMAGES"))
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue