7 Replies Latest reply on Jan 7, 2017 12:39 PM by user_78878863

    PSOC 4 - ARM GCC 4.9 not pushing all ISR's working registers




      I was wondering why my "ARM GCC 4.9-2015-q1-update" does not push all ISR's working registers onto the stack.


      This obviously causes any kind of random behavior and painstaking debug. I have not seen this behavior before on any other compiler. Below a code snipped of one of my ISRs (r2 and r3 are not pushed onto the stack, but used in the ISR; they are of course also used in the main program).


      0x00000CA0 <PWM_Drive_ISR>:
       287: * Return: 
       288: *  void
       289: *
       290: *******************************************************************************/
       291: CY_ISR(PWM_Drive_ISR)
       292: {   
      0x00000CA0 push    {r4, r7, lr}
      0x00000CA2 sub    sp, #c
      0x00000CA4 add    r7, sp, #0
       293:     uint16 curTimeStamep = 0;  
      0x00000CA6 adds    r3, r7, #6
      0x00000CA8 movs    r2, #0
      0x00000CAA strh    r2, [r3, #0]
       294:     uint16 curPeriod = 0;
      0x00000CAC adds    r3, r7, #4
      0x00000CAE movs    r2, #0
      0x00000CB0 strh    r2, [r3, #0]


      What am I missing here? I cannot believe this is a bug, but have no other explanation. Is there any other version of GCC that is available for update in PSOC Creator 4.0 (