From 4614182cbc1fa442bf58be4e8a9e86f3bdf74341 Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Sun, 5 Jan 2014 16:30:52 +0100 Subject: firmware: Removed trampoline and INT patching --- firmware/crt1.S | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'firmware/crt1.S') diff --git a/firmware/crt1.S b/firmware/crt1.S index 29693ac..399e68d 100644 --- a/firmware/crt1.S +++ b/firmware/crt1.S @@ -60,8 +60,8 @@ __bad_interrupt: __vectors: XJMP __init vector __vector_1 - vector __vector_2 - vector __vector_3 +; vector __vector_2 +; vector __vector_3 .endfunc /* Handle unexpected interrupts (enabled and no handler), which @@ -98,10 +98,3 @@ __init: XJMP main ; .endfunc - - .section .zerotable,"ax",@progbits -zerovectors: - XJMP __init - XJMP __vector_1 - XJMP __vector_2 - XJMP __vector_3 -- cgit v1.2.3 From fa2f8ff9c26e68122b9f6c13b5c465a33feeb9c1 Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Sun, 5 Jan 2014 19:36:07 +0100 Subject: firmware: Crt1.s only needs reset vector. --- firmware/crt1.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'firmware/crt1.S') diff --git a/firmware/crt1.S b/firmware/crt1.S index 399e68d..be5aef4 100644 --- a/firmware/crt1.S +++ b/firmware/crt1.S @@ -56,10 +56,11 @@ .global __vectors .global __bad_interrupt .func __vectors + __bad_interrupt: __vectors: XJMP __init - vector __vector_1 +; vector __vector_1 ; vector __vector_2 ; vector __vector_3 .endfunc @@ -95,6 +96,9 @@ __init: out 0x3d, r28 out 0x3e, r29 .section .init9,"ax",@progbits +; rcall main +; XJMP __vectors-2 XJMP main + ; .endfunc -- cgit v1.2.3 From 2f4e15618806534398887eb4697c1fce380177e5 Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Tue, 18 Feb 2014 14:25:22 +0100 Subject: firmware: far jmp support in crt1.s --- firmware/crt1.S | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'firmware/crt1.S') diff --git a/firmware/crt1.S b/firmware/crt1.S index be5aef4..b018ff1 100644 --- a/firmware/crt1.S +++ b/firmware/crt1.S @@ -43,7 +43,12 @@ #include //#include +#ifdef __AVR_HAVE_JMP_CALL__ + #define XJMP jmp +#else #define XJMP rjmp +#endif + #define XCALL rcall .macro vector name -- cgit v1.2.3 From 42f2d8cc38064c67a9478826f563f5110c3848ee Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Mon, 12 Jan 2015 00:46:06 +0100 Subject: #ENABLE_UNSAFE_OPTIMIZATIONS Added new global flag to enable unsafe optimizations: This will disable several safety features in microncleus to save around 40 more bytes Disabled features: * Stack pointer and SREG initialization in CRT * Client side reset vector patching * USB collision detection. Micronucleus will not work reliability with hubs if this is disabled. See t85_aggressive configuration for usage examples. --- firmware/crt1.S | 3 +++ 1 file changed, 3 insertions(+) (limited to 'firmware/crt1.S') diff --git a/firmware/crt1.S b/firmware/crt1.S index b018ff1..1f68351 100644 --- a/firmware/crt1.S +++ b/firmware/crt1.S @@ -95,11 +95,14 @@ __init: .section .init2,"ax",@progbits clr R1 + +#ifndef ENABLE_UNSAFE_OPTIMIZATIONS out 0x3f,r1 ldi r28,lo8(__stack) ldi r29,hi8(__stack) out 0x3d, r28 out 0x3e, r29 +#endif .section .init9,"ax",@progbits ; rcall main ; XJMP __vectors-2 -- cgit v1.2.3