Rename espressif folder as common/espressif

This commit is contained in:
Eren Terzioglu 2024-01-03 11:39:52 +03:00 committed by Alin Jerpelea
parent 721c37a876
commit 4c4d62ff93
54 changed files with 195 additions and 172 deletions

View File

@ -1,5 +1,5 @@
############################################################################ ############################################################################
# arch/risc-v/src/espressif/Bootloader.mk # arch/risc-v/src/common/espressif/Bootloader.mk
# #
# Licensed to the Apache Software Foundation (ASF) under one or more # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with # contributor license agreements. See the NOTICE file distributed with

View File

@ -0,0 +1,79 @@
############################################################################
# arch/risc-v/src/common/espressif/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you 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.
#
############################################################################
# The start-up, "head", file. May be either a .S or a .c file.
HEAD_ASRC = esp_head.S
# Skip common RISC-V vector table in favor of Espressif's custom vector
# table.
CMN_ASRCS := $(filter-out riscv_vectors.S,$(CMN_ASRCS))
CHIP_ASRCS = esp_vectors.S
# Required Espressif chip's files (arch/risc-v/src/common/espressif)
CHIP_CSRCS = esp_allocateheap.c esp_start.c esp_idle.c
CHIP_CSRCS += esp_irq.c esp_gpio.c esp_libc_stubs.c
CHIP_CSRCS += esp_lowputc.c esp_serial.c
CHIP_CSRCS += esp_systemreset.c
ifeq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += esp_tickless.c
else
CHIP_CSRCS += esp_timerisr.c
endif
ifeq ($(CONFIG_WATCHDOG),y)
CHIP_CSRCS += esp_wdt.c
endif
ifneq ($(CONFIG_DEV_RANDOM)$(CONFIG_DEV_URANDOM_ARCH),)
CHIP_CSRCS += esp_random.c
endif
ifeq ($(CONFIG_TIMER),y)
CHIP_CSRCS += esp_timer.c
endif
ifeq ($(CONFIG_ONESHOT),y)
CHIP_CSRCS += esp_oneshot.c
endif
ifeq ($(CONFIG_RTC),y)
CHIP_CSRCS += esp_rtc.c
endif
ifeq ($(CONFIG_ESPRESSIF_HR_TIMER),y)
CHIP_CSRCS += esp_hr_timer.c
endif
ifeq ($(CONFIG_ESPRESSIF_LEDC),y)
CHIP_CSRCS += esp_ledc.c
endif
ifeq ($(CONFIG_ESPRESSIF_USBSERIAL),y)
CHIP_CSRCS += esp_usbserial.c
endif
include common$(DELIM)espressif$(DELIM)Bootloader.mk
INCLUDES += ${INCDIR_PREFIX}$(ARCH_SRCDIR)$(DELIM)common$(DELIM)espressif
VPATH += common$(DELIM)espressif

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/chip.h * arch/risc-v/src/common/espressif/chip.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_CHIP_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_CHIP_H
#define __ARCH_RISCV_SRC_ESPRESSIF_CHIP_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_CHIP_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -37,4 +37,4 @@
#define EXCEPTION_SECTION .iram1 #define EXCEPTION_SECTION .iram1
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_CHIP_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_CHIP_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_allocateheap.c * arch/risc-v/src/common/espressif/esp_allocateheap.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_config.h * arch/risc-v/src/common/espressif/esp_config.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_CONFIG_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_CONFIG_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_CONFIG_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_CONFIG_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -68,4 +68,4 @@
# define HAVE_UART_DEVICE 1 # define HAVE_UART_DEVICE 1
#endif #endif
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_CONFIG_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_CONFIG_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_gpio.c * arch/risc-v/src/common/espressif/esp_gpio.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_gpio.h * arch/risc-v/src/common/espressif/esp_gpio.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_GPIO_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_GPIO_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_GPIO_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_GPIO_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -298,4 +298,4 @@ void esp_gpioirqdisable(int irq);
#undef EXTERN #undef EXTERN
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_GPIO_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_GPIO_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_head.S * arch/risc-v/src/common/espressif/esp_head.S
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_hr_timer.c * arch/risc-v/src/common/espressif/esp_hr_timer.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_hr_timer.h * arch/risc-v/src/common/espressif/esp_hr_timer.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_HR_TIMER_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_HR_TIMER_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_HR_TIMER_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_HR_TIMER_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -229,4 +229,4 @@ int esp_hr_timer_init(void);
#endif #endif
#undef EXTERN #undef EXTERN
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_HR_TIMER_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_HR_TIMER_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_idle.c * arch/risc-v/src/common/espressif/esp_idle.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_irq.c * arch/risc-v/src/common/espressif/esp_irq.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_irq.h * arch/risc-v/src/common/espressif/esp_irq.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_IRQ_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_IRQ_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_IRQ_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_IRQ_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -148,4 +148,4 @@ void esp_teardown_irq(int source, int cpuint);
#endif #endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_IRQ_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_IRQ_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_ledc.c * arch/risc-v/src/common/espressif/esp_ledc.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_ledc.h * arch/risc-v/src/common/espressif/esp_ledc.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_LEDC_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LEDC_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_LEDC_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LEDC_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -49,4 +49,4 @@
struct pwm_lowerhalf_s *esp_ledc_init(int timer); struct pwm_lowerhalf_s *esp_ledc_init(int timer);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_LEDC_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LEDC_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_libc_stubs.c * arch/risc-v/src/common/espressif/esp_libc_stubs.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_libc_stubs.h * arch/risc-v/src/common/espressif/esp_libc_stubs.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_LIBC_STUBS_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LIBC_STUBS_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_LIBC_STUBS_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LIBC_STUBS_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -48,4 +48,4 @@
void esp_setup_syscall_table(void); void esp_setup_syscall_table(void);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_LIBC_STUBS_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LIBC_STUBS_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_lowputc.c * arch/risc-v/src/common/espressif/esp_lowputc.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_lowputc.h * arch/risc-v/src/common/espressif/esp_lowputc.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_LOWPUTC_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LOWPUTC_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_LOWPUTC_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LOWPUTC_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -183,4 +183,4 @@ void esp_lowputc_restore_pins(const struct esp_uart_s *priv);
void esp_lowsetup(void); void esp_lowsetup(void);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_LOWPUTC_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_LOWPUTC_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_memorymap.h * arch/risc-v/src/common/espressif/esp_memorymap.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_MEMORYMAP_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_MEMORYMAP_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_MEMORYMAP_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_MEMORYMAP_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -41,4 +41,4 @@
#define ESP_IDLESTACK_TOP (ESP_IDLESTACK_BASE + CONFIG_IDLETHREAD_STACKSIZE) #define ESP_IDLESTACK_TOP (ESP_IDLESTACK_BASE + CONFIG_IDLETHREAD_STACKSIZE)
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_MEMORYMAP_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_MEMORYMAP_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_oneshot.c * arch/risc-v/src/common/espressif/esp_oneshot.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_oneshot.h * arch/risc-v/src/common/espressif/esp_oneshot.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_ONESHOT_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_ONESHOT_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_ONESHOT_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_ONESHOT_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -48,4 +48,4 @@
int esp_oneshot_initialize(void); int esp_oneshot_initialize(void);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_ONESHOT_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_ONESHOT_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_random.c * arch/risc-v/src/common/espressif/esp_random.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_rtc.c * arch/risc-v/src/common/espressif/esp_rtc.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_rtc.h * arch/risc-v/src/common/espressif/esp_rtc.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_RTC_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_RTC_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_RTC_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_RTC_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -48,4 +48,4 @@
int esp_rtc_driverinit(void); int esp_rtc_driverinit(void);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_RTC_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_RTC_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_serial.c * arch/risc-v/src/common/espressif/esp_serial.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_start.c * arch/risc-v/src/common/espressif/esp_start.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_start.h * arch/risc-v/src/common/espressif/esp_start.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_START_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_START_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_START_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_START_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -46,4 +46,4 @@
void esp_board_initialize(void); void esp_board_initialize(void);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_START_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_START_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_systemreset.c * arch/risc-v/src/common/espressif/esp_systemreset.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_systemreset.h * arch/risc-v/src/common/espressif/esp_systemreset.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_SYSTEMRESET_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_SYSTEMRESET_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_SYSTEMRESET_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_SYSTEMRESET_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -108,4 +108,4 @@ void up_shutdown_handler(void);
#undef EXTERN #undef EXTERN
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_SYSTEMRESET_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_SYSTEMRESET_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_tickless.c * arch/risc-v/src/common/espressif/esp_tickless.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_tickless.h * arch/risc-v/src/common/espressif/esp_tickless.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_TICKLESS_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TICKLESS_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_TICKLESS_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TICKLESS_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -66,4 +66,4 @@ uint32_t up_get_idletime(void);
void up_step_idletime(uint32_t idletime_us); void up_step_idletime(uint32_t idletime_us);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_TICKLESS_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TICKLESS_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_timer.c * arch/risc-v/src/common/espressif/esp_timer.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_timer.h * arch/risc-v/src/common/espressif/esp_timer.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_TIMER_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TIMER_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_TIMER_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TIMER_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -50,4 +50,4 @@
int esp_timer_initialize(uint32_t timer_id); int esp_timer_initialize(uint32_t timer_id);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_TIMER_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_TIMER_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_timerisr.c * arch/risc-v/src/common/espressif/esp_timerisr.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_usbserial.c * arch/risc-v/src/common/espressif/esp_usbserial.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_usbserial.h * arch/risc-v/src/common/espressif/esp_usbserial.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_USBSERIAL_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_USBSERIAL_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_USBSERIAL_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_USBSERIAL_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -48,4 +48,4 @@ extern uart_dev_t g_uart_usbserial;
void esp_usbserial_write(char ch); void esp_usbserial_write(char ch);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_USBSERIAL_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_USBSERIAL_H */

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_vectors.S * arch/risc-v/src/common/espressif/esp_vectors.S
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_wdt.c * arch/risc-v/src/common/espressif/esp_wdt.c
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* arch/risc-v/src/espressif/esp_wdt.h * arch/risc-v/src/common/espressif/esp_wdt.h
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef __ARCH_RISCV_SRC_ESPRESSIF_ESP_WDT_H #ifndef __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_WDT_H
#define __ARCH_RISCV_SRC_ESPRESSIF_ESP_WDT_H #define __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_WDT_H
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
@ -48,4 +48,4 @@
int esp_wdt_initialize(void); int esp_wdt_initialize(void);
#endif /* __ARCH_RISCV_SRC_ESPRESSIF_ESP_WDT_H */ #endif /* __ARCH_RISCV_SRC_COMMON_ESPRESSIF_ESP_WDT_H */

View File

@ -19,61 +19,7 @@
############################################################################ ############################################################################
include common/Make.defs include common/Make.defs
include common/espressif/Make.defs
# The start-up, "head", file. May be either a .S or a .c file.
HEAD_ASRC = esp_head.S
# Skip common RISC-V vector table in favor of Espressif's custom vector
# table.
CMN_ASRCS := $(filter-out riscv_vectors.S,$(CMN_ASRCS))
CHIP_ASRCS = esp_vectors.S
# Required Espressif chip's files (arch/risc-v/src/espressif)
CHIP_CSRCS = esp_allocateheap.c esp_start.c esp_idle.c
CHIP_CSRCS += esp_irq.c esp_gpio.c esp_libc_stubs.c
CHIP_CSRCS += esp_lowputc.c esp_serial.c
CHIP_CSRCS += esp_systemreset.c
ifeq ($(CONFIG_SCHED_TICKLESS),y)
CHIP_CSRCS += esp_tickless.c
else
CHIP_CSRCS += esp_timerisr.c
endif
ifeq ($(CONFIG_WATCHDOG),y)
CHIP_CSRCS += esp_wdt.c
endif
ifneq ($(CONFIG_DEV_RANDOM)$(CONFIG_DEV_URANDOM_ARCH),)
CHIP_CSRCS += esp_random.c
endif
ifeq ($(CONFIG_TIMER),y)
CHIP_CSRCS += esp_timer.c
endif
ifeq ($(CONFIG_ONESHOT),y)
CHIP_CSRCS += esp_oneshot.c
endif
ifeq ($(CONFIG_RTC),y)
CHIP_CSRCS += esp_rtc.c
endif
ifeq ($(CONFIG_ESPRESSIF_HR_TIMER),y)
CHIP_CSRCS += esp_hr_timer.c
endif
ifeq ($(CONFIG_ESPRESSIF_LEDC),y)
CHIP_CSRCS += esp_ledc.c
endif
ifeq ($(CONFIG_ESPRESSIF_USBSERIAL),y)
CHIP_CSRCS += esp_usbserial.c
endif
############################################################################# #############################################################################
# Espressif HAL for 3rd Party Platforms # Espressif HAL for 3rd Party Platforms
@ -114,5 +60,3 @@ distclean::
$(call DELFILE,../include/chip/gpio_sig_map.h) $(call DELFILE,../include/chip/gpio_sig_map.h)
$(call DELFILE,../include/chip/irq.h) $(call DELFILE,../include/chip/irq.h)
$(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO)) $(call DELDIR,chip/$(ESP_HAL_3RDPARTY_REPO))
include chip/Bootloader.mk

