Skip to content

Commit bcf04e3

Browse files
committed
resolve comments, to squash
1 parent dfb0662 commit bcf04e3

File tree

16 files changed

+82
-83
lines changed

16 files changed

+82
-83
lines changed

components/bootloader/subproject/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ set(LD_DEFAULT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/main/ld/${IDF_TARGET}")
7070
idf_build_set_property(BOOTLOADER_LINKER_SCRIPT "${LD_DEFAULT_PATH}/bootloader.rom.ld" APPEND)
7171
project(bootloader)
7272
if(CONFIG_ESP32P4_REV_MIN_200)
73-
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.eco5.ld")
73+
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.rev2.ld")
7474
else()
7575
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.ld")
7676
endif()

components/bootloader/subproject/main/ld/esp32p4/bootloader.eco5.ld renamed to components/bootloader/subproject/main/ld/esp32p4/bootloader.rev2.ld

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -287,38 +287,38 @@ SECTIONS
287287
/**
288288
* Appendix: Memory Usage of ROM bootloader
289289
*
290-
* 0x4ff296b8 ------------------> _dram0_0_start
291-
* | |
292-
* | |
293-
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
294-
* | |
295-
* | |
296-
* 0x4ff3afc0 ------------------> __stack_sentry
297-
* | |
298-
* | | 2. Startup pro cpu stack (freed when IDF app is running)
299-
* | |
300-
* 0x4ff3cfc0 ------------------> __stack (pro cpu)
301-
* | |
302-
* | | Startup app cpu stack
303-
* | |
304-
* 0x4ff3efc0 ------------------> __stack_app (app cpu)
305-
* | |
306-
* | |
307-
* | | 3. Shared memory only used in startup code or nonos/early boot*
308-
* | | (can be freed when IDF runs)
309-
* | |
310-
* | |
311-
* 0x4ff3fba4 ------------------> _dram0_rtos_reserved_start
312-
* | |
313-
* | |
314-
* | | 4. Shared memory used in startup code and when IDF runs
315-
* | |
316-
* | |
317-
* 0x4ff3ff94 ------------------> _dram0_rtos_reserved_end
318-
* | |
319-
* 0x4ff3ffc8 ------------------> _data_start_interface
320-
* | |
321-
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
322-
* | |
323-
* 0x4ff40000 ------------------> _data_end_interface
290+
* 0x4ffa96b8 ------------------> _dram0_0_start
291+
* | |
292+
* | |
293+
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
294+
* | |
295+
* | |
296+
* 0x4ffbafc0 ------------------> __stack_sentry
297+
* | |
298+
* | | 2. Startup pro cpu stack (freed when IDF app is running)
299+
* | |
300+
* 0x4ffbcfc0 ------------------> __stack (pro cpu)
301+
* | |
302+
* | | Startup app cpu stack
303+
* | |
304+
* 0x4ffbefc0 ------------------> __stack_app (app cpu)
305+
* | |
306+
* | |
307+
* | | 3. Shared memory only used in startup code or nonos/early boot*
308+
* | | (can be freed when IDF runs)
309+
* | |
310+
* | |
311+
* 0x4ffbfbb0 ------------------> _dram0_rtos_reserved_start
312+
* | |
313+
* | |
314+
* | | 4. Shared memory used in startup code and when IDF runs
315+
* | |
316+
* | |
317+
* 0x4ffbffa4 ------------------> _dram0_rtos_reserved_end
318+
* | |
319+
* 0x4ffbffc8 ------------------> _data_start_interface
320+
* | |
321+
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
322+
* | |
323+
* 0x4ffc0000 ------------------> _data_end_interface
324324
*/

components/bootloader_support/src/esp_image_format.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ static esp_err_t verify_image_header(uint32_t src_addr, const esp_image_header_t
387387
}
388388

389389
#ifdef BOOTLOADER_BUILD
390-
#if CONFIG_ESP32P4_REV_MIN_200 // TODO: IDF-13410
391-
#define ROM_STACK_START (SOC_ROM_STACK_START_ECO5)
390+
#if CONFIG_IDF_TARGET_ESP32P4 && !CONFIG_ESP32P4_SELECTS_REV_LESS_V2
391+
#define ROM_STACK_START (SOC_ROM_STACK_START_REV2)
392392
#else
393393
#define ROM_STACK_START (SOC_ROM_STACK_START)
394394
#endif

components/esp_hw_support/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ menu "Hardware Settings"
264264
config ESP_BRINGUP_BYPASS_CPU_CLK_SETTING
265265
bool
266266
default y if !SOC_CLK_TREE_SUPPORTED
267-
default y if ESP32P4_REV_MIN_200
267+
default y if ESP32P4_REV_MIN_200 # TODO: IDF-13574
268268
default n
269269
help
270270
This option is only used for new chip bringup, when
@@ -274,7 +274,7 @@ menu "Hardware Settings"
274274
config ESP_BRINGUP_BYPASS_RANDOM_SETTING
275275
bool
276276
default y if !SOC_RNG_SUPPORTED
277-
default y if ESP32P4_REV_MIN_200
277+
default y if ESP32P4_REV_MIN_200 # TODO: IDF-13574
278278
default n
279279
help
280280
This option is only used for new chip bringup, when

components/esp_hw_support/port/esp32p4/Kconfig.hw_support

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
config ESP32P4_REV_LESS_V2_SUPPORT
2-
bool "Support ESP32-P4 revisions <2.0"
1+
comment "NOTE! Support of ESP32-P4 rev. <2.0 and >=2.0 is mutually exclusive"
2+
comment "Read the help text of the option below for explanation"
3+
4+
config ESP32P4_SELECTS_REV_LESS_V2
5+
bool "Select ESP32-P4 revisions <2.0 (No >=2.x Support)"
36
default y
47
help
5-
Enable this option to support ESP32-P4 revisions 0.x and 1.x.
8+
Select this option to support ESP32-P4 revisions 0.x and 1.x.
69
Revision 2.0 and revisions less than 2.0 have huge hardware difference.
7-
8-
comment "NOTE! Support of ESP32-P4 rev. <2.0 and >=2.0 is mutually exclusive"
9-
comment "Read the help text of the option below for explanation"
10+
Revisions higher than 2.0 (included) is not compatible with 0.x and 1.x.
1011

1112
choice ESP32P4_REV_MIN
1213
prompt "Minimum Supported ESP32-P4 Revision"
@@ -20,14 +21,17 @@ choice ESP32P4_REV_MIN
2021
this will also help to reduce binary size.
2122

2223
config ESP32P4_REV_MIN_0
24+
depends on ESP32P4_SELECTS_REV_LESS_V2
2325
bool "Rev v0.0"
2426
config ESP32P4_REV_MIN_1
27+
depends on ESP32P4_SELECTS_REV_LESS_V2
2528
bool "Rev v0.1"
2629
config ESP32P4_REV_MIN_100
30+
depends on ESP32P4_SELECTS_REV_LESS_V2
2731
bool "Rev v1.0"
2832
config ESP32P4_REV_MIN_200
2933
bool "Rev v2.0"
30-
depends on !ESP32P4_REV_LESS_V2_SUPPORT
34+
depends on !ESP32P4_SELECTS_REV_LESS_V2
3135
select ESPTOOLPY_NO_STUB if (IDF_ENV_FPGA || IDF_ENV_BRINGUP)
3236
endchoice
3337

@@ -36,7 +40,7 @@ config ESP32P4_REV_MIN_FULL
3640
default 0 if ESP32P4_REV_MIN_0
3741
default 1 if ESP32P4_REV_MIN_1
3842
default 100 if ESP32P4_REV_MIN_100
39-
default 0 if ESP32P4_REV_MIN_200 # To be updated to 200 when chip efuse is burnt
43+
default 0 if ESP32P4_REV_MIN_200 # TODO: IDF-13410. To be updated to 200 when chip efuse is burnt
4044

4145
config ESP_REV_MIN_FULL
4246
int
@@ -54,7 +58,7 @@ config ESP_REV_MIN_FULL
5458

5559
config ESP32P4_REV_MAX_FULL
5660
int
57-
default 299
61+
default 199 #TODO: IDF-13574
5862
# keep in sync the "Maximum Supported Revision" description with this value
5963

6064
config ESP_REV_MAX_FULL

components/esp_system/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@ if(NOT BOOTLOADER_BUILD)
151151
endif()
152152
endif()
153153

154-
# Since P4 ECO5, the SRAM is contiguous
155-
# TODO: IDF-13410. Update to (CONFIG_ESP32P4_REV_MIN_FULL GREATER_EQUAL 200) when chip efuse is correct.
156-
if(CONFIG_SOC_MEM_NON_CONTIGUOUS_SRAM OR (CONFIG_IDF_TARGET_ESP32P4 AND NOT CONFIG_ESP32P4_REV_MIN_200))
154+
# For P4, since P4 REV2, the SRAM is contiguous
155+
if(CONFIG_ESP32P4_SELECTS_REV_LESS_V2)
157156
target_link_options(${COMPONENT_LIB} INTERFACE "-Wl,--enable-non-contiguous-regions")
158157
endif()
159158

components/esp_system/fpga_overrides_clk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ void esp_rtc_init(void)
5656
{
5757
#if SOC_PMU_SUPPORTED
5858
#if CONFIG_ESP32P4_REV_MIN_200
59+
//TODO: IDF-13453
5960
ESP_EARLY_LOGW(TAG, "pmu_init not supported\n");
6061
#else
6162
pmu_init();

components/esp_system/ld/esp32p4/memory.ld.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ MEMORY
7171
* Shared data RAM, excluding memory reserved for ROM bss/data/stack.
7272
* Enabling Bluetooth & Trace Memory features in menuconfig will decrease the amount of RAM available.
7373
*/
74-
#if CONFIG_ESP32P4_REV_MIN_200 // TODO: IDF-13410
75-
sram_seg (RWX) : org = SRAM_START, len = SRAM_SIZE
76-
#else
74+
#if CONFIG_ESP32P4_SELECTS_REV_LESS_V2
7775
sram_low (RWX) : org = SRAM_LOW_START, len = SRAM_LOW_SIZE
7876
sram_high (RW) : org = SRAM_HIGH_START, len = SRAM_HIGH_SIZE
77+
#else
78+
sram_seg (RWX) : org = SRAM_START, len = SRAM_SIZE
7979
#endif
8080

8181
#if CONFIG_APP_BUILD_USE_FLASH_SECTIONS

components/esp_system/ld/ld.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ target_linker_script(${COMPONENT_LIB} INTERFACE "${ld_out_path}")
4949

5050
# Generate sections.ld.in and pass it through linker script generator
5151
if(CONFIG_ESP32P4_REV_MIN_200) # TODO: IDF-13410
52-
preprocess_linker_file("sections.eco5.ld.in" "sections.ld.in" ld_out_path)
52+
preprocess_linker_file("sections.rev2.ld.in" "sections.ld.in" ld_out_path)
5353
else()
5454
preprocess_linker_file("sections.ld.in" "sections.ld.in" ld_out_path)
5555
endif()

0 commit comments

Comments
 (0)