summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bootloader/SOURCES1
-rw-r--r--bootloader/imx233.c5
-rw-r--r--firmware/export/config.h2
-rw-r--r--firmware/target/arm/imx233/boot.lds51
-rw-r--r--firmware/target/arm/imx233/crt0.S37
5 files changed, 59 insertions, 37 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES
index 9448515a58..9fd532b55d 100644
--- a/bootloader/SOURCES
+++ b/bootloader/SOURCES
@@ -57,7 +57,6 @@ sansa_as3525.c
57show_logo.c 57show_logo.c
58#elif CONFIG_CPU==IMX233 58#elif CONFIG_CPU==IMX233
59imx233.c 59imx233.c
60show_logo.c
61#elif defined(LYRE_PROTO1) 60#elif defined(LYRE_PROTO1)
62lyre_proto1.c 61lyre_proto1.c
63show_logo.c 62show_logo.c
diff --git a/bootloader/imx233.c b/bootloader/imx233.c
index 523c902bb6..66de9cd0db 100644
--- a/bootloader/imx233.c
+++ b/bootloader/imx233.c
@@ -39,8 +39,6 @@
39 39
40#include "usb.h" 40#include "usb.h"
41 41
42int show_logo(void);
43
44void main(void) NORETURN_ATTR; 42void main(void) NORETURN_ATTR;
45void main(void) 43void main(void)
46{ 44{
@@ -55,7 +53,8 @@ void main(void)
55 enable_irq(); 53 enable_irq();
56 54
57 lcd_init(); 55 lcd_init();
58 show_logo(); 56 lcd_clear_display();
57 lcd_update();
59 58
60 backlight_init(); 59 backlight_init();
61 60
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 70047ff866..37acec04e1 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -781,7 +781,7 @@ Lyre prototype 1 */
781 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) \ 781 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) \
782 || defined(CPU_S5L870X) || (CONFIG_CPU == S3C2440) \ 782 || defined(CPU_S5L870X) || (CONFIG_CPU == S3C2440) \
783 || defined(APPLICATION) || (CONFIG_CPU == PP5002) \ 783 || defined(APPLICATION) || (CONFIG_CPU == PP5002) \
784 || (CONFIG_CPU == RK27XX) 784 || (CONFIG_CPU == RK27XX) || (CONFIG_CPU == IMX233)
785#define HAVE_SEMAPHORE_OBJECTS 785#define HAVE_SEMAPHORE_OBJECTS
786#endif 786#endif
787 787
diff --git a/firmware/target/arm/imx233/boot.lds b/firmware/target/arm/imx233/boot.lds
index 39e570a03e..cb925b055e 100644
--- a/firmware/target/arm/imx233/boot.lds
+++ b/firmware/target/arm/imx233/boot.lds
@@ -14,32 +14,6 @@ MEMORY
14 14
15SECTIONS 15SECTIONS
16{ 16{
17 .vectors 0 :
18 {
19 *(.vectors);
20 . = ALIGN(0x4);
21 } > IRAM
22
23 .itext :
24 {
25 *(.icode)
26 *(.init.text)
27 . = ALIGN(0x4);
28 } > IRAM
29
30 .idata :
31 {
32 *(.qharray)
33 *(.idata)
34 *(.irodata)
35 . = ALIGN(0x4);
36 } > IRAM
37
38 .ibss :
39 {
40 *(.ibss)
41 } > IRAM
42
43 .text : 17 .text :
44 { 18 {
45 *(.text*) 19 *(.text*)
@@ -52,13 +26,34 @@ SECTIONS
52 _dataend = . ; 26 _dataend = . ;
53 } > DRAM 27 } > DRAM
54 28
29 .iram :
30 {
31 _iramstart = .; // always 0
32 *(.vectors)
33 KEEP(*(.vectors));// otherwise there are no reference to it and the linker strip it
34 *(.icode)
35 *(.irodata)
36 *(.idata)
37 . = ALIGN(0x4);
38 _iramend = .;
39 } > IRAM AT> DRAM
40
41 _iramcopy = LOADADDR(.iram);
42
43 .ibss (NOLOAD) :
44 {
45 _iedata = .;
46 *(.qharray)
47 *(.ibss)
48 . = ALIGN(0x4);
49 _iend = .;
50 } > IRAM
51
55 .stack (NOLOAD) : 52 .stack (NOLOAD) :
56 { 53 {
57 *(.stack) 54 *(.stack)
58 _stackbegin = .;
59 stackbegin = .; 55 stackbegin = .;
60 . += 0x2000; 56 . += 0x2000;
61 _stackend = .;
62 stackend = .; 57 stackend = .;
63 } > DRAM 58 } > DRAM
64 59
diff --git a/firmware/target/arm/imx233/crt0.S b/firmware/target/arm/imx233/crt0.S
index 836c3e88cb..e233d439e0 100644
--- a/firmware/target/arm/imx233/crt0.S
+++ b/firmware/target/arm/imx233/crt0.S
@@ -23,10 +23,8 @@
23 23
24.section .vectors,"ax",%progbits 24.section .vectors,"ax",%progbits
25.code 32 25.code 32
26.global start
27start:
28 /* most handlers are in DRAM which is too far away for a relative jump */ 26 /* most handlers are in DRAM which is too far away for a relative jump */
29 ldr pc, =newstart 27 ldr pc, =start
30 ldr pc, =undef_instr_handler 28 ldr pc, =undef_instr_handler
31 ldr pc, =software_int_handler 29 ldr pc, =software_int_handler
32 ldr pc, =prefetch_abort_handler 30 ldr pc, =prefetch_abort_handler
@@ -36,8 +34,39 @@ start:
36 ldr pc, =fiq_handler 34 ldr pc, =fiq_handler
37 35
38.text 36.text
39newstart: 37.global start
38start:
40 msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */ 39 msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
40 /* Zero out IBSS */
41 ldr r2, =_iedata
42 ldr r3, =_iend
43 mov r4, #0
441:
45 cmp r3, r2
46 strhi r4, [r2], #4
47 bhi 1b
48
49 /* Copy the IRAM */
50 /* must be done before bss is zeroed */
51 ldr r2, =_iramcopy
52 ldr r3, =_iramstart
53 ldr r4, =_iramend
541:
55 cmp r4, r3
56 ldrhi r5, [r2], #4
57 strhi r5, [r3], #4
58 bhi 1b
59
60 /* Initialise bss section to zero */
61 ldr r2, =_edata
62 ldr r3, =_end
63 mov r4, #0
641:
65 cmp r3, r2
66 strhi r4, [r2], #4
67 bhi 1b
68
69
41 /* Set up some stack and munge it with 0xdeadbeef */ 70 /* Set up some stack and munge it with 0xdeadbeef */
42 ldr sp, =stackend 71 ldr sp, =stackend
43 ldr r2, =stackbegin 72 ldr r2, =stackbegin