diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-03-31 15:10:15 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-03-31 15:10:15 -0600 |
commit | 84af41d3dbbc214c3f47d87f038e73b6d4955a5d (patch) | |
tree | ed676be170cff6bac2b816413d9d316378b58b83 | |
parent | 8b914f8010b9d0484344c2f6e2d27feef23a516a (diff) | |
download | px4-nuttx-84af41d3dbbc214c3f47d87f038e73b6d4955a5d.tar.gz px4-nuttx-84af41d3dbbc214c3f47d87f038e73b6d4955a5d.tar.bz2 px4-nuttx-84af41d3dbbc214c3f47d87f038e73b6d4955a5d.zip |
Cosmetic updates to comments and README files
-rw-r--r-- | nuttx/ChangeLog | 4 | ||||
-rw-r--r-- | nuttx/TODO | 2 | ||||
-rw-r--r-- | nuttx/configs/sama5d3-xplained/README.txt | 44 | ||||
-rw-r--r-- | nuttx/configs/sama5d3-xplained/src/sam_sdram.c | 13 | ||||
-rw-r--r-- | nuttx/configs/sama5d3x-ek/README.txt | 44 | ||||
-rw-r--r-- | nuttx/configs/sama5d3x-ek/src/sam_boot.c | 4 | ||||
-rw-r--r-- | nuttx/configs/sama5d3x-ek/src/sam_sdram.c | 2 |
7 files changed, 80 insertions, 33 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 5a1625873..db810f2a4 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -7099,4 +7099,6 @@ for a smaller footprint (2013-3-31). * sched/Kconfig: Menu has gotten too long. And another layer of menuing in order to simplify this layer (2014-3-31). - + * arch/arm/src/sama5_boot.c: Fix double mapping of SDRAM when executing + out of SDRAM. In this case, the SDRAM was already mapping in + arm_head.S (2014-3-31). diff --git a/nuttx/TODO b/nuttx/TODO index 275c7e759..cb2324dd4 100644 --- a/nuttx/TODO +++ b/nuttx/TODO @@ -376,7 +376,7 @@ o Kernel Build COMMAND KERNEL INTERFACE(s) -------- ---------------------------------------------- - loset losetup(), loteardown() + losetup losetup(), loteardown() mkfatfs mkfatfs mkrd ramdisk_register() dd bchlib_setup(), bchlib_read(), bchlib_write(), diff --git a/nuttx/configs/sama5d3-xplained/README.txt b/nuttx/configs/sama5d3-xplained/README.txt index 62c4a2ecf..ed547a2bb 100644 --- a/nuttx/configs/sama5d3-xplained/README.txt +++ b/nuttx/configs/sama5d3-xplained/README.txt @@ -58,7 +58,7 @@ Contents - NXFLAT Toolchain - Loading Code into SRAM with J-Link - Writing to FLASH using SAM-BA - - Running NuttX from NAND FLASH + - Running NuttX from SDRAM - Buttons and LEDs - Serial Console - Networking @@ -324,21 +324,45 @@ Writing to FLASH using SAM-BA re-open the terminal emulator program. 10. Power cycle the board. -Running NuttX from NAND FLASH -============================= +Running NuttX from SDRAM +======================== + + NuttX may be executed from SDRAM. But this case means that the NuttX + binary must reside on some other media (typically NAND FLASH, Serial + FLASH, or, perhaps even a TFTP server). In these cases, an intermediate + bootloader such as U-Boot or Barebox must be used to configure the + SAMA5D3 clocks and SDRAM and then to copy the NuttX binary into SDRAM. + + - NuttX Configuration + - Boot sequence + - NAND FLASH Memory Map + - Programming the AT91Boostrap Binary + - Programming U-Boot + - Load NuttX with U-Boot on AT91 boards + +NuttX Configuration +------------------- + + In order to run from SDRAM, NuttX must be built at origin 0x20008000 in + SDRAM (skipping over SDRAM memory used by the bootloader). The following + configuration option is required: - - Boot sequence - - NAND FLASH Memory Map - - Programming the AT91Boostrap Binary - - Programming U-Boot - - Load NuttX with U-Boot on AT91 boards + CONFIG_SAMA5_BOOT_SDRAM=y + CONFIG_BOOT_RUNFROMSDRAM=y + + These options tell the NuttX code that it will be booting and running from + SDRAM. In this case, the start-logic will do to things: (1) it will not + configure the SAMA5D3 clocking. Rather, it will use the clock configuration + as set up by the bootloader. And (2) it will not attempt to configure the + SDRAM. Since NuttX is already running from SDRAM, it must accept the SDRAM + configuration as set up by the bootloader. Boot sequence ------------- Reference: http://www.at91.com/linux4sam/bin/view/Linux4SAM/GettingStarted - Several pieces of software are involved to boot a Nutt5X from NAND. First + Several pieces of software are involved to boot a Nutt5X into SDRAM. First is the primary bootloader in ROM which is in charge to check if a valid application is present on supported media (NOR FLASH, Serial DataFlash, NAND FLASH, SD card). @@ -1350,7 +1374,7 @@ SDRAM Support System Type->External Memory Configuration CONFIG_SAMA5_DDRCS=y : Tell the system that DRAM is at the DDR CS - CONFIG_SAMA5_DDRCS_SIZE=268435456 : 2Gb DRAM -> 256GB + CONFIG_SAMA5_DDRCS_SIZE=268435456 : 2Gb DRAM -> 256MB CONFIG_SAMA5_DDRCS_LPDDR2=y : Its DDR2 CONFIG_SAMA5D3XPLAINED_MT47H128M16RT=y : This is the type of DDR2 diff --git a/nuttx/configs/sama5d3-xplained/src/sam_sdram.c b/nuttx/configs/sama5d3-xplained/src/sam_sdram.c index 9e0bee0c8..e5b6a6461 100644 --- a/nuttx/configs/sama5d3-xplained/src/sam_sdram.c +++ b/nuttx/configs/sama5d3-xplained/src/sam_sdram.c @@ -4,7 +4,7 @@ * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * - * Most of this file derives from Atmel sample code for the SAMA5D3x-E + * Most of this file derives from Atmel sample code for the SAMA5D3 Xplained * board. That sample code has licensing that is compatible with the NuttX * modified BSD license: * @@ -122,14 +122,13 @@ static inline void sam_sdram_delay(unsigned int loops) * Name: sam_sdram_config * * Description: - * Configures DDR2 (MT47H128M16RT 128MB/ MT47H64M16HR) - * * Configures DDR2 (MT47H128M16RT 128MB or, optionally, MT47H64M16HR) * - * Per the SAMA5D3-Xplained User guide: "Two SDRAM/DDR2 used as main system memory. - * MT47H128M16 - 2 Gb - 16 Meg x 16 x 8 banks, the board provides up to 2 Gb on- - * board, soldered DDR2 SDRAM. The memory bus is 32 bits wide and operates with - * up to 166 MHz." + * Per the SAMA5D3-Xplained User guide: "Two DDR2/SDRAM (MT47H64M16HR) used as + * main system memory (256 MByte). The board includes 2 Gbits of on-board soldered + * DDR2 (double data rate) SDRAM. The footprints can also host two DDR2 + * (MT47H128M16RT) from MicronŽ for a total of 512 MBytes of DDR2 memory. The + * memory bus is 32 bits wide and operates with a frequency of up to 166 MHz." * * From the Atmel Code Example: * MT47H64M16HR : 8 Meg x 16 x 8 banks diff --git a/nuttx/configs/sama5d3x-ek/README.txt b/nuttx/configs/sama5d3x-ek/README.txt index 5e6399fc1..54f4fbb10 100644 --- a/nuttx/configs/sama5d3x-ek/README.txt +++ b/nuttx/configs/sama5d3x-ek/README.txt @@ -70,7 +70,7 @@ Contents - Loading Code into SRAM with J-Link - Writing to FLASH using SAM-BA - Creating and Using NORBOOT - - Running NuttX from NAND FLASH + - Running NuttX from SDRAM - Buttons and LEDs - Serial Consoles - Networking @@ -445,21 +445,45 @@ Creating and Using NORBOOT jumper does nothing on my board??? So I have been using the norboot configuration exclusively to start the program-under-test in NOR FLASH. -Running NuttX from NAND FLASH -============================= +Running NuttX from SDRAM +======================== + + NuttX may be executed from SDRAM. But this case means that the NuttX + binary must reside on some other media (typically NAND FLASH, Serial + FLASH, or, perhaps even a TFTP server). In these cases, an intermediate + bootloader such as U-Boot or Barebox must be used to configure the + SAMA5D3 clocks and SDRAM and then to copy the NuttX binary into SDRAM. + + - NuttX Configuration + - Boot sequence + - NAND FLASH Memory Map + - Programming the AT91Boostrap Binary + - Programming U-Boot + - Load NuttX with U-Boot on AT91 boards + +NuttX Configuration +------------------- + + In order to run from SDRAM, NuttX must be built at origin 0x20008000 in + SDRAM (skipping over SDRAM memory used by the bootloader). The following + configuration option is required: - - Boot sequence - - NAND FLASH Memory Map - - Programming the AT91Boostrap Binary - - Programming U-Boot - - Load NuttX with U-Boot on AT91 boards + CONFIG_SAMA5_BOOT_SDRAM=y + CONFIG_BOOT_RUNFROMSDRAM=y + + These options tell the NuttX code that it will be booting and running from + SDRAM. In this case, the start-logic will do to things: (1) it will not + configure the SAMA5D3 clocking. Rather, it will use the clock configuration + as set up by the bootloader. And (2) it will not attempt to configure the + SDRAM. Since NuttX is already running from SDRAM, it must accept the SDRAM + configuration as set up by the bootloader. Boot sequence ------------- Reference: http://www.at91.com/linux4sam/bin/view/Linux4SAM/GettingStarted - Several pieces of software are involved to boot a Nutt5X from NAND. First + Several pieces of software are involved to boot a Nutt5X into SDRAM. First is the primary bootloader in ROM which is in charge to check if a valid application is present on supported media (NOR FLASH, Serial DataFlash, NAND FLASH, SD card). @@ -1519,7 +1543,7 @@ SDRAM Support System Type->External Memory Configuration CONFIG_SAMA5_DDRCS=y : Tell the system that DRAM is at the DDR CS - CONFIG_SAMA5_DDRCS_SIZE=268435456 : 2Gb DRAM -> 256GB + CONFIG_SAMA5_DDRCS_SIZE=268435456 : 2Gb DRAM -> 256MB CONFIG_SAMA5_DDRCS_LPDDR2=y : Its DDR2 CONFIG_SAMA5D3xEK_MT47H128M16RT=y : This is the type of DDR2 diff --git a/nuttx/configs/sama5d3x-ek/src/sam_boot.c b/nuttx/configs/sama5d3x-ek/src/sam_boot.c index 660529f08..fc28ecd53 100644 --- a/nuttx/configs/sama5d3x-ek/src/sam_boot.c +++ b/nuttx/configs/sama5d3x-ek/src/sam_boot.c @@ -80,7 +80,7 @@ void sam_boardinitialize(void) #if defined(CONFIG_SAMA5_DDRCS) && !defined(CONFIG_SAMA5_BOOT_SDRAM) - /* Configure SDRAM if (1) SDRAM has been enalbled in the NuttX configuration and + /* Configure SDRAM if (1) SDRAM has been enabled in the NuttX configuration and * (2) if we are not currently running out of SDRAM. If we are now running out * of SDRAM then we have to assume that some second level bootloader has properly * configured SDRAM for our use. @@ -103,7 +103,7 @@ void sam_boardinitialize(void) } #endif - /* Configure board resources to support networkingif the 1) networking is enabled, + /* Configure board resources to support networking if the 1) networking is enabled, * 2) the EMAC or GMAC module is enabled, and 2) the weak function * sam_netinitialize() has been brought into the build. */ diff --git a/nuttx/configs/sama5d3x-ek/src/sam_sdram.c b/nuttx/configs/sama5d3x-ek/src/sam_sdram.c index 6ba478a7e..40cdbc5ab 100644 --- a/nuttx/configs/sama5d3x-ek/src/sam_sdram.c +++ b/nuttx/configs/sama5d3x-ek/src/sam_sdram.c @@ -122,8 +122,6 @@ static inline void sam_sdram_delay(unsigned int loops) * Name: sam_sdram_config * * Description: - * Configures DDR2 (MT47H128M16RT 128MB/ MT47H64M16HR) - * * Configures DDR2 (MT47H128M16RT 128MB or, optionally, MT47H64M16HR) * * Per the SAMA5D3x-EK User guide: "Two SDRAM/DDR2 used as main system memory. |