diff options
author | Fabio Utzig <utzig@utzig.org> | 2015-06-07 23:14:20 +0000 |
---|---|---|
committer | Fabio Utzig <utzig@utzig.org> | 2015-06-07 23:14:20 +0000 |
commit | acc78448430bfe98478455d92e52c929b27b57cf (patch) | |
tree | 8f10728ea1530d2bf67b62131e45d45155f3c27d | |
parent | eb6e02036033f1a1ad02eb7a88829f01090c150b (diff) | |
download | ChibiOS-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
-rw-r--r-- | os/nil/ports/AVR/nilcore.h | 2 | ||||
-rw-r--r-- | os/rt/ports/AVR/chcore.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/os/nil/ports/AVR/nilcore.h b/os/nil/ports/AVR/nilcore.h index c8636ebb0..28d06ce1e 100644 --- a/os/nil/ports/AVR/nilcore.h +++ b/os/nil/ports/AVR/nilcore.h @@ -187,7 +187,7 @@ struct port_intctx { (tp)->ctxp->r3 = (int)pf >> 8; \
(tp)->ctxp->r4 = (int)arg; \
(tp)->ctxp->r5 = (int)arg >> 8; \
- (tp)->ctxp->pcx = 0; \
+ (tp)->ctxp->pcx = (int)_port_thread_start >> 16; \
(tp)->ctxp->pcl = (int)_port_thread_start >> 8; \
(tp)->ctxp->pch = (int)_port_thread_start; \
}
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; \
}
|