Li Shuai
f168ac3b39
light sleep: add cpu power down support for esp32c3
2021-01-19 14:51:50 +08:00
Li Shuai
a43de3a44b
fix set UART_FORCE_XOFF
can't stop new Tx request issue
2021-01-19 14:51:22 +08:00
Li Shuai
ac7d1bec76
light sleep: overhead time accuracy optimization for esp32c3
2021-01-19 14:50:58 +08:00
Li Shuai
aa7fd175b9
light sleep: light sleep support for esp32c3
2021-01-19 14:50:58 +08:00
Renz Bagaporo
d1c800fbbb
components: fix ldgen check errors
2021-01-19 11:17:18 +08:00
KonstantinKondrashov
d81a93ae4c
esp32c3: Adds support BROWNOUT reset
2021-01-18 15:38:09 +08:00
ninh
659d805411
esp_wifi: light sleep optimization
2021-01-18 15:31:03 +08:00
Angus Gratton
5938b9a892
Merge branch 'feature/support_esp32c3_master_cmake_reset_reason' into 'master'
...
esp32c3: Add UTs for reset_reason
Closes IDF-2091
See merge request espressif/esp-idf!11546
2021-01-18 07:12:21 +08:00
Konstantin Kondrashov
d23c7690f2
esp32c3: Add UTs for reset_reason
2021-01-18 07:12:21 +08:00
ninh
27aa6c289f
components/pm: Add slp gpio configure workaround
2021-01-15 15:34:45 +08:00
Michael (XIAO Xufeng)
2d3f22918f
Merge branch 'feature/gdma_channel_allocator' into 'master'
...
gdma channel allocator
Closes IDF-2124
See merge request espressif/esp-idf!11570
2021-01-14 10:52:49 +08:00
Angus Gratton
f683db7aea
Merge branch 'feature/c3_IDF-2554' into 'master'
...
global: Uses CCOUNT API instead of XTHAL macro
Closes IDF-2554
See merge request espressif/esp-idf!11954
2021-01-13 12:55:21 +08:00
Angus Gratton
820639cede
Merge branch 'bugfix/c3_init_priority' into 'master'
...
fix[cxx/system]: init_priority ordering on RISCV
Closes IDF-2206 and IDFGH-4527
See merge request espressif/esp-idf!11660
2021-01-13 12:52:21 +08:00
Angus Gratton
9769be3fde
Merge branch 'bugfix/fix_sign_compare' into 'master'
...
global: fix sign-compare warnings for system level components
See merge request espressif/esp-idf!11252
2021-01-13 12:45:05 +08:00
morris
40a6a0fac6
async_mcp: apply gdma driver
2021-01-13 10:52:27 +08:00
ninh
6dd6c8c3cf
ci: fix IDFCI-377
2021-01-12 13:04:53 +00:00
KonstantinKondrashov
dada7cd035
global: Uses CCOUNT API instead of XTHAL macro
2021-01-12 16:24:23 +08:00
morris
753a929525
global: fix sign-compare warnings
2021-01-12 14:05:08 +08:00
Marius Vikhammer
9c8e4fd4c5
C3: build and run unit tests
...
Enable building and running of unit tests in CI for C3 as well as fix
related compile errors
Also enables building of C3 test apps
2021-01-11 11:34:37 +08:00
Chen Jian Xing
5b44295cb9
esp_wifi: fix esp32c3 code issues
...
1. enable wifi clk and rm dport header
2.syn phy_init_data.h from esp32
2021-01-10 16:16:28 +08:00
Jakob Hasse
ed42758549
[cxx/system]: fix init_priority ordering on RISCV
...
* C++ init_priority attributes work now on RISCV
* Add debug output for init_array functions
Closes IDF-2206
Closes https://github.com/espressif/esp-idf/issues/6351
2021-01-07 16:04:17 +08:00
Jiang Jiang Jian
c05321424f
Merge branch 'bugfix/lightsleep_accuracy_opt' into 'master'
...
Lightsleep overhead time accuracy optimization
See merge request espressif/esp-idf!11291
2021-01-06 14:02:10 +08:00
Angus Gratton
da44e06f02
Merge branch 'feature/riscv_test_branch_cleanup' into 'master'
...
cleanup: move freertos code out from riscv component plus complete the interrupt-allocator implementation for C3
Closes IDF-2126, IDF-2228, IDF-2301, and IDF-2545
See merge request espressif/esp-idf!11136
2021-01-06 12:36:29 +08:00
Jiang Jiang Jian
eb9c2d584f
Merge branch 'bugfix/fix_tx_issue_after_esp_restart' into 'master'
...
components/bt: Shutdown Bluetooth before esp_restart.
See merge request espressif/esp-idf!11698
2021-01-06 12:32:03 +08:00
ninh
dc7bdb9857
adjust lightsleep overhead time and cali slowclk
2021-01-06 03:40:28 +00:00
ninh
e908a32381
put pm_slp_iram_opt and pm_rtos_iram_opt related attributes in esp_pm/linker.lf
2021-01-06 03:40:28 +00:00
morris
9e7d2c0065
esp32c3: format and clean up interrupt and os port code
2021-01-05 15:39:46 +08:00
Felipe Neves
5d316ac142
interrupt: added INTC FLEXIBLE capabillity to esp32c3 CPU caps
2021-01-05 15:39:46 +08:00
Felipe Neves
544a3f7df5
interrupt-allocator: reject vector allocation if its marked as not-implemented. and search to next available
2021-01-05 15:39:46 +08:00
Felipe Neves
09bc1580be
intr_allocator: add abstractions for priority, type and edge-ack interrupt controller functions
2021-01-05 15:39:46 +08:00
Omar Chebib
c218f669ba
panic on RISC-V: Take into account Merge Request comments
2020-12-31 15:46:17 +08:00
Ivan Grokhotkov
5962b1dc56
panic: print register dump on abort for RISC-V
...
Register values are necessary to perform host-side backtracing on
RISC-V. Print them in case of an abort as well.
2020-12-31 15:46:17 +08:00
Omar Chebib
b6a450f824
panic: Add support for SoC-level panic
...
SoC level exceptions such as watchdog timer and cache errors are now supported.
Such exceptions now triggers a panic, giving more information about how
and when it happened.
2020-12-31 15:46:17 +08:00
Marius Vikhammer
eed154a583
esp_system: sync with C3 changes
...
Fixes interrupt allocation issue
2020-12-31 15:20:05 +11:00
Marius Vikhammer
f54e9269f3
esp_system: Don't compile sleep_mode.c on c3
2020-12-31 15:20:05 +11:00
Marius Vikhammer
68608f804c
esp32c3: Misc fixes needed to build & run
2020-12-31 15:20:05 +11:00
Marius Vikhammer
3458469204
newlib: Update esp32c3 ROM support, use single init function
2020-12-31 09:27:37 +11:00
Angus Gratton
62cc864cbe
Merge branch 'feature/c3_hw_sup_merge_master' into 'master'
...
esp_hw_support: merge C3 changes to master
See merge request espressif/esp-idf!11820
2020-12-30 20:06:23 +08:00
Marius Vikhammer
eb788deb03
esp_hw_support: merge C3 changes to master
...
Merge RTC related C3 changes to master
2020-12-30 12:20:41 +08:00
Ivan Grokhotkov
b7b9ea4361
newlib: add _RETARGETABLE_LOCKING support
...
This adds support for the retargetable locking implementation in
newlib 3. This feature will be enabled in the future toolchain builds.
With the present version of the toolchain, this code doesn't get used.
When _RETARGETABLE_LOCKING gets enabled, newlib locking implementation
will be modified as follows:
- Legacy ESP-specific _lock_xxx functions are preserved. This is done
because ROM copies of newlib in ESP32 and ESP32-S2 rely on these
functions through the function pointer table. Also there is some
code in IDF which still uses these locking functions.
- New __retarget_lock_xxx functions are introduced. Newlib expects
these functions to be provided by the system. These functions work
pretty much the same way as the ESP-specific _lock_xxx functions,
except one major difference: _lock_acquire receives the lock pointer
by value, and as such doesn't support lazy initialization.
- Static locks used by newlib are now explicitly initialized at
startup. Since it is unlikely that these static locks are used at
the same time, all compatible locks are set to point to the same
mutex. This saves a bit of RAM. Note that there are still many locks
not initialized statically, in particular those inside FILE
structures.
2020-12-29 16:18:04 +01:00
Ivan Grokhotkov
7f3b16a99d
freertos: always enable static allocation
...
to use it for newlib locks
2020-12-29 16:18:04 +01:00
Angus Gratton
1b0442b963
Merge branch 'feature/unify_rtc_fast_mem_as_heap_config_across_chips' into 'master'
...
esp_system: make rtc fast memory to heap configuration unified across chips
Closes IDF-2503
See merge request espressif/esp-idf!11693
2020-12-29 11:41:05 +08:00
Mahavir Jain
880a63b2e9
esp_system: make rtc fast memory to heap configuration unified across chips
...
Closes IDF-2503
2020-12-24 09:46:35 +05:30
Angus Gratton
61c77d9212
esp_system: Add port-specific esp32c3 files
2020-12-24 13:40:01 +11:00
Angus Gratton
55155c3f82
esp_system: Rename _init_start symbol to _vector_table
2020-12-24 13:40:01 +11:00
Angus Gratton
cfbded2ea1
esp_system: Add extra MMU config step for ESP32-C3
2020-12-24 13:40:01 +11:00
Angus Gratton
01696afc34
esp32c3: Add new esp_sleep_is_valid_wakeup_gpio() function
2020-12-24 13:40:01 +11:00
Angus Gratton
a5aac93051
esp_rom: Small changes for esp32c3 support
...
Updated from internal commit 6d894813
2020-12-24 13:40:01 +11:00
Liu Ning
57aa65eeed
components/pm: Add sleep related code iram opt chioce
2020-12-23 14:45:36 +08:00
baohongde
3b0fc48ab4
components/bt: Shutdown Bluetooth before esp_restart.
2020-12-21 20:08:10 +08:00
Renz Bagaporo
32dc37fbe8
esp_system: remove remaining use of old gdbstub header
...
Closes https://github.com/espressif/esp-idf/issues/6274
2020-12-18 09:32:24 +08:00
Ivan Grokhotkov
829d94ad01
Merge branch 'fix/rtc_fast_memory_force_on_in_use_for_heap' into 'master'
...
fix: RTC_FAST_MEM always power on if used for heap
See merge request espressif/esp-idf!11555
2020-12-15 18:45:20 +08:00
Michael (XIAO Xufeng)
40b08e33c9
Merge branch 'bugfix/touch_sensor_reading_error_in_light_sleep_process' into 'master'
...
driver(touch): fix touch sensor false trigger in sleep mode
See merge request espressif/esp-idf!10983
2020-12-14 14:51:51 +08:00
morris
c39476d699
esp_rom: added esp_rom_install_uart_printf
2020-12-11 11:45:10 +08:00
fuzhibo
985e94139d
driver(touch): fix touch sensor false trigger in sleep mode
2020-12-10 17:43:14 +08:00
fuzhibo
f4aedfd017
fix: RTC_FAST_MEM always power on if used for heap
2020-12-10 14:45:41 +08:00
Angus Gratton
5228d9f9ce
esp32c3: Apply one-liner/small changes for ESP32-C3
2020-12-01 10:58:50 +11:00
Armando
05a4a8d864
uart: seperate sclk and baudrate setting
2020-11-24 19:12:52 +08:00
chaijie
a48b5246cc
ESP32: Fix xtal 32k not oscillate or oscillate too slowly issue
...
ESP32 in revision0 and revision1 uses touchpad to provide
current to oscillate xtal 32k. But revision2 and revision3
do not need to do that.
Note: touchpad can not work and toupad/ULP wakeup sources
are not available when toupad provides current to xtal 32k
2020-11-23 19:38:11 +08:00
morris
115069386b
async_mcp: add DMA capability to allocated memory
2020-11-17 20:09:14 +08:00
morris
e039a28821
console: support create REPL over USB CDC
2020-11-13 10:51:40 +08:00
Renz Bagaporo
4cc6b5571b
esp_system: support riscv panic
2020-11-13 07:49:11 +11:00
Angus Gratton
420aef1ffe
Updates for riscv support
...
* Target components pull in xtensa component directly
* Use CPU HAL where applicable
* Remove unnecessary xtensa headers
* Compilation changes necessary to support non-xtensa gcc types (ie int32_t/uint32_t is no
longer signed/unsigned int).
Changes come from internal branch commit a6723fc
2020-11-13 07:49:11 +11:00
Angus Gratton
66fb5a29bb
Whitespace: Automated whitespace fixes (large commit)
...
Apply the pre-commit hook whitespace fixes to all files in the repo.
(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Angus Gratton
e82eac4354
cmake: Apply cmakelint fixes
2020-11-11 07:36:35 +00:00
Angus Gratton
0032971311
Merge branch 'bugfix/ulp_wakeup_trigger' into 'master'
...
ulp risc_v: fix bug about bit for wakeup trigger
Closes IDF-2298
See merge request espressif/esp-idf!11106
2020-11-09 14:57:36 +08:00
Jeroen Domburg
4b444316ab
Psram: Do not initialize spiram cache if no chip is found.
...
Closes https://github.com/espressif/esp-idf/issues/6063
2020-11-06 02:32:39 +00:00
Cao Sen Miao
bd2d70ca0b
ulp risc_v: fix bug about bit for wakeup trigger
2020-11-04 10:47:40 +08:00
fuzhibo
93c7cf094e
rtc: update rtc related code(rtc_sleep rtc_init) to support esp32s3
2020-11-04 02:43:41 +00:00
morris
9de6cba434
ci: add more build test for esp32-s3
2020-10-27 17:22:17 +08:00
morris
d084ef4473
gdma: fix wrong m2m mode wrong config
2020-10-27 16:53:19 +08:00
Angus Gratton
f806261964
Merge branch 'bugfix/fix_rtc_io_hal_desc' into 'master'
...
Sleep related minor description fixes
Closes IDFGH-3868
See merge request espressif/esp-idf!10725
2020-10-26 18:48:03 +08:00
Renz Bagaporo
b3a7c6e27e
components: remove some unneeded headers from source files
2020-10-22 19:37:10 +08:00
Renz Bagaporo
0aa9ee5b24
esp32s3: delete duplicate esp32s3
2020-10-22 20:01:59 +11:00
Angus Gratton
4df4bd9558
Merge branch 'bugfix/clock_getres_accuracy_resolution' into 'master'
...
newlib: Fix clock_getres() improves accuracy
See merge request espressif/esp-idf!10743
2020-10-22 16:50:29 +08:00
Michael (XIAO Xufeng)
647dea9395
soc: combine xxx_caps.h into one soc_caps.h
...
During HAL layer refactoring and new chip bringup, we have several
caps.h for each part, to reduce the conflicts to minimum. But this is
The capabilities headers will be relataive stable once completely
written (maybe after the featues are supported by drivers).
Now ESP32 and ESP32-S2 drivers are relative stable, making it a good
time to combine all these caps.h into one soc_caps.h
This cleanup also move HAL config and pin config into separated files,
to make the responsibilities of these headers more clear. This is
helpful for the stabilities of soc_caps.h because we want to make it
public some day.
2020-10-17 16:10:15 +08:00
Angus Gratton
466ad65cf4
Merge branch 'bugfix/usb_console_critical_section' into 'master'
...
esp_system: fix incorrect critical section usage in usb_console
Closes IDF-2049
See merge request espressif/esp-idf!10826
2020-10-15 10:36:57 +08:00
Felipe Neves
dfa2d547a7
freertos: pin timer task in core 0 plus fixed in SMP race conditions
...
freertos: replace the freertos regular malloc to the specific malloc from xtensa port for tcb and stack allocations
freertos: avoid the cpu1 to unwind pended ticks when xTaskResumeAll is called insed of an ISR
freertos: protected the xPortGetCoreID functions with missing critical sections
tests: re-eanble the ignored tests that was failling before race-condition fixes
2020-10-14 16:11:49 +11:00
Felipe Neves
656b706ea4
freertos: added core-ID member to task status structure aloowing its tracing.
...
Closes https://github.com/espressif/esp-idf/issues/5763
2020-10-14 16:11:39 +11:00
Felipe Neves
f3783ba258
app_trace/sysview: fixed freertos tracing calling plus sync apptrace component with the master branch version
...
docs: remove reference to backported features in freertos 10 api-reference.
2020-10-13 23:52:03 +00:00
Ivan Grokhotkov
4dc1195ca5
esp_system: fix incorrect critical section usage in usb_console
...
spinlock_acquire does not disable interrupts, whereas
portENTER_CRITICAL does.
Closes IDF-2049
2020-10-13 17:39:31 +02:00
Angus Gratton
ff8d05466e
Merge branch 'bugfix/deep_sleep_stub_heap_rtc_fast_mem' into 'master'
...
deep sleep: Calculate RTC CRC without using any stack or other RTC heap memory
Closes IDF-2242
See merge request espressif/esp-idf!10741
2020-10-13 06:17:50 +08:00
Angus Gratton
562ab01046
deep sleep: Calculate RTC CRC immediately before deep sleep, without using RAM
...
Fix for issues where RTC FAST memory is updated as part of going into deep
sleep. Very high risk if heaps are in RTC memory - in particular task stacks
may be in RTC memory, but also other variables.
Also fixes potential concurrency problems as RTC FAST memory is not accessible
by CPU during the CRC calculation itself.
Method:
- Disable interrupts (currently for single core only, will need update for S3)
- Load all registers before calculating CRC or going to sleep
2020-10-12 11:19:56 +11:00
Martin Vychodil
497b730e8f
* memprot support for RTC_SLOW
...
* API upgrade
JIRA IDF-1636
2020-10-08 11:19:23 +08:00
Angus Gratton
e28cd68839
esp_system: Add test case for using deep sleep wake stub when stack is in RTC memory
...
This test currently fails on ESP32 & ESP32-S2, fix will be in next commit.
2020-10-08 11:17:27 +11:00
KonstantinKondrashov
7ae7adf16a
newlib: Fix clock_getres() improves accuracy
...
Returns not rounded value of resolution for WITH_RTC and !WITH_FRC
2020-10-07 18:01:35 +08:00
Mahavir Jain
20af94ff53
Coredump config option rename throughout IDF
2020-09-30 20:22:27 +05:30
Mahavir Jain
bd19088125
esp_system: initialize coredump for ESP32-S2
...
This was regression introduced in recent refactoring changes
from startup code.
2020-09-30 20:22:27 +05:30
Felipe Neves
2e826b7a8f
intr_alloc: split interrupt allocator into common-code and platform-code
...
esp_system: removed repeated interrupt allocator code and moved common code to esp_system
xtens: moved xtensa specific code from freertos to the xtensa component
hal/interrupt_controller: added interrupt controller hal and ll files
docs: update the doxyfile with new location of esp_itr_alloc.h file
xtensa: fixed dangerous relocation problem after moving xtensa interrupt files out of freertos
docs: removed Xtensa reference from intr_allocator api-reference
xtensa: pushed the interrupt function that manages non iram interrupts to the xtensa layer
esp_system/test: fixed platform dependent setting for intr_allocator tests
hal: rename the functions used to manage non iram interrupt mask.
2020-09-30 07:44:12 +08:00
Renz Bagaporo
fb749440fd
esp_pm: create pm init function
2020-09-25 05:24:10 +00:00
Renz Bagaporo
6462f9bfe1
esp32, esp32s2: create esp_pm component
2020-09-25 05:24:10 +00:00
Jiang Jiang Jian
e093eb064c
Merge branch 'feature/run_esp32c3_code_on_esp32_and_esp32s2' into 'master'
...
Feature/run esp32c3 code on esp32 and esp32s2
See merge request espressif/esp-idf!10213
2020-09-24 13:27:47 +08:00
Xia Xiaotian
bdbe74693f
esp_wifi: refactor wifi code in order to adapter to new chips
2020-09-24 10:15:50 +08:00
jiangguangming
28145e0894
support flash instr and rodata copy to SPIRAM
2020-09-22 15:15:03 +08:00
morris
61f89b97c6
bringup esp32-s3 on FPGA
2020-09-22 15:15:03 +08:00
chenjianqiang
f19cabb7e4
psram: support psram for esp32s3
2020-09-22 15:15:03 +08:00
morris
6225932201
bootloader_support: add esp32-s3 initial support
2020-09-22 15:15:03 +08:00
Felipe Neves
e8a276d641
esp_system: revert the esp_system_abort to the IRAM section
2020-09-18 22:18:30 -03:00
Michael (XIAO Xufeng)
3c283b490a
Merge branch 'feature/async_memcpy' into 'master'
...
async_mcp: support async memory copy on esp32s2 and esp32s3
See merge request espressif/esp-idf!10242
2020-09-17 16:54:28 +08:00
morris
a3cc43485f
async memcpy: support async memcopy on esp32s2/s3
...
Added async memory copy API:
on esp32-s2, the implementation is based on CP_DMA
on esp32-s3, the implementation is based on GDMA
2020-09-16 21:30:54 +08:00
Felipe Neves
e67162a7ea
startup: namespaced start_app and start_app_other_core to avoid user code collision
2020-09-15 16:05:19 -03:00
Felipe Neves
a1e5dd58b2
startup: moved init core functions out of iram memory
2020-09-15 16:02:12 -03:00
Michael (XIAO Xufeng)
1a1e1911f9
Merge branch 'bugfix/spi_dma_close_before_cpu_reset' into 'master'
...
spi: fix issue with closing DMA before CPU reset
Closes FCS-484
See merge request espressif/esp-idf!9844
2020-09-14 23:02:05 +08:00
Ivan Grokhotkov
77afbd51ae
sleep: fix esp32 light sleep duration
...
Commit aa43ed8
was fixing the light sleep overhead calculation for
ESP32-S2. However it also changed the overhead values for ESP32,
resulting in incorrect light sleep time. This caused regression in
light sleep example test.
Revert the original values for the ESP32, keep different set of values
for each chip.
2020-09-09 23:34:54 +02:00
ninh
aa43ed8bb8
fix reboot or crash when enable lightsleep on esp32s2
2020-09-07 15:38:00 +08:00
Ivan Grokhotkov
9d3add538b
Merge branch 'feature/toolchain_2020r3' into 'master'
...
Update toolchain to esp-2020r3
See merge request espressif/esp-idf!10250
2020-09-04 14:07:24 +08:00
Anton Maklakov
f63bbc169e
toolchain: fix the C++ exception workaround for new toolchains that don't have such hook
2020-09-03 13:50:54 +07:00
Mahavir Jain
7f5b6d1843
Merge branch 'bugfix/time_spinlock' into 'master'
...
newlib: revert back from spinlocks to using newlib locks for time.h
Closes IDFGH-3858
See merge request espressif/esp-idf!10130
2020-09-03 12:34:29 +08:00
Marius Vikhammer
6fb996b1ac
newlib: revert back from spinlocks to using newlib locks for time.h
...
Spinlocks from spinlock.h do not disable the scheduler and thus cannot safely
be directly used as a locking mechanism. A task holding the lock can get
pre-empted, and at that point the new running task will also be allowed to
take the spinlock and access whatever it was protecting.
Another issue is that the task holding a spinlock could migrate to a different
core which in turn would cause the application to fail asserts. The current
implementation assumes the core that takes the lock is also the core that
releases it.
Closes https://github.com/espressif/esp-idf/issues/5762
2020-09-03 09:56:02 +08:00
Michael (XIAO Xufeng)
9e7eda9770
Merge branch 'feat/spi_flash_override_size' into 'master'
...
spi_flash: add config option to override flash size in bootloader header
See merge request espressif/esp-idf!10131
2020-09-03 02:57:31 +08:00
Michael (XIAO Xufeng)
37423083bb
spi_flash: add config option to override flash size in bootloader header
...
Sometimes the flash size read from bootloader is not correct. This may
forbid SPI Flash driver from reading the the area larger than the size
in bootloader header.
When the new config option is enabled, the latest configured
ESPTOOLPY_FLAHSIZE in the app header will be used to override the value
read from bootloader header.
2020-09-02 00:35:53 +08:00
KonstantinKondrashov
b1e667cdcc
esp_system: Disable UTs for ESP32-S2 linked to sleep mode
...
- disable source trigger behavior
- light sleep followed by deep sleep
- wake up from light sleep using timer
2020-09-01 17:10:28 +08:00
me-no-dev
0aa1c13027
Fix USB CLK always reset and USB with swapped pins not working
2020-08-25 10:59:59 +03:00
Armando
aa93347972
spi: remove spi4 related macros and codes
2020-08-17 21:32:15 +08:00
Renz Bagaporo
3f6e366f56
esp_system: force RTC_SLEEP_PD_XTAL on ESP32 via get pdflags
...
Based on the original code (`esp32/sleep_modes.c`), `RTC_SLEEP_PD_XTAL`
is always given as an argument to `esp_sleep_start`. Enforce this in
function to get power down flags to avoid redundancy.
2020-08-17 19:09:24 +08:00
Renz Bagaporo
0db3edd490
esp32: move sleep test to esp_system
2020-08-17 19:09:24 +08:00
Renz Bagaporo
fe65bf00b1
esp_system: use ext0, ext1, ulp wakeup prepare hal
2020-08-17 19:09:24 +08:00
Renz Bagaporo
4f5135030f
esp_system: remove register level operations for timer wakeup
2020-08-17 19:09:24 +08:00
Renz Bagaporo
b30522f701
esp32, esp32s2: move sleep modes code to esp_system
2020-08-17 19:09:23 +08:00
Angus Gratton
62c4b569ad
Merge branch 'refactor/timekeeping_init' into 'master'
...
Timekeeping refactor
Closes IDF-1864
See merge request espressif/esp-idf!7824
2020-08-17 08:13:44 +08:00
liu zhifu
6ed4dd65a4
esp_wifi: optimize WiFi debug log
...
1. Add esp_wifi_statis_dump()
2. Optimize WiFi related debug log
2020-08-15 11:35:10 +08:00
Angus Gratton
1a47f025e9
Merge branch 'bugfix/cpu_start_build' into 'master'
...
esp_system: fix bootloader wdt enabled build issue
Closes IDFGH-3717
See merge request espressif/esp-idf!9816
2020-08-13 16:52:31 +08:00
Renz Bagaporo
c70c227591
esp_system: private system time functions for now
2020-08-11 17:52:36 +08:00
Renz Bagaporo
da88671491
esp_system: link time, not runtime, dependency on esp_timer
2020-08-11 17:52:36 +08:00
Renz Bagaporo
346cf4430d
esp_system: introduce system time functions
...
- Introduce system time function and concept of system time provider.
esp_timer is system time provider when present.
- Set the reference point for system time, g_startup_time.
- Use the system time functions in newlib instead of calling esp_timer
functions directly
2020-08-10 15:12:38 +08:00
Renz Bagaporo
5785e4dfb6
newlib: move some functions to soc, esp32, esp32s2
2020-08-10 15:11:38 +08:00
Ivan Grokhotkov
5ff9cd495e
panic: skip over the first invalid PC in case of InstrFetchProhibited
...
InstrFetchProhibited usually occurs because of a jump to an invalid
pointer. In this case, PC in the exception frame is the address of
the jump destination. 'esp_ptr_executable' check in print_backtrace
function recognizes the first frame as invalid, and the backtrace is
interrupted. This prevents the user from finding the location where
the invalid pointer is dereferenced.
Bypass the 'esp_ptr_executable' check if the exception cause is
InstrFetchProhibited. Update the test case to no longer ignore this
issue.
2020-08-05 12:00:50 +02:00
Renz Bagaporo
43af455457
esp_system: fix bootloader wdt enabled build issue
...
Closes https://github.com/espressif/esp-idf/issues/5643
2020-08-05 10:39:12 +08:00
Jiang Jiang Jian
d1f9a238f3
Merge branch 'bugfix/sys_fix_build_error_about_livelock' into 'master'
...
components/sys: Fix build error about livelock when intwdt is disable
See merge request espressif/esp-idf!9312
2020-07-31 16:43:22 +08:00
Angus Gratton
75402afcae
Merge branch 'feature/esp32s3_clk_memory_layout' into 'master'
...
esp32s3: memory layout
See merge request espressif/esp-idf!9753
2020-07-29 13:48:25 +08:00
Ivan Grokhotkov
8ac56e904b
Merge branch 'bugfix/coredump_esp_panic_reason' into 'master'
...
Coredump ESP panic reason
See merge request espressif/esp-idf!9072
2020-07-28 23:49:10 +08:00
Ivan Grokhotkov
16c73edc67
Merge branch 'refactor/add_alias_name_for_ets_common_api' into 'master'
...
esp_rom: extract common ets apis into esp_rom_sys.h
See merge request espressif/esp-idf!9701
2020-07-28 15:04:55 +08:00
Alexey Gerenkov
21091c6b0e
coredump: Fixes ESP-specific panic reasons handling
2020-07-27 21:38:33 +03:00
morris
2917651478
esp_rom: extract common ets apis into esp_rom_sys.h
2020-07-27 15:27:01 +08:00
morris
19761e3113
esp32s3: clk, memory layout
2020-07-27 13:05:22 +08:00
baohongde
acb835d86f
components/sys: Fix build error about livelock when intwdt is disable
2020-07-23 02:21:32 +00:00
Renz Bagaporo
837052c86f
esp_system: restore deleted no stack check flag
...
Restores the change of startup refactor changes removed the no stack
check protection flag when compiling the source file that contains
execution of constructors - which contains function to setup stack
guard. Restore that and update the source file, since this is in the 2nd
stage of the startup now.
Closes https://github.com/espressif/esp-idf/issues/5617
2020-07-22 11:57:18 +08:00
Angus Gratton
442736c5d6
Merge branch 'refactor/common_rom_uart_apis' into 'master'
...
esp_rom: extract common uart apis into esp_rom_uart.h
See merge request espressif/esp-idf!9313
2020-07-21 15:24:21 +08:00
Angus Gratton
3755fb6597
Merge branch 'feature/add_esp32s3_bootloader_ld_file' into 'master'
...
move part of esp32-s3 codes to master (bootloader linker, esp32s3 empty componnet)
See merge request espressif/esp-idf!9608
2020-07-21 14:51:04 +08:00
Angus Gratton
5c58564f90
Merge branch 'feature/support_for_esp32_pico_v3_02' into 'master'
...
psram: support for esp32-pico-v3-02
See merge request espressif/esp-idf!9405
2020-07-21 13:28:26 +08:00
chenjianqiang
bff6b5b70e
bugfix(psram): configure MMU after PSRAM initialization
2020-07-20 12:21:32 +08:00
morris
d066c3ab2c
esp_system: add panic high interrupt handler for esp32s3
2020-07-20 11:15:24 +08:00
morris
6316e6eba2
esp_system: add CONFIG_ESP_SYSTEM_RTC_EXT_CRYS
2020-07-20 11:15:24 +08:00
Ivan Grokhotkov
c943516c96
esp_system: fix compilation error when security features are enabled
...
affects CONFIG_SECURE_DISABLE_ROM_DL_MODE, CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE
2020-07-17 21:04:08 +02:00
morris
345606e7f3
esp_rom: extract common uart apis into esp_rom_uart.h
2020-07-17 16:00:59 +08:00
morris
458b14a8ea
esp_rom: extract common efuse apis into esp_rom_efuse.h
2020-07-15 10:40:50 +08:00
Angus Gratton
24e49cc21d
Merge branch 'refactor/panic_handler_follow_ups' into 'master'
...
Panic handler follow ups
See merge request espressif/esp-idf!7732
2020-07-15 08:21:09 +08:00
Shubham Kulkarni
d4ce5de16e
Include header file soc/cpu.h in memprot.c and system_api.c
...
This fixes build issues with Vanilla FreeRTOS
2020-07-10 13:56:42 +05:30
Renz Christian Bagaporo
08ad0f8194
esp_system: remove usage of CONFIG_FREERTOS_UNICORE from panic handler
2020-07-06 15:33:56 +08:00
xiehang
8b523efc6f
esp_wifi: Add API to get available internal heap size.
2020-06-30 21:51:00 +08:00
Darian Leung
97721d469c
TWAI: Add ESP32-S2 support
...
This commit adds TWAI driver support for the
ESP32-S2. The following features were added:
- Expanded BRP support
- Expanded CLKOUT Divider Support
- Updated example READMEs
2020-06-30 16:56:03 +08:00
Ivan Grokhotkov
45fff86e05
Merge branch 'feature/usb_console_ig' into 'master'
...
add USB CDC as a console option
Closes IDF-1620
See merge request espressif/esp-idf!8459
2020-06-29 05:16:15 +08:00
Ivan Grokhotkov
e94848556b
esp32, esp32s2: update console initialization
2020-06-26 15:38:49 +02:00
Ivan Grokhotkov
34f441249b
esp32s2: add internal usb_console API
2020-06-26 15:38:49 +02:00
Jakob Hasse
f4c2f680f7
toolchain: C++ exception workarounds
...
* enable C++ exception crash workaround
* disable C++ crash workaround
Closes https://github.com/espressif/esp-idf/issues/5360
Closes IDF-1128
Closes IDF-1301
Closes IDF-1804
2020-06-24 17:55:35 +08:00
Renz Bagaporo
98f4ccaef5
esp_system: fix other core init issue
...
Core 1 was not being stopped when in single core mode resulting to GDB
timing out.
2020-06-19 18:40:10 +10:00
Renz Bagaporo
98dc1b0188
esp_system: introduce intermediary function to call after system init
...
This MR uses an intermediary function `start_app` to call after system
initialization instead of `app_main`.
In RTOS builds, freertos provides `start_app` and calls `app_main`.
In non-RTOS builds, user provides `start_app` directly.
2020-06-19 18:40:10 +10:00
Renz Bagaporo
08cbfa6187
esp_system: fix various review issues
2020-06-19 18:40:10 +10:00
Renz Christian Bagaporo
67983d5c1c
esp_system: restore order of some init functions
2020-06-19 18:40:10 +10:00
Renz Christian Bagaporo
4d094eccca
esp_system: move brownout init due to dependency issue
2020-06-19 18:40:10 +10:00
Renz Christian Bagaporo
ef2a44d251
esp_system: introduce single core mode proxy config
2020-06-19 18:40:10 +10:00
Renz Christian Bagaporo
c53ad56515
esp_system: startup flow modifications
...
Changes the startup flow to the ff:
hardware -> core libraries init -> other libraries init -> os
init (optional) -> app_main
- hardware init resides in the port layer, and is the entry point
- core libraries init executes init functions of core components
- other libraries init executes init functions of other components (weak
references)
- after other lib is init, the app_main function is called, however,
an OS can wrap the real call to app_main to init its own stuff, and
*then* call the real app_main
2020-06-19 18:40:09 +10:00
Renz Christian Bagaporo
0f43a2620d
esp_system: component init functions macro
...
Allows components to declare initialization function, such that the
startup code does not have direct dependency on the component.
2020-06-19 18:40:09 +10:00
Renz Bagaporo
bb5535ca5d
esp32, esp32s2: move startup code into esp_system
2020-06-19 18:40:09 +10:00
Renz Christian Bagaporo
62ef63e835
esp32, esp32s2: move clk init functions to esp_system
2020-06-19 18:40:09 +10:00
Jiang Jiang Jian
c3e6689777
Merge branch 'bugfix/customer_baidu_int_wdt_master' into 'master'
...
system: add soft solution for esp32 eco3 live lock issue
See merge request espressif/esp-idf!8968
2020-06-17 11:53:25 +08:00
morris
067b1b91c2
global: add new target name: esp32-s3
...
add target name, chip ID, toochain descriptions for ESP32-S3
2020-06-11 21:40:08 +08:00
Li Shuai
72f583dfa7
add soft solution for esp32 eco3 live lock issue
2020-06-05 06:04:18 +00:00
Sachin Parekh
46d914ff45
gdb: Modify PC in case of invalid PC
...
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2020-05-08 18:34:52 +05:30
Ivan Grokhotkov
c5f664d4ac
esp_system: remove duplicated esp_digital_reset function
...
esp_digital_reset was defined both in system_api.c and panic_handler.c
2020-05-04 10:13:14 +00:00
Ivan Grokhotkov
8bdfb265a4
panic handler: fix cache error handling
2020-05-04 10:13:14 +00:00
Ivan Grokhotkov
0a389b1764
esp_system: restore weak esp_reset_reason functions
2020-05-04 10:13:14 +00:00
Renz Bagaporo
5abb4f6455
esp_system, esp_common: fixes to some panic handler refactor issues
2020-04-24 16:34:15 +08:00
Martin Vychodil
7491ea677a
esp32s2: IRAM/DRAM memory protection
...
* new mem_prot API
* mem_prot on & locked by default (see Kconfig)
* feature activated in start_cpu0_default()
JIRA IDF-1355
2020-04-21 15:10:58 +02:00
David Cermak
06c46837ce
panic: ignore deliberate null dereference to pass static analysis
2020-03-27 19:18:40 +01:00
Darian Leung
91841a53ff
WDT: Add LL and HAL for watchdog timers
...
This commit updates the watchdog timers (MWDT and RWDT)
in the following ways:
- Add seprate LL for MWDT and RWDT.
- Add a combined WDT HAL for all Watchdog Timers
- Update int_wdt.c and task_wdt.c to use WDT HAL
- Remove most dependencies on LL or direct register access
in other components. They will now use the WDT HAL
- Update use of watchdogs (including RTC WDT) in bootloader and
startup code to use the HAL layer.
2020-03-26 02:14:02 +08:00
Renz Bagaporo
ee519634a5
esp_system: retain backtrace no space
2020-03-10 19:56:24 +08:00
Renz Bagaporo
7cc8cb68bd
esp_system: suppress reason display on software abort panic
2020-03-10 19:56:24 +08:00
Renz Bagaporo
890510aecd
esp32, esp32s2: move reset reason source to esp_system
2020-03-10 19:56:24 +08:00
Renz Christian Bagaporo
29ebfc3f46
esp_system: let panic handler break on debug mode on software abort
2020-03-10 19:56:24 +08:00
Renz Christian Bagaporo
af9b1131a3
esp_system: share abort panic with port layer
2020-03-10 19:56:24 +08:00
Renz Christian Bagaporo
2855bb6f0a
newlib: move abort to newlib
2020-03-10 19:56:24 +08:00
Renz Christian Bagaporo
2b100789b7
esp32, esp32s2: move panic handling code to new component
2020-03-10 19:56:24 +08:00