FreeCalypso > hg > freecalypso-sw
view nuc-fw/sysglue/sysinit.S @ 82:dd13211c9f10
nuc-fw: building XIP code in Thumb as intended
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 17 Aug 2013 19:29:48 +0000 |
parents | 39b1c369b67f |
children | 321f6a9ae989 |
line wrap: on
line source
/* * This assembly module, which puts bits of code into several different * sections, contains those essential entry point etc bits which are common * to both the regular flashable build and the fc-xram development build. */ .section iram.vectors .code 32 /* no useful handlers for the 5 error exceptions yet */ b . b . b . b . b . /* IRQ */ b _INT_IRQ /* no useful FIQ handler yet */ b . .section xip.text .code 32 .globl _FlashorXram_entry _FlashorXram_entry: /* first order of business: copy iram.text to where it's supposed to be */ ldr r8, =__iramtext_flash_addr ldr r9, =__iramtext_ram_addr ldr r10, =__iramtext_size 1: ldmia r8!, {r0-r7} stmia r9!, {r0-r7} subs r10, r10, #0x20 bhi 1b /* now we can call any function w/o worry as to where it lives */ /* clear int.bss and ext.bss, using bzero() from libc */ ldr r0, =__intbss_start ldr r1, =__intbss_size bl bzero ldr r0, =__extbss_start ldr r1, =__extbss_size bl bzero /* we can start Nucleus now! */ b INT_Initialize