2016-10-06 13:21:30 +02:00
|
|
|
name=ESP32 Arduino
|
|
|
|
version=0.0.1
|
|
|
|
|
|
|
|
runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf
|
2017-01-19 02:24:21 +01:00
|
|
|
|
2017-01-19 14:58:29 +01:00
|
|
|
tools.esptool.cmd="{runtime.platform.path}/tools/esptool"
|
|
|
|
tools.esptool.cmd.windows="{runtime.platform.path}/tools/esptool.exe"
|
2016-10-06 13:21:30 +02:00
|
|
|
|
2017-03-11 07:15:44 +01:00
|
|
|
tools.esptool.network_cmd=python "{runtime.platform.path}/tools/espota.py"
|
|
|
|
tools.esptool.network_cmd.windows="{runtime.platform.path}/tools/espota.exe"
|
|
|
|
|
2017-02-06 14:17:11 +01:00
|
|
|
tools.gen_esp32part.cmd=python "{runtime.platform.path}/tools/gen_esp32part.py"
|
|
|
|
tools.gen_esp32part.cmd.windows="{runtime.platform.path}/tools/gen_esp32part.exe"
|
|
|
|
|
2016-10-06 13:21:30 +02:00
|
|
|
compiler.warning_flags=-w
|
|
|
|
compiler.warning_flags.none=-w
|
|
|
|
compiler.warning_flags.default=
|
2016-12-30 00:28:30 +01:00
|
|
|
compiler.warning_flags.more=-Wall -Werror=all
|
|
|
|
compiler.warning_flags.all=-Wall -Werror=all -Wextra
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
|
|
|
|
compiler.sdk.path={runtime.platform.path}/tools/sdk
|
2017-03-11 07:15:44 +01:00
|
|
|
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bluedroid" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mbedtls_port" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
compiler.c.cmd=xtensa-esp32-elf-gcc
|
2016-12-30 00:28:30 +01:00
|
|
|
compiler.c.flags=-std=gnu99 -Os -g3 -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
compiler.cpp.cmd=xtensa-esp32-elf-g++
|
2016-12-30 00:28:30 +01:00
|
|
|
compiler.cpp.flags=-std=gnu++11 -fno-exceptions -fno-rtti -Os -g3 -Wpointer-arith -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -MMD -c
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
compiler.S.cmd=xtensa-esp32-elf-gcc
|
|
|
|
compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
|
|
|
|
|
|
|
|
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
|
2016-12-30 00:28:30 +01:00
|
|
|
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority
|
2017-02-23 00:11:57 +01:00
|
|
|
compiler.c.elf.libs=-lgcc -lstdc++ -lapp_update -lbootloader_support -lbt -lbtdm_app -lc -lc_nano -lcoap -lcoexist -lcore -lcxx -ldriver -lesp32 -lethernet -lexpat -lfatfs -lfreertos -lhal -ljson -llog -llwip -lm -lmbedtls -lmdns -lmicro-ecc -lnet80211 -lnewlib -lnghttp -lnvs_flash -lopenssl -lphy -lpp -lrtc -lrtc_clk -lsdmmc -lsmartconfig -lspi_flash -ltcpip_adapter -lulp -lvfs -lwpa -lwpa2 -lwpa_supplicant -lwps -lxtensa-debug-module
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
compiler.as.cmd=xtensa-esp32-elf-as
|
|
|
|
|
|
|
|
compiler.ar.cmd=xtensa-esp32-elf-ar
|
|
|
|
compiler.ar.flags=cru
|
|
|
|
|
|
|
|
compiler.size.cmd=xtensa-esp32-elf-size
|
|
|
|
|
|
|
|
# This can be overriden in boards.txt
|
2017-02-06 14:17:11 +01:00
|
|
|
build.code_debug=0
|
|
|
|
build.extra_flags=-DESP32 -DCORE_DEBUG_LEVEL={build.code_debug}
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
# These can be overridden in platform.local.txt
|
|
|
|
compiler.c.extra_flags=
|
|
|
|
compiler.c.elf.extra_flags=
|
|
|
|
compiler.S.extra_flags=
|
|
|
|
compiler.cpp.extra_flags=
|
|
|
|
compiler.ar.extra_flags=
|
|
|
|
compiler.objcopy.eep.extra_flags=
|
|
|
|
compiler.elf2hex.extra_flags=
|
|
|
|
|
|
|
|
## Compile c files
|
|
|
|
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
|
|
|
|
|
|
|
## Compile c++ files
|
|
|
|
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
|
|
|
|
|
|
|
## Compile S files
|
|
|
|
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
|
|
|
|
|
|
|
|
## Create archives
|
|
|
|
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/arduino.ar" "{object_file}"
|
|
|
|
|
|
|
|
## Combine gc-sections, archives, and objects
|
2016-12-30 00:28:30 +01:00
|
|
|
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{build.path}/arduino.ar" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
## Create eeprom
|
2017-02-06 14:17:11 +01:00
|
|
|
recipe.objcopy.eep.pattern={tools.gen_esp32part.cmd} -q "{runtime.platform.path}/tools/partitions/default.csv" "{build.path}/{build.project_name}.partitions.bin"
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
## Create hex
|
2017-01-19 02:24:21 +01:00
|
|
|
recipe.objcopy.hex.pattern={tools.esptool.cmd} --chip esp32 elf2image --flash_mode "{build.flash_mode}" --flash_freq "{build.flash_freq}" --flash_size "{build.flash_size}" -o "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.elf"
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
## Save hex
|
|
|
|
recipe.output.tmp_file={build.project_name}.bin
|
|
|
|
recipe.output.save_file={build.project_name}.{build.variant}.bin
|
|
|
|
|
|
|
|
## Compute size
|
|
|
|
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
|
|
|
|
recipe.size.regex=^(?:\.iram0\.text|\.dram0\.text|\.flash\.text|\.dram0\.data|\.flash\.rodata|)\s+([0-9]+).*
|
2016-10-17 14:31:51 +02:00
|
|
|
recipe.size.regex.data=^(?:\.dram0\.data|\.dram0\.bss)\s+([0-9]+).*
|
2016-10-06 13:21:30 +02:00
|
|
|
|
|
|
|
# ------------------------------
|
|
|
|
|
|
|
|
tools.esptool.upload.protocol=esp32
|
|
|
|
tools.esptool.upload.params.verbose=
|
|
|
|
tools.esptool.upload.params.quiet=
|
2017-02-10 13:11:24 +01:00
|
|
|
tools.esptool.upload.pattern={cmd} --chip esp32 --port "{serial.port}" --baud {upload.speed} --before default_reset --after hard_reset write_flash -z --flash_freq {build.flash_freq} --flash_mode {build.flash_mode} --flash_size {build.flash_size} 0x1000 "{runtime.platform.path}/tools/sdk/bin/bootloader.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin" 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x10000 "{build.path}/{build.project_name}.bin"
|
2017-03-11 07:15:44 +01:00
|
|
|
tools.esptool.upload.network_pattern={network_cmd} -i "{serial.port}" -p "{network.port}" "--auth={network.password}" -f "{build.path}/{build.project_name}.bin"
|