I am using trial version of ARM development studio. I want to use M4 simulator. I am not able to stop at breakpoint cerated for symbol 'main', Also I am getting errors in commands tab as attcahed in image.
Can anybody suggest me what is to be done to resolve this issue?
Hi GB,My name is Stephen and I work at Arm.It looks like the .axf that you are trying to load has been compiled for AArch64 rather than AArch32.C code for Cortex-M4 would normally be compiled with Arm Compiler 6 with, e.g.:armclang --target=arm-arm-none-eabi -mcpu=cortex-m4 ...Please try the ready-made example for Cortex-M4, provided in the Arm DS Examples, named "startup_Cortex-M4_AC6".To import this example into the workspace:
To run the example, follow the instructions in the readme.Hope this helpsStephen
After doing some changes as mentioned in picture, I am able to run in M4 simulator .
Now I want to do runtime calculation of some functions in my code. How to do it ?
Hi again GBIn general, to measure the runtime performance of your code, you can count cycles using the Cortex-M's memory-mapped DWT performance counters such as DWT_CYCCNT, or count instructions as shown in the FVP model's simulated LCD display, or use the SysTick Timer, or use Streamline bare-metal.See also Knowledge Base Article "Measuring the cycle count of the Cortex-M3 and Cortex-M4 processor's own activity" at developer.arm.com/.../latestUnfortunately Cortex-M4 FVP does _not_ model the DWT, but cycle-accurate models are available separately. You can run your program on a cycle-accurate model or real hardware, and read/view the number of cycles executed, either from within your code itself, or from the model's simulated LCD display, or from a connected debugger, for example, the Arm Development Studio Debugger. To measure the cycles per function, you will need to read the cycle count on entry into the function, then read the cycle count again on exit from the function, and calculate the difference. You can do this either under your program control, or from the debugger (e.g. by setting breakpoints on function entry/exit).If you need more information on this, I recommend you raise an official support case from the support menu above.Hope this helps,Stephen