hello I am using ARM7 LPC2148. in the program I have to use recursive function. so there are lots of chances of stack overflow. how to avoid this??
is there any way like using inline assembly in C operating on stack pointer??
No. You can use embedded assembly for that purpose, with serious risks of data corruption unless you know what you are doing:
__asm void not_a_good_idea_rtos_like_operations(void) { // instructions involving SP }
But what do you hope to achieve by this, actually? Better to drop recursion all together, probably.