forked from Archive/PX4-Autopilot
Partial bring-up of the pcblogic board
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4227 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
e08e421b0b
commit
c31cec6498
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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,11 +401,14 @@
|
|||
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
|
||||
|
||||
|
|
|
@ -118,7 +118,9 @@
|
|||
.global devconfig
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
.global g_intstackbase
|
||||
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
|
||||
.global g_nestlevel
|
||||
#endif
|
||||
#endif
|
||||
.global g_heapbase
|
||||
|
||||
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue