mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Only init crosscore when FreeRTOS runs in multicore mode, add warnings that cross_int calls are private.
This commit is contained in:
parent
b14faabfda
commit
68f39c1ed9
@ -147,7 +147,9 @@ void start_cpu0_default(void)
|
|||||||
uart_div_modify(0, (APB_CLK_FREQ << 4) / 115200);
|
uart_div_modify(0, (APB_CLK_FREQ << 4) / 115200);
|
||||||
ets_setup_syscalls();
|
ets_setup_syscalls();
|
||||||
do_global_ctors();
|
do_global_ctors();
|
||||||
|
#if !CONFIG_FREERTOS_UNICORE
|
||||||
esp_crosscore_int_init();
|
esp_crosscore_int_init();
|
||||||
|
#endif
|
||||||
esp_ipc_init();
|
esp_ipc_init();
|
||||||
spi_flash_init();
|
spi_flash_init();
|
||||||
xTaskCreatePinnedToCore(&main_task, "main",
|
xTaskCreatePinnedToCore(&main_task, "main",
|
||||||
|
@ -49,8 +49,8 @@ static void esp_crosscore_isr(void *arg) {
|
|||||||
//A pointer to the correct reason array item is passed to this ISR.
|
//A pointer to the correct reason array item is passed to this ISR.
|
||||||
volatile uint32_t *myReason=arg;
|
volatile uint32_t *myReason=arg;
|
||||||
#else
|
#else
|
||||||
//Does not work yet, the interrupt code needs work to understand two separate interrupt and argument
|
//The previous line does not work yet, the interrupt code needs work to understand two separate interrupt and argument
|
||||||
//tables...
|
//tables... this is a valid but slightly less optimal replacement.
|
||||||
volatile uint32_t *myReason=&reason[xPortGetCoreID()];
|
volatile uint32_t *myReason=&reason[xPortGetCoreID()];
|
||||||
#endif
|
#endif
|
||||||
//Clear the interrupt first.
|
//Clear the interrupt first.
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
* Initialize the crosscore interrupt system for this CPU.
|
* Initialize the crosscore interrupt system for this CPU.
|
||||||
* This needs to be called once on every CPU that is used
|
* This needs to be called once on every CPU that is used
|
||||||
* by FreeRTOS.
|
* by FreeRTOS.
|
||||||
|
*
|
||||||
|
* If multicore FreeRTOS support is enabled, this will be
|
||||||
|
* called automatically by the startup code and should not
|
||||||
|
* be called manually.
|
||||||
*/
|
*/
|
||||||
void esp_crosscore_int_init();
|
void esp_crosscore_int_init();
|
||||||
|
|
||||||
@ -28,6 +32,9 @@ void esp_crosscore_int_init();
|
|||||||
* currently running task in favour of a higher-priority task
|
* currently running task in favour of a higher-priority task
|
||||||
* that presumably just woke up.
|
* that presumably just woke up.
|
||||||
*
|
*
|
||||||
|
* This is used internally by FreeRTOS in multicore mode
|
||||||
|
* and should not be called by the user.
|
||||||
|
*
|
||||||
* @param coreID Core that should do the yielding
|
* @param coreID Core that should do the yielding
|
||||||
*/
|
*/
|
||||||
void esp_crosscore_int_send_yield(int coreId);
|
void esp_crosscore_int_send_yield(int coreId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user