Commit graph

1864 commits

Author SHA1 Message Date
Angus Gratton bdeaf138c4 esp32/esp_common: Remove deprecated system_* APIs
Mostly deprecated before ESP-IDF V1.0 & V2.0
2019-09-13 09:44:07 +10:00
Angus Gratton fbc1d1c319 esp32: Remove deprecated system_deep_sleep function
Deprecated since ESP-IDF V3.0
2019-09-13 09:44:07 +10:00
Ivan Grokhotkov 88548a9b4d esp32/test: fix usage of deprecated fields 2019-09-13 09:44:07 +10:00
Angus Gratton 11c1da5276 soc/pm: Remove deprecated use of rtc_cpu_freq_t enum
Removes deprecated ways of setting/getting CPU freq, light sleep freqs.

Deprecated since ESP-IDF V3.2
2019-09-13 09:44:07 +10:00
Michael (XIAO Xufeng) df27a50866 app_update: re-enable elf-sha256 2019-09-11 18:29:11 +08:00
jiangguangming 1b31191753 fix bug for cmake build system
The path of ${SDKCONFIG_H} does not exist, should be replaced by ${sdkconfig_header}.
2019-09-11 11:00:19 +08:00
Angus Gratton b547aef2a0 flash encryption: Ensure flash encryption can't be disabled if Secure Boot is on 2019-09-10 11:28:11 +10:00
Andrew 4fdaeb6b6e cmake: Add new compiler optimization levels definitions
Rename and add multiple kconfig compiler options. New compiler options
COMPILER_OPTIMIZATION_PERF and COMPILER_OPTIMIZATION_NONE have been added.
Optimize "Debug" and "Release" options to "Default" and "Size" respectively.
This commit also does the following:

- The COMPILER_OPTIMIZATION_PERF option introduced multiple bug.
This commit fixes those bugs.
- build.yml also updated to test for the new optimization options.
2019-09-06 17:37:19 +08:00
Alex Lisitsyn 7ff9538c48 espcoredump: fix issue with spi_flash access
spi_flash has been updated and its functions work from flash by default instead of IRAM that cause issue
add Kconfig value into espcoredump to enable spi_flash legacy mode (CONFIG_SPI_FLASH_USE_LEGACY_IMPL) when core dump is selected
fix spi_flash issues to work correctly with legacy mode when CONFIG_SPI_FLASH_USE_LEGACY_IMPL is used
2019-09-06 15:37:55 +08:00
Michael (XIAO Xufeng) 9baa7826be fix unit test and examples for s2beta 2019-09-04 10:53:25 +10:00
Angus Gratton d1f2ea7cdf Merge branch 'bugfix/make_build_issue_if_build_dir_symlink' into 'master'
ldgen: fix build issue on make when build dir is a symlink

Closes IDFGH-1340

See merge request espressif/esp-idf!5915
2019-08-30 16:27:21 +08:00
Angus Gratton ff5cb217fe Merge branch 'bugfix/unicore_config_prevent_ipc_code' into 'master'
ipc: prevent code getting pulled in for unicore configuration

See merge request espressif/esp-idf!5795
2019-08-30 16:26:47 +08:00
Mahavir Jain ebe53416ad ipc: prevent code getting pulled in for unicore configuration 2019-08-28 12:47:08 +05:30
Angus Gratton a21ca2270a Merge branch 'feature/deep_sleep_fast_wake' into 'master'
bootloader: Reduce the time spent in image validation when waking from deep sleep

See merge request espressif/esp-idf!5140
2019-08-28 08:54:28 +08:00
Renz Christian Bagaporo c50a67567a ldgen: fix build issue on make when build dir is a symlink
Fixes an issue where build fails if the build directory is a symlink.
The issue is caused by the rule target and the final executable dependency
not matching.

