Execute from RAM
This commit is contained in:
parent
e392f01c65
commit
e2c86a90f4
2
Makefile
2
Makefile
@ -12,7 +12,7 @@ run:
|
||||
-nographic \
|
||||
-kernel runner.elf \
|
||||
-semihosting \
|
||||
-device loader,file=libpqscheme_test.elf,addr=0x00300000
|
||||
-device loader,file=libpqscheme_test.elf,addr=0x20000000
|
||||
# -S -gdb tcp::1234
|
||||
# -monitor unix:/tmp/qemu-monitor,server,nowait
|
||||
|
||||
|
@ -16,7 +16,7 @@ SECTIONS
|
||||
.text : {
|
||||
*(.text)
|
||||
*(.rodata)
|
||||
} > FLASH
|
||||
} > RAM
|
||||
|
||||
.data : {
|
||||
*(.data)
|
||||
|
4
runner.c
4
runner.c
@ -2,7 +2,7 @@
|
||||
#include <platform/printf.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define RAM_START 0x00300000
|
||||
#define RAM_START 0x20000000
|
||||
#define RAM_END RAM_START + 0x00800000
|
||||
#define LIB_MAGIC 0x88DAD0F2
|
||||
|
||||
@ -37,7 +37,7 @@ void execute_library_function() {
|
||||
printf(">> %d\n", test_func());
|
||||
}
|
||||
*/
|
||||
uint32_t entry_point = 0x300044 | 1;
|
||||
uint32_t entry_point = (0x20000000 + 0x44) | 1;
|
||||
func_t test_func = (func_t)entry_point;
|
||||
printf("> Entry point\n", entry_point);
|
||||
int res = test_func();
|
||||
|
Loading…
Reference in New Issue
Block a user