Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ menu.EraseFlash=Erase All Flash Before Sketch Upload
menu.JTAGAdapter=JTAG Adapter
menu.ZigbeeMode=Zigbee Mode
menu.PinNumbers=Pin Numbering
menu.ChipVariant=Chip Variant

# Custom options
menu.Revision=Board Revision
Expand Down Expand Up @@ -398,6 +399,7 @@ esp32p4.build.target=esp
esp32p4.build.mcu=esp32p4
esp32p4.build.core=esp32
esp32p4.build.variant=esp32p4
esp32p4.build.chip_variant=esp32p4_es
esp32p4.build.board=ESP32P4_DEV
esp32p4.build.bootloader_addr=0x2000

Expand All @@ -414,6 +416,13 @@ esp32p4.build.boot=qio
esp32p4.build.partitions=default
esp32p4.build.defines=

esp32p4.menu.ChipVariant.prev3=Before v3.00
esp32p4.menu.ChipVariant.prev3.build.chip_variant=esp32p4_es
esp32p4.menu.ChipVariant.prev3.build.f_cpu=360000000L
esp32p4.menu.ChipVariant.postv3=v3.00 or newer
esp32p4.menu.ChipVariant.postv3.build.chip_variant=esp32p4
esp32p4.menu.ChipVariant.prev3.build.f_cpu=400000000L

## IDE 2.0 Seems to not update the value
esp32p4.menu.JTAGAdapter.default=Disabled
esp32p4.menu.JTAGAdapter.default.build.copy_jtag_files=0
Expand Down
5 changes: 3 additions & 2 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ tools.gen_insights_pkg.cmd.windows="{runtime.platform.path}\tools\gen_insights_p
compiler.path={tools.{build.tarch}-esp-elf-gcc.path}/bin/
compiler.prefix={build.tarch}-{build.target}-elf-

compiler.sdk.path={tools.esp32-arduino-libs.path}/{build.mcu}
compiler.sdk.path.windows={tools.esp32-arduino-libs.path}\{build.mcu}
compiler.sdk.path={tools.esp32-arduino-libs.path}/{build.chip_variant}
compiler.sdk.path.windows={tools.esp32-arduino-libs.path}\{build.chip_variant}

# EXPERIMENTAL feature: optimization flags
# - this is alpha and may be subject to change without notice
Expand Down Expand Up @@ -105,6 +105,7 @@ build.event_core=
build.extra_flags=-DARDUINO_HOST_OS="{runtime.os}" -DARDUINO_FQBN="{build.fqbn}" -DESP32=ESP32 -DCORE_DEBUG_LEVEL={build.code_debug} {build.loop_core} {build.event_core} {build.defines} {build.extra_flags.{build.mcu}} {build.zigbee_mode}
build.extra_libs=
build.memory_type={build.boot}_qspi
build.chip_variant={build.mcu}

# Custom build options
build.opt.name=build_opt.h
Expand Down
6 changes: 4 additions & 2 deletions tools/pioarduino-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
platform = env.PioPlatform()
board_config = env.BoardConfig()
build_mcu = board_config.get("build.mcu", "").lower()
chip_variant = board_config.get("build.chip_variant", "").lower()
chip_variant = chip_variant if chip_variant else build_mcu
partitions_name = board_config.get("build.partitions", board_config.get("build.arduino.partitions", ""))

FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
Expand Down Expand Up @@ -80,7 +82,7 @@ def get_bootloader_image(variants_dir):
else generate_bootloader_image(
join(
FRAMEWORK_LIBS_DIR,
build_mcu,
chip_variant,
"bin",
"bootloader_${__get_board_boot_mode(__env__)}_${__get_board_f_boot(__env__)}.elf",
)
Expand Down Expand Up @@ -159,7 +161,7 @@ def add_tinyuf2_extra_image():
SConscript(
join(
FRAMEWORK_LIBS_DIR,
build_mcu,
chip_variant,
"pioarduino-build.py",
)
)
Expand Down
Loading