1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/esp8266_sdk/bootloader/sdkconfig_default.h
iosabi 073b2209da cpu/esp8266: Build the SDK bootloader from source.
We had four versions of pre-built bootloaders for the esp8266 with
different settings of logging and color logging. These bootloaders were
manually built from the SDK and shipped with RIOT-OS source code.
However there are more settings that affect the bootloader build that
are relevant to the app or final board that uses this bootloader. In
particular, flash size and flash speed is important for the bootloader
to be able to load an app from a large partition table at the fastest
speed supported by the board layout and flash chip.

Another example is the UART baudrate of the logging output from the
bootloader. The boot ROM will normally start at a baud rate of 74880
(depending on the crystal installed), so it might make sense to keep
the UART output at the same speed so we can debug boot modes and
bootloader with the same terminal.

This patch builds the bootloader.bin file from the ESP8266 SDK source
code. The code is built as a module (esp8266_bootloader) which at the
moment doesn't generate any object code for the application and only
produces a bootloader.bin file set to the BOOTLOADER_BIN make variable
for the esptool.inc.mk to flash.

The code needs to be compiled and linked with custom rules defined in
the module's Makefile since the bootloader.bin is its own separate
application.

The `BOOTLOADER_BIN` variable is changed from a path relative to the
`$(RIOTCPU)/$(CPU)/bin/` directory to be full path. This makes it easier
for applications or board to provide their own bootloader binary if
needed.

As a result of building the bootloader from source we fixed the issue of
having a large partition table. Fixes #16402.
2022-12-22 12:18:34 +01:00

29 lines
665 B
C

/*
* Generated by ./update_mk.sh, don't modify directly.
* Default CONFIG_ parameters from the SDK package.
*/
#ifndef SDKCONFIG_DEFAULT_H
#define SDKCONFIG_DEFAULT_H
#ifdef __cplusplus
extern "C" {
#endif
#define CONFIG_BOOTLOADER_INIT_SPI_FLASH 1
#define CONFIG_CONSOLE_UART_NUM 0
#define CONFIG_CRYSTAL_USED_26MHZ 1
#define CONFIG_LOG_DEFAULT_LEVEL 3
#define CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF 1
#define CONFIG_PARTITION_TABLE_OFFSET 0x8000
#define CONFIG_SPI_FLASH_MODE 0x0
#define CONFIG_SSL_USING_MBEDTLS 1
#define CONFIG_TARGET_PLATFORM_ESP8266 1
#define CONFIG_USING_NEW_ETS_VPRINTF 1
#ifdef __cplusplus
}
#endif
#endif /* SDKCONFIG_DEFAULT_H */