HOWTO: M5Stack Fire - use the full 16MB with the Arduino IDE (UPDATED)



  • I updated the post (the SPIFFS was the original size while I had made space to make it bigger) and added a menu option for 7MB SPIFFS. Have also filed the pull request at espressif, all detailed in the edited lead post.



  • Not all is so smooth. Try this sketch. When compiled under Fire it gives wrong M5Bala library operation, resulting at least in wrong angle measurements. With M5stack-Core-ESP32 all OK.
    Test.ino



  • @Kabron I don't have the BALA hardware so cannot test. Can you better explain what you mean by:

    it gives wrong M5Bala library operation

    Does it work it you use the original (smaller) partition scheme on the Fire? I.e.: do we know it is connected to the partitioning at all? Or could it be some other difference between the Core and the Fire?



  • @ropHOWTO: M5Stack Fire - use the full 16MB with the Arduino IDE (UPDATED) 中说:

    @Kabron I don't have the BALA hardware so cannot test. Can you better explain what you mean by:

    it gives wrong M5Bala library operation

    Does it work it you use the original (smaller) partition scheme on the Fire? I.e.: do we know it is connected to the partitioning at all? Or could it be some other difference between the Core and the Fire?

    Not now, maybe tomorrow.



  • Well, on my office PC I had to reinstal ESP32 package and I found that your suggestions allready icluded in the new
    release. Now, regardless of choosen board( M5-Stack-Core/Fire/ESP32-Dev) I got this stange behaviour.
    It looks like very huge negative value(about 30 digits)of measured angle, which begins to rize in positive direction,
    until it reach correct value. From this point, the program could or could not continue normal run.
    I'll try to roll back the package install to see what happened.



  • @kabron
    Have you installed the gitlab repository code or the release version https://github.com/espressif/arduino-esp32/releases ?
    Because the v1.0.0 Release has a huge I2C bug that affects all readings on the bus and is only corrected in the repository



  • I istalled release, but I guess I find another reason.
    In the M5BALA stack there are three IP5306 IC on the 5V BUS.
    And one of these IC is controlled by ESP32.
    During reboot procedure trouble things occured at 5V bus Brownout
    As (thanks to M5 team) we do not still have all fucking schematics, nobody could resolve what is going on there.
    Now, the situation looks like the following: one time it could start working normally or another time it could not. Unpredictable.



  • @Kabron
    Install the github repository. The Arduino ESP32 v1.0.0 release version does not recover from failed reads on the I2C bus until the power is cycled.
    Don't know what is the purpose of multiple power management ICs if you have only one battery. But the registers of this IP 5306_I2C are similar to the IP5108 covered in http://forum.m5stack.com/post/1464
    Maybe to prevent the battery charging during boot is a workaround



  • May I suggest creating a new thread for this? It does seem like this has nothing to do with partitioning, and this will confuse people...



  • It seems that esp32 only provide 4MB flash as read only rom.As you change the app0 partition size to 6.5MB,the esp linker under arduino can only produce the max size 4MB of your code.In the file \esp32\tools\sdk\ld\esp32_out.ld,the following lines declare the max size of the readonly flash rom.
    /* Flash mapped constant data */
    drom0_0_seg (R) : org = 0x3F400018, len = 0x400000-0x18