diff options
Diffstat (limited to 'nuttx')
-rwxr-xr-x | nuttx/arch/avr/src/at91uc3/at91uc3_memorymap.h | 16 | ||||
-rw-r--r-- | nuttx/arch/avr/src/avr32/up_nommuhead.S | 4 | ||||
-rwxr-xr-x | nuttx/configs/avr32dev1/README.txt | 40 | ||||
-rwxr-xr-x | nuttx/configs/avr32dev1/ostest/defconfig | 91 | ||||
-rwxr-xr-x | nuttx/configs/avr32dev1/ostest/ld.script | 16 |
5 files changed, 105 insertions, 62 deletions
diff --git a/nuttx/arch/avr/src/at91uc3/at91uc3_memorymap.h b/nuttx/arch/avr/src/at91uc3/at91uc3_memorymap.h index 71a48de8b..dc5997231 100755 --- a/nuttx/arch/avr/src/at91uc3/at91uc3_memorymap.h +++ b/nuttx/arch/avr/src/at91uc3/at91uc3_memorymap.h @@ -46,6 +46,22 @@ * Pre-processor Definitions ************************************************************************************/ +/* Physical memory map */ + +#define AVR32_ONCHIP_FLASH_BASE 0x80000000 /* 512Kb Flash Array */ +# define AVR32_APPL_BASE 0x80002000 /* 8Kb offset to application w/bootloader */ +#define AVR32_USER_FLASH_BASE 0x80800000 /* Flash User Page */ +# define AVR32_BTLDR_CONFIG 0x808001fc /* Bootloader configuration word */ + +/* Memory map for systems without an MMU */ + +#define AVR32_P1_BASE 0x80000000 /* 512MB non-translated space, cacheable */ +#define AVR32_P2_BASE 0xa0000000 /* 512MB non-translated space, non-cacheable */ +#define AVR32_P3_BASE 0xc0000000 /* 512MB translated space, cacheable */ +#define AVR32_P4_BASE 0xe0000000 /* 512MB system space, non-cacheable */ + + + /************************************************************************************ * Public Types ************************************************************************************/ diff --git a/nuttx/arch/avr/src/avr32/up_nommuhead.S b/nuttx/arch/avr/src/avr32/up_nommuhead.S index 7e2888456..6e0edb220 100644 --- a/nuttx/arch/avr/src/avr32/up_nommuhead.S +++ b/nuttx/arch/avr/src/avr32/up_nommuhead.S @@ -52,7 +52,7 @@ #ifdef CONFIG_BOOT_RUNFROMFLASH .global _sdata /* Start of .data section in RAM */ .global _edata /* End of .data section in RAM */ - .global _erdonly /* Start of .data section in FLASH */ + .global _eronly /* Start of .data section in FLASH */ #endif .global up_lowinit /* Perform low level initialization */ .global up_boardinit /* Low-level board initialization */ @@ -127,7 +127,7 @@ __start: lda.w r0, _sdata /* r0=Start of .data section in RAM */ lda.w r1, _edata /* r1=End of .data section in RAM */ - lda.w r2, _erdonly /* r2=Start of .data in FLASH */ + lda.w r2, _eronly /* r2=Start of .data in FLASH */ rjmp 4f /* Start at the bottom of the loop */ 3: ld.d r4, r2++ /* Fetch the next data value */ diff --git a/nuttx/configs/avr32dev1/README.txt b/nuttx/configs/avr32dev1/README.txt index fa10f90aa..3ad48e87d 100755 --- a/nuttx/configs/avr32dev1/README.txt +++ b/nuttx/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/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig index 5a951c5c0..79637bfaa 100755 --- a/nuttx/configs/avr32dev1/ostest/defconfig +++ b/nuttx/configs/avr32dev1/ostest/defconfig @@ -97,59 +97,60 @@ 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_UART0_SERIAL_CONSOLE=y -CONFIG_UART1_SERIAL_CONSOLE=n -CONFIG_UART2_SERIAL_CONSOLE=n -CONFIG_UART3_SERIAL_CONSOLE=n - -CONFIG_UART0_TXBUFSIZE=256 -CONFIG_UART1_TXBUFSIZE=256 -CONFIG_UART2_TXBUFSIZE=256 -CONFIG_UART3_TXBUFSIZE=256 - -CONFIG_UART0_RXBUFSIZE=256 -CONFIG_UART1_RXBUFSIZE=256 -CONFIG_UART2_RXBUFSIZE=256 -CONFIG_UART3_RXBUFSIZE=256 - -CONFIG_UART0_BAUD=115200 -CONFIG_UART2_BAUD=115200 -CONFIG_UART3_BAUD=115200 -CONFIG_UART1_BAUD=115200 - -CONFIG_UART0_BITS=8 -CONFIG_UART1_BITS=8 -CONFIG_UART2_BITS=8 -CONFIG_UART3_BITS=8 - -CONFIG_UART0_PARITY=0 -CONFIG_UART1_PARITY=0 -CONFIG_UART2_PARITY=0 -CONFIG_UART3_PARITY=0 - -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 -CONFIG_UART2_2STOP=0 -CONFIG_UART3_2STOP=0 +# 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_USART0_SERIAL_CONSOLE=y +CONFIG_USART1_SERIAL_CONSOLE=n +CONFIG_USART2_SERIAL_CONSOLE=n + +CONFIG_USART0_TXBUFSIZE=256 +CONFIG_USART1_TXBUFSIZE=256 +CONFIG_USART2_TXBUFSIZE=256 + +CONFIG_USART0_RXBUFSIZE=256 +CONFIG_USART1_RXBUFSIZE=256 +CONFIG_USART2_RXBUFSIZE=256 + +CONFIG_USART0_BAUD=115200 +CONFIG_USART1_BAUD=115200 +CONFIG_USART2_BAUD=115200 + +CONFIG_USART0_BITS=8 +CONFIG_USART1_BITS=8 +CONFIG_USART2_BITS=8 + +CONFIG_USART0_PARITY=0 +CONFIG_USART1_PARITY=0 +CONFIG_USART2_PARITY=0 + +CONFIG_USART0_2STOP=0 +CONFIG_USART1_2STOP=0 +CONFIG_USART2_2STOP=0 # # General build options diff --git a/nuttx/configs/avr32dev1/ostest/ld.script b/nuttx/configs/avr32dev1/ostest/ld.script index f2dcccb6b..d4d89881c 100755 --- a/nuttx/configs/avr32dev1/ostest/ld.script +++ b/nuttx/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 |