Commit Graph

549 Commits

Author SHA1 Message Date
Marius Vikhammer
c36dd7834f core: fix cases where riscv SP were not 16 byte aligned
RISC-V stack pointer should always be 16 byte aligned, but for some cases where
we were doing manual SP manipulation this was not always the case.
2021-02-19 11:26:21 +08:00
Marius Vikhammer
eec2419390 system: enable shared stack watchpoint
Enable shared stack watchpoint for overflow detection

Enable unit tests:
 * "test printf using shared buffer stack" for C3
 * "Test vTaskDelayUntil" for S2
 * "UART can do poll()" for C3
2021-02-18 15:38:30 +08:00
Marius Vikhammer
d294ac381f freertos: fix errors reported by PVS-Studio
Removed leftover code-paths that were never taken. Upstream freertos uses
vTaskSuspendAll() and xTaskResumeAll(), and therefor check if the task already
yielded.

In the IDF port of freertos we use critcal sections instead, so xAlreadyYielded
will never be set.

Partially addresses https://github.com/espressif/esp-idf/issues/6440
2021-02-11 03:15:04 +00:00
Marius Vikhammer
04df1f3a42 CI: enable example builds for C3
Enables building C3 examples in CI.

Fixes related warnings/errors and disables examples that cannot run.
2021-02-09 12:04:02 +08:00
Angus Gratton
fe44643808 Merge branch 'bugfix/doc_freertos_smp_macros' into 'master'
docs: Update SMP descriptions for taskENTER_CRITICAL/taskEXIT_CRITICAL

Closes IDFGH-4428

See merge request espressif/esp-idf!12219
2021-02-05 08:14:50 +08:00
Angus Gratton
bc09dda0f4 docs: Update SMP descriptions for taskENTER_CRITICAL/taskEXIT_CRITICAL
Closes https://github.com/espressif/esp-idf/issues/6259
2021-02-05 10:18:23 +11:00
Ivan Grokhotkov
458308786b Merge branch 'doc/fix_pxTaskGetStackStart' into 'master'
[doc/freertos]: fixed doc of pxTaskGetStackStart()

Closes IDF-1668

See merge request espressif/esp-idf!12159
2021-02-02 07:09:00 +08:00
Ivan Grokhotkov
bb1f75179b Merge branch 'bugfix/freertos_systimer_stall_when_cpu_halted' into 'master'
freertos: stall systimer while CPU is in debug mode

See merge request espressif/esp-idf!12063
2021-01-29 07:02:30 +08:00
Angus Gratton
cc934ea0a1 Merge branch 'feature/esp32c3_tls' into 'master'
freertos: add thread local storage support in RISC-V port

Closes IDF-2125

See merge request espressif/esp-idf!12064
2021-01-27 15:19:06 +08:00
Marius Vikhammer
4374966d4e freerots: fix rtos_int_exit writing outside ISR stack
rtos_int_exit would store RA at an offset of 4 byte from the SP,
where the offset should be 0.

This caused rtos_int_exit to overwrite variables in bss.
2021-01-26 11:18:39 +00:00
Jakob Hasse
fd58ed2f74 [doc/freertos]: fixed doc of pxTaskGetStackStart()
Closes IDF-1668
2021-01-26 17:31:11 +08:00
Ivan Grokhotkov
1402941402 test/freertos: add RISC-V support in thread local storage test 2021-01-24 12:38:15 +00:00
Ivan Grokhotkov
b2aaebaf85 freertos: add thread local storage support in RISC-V port 2021-01-24 12:38:15 +00:00
Ivan Grokhotkov
d7bac619ec freertos: stall systimer while CPU is in debug mode 2021-01-24 11:32:17 +00:00
Angus Gratton
3532f52f60 Merge branch 'bugfix/ldgen_ignore_nonexistent_archives_and_obj' into 'master'
ldgen: check mappings

Closes IDF-1624

See merge request espressif/esp-idf!8557
2021-01-21 15:59:35 +08:00
Jiang Jiang Jian
26ae354dc5 Merge branch 'feature/support_esp32c3_lightsleep_master' into 'master'
support esp32c3 lightsleep for master

Closes IDF-2106

See merge request espressif/esp-idf!11975
2021-01-20 16:00:06 +08:00
Ivan Grokhotkov
b69f94fb3a Merge branch 'feature/move_ringbuf_funcs_into_flash' into 'master'
esp_ringbuf: add kconfig opt to move ringbuffer functions into flash

Closes IDF-2247

