Commit graph

207 commits

Author SHA1 Message Date
Jeroen Domburg
b52788e764 Add reserved DMA/internal region 2017-05-18 16:48:52 +08:00
Jeroen Domburg
74a535ff70 Release coprocessor registers when a task is deleted. 2017-05-18 15:40:54 +08:00
Jeroen Domburg
5c13d7385c Remove superfluous task_is_internal check, port dport interrupt to separate int handler 2017-05-16 15:36:18 +08:00
Jeroen Domburg
754f574aab Rebasing to latest master 2017-05-16 14:10:59 +08:00
Jeroen Domburg
cb0dd77975 Always allocate stack in internal memory 2017-05-16 13:14:32 +08:00
Jeroen Domburg
58e8763874 Move debug exception vector to vector_defaults.S 2017-05-16 13:14:32 +08:00
Jeroen Domburg
202a5db2d2 Rework high interrupt code to be able to link to external handlers; add psram test that swarms cpu with interrupts 2017-05-16 13:14:30 +08:00
Jeroen Domburg
dff9385fc4 Kill debug messages in heap allocator, delete unused var. 2017-05-16 13:13:01 +08:00
Jeroen Domburg
c09ba35d3b Fix int level 4 panics to give a correct backtrace. Add cache invalid access interrupt to panic handler reasons and wire it up to panic(). Fix issue where cache was re-enabled for pro cpu and pro cpu continuing execution while cache was still disabled on app cpu. 2017-05-16 13:13:01 +08:00
Jeroen Domburg
96be5f3700 Get rid of _all_ uint16_t things that refer to stack size. Plus small fix to panic, not break, when coproc enable error. 2017-05-16 13:11:59 +08:00
Jeroen Domburg
0be8f6d308 Also use 32-bit stack lengths in prvTaskCheckFreeStackSpace and friends 2017-05-16 13:11:59 +08:00
Jeroen Domburg
db8c93afb1 FreeRTOS: Make stack size in task create functions an uint32_t, so we can allocate more than 32K of stack if needed. 2017-05-16 13:11:59 +08:00
Jeroen Domburg
0049b918b4 Fix psram silicon bug test; clean up Kconfig mess, clean out psram unused functions warnings 2017-05-16 13:11:56 +08:00
Jeroen Domburg
c9a2463f3b Add Doom psram test, fix free_heap_size/minimum_ever_heap_size calls to also understand combinations of caps, add psram support to allocator. At the moment, psram only works for the first core because of some funny business in the MMU of the 2nd core. 2017-05-16 13:10:52 +08:00
Angus Gratton
304f0a399a freertos tests: Use CCOMPARE1 always in xPortInIsrContext() test
Mismatched CCOMPARE meant test would only run once.
2017-05-10 17:26:25 +10:00
Angus Gratton
895e7423a3 freertos: Preempt other CPU when deleting a task running on it
Includes related fix to preemption unit tests (delete a queue after deleting the task blocked on it.)
2017-05-10 17:23:33 +10:00
Jiang Jiang Jian
c518325385 Merge branch 'bugfix/dualcore_dport' into 'master'
component/esp32 : fix dualcore bug

1. When dual core cpu run access DPORT register, must do protection.
2. If access DPORT register, must use DPORT_REG_READ/DPORT_REG_WRITE and DPORT_XXX register operation macro.

See merge request !742
2017-05-10 11:27:01 +08:00
Tian Hao
26a3cb93c7 component/soc : move dport access header files to soc
1. move dport access header files to soc
2. reduce dport register write protection. Only protect read operation
2017-05-09 18:06:00 +08:00
Tian Hao
f7e8856520 component/esp32 : fix dualcore bug
1. When dual core cpu run access DPORT register, must do protection.
2. If access DPORT register, must use DPORT_REG_READ/DPORT_REG_WRITE and DPORT_XXX register operation macro.
2017-05-08 21:53:43 +08:00
Angus Gratton
72c7941b5e Unit tests: Add FreeRTOS timer tests 2017-05-05 14:38:15 +10:00
Ivan Grokhotkov
e18f8da528 Merge branch 'bugfix/assert_on_pin_task_nonexistent_cpu' into 'master'
Assert when a new task is started on a nonexisting CPU

Previously, starting a task on a CPU ID higher than the amount of CPUs FreeRTOS is configured with would not start the task and possibly have unintended side effects due to some out-of-bounds array writes. Assert on this so the app aborts cleanly.

See merge request !701
2017-04-28 19:55:26 +08:00
Angus Gratton
66726ec166 freertos: Enable vTaskSuspend()/vTaskResume() API
Adds relevant unit tests.

TW11878
2017-04-26 12:50:20 +10:00
Jeroen Domburg
aaeb2bd110 Assert when a new task is started on a nonexisting CPU 2017-04-25 17:47:25 +08:00
Alexey Gerenkov
55f1a63faf esp32: Adds functionality for application tracing over JTAG
- Implements application tracing module which allows to send arbitrary
   data to host over JTAG. This feature is useful for analyzing
   program modules behavior, dumping run-time application data etc.
 - Implements printf-like logging functions on top of apptrace module.
   This feature is a kind of semihosted printf functionality with lower
   overhead and impact on system behaviour as compared to standard printf.
