summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-01 19:08:04 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-01 19:08:04 +0000
commit00b2545e9e3cc760255aa7b4fc953ad5ab97ba62 (patch)
tree90f908d15691555fdf19c21eeae7b55187b73803 /nuttx/arch/avr
parent6e09d7aab47a47e36f56d9b33bd6e87e96e2af2c (diff)
downloadpx4-nuttx-00b2545e9e3cc760255aa7b4fc953ad5ab97ba62.tar.gz
px4-nuttx-00b2545e9e3cc760255aa7b4fc953ad5ab97ba62.tar.bz2
px4-nuttx-00b2545e9e3cc760255aa7b4fc953ad5ab97ba62.zip
Add support for accessing printf, sprintf, puts, etc. strings that do not lie in the MCU data space
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3738 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/avr')
-rw-r--r--nuttx/arch/avr/include/avr/types.h7
-rw-r--r--nuttx/arch/avr/src/at90usb/Make.defs4
-rw-r--r--nuttx/arch/avr/src/atmega/Make.defs4
3 files changed, 14 insertions, 1 deletions
diff --git a/nuttx/arch/avr/include/avr/types.h b/nuttx/arch/avr/include/avr/types.h
index 2dd35a5cb..e0a70fb7f 100644
--- a/nuttx/arch/avr/include/avr/types.h
+++ b/nuttx/arch/avr/include/avr/types.h
@@ -76,11 +76,16 @@ typedef signed long long _int64_t; /* long long is 64-bits */
typedef unsigned long long _uint64_t;
#define __INT64_DEFINED
-/* A pointer is 2 bytes */
+/* A (near) pointer is 2 bytes */
typedef signed int _intptr_t;
typedef unsigned int _uintptr_t;
+/* A FAR pointer is 4 bytes */
+
+typedef signed long _int_farptr_t;
+typedef unsigned long _uint_farptr_t;
+
/* This is the size of the interrupt state save returned by irqsave(). */
typedef unsigned char irqstate_t;
diff --git a/nuttx/arch/avr/src/at90usb/Make.defs b/nuttx/arch/avr/src/at90usb/Make.defs
index 5b939f5af..0497acd95 100644
--- a/nuttx/arch/avr/src/at90usb/Make.defs
+++ b/nuttx/arch/avr/src/at90usb/Make.defs
@@ -62,6 +62,10 @@ ifeq ($(CONFIG_DEBUG_STACK),y)
CMN_CSRCS += up_checkstack.c
endif
+ifeq ($(CONFIG_ARCH_ROMGETC),y)
+CMN_CSRCS += up_romgetc.c
+endif
+
# Required AT90USB files
CHIP_ASRCS = at90usb_exceptions.S
diff --git a/nuttx/arch/avr/src/atmega/Make.defs b/nuttx/arch/avr/src/atmega/Make.defs
index 47683fcd0..b3451aaa1 100644
--- a/nuttx/arch/avr/src/atmega/Make.defs
+++ b/nuttx/arch/avr/src/atmega/Make.defs
@@ -62,6 +62,10 @@ ifeq ($(CONFIG_DEBUG_STACK),y)
CMN_CSRCS += up_checkstack.c
endif
+ifeq ($(CONFIG_ARCH_ROMGETC),y)
+CMN_CSRCS += up_romgetc.c
+endif
+
# Required ATMEGA files
CHIP_ASRCS = atmega_exceptions.S