mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
arch/xtensa/esp32: Update E-Fuse driver
Updates E-Fuse driver for ESP32, now sharing a common implementation across Xtensa devices. Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This commit is contained in:
committed by
Tiago Medicci Serrano
parent
8d6dcd61ed
commit
ce99fbd904
@@ -111,8 +111,9 @@ ifeq ($(CONFIG_ESPRESSIF_ADC),y)
|
||||
CHIP_CSRCS += esp_adc.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_EFUSE),y)
|
||||
CHIP_CSRCS += esp_efuse.c
|
||||
|
||||
ifeq ($(CONFIG_ESPRESSIF_EFUSE),y)
|
||||
LDFLAGS += -u esp_efuse_startup_include_func
|
||||
endif
|
||||
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
#include "esp_efuse.h"
|
||||
#include "esp_efuse_utility.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_CHIP_ESP32
|
||||
#include "xtensa.h"
|
||||
#include "soc/apb_ctrl_reg.h"
|
||||
#include "esp_efuse_table.h"
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@@ -54,6 +60,8 @@ struct esp_efuse_lowerhalf_s
|
||||
void *upper; /* Pointer to efuse_upperhalf_s */
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_EFUSE
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions Prototypes
|
||||
****************************************************************************/
|
||||
@@ -306,3 +314,66 @@ int esp_efuse_initialize(const char *devpath)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_efuse_hal_chip_revision
|
||||
*
|
||||
* Description:
|
||||
* Returns the chip version in the format: Major * 100 + Minor.
|
||||
* This function must be compiled even when CONFIG_ESPRESSIF_EFUSE is not
|
||||
* defined, because it required used by esp32_start.c.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* The chip version as an unsigned 32-bit integer.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_CHIP_ESP32
|
||||
uint32_t esp_efuse_hal_chip_revision(void)
|
||||
{
|
||||
uint8_t eco_bit0;
|
||||
uint8_t eco_bit1;
|
||||
uint8_t eco_bit2;
|
||||
uint8_t minor_chip_version;
|
||||
uint32_t combine_value;
|
||||
uint32_t chip_ver = 0;
|
||||
|
||||
esp_efuse_read_field_blob(ESP_EFUSE_CHIP_VER_REV1,
|
||||
&eco_bit0,
|
||||
ESP_EFUSE_CHIP_VER_REV1[0]->bit_count);
|
||||
esp_efuse_read_field_blob(ESP_EFUSE_CHIP_VER_REV2,
|
||||
&eco_bit1,
|
||||
ESP_EFUSE_CHIP_VER_REV2[0]->bit_count);
|
||||
esp_efuse_read_field_blob(ESP_EFUSE_WAFER_VERSION_MINOR,
|
||||
&minor_chip_version,
|
||||
ESP_EFUSE_WAFER_VERSION_MINOR[0]->bit_count);
|
||||
|
||||
eco_bit2 = (getreg32(APB_CTRL_DATE_REG) & 0x80000000) >> 31;
|
||||
combine_value = (eco_bit2 << 2) | (eco_bit1 << 1) | eco_bit0;
|
||||
|
||||
switch (combine_value)
|
||||
{
|
||||
case 0:
|
||||
chip_ver = 0;
|
||||
break;
|
||||
case 1:
|
||||
chip_ver = 1;
|
||||
break;
|
||||
case 3:
|
||||
chip_ver = 2;
|
||||
break;
|
||||
case 7:
|
||||
chip_ver = 3;
|
||||
break;
|
||||
default:
|
||||
chip_ver = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return (chip_ver * 100) + minor_chip_version;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -115,6 +115,24 @@ typedef enum
|
||||
* Public Functions Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_efuse_hal_chip_revision
|
||||
*
|
||||
* Description:
|
||||
* Returns the chip version in the format: Major * 100 + Minor.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* The chip version as an unsigned 32-bit integer.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_CHIP_ESP32
|
||||
uint32_t esp_efuse_hal_chip_revision(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_efuse_initialize
|
||||
*
|
||||
@@ -131,7 +149,9 @@ typedef enum
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_EFUSE
|
||||
int esp_efuse_initialize(const char *devpath);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
||||
@@ -231,10 +231,8 @@ config ESP32_BT
|
||||
No yet implemented
|
||||
|
||||
config ESP32_EFUSE
|
||||
bool "EFUSE support"
|
||||
default n
|
||||
---help---
|
||||
Enable ESP32 efuse support.
|
||||
bool
|
||||
select ESPRESSIF_EFUSE
|
||||
|
||||
config ESP32_EMAC
|
||||
bool "Ethernet MAC"
|
||||
|
||||
@@ -115,11 +115,6 @@ CHIP_CSRCS += esp32_himem.c
|
||||
CHIP_CSRCS += esp32_himem_chardev.c
|
||||
endif
|
||||
|
||||
CHIP_CSRCS += esp32_efuse.c
|
||||
ifeq ($(CONFIG_ESP32_EFUSE),y)
|
||||
CHIP_CSRCS += esp32_efuse_lowerhalf.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32_EMAC),y)
|
||||
CHIP_CSRCS += esp32_emac.c
|
||||
endif
|
||||
@@ -228,7 +223,7 @@ endif
|
||||
|
||||
ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
|
||||
ifndef ESP_HAL_3RDPARTY_VERSION
|
||||
ESP_HAL_3RDPARTY_VERSION = e9a78c811578545e2bc673862d885a15bd6cbf67
|
||||
ESP_HAL_3RDPARTY_VERSION = 96185c5348c747d2e15baef639d0b2a842ecd504
|
||||
endif
|
||||
|
||||
ifndef ESP_HAL_3RDPARTY_URL
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,93 +0,0 @@
|
||||
/****************************************************************************
|
||||
* arch/xtensa/src/esp32/esp32_efuse.h
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/efuse/efuse.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* Type of eFuse blocks for ESP32 */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
EFUSE_BLK0 = 0, /* Reserved. */
|
||||
EFUSE_BLK1 = 1, /* Used for Flash Encryption. */
|
||||
EFUSE_BLK2 = 2, /* Used for Secure Boot. */
|
||||
EFUSE_BLK3 = 3, /* Uses for the purpose of the user. */
|
||||
EFUSE_BLK_MAX
|
||||
} esp_efuse_block_t;
|
||||
|
||||
/* This is type of function that will handle the efuse field register.
|
||||
*
|
||||
* num_reg The register number in the block.
|
||||
* efuse_block Block number.
|
||||
* bit_start Start bit in the register.
|
||||
* bit_count The number of bits used in the register.
|
||||
* arr A pointer to an array or variable.
|
||||
* bits_counter Counter bits.
|
||||
*
|
||||
* return
|
||||
* - OK: The operation was successfully completed.
|
||||
* - other efuse component errors.
|
||||
*/
|
||||
|
||||
typedef int (*efuse_func_proc_t) (uint32_t num_reg,
|
||||
int starting_bit_num_in_reg,
|
||||
int num_bits_used_in_reg,
|
||||
void *arr, int *bits_counter);
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp_efuse_hal_chip_revision
|
||||
*
|
||||
* Description:
|
||||
* Returns the chip version in the format: Major * 100 + Minor.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* The chip version as an unsigned 32-bit integer.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint32_t esp_efuse_hal_chip_revision(void);
|
||||
|
||||
#ifdef CONFIG_ESP32_EFUSE
|
||||
|
||||
int esp_efuse_read_field(const efuse_desc_t *field[], void *dst,
|
||||
size_t dst_size_bits);
|
||||
|
||||
int esp_efuse_write_field(const efuse_desc_t *field[],
|
||||
const void *src, size_t src_size_bits);
|
||||
|
||||
void esp_efuse_burn_efuses(void);
|
||||
|
||||
int esp32_efuse_initialize(const char *devpath);
|
||||
|
||||
#endif /* CONFIG_ESP32_EFUSE */
|
||||
@@ -1,195 +0,0 @@
|
||||
/****************************************************************************
|
||||
* arch/xtensa/src/esp32/esp32_efuse_lowerhalf.c
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <debug.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/efuse/efuse.h>
|
||||
|
||||
#include "hardware/esp32_soc.h"
|
||||
#include "esp32_efuse.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
struct esp32_efuse_lowerhalf_s
|
||||
{
|
||||
const struct efuse_ops_s *ops; /* Lower half operations */
|
||||
void *upper; /* Pointer to efuse_upperhalf_s */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/* "Lower half" driver methods **********************************************/
|
||||
|
||||
static int esp32_efuse_read_field(struct efuse_lowerhalf_s *lower,
|
||||
const efuse_desc_t *field[],
|
||||
uint8_t *data, size_t size);
|
||||
static int esp32_efuse_write_field(struct efuse_lowerhalf_s *lower,
|
||||
const efuse_desc_t *field[],
|
||||
const uint8_t *data,
|
||||
size_t size);
|
||||
static int efuse_ioctl(struct efuse_lowerhalf_s *lower, int cmd,
|
||||
unsigned long arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/* "Lower half" driver methods */
|
||||
|
||||
static const struct efuse_ops_s g_esp32_efuse_ops =
|
||||
{
|
||||
.read_field = esp32_efuse_read_field,
|
||||
.write_field = esp32_efuse_write_field,
|
||||
.ioctl = efuse_ioctl,
|
||||
};
|
||||
|
||||
/* EFUSE lower-half */
|
||||
|
||||
static struct esp32_efuse_lowerhalf_s g_esp32_efuse_lowerhalf =
|
||||
{
|
||||
.ops = &g_esp32_efuse_ops,
|
||||
.upper = NULL,
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private functions
|
||||
****************************************************************************/
|
||||
|
||||
static int esp32_efuse_read_field(struct efuse_lowerhalf_s *lower,
|
||||
const efuse_desc_t *field[],
|
||||
uint8_t *data, size_t bits_len)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
/* Read the requested field */
|
||||
|
||||
ret = esp_efuse_read_field(field, data, bits_len);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int esp32_efuse_write_field(struct efuse_lowerhalf_s *lower,
|
||||
const efuse_desc_t *field[],
|
||||
const uint8_t *data, size_t bits_len)
|
||||
{
|
||||
irqstate_t flags;
|
||||
int ret = OK;
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
/* Write the blob data to the field */
|
||||
|
||||
ret = esp_efuse_write_field(field, data, bits_len);
|
||||
|
||||
/* Burn the EFUSEs */
|
||||
|
||||
esp_efuse_burn_efuses();
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: efuse_ioctl
|
||||
****************************************************************************/
|
||||
|
||||
static int efuse_ioctl(struct efuse_lowerhalf_s *lower,
|
||||
int cmd, unsigned long arg)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
/* We don't have proprietary EFUSE ioctls */
|
||||
|
||||
default:
|
||||
{
|
||||
minfo("Unrecognized cmd: %d\n", cmd);
|
||||
ret = -ENOTTY;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_efuse_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the efuse driver. The efuse is initialized
|
||||
* and registered as 'devpath'.
|
||||
*
|
||||
* Input Parameters:
|
||||
* devpath - The full path to the efuse. This should
|
||||
* be of the form /dev/efuse
|
||||
*
|
||||
* Returned Values:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int esp32_efuse_initialize(const char *devpath)
|
||||
{
|
||||
struct esp32_efuse_lowerhalf_s *lower = NULL;
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(devpath);
|
||||
|
||||
lower = &g_esp32_efuse_lowerhalf;
|
||||
|
||||
/* Register the efuser upper driver */
|
||||
|
||||
lower->upper = efuse_register(devpath,
|
||||
(struct efuse_lowerhalf_s *)lower);
|
||||
|
||||
if (lower->upper == NULL)
|
||||
{
|
||||
/* The actual cause of the failure may have been a failure to allocate
|
||||
* perhaps a failure to register the efuser driver (such as if the
|
||||
* 'devpath' were not unique). We know here but we return EEXIST to
|
||||
* indicate the failure (implying the non-unique devpath).
|
||||
*/
|
||||
|
||||
ret = -EEXIST;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
errout:
|
||||
return ret;
|
||||
}
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "xtensa_attr.h"
|
||||
|
||||
#include "esp32_clockconfig.h"
|
||||
#include "esp32_efuse.h"
|
||||
#include "esp32_region.h"
|
||||
#include "esp32_start.h"
|
||||
#include "esp32_spiram.h"
|
||||
@@ -48,6 +47,7 @@
|
||||
#include "hardware/esp32_rtccntl.h"
|
||||
#include "rom/esp32_libc_stubs.h"
|
||||
#include "espressif/esp_loader.h"
|
||||
#include "espressif/esp_efuse.h"
|
||||
#include "esp_private/startup_internal.h"
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_SIMPLE_BOOT
|
||||
@@ -226,27 +226,6 @@ static noreturn_function void __esp32_start(void)
|
||||
|
||||
showprogress('A');
|
||||
|
||||
chip_rev = esp_efuse_hal_chip_revision();
|
||||
|
||||
_info("ESP32 chip revision is v%" PRId32 ".%01ld\n",
|
||||
chip_rev / 100, chip_rev % 100);
|
||||
|
||||
if (chip_rev < 300)
|
||||
{
|
||||
#ifndef ESP32_IGNORE_CHIP_REVISION_CHECK
|
||||
ets_printf("ERROR: NuttX supports ESP32 chip revision >= v3.0"
|
||||
" (chip revision is v%" PRId32 ".%01ld)\n",
|
||||
chip_rev / 100, chip_rev % 100);
|
||||
PANIC();
|
||||
#endif
|
||||
ets_printf("WARNING: NuttX supports ESP32 chip revision >= v3.0"
|
||||
" (chip is v%" PRId32 ".%01ld).\n"
|
||||
"Ignoring this error and continuing because "
|
||||
"`ESP32_IGNORE_CHIP_REVISION_CHECK` is set...\n"
|
||||
"THIS MAY NOT WORK! DON'T USE THIS CHIP IN PRODUCTION!\n",
|
||||
chip_rev / 100, chip_rev % 100);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ESP32_SPIRAM_BOOT_INIT)
|
||||
if (esp_spiram_init() != OK)
|
||||
{
|
||||
@@ -301,9 +280,31 @@ static noreturn_function void __esp32_start(void)
|
||||
|
||||
showprogress('D');
|
||||
|
||||
chip_rev = esp_efuse_hal_chip_revision();
|
||||
|
||||
_info("ESP32 chip revision is v%" PRId32 ".%01ld\n",
|
||||
chip_rev / 100, chip_rev % 100);
|
||||
|
||||
if (chip_rev < 300)
|
||||
{
|
||||
#ifndef ESP32_IGNORE_CHIP_REVISION_CHECK
|
||||
ets_printf("ERROR: NuttX supports ESP32 chip revision >= v3.0"
|
||||
" (chip revision is v%" PRId32 ".%01ld)\n",
|
||||
chip_rev / 100, chip_rev % 100);
|
||||
PANIC();
|
||||
#endif
|
||||
ets_printf("WARNING: NuttX supports ESP32 chip revision >= v3.0"
|
||||
" (chip is v%" PRId32 ".%01ld).\n"
|
||||
"Ignoring this error and continuing because "
|
||||
"`ESP32_IGNORE_CHIP_REVISION_CHECK` is set...\n"
|
||||
"THIS MAY NOT WORK! DON'T USE THIS CHIP IN PRODUCTION!\n",
|
||||
chip_rev / 100, chip_rev % 100);
|
||||
}
|
||||
|
||||
/* Bring up NuttX */
|
||||
|
||||
nx_start();
|
||||
|
||||
for (; ; ); /* Should not return */
|
||||
}
|
||||
|
||||
|
||||
@@ -94,15 +94,17 @@ ARCHSCRIPT += $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)
|
||||
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_api.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_utility.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_startup.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_fields.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_fields.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_table.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_utility.c
|
||||
|
||||
# Please note that the following source file depends on `CONFIG_SOC_EFUSE_KEY_PURPOSE_FIELD` and `CONFIG_SOC_EFUSE_CONSISTS_OF_ONE_KEY_BLOCK`
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)efuse_controller$(DELIM)keys$(DELIM)without_key_purposes$(DELIM)three_key_blocks$(DELIM)esp_efuse_api_key.c
|
||||
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_adc$(DELIM)adc_cali.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_adc$(DELIM)$(CHIP_SERIES)$(DELIM)adc_cali_line_fitting.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_fields.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_table.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)$(CHIP_SERIES)$(DELIM)esp_efuse_utility.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_app_format$(DELIM)esp_app_desc.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)adc_share_hw_ctrl.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_hw_support$(DELIM)clk_ctrl_os.c
|
||||
@@ -200,7 +202,6 @@ ifeq ($(CONFIG_ESPRESSIF_SIMPLE_BOOT),y)
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_sys.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_spiflash.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)esp_rom$(DELIM)patches$(DELIM)esp_rom_crc.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)efuse$(DELIM)src$(DELIM)esp_efuse_fields.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)wdt_hal_iram.c
|
||||
CHIP_CSRCS += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)hal$(DELIM)mpu_hal.c
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
# CONFIG_ARCH_LEDS is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
CONFIG_ALLOW_BSD_COMPONENTS=y
|
||||
CONFIG_ARCH="xtensa"
|
||||
CONFIG_ARCH_BOARD="esp32-devkitc"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
@@ -16,84 +15,33 @@ CONFIG_ARCH_BOARD_ESP32_DEVKITC=y
|
||||
CONFIG_ARCH_CHIP="esp32"
|
||||
CONFIG_ARCH_CHIP_ESP32=y
|
||||
CONFIG_ARCH_CHIP_ESP32WROVER=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_XTENSA=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_ASSERTIONS=y
|
||||
CONFIG_DEBUG_FEATURES=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_MM=y
|
||||
CONFIG_DEBUG_MM_ERROR=y
|
||||
CONFIG_DEBUG_MM_WARN=y
|
||||
CONFIG_DEBUG_NET=y
|
||||
CONFIG_DEBUG_NET_ERROR=y
|
||||
CONFIG_DEBUG_NET_WARN=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEFAULT_TASK_STACKSIZE=4096
|
||||
CONFIG_DEV_URANDOM=y
|
||||
CONFIG_DRIVERS_IEEE80211=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_EFUSE=y
|
||||
CONFIG_ESP32_EFUSE=y
|
||||
CONFIG_ESP32_SPIFLASH=y
|
||||
CONFIG_ESP32_SPIFLASH_SPIFFS=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x80000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_ESPRESSIF_EFUSE=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=3072
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INIT_STACKSIZE=3072
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LINE_MAX=300
|
||||
CONFIG_LINE_MAX=64
|
||||
CONFIG_MM_REGIONS=3
|
||||
CONFIG_NAME_MAX=48
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
CONFIG_NETDB_DNSCLIENT_NAMESIZE=64
|
||||
CONFIG_NETDEV_LATEINIT=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETDEV_WIRELESS_IOCTL=y
|
||||
CONFIG_NETUTILS_CJSON=y
|
||||
CONFIG_NETUTILS_IPERF=y
|
||||
CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ETH_PKTSIZE=1518
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_PREALLOC_DEVIF_CALLBACKS=32
|
||||
CONFIG_NET_STATISTICS=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_TCP_DELAYED_ACK=y
|
||||
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=2048
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_PTHREAD_MUTEX_TYPES=y
|
||||
CONFIG_RAM_SIZE=114688
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPIFFS_NAME_MAX=48
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_DAY=6
|
||||
CONFIG_START_MONTH=12
|
||||
CONFIG_START_YEAR=2011
|
||||
CONFIG_SYSLOG_BUFFER=y
|
||||
CONFIG_SYSTEM_DHCPC_RENEW=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_SYSTEM_STACKMONITOR=y
|
||||
CONFIG_TLS_TASK_NELEM=4
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WIRELESS=y
|
||||
CONFIG_WIRELESS_WAPI=y
|
||||
CONFIG_WIRELESS_WAPI_CMDTOOL=y
|
||||
CONFIG_WIRELESS_WAPI_INITCONF=y
|
||||
|
||||
@@ -36,13 +36,12 @@ CONFIG_DEV_URANDOM_XORSHIFT128=y
|
||||
CONFIG_DISABLE_MQUEUE_SYSV=y
|
||||
CONFIG_DRIVERS_IEEE80211=y
|
||||
CONFIG_DRIVERS_WIRELESS=y
|
||||
CONFIG_EFUSE=y
|
||||
CONFIG_ESP32_EFUSE=y
|
||||
CONFIG_ESP32_IRAM_HEAP=y
|
||||
CONFIG_ESP32_RTC_HEAP=y
|
||||
CONFIG_ESP32_SPIFLASH=y
|
||||
CONFIG_ESP32_STORAGE_MTD_SIZE=0x280000
|
||||
CONFIG_ESP32_UART0=y
|
||||
CONFIG_ESPRESSIF_EFUSE=y
|
||||
CONFIG_ESPRESSIF_WIFI=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FS_LITTLEFS=y
|
||||
|
||||
@@ -34,15 +34,15 @@
|
||||
#include <sys/types.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include <nuttx/efuse/efuse.h>
|
||||
#endif
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/himem/himem.h>
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#include "esp32_efuse.h"
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include "espressif/esp_efuse.h"
|
||||
#endif
|
||||
#include "esp32_partition.h"
|
||||
|
||||
@@ -237,8 +237,8 @@ int esp32_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
ret = esp32_efuse_initialize("/dev/efuse");
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
ret = esp_efuse_initialize("/dev/efuse");
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to init EFUSE: %d\n", ret);
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <errno.h>
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include <nuttx/efuse/efuse.h>
|
||||
#endif
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/himem/himem.h>
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#include "esp32_efuse.h"
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include "espressif/esp_efuse.h"
|
||||
#endif
|
||||
#include "esp32_partition.h"
|
||||
|
||||
@@ -145,8 +145,8 @@ int esp32_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
ret = esp32_efuse_initialize("/dev/efuse");
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
ret = esp_efuse_initialize("/dev/efuse");
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to init EFUSE: %d\n", ret);
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <errno.h>
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include <nuttx/efuse/efuse.h>
|
||||
#endif
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/himem/himem.h>
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#include "esp32_efuse.h"
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include "espressif/esp_efuse.h"
|
||||
#endif
|
||||
#include "esp32_partition.h"
|
||||
|
||||
@@ -144,8 +144,8 @@ int esp32_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
ret = esp32_efuse_initialize("/dev/efuse");
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
ret = esp_efuse_initialize("/dev/efuse");
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to init EFUSE: %d\n", ret);
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
# include <nuttx/video/fb.h>
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
# include <nuttx/efuse/efuse.h>
|
||||
# include "esp32_efuse.h"
|
||||
# include "espressif/esp_efuse.h"
|
||||
#endif
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
@@ -181,8 +181,8 @@ int esp32_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
ret = esp32_efuse_initialize("/dev/efuse");
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
ret = esp_efuse_initialize("/dev/efuse");
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to init EFUSE: %d\n", ret);
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <errno.h>
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include <nuttx/efuse/efuse.h>
|
||||
#endif
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/himem/himem.h>
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#include "esp32_efuse.h"
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include "espressif/esp_efuse.h"
|
||||
#endif
|
||||
#include "esp32_partition.h"
|
||||
|
||||
@@ -144,8 +144,8 @@ int esp32_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
ret = esp32_efuse_initialize("/dev/efuse");
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
ret = esp_efuse_initialize("/dev/efuse");
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to init EFUSE: %d\n", ret);
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <errno.h>
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include <nuttx/efuse/efuse.h>
|
||||
#endif
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/himem/himem.h>
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
#include "esp32_efuse.h"
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
#include "espressif/esp_efuse.h"
|
||||
#endif
|
||||
#include "esp32_partition.h"
|
||||
|
||||
@@ -190,8 +190,8 @@ int esp32_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP32_EFUSE)
|
||||
ret = esp32_efuse_initialize("/dev/efuse");
|
||||
#if defined(CONFIG_ESPRESSIF_EFUSE)
|
||||
ret = esp_efuse_initialize("/dev/efuse");
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to init EFUSE: %d\n", ret);
|
||||
|
||||
Reference in New Issue
Block a user