Updating flash size passed to esptool to use megabytes instead of megabits

This commit is contained in:
Chris Kerkhoff 2018-01-03 20:21:27 -06:00
parent 4715d5e8ff
commit 807240536f
6 changed files with 8 additions and 8 deletions

View file

@ -1,6 +1,6 @@
PROGRAM=i2s_audio_example PROGRAM=i2s_audio_example
EXTRA_COMPONENTS = extras/spiffs extras/i2s_dma EXTRA_COMPONENTS = extras/spiffs extras/i2s_dma
FLASH_SIZE = 32 FLASH_SIZE = 4
# spiffs configuration # spiffs configuration
SPIFFS_BASE_ADDR = 0x200000 SPIFFS_BASE_ADDR = 0x200000

View file

@ -1,6 +1,6 @@
PROGRAM=spiffs_example PROGRAM=spiffs_example
EXTRA_COMPONENTS = extras/spiffs EXTRA_COMPONENTS = extras/spiffs
FLASH_SIZE = 32 FLASH_SIZE = 4
# spiffs configuration # spiffs configuration
SPIFFS_BASE_ADDR = 0x200000 SPIFFS_BASE_ADDR = 0x200000

View file

@ -1 +1 @@
FLASH_SIZE ?= 32 FLASH_SIZE ?= 4

View file

@ -29,7 +29,7 @@ and size is the location of SPIFFS region in SPI flash and its size.
In order to use file system in a project the following steps should be made: In order to use file system in a project the following steps should be made:
* Add SPIFFS component in a project Makefile `EXTRA_COMPONENTS = extras/spiffs` * Add SPIFFS component in a project Makefile `EXTRA_COMPONENTS = extras/spiffs`
* Specify your flash size in the Makefile `FLASH_SIZE = 32` * Specify your flash size in the Makefile `FLASH_SIZE = 4`
* Specify the start address of file system region on the flash memory * Specify the start address of file system region on the flash memory
`SPIFFS_BASE_ADDR = 0x200000`. It still needed even for `SPIFFS_SINGLETON = 0` `SPIFFS_BASE_ADDR = 0x200000`. It still needed even for `SPIFFS_SINGLETON = 0`
in order to flash SPIFFS image to the right location during `make flash`. in order to flash SPIFFS image to the right location during `make flash`.
@ -42,7 +42,7 @@ In the end the Makefile should look like:
``` ```
PROGRAM=spiffs_example PROGRAM=spiffs_example
EXTRA_COMPONENTS = extras/spiffs EXTRA_COMPONENTS = extras/spiffs
FLASH_SIZE = 32 FLASH_SIZE = 4
SPIFFS_BASE_ADDR = 0x200000 SPIFFS_BASE_ADDR = 0x200000
SPIFFS_SIZE = 0x100000 SPIFFS_SIZE = 0x100000

View file

@ -10,7 +10,7 @@
# Flash size in megabits # Flash size in megabits
# Valid values are same as for esptool.py - 2,4,8,16,32 # Valid values are same as for esptool.py - 2,4,8,16,32
FLASH_SIZE ?= 16 FLASH_SIZE ?= 2
# Flash mode, valid values are same as for esptool.py - qio,qout,dio.dout # Flash mode, valid values are same as for esptool.py - qio,qout,dio.dout
FLASH_MODE ?= qio FLASH_MODE ?= qio
@ -30,7 +30,7 @@ ESPPORT ?= /dev/ttyUSB0
ESPBAUD ?= 115200 ESPBAUD ?= 115200
# firmware tool arguments # firmware tool arguments
ESPTOOL_ARGS=-fs $(FLASH_SIZE)m -fm $(FLASH_MODE) -ff $(FLASH_SPEED)m ESPTOOL_ARGS=-fs $(FLASH_SIZE)MB -fm $(FLASH_MODE) -ff $(FLASH_SPEED)m
# set this to 0 if you don't need floating point support in printf/scanf # set this to 0 if you don't need floating point support in printf/scanf

View file

@ -4,7 +4,7 @@ EXTRA_COMPONENTS=extras/dhcpserver extras/spiffs
PROGRAM_SRC_DIR = . ./cases PROGRAM_SRC_DIR = . ./cases
FLASH_SIZE = 32 FLASH_SIZE = 4
# spiffs configuration # spiffs configuration
SPIFFS_BASE_ADDR = 0x200000 SPIFFS_BASE_ADDR = 0x200000