Commit Graph

106 Commits

Author SHA1 Message Date
Valerii Koval d0835e994c Take into account board flash mode when converting elf to bin 2023-01-06 14:29:58 +02:00
Valerii Koval 03d59c608b Use the "adapter speed" option for OpenOCD
Issue #917
2022-09-27 12:30:15 +03:00
Valerii Koval bb9b135803 Properly handle "memory_type" option 2022-09-26 15:13:52 +03:00
Jason2866 2f2a8d4b51 Better handling of bootloader configuration (#880) 2022-09-26 12:19:53 +03:00
Jason2866 4f51150708 Take into account "memory_type" option to properly select boot mode (#913)
Use correct bootloader `opi` when `"boot": "opi"` is not set for Arduino framework

Resolves #837, enhances #904
2022-09-26 12:11:48 +03:00
Jason2866 ad4f417ad3 Fix flash mode for opi (#904)
opi needs to be flashed in mode `dout` to work. Changed flash mode for `qout` since it can be flashed in `dio`.
This is the way espressif now does in IDF
2022-09-13 19:31:16 +03:00
Valerii Koval 2edc2b2581 Remove obsolete workaround for propagating debug configurations
Resolves #883 and similar issues with build targets that don't run the platform build scripts
2022-08-23 13:51:03 +03:00
Valerii Koval e58a222e44 Move the process of patching bootloader to the Arduino build script 2022-08-23 13:46:12 +03:00
Valerii Koval cdd0867de6 Update bootloader image headers before debugging or uploading via debug tools
This approach is less intrusive than merging the entire application into one binary
implemented in #006d64e8b268e479703a0aac7eed8bef1ebea587

In this implementation we safely copy the required bootloader binary to the
build directory, adjust the headers via esptoolpy and the "merge_bin" command
according to --flash-size and --flash-mode arguments.

Resolves #872
2022-08-15 17:59:36 +03:00
Valerii Koval 358e84835d Allow overriding reset operation via project file
Resolve #874
2022-08-09 14:52:59 +03:00
Valerii Koval 0ed9a8524b Update default flash size value in merging procedure 2022-07-30 22:50:59 +03:00
Valerii Koval 006d64e8b2 Merge firmware before flashing via OpenOCD
Arduino core v2.0.4 contains updated bootloader images that have innacurate default headers. This results in bootloops if firmware is flashed via OpenOCD (e.g. debugging or
uploading via debug tools). For this reason, before uploading or debugging we need to merge all binaries (firmware, bootloader, partitions, etc.) via esptoolpy so that
the image headers will be adjusted according to --flash-size and --flash-mode arguments.

Note that this behavior doesn't occur if uploading is done via esptoolpy, as esptoolpy  overrides the binary image headers before flashing.
2022-07-30 21:09:01 +03:00
Valerii Koval f2a5977c91 Properly propagate additional data to configure debug session
- Add extra data to "projenv" as well so that the extra data it can be overridden after the BuildProgram routine
- Use the new INTEGRATION_EXTRA_DATA env variable instead of IDE_EXTRA_DATA
2022-07-29 17:53:19 +03:00
Ivan Kravets 886f388e4d Improve support for assembly programming 2022-05-27 17:27:28 +03:00
Ivan Kravets de59b730a0 Remove unnecessary files 2022-05-27 16:17:38 +03:00
Valerii Koval 9f9f39d8d5 Add support for Arduino core v2.0.3
Resolve #799, resolves #762, resolves #674
2022-05-16 13:18:16 +03:00
Valerii Koval eff0222cd1 Process app offset in debug mode 2022-04-20 22:20:13 +03:00
Valerii Koval 2752112002 Use flash size from board manifest by default // Resolve #300 2022-04-19 13:45:36 +03:00
Valerii Koval 8980729628 Take into account application image offset when uploading via esptool
Resolve #538
2022-04-18 21:24:40 +03:00
Valerii Koval a0b6ac6ba0 Minor fixes 2022-04-18 21:16:41 +03:00
Valerii Koval 58cb2d0a45 Allow filesystem image uploading via debug tool
Resolves #177, resolves #422
2022-04-18 17:36:37 +03:00
Valerii Koval 4371944c6b Add support for new filesystems
Resolves #546, resolves #570, resolves #643
2022-04-17 23:58:10 +03:00
Valerii Koval 581c7d0325 Add support for Arduino v2.0
Resolve #619, resolve #652, resolve #591
2022-04-14 14:40:12 +03:00
Ivan Kravets 495c689133 Use official $PROJECT_DATA_DIR 2021-12-02 22:08:28 +02:00
valeros f7bcd7e692 Revert "Use default flash mode when uploading via esptoolpy"
Resolve #584, resolve #630, resolve #623

This reverts commit fe5d2796d4.
2021-11-05 15:09:59 +02:00
valeros c4ad0942ee Properly calculate partition offsets
Resolve #627
2021-11-05 14:55:53 +02:00
valeros fe5d2796d4 Use default flash mode when uploading via esptoolpy
Resolve #584
2021-07-26 21:08:34 +03:00
valeros b073ed8440 Initial support for ESP32C3
Resolve #568, resolve #497
2021-06-23 18:33:52 +03:00
valeros b76ec06175 Add an explicit dependency on checkprogsize target for the final binary 2021-03-15 12:50:29 +02:00
valeros 71e52b50bc Properly declare buildfs target so it can be used for pre/post actions 2021-03-15 12:50:14 +02:00
valeros a147b3c858 Add missing argument to OTA tool when uploading SPIFFS image
Resolve #416
2021-02-03 16:10:34 +02:00
valeros 8d1b13f274 Allow overriding debug adapter speed using "debug_speed" option
Resolve #459, #463
2021-01-28 16:43:39 +02:00
valeros a57403c5bf Print error message when there is no SPIFFS section in partition file
Resolve #452
2021-01-21 13:46:21 +02:00
valeros 115f98151e Dynamically configure partition offsets for ESP-IDF 2020-12-02 13:10:37 +02:00
Ivan Kravets 7b932d161e Use "program_esp" command for new openOCD 2020-10-26 22:19:01 +02:00
valeros 0914eddbcc Don't cache data folder // Resolve #398 2020-09-07 12:56:44 +03:00
Valerii Koval ebadad145c Switch to new AddPlatformTarget API
Preparation for upcoming PIO Core 4.4
2020-06-10 17:16:17 +03:00
Valerii Koval 6887486310 Fix unwanted build step for nobuild target // Resolve #355, resolve #356 2020-06-01 17:29:48 +03:00
Valerii Koval 32d50ab593 Add preliminary support for ESP32-S2 2020-05-11 21:17:48 +03:00
Valerii Koval 856885e219 Allow overriding SPIFFS image name // Resolve #332 2020-04-27 17:19:21 +03:00
valeros f923797a30 Move modified ElfToBin builder to ESP-IDF build script 2020-03-19 12:07:58 +02:00
valeros d3bbd633f7 Get rid of hardcoded upload speed value for mbctool 2020-03-18 15:06:42 +02:00
AlbertoPimpo 98df86243e Add initial support for briki core (#294) 2020-03-17 12:51:38 +02:00
valeros 4a1871dd26 Add sha256 hash only to application elf // Issue #272, #290
Bootloader uses the same ElfToBin builder, so a special emitter is used to add extra flag only for application image
2020-03-16 16:32:41 +02:00
Rohan Singh 2ee164a3cc Add ELF file hash to images generated by elf2image (#290) // Fixes #272. 2020-03-04 14:25:25 +02:00
valeros 4c2b33894f Refactor ldscript files processing 2020-01-29 15:38:58 +02:00
valeros 1fadd964e9 Fix mkspiffs binary name when both arduino and esp-idf frameworks selected // Resolve #244 2019-11-01 18:40:03 +02:00
Ivan Kravets 0dbb36de4d Automatically configure openOCD scripts folder 2019-06-13 20:48:15 +03:00
Ivan Kravets cb35c874e5 Declare "target_elf" for "nobuild" 2019-06-12 23:09:40 +03:00
Ivan Kravets 6d6874f2e5 Fix verbose output for openOCD 2019-06-12 14:19:35 +03:00