mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/misc_adjustment_of_esp32' into 'master'
misc adjustment of esp32 component Closes IDF-36 See merge request idf/esp-idf!4627
This commit is contained in:
commit
d6394818b0
@ -2,3 +2,8 @@ PROVIDE ( ets_update_cpu_frequency = 0x40008550 ); /* Updates g_ticks_per_us on
|
||||
PROVIDE ( MD5Final = 0x4005db1c );
|
||||
PROVIDE ( MD5Init = 0x4005da7c );
|
||||
PROVIDE ( MD5Update = 0x4005da9c );
|
||||
|
||||
/* bootloader will use following functions from xtensa hal library */
|
||||
xthal_get_ccount = 0x4000c050;
|
||||
xthal_get_ccompare = 0x4000c078;
|
||||
xthal_set_ccompare = 0x4000c058;
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "esp_types.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_task.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_phy_init.h"
|
||||
#include "esp_bt.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
#include <esp_types.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/xtensa_api.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <stdio.h>
|
||||
#include "esp_types.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_log.h"
|
||||
#include "malloc.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "driver/dac.h"
|
||||
#include "adc1_i2s_private.h"
|
||||
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_pm.h"
|
||||
|
@ -21,7 +21,7 @@ extern "C" {
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "esp_types.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_err.h"
|
||||
#include "gpio.h"
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "soc/soc.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/periph_ctrl.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define __PCNT_H__
|
||||
|
||||
#include <esp_types.h>
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_err.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "soc/touch_channel.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
#include <esp_types.h>
|
||||
#include <string.h>
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <stdio.h>
|
||||
#include "esp_log.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
#include <esp_types.h>
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "freertos/xtensa_api.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "freertos/semphr.h"
|
||||
#include "freertos/xtensa_api.h"
|
||||
#include "freertos/ringbuf.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "esp32/rom/ets_sys.h"
|
||||
#include "esp_types.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_err.h"
|
||||
|
@ -126,7 +126,7 @@ We have two bits to control the interrupt:
|
||||
#include "esp32/rom/ets_sys.h"
|
||||
#include "esp_types.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_err.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "esp32/rom/ets_sys.h"
|
||||
#include "esp_types.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_err.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <string.h>
|
||||
#include "esp_log.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/xtensa_api.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <string.h>
|
||||
#include "esp_types.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_err.h"
|
||||
|
@ -20,12 +20,10 @@ else()
|
||||
"esp_adapter.c"
|
||||
"esp_timer_esp32.c"
|
||||
"esp_himem.c"
|
||||
"freertos_hooks.c"
|
||||
"gdbstub.c"
|
||||
"hw_random.c"
|
||||
"int_wdt.c"
|
||||
"intr_alloc.c"
|
||||
"ipc.c"
|
||||
"panic.c"
|
||||
"pm_esp32.c"
|
||||
"pm_trace.c"
|
||||
@ -70,7 +68,6 @@ else()
|
||||
|
||||
target_linker_script(${COMPONENT_TARGET} "ld/esp32.peripherals.ld")
|
||||
|
||||
target_link_libraries(${COMPONENT_TARGET} "${CMAKE_CURRENT_SOURCE_DIR}/libhal.a")
|
||||
target_link_libraries(${COMPONENT_TARGET} gcc)
|
||||
target_link_libraries(${COMPONENT_TARGET} "-u call_user_start_cpu0")
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_attr.h"
|
||||
#include "soc/dport_reg.h"
|
||||
#include "sdkconfig.h"
|
||||
|
@ -17,8 +17,7 @@ LINKER_SCRIPTS += $(COMPONENT_BUILD_DIR)/esp32.project.ld esp32.peripherals.ld
|
||||
#ld_include_panic_highint_hdl is added as an undefined symbol because otherwise the
|
||||
#linker will ignore panic_highint_hdl.S as it has no other files depending on any
|
||||
#symbols in it.
|
||||
COMPONENT_ADD_LDFLAGS += $(COMPONENT_PATH)/libhal.a \
|
||||
-L $(COMPONENT_PATH)/ld \
|
||||
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/ld \
|
||||
-T esp32_out.ld \
|
||||
-u ld_include_panic_highint_hdl \
|
||||
$(addprefix -T ,$(LINKER_SCRIPTS)) \
|
||||
|
@ -60,7 +60,7 @@
|
||||
#include "esp_phy_init.h"
|
||||
#include "esp32/cache_err_int.h"
|
||||
#include "esp_coexist_internal.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_debug_helpers.h"
|
||||
#include "esp_core_dump.h"
|
||||
#include "esp_app_trace.h"
|
||||
#include "esp_private/dbg_stubs.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "esp_attr.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
|
||||
#include "esp32/rom/ets_sys.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <sdkconfig.h>
|
||||
#include "esp_attr.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp32/rom/ets_sys.h"
|
||||
#include "esp32/rom/uart.h"
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <xtensa/corebits.h>
|
||||
#include <xtensa/config/system.h>
|
||||
#include "freertos/xtensa_context.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_private/panic_reason.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/soc.h"
|
||||
#include "soc/dport_reg.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "esp_types.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_task.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_heap_caps.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "soc/uart_reg.h"
|
||||
#include "soc/io_mux_reg.h"
|
||||
#include "esp_private/gdbstub.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_debug_helpers.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
@ -1,94 +0,0 @@
|
||||
// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @file esp_deep_sleep.h
|
||||
* @brief legacy definitions of esp_deep_sleep APIs
|
||||
*
|
||||
* This file provides compatibility for applications using esp_deep_sleep_* APIs.
|
||||
* New applications should use functions defined in "esp_sleep.h" instead.
|
||||
* These functions and types will be deprecated at some point.
|
||||
*/
|
||||
|
||||
#warning esp_deep_sleep.h will be deprecated in the next release. Use esp_sleep.h instead.
|
||||
|
||||
#include "esp_sleep.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef esp_sleep_pd_domain_t esp_deep_sleep_pd_domain_t;
|
||||
typedef esp_sleep_pd_option_t esp_deep_sleep_pd_option_t;
|
||||
typedef esp_sleep_ext1_wakeup_mode_t esp_ext1_wakeup_mode_t;
|
||||
typedef esp_sleep_wakeup_cause_t esp_deep_sleep_wakeup_cause_t;
|
||||
|
||||
inline static esp_err_t esp_deep_sleep_enable_ulp_wakeup(void)
|
||||
{
|
||||
return esp_sleep_enable_ulp_wakeup();
|
||||
}
|
||||
|
||||
inline static esp_err_t esp_deep_sleep_enable_timer_wakeup(uint64_t time_in_us)
|
||||
{
|
||||
return esp_sleep_enable_timer_wakeup(time_in_us);
|
||||
}
|
||||
|
||||
inline static esp_err_t esp_deep_sleep_enable_touchpad_wakeup(void)
|
||||
{
|
||||
return esp_sleep_enable_touchpad_wakeup();
|
||||
}
|
||||
|
||||
inline static touch_pad_t esp_deep_sleep_get_touchpad_wakeup_status()
|
||||
{
|
||||
return esp_sleep_get_touchpad_wakeup_status();
|
||||
}
|
||||
|
||||
inline static esp_err_t esp_deep_sleep_enable_ext0_wakeup(gpio_num_t gpio_num, int level)
|
||||
{
|
||||
return esp_sleep_enable_ext0_wakeup(gpio_num, level);
|
||||
}
|
||||
|
||||
inline static esp_err_t esp_deep_sleep_enable_ext1_wakeup(uint64_t mask, esp_ext1_wakeup_mode_t mode)
|
||||
{
|
||||
return esp_sleep_enable_ext1_wakeup(mask, mode);
|
||||
}
|
||||
|
||||
inline static esp_err_t esp_deep_sleep_pd_config(
|
||||
esp_deep_sleep_pd_domain_t domain,
|
||||
esp_deep_sleep_pd_option_t option)
|
||||
{
|
||||
return esp_sleep_pd_config(domain, option);
|
||||
}
|
||||
|
||||
inline static esp_deep_sleep_wakeup_cause_t esp_deep_sleep_get_wakeup_cause()
|
||||
{
|
||||
return esp_sleep_get_wakeup_cause();
|
||||
}
|
||||
|
||||
#define ESP_DEEP_SLEEP_WAKEUP_UNDEFINED ESP_SLEEP_WAKEUP_UNDEFINED
|
||||
#define ESP_DEEP_SLEEP_WAKEUP_EXT0 ESP_SLEEP_WAKEUP_EXT0
|
||||
#define ESP_DEEP_SLEEP_WAKEUP_EXT1 ESP_SLEEP_WAKEUP_EXT1
|
||||
#define ESP_DEEP_SLEEP_WAKEUP_TIMER ESP_SLEEP_WAKEUP_TIMER
|
||||
#define ESP_DEEP_SLEEP_WAKEUP_TOUCHPAD ESP_SLEEP_WAKEUP_TOUCHPAD
|
||||
#define ESP_DEEP_SLEEP_WAKEUP_ULP ESP_SLEEP_WAKEUP_ULP
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,2 +0,0 @@
|
||||
#warning esp_deepsleep.h has been renamed to esp_sleep.h, please update include directives
|
||||
#include "esp_sleep.h"
|
@ -12,78 +12,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef __ESP_INTR_H__
|
||||
#define __ESP_INTR_H__
|
||||
|
||||
#include "esp32/rom/ets_sys.h"
|
||||
#include "freertos/xtensa_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ESP_CCOMPARE_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_CCOMPARE_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_EPWM_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_EPWM_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_MPWM_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_MPWM_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_SPI1_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_SPI1_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_SPI2_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_SPI2_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_SPI3_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_SPI3_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_I2S0_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_I2S0_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_PCNT_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_PCNT_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_LEDC_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_LEDC_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_WMAC_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_WMAC_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_FRC_TIMER1_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_FRC_TIMER1_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_FRC_TIMER2_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_FRC_TIMER2_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_GPIO_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_GPIO_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_UART0_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_UART0_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_WDT_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_WDT_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_RTC_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_RTC_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_SLC_INTR_ATTACH(func, arg) \
|
||||
xt_set_interrupt_handler(ETS_SLC_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_RMT_CTRL_INTRL(func,arg)\
|
||||
xt_set_interrupt_handler(ETS_RMT_CTRL_INUM, (func), (void *)(arg))
|
||||
|
||||
#define ESP_INTR_ENABLE(inum) \
|
||||
xt_ints_on((1<<inum))
|
||||
|
||||
#define ESP_INTR_DISABLE(inum) \
|
||||
xt_ints_off((1<<inum))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ESP_INTR_H__ */
|
||||
#pragma once
|
||||
#warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead
|
||||
#include "esp_intr_alloc.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
#include "freertos/xtensa_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -80,6 +81,9 @@ extern "C" {
|
||||
// This is used to provide SystemView with positive IRQ IDs, otherwise sheduler events are not shown properly
|
||||
#define ETS_INTERNAL_INTR_SOURCE_OFF (-ETS_INTERNAL_PROFILING_INTR_SOURCE)
|
||||
|
||||
#define ESP_INTR_ENABLE(inum) xt_ints_on((1<<inum))
|
||||
#define ESP_INTR_DISABLE(inum) xt_ints_off((1<<inum))
|
||||
|
||||
typedef void (*intr_handler_t)(void *arg);
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "freertos/task.h"
|
||||
#include <esp_types.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_freertos_hooks.h"
|
||||
#include "soc/timer_group_struct.h"
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "esp_err.h"
|
||||
//#define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
|
||||
#include "esp_log.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_ipc.h"
|
||||
|
@ -3,11 +3,6 @@ archive: libesp32.a
|
||||
entries:
|
||||
panic (noflash)
|
||||
|
||||
[mapping]
|
||||
archive: libhal.a
|
||||
entries:
|
||||
* (noflash_text)
|
||||
|
||||
[mapping]
|
||||
archive: libgcc.a
|
||||
entries:
|
||||
|
@ -33,7 +33,8 @@
|
||||
#include "soc/rtc_wdt.h"
|
||||
|
||||
#include "esp_private/gdbstub.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_debug_helpers.h"
|
||||
#include "esp_private/panic_reason.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_core_dump.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "freertos/semphr.h"
|
||||
#include <esp_types.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_freertos_hooks.h"
|
||||
|
@ -11,6 +11,8 @@ else()
|
||||
"src/esp_err_to_name.c"
|
||||
"src/esp_timer.c"
|
||||
"src/ets_timer_legacy.c"
|
||||
"src/freertos_hooks.c"
|
||||
"src/ipc.c"
|
||||
"src/pm_locks.c"
|
||||
"src/stack_check.c")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp32/rom/crc.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_debug_helpers.h"
|
||||
#include "esp_partition.h"
|
||||
#include "esp_core_dump_priv.h"
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_panic.h"
|
||||
#include "esp_debug_helpers.h"
|
||||
#include "esp_core_dump_priv.h"
|
||||
|
||||
const static DRAM_ATTR char TAG[] __attribute__((unused)) = "esp_core_dump_port";
|
||||
|
@ -1,8 +1,8 @@
|
||||
set(COMPONENT_ADD_INCLUDEDIRS include)
|
||||
set(COMPONENT_PRIV_INCLUDEDIRS include/freertos)
|
||||
set(COMPONENT_SRCS "FreeRTOS-openocd.c"
|
||||
"croutine.c"
|
||||
set(COMPONENT_SRCS "croutine.c"
|
||||
"event_groups.c"
|
||||
"FreeRTOS-openocd.c"
|
||||
"list.c"
|
||||
"port.c"
|
||||
"portasm.S"
|
||||
@ -20,6 +20,7 @@ set(COMPONENT_SRCS "FreeRTOS-openocd.c"
|
||||
# app_trace is required by FreeRTOS headers only when CONFIG_SYSVIEW_ENABLE=y,
|
||||
# but requirements can't depend on config options, so always require it.
|
||||
set(COMPONENT_REQUIRES app_trace)
|
||||
set(COMPONENT_PRIV_REQUIRES esp_common)
|
||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
||||
register_component()
|
||||
|
||||
|
@ -103,7 +103,7 @@
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#include "esp_panic.h"
|
||||
#include "esp_debug_helpers.h"
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp_private/crosscore_int.h"
|
||||
|
||||
|
@ -78,7 +78,7 @@ task.h is included from an application file. */
|
||||
|
||||
#include "esp32/rom/ets_sys.h"
|
||||
#include "esp_newlib.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_debug_helpers.h"
|
||||
|
||||
/* FreeRTOS includes. */
|
||||
#include "FreeRTOS.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
#include "xtensa_rtos.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_private/panic_reason.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/soc.h"
|
||||
|
||||
|
@ -91,7 +91,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "xtensa_rtos.h"
|
||||
#include "esp_panic.h"
|
||||
#include "esp_private/panic_reason.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/soc.h"
|
||||
#include "soc/dport_reg.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "soc/io_mux_reg.h"
|
||||
#include "esp_heap_caps.h"
|
||||
|
||||
#include "esp_panic.h"
|
||||
#include "esp_debug_helpers.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "soc/hwcrypto_reg.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_intr.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_attr.h"
|
||||
|
||||
|
@ -5,3 +5,5 @@ set(COMPONENT_ADD_INCLUDEDIRS "include" "${IDF_TARGET}/include")
|
||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
||||
|
||||
register_component()
|
||||
|
||||
target_link_libraries(${COMPONENT_TARGET} "${CMAKE_CURRENT_SOURCE_DIR}/${IDF_TARGET}/libhal.a")
|
||||
|
@ -1,4 +1,6 @@
|
||||
COMPONENT_ADD_INCLUDEDIRS := include esp32/include
|
||||
|
||||
COMPONENT_ADD_LDFLAGS += $(COMPONENT_PATH)/esp32/libhal.a
|
||||
|
||||
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
||||
|
||||
|
@ -1,39 +1,24 @@
|
||||
#ifndef PANIC_H
|
||||
#define PANIC_H
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PANIC_RSN_NONE 0
|
||||
#define PANIC_RSN_DEBUGEXCEPTION 1
|
||||
#define PANIC_RSN_DOUBLEEXCEPTION 2
|
||||
#define PANIC_RSN_KERNELEXCEPTION 3
|
||||
#define PANIC_RSN_COPROCEXCEPTION 4
|
||||
#define PANIC_RSN_INTWDT_CPU0 5
|
||||
#define PANIC_RSN_INTWDT_CPU1 6
|
||||
#define PANIC_RSN_CACHEERR 7
|
||||
#define PANIC_RSN_MAX 7
|
||||
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
#define ESP_WATCHPOINT_LOAD 0x40000000
|
||||
#define ESP_WATCHPOINT_STORE 0x80000000
|
||||
#define ESP_WATCHPOINT_ACCESS 0xC0000000
|
||||
|
||||
/**
|
||||
* @brief If an OCD is connected over JTAG. set breakpoint 0 to the given function
|
||||
* address. Do nothing otherwise.
|
||||
* @param data Pointer to the target breakpoint position
|
||||
* @param fn Pointer to the target breakpoint position
|
||||
*/
|
||||
|
||||
void esp_set_breakpoint_if_jtag(void *fn);
|
||||
|
||||
#define ESP_WATCHPOINT_LOAD 0x40000000
|
||||
#define ESP_WATCHPOINT_STORE 0x80000000
|
||||
#define ESP_WATCHPOINT_ACCESS 0xC0000000
|
||||
|
||||
/**
|
||||
* @brief Set a watchpoint to break/panic when a certain memory range is accessed.
|
||||
*
|
||||
@ -68,10 +53,8 @@ static inline bool esp_stack_ptr_is_sane(uint32_t sp)
|
||||
{
|
||||
return !(sp < 0x3ffae010UL || sp > 0x3ffffff0UL || ((sp & 0xf) != 0));
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
4
components/xtensa/include/esp_panic.h
Normal file
4
components/xtensa/include/esp_panic.h
Normal file
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
#warning "esp_panic.h is deprecated, please use esp_debug_helpers.h or/and esp_private/panic_reason.h"
|
||||
#include "esp_private/panic_reason.h"
|
||||
#include "esp_debug_helpers.h"
|
11
components/xtensa/include/esp_private/panic_reason.h
Normal file
11
components/xtensa/include/esp_private/panic_reason.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#define PANIC_RSN_NONE 0
|
||||
#define PANIC_RSN_DEBUGEXCEPTION 1
|
||||
#define PANIC_RSN_DOUBLEEXCEPTION 2
|
||||
#define PANIC_RSN_KERNELEXCEPTION 3
|
||||
#define PANIC_RSN_COPROCEXCEPTION 4
|
||||
#define PANIC_RSN_INTWDT_CPU0 5
|
||||
#define PANIC_RSN_INTWDT_CPU1 6
|
||||
#define PANIC_RSN_CACHEERR 7
|
||||
#define PANIC_RSN_MAX 7
|
@ -2,3 +2,8 @@
|
||||
archive: libxtensa.a
|
||||
entries:
|
||||
eri (noflash_text)
|
||||
|
||||
[mapping]
|
||||
archive: libhal.a
|
||||
entries:
|
||||
* (noflash_text)
|
||||
|
@ -161,9 +161,9 @@ INPUT = \
|
||||
../../components/esp_common/include/esp_int_wdt.h \
|
||||
../../components/esp_common/include/esp_task_wdt.h \
|
||||
## Hooks
|
||||
../../components/esp32/include/esp_freertos_hooks.h \
|
||||
../../components/esp_common/include/esp_freertos_hooks.h \
|
||||
## Inter-Processor Call
|
||||
../../components/esp32/include/esp_ipc.h \
|
||||
../../components/esp_common/include/esp_ipc.h \
|
||||
## Over The Air Updates (OTA)
|
||||
../../components/app_update/include/esp_ota_ops.h \
|
||||
## ESP HTTPS OTA
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Some tools
|
||||
components/app_update/gen_empty_partition.py
|
||||
components/esp32/ld/elf_to_ld.sh
|
||||
tools/elf_to_ld.sh
|
||||
components/espcoredump/espcoredump.py
|
||||
components/heap/test_multi_heap_host/test_all_configs.sh
|
||||
components/idf_test/unit_test/TestCaseScript/IDFUnitTest/__init__.py
|
||||
|
@ -319,7 +319,8 @@ def main():
|
||||
idf_path = os.path.realpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
|
||||
|
||||
parser = argparse.ArgumentParser(description='ESP32 esp_err_to_name lookup generator for esp_err_t')
|
||||
parser.add_argument('--c_input', help='Path to the esp_err_to_name.c.in template input.', default=idf_path + '/components/esp32/esp_err_to_name.c.in')
|
||||
parser.add_argument('--c_input', help='Path to the esp_err_to_name.c.in template input.',
|
||||
default=idf_path + '/components/esp_common/src/esp_err_to_name.c.in')
|
||||
parser.add_argument('--c_output', help='Path to the esp_err_to_name.c output.', default=idf_path + '/components/esp32/esp_err_to_name.c')
|
||||
parser.add_argument('--rst_output', help='Generate .rst output and save it into this file')
|
||||
args = parser.parse_args()
|
||||
|
Loading…
x
Reference in New Issue
Block a user