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
Some more info, in addition to Rob.1. The string given to semihosting.cmd_line will be parsed as white-space separated words, and each word will be given to the main() function as argc[0], argc[1], so on. For example, -C *.semihosting.cmd_line="foo bar baz" int main(int argc, char *argv[]) { if (argc > 3) printf("%s, %s, %s", argv[0], argv[1], argv[2]); // will display "foo, bar, baz" Some linux build can read the kernel line from semihosting.cmd_line (see an example at releases.linaro.org/.../).2. There are a couple of ways to set up stack and heap (see developer.arm.com/.../stack-pointer-initialization-and-heap-bounds). SYS_HEAPINFO, called by the default implementation of a legacy function __user_initial_stackheap given in the library module sys_stackheap.o, will get stack/heap from the values of semihosting-(stack|heap)-(base|limit). If __user_initial_stackheap is not used (recommendation) or __user_initial_stackheap is overriden without using SYS_HEAPINFO, semihosting-(stack|heap)-(base|limit) will not be used.