View File

@ -33,7 +33,7 @@
#include <arch/board/board.h> #include <arch/board/board.h>
#include "esp_ledc.h" #include "espressif/esp_ledc.h"
#include "esp_board_ledc.h" #include "esp_board_ledc.h"

View File

@ -37,23 +37,23 @@
#include "esp_board_ledc.h" #include "esp_board_ledc.h"
#ifdef CONFIG_WATCHDOG #ifdef CONFIG_WATCHDOG
# include "esp_wdt.h" # include "espressif/esp_wdt.h"
#endif #endif
#ifdef CONFIG_TIMER #ifdef CONFIG_TIMER
# include "esp_timer.h" # include "espressif/esp_timer.h"
#endif #endif
#ifdef CONFIG_ONESHOT #ifdef CONFIG_ONESHOT
# include "esp_oneshot.h" # include "espressif/esp_oneshot.h"
#endif #endif
#ifdef CONFIG_RTC_DRIVER #ifdef CONFIG_RTC_DRIVER
# include "esp_rtc.h" # include "espressif/esp_rtc.h"
#endif #endif
#ifdef CONFIG_DEV_GPIO #ifdef CONFIG_DEV_GPIO
# include "esp_gpio.h" # include "espressif/esp_gpio.h"
#endif #endif
#ifdef CONFIG_INPUT_BUTTONS #ifdef CONFIG_INPUT_BUTTONS

