Merge branch 'feature/freertos_xtensa_folder' into 'master'

freertos: moved all xtensa specific files into a separated folder

See merge request espressif/esp-idf!7377
This commit is contained in:
Ivan Grokhotkov 2020-01-29 17:04:34 +08:00
commit ac1834e288
48 changed files with 41 additions and 45 deletions

View file

@ -17,7 +17,6 @@
#include "sdkconfig.h" #include "sdkconfig.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/queue.h" #include "freertos/queue.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"

View file

@ -16,7 +16,6 @@
#define _DRIVER_SDIO_SLAVE_H_ #define _DRIVER_SDIO_SLAVE_H_
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "esp_err.h" #include "esp_err.h"
#include "sys/queue.h" #include "sys/queue.h"

View file

@ -11,7 +11,6 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/queue.h" #include "freertos/queue.h"
#include "driver/periph_ctrl.h" #include "driver/periph_ctrl.h"

View file

@ -37,7 +37,6 @@
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "freertos/queue.h" #include "freertos/queue.h"
#include "freertos/portmacro.h"
#include "esp_heap_caps_init.h" #include "esp_heap_caps_init.h"
#include "sdkconfig.h" #include "sdkconfig.h"

View file

@ -30,7 +30,6 @@
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "freertos/queue.h" #include "freertos/queue.h"
#include "freertos/portmacro.h"
#define REASON_YIELD BIT(0) #define REASON_YIELD BIT(0)

View file

@ -37,7 +37,6 @@
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "freertos/queue.h" #include "freertos/queue.h"
#include "freertos/portmacro.h"
#include "xtensa/core-macros.h" #include "xtensa/core-macros.h"

View file

@ -18,7 +18,6 @@
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#include "sdkconfig.h" #include "sdkconfig.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/queue.h" #include "freertos/queue.h"

View file

@ -41,7 +41,6 @@
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "freertos/queue.h" #include "freertos/queue.h"
#include "freertos/portmacro.h"
#include "esp_heap_caps_init.h" #include "esp_heap_caps_init.h"
#include "esp_system.h" #include "esp_system.h"

View file

@ -31,7 +31,6 @@
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "freertos/queue.h" #include "freertos/queue.h"
#include "freertos/portmacro.h"
#define REASON_YIELD BIT(0) #define REASON_YIELD BIT(0)

View file

@ -18,7 +18,6 @@
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#include "sdkconfig.h" #include "sdkconfig.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/queue.h" #include "freertos/queue.h"

View file

@ -6,7 +6,6 @@
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/portmacro.h"
#include "esp_log.h" #include "esp_log.h"
#include "driver/periph_ctrl.h" #include "driver/periph_ctrl.h"
#include "driver/timer.h" #include "driver/timer.h"

View file

@ -37,7 +37,6 @@
/* ----------------------- Modbus includes ----------------------------------*/ /* ----------------------- Modbus includes ----------------------------------*/
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "sys/lock.h" #include "sys/lock.h"
#include "port.h" #include "port.h"

View file

@ -18,7 +18,6 @@
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/xtensa_api.h" #include "freertos/xtensa_api.h"
#include "freertos/portmacro.h"
#include "esp_log.h" // for ESP_LOGE macro #include "esp_log.h" // for ESP_LOGE macro
#define INLINE inline #define INLINE inline

View file

@ -5,28 +5,40 @@ if(BOOTLOADER_BUILD)
endif() endif()
set(srcs set(srcs
"xtensa/port.c"
"xtensa/portasm.S"
"xtensa/xtensa_context.S"
"xtensa/xtensa_init.c"
"xtensa/xtensa_intr_asm.S"
"xtensa/xtensa_intr.c"
"xtensa/xtensa_overlay_os_hook.c"
"xtensa/xtensa_vector_defaults.S"
"xtensa/xtensa_vectors.S")
list(APPEND srcs
"croutine.c" "croutine.c"
"event_groups.c" "event_groups.c"
"FreeRTOS-openocd.c" "FreeRTOS-openocd.c"
"list.c" "list.c"
"port.c"
"portasm.S"
"queue.c" "queue.c"
"tasks.c" "tasks.c"
"timers.c" "timers.c")
"xtensa_context.S"
"xtensa_init.c" set(include_dirs
"xtensa_intr.c" include
"xtensa_intr_asm.S" xtensa/include)
"xtensa_overlay_os_hook.c"
"xtensa_vector_defaults.S" set(private_include_dirs
"xtensa_vectors.S") include/freertos
xtensa/include/freertos
xtensa
.)
# 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.
idf_component_register(SRCS "${srcs}" idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS include INCLUDE_DIRS ${include_dirs}
PRIV_INCLUDE_DIRS include/freertos . PRIV_INCLUDE_DIRS ${private_include_dirs}
LDFRAGMENTS linker.lf LDFRAGMENTS linker.lf
REQUIRES app_trace REQUIRES app_trace
PRIV_REQUIRES soc) PRIV_REQUIRES soc)

