mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
Add Trax-support to esp-idf
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
#include "esp_ipc.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#include "trax.h"
|
||||
|
||||
void start_cpu0(void) __attribute__((weak, alias("start_cpu0_default")));
|
||||
void start_cpu0_default(void) IRAM_ATTR;
|
||||
#if !CONFIG_FREERTOS_UNICORE
|
||||
@@ -131,6 +133,15 @@ void IRAM_ATTR call_start_cpu1()
|
||||
|
||||
void start_cpu0_default(void)
|
||||
{
|
||||
//Enable trace memory and immediately start trace.
|
||||
#if CONFIG_MEMMAP_TRACEMEM
|
||||
#if CONFIG_MEMMAP_TRACEMEM_TWOBANKS
|
||||
trax_enable(TRAX_ENA_PRO_APP);
|
||||
#else
|
||||
trax_enable(TRAX_ENA_PRO);
|
||||
#endif
|
||||
trax_start_trace(TRAX_DOWNCOUNT_WORDS);
|
||||
#endif
|
||||
esp_set_cpu_freq(); // set CPU frequency configured in menuconfig
|
||||
uart_div_modify(0, (APB_CLK_FREQ << 4) / 115200);
|
||||
ets_setup_syscalls();
|
||||
@@ -147,6 +158,9 @@ void start_cpu0_default(void)
|
||||
#if !CONFIG_FREERTOS_UNICORE
|
||||
void start_cpu1_default(void)
|
||||
{
|
||||
#if CONFIG_MEMMAP_TRACEMEM_TWOBANKS
|
||||
trax_start_trace(TRAX_DOWNCOUNT_WORDS);
|
||||
#endif
|
||||
// Wait for FreeRTOS initialization to finish on PRO CPU
|
||||
while (port_xSchedulerRunning[0] == 0) {
|
||||
;
|
||||
|
Reference in New Issue
Block a user