Fix demand-paging compilation errors

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2879 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2010-08-22 03:44:18 +00:00
parent 6c291c05a2
commit c530bd319a
23 changed files with 1292 additions and 34 deletions
+6 -2
View File
@@ -1881,11 +1881,11 @@ nuttx-5.9 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
* examples/uip/main.c - if DHCPC is selected, this example now shows
the assigned IP address.
* arch/arm/src/lm3s and arch/arm/include/lm3s - Definitions for the
TI LM3S9B96 contributed by Tiago Maluta.
TI LM3S9B96 contributed by Tiago Maluta.
* arch/arm/src/lm3s/lm3s_gioirq.c - Fix a logic error in the address
table lookup.
* arch/arm/src/lm3s/lm3s_gioirq.c - Also needs to enable the global
GPIO interrupts.
GPIO interrupts.
* arch/arm/src/lm3s/lm3s_internal.h and lm3s_gpio.c - Fixed the encoding
of GPIO port number that limited support for GPIO ports to 8
* sched/pg_*.c and *.c and include/nuttx/page.h - Implemented the
@@ -1893,6 +1893,10 @@ nuttx-5.9 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
http://www.nuttx.org/NuttXDemandPaging.html for details.
* drivers/usbdev/usbdev_serial.c - Correct compilation errors that
occur if CONFIG_USBDEV_DUALSPEED is selected.
* configs/ea3131/pgnsh - Add an NSH configuration with on-demand paging
enabled. This is not expected to be a functionality configuration (at
least not yet); it was created in order to debug the on-demand paging
feature.
pascal-2.1 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
+13 -1
View File
@@ -1,7 +1,8 @@
NuttX TODO List (Last updated August 12, 2010)
NuttX TODO List (Last updated August 21, 2010)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(5) Task/Scheduler (sched/)
(1) On-demand paging (sched/)
(2) Memory Managment (mm/)
(1) Signals (sched/, arch/)
(1) pthreads (sched/)
@@ -64,6 +65,17 @@ o Task/Scheduler (sched/)
Priority: Medium, required for standard compliance (but makes the
code bigger)
o On-demand paging (sched/)
^^^^^^^^^^^^^^^^^^^^^^^^^
Description: On-demand paging has recently been incorporated into the RTOS.
The design of this feature is described here:
http://www.nuttx.org/NuttXDemandPaging.html.
As of this writing, the feature is incomplete and untested.
It should not be enabled!
Status: Open, in work
Priority: Medium-Low
o Memory Managment (mm/)
^^^^^^^^^^^^^^^^^^^^^^
+1 -1
View File
@@ -429,7 +429,7 @@
* non-mappings
*/
sub \npages, \npages, PTE_NPAGES
sub \npages, \npages, #PTE_NPAGES
2:
/* Check if all of the pages have been written. If not, then
* loop and write the next L1 entry.
+4 -2
View File
@@ -50,7 +50,9 @@
#ifdef CONFIG_PAGING
#include <nuttx/page.h>
#include "pg_macros.h"
#include "up_internal.h"
/****************************************************************************
* Pre-processor Definitions
@@ -177,7 +179,7 @@ int up_allocpage(FAR _TCB *tcb, FAR void **vpage)
*/
pgndx = g_pgndx++;
if (p_pgndx >= CONFIG_PAGING)
if (g_pgndx >= CONFIG_PAGING)
{
g_pgndx = 0;
g_pgwrap = true;
@@ -199,7 +201,7 @@ int up_allocpage(FAR _TCB *tcb, FAR void **vpage)
/* Invalidate the instruction TLB corresponding to the virtual address */
tlb_inst_invalidate_single(oldvaddr)
tlb_inst_invalidate_single(oldvaddr);
}
/* Then convert the index to a (physical) page address. */
+1 -1
View File
@@ -100,7 +100,7 @@
bool up_checkmapping(FAR _TCB *tcb)
{
uintptr_t vaddr;
uint32_t *te;
uint32_t *pte;
/* Since interrupts are disabled, we don't need to anything special. */
+1 -1
View File
@@ -133,7 +133,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
* (It has not yet been saved in the register context save area).
*/
if (far < PG_PAGEDBASE || far >= PG_PAGEDEND)
if (far < PG_PAGED_VBASE || far >= PG_PAGED_VEND)
{
goto segfault;
}
+3 -3
View File
@@ -400,7 +400,7 @@ __start:
str r0, [r4, r3, lsr #18] /* Undo identity mapping */
#if defined(CONFIG_PAGING)
/* Populate the L1 table for the data regions */
/* Populate the L1 table for the data region */
adr r0, .Ldataspan
ldmia r0, {r0, r1, r2, r3}
@@ -510,13 +510,13 @@ __start:
.Ldataspan:
.long PG_L1_DATA_VADDR /* Virtual address in the L1 table */
.long PG_L2_DATA_PADDR /* Physical address of the L2 page table */
.long PG_DATA_NPAGED /* Number of pages in the data region */
.long PG_DATA_NPAGES /* Number of pages in the data region */
.long MMU_L1_DATAFLAGS /* L1 MMU flags to use */
.Ldatamap:
.long PG_L2_DATA_VADDR /* Virtual address of L2 table */
.long PG_DATA_VBASE /* Virtual address of data memory */
.long PG_DATA_NPAGED /* Number of pages in the data region */
.long PG_DATA_NPAGES /* Number of pages in the data region */
.long MMU_L2_DATAFLAGS /* L2 MMU flags to use */
#endif
+1 -1
View File
@@ -105,7 +105,7 @@ void up_prefetchabort(uint32_t *regs)
* virtual addresses.
*/
if (regs[REG_R15] >= PG_PAGEDBASE && regs[REG_R15] < PG_PAGEDEND)
if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND)
{
/* Save the offending PC as the fault address in the TCB of the currently
* executing task. This value is, of course, already known in regs[REG_R15],
+3 -2
View File
@@ -46,6 +46,7 @@
#include <nuttx/sched.h>
#include <nuttx/page.h>
#include "chip.h"
#include "pg_macros.h"
#include "up_internal.h"
@@ -88,7 +89,7 @@
*
****************************************************************************/
uint32_t *up_va2pte(uintptr_t vaddr);
uint32_t *up_va2pte(uintptr_t vaddr)
{
uint32_t L1;
uint32_t *L2;
@@ -110,7 +111,7 @@ uint32_t *up_va2pte(uintptr_t vaddr);
* 256 x 4Kb or 1024 x 1Kb pages.
*/
ndx = ((vaddr & 0x000fffff) >> PAGESHIFT;
ndx = (vaddr & 0x000fffff) >> PAGESHIFT;
/* Return true if this virtual address is mapped. */
+1 -1
View File
@@ -47,7 +47,7 @@ CMN_CSRCS = up_assert.c up_blocktask.c up_copystate.c up_createstack.c \
up_undefinedinsn.c up_usestack.c
ifeq ($(CONFIG_PAGING),y)
CMN_CSRCS += up_pginitialize.c up_checkmapping.c up_allocpage.c up_va1pte.c
CMN_CSRCS += up_pginitialize.c up_checkmapping.c up_allocpage.c up_va2pte.c
endif
CGU_ASRCS =
+8 -2
View File
@@ -51,6 +51,11 @@
#include "lpc313x_cgudrvr.h"
#include "lpc313x_internal.h"
#ifdef CONFIG_PAGING
# include <nuttx/page.h>
# include "pg_macros.h"
#endif
/************************************************************************************
* Private Types
************************************************************************************/
@@ -201,14 +206,15 @@ static void up_setupmappings(void)
************************************************************************************/
#if !defined(CONFIG_ARCH_ROMPGTABLE) && defined(CONFIG_ARCH_LOWVECTORS) && defined(CONFIG_PAGING)
static void up_vectorpermissions(uint32 mmuflags)
static void up_vectorpermissions(uint32_t mmuflags)
{
uint32_t *ptr = (uint3t*)PG_L2_VECT_VADDR;
uint32_t *ptr = (uint32_t*)PG_L2_VECT_VADDR;
uint32_t pte;
/* This is easily because we have already been told everything! */
pte = *ptr;
#ifdef CONFIG_PAGING_VECPPAGE
/* We've been told to use a specify page for the vectors. In this
* case, I expect the pte to be zero the first time this function is
+3 -3
View File
@@ -79,7 +79,7 @@
/* 0x60001000-0x6fffffff: Reserved */
#define LPC313X_NAND_PSECTION 0x70000000 /* 0x70000000-0x700007ff: NANDFLASH Ctrl 2Kb */
/* 0x70000800-0xffffffff: Reserved */
#ifdef CONDFIG_LPC313X_EXTNAND /* End of the physical address space */
#ifdef CONFIG_LPC313X_EXTNAND /* End of the physical address space */
# define LPC313X_LAST_PSECTION (LPC313X_NAND_PSECTION + (1 << 20))
#else
# define LPC313X_LAST_PSECTION (LPC313X_INTC_PSECTION + (1 << 20))
@@ -211,7 +211,7 @@
*/
#ifndef CONFIG_ARCH_ROMPGTABLE
# defined LPC313X_FIRST_VSECTION 0x00000000 /* Beginning of the virtual address space */
# define LPC313X_FIRST_VSECTION 0x00000000 /* Beginning of the virtual address space */
# define LPC313X_SHADOWSPACE_VSECTION 0x00000000 /* 0x00000000-0x00000fff: Shadow Area 4Kb */
# define LPC313X_INTSRAM_VSECTION 0x11028000 /* Internal SRAM 96Kb-192Kb */
# define LPC313X_INTSRAM0_VADDR 0x11028000 /* 0x11028000-0x1103ffff: Internal SRAM 0 96Kb */
@@ -233,7 +233,7 @@
# define LPC313X_INTC_VSECTION 0x60000000 /* 0x60000000-0x60000fff: Interrupt controller 4Kb */
# define LPC313X_NAND_VSECTION 0x70000000 /* 0x70000000-0x700007ff: NANDFLASH Ctrl 2Kb */
#
# ifdef CONDFIG_LPC313X_EXTNAND /* End of the virtual address space */
# ifdef CONFIG_LPC313X_EXTNAND /* End of the virtual address space */
# define LPC313X_LAST_VSECTION (LPC313X_NAND_VSECTION + (1 << 20))
# else
# define LPC313X_LAST_VSECTION (LPC313X_INTC_VSECTION + (1 << 20))
+7
View File
@@ -400,6 +400,13 @@ Where <subdir> is one of the following:
examples/ostest. By default, this project assumes that you are
using the DFU bootloader.
pgnsh:
This is the same configuration as nsh, but with On-Demand
paging enabled. See http://www.nuttx.org/NuttXDemandPaging.html.
This configuration is an experiment for the purposes of test
and debug. At present, this does not produce functioning,
usable system
usbserial:
This configuration directory exercises the USB serial class
driver at examples/usbserial. See examples/README.txt for
+1 -1
View File
@@ -2,7 +2,7 @@
* configs/ea3131/include/board_memorymap.h
* include/arch/board/board_memorymap.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
+164
View File
@@ -0,0 +1,164 @@
############################################################################
# configs/ea3131/pgnsh/Make.defs
#
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. 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.
# 3. Neither the name NuttX 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
# COPYRIGHT OWNER OR 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.
#
############################################################################
include ${TOPDIR}/.config
# Setup for the selected toolchain
ifeq ($(CONFIG_LPC313X_CODESOURCERYW),y)
# CodeSourcery under Windows
CROSSDEV = arm-none-eabi-
WINTOOL = y
MAXOPTIMIZATION = -O2
endif
ifeq ($(CONFIG_LPC313X_CODESOURCERYL),y)
# CodeSourcery under Linux
CROSSDEV = arm-none-eabi-
MAXOPTIMIZATION = -O2
endif
ifeq ($(CONFIG_LPC313X_DEVKITARM),y)
# devkitARM under Windows
CROSSDEV = arm-eabi-
WINTOOL = y
endif
ifeq ($(CONFIG_LPC313X_BUILDROOT),y)
# NuttX buildroot under Linux or Cygwin
CROSSDEV = arm-elf-
MAXOPTIMIZATION = -Os
endif
ifeq ($(WINTOOL),y)
# Windows-native toolchains
DIRLINK = $(TOPDIR)/tools/winlink.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/pgnsh/ld.script}"
else
# Linux/Cygwin-native toolchain
MKDEP = $(TOPDIR)/tools/mkdeps.sh
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/pgnsh/ld.script
endif
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
ARCHOPTIMIZATION = -g
else
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
ifeq ($(ARCHCCMAJOR),4)
ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv5te -mfloat-abi=soft -fno-builtin
else
ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv5te -msoft-float -fno-builtin
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
ARCHWARNINGSXX = -Wall -Wshadow
ARCHDEFINES =
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) -pipe
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections
LDNXFLATFLAGS = -e main -s 2048
OBJEXT = .o
LIBEXT = .a
EXEEXT =
ifneq ($(CONFIG_LPC313X_BUILDROOT),y)
LDFLAGS += -nostartfiles -nodefaultlibs
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
LDFLAGS += -g
endif
define PREPROCESS
@echo "CPP: $1->$2"
@$(CPP) $(CPPFLAGS) $1 -o $2
endef
define COMPILE
@echo "CC: $1"
@$(CC) -c $(CFLAGS) $1 -o $2
endef
define COMPILEXX
@echo "CXX: $1"
@$(CXX) -c $(CXXFLAGS) $1 -o $2
endef
define ASSEMBLE
@echo "AS: $1"
@$(CC) -c $(AFLAGS) $1 -o $2
endef
define ARCHIVE
echo "AR: $2"; \
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
endef
define CLEAN
@rm -f *.o *.a
endef
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
HOSTLDFLAGS =
+873
View File
File diff suppressed because it is too large Load Diff
+107
View File
@@ -0,0 +1,107 @@
/****************************************************************************
* configs/ea3131/pgnsh/ld.script
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name NuttX 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
* COPYRIGHT OWNER OR 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.
*
****************************************************************************/
/* The LPC3131 has 192Kb of ISRAM beginning at virtual address 0x1102:8000.
* LPC313x boot ROM expects the boot image be compiled with entry point at
* 0x1102:9000. A 128b header will appear at this address (applied by
* lpc313xImgCreator) and the executable code must begin at 0x1102:9080.
*/
MEMORY
{
isram (rwx) : ORIGIN = 0x11029080, LENGTH = 192K - 4224
}
OUTPUT_ARCH(arm)
ENTRY(_stext)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.glue_7)
*(.glue_7t)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
} > isram
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > isram
.ARM.extab : {
*(.ARM.extab*)
} >isram
.ARM.exidx : {
__exidx_start = ABSOLUTE(.);
*(.ARM.exidx*)
__exidx_end = ABSOLUTE(.);
} > isram
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
_ebss = ABSOLUTE(.);
} > isram
/* 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) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
+47
View File
@@ -0,0 +1,47 @@
#!/bin/bash
# configs/ea3131/pgnsh/setenv.sh
#
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. 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.
# 3. Neither the name NuttX 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
# COPYRIGHT OWNER OR 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.
#
if [ "$(basename $0)" = "setenv.sh" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG=${PATH}; fi
WD=`pwd`
export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin"
export LPCTOOL_DIR="${WD}/configs/ea3131/tools"
export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
+1 -1
View File
@@ -2,7 +2,7 @@
* configs/eagle100/include/board.h
* include/arch/board/board.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
+33 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* include/debug.h
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -164,6 +164,18 @@
# define sllvdbg(x...)
#endif
#ifdef CONFIG_DEBUG_PAGING
# define pgdbg(format, arg...) dbg(format, ##arg)
# define pglldbg(format, arg...) lldbg(format, ##arg)
# define pgvdbg(format, arg...) vdbg(format, ##arg)
# define pgllvdbg(format, arg...) llvdbg(format, ##arg)
#else
# define pgdbg(x...)
# define pglldbg(x...)
# define pgvdbg(x...)
# define pgllvdbg(x...)
#endif
#ifdef CONFIG_DEBUG_DMA
# define dmadbg(format, arg...) dbg(format, ##arg)
# define dmalldbg(format, arg...) lldbg(format, ##arg)
@@ -297,6 +309,18 @@
# define sllvdbg (void)
#endif
#ifdef CONFIG_DEBUG_PAGING
# define pgdbg dbg
# define pglldbg lldbg
# define pgvdbg vdbg
# define pgllvdbg llvdbg
#else
# define pgdbg (void)
# define pglldbg (void)
# define pgvdbg (void)
# define pgllvdbg (void)
#endif
#ifdef CONFIG_DEBUG_DMA
# define dmadbg dbg
# define dmalldbg lldbg
@@ -415,6 +439,14 @@
# define svdbgdumpbuffer(m,b,n)
#endif
#ifdef CONFIG_DEBUG_PAGING
# define pgdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
# define pgvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
#else
# define pgdbgdumpbuffer(m,b,n)
# define pgvdbgdumpbuffer(m,b,n)
#endif
#ifdef CONFIG_DEBUG_DMA
# define dmadbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
# define dmavdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
+11 -9
View File
@@ -43,8 +43,10 @@
#include <nuttx/config.h>
#include <stdbool.h>
#include <nuttx/sched.h>
#ifndef __ASSEMBLY__
# include <stdbool.h>
# include <nuttx/sched.h>
#endif
#ifdef CONFIG_PAGING
@@ -128,8 +130,8 @@
/* The size of physical and virutal paged address regions will then be: */
#define PG_PAGED_PSIZE CONFIG_PAGING_NPPAGED << PAGESHIFT)
#define PG_PAGED_VSIZE CONFIG_PAGING_NVPAGED << PAGESHIFT)
#define PG_PAGED_PSIZE (CONFIG_PAGING_NPPAGED << PAGESHIFT)
#define PG_PAGED_VSIZE (CONFIG_PAGING_NVPAGED << PAGESHIFT)
/* This positions the paging Read-Only text region. If the configuration
* did not override the default, the paged region will immediately follow
@@ -174,9 +176,9 @@
#define PG_RAM_PAGES (CONFIG_DRAM_SIZE >> PAGESHIFT)
#ifdef CONFIG_PAGING_NDATA
# PG_DATA_NPAGES CONFIG_PAGING_NDATA
# define PG_DATA_NPAGES CONFIG_PAGING_NDATA
#elif PG_RAM_PAGES > PG_TEXT_NPPAGES
# PG_DATA_NPAGES (PG_RAM_PAGES - PG_TEXT_NPAGES)
# define PG_DATA_NPAGES (PG_RAM_PAGES - PG_TEXT_NPAGES)
#else
# error "Not enough memory for this page layout"
#endif
@@ -223,8 +225,8 @@
* Public Data
****************************************************************************/
#ifndef __ASSEMBLY
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
@@ -444,6 +446,6 @@ EXTERN int up_fillpage(FAR _TCB *tcb, FAR void *vpage, up_pgcallback_t pg_callba
}
#endif
#endif /* __ASSEMBLY */
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_PAGING */
#endif /* __NUTTX_PAGE_H */
+2 -2
View File
@@ -545,7 +545,7 @@ int pg_worker(int argc, char *argv[])
* Interrupts are still disabled.
*/
#ifdef CONFIG_PAGING_BLOCKINGFILL
#ifndef CONFIG_PAGING_BLOCKINGFILL
/* For the non-blocking up_fillpage(), the page fill worker thread will detect
* that the page fill is complete when it is awakened with g_pftcb non-NULL
* and fill completion status from pg_callback.
@@ -589,7 +589,7 @@ int pg_worker(int argc, char *argv[])
* event, then declare a failure.
*/
#if defined() && defined(CONFIG_PAGING_TIMEOUT_TICKS)
#ifdef CONFIG_PAGING_TIMEOUT_TICKS
else
{
dbg("Timeout!\n");
+1
View File
@@ -330,6 +330,7 @@ int main(int argc, char **argv, char **envp)
printf("# undef CONFIG_DEBUG_VERBOSE\n");
printf("# undef CONFIG_DEBUG_SCHED\n");
printf("# undef CONFIG_DEBUG_MM\n");
printf("# undef CONFIG_DEBUG_PAGING\n");
printf("# undef CONFIG_DEBUG_DMA\n");
printf("# undef CONFIG_DEBUG_FS\n");
printf("# undef CONFIG_DEBUG_LIB\n");