From 01f5133aa09148a90154597a202a0592bd1f98a3 Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Sat, 7 Dec 2013 17:52:17 +0100 Subject: init stackpoint --- firmware/crt1.S | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/firmware/crt1.S b/firmware/crt1.S index bb7b8e0..29693ac 100644 --- a/firmware/crt1.S +++ b/firmware/crt1.S @@ -35,11 +35,13 @@ #if (__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 3) #error "GCC version >= 3.3 required" #endif + /* #include IOSYMFILE - #include "macros.inc" */ +#include +//#include #define XJMP rjmp #define XCALL rcall @@ -75,7 +77,7 @@ __vectors: __init: .weak __stack - + .set __stack, RAMEND /* By default, malloc() uses the current value of the stack pointer minus __malloc_margin as the highest available address. @@ -88,7 +90,10 @@ __init: .section .init2,"ax",@progbits clr R1 out 0x3f,r1 - + ldi r28,lo8(__stack) + ldi r29,hi8(__stack) + out 0x3d, r28 + out 0x3e, r29 .section .init9,"ax",@progbits XJMP main ; .endfunc -- cgit v1.2.3