This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

The anatomy of an SVC call into a Softdevice.

It is stated that the advantage of a Softdevice is that because it is a precompiled binary file it can be used without requiring any particular compiler or linker features.  This seems to be an attractive and promising approach. However, I am having trouble find the details that allow me to capitalise on this feature.

In particular, I cannot find anything that describes the specific requirements of an svc call.

At the assembler level there will be an

svc #nn

instruction where I presume, but I am not certain, that the nn corresponds to a specific Softdevice api call.  Other data also needs to be passed to the softdevice but, apart from obscure compiler specific macros, I cannot find anything which describes how this should be done.

Where is the documentation that described the low lever requirements of an SVC call?

Parents
  • Is this about using the SoftDevice API, or just for your own knowledge on how such an architecture is implemented?

    If this is just about use, check out the Nordic examples.

    If this is about knowledge, remember that all C functions are just pointers. This line, for example, compiles fine:
    ((bool (*)(int))0x1234)(56);
    It says to execute whatever code is at address 0x1234 on the machine, passing 56 as an int and getting a bool return.

Reply
  • Is this about using the SoftDevice API, or just for your own knowledge on how such an architecture is implemented?

    If this is just about use, check out the Nordic examples.

    If this is about knowledge, remember that all C functions are just pointers. This line, for example, compiles fine:
    ((bool (*)(int))0x1234)(56);
    It says to execute whatever code is at address 0x1234 on the machine, passing 56 as an int and getting a bool return.

Children
Related