mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Cosmetic updates to comments and README files
This commit is contained in:
@@ -58,7 +58,7 @@ Contents
|
|||||||
- NXFLAT Toolchain
|
- NXFLAT Toolchain
|
||||||
- Loading Code into SRAM with J-Link
|
- Loading Code into SRAM with J-Link
|
||||||
- Writing to FLASH using SAM-BA
|
- Writing to FLASH using SAM-BA
|
||||||
- Running NuttX from NAND FLASH
|
- Running NuttX from SDRAM
|
||||||
- Buttons and LEDs
|
- Buttons and LEDs
|
||||||
- Serial Console
|
- Serial Console
|
||||||
- Networking
|
- Networking
|
||||||
@@ -324,21 +324,45 @@ Writing to FLASH using SAM-BA
|
|||||||
re-open the terminal emulator program.
|
re-open the terminal emulator program.
|
||||||
10. Power cycle the board.
|
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
|
- Boot sequence
|
||||||
- NAND FLASH Memory Map
|
- NAND FLASH Memory Map
|
||||||
- Programming the AT91Boostrap Binary
|
- Programming the AT91Boostrap Binary
|
||||||
- Programming U-Boot
|
- Programming U-Boot
|
||||||
- Load NuttX with U-Boot on AT91 boards
|
- 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:
|
||||||
|
|
||||||
|
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
|
Boot sequence
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Reference: http://www.at91.com/linux4sam/bin/view/Linux4SAM/GettingStarted
|
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
|
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,
|
application is present on supported media (NOR FLASH, Serial DataFlash,
|
||||||
NAND FLASH, SD card).
|
NAND FLASH, SD card).
|
||||||
@@ -1350,7 +1374,7 @@ SDRAM Support
|
|||||||
|
|
||||||
System Type->External Memory Configuration
|
System Type->External Memory Configuration
|
||||||
CONFIG_SAMA5_DDRCS=y : Tell the system that DRAM is at the DDR CS
|
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_SAMA5_DDRCS_LPDDR2=y : Its DDR2
|
||||||
CONFIG_SAMA5D3XPLAINED_MT47H128M16RT=y : This is the type of DDR2
|
CONFIG_SAMA5D3XPLAINED_MT47H128M16RT=y : This is the type of DDR2
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* 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
|
* board. That sample code has licensing that is compatible with the NuttX
|
||||||
* modified BSD license:
|
* modified BSD license:
|
||||||
*
|
*
|
||||||
@@ -122,14 +122,13 @@ static inline void sam_sdram_delay(unsigned int loops)
|
|||||||
* Name: sam_sdram_config
|
* Name: sam_sdram_config
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Configures DDR2 (MT47H128M16RT 128MB/ MT47H64M16HR)
|
|
||||||
*
|
|
||||||
* Configures DDR2 (MT47H128M16RT 128MB or, optionally, MT47H64M16HR)
|
* Configures DDR2 (MT47H128M16RT 128MB or, optionally, MT47H64M16HR)
|
||||||
*
|
*
|
||||||
* Per the SAMA5D3-Xplained User guide: "Two SDRAM/DDR2 used as main system memory.
|
* Per the SAMA5D3-Xplained User guide: "Two DDR2/SDRAM (MT47H64M16HR) used as
|
||||||
* MT47H128M16 - 2 Gb - 16 Meg x 16 x 8 banks, the board provides up to 2 Gb on-
|
* main system memory (256 MByte). The board includes 2 Gbits of on-board soldered
|
||||||
* board, soldered DDR2 SDRAM. The memory bus is 32 bits wide and operates with
|
* DDR2 (double data rate) SDRAM. The footprints can also host two DDR2
|
||||||
* up to 166 MHz."
|
* (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:
|
* From the Atmel Code Example:
|
||||||
* MT47H64M16HR : 8 Meg x 16 x 8 banks
|
* MT47H64M16HR : 8 Meg x 16 x 8 banks
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ Contents
|
|||||||
- Loading Code into SRAM with J-Link
|
- Loading Code into SRAM with J-Link
|
||||||
- Writing to FLASH using SAM-BA
|
- Writing to FLASH using SAM-BA
|
||||||
- Creating and Using NORBOOT
|
- Creating and Using NORBOOT
|
||||||
- Running NuttX from NAND FLASH
|
- Running NuttX from SDRAM
|
||||||
- Buttons and LEDs
|
- Buttons and LEDs
|
||||||
- Serial Consoles
|
- Serial Consoles
|
||||||
- Networking
|
- Networking
|
||||||
@@ -445,21 +445,45 @@ Creating and Using NORBOOT
|
|||||||
jumper does nothing on my board??? So I have been using the 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.
|
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
|
- Boot sequence
|
||||||
- NAND FLASH Memory Map
|
- NAND FLASH Memory Map
|
||||||
- Programming the AT91Boostrap Binary
|
- Programming the AT91Boostrap Binary
|
||||||
- Programming U-Boot
|
- Programming U-Boot
|
||||||
- Load NuttX with U-Boot on AT91 boards
|
- 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:
|
||||||
|
|
||||||
|
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
|
Boot sequence
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Reference: http://www.at91.com/linux4sam/bin/view/Linux4SAM/GettingStarted
|
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
|
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,
|
application is present on supported media (NOR FLASH, Serial DataFlash,
|
||||||
NAND FLASH, SD card).
|
NAND FLASH, SD card).
|
||||||
@@ -1519,7 +1543,7 @@ SDRAM Support
|
|||||||
|
|
||||||
System Type->External Memory Configuration
|
System Type->External Memory Configuration
|
||||||
CONFIG_SAMA5_DDRCS=y : Tell the system that DRAM is at the DDR CS
|
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_SAMA5_DDRCS_LPDDR2=y : Its DDR2
|
||||||
CONFIG_SAMA5D3xEK_MT47H128M16RT=y : This is the type of DDR2
|
CONFIG_SAMA5D3xEK_MT47H128M16RT=y : This is the type of DDR2
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void sam_boardinitialize(void)
|
|||||||
|
|
||||||
#if defined(CONFIG_SAMA5_DDRCS) && !defined(CONFIG_SAMA5_BOOT_SDRAM)
|
#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
|
* (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
|
* of SDRAM then we have to assume that some second level bootloader has properly
|
||||||
* configured SDRAM for our use.
|
* configured SDRAM for our use.
|
||||||
@@ -103,7 +103,7 @@ void sam_boardinitialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
* 2) the EMAC or GMAC module is enabled, and 2) the weak function
|
||||||
* sam_netinitialize() has been brought into the build.
|
* sam_netinitialize() has been brought into the build.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -122,8 +122,6 @@ static inline void sam_sdram_delay(unsigned int loops)
|
|||||||
* Name: sam_sdram_config
|
* Name: sam_sdram_config
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Configures DDR2 (MT47H128M16RT 128MB/ MT47H64M16HR)
|
|
||||||
*
|
|
||||||
* Configures DDR2 (MT47H128M16RT 128MB or, optionally, MT47H64M16HR)
|
* Configures DDR2 (MT47H128M16RT 128MB or, optionally, MT47H64M16HR)
|
||||||
*
|
*
|
||||||
* Per the SAMA5D3x-EK User guide: "Two SDRAM/DDR2 used as main system memory.
|
* Per the SAMA5D3x-EK User guide: "Two SDRAM/DDR2 used as main system memory.
|
||||||
|
|||||||
Reference in New Issue
Block a user