Skip to content

Commit dbbc1ba

Browse files
committed
Merge branch 'feat/merge_nuttx_patch' into 'master'
G0, G1: fix issues that prevents using G0/G1 components on other platforms See merge request espressif/esp-idf!22521
2 parents 2f49ccc + 866c5ce commit dbbc1ba

File tree

37 files changed

+132
-105
lines changed

37 files changed

+132
-105
lines changed

components/efuse/esp32/esp_efuse_fields.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "soc/efuse_periph.h"
1616
#include "soc/chip_revision.h"
1717
#include "hal/efuse_hal.h"
18-
#include "bootloader_random.h"
1918
#include "sys/param.h"
2019
#include "soc/syscon_reg.h"
2120

components/efuse/esp32c2/esp_efuse_fields.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "esp_err.h"
1515
#include "esp_log.h"
1616
#include "soc/efuse_periph.h"
17-
#include "bootloader_random.h"
1817
#include "sys/param.h"
1918

2019
static __attribute__((unused)) const char *TAG = "efuse";

components/efuse/esp32c3/esp_efuse_fields.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "esp_err.h"
1515
#include "esp_log.h"
1616
#include "soc/efuse_periph.h"
17-
#include "bootloader_random.h"
1817
#include "sys/param.h"
1918

2019
static __attribute__((unused)) const char *TAG = "efuse";

components/efuse/esp32c6/esp_efuse_fields.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -14,7 +14,6 @@
1414
#include "esp_err.h"
1515
#include "esp_log.h"
1616
#include "soc/efuse_periph.h"
17-
#include "bootloader_random.h"
1817
#include "sys/param.h"
1918

2019
static __attribute__((unused)) const char *TAG = "efuse";

components/efuse/esp32h2/esp_efuse_fields.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -14,7 +14,6 @@
1414
#include "esp_err.h"
1515
#include "esp_log.h"
1616
#include "soc/efuse_periph.h"
17-
#include "bootloader_random.h"
1817
#include "sys/param.h"
1918

2019
static __attribute__((unused)) const char *TAG = "efuse";

components/efuse/esp32h4/esp_efuse_fields.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "esp_err.h"
1515
#include "esp_log.h"
1616
#include "soc/efuse_periph.h"
17-
#include "bootloader_random.h"
1817
#include "sys/param.h"
1918

2019
static __attribute__((unused)) const char *TAG = "efuse";

components/efuse/esp32s2/esp_efuse_fields.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "esp_err.h"
1414
#include "esp_log.h"
1515
#include "soc/efuse_periph.h"
16-
#include "bootloader_random.h"
1716
#include "sys/param.h"
1817

1918
static __attribute__((unused)) const char *TAG = "efuse";

components/efuse/esp32s3/esp_efuse_fields.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "esp_err.h"
1414
#include "esp_log.h"
1515
#include "soc/efuse_periph.h"
16-
#include "bootloader_random.h"
1716
#include "sys/param.h"
1817

1918
static __attribute__((unused)) const char *TAG = "efuse";

components/efuse/src/esp_efuse_fields.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "esp_fault.h"
1616
#include "esp_log.h"
1717
#include "soc/efuse_periph.h"
18-
#include "bootloader_random.h"
1918
#include "sys/param.h"
2019

2120
static __attribute__((unused)) const char *TAG = "efuse";

components/efuse/test_apps/main/one_key_block/test_efuse.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@
1515
#include "esp_efuse_table.h"
1616
#include "esp_efuse_utility.h"
1717
#include "esp_efuse_test_table.h"
18-
#include "bootloader_random.h"
1918
#include "freertos/FreeRTOS.h"
2019
#include "freertos/task.h"
2120
#include "freertos/semphr.h"
2221
#include "sdkconfig.h"
2322
#include "esp_rom_efuse.h"
24-
#include "bootloader_common.h"
2523

2624
__attribute__((unused)) static const char* TAG = "efuse_test";
2725

components/efuse/test_apps/main/three_key_blocks/test_efuse.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@
1515
#include "esp_efuse_table.h"
1616
#include "esp_efuse_utility.h"
1717
#include "esp_efuse_test_table.h"
18-
#include "bootloader_random.h"
1918
#include "freertos/FreeRTOS.h"
2019
#include "freertos/task.h"
2120
#include "freertos/semphr.h"
2221
#include "sdkconfig.h"
2322
#include "esp_rom_efuse.h"
24-
#include "bootloader_common.h"
2523

2624
__attribute__((unused)) static const char* TAG = "efuse_test";
2725

components/efuse/test_apps/main/with_key_purposes/test_efuse.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@
1515
#include "esp_efuse_table.h"
1616
#include "esp_efuse_utility.h"
1717
#include "esp_efuse_test_table.h"
18-
#include "bootloader_random.h"
1918
#include "freertos/FreeRTOS.h"
2019
#include "freertos/task.h"
2120
#include "freertos/semphr.h"
2221
#include "sdkconfig.h"
2322
#include "esp_rom_efuse.h"
24-
#include "bootloader_common.h"
2523

