In RealView 4 I could do the following:
create test.s <- my asm file with an entry point, with the code loaded at 0x1000000
import (upload) a binary at address 0x00000000 with the length of 32k
then i could branch to a location with in that 32k range, let's say to location 0x1000.
the simulator would run just fine. i could step instructions:
ldr r0, _branch_address
bx r0 ;this address would be 0x1000
Now in DS5, I created an asm project, setup the linker to put the code at 0x1000000 and everything runs fine.
BUT: if i load a binary image into 0x00000000 and try to branch into that area, it generates an exception (sort of... it really just locks up and i have to pause the simulator).
I did some experimentation and found that the memory below my application (anything < 0x1000000) is not executable? I can't jump and execute anything in that area.
I'm assuming that the linker is setting the executable range for the simulator based on the linker settings?
I'm using DS5 5.21.1 Build: 5211009
Thanks,
Geno
In RVDS, were you using RVISS (aka ARMULator)? If so, the memory map that RVISS gave you was mostly just RAM. So you had a lot of flexibility in where you ran code from. In particular, there was RAM at the bottom of the address space.
You didn't mention which model in DS-5 you are using. But, the ones in the box are models of real development boards. Therefore the address space is a more realistic mix of flash, ram and peripherals. I suspect you've selected an address which isn't RAM.
You can find the model documentation here:
VE model:
Fixed Virtual Platforms FVP Reference Guide : 3.2.2 VE global model memory map
EB model:
ARM DS-5 EB FVP Reference Guide : 3.1 EB model memory map
I'm using VE_AEMv8x1->Bare Metal Debug->Debug AEMv8-A
Yes - I'm very used to using RVISS, you can just import a binary and jump into it. I didn't have to set anything up...
So switching over to DS5 is fun
I looked at the memory map for SRAM regions and tried to jump to them and the sim is not happy (exception).
I was hoping to not have to setup a bunch of virtual memory regions using the MMU etc.. I just want to simply dump in a binary and jump to it.
Changed the instruction from BLR to BR and it worked. I guess I gotta go back and RTFM!
Thanks for the help on the memory mapping, I now have the code running in SRAM.
g