From 9a4a06bf477c0238f0c2fa3d30d374812f992141 Mon Sep 17 00:00:00 2001 From: Dimitry Kloper Date: Tue, 29 Dec 2015 18:35:36 +0200 Subject: [PATCH] AVR: Explicitly disable interrupts as the first step of system init Disabling interrupts at the very beginning of system init does not make sense after reset since interrupts are disabled anyway. But it is very convenient for debugging purposes, in situations when the system misbehaves and ocassionally jumps to zero. --- arch/avr/src/atmega/atmega_head.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/avr/src/atmega/atmega_head.S b/arch/avr/src/atmega/atmega_head.S index e2bf17c918..2fd55b8859 100755 --- a/arch/avr/src/atmega/atmega_head.S +++ b/arch/avr/src/atmega/atmega_head.S @@ -368,6 +368,9 @@ vectortab: .func __start __start: + /* no interrupts! Useful for software reset by jumping to address 0 */ + cli + /* Clear the zero register, clear the status register and initialize the * IDLE thread stack */