The function is marked as naked here which should address this. Just to double check that this declaration is seen by the compiler, can you please add the following line just before the function definition:
I did not write this code - it is part of the ARM_CM0 port. I don’t think I should have to modify the SDK to get it to compile. Instead I turned off some of the more detailed compiler checking options and now that works.
But now I am stuck at link time where it can not find vPortValid, vPortEnterCritical, vPortExitCritical, and pxPortInitializeStack, all referenced inside port.c. I can’t even find where these are defined. I just find ‘extern’ references.
This is one of those warnings which is hard to suppress because different compilers (this builds with GCC and LLVM), and versions of those compilers, will generate different warnings. You can just put a “return 0” at the end of the function, outside the __asm{} block if you don’t mind some compiler versions warning the code is unreachable.