2624
__attribute__((unused)) static const char* TAG = "efuse_test";
2725

components/esp_hw_support/include/esp_private/esp_modem_clock.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -10,6 +10,7 @@
1010
#include <stddef.h>
1111
#include <stdint.h>
1212

13+
#include "soc/soc_caps.h"
1314
#include "soc/periph_defs.h"
1415
#include "hal/modem_clock_types.h"
1516

components/esp_hw_support/periph_ctrl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "hal/clk_gate_ll.h"
88
#include "esp_attr.h"
99
#include "esp_private/periph_ctrl.h"
10+
#include "soc/soc_caps.h"
1011

1112
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
1213
#include "esp_private/esp_modem_clock.h"

components/esp_rom/include/esp32/rom/ets_sys.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ extern "C" {
4848

4949
typedef enum {
5050
ETS_OK = 0, /**< return successful in ets*/
51-
ETS_FAILED = 1 /**< return failed in ets*/
51+
ETS_FAILED = 1, /**< return failed in ets*/
52+
ETS_PENDING = 2,
53+
ETS_BUSY = 3,
54+
ETS_CANCEL = 4,
5255
} ETS_STATUS;
5356

5457
typedef uint32_t ETSSignal;
@@ -621,13 +624,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num);
621624

622625
#define ETS_MEM_BAR() asm volatile ( "" : : : "memory" )
623626

627+
#ifdef ESP_PLATFORM
628+
// Remove in IDF v6.0 (IDF-7044)
624629
typedef enum {
625630
OK = 0,
626631
FAIL,
627632
PENDING,
628633
BUSY,
629634
CANCEL,
630-
} STATUS;
635+
} STATUS __attribute__((deprecated("Use ETS_STATUS instead")));
636+
#endif
631637

632638
/**
633639
* @}

components/esp_rom/include/esp32/rom/uart.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void uart_buff_switch(uint8_t uart_no);
227227
*
228228
* @return OK.
229229
*/
230-
STATUS uart_tx_one_char(uint8_t TxChar);
230+
ETS_STATUS uart_tx_one_char(uint8_t TxChar);
231231

232232
/**
233233
* @brief Output a char to message exchange channel, wait until fifo not full.
@@ -237,7 +237,7 @@ STATUS uart_tx_one_char(uint8_t TxChar);
237237
*
238238
* @return OK.
239239
*/
240-
STATUS uart_tx_one_char2(uint8_t TxChar);
240+
ETS_STATUS uart_tx_one_char2(uint8_t TxChar);
241241

242242
/**
243243
* @brief Wait until uart tx full empty.
@@ -273,7 +273,7 @@ static inline void IRAM_ATTR uart_tx_wait_idle(uint8_t uart_no) {
273273
* @return OK for successful.
274274
* FAIL for failed.
275275
*/
276-
STATUS uart_rx_one_char(uint8_t *pRxChar);
276+
ETS_STATUS uart_rx_one_char(uint8_t *pRxChar);
277277

278278
/**
279279
* @brief Get an input char from message channel, wait until successful.
@@ -295,7 +295,7 @@ char uart_rx_one_char_block(void);
295295
*
296296
* @return OK.
297297
*/
298-
STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen);
298+
ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen);
299299

300300
/**
301301
* @brief Process uart received information in the interrupt handler.
@@ -318,7 +318,7 @@ void uart_rx_intr_handler(void *para);
318318
* @return OK for successful.
319319
* FAIL for failed.
320320
*/
321-
STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte);
321+
ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte);
322322

323323
/**
324324
* @brief Get all chars from receive buffer.
@@ -329,7 +329,7 @@ STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte);
329329
* @return OK for successful.
330330
* FAIL for failed.
331331
*/
332-
STATUS UartGetCmdLn(uint8_t *pCmdLn);
332+
ETS_STATUS UartGetCmdLn(uint8_t *pCmdLn);
333333

334334
/**
335335
* @brief Get uart configuration struct.
@@ -379,7 +379,7 @@ int recv_packet(uint8_t *p, int len, uint8_t is_sync);
379379
* @return OK for successful.
380380
* FAIL for failed.
381381
*/
382-
STATUS SendMsg(uint8_t *pData, uint16_t DataLen);
382+
ETS_STATUS SendMsg(uint8_t *pData, uint16_t DataLen);
383383

384384
/**
385385
* @brief Receive an packet from download tool, with SLIP escaping.
@@ -395,7 +395,7 @@ STATUS SendMsg(uint8_t *pData, uint16_t DataLen);
395395
* @return OK for successful.
396396
* FAIL for failed.
397397
*/
398-
STATUS RcvMsg(uint8_t *pData, uint16_t MaxDataLen, uint8_t is_sync);
398+
ETS_STATUS RcvMsg(uint8_t *pData, uint16_t MaxDataLen, uint8_t is_sync);
399399

