Skip to content

Commit

Permalink
freertos: moved all xtensa specific files into a separated folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Neves committed Jan 27, 2020
1 parent 37edc8f commit 429712c
Show file tree
Hide file tree
Showing 48 changed files with 41 additions and 45 deletions.
1 change: 0 additions & 1 deletion components/driver/can.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "freertos/semphr.h"
Expand Down
1 change: 0 additions & 1 deletion components/driver/include/driver/sdio_slave.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#define _DRIVER_SDIO_SLAVE_H_

#include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "esp_err.h"
#include "sys/queue.h"

Expand Down
1 change: 0 additions & 1 deletion components/driver/test/test_pcnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "driver/periph_ctrl.h"
Expand Down
1 change: 0 additions & 1 deletion components/esp32/cpu_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "freertos/portmacro.h"

#include "esp_heap_caps_init.h"
#include "sdkconfig.h"
Expand Down
1 change: 0 additions & 1 deletion components/esp32/crosscore_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "freertos/portmacro.h"


#define REASON_YIELD BIT(0)
Expand Down
1 change: 0 additions & 1 deletion components/esp32/dport_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "freertos/portmacro.h"

#include "xtensa/core-macros.h"

Expand Down
1 change: 0 additions & 1 deletion components/esp32/task_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <string.h>
#include <stdbool.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
Expand Down
1 change: 0 additions & 1 deletion components/esp32s2/cpu_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "freertos/portmacro.h"

#include "esp_heap_caps_init.h"
#include "esp_system.h"
Expand Down
1 change: 0 additions & 1 deletion components/esp32s2/crosscore_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "freertos/portmacro.h"


#define REASON_YIELD BIT(0)
Expand Down
1 change: 0 additions & 1 deletion components/esp32s2/task_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <string.h>
#include <stdbool.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOSConfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
Expand Down
1 change: 0 additions & 1 deletion components/esp_event/test/test_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/portmacro.h"
#include "esp_log.h"
#include "driver/periph_ctrl.h"
#include "driver/timer.h"
Expand Down
1 change: 0 additions & 1 deletion components/freemodbus/port/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

/* ----------------------- Modbus includes ----------------------------------*/
#include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "sys/lock.h"
#include "port.h"

Expand Down
1 change: 0 additions & 1 deletion components/freemodbus/port/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "freertos/FreeRTOS.h"
#include "freertos/xtensa_api.h"
#include "freertos/portmacro.h"
#include "esp_log.h" // for ESP_LOGE macro

#define INLINE inline
Expand Down
36 changes: 24 additions & 12 deletions components/freertos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,40 @@ if(BOOTLOADER_BUILD)
endif()

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"
"event_groups.c"
"FreeRTOS-openocd.c"
"list.c"
"port.c"
"portasm.S"
"queue.c"
"tasks.c"
"timers.c"
"xtensa_context.S"
"xtensa_init.c"
"xtensa_intr.c"
"xtensa_intr_asm.S"
"xtensa_overlay_os_hook.c"
"xtensa_vector_defaults.S"
"xtensa_vectors.S")
"timers.c")

set(include_dirs
include
xtensa/include)

set(private_include_dirs
include/freertos
xtensa/include/freertos
xtensa
.)

# 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.
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS include
PRIV_INCLUDE_DIRS include/freertos .
INCLUDE_DIRS ${include_dirs}
PRIV_INCLUDE_DIRS ${private_include_dirs}
LDFRAGMENTS linker.lf
REQUIRES app_trace
PRIV_REQUIRES soc)
Expand Down
5 changes: 3 additions & 2 deletions components/freertos/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ ifdef CONFIG_FREERTOS_DEBUG_OCDAWARE
COMPONENT_ADD_LDFLAGS += -Wl,--undefined=uxTopUsedPriority
endif

