Commit graph

1828 commits

Author SHA1 Message Date
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
Renz Christian Bagaporo 477fa49fc0 examples: update idf_as_lib example to use new api 2019-05-14 18:01:14 +08:00
Renz Christian Bagaporo ffec9d4947 components: update with build system changes 2019-05-13 19:59:17 +08:00
Sachin Parekh a190b527ac power_management: port*_CRITICAL vanilla FreeRTOS compliance
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-05-13 16:39:19 +05:30
Sachin Parekh db8041a67f intr_alloc: port*_CRITICAL vanilla FreeRTOS compliance
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-05-13 16:39:19 +05:30
Sachin Parekh f3db0b5a4a crosscore_init: port*_CRITICAL vanilla FreeRTOS compliance
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-05-13 16:39:19 +05:30
Ivan Grokhotkov 912c8e31fc Merge branch 'bugfix/pm_isr_exit_lock' into 'master'
pm: prevent interrupt nesting during esp_pm_impl_isr_hook

See merge request idf/esp-idf!4775
2019-04-18 11:16:26 +08:00
Ivan Grokhotkov d31ee806be pm: prevent interrupt nesting during esp_pm_impl_isr_hook
Follows the approach proposed in https://github.com/espressif/esp-idf/pull/3110,
but masks the interrupts during the entire ISR hook, not only during
leave_idle. Interrupt nesting during update_ccompare may also cause
issues.

Closes https://github.com/espressif/esp-idf/issues/3057
2019-04-17 07:13:52 +00:00
Michael (XIAO Xufeng) 562af8f65e global: move the soc component out of the common list
This MR removes the common dependency from every IDF components to the SOC component.

Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.

In CMAKE, we have two kinds of header visibilities (set by include path visibility):

(Assume component A --(depends on)--> B, B is the current component)

1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)

and we have two kinds of depending ways:

(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)

1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)

1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)

This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:

- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h

The major broken include chain includes:

1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h

some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h

BREAKING CHANGE
2019-04-16 13:21:15 +08:00
Ivan Grokhotkov d359d4c77c Merge branch 'bugfix/fix_deprecated_warning_with_dfs_init_auto_config' into 'master'
cpu_start: fix warnings with CONFIG_PM_DFS_INIT_AUTO option

See merge request idf/esp-idf!4761
2019-04-15 15:57:49 +08:00
Ivan Grokhotkov f935294c48 Merge branch 'doc/move_WiFi_Kconfig' into 'master'
move WiFi-specific Kconfig to esp-wifi component

See merge request idf/esp-idf!4736
2019-04-15 12:00:59 +08:00
Mahavir Jain f4328e5346 cpu_start: fix warnings with CONFIG_PM_DFS_INIT_AUTO option
Closes https://github.com/espressif/esp-idf/issues/3297
2019-04-15 03:08:26 +00:00
Jiang Jiang Jian 91eb59f543 Merge branch 'bugfix/improve_spi_timing_for_psram_and_flash' into 'master'
bugfix(psram): improve spi cs timing settings for psram

See merge request idf/esp-idf!4641
2019-04-12 22:57:04 +08:00
suda-morris 958c2792e3 move WiFi-specific Kconfig to esp-wifi component
1. separate Kconfig from esp32 component
2. modify component.mk for esp_wifi a little bit to make it depend on IDF_TARGET
2019-04-11 12:33:15 +08:00
Ivan Grokhotkov b1a722b2ca system_api: return error on repeated registration of shutdown handler 2019-04-11 12:04:58 +08:00
Ivan Grokhotkov bd309a133f system_api: add esp_unregister_shutdown_handler 2019-04-11 12:04:58 +08:00
Ivan Grokhotkov a2d59525e5 mdns: use esp_event library to handle events 2019-04-11 12:04:58 +08:00
Ivan Grokhotkov b1d1e37f87 event loop: re-implement based on esp_event library
Includes ds2ds unit test fix, iperf example test fix
2019-04-11 12:04:58 +08:00
Wangjialin 448d32bc53 bugfix(psram): improve spi cs timing settings for psram
1. remove redundant SPI clock settings, use rom functions to set clock.
2. remove redundant SPI cs setup and hold settings.
3. for old 32Mbit psram, cs hold time must only be 0.5T due to the special driving mode.(cs_setup = 0; cs_hold = 0)
4. for new 64Mbit psram, cs hold time is recommended to be 2.5T. (cs_setup = 1, cs_setup_time = 0;cs_hold = 1, cs_hold_time = 1)
2019-04-09 11:24:10 +08:00
Renz Christian Bagaporo 90ee405afd ldgen: update component linker fragment files 2019-04-04 15:57:34 +08:00
morris f5b03c9ea3 misc adjustment of esp32 component 2019-04-03 19:57:46 +08:00
Ivan Grokhotkov 43d3e75125 Merge branch 'feature/derive_esp_wifi_from_esp32' into 'master'
derive esp_wifi from esp32 component

