Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

U-BLOX NINA W - urgent

Sir,
How are you ?
i am support to u-blox **in Brazil (Smartcore). We use the U-BLOX NINA W module that uses ESP32, **but with 2Mbytes FLASH.
I was writing a blog, i successfully transfer the app to NINA W, but got the following error, i think that is partition size problem. Does the mongoose run using 2Mb ESP32 Flash ? How can i solve this ?

Thank you!

Comments

  • tcpipchiptcpipchip Blumenau
    edited January 4

    Thanks to help me!
    where is the
    mongoose-os/fw/platforms/esp32/Makefile.build file ?
    Who install it ?
    I only used MOS.exe

  • rodrmigurodrmigu Fairfax, Virginia

    Olá,

    You won't see it because this is done on their remote environment, so I think will be easier if you use local build using docker, someone please correct if I'm wrong.

    I don't use windows for microcontroller development, only linux. So, use the following approach for linux:

    • Install mos for linux.

    • Install docker. After install docker, add your user to docker group, then logout and login back:

    sudo usermod -aG docker $USER
    logout
    
    • For the first time, just to download the libraries, use something like this (change the location of --libs-dir to your preferred place)
    mkdir ~/mongoose/libs
    mos build--platform esp32 --local --libs-dir ~/mongoose/libs 
    

    You will find the Makefile.build in the location: ~/mongoose/libs/modules/mongoose-os/fw/platforms/esp32/Makefile.build

    So, then you make the changes in the link mentioned by Liviu. In order to not overwrite the changes you made in Makefile.build , you could use the following to prevent libs from being updated:

    mos build--platform esp32 --local --libs-dir ~/mongoose/libs --no-libs-update
    

    Here are some tips on docker:

    - List downloaded images
    $ docker image ls
    
    - When compiling, you can see the docker containers running, after the compile finishes, you won't see it
    $ docker ps -a
    $ docker container ls -a
    

    Hope this helps

    Saudações
    Rodrigo

  • tcpipchiptcpipchip Blumenau

    Rodrigo
    I will install docker and try to run on NINA W!!!!
    Obrigado
    Miguel

  • nliviunliviu Romania

    If you modify a file in libs-dir, there is no need to use the flag --no-libs-update.
    mos will say something like <libs-dir>/modules/mongoose-os exists and is dirty, leaving it intact and will not update the module/library.

    Thanked by 1rodrmigu
  • tcpipchiptcpipchip Blumenau

    no success on windows
    I will try now on LINUX

    nliviu said
    you may be able to squeeze into 2MB by reducing FS_SIZE and APP_SLOT_SIZE
    https://github.com/cesanta/mongoose-os/blob/master/fw/platforms/esp32/Makefile.build#L63

    But default FS_SIZE + APP_SLOT_SIZE is already 2Mb in that github

  • tcpipchiptcpipchip Blumenau

    I guess that this the correct to 2Mb flash

    export APP_SLOT_SIZE ?= 0x140000 <========
    FS_IMG = $(FW_STAGING_DIR)/fs.img
    export ESP_IDF_EXTRA_PARTITION
    export NVS_ADDR = 0x9000 <===========
    export NVS_SIZE = 0x5000 <===========
    export APP_OFFSET = 0x10000 <========
    export OTA_DATA_ADDR = 0xe000 <===========
    export OTA_DATA_SIZE = 0x2000 <==========

    I have to test late on LINUX

  • Rodrigo, can you test making a config with 2MB flash ? (esp32)
  • tcpipchiptcpipchip Blumenau
    edited January 21

    I finally can compile with linux.

    I had changed the APP_SLOT to lower size...but i am always having partion error!
    PARTITION 4 INVALID
    offset 0x1d0000 size 0x180000 exceds flash chip size!
    Not make sense that values, never changes...

    why this offet 0x1d0000 ? i cant find on Makefile.build

    I change the APP_SLOT and always gives the same address.

    Looks that changing
    ~/mongoose/libs/modules/mongoose-os/fw/platforms/esp32/Makefile.build
    Dont make diffence after execute
    mos build--platform esp32 --local --libs-dir ~/mongoose/libs --no-libs-update
    and then
    mos flash --port /dev/ttyUSBx

    please, change export APP_SLOT_SIZE ?= 0xB8000, and see if works there :neutral:

    Please, help me!

  • rodrmigurodrmigu Fairfax, Virginia

    Sorry, but I'm pretty new on Mongoose as well, started to use it about a month ago. So I would recommend you to try reach out these guys through chat, I think some guys there would help on this particular matter better than me.

    Good lucky.

Sign In or Register to comment.