From 92512728591918ca066facaf0514307dd14a65f5 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Krause Date: Thu, 16 Jun 2016 21:01:38 +0200 Subject: [PATCH] Make atomthreads link with SDCC --- ports/stm8/atomport-asm-sdcc.s | 5 ++++- ports/stm8/sdcc.mak | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ports/stm8/atomport-asm-sdcc.s b/ports/stm8/atomport-asm-sdcc.s index 0fb199e..f9ac162 100644 --- a/ports/stm8/atomport-asm-sdcc.s +++ b/ports/stm8/atomport-asm-sdcc.s @@ -21,7 +21,10 @@ _archContextSwitch:: ; restore context ldw x, (5, sp) - jra restore + ldw x, (x) + ldw sp, x + + ret ; void archFirstThreadRestore (ATOM_TCB *new_tcb_ptr) _archFirstThreadRestore:: diff --git a/ports/stm8/sdcc.mak b/ports/stm8/sdcc.mak index 390c6d3..e70b32f 100644 --- a/ports/stm8/sdcc.mak +++ b/ports/stm8/sdcc.mak @@ -44,8 +44,8 @@ vpath %.hex .\$(BUILD_DIR) # Compiler/Assembler flags CFLAGS= -mstm8 -c -D $(PART) --opt-code-size --max-allocs-per-node 3000 DBG_CFLAGS= -mstm8 -c -D $(PART) --opt-code-size --max-allocs-per-node 3000 -ASMFLAGS= -off -DBG_ASMFLAGS= -off +ASMFLAGS= -loff +DBG_ASMFLAGS= -loff LINKFLAGS= -mstm8 DBG_LINKFLAGS= -mstm8