- Notifications
You must be signed in to change notification settings - Fork13.3k
flash-size agnostic builds#6690
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from67 commits
883421141bc6bc0decdf408e3b5128e7d086104b9dda308ad719f65adfb6a00c2747a44e05cc8706342594bb156b8e4815855dd349b0164a7c9a832c75e8123f30bec955a14538942f4b2890d86d73c20dd2d5267f3c65be4534ed8bcc1343c807b098e07d71a66a89279db40c01299bd55bf938adc14a49a4d085898eeb843a096ea319e2f40f8f6665a0d9c94642183f04ff77882333347859879140104195617907ad5aa45adc25b74b119d1f20e922fea60e1bd98ebc90f45d525007602106be7adf069e54d0b606da96d9bd60b88291585a062fcf35085c4fee984582c33354f4d058c2019b32e80ac2f270878d72f6e38ba7af939b7116a26c3e7349e1f4bf87f2f7b0eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -186,6 +186,9 @@ void attachInterrupt(uint8_t pin, void (*)(void), int mode); | ||
| void detachInterrupt(uint8_t pin); | ||
| void attachInterruptArg(uint8_t pin, void (*)(void*), void* arg, int mode); | ||
| #if FLASH_MAP_SUPPORT | ||
| #include <flash_hal.h> | ||
d-a-v marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| #endif | ||
| void preinit(void); | ||
| void setup(void); | ||
| void loop(void); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| // - do not edit - autogenerated by boards.txt.py | ||
| #ifndef __FLASH_MAP_H | ||
| #define __FLASH_MAP_H | ||
| #include <stdint.h> | ||
| #include <stddef.h> | ||
| typedef struct | ||
| { | ||
| uint32_t eeprom_start; | ||
| uint32_t fs_start; | ||
| uint32_t fs_end; | ||
| uint32_t fs_block_size; | ||
| uint32_t fs_page_size; | ||
| uint32_t flash_size_kb; | ||
| } flash_map_s; | ||
| /* | ||
| Following definitions map the above structure, one per line. | ||
| FLASH_MAP_* is a user choice in sketch: | ||
| `FLASH_MAP_SETUP_CONFIG(FLASH_MAP_OTA_FS)` | ||
| Configuration is made at boot with detected flash chip size (last argument 512..16384) | ||
| Other values are defined from `tools/boards.txt.py`. | ||
| */ | ||
| #define FLASH_MAP_OTA_FS \ | ||
| { \ | ||
| { .eeprom_start = 0x402fb000, .fs_start = 0x402eb000, .fs_end = 0x402fb000, .fs_block_size = 0x1000, .fs_page_size = 0x100, .flash_size_kb = 1024 }, \ | ||
| { .eeprom_start = 0x403fb000, .fs_start = 0x403c0000, .fs_end = 0x403fb000, .fs_block_size = 0x1000, .fs_page_size = 0x100, .flash_size_kb = 2048 }, \ | ||
| { .eeprom_start = 0x405fb000, .fs_start = 0x40400000, .fs_end = 0x405fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 4096 }, \ | ||
| { .eeprom_start = 0x409fb000, .fs_start = 0x40400000, .fs_end = 0x409fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 8192 }, \ | ||
| { .eeprom_start = 0x411fb000, .fs_start = 0x40400000, .fs_end = 0x411fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 16384 }, \ | ||
| { .eeprom_start = 0x4027b000, .fs_start = 0x40273000, .fs_end = 0x4027b000, .fs_block_size = 0x1000, .fs_page_size = 0x100, .flash_size_kb = 512 }, \ | ||
| } | ||
| #define FLASH_MAP_MAX_FS \ | ||
| { \ | ||
| { .eeprom_start = 0x402fb000, .fs_start = 0x4027b000, .fs_end = 0x402fb000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 1024 }, \ | ||
| { .eeprom_start = 0x403fb000, .fs_start = 0x40300000, .fs_end = 0x403fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 2048 }, \ | ||
| { .eeprom_start = 0x405fb000, .fs_start = 0x40300000, .fs_end = 0x405fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 4096 }, \ | ||
| { .eeprom_start = 0x409fb000, .fs_start = 0x40300000, .fs_end = 0x409fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 8192 }, \ | ||
| { .eeprom_start = 0x411fb000, .fs_start = 0x40300000, .fs_end = 0x411fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 16384 }, \ | ||
| { .eeprom_start = 0x4027b000, .fs_start = 0x4025b000, .fs_end = 0x4027b000, .fs_block_size = 0x1000, .fs_page_size = 0x100, .flash_size_kb = 512 }, \ | ||
| } | ||
d-a-v marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| #define FLASH_MAP_NO_FS \ | ||
| { \ | ||
| { .eeprom_start = 0x402fb000, .fs_start = 0x402fb000, .fs_end = 0x402fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 1024 }, \ | ||
| { .eeprom_start = 0x403fb000, .fs_start = 0x403fb000, .fs_end = 0x403fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 2048 }, \ | ||
| { .eeprom_start = 0x405fb000, .fs_start = 0x405fb000, .fs_end = 0x405fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 4096 }, \ | ||
| { .eeprom_start = 0x409fb000, .fs_start = 0x409fb000, .fs_end = 0x409fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 8192 }, \ | ||
| { .eeprom_start = 0x411fb000, .fs_start = 0x411fb000, .fs_end = 0x411fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 16384 }, \ | ||
| { .eeprom_start = 0x4027b000, .fs_start = 0x4027b000, .fs_end = 0x4027b000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 512 }, \ | ||
| } | ||
| #endif // __FLASH_MAP_H | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -24,8 +24,7 @@ extern "C" { | ||||||
| #include "user_interface.h" | ||||||
| } | ||||||
| #include <flash_hal.h> | ||||||
| ||||||
| #include<flash_hal.h> | |
| #include"flash_hal.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This one has been reverted because
- mock version of
flash_hal.hneeds to be loaded first, to redefineFS_startandFS_end
This is only needed in sources files
- located in
cores/esp8266/ - which make use of
FS_startorFS_end
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -33,7 +33,7 @@ extern "C" { | ||
| }; | ||
| #include "debug.h" | ||
| #include "flash_utils.h" | ||
| #include<flash_hal.h> | ||
d-a-v marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| using namespace fs; | ||
Uh oh!
There was an error while loading.Please reload this page.