Hi,
I am trying to port some Keyword spotting code that I found from: https://github.com/ARM-software/ML-KWS-for-MCU to Arm DS and have it run on an Arm M33 FVP. Although the code builds successfully without any errors, at some point I am getting the following error within a for loop :
Failed to read 4 bytes from address 0xEFFFFE6E
Failed to read 2 bytes from address 0xEFFFFFFE
I don't understand why the compiled code is trying to access memory at these addresses. I am using the default scatter file and the RAM address range is from 0x20000000 to 0x20020000.
What could I be missing?
Dear Stephen,
Thank you for your prompt reply. I went through the code step by step as you suggested and indeed the crash happens at a store instruction. It seems that the code attempts to store a register value to address 0x3F5E6BFF although this exceeds the limits of memory with RW rights. How could I check if this issue is caused by unaligned data access?
Hi again FanisAn example of an unaligned data access is trying to load/store a word (4 bytes) e.g. LDR/STR to an address that is not a modulo of 4, or to load/store a half-word (2 bytes) e.g. LDRB/STRB to an address that is not a modulo of 2. You don't say exactly what the instruction is in your case, but if it is an STR or STRH to 0x3F5E6BFF, then that would be an unaligned access.
However, the address 0x3F5E6BFF itself looks very wrong in your M-class system, as it is outside the RAM address range of 0x20000000 to 0x20020000. I suggest you debug the code to find out where that address is coming from.Stephen