Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flash size as megabytes #536

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/i2s_audio/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PROGRAM=i2s_audio_example
EXTRA_COMPONENTS = extras/spiffs extras/i2s_dma
FLASH_SIZE = 32
FLASH_SIZE = 4

# spiffs configuration
SPIFFS_BASE_ADDR = 0x200000
Expand Down
2 changes: 1 addition & 1 deletion examples/spiffs/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PROGRAM=spiffs_example
EXTRA_COMPONENTS = extras/spiffs
FLASH_SIZE = 32
FLASH_SIZE = 4

# spiffs configuration
SPIFFS_BASE_ADDR = 0x200000
Expand Down
2 changes: 1 addition & 1 deletion examples/wificfg/local.mk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FLASH_SIZE ?= 32
FLASH_SIZE ?= 4
4 changes: 2 additions & 2 deletions extras/spiffs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
* 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
`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`.
Expand All @@ -42,7 +42,7 @@ In the end the Makefile should look like:
```
PROGRAM=spiffs_example
EXTRA_COMPONENTS = extras/spiffs
FLASH_SIZE = 32
FLASH_SIZE = 4

SPIFFS_BASE_ADDR = 0x200000
SPIFFS_SIZE = 0x100000
Expand Down
4 changes: 2 additions & 2 deletions parameters.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# Flash size in megabits
# 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 ?= qio
Expand All @@ -30,7 +30,7 @@ ESPPORT ?= /dev/ttyUSB0
ESPBAUD ?= 115200

# 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
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ EXTRA_COMPONENTS=extras/dhcpserver extras/spiffs

PROGRAM_SRC_DIR = . ./cases

FLASH_SIZE = 32
FLASH_SIZE = 4

# spiffs configuration
SPIFFS_BASE_ADDR = 0x200000
Expand Down