Closes https://github.com/espressif/esp-idf/issues/3626
2019-08-27 13:53:31 +08:00
Ivan Grokhotkov 12c9d9a564 spi_flash: remove duplicate definition of spi_flash_unlock
The other (static) definition is in flash_ops.c, all references are
also in flash_ops.c.
2019-08-23 12:37:55 +08:00
KonstantinKondrashov c543aac91e bootloader: API for the fast wakeup and custom using RTC mem
Added "Reserve RTC FAST memory for custom purposes" option.
Added a boot counter.
2019-08-21 11:44:37 +00:00
Tim Nordell 43393cf4d1 bootloader: Support for skipping validation upon wake from deep sleep
This saves time when waking up from deep sleep, but potentially decreases
the security of the system.  If the application able to modify itself
(especially areas that are loaded into RAM) in flash while running
without crashing or is modifies the cached bits of information about
what was last booted from the bootloader, this could cause security
issues if the user does a "deep sleep reset" since the full validation
is skipped.

Signed-off-by: Tim Nordell <tim.nordell@nimbelink.com>
2019-08-21 11:44:37 +00:00
Angus Gratton 0a0bb09585 Merge 'master' into feature/esp32s2beta_update 2019-08-20 13:55:23 +10:00
Angus Gratton 6990a7cd54 Merge branch 'master' into feature/esp32s2beta_update 2019-08-19 15:03:43 +10:00
Nachiket Kukade 9ec363a25d wpa_supplicant: Make internally used crypto headers private
A lot of internally used crypto headers are publicly includeable
in user projects. This leads to bug reports when these headers
are incorrectly used or the API's are not used as intended.

Move all crypto headers into private crypto src folder, also move
crypto_ops into Supplicant to remove dependecy on crypto headers.

Closes IDF-476
2019-08-17 11:48:37 +00:00
chenjianqiang 74e2e46402 bugfix(flash): add spi dio address bitlen configure in psram init 2019-08-14 20:57:30 +08:00
Angus Gratton 367ecc2d60 Merge branch 'refactor/timerg_in_test' into 'master'
timer_group: refactoring to avoid direct register access in the ISR

See merge request espressif/esp-idf!5656
2019-08-14 15:32:16 +08:00
suda-morris f86e82cb63 efuse: update the scheme of getting chip revision 2019-08-13 10:59:02 +08:00
Michael (XIAO Xufeng) d850a0bd1c esp_attr: add flag_attr to support enums used as flags 2019-08-09 13:46:32 +08:00
Michael (XIAO Xufeng) 264ffbeb14 timer_group: use the LL 2019-08-09 13:46:31 +08:00
Michael (XIAO Xufeng) b413a240cb esp_attr: support force_inline 2019-08-09 13:46:28 +08:00
Angus Gratton 04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
Angus Gratton 24d26fccde Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 13:44:24 +10:00
Mahavir Jain 5203a15439 esp32_gdbstub: fix build error with esp32-2019r1 toolchain
Fixes https://github.com/espressif/esp-idf/issues/3866
2019-08-07 11:56:13 +05:30
Michael Zimmermann d4c098f5a9 brownout: fix rtc_brownout_isr_handler signature
Merges https://github.com/espressif/esp-idf/pull/2937
2019-08-01 16:28:56 +07:00
Anton Maklakov afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
Angus Gratton b071fbdd81 Merge branch 'test/rtc_noinit_wdt_test' into 'master'
esp32: verify that RTC_NOINIT_ATTR vars are preserved after WDT reset

See merge request espressif/esp-idf!4936
2019-07-30 09:42:15 +08:00
Ivan Grokhotkov b4e850a4b1 Merge branch 'bugfix/make_link_libc_psram' into 'master'
esp32: also add -mfix-esp32-psram-cache-issue to LDFLAGS

See merge request espressif/esp-idf!5643
2019-07-29 19:01:12 +08:00
Angus Gratton bfb0f83b32 Merge branch 'bugfix/dis_interrupts_up_to_6_level_for_dport_wa' into 'master'
esp32: Dis interrupts up to 5 lvl for DPORT