2017-04-17 23:26:29 +03:00
Jeroen Domburg
0b79d07d34 add detection of invalid cache access
- fix level 4 interrupt vectors to produce correct backtrace
- initialize invalid cache access interrupt on startup
- handle invalid cache access in panic handler
2017-04-13 15:27:38 +08:00
Angus Gratton
0b57054ed3 freertos tests: Extend preemption test cases to cross-core wakeup 2017-04-04 10:10:08 +10:00
Angus Gratton
bdbeaf97d6 freertos tests: Fix accidental "0 delay" in event group tests
Was a slight race condition where tasks on other CPU may not have finished waking up on BIT_CALL when the unity task
polled the event group state.
2017-04-04 10:10:08 +10:00
Angus Gratton
45581dbaca freertos: Delay context switch from queue/task APIs until exiting critical section
Closes #374: https://github.com/espressif/esp-idf/issues/374
2017-04-04 10:10:08 +10:00
Jeroen Domburg
4d6ccfc7ef Fix finding location of ISR stack space for CPU1 2017-03-28 16:19:00 +08:00
Jeroen Domburg
24690bb9cd Always allocate stack in internal memory 2017-03-28 16:17:19 +08:00
Jeroen Domburg
0e39b77d4e Fix finding location of ISR stack space for CPU1 2017-03-28 15:50:10 +08:00
Jeroen Domburg
b863ed4151 Move debug exception vector to vector_defaults.S 2017-03-28 11:50:22 +08:00
Jeroen Domburg
527aac879d Rework high interrupt code to be able to link to external handlers; add psram test that swarms cpu with interrupts 2017-03-28 11:50:22 +08:00
Jeroen Domburg
9d05012b27 Kill debug messages in heap allocator, delete unused var. 2017-03-28 11:50:22 +08:00
Jeroen Domburg
fa6cf92ee1 Fix int level 4 panics to give a correct backtrace. Add cache invalid access interrupt to panic handler reasons and wire it up to panic(). Fix issue where cache was re-enabled for pro cpu and pro cpu continuing execution while cache was still disabled on app cpu. 2017-03-28 11:50:22 +08:00
Jeroen Domburg
1c4369d00f Fix intlvl 4 stuff to give a correct backtrace; add cache invalid access to intlvl4 2017-03-28 11:50:22 +08:00
Jeroen Domburg
e51f5399db Get rid of _all_ uint16_t things that refer to stack size. Plus small fix to panic, not break, when coproc enable error. 2017-03-28 11:49:33 +08:00
Jeroen Domburg
95d0495506 Also use 32-bit stack lengths in prvTaskCheckFreeStackSpace and friends 2017-03-28 11:49:33 +08:00
Jeroen Domburg
9eb6e907e2 FreeRTOS: Make stack size in task create functions an uint32_t, so we can allocate more than 32K of stack if needed. 2017-03-28 11:49:33 +08:00
Jeroen Domburg
d5b5a6e234 Fix psram silicon bug test; clean up Kconfig mess, clean out psram unused functions warnings 2017-03-28 11:49:10 +08:00
Jeroen Domburg
068899c93b Add Doom psram test, fix free_heap_size/minimum_ever_heap_size calls to also understand combinations of caps, add psram support to allocator. At the moment, psram only works for the first core because of some funny business in the MMU of the 2nd core. 2017-03-28 11:48:03 +08:00
Daniel Campora
01ad387ac8 freertos: Add config parameters to customize FreeRTOS behaviour.
The options are:
    - SUPPORT_STATIC_ALLOCATION
    - ENABLE_STATIC_TASK_CLEAN_UP_HOOK
    - TIMER_TASK_PRIORITY
    - TIMER_TASK_STACK_DEPTH
    - TIMER_QUEUE_LENGTH

Merges #444 https://github.com/espressif/esp-idf/pull/444
2017-03-22 15:21:38 +08:00
Jeroen Domburg
ab5bbfa74b Malloc test: tabs -> spaces, fix description 2017-03-08 19:44:57 +08:00
Jeroen Domburg
37d56b0e8a Add small testcase 2017-03-08 19:04:28 +08:00
Ivan Grokhotkov
ccbc6183c3 Merge branch 'bugfix/freertos_event_groups' into 'master'
FreeRTOS: Fix cross-core event group sync

As above

Also includes fixes which allowed removing some semi-hacky bits from the event group unit tests - specifically, higher priority tasks will always be started immediately even if they run on the opposite core.

See merge request !535
2017-03-03 11:45:59 +08:00
Ivan Grokhotkov
7a186ba1b0 Merge branch 'feature/freertos_kconfig' into 'master'
freertos kconfig: Add max task length name, move task stack overflow watchpoint

* Allow setting task name length via kconfig
* Move task stack overflow watchpoint out of internals debugging submenu, place next to other stack overflow checks.
* Thread local pointer feature should depend on Ethernet or WiFi

See merge request !531
2017-03-03 11:29:05 +08:00
Jeroen Domburg
6739d5b99f Add xPortInIsrContext function + unit test. This function returns true when the current CPU runs in an interrupt handler context. 2017-03-02 17:00:32 +08:00
Angus Gratton
2230b2c8bc freertos tests: Enable test_freertos_task_delete 2017-02-28 15:47:15 +11:00
Angus Gratton
8de26e434c freertos: Schedule tasks immediately when they are created on opposite core 2017-02-28 15:47:15 +11:00
Angus Gratton
20212ee823 freertos: Fix cross-core usage of event groups
Fixes & re-enabled broken unit tests
Adds per-event-group spinlock instead of single global lock
2017-02-28 12:06:36 +11:00