Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

Can't change fs partition size

jstevewoodjstevewood California
edited March 7 in Mongoose OS

I am using an 8 Mbyte Flash WROOM-32, with MOS 2.12.1 I would like to change the fs_0 and fs_1 partition definitions from 256K to 1.5M. According to other posts, it is only necessary to modify the YML file (as follows):

author: mongoose-os
description: A Mongoose OS app skeleton
version: 1.0
libs_version: ${mos.version}
modules_version: ${mos.version}
mongoose_os_version: ${mos.version}
arch: esp32
sources:
  - src
filesystem:
  - fs
libs:
  - origin: https://github.com/mongoose-os-libs/wifi
  - origin: https://github.com/mongoose-os-libs/rpc-service-config
  - origin: https://github.com/mongoose-os-libs/rpc-service-fs
  - origin: https://github.com/mongoose-os-libs/rpc-uart
  - origin: https://github.com/mongoose-os-libs/rpc-service-ota
  - origin: https://github.com/mongoose-os-libs/ota-http-server
  - origin: https://github.com/mongoose-os-libs/mjs
build_vars:
    FS_SIZE: 0x180000
manifest_version: 2017-05-18

I am able to successfully build and flash using this version of MOS and this YML. However, in looking at the partition definitions upon bootup , nothing in the partition table has changed (as follows). No matter what number I use for FS_SIZE, nothing changes.
Is there something else that must be done?
Thanks for your help,
JSW