Closes IDF-728

See merge request espressif/esp-idf!5344
2019-07-29 10:57:20 +08:00
Ivan Grokhotkov 98c179ed47 esp32: also add -mfix-esp32-psram-cache-issue to LDFLAGS
xtensa-esp32-elf-gcc selects among the multilib configurations based
on the presence of -mfix-esp32-psram-cache-issue flag. Pass this flag
in LDFLAGS so that the correct libraries are linked.

Reported in https://github.com/espressif/esp-idf/issues/3624
2019-07-28 08:05:56 +02:00
chenjianqiang d77c74770a bugfix(flash): add flash config in app startup
We fixed some flash bugs in bootloader, but for the users used the old
vrsion bootloader, they can not fix these bugs via OTA, the solution is
add these updates in app startup.

These updates include:
1. SPI flash gpio matrix and drive strength configuration
2. SPI flash clock configuration
3. SPI flash read dummy configuration
4. SPI flash cs timing configuration
5. Update flash id of g_rom_flashchip
2019-07-18 14:40:59 +08:00
Ivan Grokhotkov 7d21ece78b gdbstub: move to a separate component, support multiple targets 2019-07-17 16:01:03 +02:00
Konstantin Kondrashov 69a313b6ae esp32: Add UTs for DPORT and Hi-interrupt 2019-07-16 05:54:45 +00:00
Konstantin Kondrashov 632b016028 esp32: Dis interrupts up to 5 lvl for DPORT
Disable interrupts for both DPORT workarounds up to 5 lvl.

Closes: https://esp32.com/viewtopic.php?f=2&t=10981&sid=d125cec233070ed4d2c5410bf5d3d74a
Closes: IDF-728
2019-07-16 05:54:45 +00:00
chenjianqiang d6c40c7c1d bugfix(flash): improve spi cs timing settings for flash
cs setup time is recomemded to be 1.5T, and cs hold time is recommended to be 2.5T.
(cs_setup = 1, cs_setup_time = 0; cs_hold = 1, cs_hold_time = 1)
2019-07-05 21:21:17 +08:00
Angus Gratton d64d97743f Merge branch 'bugfix/efuse_secure_version_emulate' into 'master'
efuse: Fix mode EFUSE_SECURE_VERSION_EMULATE

See merge request espressif/esp-idf!5446
2019-07-05 16:05:26 +08:00
Angus Gratton c24c5cf164 Merge branch 'feature/gdbstub_multi_target' into 'master'
gdbstub multi-target support

Closes IDF-466

See merge request espressif/esp-idf!5246
2019-07-05 14:33:54 +08:00
KonstantinKondrashov 09ee721932 efuse: Fix mode EFUSE_SECURE_VERSION_EMULATE 2019-07-04 13:34:35 +00:00
XiaXiaotian 29d1d2bd38 esp_wifi: refactor smartconfig callback to use esp event 2019-07-04 18:00:04 +08:00
Ivan Grokhotkov 66e0b2f9df gdbstub: move to a separate component, support multiple targets 2019-07-02 11:06:25 +02:00
Jiang Jiang Jian e6623c4a7b Merge branch 'bugfix/esp_timer_delete_from_cb' into 'master'
esp_timer: handle esp_timer_delete in timer task

Closes IDFGH-1143

See merge request idf/esp-idf!5037
2019-07-02 14:16:26 +08:00
Ivan Grokhotkov 18bea96bf5 esp32: verify that RTC_NOINIT_ATTR vars are preserved after WDT reset
Related to https://github.com/espressif/esp-idf/issues/2973
2019-07-01 20:55:10 +00:00
Xia Xiaotian 99ef587a05 run WiFi on ESP32SBETA 2019-06-28 11:34:49 +08:00
suda-morris 90c4827bd2 add esp_eth component 2019-06-26 10:19:23 +08:00
Hemal Gujarathi a68c7c21e1 Improve flash encryption documentation and add Development & Release modes
This MR improves existing flash encryption document to provide simplified steps
Adds two new modes for user: Development & Release
Adds a simple example
Supports encrypted write through make command
2019-06-25 23:41:18 +00:00
Angus Gratton 9a412d3a08 Merge branch 'feature/use_new_component_registration_apis' into 'master'
Use new component registration API

