Git Product home page Git Product logo

Comments (5)

ascillato avatar ascillato commented on August 20, 2024

Hi, there is no need to add a different memory map. You can flash the actual file tasmocompiler makes. Making other memory map files is useless due Tasmota won't use the rest of the memory and also brokes the OTA capability for the default precompiled binaries.

from tasmocompiler.

benzino77 avatar benzino77 commented on August 20, 2024

You can flash 1MB bin file to 2MB device as Adrian said. We already have similar discussion #5
Changing the memory layout can be useful in two cases:

  • when the custom binary is larger than 512KB (but less than 681KB) and you want to use OTA to flush it without "sonoff-minimal" step
  • when the custom binary you want to flush via OTA is larger than 681KB (you cannot use "sonoff-minimal" step)

But... as I can see in arduino core directories the eagle.flash.2m.ld memory layout file looks like this:

/* Flash Split for 2M chips */
/* sketch 1019KB */
/* spiffs 1004KB */
/* eeprom 20KB */

MEMORY
{
  dport0_0_seg :                        org = 0x3FF00000, len = 0x10
  dram0_0_seg :                         org = 0x3FFE8000, len = 0x14000
  iram1_0_seg :                         org = 0x40100000, len = 0x8000
  irom0_0_seg :                         org = 0x40201010, len = 0xfeff0
}

PROVIDE ( _SPIFFS_start = 0x40300000 );
PROVIDE ( _SPIFFS_end = 0x403FB000 );
PROVIDE ( _SPIFFS_page = 0x100 );
PROVIDE ( _SPIFFS_block = 0x2000 );

INCLUDE "../ld/eagle.app.v6.common.ld"

This layout divide memory in proportion:
1019KB for sketch (tasmota binary)
1004KB SPIFFS (lets say "filesystem" for files)

So even if you use 2m linker memory layout settings, you have no extra space for sketch/binary.

PS.
For clarity I assumed that, official bin file, divide memory in the way, that there is 1024KB available for sketch, but in fact it is 999KB

from tasmocompiler.

ascillato avatar ascillato commented on August 20, 2024

The official Tasmota uses the 1mb memory map without spiffs. That allows to use 999kb for program and the rest 25kb for config and for wifi sdk related.

The 2mb memory map you proposed uses spiffs that will not allow an OTA bigger than the 1mb version memory map. For that, you need to use the 2 mb version without spiffs (provided by arduino).

Anyway it brokes any OTA capability from or to official precompiled Tasmota binaries.

The best and easy way is to have the same memory type of binaries (1mb no spiffs) in all your devices. In the case you want to upload by OTA a big binary (>512kb) by otaURL, Tasmota will automatically use the minimal firmware to free flash and then will be loaded that full binary (in the Tasmota wiki is explained that as OTAMagic)

So, there is no big gain on making an uncompatible 2mb version.

Just for academic explanation, using a 2mb memory map firmware (no spiffs and that initially has to be flashed by serial and all consecutive OTA must be 2mb) will allow you to do OTA for firmwares of up to 999kb in one step without using the minimal interim firmware.

Also, all esp8266 chips can run only 1mb program. The rest of memory can only be used for data. So, in the case of a nodemcu with the maximum 16mb of memory, you can run a 1mb program + 1mb needed free flash for OTA + 14mb for data. That is the hardware limitation.

from tasmocompiler.

ascillato avatar ascillato commented on August 20, 2024

Offtopic: @benzino77 amazing work you have done with Tasmocompiler!

from tasmocompiler.

benzino77 avatar benzino77 commented on August 20, 2024

Thanks for kind words ;)

from tasmocompiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.