forked from pfalcon/yaota8266
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h.example
39 lines (31 loc) · 1.89 KB
/
config.h.example
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
// This is user-specific config file for yaota8266 OTA bootloader.
// For compilation to succeed, this file should be copied to "config.h"
// and any settings related to RSA keys replaced with your values. Do
// not use values in this example as is - it is a security issue. You
// won't be able to perform any OTA update (because you don't have a
// private key for the public key specified here), but I will own
// your system (because I have it).
// Offset of the main application (one which will undergo OTA update)
// Default start of OTA region == size of boot8266 + ota-server, aligned
// (size of yaota8266.bin as produced by the top-level Makefile).
#define MAIN_APP_OFFSET 0x3c000
// Baud rate for serial output. Set to 0 to not set baud rate explicitly,
// which them will be the default 74880.
#define BAUD_RATE 115200
// Modulus of RSA public key used to verify OTA signature
// (size is 512 bits, exponent is hardcoded at 3).
#define MODULUS "\xce\x4a\xaf\x65\x0d\x4a\x74\xda\xc1\x30\x59\x80\xcf\xdd\xe8\x2a\x2e\x1d\xf7\xa8\xc9\x6c\xa9\x4a\x2c\xb7\x8a\x5a\x2a\x25\xc0\x2b\x7b\x2f\x58\x4c\xa8\xcb\x82\x07\x06\x08\x7e\xff\x1f\xce\x47\x13\x67\x94\x5f\x9a\xac\x5e\x7d\xcf\x63\xf0\x08\xe9\x51\x98\x95\x01"
// How long to wait for next expected packet before assuming that
// transfer is broken and restart reception from beginning.
#define PKT_WAIT_MS 10000
// If first OTA packet isn't received during this time, reboot. This
// protects against being stuck in OTA mode if entered by accident.
#define IDLE_REBOOT_MS 60000
// Parameters below can be configured in flash too
// GPIO mask. Default value filters out UART0 and QSPI for FlashROM.
// If value is 0, then OTA is entered unconditionally. By adjusting
// IDLE_REBOOT_MS, you can make a device spend minimal time in this
// unconditional OTA mode.
#define GPIO_MASK 0xf035
// How long to wait for GPIO change to go into OTA mode.
#define GPIO_WAIT_MS 3000