aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/ports
diff options
context:
space:
mode:
authorFabio Utzig <utzig@utzig.org>2015-06-07 23:14:20 +0000
committerFabio Utzig <utzig@utzig.org>2015-06-07 23:14:20 +0000
commitacc78448430bfe98478455d92e52c929b27b57cf (patch)
tree8f10728ea1530d2bf67b62131e45d45155f3c27d /os/rt/ports
parenteb6e02036033f1a1ad02eb7a88829f01090c150b (diff)
downloadChibiOS-acc78448430bfe98478455d92e52c929b27b57cf.tar.gz
ChibiOS-acc78448430bfe98478455d92e52c929b27b57cf.tar.bz2
ChibiOS-acc78448430bfe98478455d92e52c929b27b57cf.zip
[AVR] Save _port_thread_start MSb
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8012 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/ports')
-rw-r--r--os/rt/ports/AVR/chcore.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/rt/ports/AVR/chcore.h b/os/rt/ports/AVR/chcore.h
index b119f0635..c9ba077d2 100644
--- a/os/rt/ports/AVR/chcore.h
+++ b/os/rt/ports/AVR/chcore.h
@@ -164,7 +164,7 @@ struct context {
tp->p_ctx.sp->r3 = (int)pf >> 8; \
tp->p_ctx.sp->r4 = (int)arg; \
tp->p_ctx.sp->r5 = (int)arg >> 8; \
- tp->p_ctx.sp->pcx = 0; \
+ tp->p_ctx.sp->pcx = (int)_port_thread_start >> 16; \
tp->p_ctx.sp->pcl = (int)_port_thread_start >> 8; \
tp->p_ctx.sp->pch = (int)_port_thread_start; \
}