mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
esp32s3/elf: Fix ELF loader on ESP32-S3 when using external PSRAM
Prior to this commit, it wasn't possible to load ELF modules from the external PSRAM. There were two main issues about it: 1) copying data using the instruction bus was being used instead of the data bus (this, per si, isn't a problem, but requires special attention regarding data alignment), and 2) the cache was not being properly cleaned and flushed to properly access the loaded data using the instruction bus. Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
60ca804b56
commit
d250808c1c
@@ -32,6 +32,7 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/cache.h>
|
||||
#include <nuttx/elf.h>
|
||||
#include <nuttx/lib/elf.h>
|
||||
|
||||
@@ -194,7 +194,7 @@ int up_relocateadd(const Elf32_Rela *rel, const Elf32_Sym *sym,
|
||||
break;
|
||||
|
||||
case R_XTENSA_32:
|
||||
(*(uint32_t *)addr) += value;
|
||||
(*(uint32_t *)(up_textheap_data_address((void *)addr))) += value;
|
||||
break;
|
||||
|
||||
case R_XTENSA_ASM_EXPAND:
|
||||
|
||||
Reference in New Issue
Block a user