Raspberry Pi - Simulation - Memory simulation error
Hello,
I am using a trial version of Crossworks for developing some bare metal applications for a raspberry pi. Before doing any hardware testing, I want to run things on the simulator. I am able to simulate a blinker eample without problems.
On trying another piece of code, I see that the program builds and links properly but throws a Memory Simulation Error. The console output is as shown below:
Preparing target for download
Loading target script file Raspberry_Pi_Target.js
Executing script Reset()
Downloading ‘fttest.elf’ to ARM Simulator
Programming 607.2 KB of addresses 00008000 — 0009fd27
Download successful
Verifying ‘fttest.elf’ on ARM Simulator
Verifying 607.2 KB of addresses 00008000 — 0009fd27
Verify successful
Memory simulation error instruction fetching word from 0x000082bc
Any subsequent stepping leads to more such errors. The disassembly shows all memory locations as 0xCDCDCDCD. Can anyone suggest what I might be doing wrong?
Regards,
Fundafix
-
I seem to have found the problem. In the startup file for the pi, there is an instruction which enables the mmu and caches. This instruction was apparently resettingthe memory area.
While further debugging, I have now come across another issue. When the debugger steps into a library function like malloc, the disassembly only shows the assembly code and not the C code it is supposed to refer to. Is there a way to sho the source code in the disassembly section for library function? I can see my source code for e.g.
Thanks again,
Fundafix
Please sign in to leave a comment.
Comments
1 comment