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

Semihosting parameters of FVP

Hello,

I don't understand the concepts of some semihosting paramsters, For example:

1. semihosting-cmd_line:  What is this? When will this command line be execucted, and by what entity?

2. stack and heap related: semihosting-stack_base, semihosting-stack_limit, semihosting-heap_base, semihosting-heap_limit. What do the stack and the heap here refer to? Do  they relate to the firmware stack and heap running on the models in any way? 

It's much appreciated if you can educate me on these concepts, or point me to any resources by which I can learn them by myself.

Thanks

-Oscar

Parents
  • A little more info on Semihosting and FVP (or Fast Models).

    • You can find the Arm Semihosting spec here: https://developer.arm.com/docs/100863/latest.   This applies to physical as well as virtual implementations, its not specific to FVPs.
    • The parameters in  FVPs provide are an implementation of this spec in a models context.
    • Using semihosting requires a combination of setting the parameters and adding the semihosting calls to the software application running on the model.

    Answering your specific questions:

    1. This is a string that can be retrieved by a semihosting call (SYS_GET_CMDLINE) i.e. by firmware running on the model. It will never be executed. It is intended to help simulation the case where a bare metal application was started by the given command line and provides a means for run-time libraries linked into the bare metal application to supply the command line details to the application e.g. via the argc and argv arguments to the applications main(.  

    2. This is very similar to 1. and provides basic memory area allocation details via semihosting call SYS_HEAPINFO so that the runtime code linked to a bare metal application can setup the stack pointer and heap manager for the bare metal application. The standard semihosting docs should provide more information on how these calls should and could be used.

    The introduction in the Semihosting Spec details these - and other - calls.

Reply
  • A little more info on Semihosting and FVP (or Fast Models).

    • You can find the Arm Semihosting spec here: https://developer.arm.com/docs/100863/latest.   This applies to physical as well as virtual implementations, its not specific to FVPs.
    • The parameters in  FVPs provide are an implementation of this spec in a models context.
    • Using semihosting requires a combination of setting the parameters and adding the semihosting calls to the software application running on the model.

    Answering your specific questions:

    1. This is a string that can be retrieved by a semihosting call (SYS_GET_CMDLINE) i.e. by firmware running on the model. It will never be executed. It is intended to help simulation the case where a bare metal application was started by the given command line and provides a means for run-time libraries linked into the bare metal application to supply the command line details to the application e.g. via the argc and argv arguments to the applications main(.  

    2. This is very similar to 1. and provides basic memory area allocation details via semihosting call SYS_HEAPINFO so that the runtime code linked to a bare metal application can setup the stack pointer and heap manager for the bare metal application. The standard semihosting docs should provide more information on how these calls should and could be used.

    The introduction in the Semihosting Spec details these - and other - calls.

Children