mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/remove_dependency_to_soc' into 'master'
global: remove dependency to soc everywhere except driver and kernel components See merge request idf/esp-idf!4678
This commit is contained in:
commit
a20d02b7f1
19
Kconfig
19
Kconfig
@ -205,3 +205,22 @@ mainmenu "Espressif IoT Development Framework Configuration"
|
|||||||
menu "Component config"
|
menu "Component config"
|
||||||
source "$COMPONENT_KCONFIGS"
|
source "$COMPONENT_KCONFIGS"
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
menu "Compatibility options"
|
||||||
|
config LEGACY_INCLUDE_COMMON_HEADERS
|
||||||
|
bool "Include headers accross components as before IDF v4.0"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Soc, esp32, and driver components, the most common
|
||||||
|
components. Some header of these components are included
|
||||||
|
implicitly by headers of other components before IDF v4.0.
|
||||||
|
It's not required for high-level components, but still
|
||||||
|
included through long header chain everywhere.
|
||||||
|
|
||||||
|
This is harmful to the modularity. So it's changed in IDF
|
||||||
|
v4.0.
|
||||||
|
|
||||||
|
You can still include these headers in a legacy way until it
|
||||||
|
is totally deprecated by enable this option.
|
||||||
|
|
||||||
|
endmenu #Compatibility options
|
@ -23,7 +23,7 @@ if(CONFIG_HEAP_TRACING_TOHOST)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(COMPONENT_REQUIRES)
|
set(COMPONENT_REQUIRES)
|
||||||
set(COMPONENT_PRIV_REQUIRES heap)
|
set(COMPONENT_PRIV_REQUIRES heap soc)
|
||||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <esp_types.h>
|
#include <esp_types.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
#include "esp32/rom/spi_flash.h"
|
#include "esp32/rom/spi_flash.h"
|
||||||
#include "esp32/rom/rtc.h"
|
#include "esp32/rom/rtc.h"
|
||||||
@ -28,8 +29,8 @@
|
|||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
|
|
||||||
#include "driver/gpio.h"
|
#include "driver/gpio.h"
|
||||||
|
#include "esp_sleep.h"
|
||||||
|
|
||||||
#include "sdkconfig.h"
|
|
||||||
|
|
||||||
RTC_DATA_ATTR static int boot_count = 0;
|
RTC_DATA_ATTR static int boot_count = 0;
|
||||||
static const char *TAG = "ota_test";
|
static const char *TAG = "ota_test";
|
||||||
|
@ -14,7 +14,11 @@ set(COMPONENTS bootloader esptool_py partition_table soc bootloader_support log
|
|||||||
set(BOOTLOADER_BUILD 1)
|
set(BOOTLOADER_BUILD 1)
|
||||||
add_definitions(-DBOOTLOADER_BUILD=1)
|
add_definitions(-DBOOTLOADER_BUILD=1)
|
||||||
|
|
||||||
set(COMPONENT_REQUIRES_COMMON log soc esp_rom esp_common xtensa)
|
set(COMPONENT_REQUIRES_COMMON log esp_rom esp_common xtensa)
|
||||||
|
|
||||||
|
if (CONFIG_LEGACY_INCLUDE_COMMON_HEADERS)
|
||||||
|
list(APPEND COMPONENT_REQUIRES_COMMON "soc")
|
||||||
|
endif()
|
||||||
|
|
||||||
include("${IDF_PATH}/tools/cmake/project.cmake")
|
include("${IDF_PATH}/tools/cmake/project.cmake")
|
||||||
project(bootloader)
|
project(bootloader)
|
||||||
|
@ -13,7 +13,7 @@ set(COMPONENT_SRCS "src/bootloader_clock.c"
|
|||||||
|
|
||||||
if(${BOOTLOADER_BUILD})
|
if(${BOOTLOADER_BUILD})
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS "include include_bootloader")
|
set(COMPONENT_ADD_INCLUDEDIRS "include include_bootloader")
|
||||||
set(COMPONENT_REQUIRES)
|
set(COMPONENT_REQUIRES soc) #unfortunately the header directly uses SOC registers
|
||||||
set(COMPONENT_PRIV_REQUIRES spi_flash micro-ecc efuse)
|
set(COMPONENT_PRIV_REQUIRES spi_flash micro-ecc efuse)
|
||||||
list(APPEND COMPONENT_SRCS "src/bootloader_init.c")
|
list(APPEND COMPONENT_SRCS "src/bootloader_init.c")
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ if(${BOOTLOADER_BUILD})
|
|||||||
else()
|
else()
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
set(COMPONENT_PRIV_INCLUDEDIRS "include_bootloader")
|
set(COMPONENT_PRIV_INCLUDEDIRS "include_bootloader")
|
||||||
set(COMPONENT_REQUIRES)
|
set(COMPONENT_REQUIRES soc) #unfortunately the header directly uses SOC registers
|
||||||
set(COMPONENT_PRIV_REQUIRES spi_flash mbedtls efuse)
|
set(COMPONENT_PRIV_REQUIRES spi_flash mbedtls efuse)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "bootloader_flash.h"
|
#include "bootloader_flash.h"
|
||||||
#include "bootloader_common.h"
|
#include "bootloader_common.h"
|
||||||
#include "soc/gpio_periph.h"
|
#include "soc/gpio_periph.h"
|
||||||
|
#include "soc/efuse_reg.h"
|
||||||
#include "esp_image_format.h"
|
#include "esp_image_format.h"
|
||||||
#include "bootloader_sha.h"
|
#include "bootloader_sha.h"
|
||||||
#include "sys/param.h"
|
#include "sys/param.h"
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "soc/gpio_reg.h"
|
#include "soc/gpio_reg.h"
|
||||||
#include "soc/gpio_sig_map.h"
|
#include "soc/gpio_sig_map.h"
|
||||||
#include "soc/rtc_wdt.h"
|
#include "soc/rtc_wdt.h"
|
||||||
|
#include "soc/spi_reg.h"
|
||||||
|
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "esp_image_format.h"
|
#include "esp_image_format.h"
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "esp32/rom/spi_flash.h"
|
#include "esp32/rom/spi_flash.h"
|
||||||
#include "esp32/rom/efuse.h"
|
#include "esp32/rom/efuse.h"
|
||||||
#include "soc/spi_struct.h"
|
#include "soc/spi_struct.h"
|
||||||
|
#include "soc/spi_reg.h"
|
||||||
#include "soc/efuse_reg.h"
|
#include "soc/efuse_reg.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ if(CONFIG_BT_ENABLED)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# requirements can't depend on config
|
# requirements can't depend on config
|
||||||
set(COMPONENT_PRIV_REQUIRES nvs_flash)
|
set(COMPONENT_PRIV_REQUIRES nvs_flash soc)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "stack/bt_types.h"
|
#include "stack/bt_types.h"
|
||||||
|
|
||||||
@ -53,7 +54,7 @@
|
|||||||
#define BT_PRINT_V(tag, format, ...) {esp_log_write(ESP_LOG_VERBOSE, tag, LOG_FORMAT(V, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }
|
#define BT_PRINT_V(tag, format, ...) {esp_log_write(ESP_LOG_VERBOSE, tag, LOG_FORMAT(V, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }
|
||||||
|
|
||||||
#ifndef assert
|
#ifndef assert
|
||||||
#define assert(x) do { if (!(x)) BT_PRINT_E("bt host error %s %u\n", __FILE__, __LINE__); } while (0)
|
#define assert(x) do { if (!(x)) BT_PRINT_E(TAG, "bt host error %s %u\n", __FILE__, __LINE__); } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline void trc_dump_buffer(const char *prefix, uint8_t *data, uint16_t len)
|
inline void trc_dump_buffer(const char *prefix, uint8_t *data, uint16_t len)
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
|
#include "soc/soc.h"
|
||||||
|
|
||||||
static const char* TAG = "cxx";
|
static const char* TAG = "cxx";
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ set(COMPONENT_SRCS "can.c"
|
|||||||
"uart.c")
|
"uart.c")
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
set(COMPONENT_PRIV_INCLUDEDIRS "include/driver")
|
set(COMPONENT_PRIV_INCLUDEDIRS "include/driver")
|
||||||
set(COMPONENT_REQUIRES esp_ringbuf)
|
set(COMPONENT_REQUIRES esp_ringbuf soc) #cannot totally hide soc headers, since there are a lot arguments in the driver are chip-dependent
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "driver/gpio.h"
|
#include "driver/gpio.h"
|
||||||
#include "driver/periph_ctrl.h"
|
#include "driver/periph_ctrl.h"
|
||||||
#include "esp_pm.h"
|
#include "esp_pm.h"
|
||||||
|
#include "soc/soc_memory_layout.h"
|
||||||
|
|
||||||
static const char* I2C_TAG = "i2c";
|
static const char* I2C_TAG = "i2c";
|
||||||
#define I2C_CHECK(a, str, ret) if(!(a)) { \
|
#define I2C_CHECK(a, str, ret) if(!(a)) { \
|
||||||
|
@ -16,16 +16,18 @@
|
|||||||
#define _DRIVER_GPIO_H_
|
#define _DRIVER_GPIO_H_
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include <esp_types.h>
|
#include <esp_types.h>
|
||||||
#include "soc/gpio_reg.h"
|
#include <esp_bit_defs.h>
|
||||||
#include "soc/gpio_struct.h"
|
|
||||||
#include "soc/rtc_io_reg.h"
|
|
||||||
#include "soc/io_mux_reg.h"
|
|
||||||
#include "soc/gpio_sig_map.h"
|
|
||||||
#include "esp32/rom/gpio.h"
|
#include "esp32/rom/gpio.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
#include "esp_intr_alloc.h"
|
#include "esp_intr_alloc.h"
|
||||||
#include "soc/gpio_periph.h"
|
#include "soc/gpio_periph.h"
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_LEGACY_INCLUDE_COMMON_HEADERS
|
||||||
|
#include "soc/rtc_io_reg.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "soc/rmt_struct.h"
|
#include "soc/rmt_struct.h"
|
||||||
#include "driver/periph_ctrl.h"
|
#include "driver/periph_ctrl.h"
|
||||||
#include "driver/rmt.h"
|
#include "driver/rmt.h"
|
||||||
|
#include "soc/soc_memory_layout.h"
|
||||||
|
|
||||||
#include <sys/lock.h>
|
#include <sys/lock.h>
|
||||||
|
|
||||||
|
@ -93,10 +93,12 @@ The driver of FIFOs works as below:
|
|||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "soc/dport_access.h"
|
#include "soc/dport_access.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
|
#include "soc/soc_memory_layout.h"
|
||||||
#include "soc/io_mux_reg.h"
|
#include "soc/io_mux_reg.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
#include "xtensa/core-macros.h"
|
#include "xtensa/core-macros.h"
|
||||||
#include "driver/periph_ctrl.h"
|
#include "driver/periph_ctrl.h"
|
||||||
|
#include "driver/gpio.h"
|
||||||
|
|
||||||
|
|
||||||
#define SDIO_SLAVE_CHECK(res, str, ret_val) do { if(!(res)){\
|
#define SDIO_SLAVE_CHECK(res, str, ret_val) do { if(!(res)){\
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "test/test_common_spi.h"
|
#include "test/test_common_spi.h"
|
||||||
#include "driver/spi_slave.h"
|
#include "driver/spi_slave.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
#include "driver/gpio.h"
|
||||||
|
|
||||||
int test_freq_default[]=TEST_FREQ_DEFAULT();
|
int test_freq_default[]=TEST_FREQ_DEFAULT();
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "soc/gpio_periph.h"
|
#include "soc/gpio_periph.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "../cache_utils.h"
|
#include "../cache_utils.h"
|
||||||
|
#include "soc/soc_memory_layout.h"
|
||||||
|
|
||||||
const static char TAG[] = "test_spi";
|
const static char TAG[] = "test_spi";
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include "driver/spi_master.h"
|
#include "driver/spi_master.h"
|
||||||
#include "driver/spi_slave.h"
|
#include "driver/spi_slave.h"
|
||||||
|
#include "driver/gpio.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "test/test_common_spi.h"
|
#include "test/test_common_spi.h"
|
||||||
|
@ -13,7 +13,7 @@ list(APPEND COMPONENT_SRCS "src/esp_efuse_api.c"
|
|||||||
"src/esp_efuse_utility.c")
|
"src/esp_efuse_utility.c")
|
||||||
|
|
||||||
set(COMPONENT_REQUIRES)
|
set(COMPONENT_REQUIRES)
|
||||||
set(COMPONENT_PRIV_REQUIRES bootloader_support)
|
set(COMPONENT_PRIV_REQUIRES bootloader_support soc)
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
set(GEN_EFUSE_TABLE_ARG --max_blk_len ${CONFIG_EFUSE_MAX_BLK_LEN})
|
set(GEN_EFUSE_TABLE_ARG --max_blk_len ${CONFIG_EFUSE_MAX_BLK_LEN})
|
||||||
|
@ -3,7 +3,7 @@ require_idf_targets(esp32)
|
|||||||
if(BOOTLOADER_BUILD)
|
if(BOOTLOADER_BUILD)
|
||||||
# For bootloader, all we need from esp32 is headers
|
# For bootloader, all we need from esp32 is headers
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS include)
|
set(COMPONENT_ADD_INCLUDEDIRS include)
|
||||||
set(COMPONENT_REQUIRES ${IDF_COMPONENTS})
|
set(COMPONENT_REQUIRES ${IDF_COMPONENTS} soc) #unfortunately rom/uart uses SOC registers directly
|
||||||
set(COMPONENT_SRCS )
|
set(COMPONENT_SRCS )
|
||||||
register_component()
|
register_component()
|
||||||
else()
|
else()
|
||||||
@ -35,7 +35,8 @@ else()
|
|||||||
"task_wdt.c")
|
"task_wdt.c")
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
|
|
||||||
set(COMPONENT_REQUIRES driver esp_event efuse)
|
set(COMPONENT_REQUIRES driver esp_event efuse soc) #unfortunately rom/uart uses SOC registers directly
|
||||||
|
|
||||||
# driver is a public requirement because esp_sleep.h uses gpio_num_t & touch_pad_t
|
# driver is a public requirement because esp_sleep.h uses gpio_num_t & touch_pad_t
|
||||||
# app_update is added here because cpu_start.c uses esp_ota_get_app_description() function.
|
# app_update is added here because cpu_start.c uses esp_ota_get_app_description() function.
|
||||||
set(COMPONENT_PRIV_REQUIRES
|
set(COMPONENT_PRIV_REQUIRES
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "esp_private/pm_trace.h"
|
#include "esp_private/pm_trace.h"
|
||||||
#include "esp_private/esp_timer_impl.h"
|
#include "esp_private/esp_timer_impl.h"
|
||||||
#include "esp32/pm.h"
|
#include "esp32/pm.h"
|
||||||
|
#include "esp_sleep.h"
|
||||||
|
|
||||||
/* CCOMPARE update timeout, in CPU cycles. Any value above ~600 cycles will work
|
/* CCOMPARE update timeout, in CPU cycles. Any value above ~600 cycles will work
|
||||||
* for the purpose of detecting a deadlock.
|
* for the purpose of detecting a deadlock.
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "soc/sens_reg.h"
|
#include "soc/sens_reg.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/rtc_wdt.h"
|
#include "soc/rtc_wdt.h"
|
||||||
|
#include "soc/soc_memory_layout.h"
|
||||||
#include "driver/rtc_io.h"
|
#include "driver/rtc_io.h"
|
||||||
#include "driver/uart.h"
|
#include "driver/uart.h"
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "soc/uart_reg.h"
|
#include "soc/uart_reg.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/io_mux_reg.h"
|
#include "soc/io_mux_reg.h"
|
||||||
|
#include "driver/gpio.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "soc/rtc_cntl_reg.h"
|
#include "soc/rtc_cntl_reg.h"
|
||||||
#include "driver/timer.h"
|
#include "driver/timer.h"
|
||||||
#include "esp32/rom/rtc.h"
|
#include "esp32/rom/rtc.h"
|
||||||
|
#include "esp_sleep.h"
|
||||||
|
|
||||||
#define RTC_BSS_ATTR __attribute__((section(".rtc.bss")))
|
#define RTC_BSS_ATTR __attribute__((section(".rtc.bss")))
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ else()
|
|||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
set(COMPONENT_PRIV_INCLUDEDIRS)
|
set(COMPONENT_PRIV_INCLUDEDIRS)
|
||||||
set(COMPONENT_REQUIRES)
|
set(COMPONENT_REQUIRES)
|
||||||
|
set(COMPONENT_PRIV_REQUIRES soc)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
|
57
components/esp_common/include/esp_bit_defs.h
Normal file
57
components/esp_common/include/esp_bit_defs.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
// Copyright 2010-2019 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
|
||||||
|
|
||||||
|
//Register Bits{{
|
||||||
|
#define BIT31 0x80000000
|
||||||
|
#define BIT30 0x40000000
|
||||||
|
#define BIT29 0x20000000
|
||||||
|
#define BIT28 0x10000000
|
||||||
|
#define BIT27 0x08000000
|
||||||
|
#define BIT26 0x04000000
|
||||||
|
#define BIT25 0x02000000
|
||||||
|
#define BIT24 0x01000000
|
||||||
|
#define BIT23 0x00800000
|
||||||
|
#define BIT22 0x00400000
|
||||||
|
#define BIT21 0x00200000
|
||||||
|
#define BIT20 0x00100000
|
||||||
|
#define BIT19 0x00080000
|
||||||
|
#define BIT18 0x00040000
|
||||||
|
#define BIT17 0x00020000
|
||||||
|
#define BIT16 0x00010000
|
||||||
|
#define BIT15 0x00008000
|
||||||
|
#define BIT14 0x00004000
|
||||||
|
#define BIT13 0x00002000
|
||||||
|
#define BIT12 0x00001000
|
||||||
|
#define BIT11 0x00000800
|
||||||
|
#define BIT10 0x00000400
|
||||||
|
#define BIT9 0x00000200
|
||||||
|
#define BIT8 0x00000100
|
||||||
|
#define BIT7 0x00000080
|
||||||
|
#define BIT6 0x00000040
|
||||||
|
#define BIT5 0x00000020
|
||||||
|
#define BIT4 0x00000010
|
||||||
|
#define BIT3 0x00000008
|
||||||
|
#define BIT2 0x00000004
|
||||||
|
#define BIT1 0x00000002
|
||||||
|
#define BIT0 0x00000001
|
||||||
|
//}}
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLER__
|
||||||
|
#define BIT(nr) (1UL << (nr))
|
||||||
|
#define BIT64(nr) (1ULL << (nr))
|
||||||
|
#else
|
||||||
|
#define BIT(nr) (1 << (nr))
|
||||||
|
#endif
|
@ -18,7 +18,10 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_sleep.h"
|
#include "esp_attr.h"
|
||||||
|
#include "esp_bit_defs.h"
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "soc/soc.h"
|
||||||
#include "esp_types.h"
|
#include "esp_types.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
@ -17,8 +17,13 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_LEGACY_INCLUDE_COMMON_HEADERS
|
||||||
#include "soc/soc.h"
|
#include "soc/soc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -19,8 +19,13 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_LEGACY_INCLUDE_COMMON_HEADERS
|
||||||
#include "soc/gpio_reg.h"
|
#include "soc/gpio_reg.h"
|
||||||
#include "soc/gpio_pins.h"
|
#include "soc/gpio_pins.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -20,7 +20,11 @@
|
|||||||
|
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_LEGACY_INCLUDE_COMMON_HEADERS
|
||||||
#include "soc/spi_reg.h"
|
#include "soc/spi_reg.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
set(COMPONENT_PRIV_INCLUDEDIRS "include_core_dump")
|
set(COMPONENT_PRIV_INCLUDEDIRS "include_core_dump")
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
set(COMPONENT_REQUIRES)
|
set(COMPONENT_REQUIRES)
|
||||||
set(COMPONENT_PRIV_REQUIRES spi_flash)
|
set(COMPONENT_PRIV_REQUIRES spi_flash soc)
|
||||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
||||||
set(COMPONENT_SRCS "src/core_dump_common.c"
|
set(COMPONENT_SRCS "src/core_dump_common.c"
|
||||||
"src/core_dump_flash.c"
|
"src/core_dump_flash.c"
|
||||||
|
@ -7,6 +7,6 @@ set(COMPONENT_SRCS "emac_dev.c"
|
|||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
|
|
||||||
set(COMPONENT_REQUIRES)
|
set(COMPONENT_REQUIRES)
|
||||||
set(COMPONENT_PRIV_REQUIRES tcpip_adapter esp_event)
|
set(COMPONENT_PRIV_REQUIRES tcpip_adapter esp_event soc)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <esp_bit_defs.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This header contains register/bit masks for the standard PHY MII registers that should be supported by all PHY models.
|
* @brief This header contains register/bit masks for the standard PHY MII registers that should be supported by all PHY models.
|
||||||
*
|
*
|
||||||
|
@ -25,6 +25,7 @@ INCLUDE_DIRS := \
|
|||||||
xtensa/include \
|
xtensa/include \
|
||||||
xtensa/esp32/include \
|
xtensa/esp32/include \
|
||||||
soc/esp32/include \
|
soc/esp32/include \
|
||||||
|
soc/include \
|
||||||
esp32/include \
|
esp32/include \
|
||||||
esp_common/include \
|
esp_common/include \
|
||||||
bootloader_support/include \
|
bootloader_support/include \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
set(COMPONENT_ADD_INCLUDEDIRS include)
|
set(COMPONENT_ADD_INCLUDEDIRS include)
|
||||||
set(COMPONENT_PRIV_INCLUDEDIRS include/freertos)
|
set(COMPONENT_PRIV_INCLUDEDIRS include/freertos .)
|
||||||
set(COMPONENT_SRCS "croutine.c"
|
set(COMPONENT_SRCS "croutine.c"
|
||||||
"event_groups.c"
|
"event_groups.c"
|
||||||
"FreeRTOS-openocd.c"
|
"FreeRTOS-openocd.c"
|
||||||
@ -20,8 +20,9 @@ set(COMPONENT_SRCS "croutine.c"
|
|||||||
# app_trace is required by FreeRTOS headers only when CONFIG_SYSVIEW_ENABLE=y,
|
# 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.
|
# but requirements can't depend on config options, so always require it.
|
||||||
set(COMPONENT_REQUIRES app_trace)
|
set(COMPONENT_REQUIRES app_trace)
|
||||||
set(COMPONENT_PRIV_REQUIRES esp_common)
|
set(COMPONENT_PRIV_REQUIRES esp_common soc)
|
||||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
target_link_libraries(${COMPONENT_TARGET} "-Wl,--undefined=uxTopUsedPriority")
|
target_link_libraries(${COMPONENT_TARGET} "-Wl,--undefined=uxTopUsedPriority")
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
COMPONENT_ADD_LDFLAGS += -Wl,--undefined=uxTopUsedPriority
|
COMPONENT_ADD_LDFLAGS += -Wl,--undefined=uxTopUsedPriority
|
||||||
COMPONENT_ADD_INCLUDEDIRS := include
|
COMPONENT_ADD_INCLUDEDIRS := include
|
||||||
COMPONENT_PRIV_INCLUDEDIRS := include/freertos
|
COMPONENT_PRIV_INCLUDEDIRS := include/freertos .
|
||||||
|
|
||||||
tasks.o event_groups.o timers.o queue.o: CFLAGS += -D_ESP_FREERTOS_INTERNAL
|
tasks.o event_groups.o timers.o queue.o: CFLAGS += -D_ESP_FREERTOS_INTERNAL
|
||||||
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
||||||
|
@ -73,6 +73,8 @@ extern "C" {
|
|||||||
#ifndef __ASSEMBLER__
|
#ifndef __ASSEMBLER__
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include <xtensa/hal.h>
|
#include <xtensa/hal.h>
|
||||||
#include <xtensa/config/core.h>
|
#include <xtensa/config/core.h>
|
||||||
@ -83,7 +85,12 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
#include <esp_heap_caps.h>
|
#include <esp_heap_caps.h>
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_LEGACY_INCLUDE_COMMON_HEADERS
|
||||||
#include "soc/soc_memory_layout.h"
|
#include "soc/soc_memory_layout.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//#include "xtensa_context.h"
|
//#include "xtensa_context.h"
|
||||||
|
|
||||||
@ -264,14 +271,6 @@ static inline unsigned portENTER_CRITICAL_NESTED() {
|
|||||||
#define pvPortMallocTcbMem(size) heap_caps_malloc(size, portTcbMemoryCaps)
|
#define pvPortMallocTcbMem(size) heap_caps_malloc(size, portTcbMemoryCaps)
|
||||||
#define pvPortMallocStackMem(size) heap_caps_malloc(size, portStackMemoryCaps)
|
#define pvPortMallocStackMem(size) heap_caps_malloc(size, portStackMemoryCaps)
|
||||||
|
|
||||||
//xTaskCreateStatic uses these functions to check incoming memory.
|
|
||||||
#define portVALID_TCB_MEM(ptr) (esp_ptr_internal(ptr) && esp_ptr_byte_accessible(ptr))
|
|
||||||
#ifdef CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
|
|
||||||
#define portVALID_STACK_MEM(ptr) esp_ptr_byte_accessible(ptr)
|
|
||||||
#else
|
|
||||||
#define portVALID_STACK_MEM(ptr) (esp_ptr_internal(ptr) && esp_ptr_byte_accessible(ptr))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrapper for the Xtensa compare-and-set instruction. This subroutine will atomically compare
|
* Wrapper for the Xtensa compare-and-set instruction. This subroutine will atomically compare
|
||||||
* *addr to 'compare'. If *addr == compare, *addr is set to *set. *set is updated with the previous
|
* *addr to 'compare'. If *addr == compare, *addr is set to *set. *set is updated with the previous
|
||||||
|
80
components/freertos/portmacro_priv.h
Normal file
80
components/freertos/portmacro_priv.h
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.
|
||||||
|
All rights reserved
|
||||||
|
|
||||||
|
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||||
|
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* FreeRTOS provides completely free yet professionally developed, *
|
||||||
|
* robust, strictly quality controlled, supported, and cross *
|
||||||
|
* platform software that has become a de facto standard. *
|
||||||
|
* *
|
||||||
|
* Help yourself get started quickly and support the FreeRTOS *
|
||||||
|
* project by purchasing a FreeRTOS tutorial book, reference *
|
||||||
|
* manual, or both from: http://www.FreeRTOS.org/Documentation *
|
||||||
|
* *
|
||||||
|
* Thank you! *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
This file is part of the FreeRTOS distribution.
|
||||||
|
|
||||||
|
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License (version 2) as published by the
|
||||||
|
Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
|
||||||
|
|
||||||
|
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||||
|
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||||
|
>>! obliged to provide the source code for proprietary components !<<
|
||||||
|
>>! outside of the FreeRTOS kernel. !<<
|
||||||
|
|
||||||
|
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. Full license text is available from the following
|
||||||
|
link: http://www.freertos.org/a00114.html
|
||||||
|
|
||||||
|
1 tab == 4 spaces!
|
||||||
|
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* Having a problem? Start by reading the FAQ "My application does *
|
||||||
|
* not run, what could be wrong?" *
|
||||||
|
* *
|
||||||
|
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
|
||||||
|
license and Real Time Engineers Ltd. contact details.
|
||||||
|
|
||||||
|
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||||
|
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||||
|
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||||
|
|
||||||
|
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
|
||||||
|
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||||
|
licenses offer ticketed support, indemnification and middleware.
|
||||||
|
|
||||||
|
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||||
|
engineered and independently SIL3 certified version for use in safety and
|
||||||
|
mission critical applications that require provable dependability.
|
||||||
|
|
||||||
|
1 tab == 4 spaces!
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* This header holds the macros for porting which should only be used inside FreeRTOS */
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "soc/soc_memory_layout.h"
|
||||||
|
|
||||||
|
//xTaskCreateStatic uses these functions to check incoming memory.
|
||||||
|
#define portVALID_TCB_MEM(ptr) (esp_ptr_internal(ptr) && esp_ptr_byte_accessible(ptr))
|
||||||
|
#ifdef CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
|
||||||
|
#define portVALID_STACK_MEM(ptr) esp_ptr_byte_accessible(ptr)
|
||||||
|
#else
|
||||||
|
#define portVALID_STACK_MEM(ptr) (esp_ptr_internal(ptr) && esp_ptr_byte_accessible(ptr))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
@ -46,6 +46,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "soc/cpu.h"
|
#include "soc/cpu.h"
|
||||||
#include "portable.h"
|
#include "portable.h"
|
||||||
|
#include "soc/soc_memory_layout.h"
|
||||||
|
|
||||||
/* XOR one core ID with this value to get the other core ID */
|
/* XOR one core ID with this value to get the other core ID */
|
||||||
#define CORE_ID_XOR_SWAP (CORE_ID_PRO ^ CORE_ID_APP)
|
#define CORE_ID_XOR_SWAP (CORE_ID_PRO ^ CORE_ID_APP)
|
||||||
|
@ -86,6 +86,7 @@ task.h is included from an application file. */
|
|||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
#include "StackMacros.h"
|
#include "StackMacros.h"
|
||||||
#include "portmacro.h"
|
#include "portmacro.h"
|
||||||
|
#include "portmacro_priv.h"
|
||||||
#include "semphr.h"
|
#include "semphr.h"
|
||||||
|
|
||||||
/* Lint e961 and e750 are suppressed as a MISRA exception justified because the
|
/* Lint e961 and e750 are suppressed as a MISRA exception justified because the
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "soc/uart_reg.h"
|
#include "soc/uart_reg.h"
|
||||||
#include "soc/dport_reg.h"
|
#include "soc/dport_reg.h"
|
||||||
#include "soc/io_mux_reg.h"
|
#include "soc/io_mux_reg.h"
|
||||||
|
#include "driver/gpio.h"
|
||||||
|
|
||||||
|
|
||||||
void ets_isr_unmask(uint32_t unmask);
|
void ets_isr_unmask(uint32_t unmask);
|
||||||
|
@ -17,6 +17,7 @@ endif()
|
|||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
||||||
set(COMPONENT_REQUIRES "")
|
set(COMPONENT_REQUIRES "")
|
||||||
|
set(COMPONENT_PRIV_REQUIRES soc)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
set(COMPONENT_SRCS "log.c")
|
set(COMPONENT_SRCS "log.c")
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
set(COMPONENT_REQUIRES)
|
set(COMPONENT_REQUIRES)
|
||||||
|
set(COMPONENT_PRIV_REQUIRES soc)
|
||||||
register_component()
|
register_component()
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "esp_vfs.h"
|
#include "esp_vfs.h"
|
||||||
#include "esp_vfs_dev.h"
|
#include "esp_vfs_dev.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
#include "soc/uart_struct.h"
|
|
||||||
#include "lwip/sockets.h"
|
#include "lwip/sockets.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "lwip/sys.h"
|
#include "lwip/sys.h"
|
||||||
|
@ -2,6 +2,8 @@ set(COMPONENT_ADD_INCLUDEDIRS "port/include" "mbedtls/include")
|
|||||||
set(COMPONENT_SRCS "mbedtls.c")
|
set(COMPONENT_SRCS "mbedtls.c")
|
||||||
set(COMPONENT_REQUIRES lwip)
|
set(COMPONENT_REQUIRES lwip)
|
||||||
|
|
||||||
|
set(MBEDTLS_PRIV_REQUIRES ${IDF_COMPONENT_REQUIRES_COMMON} soc)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
# Only build mbedtls libraries
|
# Only build mbedtls libraries
|
||||||
@ -95,7 +97,7 @@ foreach(target ${mbedtls_targets})
|
|||||||
target_compile_definitions(${target} PUBLIC -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h")
|
target_compile_definitions(${target} PUBLIC -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h")
|
||||||
|
|
||||||
# The mbedtls targets also depends on core components
|
# The mbedtls targets also depends on core components
|
||||||
foreach(common ${IDF_COMPONENT_REQUIRES_COMMON})
|
foreach(common ${MBEDTLS_PRIV_REQUIRES})
|
||||||
component_get_target(common_target ${common})
|
component_get_target(common_target ${common})
|
||||||
set_property(TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${common_target})
|
set_property(TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${common_target})
|
||||||
set_property(TARGET ${target} APPEND PROPERTY LINK_LIBRARIES ${common_target})
|
set_property(TARGET ${target} APPEND PROPERTY LINK_LIBRARIES ${common_target})
|
||||||
|
@ -56,6 +56,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(COMPONENT_REQUIRES vfs) # for sys/ioctl.h
|
set(COMPONENT_REQUIRES vfs) # for sys/ioctl.h
|
||||||
|
set(COMPONENT_PRIV_REQUIRES soc)
|
||||||
|
|
||||||
list(APPEND COMPONENT_ADD_LDFRAGMENTS newlib.lf)
|
list(APPEND COMPONENT_ADD_LDFRAGMENTS newlib.lf)
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
|
#include "soc/soc_memory_layout.h"
|
||||||
|
|
||||||
#include "pthread_internal.h"
|
#include "pthread_internal.h"
|
||||||
#include "esp_pthread.h"
|
#include "esp_pthread.h"
|
||||||
|
@ -6,4 +6,5 @@ set(COMPONENT_SRCS "sdmmc_cmd.c"
|
|||||||
"sdmmc_sd.c")
|
"sdmmc_sd.c")
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
set(COMPONENT_REQUIRES driver)
|
set(COMPONENT_REQUIRES driver)
|
||||||
|
set(COMPONENT_PRIV_REQUIRES soc)
|
||||||
register_component()
|
register_component()
|
||||||
|
@ -9,7 +9,7 @@ if(EXISTS "${COMPONENT_PATH}/${SOC_NAME}")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND COMPONENT_ADD_INCLUDEDIRS include)
|
list(APPEND COMPONENT_ADD_INCLUDEDIRS include)
|
||||||
list(APPEND COMPONENT_SRCS "src/memory_layout_utils.c src/lldesc.c src/hal/spi_hal.c src/hal/spi_hal_iram.c")
|
list(APPEND COMPONENT_SRCS "src/memory_layout_utils.c src/lldesc.c src/hal/spi_hal.c src/hal/spi_hal_iram.c src/soc_include_legacy_warn.c")
|
||||||
|
|
||||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2010-2018 Espressif Systems (Shanghai) PTE LTD
|
// Copyright 2010-2019 Espressif Systems (Shanghai) PTE LTD
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -20,40 +20,7 @@
|
|||||||
#include "esp_assert.h"
|
#include "esp_assert.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Register Bits{{
|
#include <esp_bit_defs.h>
|
||||||
#define BIT31 0x80000000
|
|
||||||
#define BIT30 0x40000000
|
|
||||||
#define BIT29 0x20000000
|
|
||||||
#define BIT28 0x10000000
|
|
||||||
#define BIT27 0x08000000
|
|
||||||
#define BIT26 0x04000000
|
|
||||||
#define BIT25 0x02000000
|
|
||||||
#define BIT24 0x01000000
|
|
||||||
#define BIT23 0x00800000
|
|
||||||
#define BIT22 0x00400000
|
|
||||||
#define BIT21 0x00200000
|
|
||||||
#define BIT20 0x00100000
|
|
||||||
#define BIT19 0x00080000
|
|
||||||
#define BIT18 0x00040000
|
|
||||||
#define BIT17 0x00020000
|
|
||||||
#define BIT16 0x00010000
|
|
||||||
#define BIT15 0x00008000
|
|
||||||
#define BIT14 0x00004000
|
|
||||||
#define BIT13 0x00002000
|
|
||||||
#define BIT12 0x00001000
|
|
||||||
#define BIT11 0x00000800
|
|
||||||
#define BIT10 0x00000400
|
|
||||||
#define BIT9 0x00000200
|
|
||||||
#define BIT8 0x00000100
|
|
||||||
#define BIT7 0x00000080
|
|
||||||
#define BIT6 0x00000040
|
|
||||||
#define BIT5 0x00000020
|
|
||||||
#define BIT4 0x00000010
|
|
||||||
#define BIT3 0x00000008
|
|
||||||
#define BIT2 0x00000004
|
|
||||||
#define BIT1 0x00000002
|
|
||||||
#define BIT0 0x00000001
|
|
||||||
//}}
|
|
||||||
|
|
||||||
#define PRO_CPU_NUM (0)
|
#define PRO_CPU_NUM (0)
|
||||||
#define APP_CPU_NUM (1)
|
#define APP_CPU_NUM (1)
|
||||||
@ -136,12 +103,6 @@
|
|||||||
#define ETS_UNCACHED_ADDR(addr) (addr)
|
#define ETS_UNCACHED_ADDR(addr) (addr)
|
||||||
#define ETS_CACHED_ADDR(addr) (addr)
|
#define ETS_CACHED_ADDR(addr) (addr)
|
||||||
|
|
||||||
#ifndef __ASSEMBLER__
|
|
||||||
#define BIT(nr) (1UL << (nr))
|
|
||||||
#define BIT64(nr) (1ULL << (nr))
|
|
||||||
#else
|
|
||||||
#define BIT(nr) (1 << (nr))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __ASSEMBLER__
|
#ifndef __ASSEMBLER__
|
||||||
|
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#include "soc/gpio_pins.h"
|
#include "soc/gpio_pins.h"
|
||||||
#include "soc/io_mux_reg.h"
|
#include "soc/io_mux_reg.h"
|
||||||
|
#include "soc/gpio_struct.h"
|
||||||
|
#include "soc/gpio_reg.h"
|
||||||
|
#include "soc/gpio_sig_map.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
5
components/soc/src/soc_include_legacy_warn.c
Normal file
5
components/soc/src/soc_include_legacy_warn.c
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_LEGACY_INCLUDE_COMMON_HEADERS
|
||||||
|
#warning Legacy including is enabled. This will be deprecated in the future. You can disable this option in the menuconfig. If there are some including errors, please try to include: "soc/soc.h", "soc/soc_memory_layout.h", "driver/gpio.h", or "esp_sleep.h".
|
||||||
|
#endif
|
@ -2,14 +2,14 @@ if(BOOTLOADER_BUILD)
|
|||||||
# Bootloader needs SPIUnlock from this file, but doesn't
|
# Bootloader needs SPIUnlock from this file, but doesn't
|
||||||
# need other parts of this component
|
# need other parts of this component
|
||||||
set(COMPONENT_SRCS "spi_flash_rom_patch.c")
|
set(COMPONENT_SRCS "spi_flash_rom_patch.c")
|
||||||
set(COMPONENT_PRIV_REQUIRES bootloader_support)
|
set(COMPONENT_PRIV_REQUIRES bootloader_support soc)
|
||||||
else()
|
else()
|
||||||
set(COMPONENT_SRCS "cache_utils.c"
|
set(COMPONENT_SRCS "cache_utils.c"
|
||||||
"flash_mmap.c"
|
"flash_mmap.c"
|
||||||
"flash_ops.c"
|
"flash_ops.c"
|
||||||
"partition.c"
|
"partition.c"
|
||||||
"spi_flash_rom_patch.c")
|
"spi_flash_rom_patch.c")
|
||||||
set(COMPONENT_PRIV_REQUIRES bootloader_support app_update)
|
set(COMPONENT_PRIV_REQUIRES bootloader_support app_update soc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS include)
|
set(COMPONENT_ADD_INCLUDEDIRS include)
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <esp32/rom/cache.h>
|
#include <esp32/rom/cache.h>
|
||||||
#include <soc/soc.h>
|
#include <soc/soc.h>
|
||||||
#include <soc/dport_reg.h>
|
#include <soc/dport_reg.h>
|
||||||
|
#include <soc/soc_memory_layout.h>
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "esp_ipc.h"
|
#include "esp_ipc.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <esp32/rom/cache.h>
|
#include <esp32/rom/cache.h>
|
||||||
#include <soc/soc.h>
|
#include <soc/soc.h>
|
||||||
#include <soc/dport_reg.h>
|
#include <soc/dport_reg.h>
|
||||||
|
#include <soc/soc_memory_layout.h>
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "esp_ipc.h"
|
#include "esp_ipc.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
|
@ -27,6 +27,7 @@ INCLUDE_DIRS := \
|
|||||||
xtensa/include \
|
xtensa/include \
|
||||||
xtensa/esp32/include \
|
xtensa/esp32/include \
|
||||||
soc/esp32/include \
|
soc/esp32/include \
|
||||||
|
soc/include \
|
||||||
esp32/include \
|
esp32/include \
|
||||||
bootloader_support/include \
|
bootloader_support/include \
|
||||||
app_update/include \
|
app_update/include \
|
||||||
|
@ -20,6 +20,7 @@ INCLUDE_DIRS := \
|
|||||||
$(addprefix ../../../../components/, \
|
$(addprefix ../../../../components/, \
|
||||||
esp_common/include \
|
esp_common/include \
|
||||||
soc/esp32/include \
|
soc/esp32/include \
|
||||||
|
soc/include \
|
||||||
xtensa/include \
|
xtensa/include \
|
||||||
xtensa/esp32/include \
|
xtensa/esp32/include \
|
||||||
esp32/include \
|
esp32/include \
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#include "esp32/rom/gpio.h"
|
#include "esp32/rom/gpio.h"
|
||||||
#include "esp32/rom/spi_flash.h"
|
#include "esp32/rom/spi_flash.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
#include "soc/spi_reg.h"
|
||||||
|
|
||||||
|
|
||||||
#define SPI_IDX 1
|
#define SPI_IDX 1
|
||||||
#define OTH_IDX 0
|
#define OTH_IDX 0
|
||||||
|
@ -29,6 +29,7 @@ INCLUDE_DIRS := \
|
|||||||
xtensa/include \
|
xtensa/include \
|
||||||
xtensa/esp32/include \
|
xtensa/esp32/include \
|
||||||
soc/esp32/include \
|
soc/esp32/include \
|
||||||
|
soc/include \
|
||||||
esp32/include \
|
esp32/include \
|
||||||
bootloader_support/include \
|
bootloader_support/include \
|
||||||
app_update/include \
|
app_update/include \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
set(COMPONENT_SRCDIRS ".")
|
set(COMPONENT_SRCDIRS ".")
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
||||||
|
|
||||||
set(COMPONENT_REQUIRES unity ulp soc)
|
set(COMPONENT_REQUIRES unity ulp soc esp_common)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ INCLUDE_DIRS := \
|
|||||||
xtensa/include \
|
xtensa/include \
|
||||||
xtensa/esp32/include \
|
xtensa/esp32/include \
|
||||||
soc/esp32/include \
|
soc/esp32/include \
|
||||||
|
soc/include \
|
||||||
esp32/include \
|
esp32/include \
|
||||||
bootloader_support/include \
|
bootloader_support/include \
|
||||||
app_update/include \
|
app_update/include \
|
||||||
|
@ -22,12 +22,12 @@
|
|||||||
* examples and are not optimized for speed.
|
* examples and are not optimized for speed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "crypto/common.h"
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
|
#include "crypto/common.h"
|
||||||
|
|
||||||
int os_get_time(struct os_time *t)
|
int os_get_time(struct os_time *t)
|
||||||
{
|
{
|
||||||
|
@ -12,6 +12,11 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
#ifdef ESP_PLATFORM
|
||||||
|
#include "esp_system.h"
|
||||||
|
#include "mbedtls/bignum.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "crypto/includes.h"
|
#include "crypto/includes.h"
|
||||||
#include "crypto/common.h"
|
#include "crypto/common.h"
|
||||||
#include "crypto/crypto.h"
|
#include "crypto/crypto.h"
|
||||||
@ -20,10 +25,6 @@
|
|||||||
#include "mbedtls/entropy.h"
|
#include "mbedtls/entropy.h"
|
||||||
#include "mbedtls/ctr_drbg.h"
|
#include "mbedtls/ctr_drbg.h"
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
|
||||||
#include "esp_system.h"
|
|
||||||
#include "mbedtls/bignum.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define IANA_SECP256R1 19
|
#define IANA_SECP256R1 19
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include "wpa2/tls/asn1.h"
|
#include "wpa2/tls/asn1.h"
|
||||||
#include "wpa2/tls/bignum.h"
|
#include "wpa2/tls/bignum.h"
|
||||||
#include "wpa2/tls/rsa.h"
|
#include "wpa2/tls/rsa.h"
|
||||||
#include "soc/dport_reg.h"
|
|
||||||
|
|
||||||
struct crypto_rsa_key {
|
struct crypto_rsa_key {
|
||||||
int private_key; /* whether private key is set */
|
int private_key; /* whether private key is set */
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
#include "wpa/ieee802_11_defs.h"
|
#include "wpa/ieee802_11_defs.h"
|
||||||
#include "wps/wps_i.h"
|
#include "wps/wps_i.h"
|
||||||
#include "soc/dport_reg.h"
|
|
||||||
|
|
||||||
int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg, wps_key_mode_t mode)
|
int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg, wps_key_mode_t mode)
|
||||||
{
|
{
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
#include "wps/wps.h"
|
#include "wps/wps.h"
|
||||||
#include "wps/wps_dev_attr.h"
|
#include "wps/wps_dev_attr.h"
|
||||||
|
|
||||||
#include "soc/dport_reg.h"
|
|
||||||
|
|
||||||
|
|
||||||
static int wps_build_mac_addr(struct wps_data *wps, struct wpabuf *msg) {
|
static int wps_build_mac_addr(struct wps_data *wps, struct wpabuf *msg) {
|
||||||
wpa_printf(MSG_DEBUG, "WPS: * MAC Address");
|
wpa_printf(MSG_DEBUG, "WPS: * MAC Address");
|
||||||
|
@ -3,6 +3,7 @@ set(COMPONENT_SRCS "eri.c" "trax.c")
|
|||||||
set(COMPONENT_ADD_INCLUDEDIRS "include" "${IDF_TARGET}/include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include" "${IDF_TARGET}/include")
|
||||||
|
|
||||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
||||||
|
set(COMPONENT_PRIV_REQUIRES soc)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include "soc/dport_reg.h"
|
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "eri.h"
|
#include "eri.h"
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "driver/spi_slave.h"
|
#include "driver/spi_slave.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_spi_flash.h"
|
#include "esp_spi_flash.h"
|
||||||
|
#include "driver/gpio.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "driver/uart.h"
|
#include "driver/uart.h"
|
||||||
#include "soc/uart_struct.h"
|
#include "soc/uart_struct.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
#include "driver/gpio.h"
|
||||||
|
|
||||||
static const int RX_BUF_SIZE = 1024;
|
static const int RX_BUF_SIZE = 1024;
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "driver/uart.h"
|
#include "driver/uart.h"
|
||||||
|
#include "driver/gpio.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is an example which echos any data it receives on UART1 back to the sender,
|
* This is an example which echos any data it receives on UART1 back to the sender,
|
||||||
|
@ -58,7 +58,7 @@ macro(idf_set_variables)
|
|||||||
|
|
||||||
set_default(IDF_COMPONENT_DIRS "${IDF_EXTRA_COMPONENT_DIRS} ${IDF_PATH}/components")
|
set_default(IDF_COMPONENT_DIRS "${IDF_EXTRA_COMPONENT_DIRS} ${IDF_PATH}/components")
|
||||||
set_default(IDF_COMPONENTS "")
|
set_default(IDF_COMPONENTS "")
|
||||||
set_default(IDF_COMPONENT_REQUIRES_COMMON "cxx ${IDF_TARGET} newlib freertos heap log soc \
|
set_default(IDF_COMPONENT_REQUIRES_COMMON "cxx ${IDF_TARGET} newlib freertos heap log \
|
||||||
esp_rom esp_common xtensa")
|
esp_rom esp_common xtensa")
|
||||||
|
|
||||||
list(FIND IDF_COMPONENT_REQUIRES_COMMON "${IDF_TARGET}" result)
|
list(FIND IDF_COMPONENT_REQUIRES_COMMON "${IDF_TARGET}" result)
|
||||||
@ -66,6 +66,10 @@ macro(idf_set_variables)
|
|||||||
list(APPEND IDF_COMPONENT_REQUIRES_COMMON "${IDF_TARGET}")
|
list(APPEND IDF_COMPONENT_REQUIRES_COMMON "${IDF_TARGET}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_LEGACY_INCLUDE_COMMON_HEADERS)
|
||||||
|
list(APPEND IDF_COMPONENT_REQUIRES_COMMON "soc")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(IDF_PROJECT_PATH "${CMAKE_SOURCE_DIR}")
|
set(IDF_PROJECT_PATH "${CMAKE_SOURCE_DIR}")
|
||||||
|
|
||||||
set(ESP_PLATFORM 1 CACHE BOOL INTERNAL)
|
set(ESP_PLATFORM 1 CACHE BOOL INTERNAL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user