Skip to content

Commit

Permalink
loaders/esp32p4: build with idf master
Browse files Browse the repository at this point in the history
  • Loading branch information
erhankur committed Jun 4, 2024
1 parent d4e3341 commit 6aa7564
Show file tree
Hide file tree
Showing 10 changed files with 1,007 additions and 982 deletions.
1 change: 1 addition & 0 deletions contrib/loaders/flash/espressif/esp32p4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ INCLUDES := -I$(IDF_PATH)/components/soc/esp32p4/include -I$(IDF_PATH)/component
-I$(IDF_PATH)/components/esp_hw_support/port/esp32p4/private_include \
-I$(IDF_PATH)/components/esp_rom/include/esp32p4 \
-I$(IDF_PATH)/components/esp_hw_support/port/esp32p4 \
-I$(IDF_PATH)/components/esp_hw_support/port/esp32p4/include \
-I$(IDF_PATH)/components/spi_flash/include \
-I$(IDF_PATH)/components/esp_rom/esp32p4

Expand Down
5 changes: 4 additions & 1 deletion contrib/loaders/flash/espressif/esp32p4/sdkconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
#ifndef OPENOCD_LOADERS_FLASH_ESPRESSIF_ESP32P4_SDKCONFIG_H
#define OPENOCD_LOADERS_FLASH_ESPRESSIF_ESP32P4_SDKCONFIG_H

#define CONFIG_IDF_TARGET "esp32p4"
#define CONFIG_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_IDF_TARGET_ESP32P4 1
#define CONFIG_FREERTOS_UNICORE 1
#define CONFIG_FREERTOS_UNICORE 0
#define CONFIG_FREERTOS_NUMBER_OF_CORES 2
/* Use ROM flash driver patch */
// #define CONFIG_SPI_FLASH_ROM_DRIVER_PATCH 1

Expand Down Expand Up @@ -35,6 +37,7 @@
#define CONFIG_PARTITION_TABLE_OFFSET 0x8000
#define CONFIG_MMU_PAGE_SIZE 0x10000 /* 64KB */
#define CONFIG_HAL_DEFAULT_ASSERTION_LEVEL 0 /* no assert in the hal functions */
#define CONFIG_LOG_DEFAULT_LEVEL 0

