Hello,
I am currently in the process of writing a little "OS" for the Teensy 4.1.
I am trying to load ELF files at runtime and execute the code contained in the .text section of the elf.
As far as i can tell (without a debugger) all code is properly loaded.
I removed the NOEXEC flag in the MPU configuration for the FlexSPI RAM.
I set the LSB of the entry address I get when loading the ELF file (basically the memory address i load the .text section into) to 1 so the CPU knows its Thumb code.
I compile the ELF as position independent code for thumb on cortex m7.
When i try to jump to the entry address the Teensy Memory faults.
Is there anything obvious I am missing out?
I will post some as soon I have access to my computer again.
Thank you all.
Best regards
Sebastian
I am currently in the process of writing a little "OS" for the Teensy 4.1.
I am trying to load ELF files at runtime and execute the code contained in the .text section of the elf.
As far as i can tell (without a debugger) all code is properly loaded.
I removed the NOEXEC flag in the MPU configuration for the FlexSPI RAM.
I set the LSB of the entry address I get when loading the ELF file (basically the memory address i load the .text section into) to 1 so the CPU knows its Thumb code.
I compile the ELF as position independent code for thumb on cortex m7.
When i try to jump to the entry address the Teensy Memory faults.
Is there anything obvious I am missing out?
I will post some as soon I have access to my computer again.
Thank you all.
Best regards
Sebastian