I'm trying to debug a hello-world C project following the tutorial developer.arm.com/.../Tutorial--Hello-World on FVP Cortex-A76. The program can stop at main and can be debugged successfully, however, fail to execute function printf. I debugged the same hello-world project on FVP Cortex-A55 and it works. But on FVP Cortex-A76, the FVP will keep executing the following instruction.
I tried the example code startup_Cortex-A76x1 and found that I may need to startup.S to set up the MMU and cache configuration and specify the entry point as start64 so that the printf function can work. May I ask why this happen on Cortex-A76?
Thanks in advance.
Hi HarperWhat you are seeing is the result of an "exception" occurring in your code. The exception might be caused by a number of different reasons, including:
You'll need to debug your code to find out what is causing the exception. As a starting point, enable the trapping of all exceptions, and enable instruction execution "trace":1) Disconnect the Debugger from the FVP2) Run > Debug Configurations..., select your debug launch config3) Click on "DTSL Options..."4) In Trace Configuration tab, select Fast Models Trace, OK5) In Debug Configurations, click Debug to re-establish the connection. Don't run your code yet.6) Open the Trace view with Window > Show view > Trace7) In the Breakpoints view, select "Manage Signals", then click "Select All" for "Stop" and "Print" headings.8) Now run your code. Code execution should stop in the exception handler. Now look in the Trace view for the last instruction captured. That's where the exception occurred.You'll then need to investigate why the exception occurred there, based on the type of instruction it is, e.g. if it is a load/store instruction, check the address being accessed."Hello World" should work OK using "semihosting" to setup the stack, heap, C run-time etc. But for embedded software that does not use semihosying, you'll need startup code like startup.S. startup.S does much more than just setup the cache and MMU. It also sets up the stack, enables hardware floating point, etc.Hope this helpsStephen
View all questions in Arm Development Studio forum