400400
extern UartDevice UartDev;
401401

components/esp_rom/include/esp32c2/rom/ets_sys.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ extern "C" {
4343

4444
typedef enum {
4545
ETS_OK = 0, /**< return successful in ets*/
46-
ETS_FAILED = 1 /**< return failed in ets*/
46+
ETS_FAILED = 1, /**< return failed in ets*/
47+
ETS_PENDING = 2,
48+
ETS_BUSY = 3,
49+
ETS_CANCEL = 4,
4750
} ETS_STATUS;
4851

4952
typedef ETS_STATUS ets_status_t;
@@ -438,13 +441,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num);
438441

439442
#define ETS_MEM_BAR() asm volatile ( "" : : : "memory" )
440443

444+
#ifdef ESP_PLATFORM
445+
// Remove in IDF v6.0 (IDF-7044)
441446
typedef enum {
442447
OK = 0,
443448
FAIL,
444449
PENDING,
445450
BUSY,
446451
CANCEL,
447-
} STATUS;
452+
} STATUS __attribute__((deprecated("Use ETS_STATUS instead")));
453+
#endif
448454

449455
/**
450456
* @}

components/esp_rom/include/esp32c2/rom/uart.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void uart_tx_switch(uint8_t uart_no);
205205
*
206206
* @return OK.
207207
*/
208-
STATUS uart_tx_one_char(uint8_t TxChar);
208+
ETS_STATUS uart_tx_one_char(uint8_t TxChar);
209209

210210
/**
211211
* @brief Output a char to message exchange channel, wait until fifo not full.
@@ -215,7 +215,7 @@ STATUS uart_tx_one_char(uint8_t TxChar);
215215
*
216216
* @return OK.
217217
*/
218-
STATUS uart_tx_one_char2(uint8_t TxChar);
218+
ETS_STATUS uart_tx_one_char2(uint8_t TxChar);
219219

220220
/**
221221
* @brief Wait until uart tx full empty.
@@ -245,7 +245,7 @@ void uart_tx_wait_idle(uint8_t uart_no);
245245
* @return OK for successful.
246246
* FAIL for failed.
247247
*/
248-
STATUS uart_rx_one_char(uint8_t *pRxChar);
248+
ETS_STATUS uart_rx_one_char(uint8_t *pRxChar);
249249

250250
/**
251251
* @brief Get an input char from message channel, wait until successful.
@@ -267,7 +267,7 @@ char uart_rx_one_char_block(void);
267267
*
268268
* @return OK.
269269
*/
270-
STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen);
270+
ETS_STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen);
271271

272272
/**
273273
* @brief Get an char from receive buffer.
@@ -280,7 +280,7 @@ STATUS UartRxString(uint8_t *pString, uint8_t MaxStrlen);
280280
* @return OK for successful.
281281
* FAIL for failed.
282282
*/
283-
STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte);
283+
ETS_STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte);
284284

285285
/**
286286
* @brief Get all chars from receive buffer.
@@ -291,7 +291,7 @@ STATUS uart_rx_readbuff( RcvMsgBuff *pRxBuff, uint8_t *pRxByte);
291291
* @return OK for successful.
292292
* FAIL for failed.
293293
*/
294-
STATUS UartGetCmdLn(uint8_t *pCmdLn);
294+
ETS_STATUS UartGetCmdLn(uint8_t *pCmdLn);
295295

296296
/**
297297
* @brief Get uart configuration struct.

components/esp_rom/include/esp32c3/rom/ets_sys.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ extern "C" {
4343

4444
typedef enum {
4545
ETS_OK = 0, /**< return successful in ets*/
46-
ETS_FAILED = 1 /**< return failed in ets*/
46+
ETS_FAILED = 1, /**< return failed in ets*/
47+
ETS_PENDING = 2,
48+
ETS_BUSY = 3,
49+
ETS_CANCEL = 4,
4750
} ETS_STATUS;
4851

4952
typedef ETS_STATUS ets_status_t;
@@ -430,13 +433,16 @@ void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num);
430433

431434
#define ETS_MEM_BAR() asm volatile ( "" : : : "memory" )
432435

436+
#ifdef ESP_PLATFORM
437+
// Remove in IDF v6.0 (IDF-7044)
433438
typedef enum {
434439
OK = 0,
435440
FAIL,
436441
PENDING,
437442
BUSY,
438443
CANCEL,
439-
} STATUS;
444+
} STATUS __attribute__((deprecated("Use ETS_STATUS instead")));
445+
#endif
440446

441447
/**
442448
* @}

0 commit comments

Comments
 (0)