Search found 2 matches

by SyntaxVortex
Sat Jan 25, 2025 11:18 am
Forum: ESP-IDF
Topic: Issues loading code from RAM on ESP32-P4, but not on ESP32-C3
Replies: 2
Views: 581

Re: Issues loading code from RAM on ESP32-P4, but not on ESP32-C3

You're absolutely right. I had already tried flushing the cache with esp_cache_msync, but I was using the wrong direction. This did the trick: esp_cache_msync(code, 0x40, ESP_CACHE_MSYNC_FLAG_DIR_C2M | ESP_CACHE_MSYNC_FLAG_TYPE_DATA); esp_cache_msync(code, 0x40, ESP_CACHE_MSYNC_FLAG_DIR_M2C | ESP_CA...
by SyntaxVortex
Fri Jan 24, 2025 6:53 pm
Forum: ESP-IDF
Topic: Issues loading code from RAM on ESP32-P4, but not on ESP32-C3
Replies: 2
Views: 581

Issues loading code from RAM on ESP32-P4, but not on ESP32-C3

Hi! for my project I have to be able to load code from an SD card into RAM and execute it. Here is the code that I use to test this: void app_main(void) { heap_caps_print_heap_info(MALLOC_CAP_EXEC); uint32_t* code = heap_caps_aligned_alloc(0x40, 0x40, MALLOC_CAP_32BIT|MALLOC_CAP_EXEC); printf("%p\n"...