Преглед изворни кода

memory_utils: Modify esp_ptr_in_diram_iram to be compatible with esp32c6

wuzhenghui пре 3 година
родитељ
комит
fbc19fad70

+ 5 - 0
components/bootloader_support/include/bootloader_memory_utils.h

@@ -69,7 +69,12 @@ inline static bool esp_ptr_in_diram_dram(const void *p) {
  */
 __attribute__((always_inline))
 inline static bool esp_ptr_in_diram_iram(const void *p) {
+// TODO: IDF-5980 esp32c6 D/I RAM share the same address
+#if SOC_DIRAM_IRAM_LOW == SOC_DIRAM_DRAM_LOW
+    return false;
+#else
     return ((intptr_t)p >= SOC_DIRAM_IRAM_LOW && (intptr_t)p < SOC_DIRAM_IRAM_HIGH);
+#endif
 }
 
 /**

+ 5 - 0
components/esp_hw_support/include/esp_memory_utils.h

@@ -69,7 +69,12 @@ inline static bool esp_ptr_in_diram_dram(const void *p) {
  */
 __attribute__((always_inline))
 inline static bool esp_ptr_in_diram_iram(const void *p) {
+// TODO: IDF-5980 esp32c6 D/I RAM share the same address
+#if SOC_DIRAM_IRAM_LOW == SOC_DIRAM_DRAM_LOW
+    return false;
+#else
     return ((intptr_t)p >= SOC_DIRAM_IRAM_LOW && (intptr_t)p < SOC_DIRAM_IRAM_HIGH);
+#endif
 }
 
 /**