We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm using the gcc toolset, and had hoped to be able use this functionality, however all of the documentation seems to state superseded or suspended.
ARM Information Center
I'm trying to target an STM32F4 processor.
Any pointers to how to do this?
Hi wiesersoftwareltd,
Using the GCC toolset it is probably not a great idea to be looking at the documentation for the ARM Compiler. They are not the same thing. However they do the same thing in this case, somewhat, in that there are intrinsics available to map what looks like a function call in C to a specific code sequence in the generated code. For the ARM Compiler 5, you can see __svc, __svc_indirect and __svc_indirect_r7 which generate different forms of prologue and register movements, and eventually generate an SVC with the immediate value you specify. For reference, this is how the newer (non-superceded) versions of the ARM Compiler do it:
ARM Compiler armcc User Guide : 10.16 __svc
ARM Compiler toolchain Developing Software for ARM Processors: Supervisor calls
For GCC, I believe there is no instrinsic or compiler builtin for SVC (and I couldn't find one today), you would have to use inline assembler. Also note that GCC inline assembler is not the same as ARM inline assembler! But the process is much the same.
Ta,
Matt