See merge request idf/esp-idf!4898
2019-06-25 10:24:11 +08:00
Hrishikesh Dhayagude 342f6a7829 Port NimBLE Host Stack on ESP-IDF 2019-06-25 09:03:58 +08:00
Renz Christian Bagaporo 9b350f9ecc cmake: some formatting fixes
Do not include bootloader in flash target when secure boot is enabled.
Emit signing warning on all cases where signed apps are enabled (secure
boot and signed images)
Follow convention of capital letters for SECURE_BOOT_SIGNING_KEY
variable, since it is
relevant to other components, not just bootloader.
Pass signing key and verification key via config, not requiring
bootloader to know parent app dir.
Misc. variables name corrections
2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo 9eccd7c082 components: use new component registration api 2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo 8424822150 cmake: set CONFIG_DIR build property
Add CONFIG_DIR as a build property, so that components don't have to
derive it from one of the generated config files.
2019-06-20 16:02:22 +08:00
Darian Leung 037c079e9a esp32: Refactor backtrace and add esp_backtrace_print()
This commit refactors backtracing within the panic handler so that a common
function esp_backtrace_get_next_frame() is used iteratively to traverse a
callstack.

A esp_backtrace_print() function has also be added that allows the printing
of a backtrace at runtime. The esp_backtrace_print() function allows unity to
print the backtrace of failed test cases and jump back to the main test menu
without the need reset the chip. esp_backtrace_print() can also be used as a
debugging function by users.

- esp_stack_ptr_is_sane() moved to soc_memory_layout.h
- removed uncessary includes of "esp_debug_helpers.h"
2019-06-19 18:30:18 +08:00
suda-morris 3f7a571c90 fix errors when ci testing for esp32 2019-06-19 15:31:47 +08:00
Michael (XIAO Xufeng) 1036a091fe spi_flash: support working on differnt buses and frequency 2019-06-18 06:32:52 +00:00
Angus Gratton ce4de867d6 spi_flash: New low-level flash API 2019-06-18 06:32:52 +00:00
suda-morris c5c716e9d7 esp_wifi: fix wrong path of phy_init_data
Closes https://github.com/espressif/esp-idf/issues/3482
2019-06-18 11:29:09 +08:00
Wang Jia Lin e2d1c6234f Merge branch 'bugfix/improve_flash_dio_read_timing' into 'master'
bugfix(flash): fix flash dio read mode configuration error on SPI0

See merge request idf/esp-idf!5086
2019-06-14 12:10:46 +08:00
Renz Christian Bagaporo 54ef60f26b component: revert some of the dependency corrections
!4452 and !4897 made some ill-advised corrections to dependency info;
revert those in this MR. Handling pre-built binaries as imported
libraries is retained, however.
2019-06-11 18:09:26 +08:00
Renz Christian Bagaporo 3882e48e8a cmake: use new signature form of target_link_library to link components
!4452 used setting LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES to link
components built under ESP-IDF build system. However, LINK_LIBRARIES does
not produce behavior same as linking PRIVATE. This MR uses the new
signature for target_link_libraries directly instead. This also moves
setting dependencies during component registration rather than after all
components have been processed.

