I am very new to ARM and programming and am taking infantile steps to learn them.
On a windows 10 platform I have downloaded and installed the 30day ARM Dev Studio 2019.0 coding environment together with the FVP (cortex -53Ax1) for emulation.
At this very early stage I am using the default armlink.exe linker.
My aim is to just learn AARCH64 assembly with absolutely no C at all. I have a test code to check registers, memory etc... which is listed below:
_start:mov X0, #2
Since I am using the default linker I don't know if the sections/directives etc... in the code above matter. It's a very simple piece of code which should just update register X0 to the immediate value 2. However when I check the register X0 it always shows as 0x0000000000000000. If I am correct it must read 0x0000000000000010
Can someone please advise of the correct steps if i am missing out on anything.
My guess is that you have not specified the entry point as _start to the linker (you can do this in Project Properties -> C/C++ Build -> Settings Linker -> Image layout), and so the debugger does not know where to execute from... as a result it is likely not actually executing your mov instruction. Do you see any errors in the Commands pane (or in the Console as you build?).
I attach a trivial example project that works correctly, setting the x0 register to 2 as expected.
You can use File -> Import to bring this into your environment.
Hope this gets you started!
Hi Ronan, thank you so very much for your quick response. Your advise was spot on!. I had some problems importing your file into the environment so changed a few things in my project to reflect your advise. I was then able to successfully simulate the code.
Many thanks again,