#define CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES 1
#define CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE 0
Expand Down
2 changes: 1 addition & 1 deletion contrib/loaders/flash/espressif/esp32p4/stub.ld
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MEMORY {
/* Place sections by starting from the HP-L2MEM.
ESP32-P4 has unified i/d bus and mapped into below non-cacheable address
0x8FF00000 - code (OpenOCD workarea address)
0x8FF00400 - data
0x8FF04000 - data
*/
iram : org = 0x8FF00000, len = 0x4000
dram : org = 0x8FF04000, len = 0x20000
Expand Down
576 changes: 291 additions & 285 deletions contrib/loaders/flash/espressif/esp32p4/stub_flasher_code.inc

Large diffs are not rendered by default.

948 changes: 479 additions & 469 deletions contrib/loaders/flash/espressif/esp32p4/stub_flasher_code_wlog.inc

Large diffs are not rendered by default.

21 changes: 10 additions & 11 deletions contrib/loaders/flash/espressif/esp32p4/stub_flasher_data.inc
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
/* Autogenerated with ../../../../../src/helper/bin2char.sh */
0x74,0x03,0xf0,0x8f,0x96,0x07,0xf0,0x8f,0x00,0x00,0xf0,0x8f,0xa2,0x09,0xf0,0x8f,
0xb4,0x09,0xf0,0x8f,0x1a,0x00,0xf0,0x8f,0x7e,0x08,0xf0,0x8f,0x32,0x00,0xf0,0x8f,
0x38,0x03,0xf0,0x8f,0x5e,0x07,0xf0,0x8f,0x00,0x00,0xf0,0x8f,0x6a,0x09,0xf0,0x8f,
0x7c,0x09,0xf0,0x8f,0x1a,0x00,0xf0,0x8f,0x46,0x08,0xf0,0x8f,0x32,0x00,0xf0,0x8f,
0x44,0x00,0xf0,0x8f,0x00,0x00,0x00,0x00,0x5c,0x40,0xf0,0x8f,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x86,0x00,0xf0,0x8f,
0x2a,0x01,0xf0,0x8f,0xe2,0x00,0xf0,0x8f,0x2e,0x01,0xf0,0x8f,0x50,0x11,0xf0,0x8f,
0x6c,0x11,0xf0,0x8f,0x58,0x11,0xf0,0x8f,0x60,0x11,0xf0,0x8f,0xbc,0x12,0xf0,0x8f,
0x84,0x11,0xf0,0x8f,0xe4,0x11,0xf0,0x8f,0x58,0x12,0xf0,0x8f,0xbc,0x12,0xf0,0x8f,
0x72,0x11,0xf0,0x8f,0x78,0x11,0xf0,0x8f,0x04,0x12,0xf0,0x8f,0x00,0x00,0x04,0x00,
0x00,0x00,0x08,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x40,0x00,
0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
0x2a,0x01,0xf0,0x8f,0xe2,0x00,0xf0,0x8f,0x2e,0x01,0xf0,0x8f,0xaa,0x11,0xf0,0x8f,
0xc8,0x11,0xf0,0x8f,0xb2,0x11,0xf0,0x8f,0xbc,0x11,0xf0,0x8f,0xe0,0x11,0xf0,0x8f,
0x92,0x11,0xf0,0x8f,0x54,0x11,0xf0,0x8f,0x16,0x13,0xf0,0x8f,0xce,0x11,0xf0,0x8f,
0xd4,0x11,0xf0,0x8f,0x18,0x12,0xf0,0x8f,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,
0x00,0x00,0x10,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x00,
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x10,
0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00,0x00,0x00,
0x01,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x01,
415 changes: 209 additions & 206 deletions contrib/loaders/flash/espressif/esp32p4/stub_flasher_data_wlog.inc

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions contrib/loaders/flash/espressif/esp32p4/stub_flasher_image.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */

#define ESP32P4_STUB_BSS_SIZE 0x0000128UL
#define ESP32P4_STUB_BSS_SIZE 0x0000134UL

#define ESP32P4_STUB_IRAM_ORG 0x08ff00000UL

Expand All @@ -10,9 +10,9 @@

#define ESP32P4_STUB_DRAM_LEN 0x000020000UL

#define ESP32P4_STUB_ENTRY_ADDR 0x08ff0108eUL
#define ESP32P4_STUB_ENTRY_ADDR 0x08ff0103eUL

#define ESP32P4_STUB_APPTRACE_CTRL_ADDR 0x08ff04144UL
#define ESP32P4_STUB_APPTRACE_CTRL_ADDR 0x08ff04140UL

/*#define ESP32P4_STUB_BUILD_IDF_REV 8c9e29898f
/*#define ESP32P4_STUB_BUILD_IDF_REV 7278d06c4f
*/
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */

#define ESP32P4_STUB_WLOG_BSS_SIZE 0x0001130UL
#define ESP32P4_STUB_WLOG_BSS_SIZE 0x000113cUL

#define ESP32P4_STUB_WLOG_LOG_ADDR 0x08ff050f8UL
#define ESP32P4_STUB_WLOG_LOG_ADDR 0x08ff05138UL

#define ESP32P4_STUB_WLOG_LOG_SIZE 4100UL

#define ESP32P4_STUB_WLOG_ENTRY_ADDR 0x08ff01936UL
#define ESP32P4_STUB_WLOG_ENTRY_ADDR 0x08ff0184eUL

#define ESP32P4_STUB_WLOG_APPTRACE_CTRL_ADDR 0x08ff04fe4UL
#define ESP32P4_STUB_WLOG_APPTRACE_CTRL_ADDR 0x08ff05018UL

/*#define ESP32P4_STUB_WLOG_BUILD_IDF_REV 8c9e29898f
/*#define ESP32P4_STUB_WLOG_BUILD_IDF_REV 7278d06c4f
*/
3 changes: 3 additions & 0 deletions contrib/loaders/flash/espressif/riscv/stub_riscv_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ void vPortExitCritical(void)
{
}

#if CONFIG_IDF_TARGET_ESP32P4
#define SPI_MEM_FLASH_RDID SPI1_MEM_C_FLASH_RDID
#endif
uint32_t stub_flash_get_id(void)
{
uint32_t ret;
Expand Down

0 comments on commit 6aa7564

Please sign in to comment.