I attached a ZIP file containing a set of binary images that reproduces the problem.
Secure.elf and NonSecure.elf contain codes that run in the Secure/Non-Secure mode, respectively. They must be loaded simultaneously by using the generic loader:
The problematic instructions are located in 0x10000064 <__gnu_cmse_nonsecure_call> of Secure.elf. The program runs successfully and outputs some message via UART0 if they are replaced with NOPs, as shown below:
$ qemu-system-arm -device loader,file=Secure-patched.elf -kernel NonSecure.elf -machine mps2-an505 -nographic -s -cpu cortex-m33
I'm running in the Non-Secure mode.
I attached a ZIP file containing a set of binary images that reproduces the problem.
Secure.elf and NonSecure.elf contain codes that run in the Secure/Non-Secure mode, respectively. They must be loaded simultaneously by using the generic loader:
$ qemu-system-arm -device loader, file=Secure. elf -kernel NonSecure.elf -machine mps2-an505 -nographic -s -cpu cortex-m33
The problematic instructions are located in 0x10000064 <__gnu_ cmse_nonsecure_ call> of Secure.elf. The program runs successfully and outputs some message via UART0 if they are replaced with NOPs, as shown below:
$ qemu-system-arm -device loader, file=Secure- patched. elf -kernel NonSecure.elf -machine mps2-an505 -nographic -s -cpu cortex-m33
I'm running in the Non-Secure mode.