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

Is it possible to declare "naked" functions with armcc (KEIL)?

Note: This was originally posted on 29th March 2011 at http://forums.arm.com

With GCC I use this kind of functions:

__attribute__((naked))
void tb_flush(char* val1, int val2) {

asm volatile (".thumb_func\n bx lr\n");

}

This allows me to make PC jump to the tb_flush function and leave very quicly without saving/restoring the stack/regs. It is also different from declaring the function as inline, because I need the PC to change to this address (trap with OCD PC breakpoints or monitoring in my verilog testbench)

Does someone know how to do the same thing with armcc ?

Regards,

Sylvain
Parents Reply Children
No data