0% found this document useful (0 votes)
108 views4 pages

ESP8266 Arduino Platform Overview

This document contains configuration settings for compiling and uploading code to the ESP8266 platform using the Arduino IDE. It specifies the compiler tools and flags, recipes for compiling C/C++ files and creating binary files, and instructions for uploading binaries to ESP8266 devices via serial or OTA network upload.

Uploaded by

anuragsharmatech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views4 pages

ESP8266 Arduino Platform Overview

This document contains configuration settings for compiling and uploading code to the ESP8266 platform using the Arduino IDE. It specifies the compiler tools and flags, recipes for compiling C/C++ files and creating binary files, and instructions for uploading binaries to ESP8266 devices via serial or OTA network upload.

Uploaded by

anuragsharmatech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

# ESP8266 platform

# ------------------------------

# For more info:


# [Link]
specification

name=ESP8266 Boards (2.7.0)


version=2.7.0

# These will be removed by the packager script when doing a JSON release

[Link]={[Link]}/tools/[Link]
[Link].elf2bin={[Link]}/tools/[Link]
[Link]={[Link]}/tools/[Link]
[Link]={[Link]}/tools/[Link]
[Link]={[Link]}/bootloaders/eboot/[Link]

compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra

build.lwip_lib=-llwip_gcc
build.lwip_include=lwip/include
build.lwip_flags=-DLWIP_OPEN_SRC

build.vtable_flags=-DVTABLES_IN_FLASH

[Link]=

build.exception_flags=-fno-exceptions
build.stdcpp_lib=-lstdc++
build.stdcpp_level=-std=gnu++11

[Link]=-u _printf_float -u _scanf_float


[Link]=

# default SDK for all boards


# (generic board overrides this variable)
[Link]=NONOSDK22x_190703
#[Link]=NONOSDK22x_191024
#[Link]=NONOSDK22x_191105

[Link]={[Link]}/bin/
[Link]={[Link]}/tools/sdk

[Link]={[Link]}/tools/sdk/libc/xtensa-lx106-elf
[Link]=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-
I{[Link]}/include" "-I{[Link]}/{build.lwip_include}" "-
I{[Link]}/include" "-I{[Link]}/core"

[Link]=xtensa-lx106-elf-gcc
[Link]=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implicit-
function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-
section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-
sections {build.exception_flags} {[Link]}

[Link]=xtensa-lx106-elf-gcc
[Link]=-c -g -x assembler-with-cpp -MMD -mlongcalls

[Link]=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-


sections -u app_entry {[Link]} -Wl,-static "-L{[Link]}/lib" "-
L{[Link]}/lib/{[Link]}" "-L{[Link]}/ld" "-
L{[Link]}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-
wrap,system_restart_local -Wl,-wrap,spi_flash_read

[Link]=xtensa-lx106-elf-gcc
[Link]=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto
-lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2
{build.stdcpp_lib} -lm -lc -lgcc

[Link]=xtensa-lx106-elf-g++
[Link]=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-
literals -fno-rtti -falign-functions=4 {build.stdcpp_level} -MMD -ffunction-
sections -fdata-sections {build.exception_flags} {[Link]}

[Link]=xtensa-lx106-elf-as

[Link]=xtensa-lx106-elf-ar
[Link]=cru

[Link]=esptool
[Link]=

[Link]=xtensa-lx106-elf-size

# This can be overriden in [Link]


build.extra_flags=-DESP8266

# These can be overridden in [Link]


compiler.c.extra_flags=
[Link].extra_flags=
compiler.S.extra_flags=
[Link].extra_flags=
[Link].extra_flags=
[Link].extra_flags=
compiler.elf2hex.extra_flags=

## generate file with git version number


## needs git
[Link]="{[Link]}/python3"
"{[Link]}" --mode header --publickey
"{[Link]}/[Link]" --out "{[Link]}/core/Updater_Signing.h"
# This is quite a working hack. This form of prebuild hook, while intuitive, is not
explicitly documented.

## Build the [Link] linker file


[Link]="{[Link]}{[Link]}" -CC -E -P
{build.vtable_flags}
"{[Link]}/tools/sdk/ld/[Link].h" -o
"{[Link]}/[Link]"
## Compile c files
[Link]="{[Link]}{[Link]}" {[Link]}
{[Link]} -D{[Link]}=1 -DF_CPU={build.f_cpu} {build.lwip_flags}
{build.debug_port} {build.debug_level} -DARDUINO={[Link]}
-DARDUINO_{[Link]} -DARDUINO_ARCH_{[Link]} -DARDUINO_BOARD="{[Link]}"
{[Link]} {build.flash_flags} {compiler.c.extra_flags} {build.extra_flags}
{includes} "{source_file}" -o "{object_file}"

