diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-01 12:25:30 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-03-01 12:25:30 +0000 |
commit | 4eea7ac2025293de8e8ad88ac331c3cc5d0003db (patch) | |
tree | cb1fa4c29bd48aa76808662c42d84936d10d8de3 /firmware | |
parent | bf2946ab7a9dd90d4b8ba60dc63a80b286060ff8 (diff) |
iRiver: Moved the main thread stack to IRAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6088 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/app.lds | 20 | ||||
-rw-r--r-- | firmware/crt0.S | 6 |
2 files changed, 17 insertions, 9 deletions
diff --git a/firmware/app.lds b/firmware/app.lds index 2e70eb957d..daed49a628 100644 --- a/firmware/app.lds +++ b/firmware/app.lds @@ -182,23 +182,31 @@ SECTIONS _iramend = .; } > IRAM +#ifdef IRIVER_H100 + .stack : + { + *(.stack) + stackbegin = .; + . += 0x8000; + stackend = .; + } > IRAM +#else /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section size smaller, and allow the stack to grow into the .iram copy */ .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): { *(.stack) _stackbegin = . - SIZEOF(.iram); - stackbegin = . - SIZEOF(.iram); -#if MEMORYSIZE >= 32 - . += 0x8000 - SIZEOF(.iram); -#else . += 0x2000 - SIZEOF(.iram); -#endif _stackend = .; - stackend = .; } > DRAM +#endif +#ifdef IRIVER_H100 + .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): +#else .bss : +#endif { _edata = .; *(.bss) diff --git a/firmware/crt0.S b/firmware/crt0.S index 8928890eeb..9622493683 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S @@ -282,8 +282,8 @@ irq_handler: .dataloopend: /* Munge the main stack */ - lea _stackbegin,%a2 - lea _stackend,%a4 + lea stackbegin,%a2 + lea stackend,%a4 move.l #0xdeadbeef,%d0 .mungeloop: cmp.l %a2,%a4 @@ -299,7 +299,7 @@ irq_handler: .section .resetvectors vectors: - .long _stackend + .long stackend .long start #else /* Platform: Archos Jukebox |