• Gcc naked attribute leaves some trailing function prologue asm instructions

      I've the following implementation for a svc exception handler on a cortex-m0:

        int  __attribute__((naked))  
        sv_call_handler(uint32_t n, uint32_t arg1, uint32_t arg2, uint32_t arg3,  
                        uint32_t arg4, uint32_t arg5)
         {
              irq_off();


    When I built it for cortex…

  • How much stack memory do I need for my Arm Cortex-M applications?

    Overview of stack size requirement estimations in Cortex-M based applications

    1 - Overview

    “How much stack memory do I need for this application?” - This is a common question for many software developers working on applications that run on microcontroller…