View File

@ -43,7 +43,7 @@
/* Arch */ /* Arch */
#include "esp_gpio.h" #include "espressif/esp_gpio.h"
/* Board */ /* Board */

View File

@ -41,7 +41,7 @@
/* Arch */ /* Arch */
#include "esp_gpio.h" #include "espressif/esp_gpio.h"
/* Board */ /* Board */

View File

@ -31,7 +31,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/board.h> #include <nuttx/board.h>
#include "esp_systemreset.h" #include "espressif/esp_systemreset.h"
#ifdef CONFIG_BOARDCTL_RESET #ifdef CONFIG_BOARDCTL_RESET

View File

@ -37,23 +37,23 @@
#include "esp_board_ledc.h" #include "esp_board_ledc.h"
#ifdef CONFIG_WATCHDOG #ifdef CONFIG_WATCHDOG
# include "esp_wdt.h" # include "espressif/esp_wdt.h"
#endif #endif
#ifdef CONFIG_TIMER #ifdef CONFIG_TIMER
# include "esp_timer.h" # include "espressif/esp_timer.h"
#endif #endif
#ifdef CONFIG_ONESHOT #ifdef CONFIG_ONESHOT
# include "esp_oneshot.h" # include "espressif/esp_oneshot.h"
#endif #endif
#ifdef CONFIG_RTC_DRIVER #ifdef CONFIG_RTC_DRIVER
# include "esp_rtc.h" # include "espressif/esp_rtc.h"
#endif #endif
#ifdef CONFIG_DEV_GPIO #ifdef CONFIG_DEV_GPIO
# include "esp_gpio.h" # include "espressif/esp_gpio.h"
#endif #endif
#ifdef CONFIG_INPUT_BUTTONS #ifdef CONFIG_INPUT_BUTTONS

View File

@ -43,7 +43,7 @@
/* Arch */ /* Arch */
#include "esp_gpio.h" #include "espressif/esp_gpio.h"
/* Board */ /* Board */

View File

@ -41,7 +41,7 @@
/* Arch */ /* Arch */
#include "esp_gpio.h" #include "espressif/esp_gpio.h"
/* Board */ /* Board */

View File

@ -31,7 +31,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/board.h> #include <nuttx/board.h>
#include "esp_systemreset.h" #include "espressif/esp_systemreset.h"
#ifdef CONFIG_BOARDCTL_RESET #ifdef CONFIG_BOARDCTL_RESET

View File

@ -37,23 +37,23 @@
#include "esp_board_ledc.h" #include "esp_board_ledc.h"
#ifdef CONFIG_WATCHDOG #ifdef CONFIG_WATCHDOG
# include "esp_wdt.h" # include "espressif/esp_wdt.h"
#endif #endif
#ifdef CONFIG_TIMER #ifdef CONFIG_TIMER
# include "esp_timer.h" # include "espressif/esp_timer.h"
#endif #endif
#ifdef CONFIG_ONESHOT #ifdef CONFIG_ONESHOT
# include "esp_oneshot.h" # include "espressif/esp_oneshot.h"
#endif #endif
#ifdef CONFIG_RTC_DRIVER #ifdef CONFIG_RTC_DRIVER
# include "esp_rtc.h" # include "espressif/esp_rtc.h"
#endif #endif
#ifdef CONFIG_DEV_GPIO #ifdef CONFIG_DEV_GPIO
# include "esp_gpio.h" # include "espressif/esp_gpio.h"
#endif #endif
#ifdef CONFIG_INPUT_BUTTONS #ifdef CONFIG_INPUT_BUTTONS

View File

@ -43,7 +43,7 @@
/* Arch */ /* Arch */
#include "esp_gpio.h" #include "espressif/esp_gpio.h"
/* Board */ /* Board */

View File

@ -41,7 +41,7 @@
/* Arch */ /* Arch */
#include "esp_gpio.h" #include "espressif/esp_gpio.h"
/* Board */ /* Board */

View File

@ -31,7 +31,7 @@
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/board.h> #include <nuttx/board.h>
#include "esp_systemreset.h" #include "espressif/esp_systemreset.h"
#ifdef CONFIG_BOARDCTL_RESET #ifdef CONFIG_BOARDCTL_RESET