[Mar  6 14:53:34.669] ets Jun  8 2016 00:22:57
[Mar  6 14:53:34.679]
[Mar  6 14:53:34.680] rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[Mar  6 14:53:34.680] configsip: 0, SPIWP:0xee
[Mar  6 14:53:34.680] clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[Mar  6 14:53:34.680] mode:DIO, clock div:1
[Mar  6 14:53:34.681] load:0x3fff0018,len:4
[Mar  6 14:53:34.681] load:0x3fff001c,len:6188
[Mar  6 14:53:34.681] load:0x40078000,len:9592
[Mar  6 14:53:34.681] load:0x40080400,len:6944
[Mar  6 14:53:34.682] entry 0x40080740
[Mar  6 14:53:34.682] [0;32mI (28) boot: ESP-IDF v3.2-r2 2nd stage bootloader[0m
[Mar  6 14:53:34.682] [0;32mI (28) boot: compile time 22:52:39[0m
[Mar  6 14:53:34.682] [0;32mI (28) boot: Enabling RNG early entropy source...[0m
[Mar  6 14:53:34.683] [0;32mI (33) qio_mode: Enabling default flash chip QIO[0m
[Mar  6 14:53:34.683] [0;32mI (38) boot: SPI Speed      : 80MHz[0m
[Mar  6 14:53:34.683] [0;32mI (42) boot: SPI Mode       : QIO[0m
[Mar  6 14:53:34.683] [0;32mI (46) boot: SPI Flash Size : 8MB[0m
[Mar  6 14:53:34.684] [0;32mI (50) boot: Partition Table:[0m
[Mar  6 14:53:34.684] [0;32mI (54) boot: ## Label            Usage          Type ST Offset   Length   Flags[0m
[Mar  6 14:53:34.684] [0;32mI (62) boot:  0 nvs              WiFi data        01 02 00009000 00004000 00000000[0m
[Mar  6 14:53:34.685] [0;32mI (70) boot:  1 otadata          OTA data         01 00 0000d000 00002000 00000000[0m
[Mar  6 14:53:34.685] [0;32mI (78) boot:  2 app_0            OTA app          00 10 00010000 00180000 00000000[0m
[Mar  6 14:53:34.685] [0;32mI (87) boot:  3 fs_0             SPIFFS           01 82 00190000 00040000 00000000[0m
[Mar  6 14:53:34.685] [0;32mI (95) boot:  4 app_1            OTA app          00 11 001d0000 00180000 00000000[0m
[Mar  6 14:53:34.686] [0;32mI (103) boot:  5 fs_1             SPIFFS           01 82 00350000 00040000 00000000[0m
[Mar  6 14:53:34.686] [0;32mI (111) boot: End of partition table[0m
[Mar  6 14:53:34.686] [0;32mI (116) boot: OTA data 0: seq 0x00000001, st 0x10, CRC 0x157a2b85, valid? 1[0m
[Mar  6 14:53:34.717] [0;32mI (123) boot: OTA data 1: seq 0x00000000, st 0x00, CRC 0x00000000, valid? 0[0m
[Mar  6 14:53:34.721] [0;32mI (131) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x289ac (166316) map[0m
[Mar  6 14:53:34.797] [0;32mI (183) esp_image: segment 1: paddr=0x000389d4 vaddr=0x3ffb0000 size=0x025f8 (  9720) load[0m
[Mar  6 14:53:34.798] [0;32mI (186) esp_image: segment 2: paddr=0x0003afd4 vaddr=0x40080000 size=0x00400 (  1024) load[0m
[Mar  6 14:53:34.798] [0;32mI (190) esp_image: segment 3: paddr=0x0003b3dc vaddr=0x40080400 size=0x04c34 ( 19508) load[0m
[Mar  6 14:53:34.798] [0;32mI (205) esp_image: segment 4: paddr=0x00040018 vaddr=0x400d0018 size=0xbcd98 (773528) map[0m
[Mar  6 14:53:35.094] [0;32mI (410) esp_image: segment 5: paddr=0x000fcdb8 vaddr=0x40085034 size=0x0e8f0 ( 59632) load[0m
[Mar  6 14:53:35.109] [0;32mI (428) esp_image: segment 6: paddr=0x0010b6b0 vaddr=0x400c0000 size=0x00034 (    52) load[0m
[Mar  6 14:53:35.110] [0;32mI (439) boot: Loaded app from partition at offset 0x10000[0m
[Mar  6 14:53:35.110] [0;32mI (440) boot: Disabling RNG early entropy source...[0m
[Mar  6 14:53:35.110] [0;32mI (440) cpu_start: Pro cpu up.[0m
[Mar  6 14:53:35.111] [0;32mI (444) cpu_start: Single core mode[0m
[Mar  6 14:53:35.111] [0;32mI (448) heap_init: Initializing. RAM available for dynamic allocation:[0m
[Mar  6 14:53:35.111] [0;32mI (455) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
[Mar  6 14:53:35.112] [0;32mI (461) heap_init: At 3FFBA8B8 len 00025748 (149 KiB): DRAM[0m
[Mar  6 14:53:35.112] [0;32mI (467) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM[0m
[Mar  6 14:53:35.112] [0;32mI (474) heap_init: At 40078000 len 00008000 (32 KiB): IRAM[0m
[Mar  6 14:53:35.113] [0;32mI (480) heap_init: At 40093924 len 0000C6DC (49 KiB): IRAM[0m
[Mar  6 14:53:35.113] [0;32mI (486) cpu_start: Pro cpu start user code[0m
[Mar  6 14:53:35.113] [0;32mI (167) cpu_start: Starting scheduler on PRO CPU.[0m
[Mar  6 14:53:35.113] mgos_hal_freertos.c:177 PartitionTest 1.0 (20190306-225251)
[Mar  6 14:53:35.114] mgos_hal_freertos.c:179 Mongoose OS 2.12.1 (20190306-225250/2.12.1-gdd403d6)
[Mar  6 14:53:35.114] mgos_hal_freertos.c:182 CPU: 160 MHz, heap: 289356 total, 257624 free
[Mar  6 14:53:35.114] mgos_hal_freertos.c:184 Newlib 2.2.0
[Mar  6 14:53:35.114] esp32_main.c:116        ESP-IDF v3.2-r2
[Mar  6 14:53:35.114] esp32_main.c:119        Boot partition: app_0; flash: 8M
[Mar  6 14:53:35.115] mg_lwip_ev_mgr.c:93     Mongoose 6.13, LwIP 2.0.3
[Mar  6 14:53:35.115] mg_ssl_if_mbedtls.c:57  mbed TLS 2.13.1-cesanta5
[Mar  6 14:53:35.115] mgos_vfs_dev.c:73       fs_0: esp32part ({"label": "fs_0"}), size 262144
[Mar  6 14:53:35.117] mgos_vfs_dev.c:73       fs_1: esp32part ({"label": "fs_1"}), size 262144
[Mar  6 14:53:35.135] mgos_vfs.c:147          /: SPIFFS @ fs_0, opts {"bs": 4096, "ps": 256, "es": 4096}
[Mar  6 14:53:35.273] mgos_vfs.c:319          /: size 233681, used: 126755, free: 106926
[Mar  6 14:53:35.273] mgos_sys_config.c:231   Loading conf0.json
[Mar  6 14:53:35.274] mgos_sys_config.c:231   Loading conf1.json
......

Comments

  • nliviunliviu Romania
    edited March 7

    FS_SIZE has been renamed MGOS_ROOT_FS_SIZE

  • jstevewoodjstevewood California

    Hi nliviu,

    Thanks for your help. I changed the yml file, as indicated (to MGOS_ROOT_FS_SIZE: 0x180000). Now, the build fails. Buried in the build.log file is the following statement:

    Partitions defined in '/mongoose-os/fw/platforms/esp32/src/partitions_mgos.csv' occupy 6.1MB of flash (6356992 bytes) which does not fit in configured flash size 4MB. Change the flash size in menuconfig under the 'Serial Flasher Config' menu.

    How do I do this?

    Thanks,

    JSW

  • nliviunliviu Romania

    I forgot

    build_vars:
      ESP_IDF_SDKCONFIG_OPTS: ${build_vars.ESP_IDF_SDKCONFIG_OPTS} CONFIG_ESPTOOLPY_FLASHSIZE_4MB=}
      ESP_IDF_SDKCONFIG_OPTS: ${build_vars.ESP_IDF_SDKCONFIG_OPTS} CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y CONFIG_ESPTOOLPY_FLASHSIZE="8MB"}
    

    Sorry :(

  • jstevewoodjstevewood California

    Hi nliviu,

    Thanks.

    Don't I also need to add the following to the build_vars?

    APP_SLOT_SIZE: xxxxxx
    FS_ADDR: xxxxxx

    Also, why the change of name?

    SW

  • nliviunliviu Romania

    The name changed at this commit back in September 2018.
    No, no need to change the other vars.

  • jstevewoodjstevewood California

    Thanks,

    SW

Sign In or Register to comment.