aboutsummaryrefslogtreecommitdiffstats
path: root/demos/AVR-AT90CANx-GCC/chcore2.S
diff options
context:
space:
mode:
Diffstat (limited to 'demos/AVR-AT90CANx-GCC/chcore2.S')
-rw-r--r--demos/AVR-AT90CANx-GCC/chcore2.S9
1 files changed, 8 insertions, 1 deletions
diff --git a/demos/AVR-AT90CANx-GCC/chcore2.S b/demos/AVR-AT90CANx-GCC/chcore2.S
index d438ffb4f..3564de521 100644
--- a/demos/AVR-AT90CANx-GCC/chcore2.S
+++ b/demos/AVR-AT90CANx-GCC/chcore2.S
@@ -19,6 +19,14 @@
#include <avr/io.h>
+.global threadstart
+threadstart:
+ sei
+ movw r24, r4 // argument
+ movw r30, r2 // thread function
+ icall
+ call chThdExit
+
.global chSysSwitchI
chSysSwitchI:
push r2
@@ -113,4 +121,3 @@ noschd:
pop r1
pop r0
reti
-