This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Program gets stuck in _start (crt0) on Morello hardware on Angel command dissassembled to HLT #0xf000 at EL2

I'm running a baremetal EL2 program downloaded from Development Studio(DS) to the Morello hardware (which already has a branch-to-self loop running compiled as BL33 in the fip). I've modified the initialisation scripts to run at EL2 as per https://community.arm.com/support-forums/f/morello-forum/52923/baremetal-tfa-payload-built-for-capability-mode-still-in-pstate-a64-on-el2-entry and have a single c file with my main function. This works fine on the FVP when downloaded via DS, but when I download to the hardware and step through the code from entry it seems to stop after the first few instructions of crt0 on the HLT #0xF000 instruction which I believe is part of the Angel debug - AngelSVCAsm AngelSVC.

On the FVP this instruction populates the memory with the heap and stack addresses.

So this explains why when I by-passed HLT #0xF000 by moving on the program counter,  it falls over on the first use of the stack. It looks like there is no stack address value stored in memory, the code that reads the value reads in zero and hence causes a problem later.

What do I need to do differently to make it work on the hardware? as apposed to FVP?, is there a build setting I need to include?

Many thanks