[riot-commits] [RIOT-OS/RIOT] e7fbaf: cpu: removed NAKED attribute from ISRs

Hauke Petersen mail at haukepetersen.de
Thu Oct 30 20:41:15 CET 2014


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: e7fbaf38158e59d9d2dc532282990ec7d335617d
      https://github.com/RIOT-OS/RIOT/commit/e7fbaf38158e59d9d2dc532282990ec7d335617d
  Author: Hauke Petersen <hauke.petersen at fu-berlin.de>
  Date:   2014-10-30 (Thu, 30 Oct 2014)

  Changed paths:
    M cpu/cc2538/periph/gpio.c
    M cpu/cc2538/periph/timer.c
    M cpu/cc2538/periph/uart.c
    M cpu/cc2538/startup.c
    M cpu/cortex-m0_common/include/cpu.h
    M cpu/cortex-m3_common/include/cpu.h
    M cpu/cortex-m4_common/include/cpu.h
    M cpu/nrf51822/periph/gpio.c
    M cpu/nrf51822/periph/rtt.c
    M cpu/nrf51822/periph/timer.c
    M cpu/sam3x8e/periph/gpio.c
    M cpu/sam3x8e/periph/spi.c
    M cpu/sam3x8e/periph/timer.c
    M cpu/samd21/periph/gpio.c
    M cpu/samd21/periph/timer.c
    M cpu/samd21/periph/uart.c
    M cpu/stm32f0/periph/gpio.c
    M cpu/stm32f0/periph/timer.c
    M cpu/stm32f0/periph/uart.c
    M cpu/stm32f1/periph/gpio.c
    M cpu/stm32f1/periph/rtt.c
    M cpu/stm32f1/periph/timer.c
    M cpu/stm32f1/periph/uart.c
    M cpu/stm32f3/periph/gpio.c
    M cpu/stm32f3/periph/timer.c
    M cpu/stm32f3/periph/uart.c
    M cpu/stm32f4/periph/gpio.c
    M cpu/stm32f4/periph/spi.c
    M cpu/stm32f4/periph/timer.c
    M cpu/stm32f4/periph/uart.c

  Log Message:
  -----------
  cpu: removed NAKED attribute from ISRs

- removed the __attribute__((naked)) from ISRs
- removed ISR_ENTER() and ISR_EXIT() macros

Rationale: Cortex-Mx MCUs save registers R0-R4 automatically
on calling ISRs. The naked attribute tells the compiler not
to save any other registers. This is fine, as long as the
code in the ISR is not nested. If nested, it will use also
R4 and R5, which will then lead to currupted registers on
exit of the ISR. Removing the naked will fix this.


  Commit: d982a18f1a11879451a159c66111b836340644c9
      https://github.com/RIOT-OS/RIOT/commit/d982a18f1a11879451a159c66111b836340644c9
  Author: Hauke Petersen <mail at haukepetersen.de>
  Date:   2014-10-30 (Thu, 30 Oct 2014)

  Changed paths:
    M cpu/cc2538/periph/gpio.c
    M cpu/cc2538/periph/timer.c
    M cpu/cc2538/periph/uart.c
    M cpu/cc2538/startup.c
    M cpu/cortex-m0_common/include/cpu.h
    M cpu/cortex-m3_common/include/cpu.h
    M cpu/cortex-m4_common/include/cpu.h
    M cpu/nrf51822/periph/gpio.c
    M cpu/nrf51822/periph/rtt.c
    M cpu/nrf51822/periph/timer.c
    M cpu/sam3x8e/periph/gpio.c
    M cpu/sam3x8e/periph/spi.c
    M cpu/sam3x8e/periph/timer.c
    M cpu/samd21/periph/gpio.c
    M cpu/samd21/periph/timer.c
    M cpu/samd21/periph/uart.c
    M cpu/stm32f0/periph/gpio.c
    M cpu/stm32f0/periph/timer.c
    M cpu/stm32f0/periph/uart.c
    M cpu/stm32f1/periph/gpio.c
    M cpu/stm32f1/periph/rtt.c
    M cpu/stm32f1/periph/timer.c
    M cpu/stm32f1/periph/uart.c
    M cpu/stm32f3/periph/gpio.c
    M cpu/stm32f3/periph/timer.c
    M cpu/stm32f3/periph/uart.c
    M cpu/stm32f4/periph/gpio.c
    M cpu/stm32f4/periph/spi.c
    M cpu/stm32f4/periph/timer.c
    M cpu/stm32f4/periph/uart.c

  Log Message:
  -----------
  Merge pull request #1824 from haukepetersen/fix_cortex_isrs

cpu: removed NAKED attribute from ISRs


Compare: https://github.com/RIOT-OS/RIOT/compare/3bfbc60a48e5...d982a18f1a11


More information about the commits mailing list