From 00b2545e9e3cc760255aa7b4fc953ad5ab97ba62 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 1 Jul 2011 19:08:04 +0000 Subject: 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 --- nuttx/arch/avr/include/avr/types.h | 7 ++++++- nuttx/arch/avr/src/at90usb/Make.defs | 4 ++++ nuttx/arch/avr/src/atmega/Make.defs | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'nuttx/arch/avr') 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 -- cgit v1.2.3