From 33041c5d0872a3ea428952b15ab22a81c3ac60ed Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 7 Oct 2010 01:58:16 +0000 Subject: [PATCH] Add memorymap git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2972 42af7a65-404d-4744-a932-0658087f49c3 --- configs/avr32dev1/README.txt | 40 +++++++++++----- configs/avr32dev1/ostest/defconfig | 77 +++++++++++++++--------------- configs/avr32dev1/ostest/ld.script | 16 +++++-- 3 files changed, 80 insertions(+), 53 deletions(-) diff --git a/configs/avr32dev1/README.txt b/configs/avr32dev1/README.txt index fa10f90aadd..3ad48e87dcc 100755 --- a/configs/avr32dev1/README.txt +++ b/configs/avr32dev1/README.txt @@ -9,6 +9,10 @@ Contents * Toolchains * Development Environment * GNU Toolchains + * IDEs + * AVR32 Bootloader + * AVR32DEV1 Configuration Options + * Configurations Development Environment ^^^^^^^^^^^^^^^^^^^^^^^ @@ -54,13 +58,27 @@ IDEs 2) Start the NuttX build at least one time from the Cygwin command line before trying to create your project. This is necessary to create certain auto-generated files and directories that will be needed. - 3) Set up include pathes: You will need include/, arch/arm/src/lm3s, - arch/arm/src/common, arch/arm/src/cortexm3, and sched/. + 3) Set up include pathes: You will need include/, arch/avr/src/at91uc3, + arch/avr/src/common, arch/arm/src/avr, and sched/. 4) All assembly files need to have the definition option -D __ASSEMBLY__ on the command line. Startup files will probably cause you some headaches. The NuttX startup file - is arch/arm/src/lm3s/lm3s_vectors.S. + is arch/avr/src/avr3/up_nommuhead.S. + +AVR32 Bootloader +^^^^^^^^^^^^^^^^ + + The linker scripts (ld.script) assume that you are using the bootloader. + The bootloader resides at 0x8000:0000 and so the ld.script files link + the application to execute after the bootloader at 0x8000:2000. To link + so that NuttX boots directly without using the bootloader, change the + flash definition from: + + flash (rxai!w) : ORIGIN = 0x80002000, LENGTH = 256K - 8K + + to: + flash (rxai!w) : ORIGIN = 0x80000000, LENGTH = 256K AVR32DEV1 Configuration Options ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -139,16 +157,16 @@ AVR32DEV1 Configuration Options AT91UC3B0256 specific device driver settings - CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the - console and ttys0 (default is the UART0). - CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received. + CONFIG_USARTn_SERIAL_CONSOLE - selects the USARTn for the + console and ttys0 (default is the USART0). + CONFIG_USARTn_RXBUFSIZE - Characters are buffered as received. This specific the size of the receive buffer - CONFIG_UARTn_TXBUFSIZE - Characters are buffered before + CONFIG_USARTn_TXBUFSIZE - Characters are buffered before being sent. This specific the size of the transmit buffer - CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be - CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8. - CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity - CONFIG_UARTn_2STOP - Two stop bits + CONFIG_USARTn_BAUD - The configure BAUD of the USART. Must be + CONFIG_USARTn_BITS - The number of bits. Must be either 7 or 8. + CONFIG_USARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity + CONFIG_USARTn_2STOP - Two stop bits Configurations ^^^^^^^^^^^^^^ diff --git a/configs/avr32dev1/ostest/defconfig b/configs/avr32dev1/ostest/defconfig index 5a951c5c040..79637bfaa59 100755 --- a/configs/avr32dev1/ostest/defconfig +++ b/configs/avr32dev1/ostest/defconfig @@ -96,60 +96,61 @@ CONFIG_ARCH_DMA=n CONFIG_AVR32_AVRTOOLSW=y CONFIG_AVR32_AVRTOOLSL=n -# -# Individual subsystems can be enabled: # # Individual subsystems can be enabled: # +# CONFIG_AVR32_USARTn - Enable support for USARTn +# CONFIG_AVR32_USARTn_RS232 - Configure USARTn as an RS232 interface. +# + +CONFIG_AVR32_USART0=y +CONFIG_AVR32_USART1=n +CONFIG_AVR32_USART2=n +CONFIG_AVR32_USART0_RS232=y +CONFIG_AVR32_USART1_RS232=y +CONFIG_AVR32_USART2_RS232=y # # AVR32 specific serial device driver settings # -# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the -# console and ttys0 (default is the UART1). -# CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received. +# CONFIG_USARTn_SERIAL_CONSOLE - selects the USARTn for the +# console and ttys0 (default is the USART0). +# CONFIG_USARTn_RXBUFSIZE - Characters are buffered as received. # This specific the size of the receive buffer -# CONFIG_UARTn_TXBUFSIZE - Characters are buffered before +# CONFIG_USARTn_TXBUFSIZE - Characters are buffered before # being sent. This specific the size of the transmit buffer -# CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be -# CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8. -# CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity -# CONFIG_UARTn_2STOP - Two stop bits +# CONFIG_USARTn_BAUD - The configure BAUD of the USART. Must be +# CONFIG_USARTn_BITS - The number of bits. Must be either 7 or 8. +# CONFIG_USARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity +# CONFIG_USARTn_2STOP - Two stop bits # -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART1_SERIAL_CONSOLE=n -CONFIG_UART2_SERIAL_CONSOLE=n -CONFIG_UART3_SERIAL_CONSOLE=n +CONFIG_USART0_SERIAL_CONSOLE=y +CONFIG_USART1_SERIAL_CONSOLE=n +CONFIG_USART2_SERIAL_CONSOLE=n -CONFIG_UART0_TXBUFSIZE=256 -CONFIG_UART1_TXBUFSIZE=256 -CONFIG_UART2_TXBUFSIZE=256 -CONFIG_UART3_TXBUFSIZE=256 +CONFIG_USART0_TXBUFSIZE=256 +CONFIG_USART1_TXBUFSIZE=256 +CONFIG_USART2_TXBUFSIZE=256 -CONFIG_UART0_RXBUFSIZE=256 -CONFIG_UART1_RXBUFSIZE=256 -CONFIG_UART2_RXBUFSIZE=256 -CONFIG_UART3_RXBUFSIZE=256 +CONFIG_USART0_RXBUFSIZE=256 +CONFIG_USART1_RXBUFSIZE=256 +CONFIG_USART2_RXBUFSIZE=256 -CONFIG_UART0_BAUD=115200 -CONFIG_UART2_BAUD=115200 -CONFIG_UART3_BAUD=115200 -CONFIG_UART1_BAUD=115200 +CONFIG_USART0_BAUD=115200 +CONFIG_USART1_BAUD=115200 +CONFIG_USART2_BAUD=115200 -CONFIG_UART0_BITS=8 -CONFIG_UART1_BITS=8 -CONFIG_UART2_BITS=8 -CONFIG_UART3_BITS=8 +CONFIG_USART0_BITS=8 +CONFIG_USART1_BITS=8 +CONFIG_USART2_BITS=8 -CONFIG_UART0_PARITY=0 -CONFIG_UART1_PARITY=0 -CONFIG_UART2_PARITY=0 -CONFIG_UART3_PARITY=0 +CONFIG_USART0_PARITY=0 +CONFIG_USART1_PARITY=0 +CONFIG_USART2_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +CONFIG_USART0_2STOP=0 +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 # # General build options diff --git a/configs/avr32dev1/ostest/ld.script b/configs/avr32dev1/ostest/ld.script index f2dcccb6b49..d4d89881c85 100755 --- a/configs/avr32dev1/ostest/ld.script +++ b/configs/avr32dev1/ostest/ld.script @@ -37,12 +37,20 @@ OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32") OUTPUT_ARCH(avr32:uc) ENTRY(_stext) +/* The following assumes that the bootloader resides at 0x8000:0000 and so + * links the application to execute after the bootloader at 0x8000:2000. + * To link so that NuttX boots directly without using the bootloader, + * change the flash definition to: + * + * flash (rxai!w) : ORIGIN = 0x80000000, LENGTH = 256K + */ + MEMORY { - flash (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00020000 - intram (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x00007FFC - userpage : ORIGIN = 0x80800000, LENGTH = 0x00000200 - factorypage : ORIGIN = 0x80800200, LENGTH = 0x00000200 + flash (rxai!w) : ORIGIN = 0x80002000, LENGTH = 256K - 8K + intram (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 32K + userpage : ORIGIN = 0x80800000, LENGTH = 512 + factorypage : ORIGIN = 0x80800200, LENGTH = 512 } SECTIONS