COMPONENT_ADD_INCLUDEDIRS := include
COMPONENT_PRIV_INCLUDEDIRS := include/freertos .
COMPONENT_ADD_INCLUDEDIRS := include xtensa/include
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
COMPONENT_ADD_LDFRAGMENTS += linker.lf
2 changes: 1 addition & 1 deletion components/freertos/include/freertos/FreeRTOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ extern "C" {
#include "esp_compiler.h"

/* Application specific configuration options. */
#include "FreeRTOSConfig.h"
#include "freertos/FreeRTOSConfig.h"

/* Basic FreeRTOS definitions. */
#include "projdefs.h"
Expand Down
2 changes: 1 addition & 1 deletion components/freertos/include/freertos/portable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
must be set in the compiler's include path. */
#ifndef portENTER_CRITICAL
#include "portmacro.h"
#include "freertos/portmacro.h"
#endif

#if portBYTE_ALIGNMENT == 8
Expand Down
2 changes: 1 addition & 1 deletion components/freertos/include/freertos/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#include <limits.h>

#include "list.h"
#include "portmacro.h"
#include "freertos/portmacro.h"

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 0 additions & 1 deletion components/freertos/test/test_freertos_task_delay_until.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/FreeRTOSConfig.h"
#include "unity.h"
#include "test_utils.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ int xt_clock_freq(void) __attribute__((deprecated));


/* Required for configuration-dependent settings */
#include "xtensa_config.h"

#include <freertos/xtensa_config.h>

/* configASSERT behaviour */
#ifndef __ASSEMBLER__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ typedef unsigned portBASE_TYPE UBaseType_t;

// portbenchmark
#include "portbenchmark.h"

#include "sdkconfig.h"
#include "esp_attr.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 "FreeRTOSConfig.h"
#include "freertos/FreeRTOSConfig.h"

/*
Convert FreeRTOSConfig definitions to XTENSA definitions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 "FreeRTOSConfig.h"
#include "freertos/FreeRTOSConfig.h"

/*
Select timer to use for periodic tick, and determine its interrupt number
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion components/newlib/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "soc/cpu.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/portmacro.h"
#include "freertos/task.h"
#include "freertos/portable.h"

Expand Down
2 changes: 1 addition & 1 deletion components/pthread/include/esp_pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#pragma once

#include "esp_err.h"
#include <freertos/FreeRTOSConfig.h>
#include "freertos/FreeRTOSConfig.h"

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 0 additions & 1 deletion components/xtensa/stdatomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "xtensa/config/core-isa.h"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extern "C" {

#include "driver/gpio.h"
#include "freertos/portmacro.h"

typedef void (* button_cb)(void*);
typedef void* button_handle_t;

Expand Down
2 changes: 2 additions & 0 deletions tools/ci/check_public_headers_exceptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ components/xtensa/esp32/include/xtensa/config/*
components/newlib/platform_include/*

components/freertos/include/freertos/*
components/freertos/xtensa/include/freertos/*


components/log/include/esp_log_internal.h

Expand Down
4 changes: 2 additions & 2 deletions tools/ci/test_build_system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function run_tests()
# and therefore should rebuild
assert_rebuilt newlib/syscall_table.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"
make
Expand All @@ -193,7 +193,7 @@ function run_tests()
# similar to previous test
assert_rebuilt newlib/syscall_table.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"
make
Expand Down
4 changes: 2 additions & 2 deletions tools/ci/test_build_system_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function run_tests()
# and therefore should rebuild
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/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

print_status "Updating project CMakeLists.txt triggers full recompile"
Expand All @@ -235,7 +235,7 @@ function run_tests()
# similar to previous test
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/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

print_status "Can build with Ninja (no idf.py)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "esp_attr.h"
#include "eri.h"
#include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"
#include "esp_freertos_hooks.h"
#include "perfmon.h"
#include "xtensa/core-macros.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "ccomp_timer.h"

#include "freertos/FreeRTOS.h"
#include "freertos/portmacro.h"

#include "unity.h"

Expand Down

0 comments on commit 429712c

Please sign in to comment.