See merge request idf/esp-idf!4602
2019-04-02 10:13:15 +08:00
Angus Gratton ae585b6615 Merge branch 'bugfix/external_rtc_start_fail' into 'master'
Bugfix/external rtc start fail

See merge request idf/esp-idf!4374
2019-04-02 09:42:27 +08:00
morris 79bb5de426 derive esp_wifi from esp32 component 2019-04-01 20:04:52 +08:00
zhangyanjiao b13ceaf468 wifi: increase the block scan time because of changing channel will take at 30nm when BT/WiFi coexist 2019-04-01 03:12:20 +00:00
morris dbdb299bb1 create xtensa component
1. move xtensa specific files out of esp32 component
2. merge xtensa-debug-module component into xtensa
2019-03-27 20:24:28 +08:00
Ivan Grokhotkov 18946a5421 Merge branch 'feature/common_parts_into_esp_common' into 'master'
move common include files from esp32 into esp_common

See merge request idf/esp-idf!4515
2019-03-27 17:00:58 +08:00
Jiang Jiang Jian 21f6b4d6c3 Merge branch 'bugfix/modify_wifi_reason_code' into 'master'
wifi: modify wifi reason code

Closes WIFI-268 and WIFI-388

See merge request idf/esp-idf!4604
2019-03-27 16:50:35 +08:00
morris 709a320f33 move hwcrypto from esp32 to mbedtls 2019-03-26 16:24:22 +08:00
morris a2f07b0806 move common include files from esp32 into esp_common 2019-03-26 11:57:03 +08:00
zhangyanjiao ebe7190f01 wifi: modify wifi reason code 2019-03-26 11:16:47 +08:00
Jiang Jiang Jian c2d1f83bce Merge branch 'mesh/decouple_addition' into 'master'
wifi: decouple mesh functions from net80211

See merge request idf/esp-idf!4393
2019-03-22 12:57:03 +08:00
Angus Gratton 1be147c457 Merge branch 'feature/allow_components_to_declare_images_to_flash' into 'master'
Allow components to present their own images to flash

See merge request idf/esp-idf!4148
2019-03-22 11:14:37 +08:00
morris fcedf442ce move common source files from esp32 to esp_common 2019-03-22 10:35:03 +08:00
morris c159984264 separate rom from esp32 component to esp_rom
1. separate rom include files and linkscript to esp_rom
2. modefiy "include rom/xxx.h" to "include esp32/rom/xxx.h"
3. Forward compatible
4. update mqtt
2019-03-21 18:51:45 +08:00
Ivan Grokhotkov 106dc05903 Merge branch 'feature/specify_includes_belonging_esp32' into 'master'
move esp32 chip specific includes to esp32/xxx.h

See merge request idf/esp-idf!4534
2019-03-21 18:34:08 +08:00
Ivan Grokhotkov ce07a1057c Merge branch 'feature/make-debug-verbose-usable' into 'master'
logs: Make verbose and debug logging cleaner

Closes IDFGH-782

See merge request idf/esp-idf!4578
2019-03-21 18:29:50 +08:00