See merge request espressif/esp-idf!10731
2021-01-20 07:32:39 +08:00
Alex Lisitsyn
8bde6b8fca esp_ringbuf: add kconfig opt to move ringbuffer functions into flash 2021-01-20 07:32:31 +08:00
Li Shuai
63c4e5481f fix no RTOS SysTick interrupt for a period of time after the OS Scheduler is started 2021-01-19 14:51:22 +08:00
Li Shuai
355dd10257 light sleep: dfs 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
Alexey Gerenkov
ae1cc5f49b freertos: Adds snapshot API to walk over tasks lists 2021-01-15 06:37:12 +00:00
Jakob Hasse
b51889dccb system: stack watchpoint support on C3
Closes IDF-2307
2021-01-14 17:46:44 +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
morris
9e7d2c0065 esp32c3: format and clean up interrupt and os port code 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
ec5acf91ee esp_shared_stack: enable shared stack function for riscv and reenable the unit test 2021-01-05 15:39:46 +08:00
Felipe Neves
f4781d3b1d freertos: riscv port now uses interrupt allocator and crosscore interrupt 2021-01-05 15:39:46 +08:00
Felipe Neves
810be86f21 freertos/riscv: move freertos aware interrupt code from vectors to the freertos riscv port.
The riscv vectors.S in riscv component contains the trap vector, which is responsible to
defer interrupts and examine if a task context switch is needed, this change cleans up
this code by hiding all freertos details behind on two functions rtos_it_enter/exit and
their implementations are placed in freertos riscv port files.
2021-01-05 15:39:46 +08: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
8a52f20a79 Merge branch 'feature/freertos_add_xQueueGenericReceive' into 'master'
freertos: add `xQueueGenericReceive` for backward compatibility

See merge request espressif/esp-idf!11169
2020-12-24 12:20:03 +08:00
Mahavir Jain
953418dbb4 Merge branch 'bugfix/missing_coreinfo_in_vtasklist' into 'master'
freertos: Fix missing affinity info in vTaskList

Closes IDFGH-4239 and IDFGH-4241

See merge request espressif/esp-idf!11606
2020-12-21 19:43:40 +08:00
Axel Lin
29b6b0ce0d freertos: Fix missing affinity info in vTaskList
Show affinity info if CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID is set.

Closes https://github.com/espressif/esp-idf/pull/6099
Closes https://github.com/espressif/esp-idf/issues/6097

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2020-12-14 16:50:07 +05:30
Ivan Grokhotkov
8bf1c2565f freertos: clarify statement on task function not returning
Mentioned in https://www.esp32.com/viewtopic.php?f=2&t=18220.
2020-12-02 11:58:56 +01:00
Angus Gratton
5228d9f9ce esp32c3: Apply one-liner/small changes for ESP32-C3 2020-12-01 10:58:50 +11:00
Mahavir Jain
c62a9e5f2c freertos: add xQueueGenericReceive for backward compatibility
Add `xQueueGenericReceive` as that has been removed in FreeRTOS10.
This in turn breaks pre-builts libraries with earlier IDF releases
relying on this API.

Closes https://github.com/espressif/esp-wolfssl/issues/6
2020-11-27 19:08:42 +05:30
Angus Gratton
87e13baaf1 freertos: Add RISC-V port
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
Mahavir Jain
199b2cb79d freertos: add parameter validation checks in xTaskCreateStaticPinnedToCore
Regression from commit-id a3c90bf59a
2020-10-21 14:05:01 +11:00
Angus Gratton
c87fe77ef9 freertos: Restore the check that mutex is given by owner
Even without this check, if the owner doesn't match then FreeRTOS will still
fail an assertion - but it's not as clear what the root cause is.
2020-10-21 14:04:01 +11:00
Angus Gratton
8a70b1cdc9 ci freertos: Add test configs for some of the optional FreeRTOS 10 configurations
Also unit tests for the legacy hook functions.
2020-10-21 14:04:01 +11:00
Angus Gratton
bb74334830 freertos: Fix regression when xCoreID included in task status TCB
Regression when adding FreeRTOS 10 support.

As reported at https://github.com/espressif/esp-idf/issues/1453#issuecomment-709663537
2020-10-20 14:06:28 +11:00
Angus Gratton
1224ae9a42 freertos: Use configured idle task stack size not minimum task stack size for idle tasks 2020-10-14 16:11:49 +11:00
Angus Gratton
30b5aab77a freertos: Fix some edge cases around un-pinned tasks migrating cores 2020-10-14 16:11:49 +11: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
3057b76a7e tests: re-add all disabled tests and all disabled configurations 2020-10-14 16:11:49 +11:00
Felipe Neves
206540909e freertos: readd task checking for stack overflow macros 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