## Compile c++ files


[Link]="{[Link]}{[Link]}"
{[Link]} {[Link]} -D{[Link]}=1
-DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level}
-DARDUINO={[Link]} -DARDUINO_{[Link]} -DARDUINO_ARCH_{[Link]}
-DARDUINO_BOARD="{[Link]}" {[Link]} {build.flash_flags}
{[Link].extra_flags} {build.extra_flags} {includes} "{source_file}" -o
"{object_file}"

## Compile S files
[Link]="{[Link]}{[Link]}" {[Link]}
{[Link]} -D{[Link]}=1 -DF_CPU={build.f_cpu} {build.lwip_flags}
{build.debug_port} {build.debug_level} -DARDUINO={[Link]}
-DARDUINO_{[Link]} -DARDUINO_ARCH_{[Link]} -DARDUINO_BOARD="{[Link]}"
{[Link]} {build.flash_flags} {compiler.c.extra_flags} {build.extra_flags}
{includes} "{source_file}" -o "{object_file}"

## Create archives
[Link]="{[Link]}{[Link]}" {[Link]}
{[Link].extra_flags} "{archive_file_path}" "{object_file}"

## Combine gc-sections, archives, and objects


[Link]="{[Link]}{[Link]}"
{build.exception_flags} -Wl,-Map "-Wl,{[Link]}/{build.project_name}.map"
{[Link]} {[Link].extra_flags} -o
"{[Link]}/{build.project_name}.elf" -Wl,--start-group {object_files}
"{archive_file_path}" {[Link]} -Wl,--end-group "-L{[Link]}"

## Create eeprom
[Link]=

## Create hex
[Link]="{[Link]}/python3"
"{[Link].elf2bin}" --eboot "{[Link]}" --app
"{[Link]}/{build.project_name}.elf" --flash_mode {build.flash_mode}
--flash_freq {build.flash_freq} --flash_size {build.flash_size} --path
"{[Link]}/bin" --out
"{[Link]}/{build.project_name}.bin"
[Link]="{[Link]}/python3"
"{[Link]}" --mode sign --privatekey
"{[Link]}/[Link]" --bin "{[Link]}/{build.project_name}.bin"
--out "{[Link]}/{build.project_name}.[Link]" --legacy
"{[Link]}/{build.project_name}.bin.legacy_sig"
[Link]="{[Link]}/python3"
"{[Link]}" --elf "{[Link]}/{build.project_name}.elf" --path
"{[Link]}/bin"

## Save hex
[Link].tmp_file={build.project_name}.bin
[Link].save_file={build.project_name}.{[Link]}.bin
## Compute size
[Link]="{[Link]}{[Link]}" -A
"{[Link]}/{build.project_name}.elf"
[Link]=^(?:\.irom0\.text|\.text|\.text1|\.data|\.rodata|)\s+([0-9]+).*
[Link]=^(?:\.data|\.rodata|\.bss)\s+([0-9]+).*
#[Link]=^(?:\.eeprom)\s+([0-9]+).*

# ------------------------------

[Link]=
# Because the variable expansion doesn't allow one tool to find another, the
following lines
# will point to "{[Link]}/tools/python3/python3" in GIT and
# "{[Link]}/python3" for JSON board manager releases.
[Link]={[Link]}/python3
[Link].network_cmd={[Link]}/python3

[Link]=esp
# [Link] --trace option is a debug option, not a verbose option
[Link]=
[Link]=

# First, potentially perform an erase or nothing


# Next, do the binary upload
# Combined in one rule because Arduino doesn't suport
[Link]/[Link]
[Link]="{cmd}" "{[Link]}/tools/[Link]"
--chip esp8266 --port "{[Link]}" --baud "{[Link]}" "{[Link]}"
{upload.erase_cmd} {[Link]} write_flash 0x0
"{[Link]}/{build.project_name}.bin"

[Link].network_pattern="{network_cmd}"
"{[Link]}/tools/[Link]" -i "{[Link]}" -p "{[Link]}"
"--auth={[Link]}" -f "{[Link]}/{build.project_name}.bin"

[Link]=mkspiffs
[Link]=[Link]
[Link]={[Link]}

[Link]=mklittlefs
[Link]=[Link]
[Link]={[Link]}/tools/mklittlefs

You might also like