The consequence is that internally, components have to use the new
signature form as well. This does not affect linking the components to
external targets, such as with idf_as_lib example. This only affects
linking additional libraries to ESP-IDF libraries outside component processing (after
idf_build_process), which is not even possible for CMake<v3.13 as
target_link_libraries is not valid for targets not created in current
directory. See https://cmake.org/cmake/help/v3.13/policy/CMP0079.html#policy:CMP0079
2019-06-11 18:09:26 +08:00
Renz Christian Bagaporo f0f861ccd9 ldgen: use user input filename for processed template
Previously ldgen determines the output file name on its own. This commit
makes it so that user can dictate what the output file name will be
for the processed template, if the user needs it for something else.
2019-06-11 18:09:26 +08:00
Angus Gratton ddbd09eb15 esp32/esp32s2beta: Extract common SPIRAM options into esp_commmon component 2019-06-11 13:07:37 +08:00
Angus Gratton 8d949c3c9d esp32s2beta: Apply new Kconfig names to esp32s2beta
Still using ESP32_xxx prefix on all chips: CORE_DUMP, APP_TRACE

Still using the same config prefix and duplicate names in esp32 & esp32s2beta: SPIRAM, PM
2019-06-11 13:07:37 +08:00
suda-morris 61ce868396 make bootloader_support support esp32s2beta 2019-06-11 13:07:02 +08:00
suda-morris b146104885 add esp32s2beta component 2019-06-11 13:06:32 +08:00
suda-morris cc98b9ef60 add rom for esp32s2beta 2019-06-11 13:06:32 +08:00
suda-morris 2f4c5c51f4 update esp32 component 2019-06-11 13:06:32 +08:00
Angus Gratton a0382de0ea Merge branch 'bugfix/psram_io_struct_uninitialized' into 'master'
Make sure the psram_io struct is initialized

See merge request idf/esp-idf!5147
2019-06-07 07:36:16 +08:00
Jeroen Domburg 2b7da2a245 Make unknown psram package version more obvious 2019-06-06 16:57:01 +08:00
Gautier Seidel 542e544faa esp32: Allow fixed static RAM size and DRAM heap size
Merges https://github.com/espressif/esp-idf/pull/3222
2019-06-06 18:23:04 +10:00
Jeroen Domburg ed17cbbb8a Make sure the psram_io struct is initialized
Closes https://github.com/espressif/esp-idf/issues/3591
2019-06-06 09:05:49 +08:00
Angus Gratton 045aaf6fb0 Merge branch 'feature/add_xxx_periph_h' into 'master'
soc: Add xxx_periph.h for all modules

Closes IDF-192

See merge request idf/esp-idf!4952
2019-06-04 13:24:14 +08:00
Angus Gratton db6a30b446 Merge branch 'bugfix/libgcc_fpu_functions' into 'master'
esp32: Use FPU for floating point divide, power, complex multiplications

See merge request idf/esp-idf!5005
2019-06-04 08:41:58 +08:00
Wu Jian Gang 4d3762a8df clk: Fix the overflow when setting ccount
The multiplication will be overflow when using 160 or 240 MHz, this can lead the inaccuracy of log time stamp in startup.
2019-06-03 11:04:47 +00:00
Konstantin Kondrashov 399d2d2605 all: Using xxx_periph.h
Using xxx_periph.h in whole IDF instead of xxx_reg.h, xxx_struct.h, xxx_channel.h ... .

Cleaned up header files from unnecessary headers (releated to soc/... headers).
2019-06-03 14:15:08 +08:00
Angus Gratton 30d9ee56fb Merge branch 'feature/config_spi_pins_based_on_efuse_value' into 'master'
feat(psram): config SPI psram pins based on efuse value

See merge request idf/esp-idf!4950
2019-05-31 16:15:56 +08:00
Angus Gratton 0b70dfc27f Add floating point performance test 2019-05-30 10:09:24 +10:00
Angus Gratton 31b854e17d Merge branch 'feature/do_not_use_link_groups' into 'master'
Do not use link groups

See merge request idf/esp-idf!4897
2019-05-29 15:18:31 +08:00
Angus Gratton 73b90387cb Merge branch 'bugfix/reset_log_uart_port' into 'master'
esp32: Add reset CONSOLE_UART port

