diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-02-09 00:11:22 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-02-09 00:11:22 +0000 |
commit | 10c4657704464e36e966873ba091c47ba7ae6db2 (patch) | |
tree | 57987934471725fd776a5ee43ba254cfa2ce58b9 /nuttx/arch/sh/src/m16c/m16c_head.S | |
parent | 6957b39cd8d76efefad682933430074023842c96 (diff) | |
download | px4-nuttx-10c4657704464e36e966873ba091c47ba7ae6db2.tar.gz px4-nuttx-10c4657704464e36e966873ba091c47ba7ae6db2.tar.bz2 px4-nuttx-10c4657704464e36e966873ba091c47ba7ae6db2.zip |
Adding M16C support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1486 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sh/src/m16c/m16c_head.S')
-rw-r--r-- | nuttx/arch/sh/src/m16c/m16c_head.S | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/nuttx/arch/sh/src/m16c/m16c_head.S b/nuttx/arch/sh/src/m16c/m16c_head.S index 753f98c20..944493911 100644 --- a/nuttx/arch/sh/src/m16c/m16c_head.S +++ b/nuttx/arch/sh/src/m16c/m16c_head.S @@ -91,12 +91,13 @@ * 0x00400 - DATA Size: Determined by linker * BSS Size: Determined by linker * Idle stack Size: CONFIG_IDLETHREAD_STACKSIZE - * Interrupt stack Size: CONFIG_M16C_ISTACKSIZE + * Interrupt stack Size: CONFIG_ARCH_INTERRUPTSTACK * Heap Size: Everything remaining * 0x00bff - (end+1) */ .data +#if 0 .globl _g_stackbase .type _g_stackbase, object _g_stackbase: @@ -107,16 +108,13 @@ _g_stackbase: .globl _g_istackbase .type _g_istackbase, object _g_istackbase: - .word _enbss+CONFIG_IDLETHREAD_STACKSIZE-4 + .word _enbss+CONFIG_IDLETHREAD_STACKSIZE .size _g_istackbase, .-_g_istackbase - - - * The heap extends from _g_heapbase to the end of RAM. - */ +#endif .globl _g_heapbase .type _g_heapbase, object _g_heapbase: - .word _enbss+CONFIG_IDLETHREAD_STACKSIZE+CONFIG_M16C_ISTACKSIZE + .word _enbss+CONFIG_IDLETHREAD_STACKSIZE+CONFIG_ARCH_INTERRUPTSTACK .size _g_heapbase, .-_g_heapbase /************************************************************************************ @@ -346,9 +344,13 @@ _g_heapbase: .type __start, #function __start: -/* Set the istack pointer */ +/* Set the interrupt and user stack pointers */ - ldc #_enbss, isp /* Set idle thread stack pointer to the end of BSS */ + mov.w #_enbss, R0 + ldc R0, usp /* Set the user stack pointer */ + add.w #CONFIG_IDLETHREAD_STACKSIZE, R0 + ldc R0, isp /* Set interrupt thread stack pointer to the end of BSS */ + fset U /* Set bit 7 (U) to select the user stack pointer */ /* Set BCLK speed. At reset, the processor clock (BLCK) defaults to a divisor of 8. * This sets clock to F1 (divide by 1) on XIN: BCLK = XIN frequency. |