Close
0%
0%

ESP32 Micropython with 8MB flash

Installing Micropython on ESP32-DevKitC-IVE using all 8M flash

Similar projects worth following
Install Micropython on ESP32-DevKitC-IVE and utilize all 8M of Flash and SPIRAM (4MB)

The ESP32-DevKitC-IVE module has additional flash and 8M SPIRAM.   The available prebuilt Micropython firmware available does not utilize the doubled flash space ( 4M increased to 8M ). 

Another important feature that needs some attention is the external antenna option.  This board comes with both the on-board and external antenna disconnected.  To protect the transmitter, one of these antenna should be selected and configured ( soldering! ) before the first power up of the module.  The difficult part here - the tiny connection requires fine soldering skills at a minimum.

This process will increase the storage available in the filesystem from:

disk free:  1.972656 MB
memory free:  99.86%

to

disk free:  5.976563 MB
memory free:  99.86%



IMG_1420.jpeg

This shows the tiny solder strap to select the antenna. I use 30ga wire to ensure a good low impedance connection.

JPEG Image - 1.58 MB - 08/20/2020 at 23:17

Preview
Download

  • 1 × ESP32 8M flash 8M spiram ESP32-DevKitC-IVE
  • 1 × External antenna cable
  • 1 × External antenna

View project log

  • 1
    Create Micropython build env on OSX 10.15.6

    Reference: https://docs.espressif.com/projects/esp-idf/en/v3.3.2/get-started/macos-setup.html

    Prerequisites:

    Python3 and git ( I use brew ). Python should already be in your path. 

    esptool   ( pip3 install esptool )

    After flashing the firmware - Ampy is used to run the initial configuration scripts.

     --- Create two directories for the devtools. 

    cd ~
    mkdir ~/esp
    mkdir ~/Micropython
    
    cd ~/esp
    git clone -b v3.3.2 --recursive https://github.com/espressif/esp-idf.git
    
    
    

      --- Add the newly installed IDF path to your environment.  I use .bash_profile

    export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"
    export IDF_PATH=($HOME)/esp/esp-idf
       
    

    Dont forget to source the env file to activate the new settings:

    source ~/.bash_profile


      --- Install the python requirements for the ESP-IDF

    python3 -m pip install --user -r $IDF_PATH/requirements.txt

     --- Clone the micropython repository

    cd ~/Micropython
    git clone  https://github.com/micropython/micropython.git
  • 2
    Configuring the ESP32 port for build

    Reference: https://github.com/micropython/micropython/tree/master

    ---  Build the cross-compiler

    cd ~/Micropython/micropython/mpy-cross
    make

     --- Modfy the Makefile

    cd ~/Micropython/micropython/ports/esp32
    

     Edit the Makefile to have these variables set for the desired build

    ESPIDF ?=$(HOME)/esp/esp-idf
    BOARD ?= GENERIC_SPIRAM

    --- Modify the partition file  partitions.csv

    The below is how the file should look.  You should only have to change the last line, at the end from 0x200000   to   0x600000

    # Notes: the offset of the partition table itself is set in
    # $ESPIDF/components/partition_table/Kconfig.projbuild and the
    # offset of the factory/ota_0 partition is set in makeimg.py
    # Name,   Type, SubType, Offset,  Size, Flags
    nvs,      data, nvs,     0x9000,  0x6000,
    phy_init, data, phy,     0xf000,  0x1000,
    factory,  app,  factory, 0x10000, 0x180000,
    vfs,      data, fat,     0x200000, 0x600000,

    --- Run make

    make


    A sub-directory will be created with the compile output ( including the firmware.bin )

    build-GENERIC_SPIRAM

  • 3
    Device flashing

     --- Erase the flash, if needed

    esptool.py --chip esp32 --port /dev/cu.SLAB_USBtoUART erase_flash

      --- Install the firmware.bin file onto the device

    esptool.py --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 460800 write_flash -z 0x1000 firmware.bin

View all 4 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates