[Tinyos-2-commits] CVS: tinyos-2.x/tos/platforms/intelmote2 HilTimerMilliC.nc, 1.2, 1.3 PlatformResetC.nc, 1.2, 1.3 toscrt0.s, 1.4, 1.5 tos.x, 1.2, 1.3
Razvan Musaloiu-E.
razvanm at users.sourceforge.net
Tue Jun 10 17:42:17 PDT 2008
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/pxa27x/gpio HalPXA27xSoftCaptureC.nc, 1.4, 1.5 GeneralIOC.nc, 1.4, 1.5 HalPXA27xGeneralIOM.nc, 1.4, 1.5 HalPXA27xGpioInterrupt.nc, 1.2, 1.3 HalPXA27xSoftCaptureP.nc, 1.4, 1.5 HplPXA27xGPIO.nc, 1.2, 1.3 HplPXA27xGPIOPin.nc, 1.2, 1.3 HplPXA27xGPIOM.nc, 1.4, 1.5 HplPXA27xGPIOC.nc, 1.2, 1.3 HalPXA27xGpioCapture.nc, 1.2, 1.3
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/pxa27x/uart HplPXA27xBTUARTC.nc, 1.4, 1.5 HplPXA27xFFUARTC.nc, 1.4, 1.5 HalPXA27xSerialP.nc, 1.4, 1.5 pxa27x_serial.h, 1.4, 1.5 HalPXA27xSerialCntl.nc, 1.4, 1.5 HalPXA27xSerialPacket.nc, 1.4, 1.5 HplPXA27xSTUARTC.nc, 1.4, 1.5 PXA27X_UARTREG.h, 1.4, 1.5 HplPXA27xUART.nc, 1.4, 1.5 HplPXA27xUARTP.nc, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/platforms/intelmote2
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9551/platforms/intelmote2
Modified Files:
HilTimerMilliC.nc PlatformResetC.nc toscrt0.s tos.x
Log Message:
Convert to Unix-style line terminators.
Index: HilTimerMilliC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/intelmote2/HilTimerMilliC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HilTimerMilliC.nc 12 Jul 2006 17:02:47 -0000 1.2
--- HilTimerMilliC.nc 11 Jun 2008 00:42:14 -0000 1.3
***************
*** 1,63 ****
! /*
! * Copyright (c) 2005 Arch Rock Corporation
! * All rights reserved.
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions are
! * met:
! * Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
! * Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! *
! * Neither the name of the Arch Rock Corporation nor the names of its
! * contributors may be used to endorse or promote products derived from
! * this software without specific prior written permission.
! *
! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
! * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARCHED
! * ROCK OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
! * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
! * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
! * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
! * DAMAGE.
! */
! /**
! * @author Phil Buonadonna
! *
! */
!
! #include "Timer.h"
!
! configuration HilTimerMilliC
! {
! provides interface Init;
! provides interface Timer<TMilli> as TimerMilli[ uint8_t num ];
! }
!
! implementation
! {
! components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI)) as VirtTimersMilli32;
! components new AlarmToTimerC(TMilli) as AlarmToTimerMilli32;
! components new HalPXA27xAlarmM(TMilli,2) as PhysAlarmMilli32;
! components HalPXA27xOSTimerMapC;
!
! enum {OST_CLIENT_ID = unique("PXA27xOSTimer.Resource")};
!
! Init = PhysAlarmMilli32;
!
! TimerMilli = VirtTimersMilli32.Timer;
!
! VirtTimersMilli32.TimerFrom -> AlarmToTimerMilli32.Timer;
!
! AlarmToTimerMilli32.Alarm -> PhysAlarmMilli32.Alarm;
!
! PhysAlarmMilli32.OSTInit -> HalPXA27xOSTimerMapC.Init;
! PhysAlarmMilli32.OSTChnl -> HalPXA27xOSTimerMapC.OSTChnl[OST_CLIENT_ID];
!
! }
--- 1,63 ----
! /*
! * Copyright (c) 2005 Arch Rock Corporation
! * All rights reserved.
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions are
! * met:
! * Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
! * Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! *
! * Neither the name of the Arch Rock Corporation nor the names of its
! * contributors may be used to endorse or promote products derived from
! * this software without specific prior written permission.
! *
! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
! * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARCHED
! * ROCK OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
! * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
! * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
! * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
! * DAMAGE.
! */
! /**
! * @author Phil Buonadonna
! *
! */
!
! #include "Timer.h"
!
! configuration HilTimerMilliC
! {
! provides interface Init;
! provides interface Timer<TMilli> as TimerMilli[ uint8_t num ];
! }
!
! implementation
! {
! components new VirtualizeTimerC(TMilli,uniqueCount(UQ_TIMER_MILLI)) as VirtTimersMilli32;
! components new AlarmToTimerC(TMilli) as AlarmToTimerMilli32;
! components new HalPXA27xAlarmM(TMilli,2) as PhysAlarmMilli32;
! components HalPXA27xOSTimerMapC;
!
! enum {OST_CLIENT_ID = unique("PXA27xOSTimer.Resource")};
!
! Init = PhysAlarmMilli32;
!
! TimerMilli = VirtTimersMilli32.Timer;
!
! VirtTimersMilli32.TimerFrom -> AlarmToTimerMilli32.Timer;
!
! AlarmToTimerMilli32.Alarm -> PhysAlarmMilli32.Alarm;
!
! PhysAlarmMilli32.OSTInit -> HalPXA27xOSTimerMapC.Init;
! PhysAlarmMilli32.OSTChnl -> HalPXA27xOSTimerMapC.OSTChnl[OST_CLIENT_ID];
!
! }
Index: PlatformResetC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/intelmote2/PlatformResetC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PlatformResetC.nc 12 Jul 2006 17:02:47 -0000 1.2
--- PlatformResetC.nc 11 Jun 2008 00:42:14 -0000 1.3
***************
*** 1,42 ****
! /*
! * Copyright (c) 2005 Arch Rock Corporation
! * All rights reserved.
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions are
! * met:
! * Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
! * Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! *
! * Neither the name of the Arch Rock Corporation nor the names of its
! * contributors may be used to endorse or promote products derived from
! * this software without specific prior written permission.
! *
! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
! * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARCHED
! * ROCK OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
! * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
! * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
! * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
! * DAMAGE.
! */
! /**
! * @author Philip Buonadonna
! */
! configuration PlatformResetC {
! provides interface PlatformReset;
! }
!
! implementation {
! components PlatformC;
!
! PlatformReset = PlatformC;
!
! }
--- 1,42 ----
! /*
! * Copyright (c) 2005 Arch Rock Corporation
! * All rights reserved.
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions are
! * met:
! * Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
! * Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! *
! * Neither the name of the Arch Rock Corporation nor the names of its
! * contributors may be used to endorse or promote products derived from
! * this software without specific prior written permission.
! *
! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
! * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARCHED
! * ROCK OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
! * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
! * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
! * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
! * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
! * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
! * DAMAGE.
! */
! /**
! * @author Philip Buonadonna
! */
! configuration PlatformResetC {
! provides interface PlatformReset;
! }
!
! implementation {
! components PlatformC;
!
! PlatformReset = PlatformC;
!
! }
Index: toscrt0.s
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/intelmote2/toscrt0.s,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** toscrt0.s 12 Dec 2006 18:23:42 -0000 1.4
--- toscrt0.s 11 Jun 2008 00:42:14 -0000 1.5
***************
*** 1,264 ****
! /* tab:4
! * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By
! * downloading, copying, installing or using the software you agree to
! * this license. If you do not agree to this license, do not download,
! * install, copy or use the software.
! *
! * Intel Open Source License
! *
! * Copyright (c) 2002 Intel Corporation
! * All rights reserved.
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions are
! * met:
! *
! * Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
! * Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! * Neither the name of the Intel Corporation nor the names of its
! * contributors may be used to endorse or promote products derived from
! * this software without specific prior written permission.
! *
! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
! * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS
! * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
! * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
! * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
! * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
! * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
! * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
! * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! *
! *
! */
! /*
! *
! * Authors: Phil Buonadonna,David Gay
! * Date last modified: $Revision$
! *
! */
!
! .equ ARM_CPSR_MODE_MASK,(0x0000001F)
! .equ ARM_CPSR_INT_MASK,(0x000000C0)
! .equ ARM_CPSR_COND_MASK,(0xF8000000)
!
! .equ ARM_CPSR_MODE_USR,(0x10)
! .equ ARM_CPSR_MODE_FIQ,(0x11)
! .equ ARM_CPSR_MODE_IRQ,(0x12)
! .equ ARM_CPSR_MODE_SVC,(0x13)
! .equ ARM_CPSR_MODE_ABT,(0x17)
! .equ ARM_CPSR_MODE_UND,(0x1B)
! .equ ARM_CPSR_MODE_SYS,(0x1F)
!
! .equ ARM_CPSR_BIT_N,(0x80000000)
! .equ ARM_CPSR_BIT_Z,(0x40000000)
! .equ ARM_CPSR_BIT_C,(0x20000000)
! .equ ARM_CPSR_BIT_V,(0x10000000)
! .equ ARM_CPSR_BIT_Q,(0x08000000)
!
! .equ ARM_CPSR_BIT_I,(0x00000080)
! .equ ARM_CPSR_BIT_F,(0x00000040)
! .equ ARM_CPRS_BIT_T,(0x00000020)
!
! .equ _TOS_STACK_SIZE,(0x400) @ TinyOS Exception stack sizes
! .equ _TOS_ISRAM_PHYSBASE,(0x5C000000) @ Internal SRAM on PXA27X
! .text
!
! .globl start
! start:
! mrs r0, CPSR
! bic r0, r0, #ARM_CPSR_MODE_MASK
! orr r0, r0, #(ARM_CPSR_MODE_SVC | ARM_CPSR_INT_MASK)
! msr cpsr_cf, r0
!
! /* Initialize the stack pointers for all modes */
! mov r0,#_TOS_ISRAM_PHYSBASE
! ldr r2, =(256*1024 - 4) @ and go to the last slot (256K - 4)
! add r2,r2,r0
!
! mov r0, #ARM_CPSR_MODE_ABT
! msr CPSR_c, R0
! mov sp, r2
! sub r2, r2, #_TOS_STACK_SIZE
!
! mov r0, #ARM_CPSR_MODE_UND
! msr CPSR_c, R0
! mov sp, r2
! sub r2, r2, #_TOS_STACK_SIZE
!
! mov r0, #ARM_CPSR_MODE_FIQ
! msr CPSR_c, R0
! mov sp, r2
! sub r2, r2, #_TOS_STACK_SIZE
!
! mov r0, #ARM_CPSR_MODE_IRQ
! msr CPSR_c, R0
! mov sp, r2
! sub r2, r2, #(_TOS_STACK_SIZE * 2)
!
! mov r0, #ARM_CPSR_MODE_SVC
! msr CPSR_c, R0
! mov sp, r2
!
!
! /* copy data */
! ldr r0, =__data_load_start
! ldr r1, =__data_load_end
! ldr r2, =__data_start
! .Lcopy:
! cmp r0, r1
! beq .Lcopydone
! ldrb r3, [r0], #1
! strb r3, [r2], #1
! b .Lcopy
! .Lcopydone:
! /* clear bss */
! ldr r0, =__bss_start__
! ldr r1, =__bss_end__
! mov r2, #0
! .Lclear:
! cmp r0, r1
! beq .Lcleardone
! strb r2, [r0], #1
! b .Lclear
! .Lcleardone:
! mov r0, #0 /* argc? */
! mov r1, #0 /* argv? */
! bl main
!
! .L1:
! nop
! b .L1
!
! @if we receive and interrupt that we don't handle, behavior will depend on whether we're in release or not
! .ifdef RELEASE
! @reboot...assumes that we started out in supervisor mode..and that we'll be returning
! hplarmv_undef:
! movs PC, #0
! hplarmv_swi:
! movs PC, #0
! hplarmv_pabort:
! movs PC, #0
! hplarmv_dabort:
! movs PC, #0
! hplarmv_reserved:
! movs PC, #0
! hplarmv_irq:
! movs PC, #0
! hplarmv_fiq:
! movs PC, #0
! .else
! @infinite loop so that we can detect what happened with a debugger
! @in future, we'll want to blink specific LED patter or something for the USER...or perhaps blue light of death
! hplarmv_undef:
! b hplarmv_undef
! hplarmv_swi:
! b hplarmv_swi
! hplarmv_pabort:
! b hplarmv_pabort
! hplarmv_dabort:
! b hplarmv_dabort
! hplarmv_reserved:
! b hplarmv_reserved
! hplarmv_irq:
! b hplarmv_irq
! hplarmv_fiq:
! b hplarmv_fiq
! .endif
!
! reset_handler_start:
! @ reset handler should first check whether this is a debug exception
! @ or a real RESET event.
! @ NOTE: r13 is only safe register to use.
! @ - For RESET, dont really care about which register is used
! @ - For debug exception, r13=DBG_r13, prevents application registers
! @ - from being corrupted, before debug handler can save.
! mrs r13, cpsr
! and r13, r13, #0x1f
! cmp r13, #0x15 @ are we in DBG mode?
! beq dbg_handler_stub @ if so, go to the dbg handler stub
! mov r13, #0x8000001c @ otherwise, enable debug, set MOE bits
! mcr p14, 0, r13, c10, c0, 0 @ and continue with the reset handler
! @ normal reset handler initialization follows code here,
! @ or branch to the reset handler.
! b start
!
! .align 5 @ align code to a cache line boundary.
! dbg_handler_stub:
! @ First save the state of the IC enable/disable bit in DBG_LR[0].
! mrc p15, 0, r13, c1, c0, 0
! and r13, r13, #0x1000
! orr r14, r14, r13, lsr #12
! @ Next, enable the IC.
! mrc p15, 0, r13, c1, c0, 0
! orr r13, r13, #0x1000
! mcr p15, 0, r13, c1, c0, 0
! @ do a sync operation to ensure all outstanding instr fetches have
! @ completed before continuing. The invalidate cache line function
! @ serves as a synchronization operation, thats why it is used
! @ here. The target line is some scratch address in memory.
! adr r13, line2
! mcr p15, 0, r13, c7, c5, 1
! @ invalidate BTB. make sure downloaded vector table does not hit one of
! @ the applications branches cached in the BTB, branch to the wrong place
! mcr p15, 0, r13, c7, c5, 6
! @ Now, send ready for download message to debugger, indicating debugger
! @ can begin the download. ready for download = 0x00B00000.
! TXloop:
! mrc p14, 0, r15, c14, c0, 0 @ first make sure TX reg. is available
! bvs TXloop
! mov r13, #0x00B00000
! mcr p14, 0, r13, c8, c0, 0 @ now write to TX
! @ Wait for debugger to indicate that the download is complete.
! RXloop:
! mrc p14, 0, r15, c14, c0, 0 @ spin in loop waiting for data from the
! bpl RXloop @ debugger in RX.
! @ before reading the RX register to get the address to branch to, restore
! @ the state of the IC (saved in DBG_r14[0]) to the value it have at the
! @ start of the debug handler stub. Also, note it must be restored before
! @ reading the RX register because of limited scratch registers (r13)
! mrc p15, 0, r13, c1, c0, 0
! @ First, check DBG_LR[0] to see if the IC was enabled or disabled
! tst r14, #0x1
! @ Then, if it was previously disabled, then disable it now, otherwise,
! @ theres no need to change the state, because its already enabled.
! biceq r13, r13, #0x1000
! mcr p15, 0, r13, c1, c0, 0
! @ Restore the link register value
! bic r14, r14, #0x1
! @ Now r13 can be used to read RX and get the target address to branch to.
! mrc p14, 0, r13, c9, c0, 0 @ Read RX and
! mov pc, r13 @ branch to downloaded address.
! @ scratch memory space used by the invalidate IC line function above.
! .align 5 @ make sure it starts at a cache line
! @ boundary, so nothing else is affected
! line2:
! .word 0
! .word 0
! .word 0
! .word 0
! .word 0
! .word 0
! .word 0
! .word 0
!
! .weak hplarmv_undef, hplarmv_swi, hplarmv_pabort, hplarmv_dabort, hplarmv_reserved, hplarmv_irq, hplarmv_fiq
!
! .section .vectors
! b reset_handler_start
! b hplarmv_undef
! b hplarmv_swi
! b hplarmv_pabort
! b hplarmv_dabort
! b hplarmv_reserved
! b hplarmv_irq
! b hplarmv_fiq
!
! .end
!
!
\ No newline at end of file
--- 1,264 ----
! /* tab:4
! * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By
! * downloading, copying, installing or using the software you agree to
! * this license. If you do not agree to this license, do not download,
! * install, copy or use the software.
! *
! * Intel Open Source License
! *
! * Copyright (c) 2002 Intel Corporation
! * All rights reserved.
! * Redistribution and use in source and binary forms, with or without
! * modification, are permitted provided that the following conditions are
! * met:
! *
! * Redistributions of source code must retain the above copyright
! * notice, this list of conditions and the following disclaimer.
! * Redistributions in binary form must reproduce the above copyright
! * notice, this list of conditions and the following disclaimer in the
! * documentation and/or other materials provided with the distribution.
! * Neither the name of the Intel Corporation nor the names of its
! * contributors may be used to endorse or promote products derived from
! * this software without specific prior written permission.
! *
! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
! * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS
! * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
! * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
! * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
! * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
! * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
! * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
! * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! *
! *
! */
! /*
! *
! * Authors: Phil Buonadonna,David Gay
! * Date last modified: $Revision$
! *
! */
!
! .equ ARM_CPSR_MODE_MASK,(0x0000001F)
! .equ ARM_CPSR_INT_MASK,(0x000000C0)
! .equ ARM_CPSR_COND_MASK,(0xF8000000)
!
! .equ ARM_CPSR_MODE_USR,(0x10)
! .equ ARM_CPSR_MODE_FIQ,(0x11)
! .equ ARM_CPSR_MODE_IRQ,(0x12)
! .equ ARM_CPSR_MODE_SVC,(0x13)
! .equ ARM_CPSR_MODE_ABT,(0x17)
! .equ ARM_CPSR_MODE_UND,(0x1B)
! .equ ARM_CPSR_MODE_SYS,(0x1F)
!
! .equ ARM_CPSR_BIT_N,(0x80000000)
! .equ ARM_CPSR_BIT_Z,(0x40000000)
! .equ ARM_CPSR_BIT_C,(0x20000000)
! .equ ARM_CPSR_BIT_V,(0x10000000)
! .equ ARM_CPSR_BIT_Q,(0x08000000)
!
! .equ ARM_CPSR_BIT_I,(0x00000080)
! .equ ARM_CPSR_BIT_F,(0x00000040)
! .equ ARM_CPRS_BIT_T,(0x00000020)
!
! .equ _TOS_STACK_SIZE,(0x400) @ TinyOS Exception stack sizes
! .equ _TOS_ISRAM_PHYSBASE,(0x5C000000) @ Internal SRAM on PXA27X
! .text
!
! .globl start
! start:
! mrs r0, CPSR
! bic r0, r0, #ARM_CPSR_MODE_MASK
! orr r0, r0, #(ARM_CPSR_MODE_SVC | ARM_CPSR_INT_MASK)
! msr cpsr_cf, r0
!
! /* Initialize the stack pointers for all modes */
! mov r0,#_TOS_ISRAM_PHYSBASE
! ldr r2, =(256*1024 - 4) @ and go to the last slot (256K - 4)
! add r2,r2,r0
!
! mov r0, #ARM_CPSR_MODE_ABT
! msr CPSR_c, R0
! mov sp, r2
! sub r2, r2, #_TOS_STACK_SIZE
!
! mov r0, #ARM_CPSR_MODE_UND
! msr CPSR_c, R0
! mov sp, r2
! sub r2, r2, #_TOS_STACK_SIZE
!
! mov r0, #ARM_CPSR_MODE_FIQ
! msr CPSR_c, R0
! mov sp, r2
! sub r2, r2, #_TOS_STACK_SIZE
!
! mov r0, #ARM_CPSR_MODE_IRQ
! msr CPSR_c, R0
! mov sp, r2
! sub r2, r2, #(_TOS_STACK_SIZE * 2)
!
! mov r0, #ARM_CPSR_MODE_SVC
! msr CPSR_c, R0
! mov sp, r2
!
!
! /* copy data */
! ldr r0, =__data_load_start
! ldr r1, =__data_load_end
! ldr r2, =__data_start
! .Lcopy:
! cmp r0, r1
! beq .Lcopydone
! ldrb r3, [r0], #1
! strb r3, [r2], #1
! b .Lcopy
! .Lcopydone:
! /* clear bss */
! ldr r0, =__bss_start__
! ldr r1, =__bss_end__
! mov r2, #0
! .Lclear:
! cmp r0, r1
! beq .Lcleardone
! strb r2, [r0], #1
! b .Lclear
! .Lcleardone:
! mov r0, #0 /* argc? */
! mov r1, #0 /* argv? */
! bl main
!
! .L1:
! nop
! b .L1
!
! @if we receive and interrupt that we don't handle, behavior will depend on whether we're in release or not
! .ifdef RELEASE
! @reboot...assumes that we started out in supervisor mode..and that we'll be returning
! hplarmv_undef:
! movs PC, #0
! hplarmv_swi:
! movs PC, #0
! hplarmv_pabort:
! movs PC, #0
! hplarmv_dabort:
! movs PC, #0
! hplarmv_reserved:
! movs PC, #0
! hplarmv_irq:
! movs PC, #0
! hplarmv_fiq:
! movs PC, #0
! .else
! @infinite loop so that we can detect what happened with a debugger
! @in future, we'll want to blink specific LED patter or something for the USER...or perhaps blue light of death
! hplarmv_undef:
! b hplarmv_undef
! hplarmv_swi:
! b hplarmv_swi
! hplarmv_pabort:
! b hplarmv_pabort
! hplarmv_dabort:
! b hplarmv_dabort
! hplarmv_reserved:
! b hplarmv_reserved
! hplarmv_irq:
! b hplarmv_irq
! hplarmv_fiq:
! b hplarmv_fiq
! .endif
!
! reset_handler_start:
! @ reset handler should first check whether this is a debug exception
! @ or a real RESET event.
! @ NOTE: r13 is only safe register to use.
! @ - For RESET, donÆt really care about which register is used
! @ - For debug exception, r13=DBG_r13, prevents application registers
! @ - from being corrupted, before debug handler can save.
! mrs r13, cpsr
! and r13, r13, #0x1f
! cmp r13, #0x15 @ are we in DBG mode?
! beq dbg_handler_stub @ if so, go to the dbg handler stub
! mov r13, #0x8000001c @ otherwise, enable debug, set MOE bits
! mcr p14, 0, r13, c10, c0, 0 @ and continue with the reset handler
! @ normal reset handler initialization follows code here,
! @ or branch to the reset handler.
! b start
!
! .align 5 @ align code to a cache line boundary.
! dbg_handler_stub:
! @ First save the state of the IC enable/disable bit in DBG_LR[0].
! mrc p15, 0, r13, c1, c0, 0
! and r13, r13, #0x1000
! orr r14, r14, r13, lsr #12
! @ Next, enable the IC.
! mrc p15, 0, r13, c1, c0, 0
! orr r13, r13, #0x1000
! mcr p15, 0, r13, c1, c0, 0
! @ do a sync operation to ensure all outstanding instr fetches have
! @ completed before continuing. The invalidate cache line function
! @ serves as a synchronization operation, thatÆs why it is used
! @ here. The target line is some scratch address in memory.
! adr r13, line2
! mcr p15, 0, r13, c7, c5, 1
! @ invalidate BTB. make sure downloaded vector table does not hit one of
! @ the applicationÆs branches cached in the BTB, branch to the wrong place
! mcr p15, 0, r13, c7, c5, 6
! @ Now, send æready for downloadÆ message to debugger, indicating debugger
! @ can begin the download. æready for downloadÆ = 0x00B00000.
! TXloop:
! mrc p14, 0, r15, c14, c0, 0 @ first make sure TX reg. is available
! bvs TXloop
! mov r13, #0x00B00000
! mcr p14, 0, r13, c8, c0, 0 @ now write to TX
! @ Wait for debugger to indicate that the download is complete.
! RXloop:
! mrc p14, 0, r15, c14, c0, 0 @ spin in loop waiting for data from the
! bpl RXloop @ debugger in RX.
! @ before reading the RX register to get the address to branch to, restore
! @ the state of the IC (saved in DBG_r14[0]) to the value it have at the
! @ start of the debug handler stub. Also, note it must be restored before
! @ reading the RX register because of limited scratch registers (r13)
! mrc p15, 0, r13, c1, c0, 0
! @ First, check DBG_LR[0] to see if the IC was enabled or disabled
! tst r14, #0x1
! @ Then, if it was previously disabled, then disable it now, otherwise,
! @ thereÆs no need to change the state, because its already enabled.
! biceq r13, r13, #0x1000
! mcr p15, 0, r13, c1, c0, 0
! @ Restore the link register value
! bic r14, r14, #0x1
! @ Now r13 can be used to read RX and get the target address to branch to.
! mrc p14, 0, r13, c9, c0, 0 @ Read RX and
! mov pc, r13 @ branch to downloaded address.
! @ scratch memory space used by the invalidate IC line function above.
! .align 5 @ make sure it starts at a cache line
! @ boundary, so nothing else is affected
! line2:
! .word 0
! .word 0
! .word 0
! .word 0
! .word 0
! .word 0
! .word 0
! .word 0
!
! .weak hplarmv_undef, hplarmv_swi, hplarmv_pabort, hplarmv_dabort, hplarmv_reserved, hplarmv_irq, hplarmv_fiq
!
! .section .vectors
! b reset_handler_start
! b hplarmv_undef
! b hplarmv_swi
! b hplarmv_pabort
! b hplarmv_dabort
! b hplarmv_reserved
! b hplarmv_irq
! b hplarmv_fiq
!
! .end
!
!
\ No newline at end of file
Index: tos.x
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/platforms/intelmote2/tos.x,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** tos.x 12 Jul 2006 17:02:48 -0000 1.2
--- tos.x 11 Jun 2008 00:42:14 -0000 1.3
***************
*** 1,85 ****
! OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
! "elf32-littlearm")
! OUTPUT_ARCH(arm)
! MEMORY
! {
! text (rx) : ORIGIN = 0, LENGTH = 64M
! data (rw!x) : ORIGIN = 0x5c000000, LENGTH = 256K
! }
! SECTIONS
! {
! .text :
! {
! *(.vectors)
! *(.text .stub .text.* .gnu.linkonce.t.*)
! *(.rodata.*)
! *(.rodata)
! /* .gnu.warning sections are handled specially by elf32.em. */
! *(.gnu.warning)
! *(.glue_7t) *(.glue_7)
! KEEP (*(.fini))
! } >text
! PROVIDE (__etext = .);
! PROVIDE (_etext = .);
! PROVIDE (etext = .);
! .data : AT (ADDR(.text) + SIZEOF(.text))
! {
! __data_start = . ;
! *(.data .data.* .gnu.linkonce.d.*)
! *(.gnu.linkonce.d*)
! _edata = .;
! PROVIDE (edata = .);
! } > data
! .bss SIZEOF(.data) + ADDR(.data) :
! {
! __bss_start = .;
! __bss_start__ = .;
! *(.dynbss)
! *(.bss .bss.* .gnu.linkonce.b.*)
! *(COMMON)
! _end = .;
! _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
! PROVIDE (end = .);
! } >data
! __data_load_start = LOADADDR(.data);
! __data_load_end = __data_load_start + SIZEOF(.data);
! /* Stabs debugging sections. */
! .stab 0 : { *(.stab) }
! .stabstr 0 : { *(.stabstr) }
! .stab.excl 0 : { *(.stab.excl) }
! .stab.exclstr 0 : { *(.stab.exclstr) }
! .stab.index 0 : { *(.stab.index) }
! .stab.indexstr 0 : { *(.stab.indexstr) }
! .comment 0 : { *(.comment) }
! /* DWARF debug sections.
! Symbols in the DWARF debugging sections are relative to the beginning
! of the section so we begin them at 0. */
! /* DWARF 1 */
! .debug 0 : { *(.debug) }
! .line 0 : { *(.line) }
! /* GNU DWARF 1 extensions */
! .debug_srcinfo 0 : { *(.debug_srcinfo) }
! .debug_sfnames 0 : { *(.debug_sfnames) }
! /* DWARF 1.1 and DWARF 2 */
! .debug_aranges 0 : { *(.debug_aranges) }
! .debug_pubnames 0 : { *(.debug_pubnames) }
! /* DWARF 2 */
! .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
! .debug_abbrev 0 : { *(.debug_abbrev) }
! .debug_line 0 : { *(.debug_line) }
! .debug_frame 0 : { *(.debug_frame) }
! .debug_str 0 : { *(.debug_str) }
! .debug_loc 0 : { *(.debug_loc) }
! .debug_macinfo 0 : { *(.debug_macinfo) }
! /* SGI/MIPS DWARF 2 extensions */
! .debug_weaknames 0 : { *(.debug_weaknames) }
! .debug_funcnames 0 : { *(.debug_funcnames) }
! .debug_typenames 0 : { *(.debug_typenames) }
! .debug_varnames 0 : { *(.debug_varnames) }
! .stack 0x80000 :
! {
! _stack = .;
! *(.stack)
! }
! /DISCARD/ : { *(.note.GNU-stack) }
! }
--- 1,85 ----
! OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
! "elf32-littlearm")
! OUTPUT_ARCH(arm)
! MEMORY
! {
! text (rx) : ORIGIN = 0, LENGTH = 64M
! data (rw!x) : ORIGIN = 0x5c000000, LENGTH = 256K
! }
! SECTIONS
! {
! .text :
! {
! *(.vectors)
! *(.text .stub .text.* .gnu.linkonce.t.*)
! *(.rodata.*)
! *(.rodata)
! /* .gnu.warning sections are handled specially by elf32.em. */
! *(.gnu.warning)
! *(.glue_7t) *(.glue_7)
! KEEP (*(.fini))
! } >text
! PROVIDE (__etext = .);
! PROVIDE (_etext = .);
! PROVIDE (etext = .);
! .data : AT (ADDR(.text) + SIZEOF(.text))
! {
! __data_start = . ;
! *(.data .data.* .gnu.linkonce.d.*)
! *(.gnu.linkonce.d*)
! _edata = .;
! PROVIDE (edata = .);
! } > data
! .bss SIZEOF(.data) + ADDR(.data) :
! {
! __bss_start = .;
! __bss_start__ = .;
! *(.dynbss)
! *(.bss .bss.* .gnu.linkonce.b.*)
! *(COMMON)
! _end = .;
! _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
! PROVIDE (end = .);
! } >data
! __data_load_start = LOADADDR(.data);
! __data_load_end = __data_load_start + SIZEOF(.data);
! /* Stabs debugging sections. */
! .stab 0 : { *(.stab) }
! .stabstr 0 : { *(.stabstr) }
! .stab.excl 0 : { *(.stab.excl) }
! .stab.exclstr 0 : { *(.stab.exclstr) }
! .stab.index 0 : { *(.stab.index) }
! .stab.indexstr 0 : { *(.stab.indexstr) }
! .comment 0 : { *(.comment) }
! /* DWARF debug sections.
! Symbols in the DWARF debugging sections are relative to the beginning
! of the section so we begin them at 0. */
! /* DWARF 1 */
! .debug 0 : { *(.debug) }
! .line 0 : { *(.line) }
! /* GNU DWARF 1 extensions */
! .debug_srcinfo 0 : { *(.debug_srcinfo) }
! .debug_sfnames 0 : { *(.debug_sfnames) }
! /* DWARF 1.1 and DWARF 2 */
! .debug_aranges 0 : { *(.debug_aranges) }
! .debug_pubnames 0 : { *(.debug_pubnames) }
! /* DWARF 2 */
! .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
! .debug_abbrev 0 : { *(.debug_abbrev) }
! .debug_line 0 : { *(.debug_line) }
! .debug_frame 0 : { *(.debug_frame) }
! .debug_str 0 : { *(.debug_str) }
! .debug_loc 0 : { *(.debug_loc) }
! .debug_macinfo 0 : { *(.debug_macinfo) }
! /* SGI/MIPS DWARF 2 extensions */
! .debug_weaknames 0 : { *(.debug_weaknames) }
! .debug_funcnames 0 : { *(.debug_funcnames) }
! .debug_typenames 0 : { *(.debug_typenames) }
! .debug_varnames 0 : { *(.debug_varnames) }
! .stack 0x80000 :
! {
! _stack = .;
! *(.stack)
! }
! /DISCARD/ : { *(.note.GNU-stack) }
! }
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/pxa27x/gpio HalPXA27xSoftCaptureC.nc, 1.4, 1.5 GeneralIOC.nc, 1.4, 1.5 HalPXA27xGeneralIOM.nc, 1.4, 1.5 HalPXA27xGpioInterrupt.nc, 1.2, 1.3 HalPXA27xSoftCaptureP.nc, 1.4, 1.5 HplPXA27xGPIO.nc, 1.2, 1.3 HplPXA27xGPIOPin.nc, 1.2, 1.3 HplPXA27xGPIOM.nc, 1.4, 1.5 HplPXA27xGPIOC.nc, 1.2, 1.3 HalPXA27xGpioCapture.nc, 1.2, 1.3
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/pxa27x/uart HplPXA27xBTUARTC.nc, 1.4, 1.5 HplPXA27xFFUARTC.nc, 1.4, 1.5 HalPXA27xSerialP.nc, 1.4, 1.5 pxa27x_serial.h, 1.4, 1.5 HalPXA27xSerialCntl.nc, 1.4, 1.5 HalPXA27xSerialPacket.nc, 1.4, 1.5 HplPXA27xSTUARTC.nc, 1.4, 1.5 PXA27X_UARTREG.h, 1.4, 1.5 HplPXA27xUART.nc, 1.4, 1.5 HplPXA27xUARTP.nc, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list