See merge request idf/esp-idf!5011
2019-05-29 14:28:37 +08:00
Angus Gratton c7a0d5e063 Fix bug in the floating point unit test code 2019-05-29 10:14:31 +10:00
Angus Gratton d9a5c8f387 esp32: Use FPU for floating point divide, power, complex multiplications
* Linker was choosing ROM symbols for these, which use integer soft-float
  operations and are much slower.
* _divsf3() moved to IRAM to avoid regressions with any code that does
  integer float division in IRAM interrupt handlers (+88 bytes IRAM)
* Thanks to michal for reporting:
  https://esp32.com/viewtopic.php?f=14&t=10540&p=43367
2019-05-29 10:14:31 +10:00
Angus Gratton 154fc74f76 Merge branch 'bugfix/nvs_typedef_naming_pr3239' into 'master'
nvs: Append _t to nvs_handle & nvs_open_mode types

Closes IDFGH-891

See merge request idf/esp-idf!4783
2019-05-29 08:14:00 +08:00
chenjianqiang db138ae19b feat(psram): config SPI psram pins based on efuse value 2019-05-28 21:25:16 +08:00
chenjianqiang d68f1907ef bugfix(flash): improve flash dio read timing
When flash work in DIO Mode, in order to ensure the fast read mode of flash
is a fixed value, we merged the mode bits into address part, and the fast
read mode value is 0 (the default value).
2019-05-28 14:51:04 +08:00
Angus Gratton 22514c1dd9 cmake: For gcc8 use linker to find paths to libc, libm, libstdc++, etc
Removes the need to know/guess the paths to these libraries. Once we are gcc 8 only, we
can remove -nostdlib and no additional arguments are needed for system libraries.

The catch is: any time IDF overrides a symbol in the toolchain sysroot, we need
an undefined linker marker to make sure this symbol is seen by linker.
2019-05-28 12:54:37 +08:00
Angus Gratton b2e54a9cc6 ci: Add IDF_DEPRECATED macro for things we only deprecate in our CI passes 2019-05-27 17:43:38 +10:00
liu zhifu 197e0ae147 esp_wifi: fix some WiFi bugs
Fix following WiFi bugs:
1. Make smartconfig thread-safe
2. Fix WiFi stop/deinit memory leak
3. Refactor for WiFi init/deinit/ioctl etc
4. Add declaration for esp_wifi_internal_ioctl()
5. Fix the bug that WiFi stop leads to task watchdog
2019-05-22 22:18:05 +08:00
Roland Dobai 1ad2283641 Rename Kconfig options (components/bootloader) 2019-05-21 09:32:55 +02:00
Roland Dobai 6c0a7a66f3 Rename Kconfig options (components/app_trace) 2019-05-21 09:32:55 +02:00
Roland Dobai 0ae53691ba Rename Kconfig options (components/esp32) 2019-05-21 09:09:01 +02:00
Roland Dobai b8111ab1d5 Rename Kconfig options (components/esp_wifi) 2019-05-21 09:09:01 +02:00
Roland Dobai 64c2aa15aa Rename Kconfig options (components/freertos) 2019-05-21 09:09:01 +02:00
Roland Dobai c5000c83d2 Rename Kconfig options (root) 2019-05-21 09:09:01 +02:00
Konstantin Kondrashov be6f5563b4 esp32: Add reset uart
Fixed the case when the first part of log was missed
this was happened when:
 * CONFIG_CONSOLE_UART_CUSTOM option is selected (UART1)
 * The selected CONSOLE_UART port is used also for the console component
 * in code esp_restart() or abort() functions were called.
2019-05-21 06:18:28 +00:00
Ivan Grokhotkov 6b08e8b449 esp_timer: handle esp_timer_delete in timer task
Closes https://github.com/espressif/esp-idf/issues/3458
2019-05-21 10:48:28 +08:00
Angus Gratton 907471ce41 Merge branch 'feature/cmake_changes_for_4.0' into 'master'
CMake for 4.0

See merge request idf/esp-idf!4452
2019-05-17 14:21:48 +08:00