View file

@ -6,8 +6,9 @@ ifdef CONFIG_FREERTOS_DEBUG_OCDAWARE
COMPONENT_ADD_LDFLAGS += -Wl,--undefined=uxTopUsedPriority COMPONENT_ADD_LDFLAGS += -Wl,--undefined=uxTopUsedPriority
endif endif
COMPONENT_ADD_INCLUDEDIRS := include COMPONENT_ADD_INCLUDEDIRS := include xtensa/include
COMPONENT_PRIV_INCLUDEDIRS := include/freertos . COMPONENT_PRIV_INCLUDEDIRS := include/freertos xtensa/include/freertos xtensa .
COMPONENT_SRCDIRS += xtensa
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

View file

@ -98,7 +98,7 @@ extern "C" {
#include "esp_compiler.h" #include "esp_compiler.h"
/* Application specific configuration options. */ /* Application specific configuration options. */
#include "FreeRTOSConfig.h" #include "freertos/FreeRTOSConfig.h"
/* Basic FreeRTOS definitions. */ /* Basic FreeRTOS definitions. */
#include "projdefs.h" #include "projdefs.h"

View file

@ -93,7 +93,7 @@ did not result in a portmacro.h header file being included - and it should be
included here. In this case the path to the correct portmacro.h header file included here. In this case the path to the correct portmacro.h header file
must be set in the compiler's include path. */ must be set in the compiler's include path. */
#ifndef portENTER_CRITICAL #ifndef portENTER_CRITICAL
#include "portmacro.h" #include "freertos/portmacro.h"
#endif #endif
#if portBYTE_ALIGNMENT == 8 #if portBYTE_ALIGNMENT == 8

View file

@ -78,7 +78,7 @@
#include <limits.h> #include <limits.h>
#include "list.h" #include "list.h"
#include "portmacro.h" #include "freertos/portmacro.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View file

@ -8,7 +8,6 @@
#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 "freertos/FreeRTOSConfig.h"
#include "unity.h" #include "unity.h"
#include "test_utils.h" #include "test_utils.h"

View file

@ -115,8 +115,7 @@ int xt_clock_freq(void) __attribute__((deprecated));
/* Required for configuration-dependent settings */ /* Required for configuration-dependent settings */
#include "xtensa_config.h" #include <freertos/xtensa_config.h>
/* configASSERT behaviour */ /* configASSERT behaviour */
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__

View file

@ -128,7 +128,6 @@ typedef unsigned portBASE_TYPE UBaseType_t;
// portbenchmark // portbenchmark
#include "portbenchmark.h" #include "portbenchmark.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_attr.h" #include "esp_attr.h"

View file

@ -54,7 +54,7 @@ Should be included by all Xtensa generic and RTOS port-specific sources.
/* /*
Include any RTOS specific definitions that are needed by this header. Include any RTOS specific definitions that are needed by this header.
*/ */
#include "FreeRTOSConfig.h" #include "freertos/FreeRTOSConfig.h"
/* /*
Convert FreeRTOSConfig definitions to XTENSA definitions. Convert FreeRTOSConfig definitions to XTENSA definitions.

View file

@ -49,7 +49,7 @@ and the Xtensa core configuration need not have a timer.
#include "xtensa_rtos.h" /* in case this wasn't included directly */ #include "xtensa_rtos.h" /* in case this wasn't included directly */
#include "FreeRTOSConfig.h" #include "freertos/FreeRTOSConfig.h"
/* /*
Select timer to use for periodic tick, and determine its interrupt number Select timer to use for periodic tick, and determine its interrupt number

View file

@ -19,7 +19,6 @@
#include "soc/cpu.h" #include "soc/cpu.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
#include "freertos/portmacro.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/portable.h" #include "freertos/portable.h"

View file

@ -15,7 +15,7 @@
#pragma once #pragma once
#include "esp_err.h" #include "esp_err.h"
#include <freertos/FreeRTOSConfig.h> #include "freertos/FreeRTOSConfig.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View file

@ -16,7 +16,6 @@
#include "sdkconfig.h" #include "sdkconfig.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "xtensa/config/core-isa.h" #include "xtensa/config/core-isa.h"

View file

@ -20,6 +20,7 @@ extern "C" {
#include "driver/gpio.h" #include "driver/gpio.h"
#include "freertos/portmacro.h" #include "freertos/portmacro.h"
typedef void (* button_cb)(void*); typedef void (* button_cb)(void*);
typedef void* button_handle_t; typedef void* button_handle_t;

View file

@ -7,6 +7,8 @@ components/xtensa/esp32/include/xtensa/config/*
components/newlib/platform_include/* components/newlib/platform_include/*
components/freertos/include/freertos/* components/freertos/include/freertos/*
components/freertos/xtensa/include/freertos/*
components/log/include/esp_log_internal.h components/log/include/esp_log_internal.h

View file

@ -183,7 +183,7 @@ function run_tests()
# and therefore should rebuild # and therefore should rebuild
assert_rebuilt newlib/syscall_table.o assert_rebuilt newlib/syscall_table.o
assert_rebuilt nvs_flash/src/nvs_api.o assert_rebuilt nvs_flash/src/nvs_api.o
assert_rebuilt freertos/xtensa_vectors.o assert_rebuilt freertos/xtensa/xtensa_vectors.o
print_status "Updating project Makefile triggers full recompile" print_status "Updating project Makefile triggers full recompile"
make make
@ -193,7 +193,7 @@ function run_tests()
# similar to previous test # similar to previous test
assert_rebuilt newlib/syscall_table.o assert_rebuilt newlib/syscall_table.o
assert_rebuilt nvs_flash/src/nvs_api.o assert_rebuilt nvs_flash/src/nvs_api.o
assert_rebuilt freertos/xtensa_vectors.o assert_rebuilt freertos/xtensa/xtensa_vectors.o
print_status "print_flash_cmd target should produce one line of output" print_status "print_flash_cmd target should produce one line of output"
make make

View file

@ -220,7 +220,7 @@ function run_tests()
# and therefore should rebuild # and therefore should rebuild
assert_rebuilt esp-idf/newlib/CMakeFiles/${IDF_COMPONENT_PREFIX}_newlib.dir/syscall_table.c.obj assert_rebuilt esp-idf/newlib/CMakeFiles/${IDF_COMPONENT_PREFIX}_newlib.dir/syscall_table.c.obj
assert_rebuilt esp-idf/nvs_flash/CMakeFiles/${IDF_COMPONENT_PREFIX}_nvs_flash.dir/src/nvs_api.cpp.obj assert_rebuilt esp-idf/nvs_flash/CMakeFiles/${IDF_COMPONENT_PREFIX}_nvs_flash.dir/src/nvs_api.cpp.obj
assert_rebuilt esp-idf/freertos/CMakeFiles/${IDF_COMPONENT_PREFIX}_freertos.dir/xtensa_vectors.S.obj assert_rebuilt esp-idf/freertos/CMakeFiles/${IDF_COMPONENT_PREFIX}_freertos.dir/xtensa/xtensa_vectors.S.obj
mv sdkconfig.bak sdkconfig mv sdkconfig.bak sdkconfig
print_status "Updating project CMakeLists.txt triggers full recompile" print_status "Updating project CMakeLists.txt triggers full recompile"
@ -235,7 +235,7 @@ function run_tests()
# similar to previous test # similar to previous test
assert_rebuilt esp-idf/newlib/CMakeFiles/${IDF_COMPONENT_PREFIX}_newlib.dir/syscall_table.c.obj assert_rebuilt esp-idf/newlib/CMakeFiles/${IDF_COMPONENT_PREFIX}_newlib.dir/syscall_table.c.obj
assert_rebuilt esp-idf/nvs_flash/CMakeFiles/${IDF_COMPONENT_PREFIX}_nvs_flash.dir/src/nvs_api.cpp.obj assert_rebuilt esp-idf/nvs_flash/CMakeFiles/${IDF_COMPONENT_PREFIX}_nvs_flash.dir/src/nvs_api.cpp.obj
assert_rebuilt esp-idf/freertos/CMakeFiles/${IDF_COMPONENT_PREFIX}_freertos.dir/xtensa_vectors.S.obj assert_rebuilt esp-idf/freertos/CMakeFiles/${IDF_COMPONENT_PREFIX}_freertos.dir/xtensa/xtensa_vectors.S.obj
mv sdkconfig.bak sdkconfig mv sdkconfig.bak sdkconfig
print_status "Can build with Ninja (no idf.py)" print_status "Can build with Ninja (no idf.py)"

View file

@ -21,7 +21,6 @@
#include "esp_attr.h" #include "esp_attr.h"
#include "eri.h" #include "eri.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "esp_freertos_hooks.h" #include "esp_freertos_hooks.h"
#include "perfmon.h" #include "perfmon.h"
#include "xtensa/core-macros.h" #include "xtensa/core-macros.h"

View file

@ -7,7 +7,6 @@
#include "ccomp_timer.h" #include "ccomp_timer.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "unity.h" #include "unity.h"