mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
cleanup/unify flash sector size define value (#5327)
* cleanup/unify sector size define value * replicate spi_flash_sec_size.h file for host tests * further flash geometry cleanup, remove host test duplicate file
This commit is contained in:
@ -17,11 +17,13 @@ AR := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-ar
|
||||
LD := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-gcc
|
||||
OBJDUMP := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-objdump
|
||||
|
||||
|
||||
INC += -I../../tools/sdk/include
|
||||
CFLAGS += -std=gnu99
|
||||
|
||||
CFLAGS += -O0 -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals
|
||||
|
||||
CFLAGS += $(INC)
|
||||
|
||||
LDFLAGS += -nostdlib -Wl,--no-check-sections -umain
|
||||
|
||||
LD_SCRIPT := -Teboot.ld
|
||||
|
Binary file not shown.
@ -8,15 +8,19 @@
|
||||
#ifndef FLASH_H
|
||||
#define FLASH_H
|
||||
|
||||
|
||||
/* The geometry defines are placed in the sdk. The .h was factored out for reuse by eboot here.
|
||||
* Beware: this means that eboot has an external dependency.
|
||||
* The following .h is placed in tools/sdk/includes
|
||||
*/
|
||||
#include <spi_flash_geometry.h>
|
||||
|
||||
int SPIEraseBlock(uint32_t block);
|
||||
int SPIEraseSector(uint32_t sector);
|
||||
int SPIRead(uint32_t addr, void *dest, size_t size);
|
||||
int SPIWrite(uint32_t addr, void *src, size_t size);
|
||||
int SPIEraseAreaEx(const uint32_t start, const uint32_t size);
|
||||
|
||||
#define FLASH_SECTOR_SIZE 0x1000
|
||||
#define FLASH_BLOCK_SIZE 0x10000
|
||||
#define APP_START_OFFSET 0x1000
|
||||
|
||||
typedef struct {
|
||||
unsigned char magic;
|
||||
@ -25,7 +29,7 @@ typedef struct {
|
||||
/* SPI Flash Interface (0 = QIO, 1 = QOUT, 2 = DIO, 0x3 = DOUT) */
|
||||
unsigned char flash_mode;
|
||||
|
||||
/* High four bits: 0 = 512K, 1 = 256K, 2 = 1M, 3 = 2M, 4 = 4M,
|
||||
/* High four bits: 0 = 512K, 1 = 256K, 2 = 1M, 3 = 2M, 4 = 4M, 8 = 8M, 9 = 16M
|
||||
Low four bits: 0 = 40MHz, 1= 26MHz, 2 = 20MHz, 0xf = 80MHz */
|
||||
unsigned char flash_size_freq;
|
||||
|
||||
|
Reference in New Issue
Block a user