diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-26 00:07:49 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-26 00:07:49 +0000 |
commit | afe4f2da2059443d5715958512b9810573745088 (patch) | |
tree | 6c6ac5be2ce234c9258103f7c32167b2959c16ec /nuttx | |
parent | 39c7e133e27067c6129e98fc6a7ef315bf5be418 (diff) | |
download | px4-nuttx-afe4f2da2059443d5715958512b9810573745088.tar.gz px4-nuttx-afe4f2da2059443d5715958512b9810573745088.tar.bz2 px4-nuttx-afe4f2da2059443d5715958512b9810573745088.zip |
Partial bring-up of the pcblogic board
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4227 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rwxr-xr-x | nuttx/arch/mips/src/mips32/up_blocktask.c | 2 | ||||
-rw-r--r-- | nuttx/arch/mips/src/mips32/up_swint0.c | 4 | ||||
-rw-r--r-- | nuttx/arch/mips/src/pic32mx/excptmacros.h | 14 | ||||
-rw-r--r-- | nuttx/arch/mips/src/pic32mx/pic32mx-head.S | 4 | ||||
-rw-r--r-- | nuttx/configs/pcblogic-pic32mx/ostest/defconfig | 4 |
5 files changed, 22 insertions, 6 deletions
diff --git a/nuttx/arch/mips/src/mips32/up_blocktask.c b/nuttx/arch/mips/src/mips32/up_blocktask.c index eb570b7a1..47fd4024b 100755 --- a/nuttx/arch/mips/src/mips32/up_blocktask.c +++ b/nuttx/arch/mips/src/mips32/up_blocktask.c @@ -2,7 +2,7 @@ * arch/mips/src/mips32/up_blocktask.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/arch/mips/src/mips32/up_swint0.c b/nuttx/arch/mips/src/mips32/up_swint0.c index 0e2270caa..6a1042721 100644 --- a/nuttx/arch/mips/src/mips32/up_swint0.c +++ b/nuttx/arch/mips/src/mips32/up_swint0.c @@ -101,7 +101,7 @@ ****************************************************************************/ #ifdef DEBUG_SWINT0 -static void up_registerdump(uint32_t *regs) +static void up_registerdump(const uint32_t *regs) { swidbg("MFLO:%08x MFHI:%08x EPC:%08x STATUS:%08x\n", regs[REG_MFLO], regs[REG_MFHI], regs[REG_EPC], regs[REG_STATUS]); @@ -354,7 +354,7 @@ int up_swint0(int irq, FAR void *context) if (regs != current_regs) { swidbg("SWInt Return: Context switch!\n"); - up_registerdump(current_regs); + up_registerdump((const uint32_t*)current_regs); } else { diff --git a/nuttx/arch/mips/src/pic32mx/excptmacros.h b/nuttx/arch/mips/src/pic32mx/excptmacros.h index 316ead31c..ba214dac9 100644 --- a/nuttx/arch/mips/src/pic32mx/excptmacros.h +++ b/nuttx/arch/mips/src/pic32mx/excptmacros.h @@ -2,7 +2,7 @@ * arch/mips/src/pic32mx/excptmacros.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -57,8 +57,10 @@ #if CONFIG_ARCH_INTERRUPTSTACK > 3 .global g_intstackbase +#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS .global g_nestlevel #endif +#endif /******************************************************************************************** * Assembly Language Macros @@ -377,7 +379,9 @@ ********************************************************************************************/ .macro USE_INTSTACK, tmp1, tmp2, tmp3 + #if CONFIG_ARCH_INTERRUPTSTACK > 3 +#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS /* Check the nesting level. If there are no nested interrupts, then we can * claim the interrupt stack. @@ -387,6 +391,7 @@ lw \tmp2, (\tmp1) bne 1f nop +#endif /* Use the interrupt stack, pushing the user stack pointer onto the interrupt * stack first. @@ -396,12 +401,15 @@ lw \tmp, (\tmp3) sw sp, (\tmp3) move sp, \tmp3 + +#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS 1: /* Increment the interrupt nesting level */ addiu \tmp2, \tmp2, 1 sw \tmp2, 0(\tmp1) #endif +#endif .endm /******************************************************************************************** @@ -422,7 +430,9 @@ ********************************************************************************************/ .macro RESTORE_STACK, tmp1, tmp2 + #if CONFIG_ARCH_INTERRUPTSTACK > 3 +#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS /* Decrement the nesting level */ @@ -430,6 +440,8 @@ lw \tmp2, (\tmp1) addiu \tmp2, \tmp2, -1 sw \tmp2, 0(\tmp1) + +#endif #endif .endm diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-head.S b/nuttx/arch/mips/src/pic32mx/pic32mx-head.S index d4613e7de..025e24bd0 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-head.S +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-head.S @@ -118,8 +118,10 @@ .global devconfig #if CONFIG_ARCH_INTERRUPTSTACK > 3 .global g_intstackbase +#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS .global g_nestlevel #endif +#endif .global g_heapbase /* Imported symbols */ @@ -644,11 +646,13 @@ g_intstackbase: * available to nested exceptions. */ +#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS .sbss .type g_nestlevel, object g_nestlevel: .skip 4 #endif +#endif /* This global variable is unsigned int g_heapbase and is exported here only * because of its coupling to idle thread stack. diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig index 785c61d88..100b9f158 100644 --- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig +++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig @@ -2,7 +2,7 @@ # configs/pcblogic-pic32mx/ostest/defconfig # # Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt <spudmonkey@racsa.co.cr> +# Author: Gregory Nutt <gnutt@nuttx.orgr> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -174,7 +174,7 @@ CONFIG_PIC32MX_IOPORTG=y # can be enabled later by software). # CONFIG_PIC32MX_DEBUGGER=2 -CONFIG_PIC32MX_ICESEL=0 +CONFIG_PIC32MX_ICESEL=1 # # PIC32MX specific serial device driver settings |