-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile-user.mk
66 lines (56 loc) · 2.24 KB
/
Makefile-user.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
## Local build configuration
## Parameters configured here will override default and ENV values.
## Add your source directories here separated by space
MODULES = app MD_Parola/src MD_MAX72XX/src
EXTRA_INCDIR = include MD_Parola/src MD_MAX72XX/src
## ESP_HOME sets the path where ESP tools and SDK are located.
ESP_HOME = /opt/esp-open-sdk
## SMING_HOME sets the path where Sming framework is located.
SMING_HOME = /opt/Sming/Sming
## COM port parameter is reqruied to flash firmware correctly.
COM_PORT = /dev/ttyUSB0
## Com port speed
COM_SPEED = 230400
#COM_SPEED = 115200
#COM_SPEED_SERIAL = 115200
## Configure flash parameters (for ESP12-E and other new boards):
SPI_MODE = qio
## SPIFFS options
# DISABLE_SPIFFS = 1
SPIFF_FILES = web/build
#### overridable rBoot options ####
## use rboot build mode
RBOOT_ENABLED ?= 0
## enable big flash support (for multiple roms, each in separate 1mb block of flash)
RBOOT_BIG_FLASH ?= 1
## two rom mode (where two roms sit in the same 1mb block of flash)
#RBOOT_TWO_ROMS ?= 1
## size of the flash chip
SPI_SIZE ?= 1M
## output file for first rom (.bin will be appended)
RBOOT_ROM_0 ?= rom0
## input linker file for first rom
#RBOOT_LD_0 ?= rom0.ld
## these next options only needed when using two rom mode
#RBOOT_ROM_1 ?= rom1
#RBOOT_LD_1 ?= rom1.ld
## size of the spiffs to create
SPIFF_SIZE ?= 150000
## option to completely disable spiffs
#DISABLE_SPIFFS = 1
## flash offsets for spiffs, set if using two rom mode or not on a 4mb flash
## (spiffs location defaults to the mb after the rom slot on 4mb flash)
#RBOOT_SPIFFS_0 ?= 0x100000
#RBOOT_SPIFFS_1 ?= 0x300000
## esptool2 path
#ESPTOOL2 ?= esptool2
flash2:
$(vecho) "Killing Terminal to free $(COM_PORT)"
-$(Q) $(KILL_TERM)
$(vecho) "Writing $(basename $(IMAGE_MAIN)) $(FW_BASE)/$(IMAGE_MAIN) $(IMAGE_SDK_OFFSET) $(FW_BASE)/$(IMAGE_SDK)"
$(ESPTOOL) -p $(COM_PORT) -b $(COM_SPEED_ESPTOOL) write_flash $(flashimageoptions) $(basename $(IMAGE_MAIN)) $(FW_BASE)/$(IMAGE_MAIN)
#$(IMAGE_SDK_OFFSET) $(FW_BASE)/$(IMAGE_SDK)
flash3:
$(vecho) "Killing Terminal to free $(COM_PORT)"
-$(Q) $(KILL_TERM)
$(ESPTOOL) -p $(COM_PORT) -b $(COM_SPEED_ESPTOOL) write_flash $(flashimageoptions) $(basename $(IMAGE_MAIN)) 0x02000 $(RBOOT_ROM_0)