README.txt 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. README
  2. ======
  3. This directory contains the port of NuttX to the Beaglebone Black board
  4. See http://beagleboard.org for information about Beaglebone Black. This
  5. board is based around the TI AM335x Sitara Cortex-A8 CPU.
  6. This port was developed on the rev. C of the board:
  7. Beaglebone Black (See http://beagleboard.org/black)
  8. ITEMS DETAILS
  9. -------------------- ---------------------------------------------------
  10. CPU 1GHz ARM Cortex-A8
  11. GPU SG530 3D, 20M Polygons/S
  12. DRAM 512MB DDR3 800MHz
  13. Onboard Storage 4GB, 8bit Embedded MMC, microSD card (TF) slot for up to 32GB
  14. Video Output HDMI
  15. Extension Interface 2.54mm Headers, 92 pins
  16. Network interface 10/100Mbps RJ45
  17. Power 5V, 1000mA
  18. Overall Size 3.4" X 2.15"
  19. Main features of the TI AM335x Sitara
  20. (See http://www.ti.com/product/am3358):
  21. CPU
  22. - ARM Cortex-A8
  23. - 32KB I-Cache
  24. - 32KB D-Cache
  25. - 256KB L2 Cache with ECC
  26. FPU
  27. - NEON SIMD Coprocessor
  28. Memory
  29. - 176KB of On-Chip Boot ROM
  30. - 64KB of Dedicated RAM
  31. - 64KB of General-Purpose On-Chip Memory Controller (OCMC) RAM
  32. - 16-bit DDR2/DDR3
  33. - Memory capacity up to 8G bits
  34. - 8-Bit and 16-Bit Asynchronous Memory Interface with up to Seven Chip Selects (NAND, NOR, Muxed-NOR, SRAM)
  35. Boot Devices
  36. - NAND Flash
  37. - SPI NOR Flash
  38. - SD Card
  39. - UART
  40. TODO:
  41. Contents
  42. ========
  43. - Beaglebone black Rev.C Connectors
  44. - Serial Console
  45. - LEDs
  46. - Buttons
  47. - JTAG
  48. - Booting NuttX from an SD card
  49. - Configurations
  50. Beaglebone black Rev.C Connectors
  51. =====================
  52. Serial Console
  53. ==============
  54. By default, the serial console will be provided on UART0 in all of these
  55. configurations.
  56. UART0 is available on the 6-pin Debug connector:
  57. Pin 1: GND
  58. Pin 2: N/C
  59. Pin 3: N/C
  60. Pin 4: B_UART0_RX / UART0_RX / PIN E15
  61. Pin 5: B_UART0_TX / UART0_TX / PIN E16
  62. Pin 6: N/C
  63. PIN E16: UART0_TXD/SPI1_CS1/DCAN0_RX/I2C2_SCL/ECAP1_IN_PWM1_OUT/
  64. PR1_PRU1_PRU_R30_15/PR1_PRU1_PRU_R31_15/GPIO1_11
  65. PIN E15: UART0_RXD/SPI1_CS0/DCAN0_TX/I2C2_SDA/ECAP2_IN_PWM2_OUT/
  66. PR1_PRU1_PRU_R30_14/PR1_PRU1_PRU_R31_14/GPIO1_10
  67. LEDs
  68. ====
  69. The Beaglebone black Rev. C has four blue LEDs; three can be controlled from software.
  70. Two are tied to ground and, hence, illuminated by driving the output pins to a high
  71. value:
  72. 1. LED0 GPMC_A5 GPMC_A5/GMII2_TXD0/RGMII2_TD0/RMII2_TXD0/GPMC_A21/
  73. PR1_MII1_RXD3/eQEP1B_IN/GPIO1_21
  74. 2. LED1 GPMC_A6 GPMC_A6/GMII2_TXCLK/RGMII2_TCLK/MMC2_DAT4/GPMC_A22/
  75. PR1_MII1_RXD2/eQEP1_INDEX/GPIO1_22
  76. 3. LED2 GPMC_A7 GPMC_A7/GMII2_RXCLK/RGMII2_RCLK/MMC2_DAT5/GPMC_A23/
  77. PR1_MII1_RXD1/eQEP1_STROBE/GPIO1_23
  78. 4. LED3 GPMC_A8 GPMC_A8/GMII2_RXD3/RGMII2_RD3/MMC2_DAT6/GPMC_A24/
  79. PR1_MII1_RXD0/MCASP0_ACLKX/GPIO1_24
  80. These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
  81. defined. In that case, the usage by the board port is defined in
  82. include/board.h and src/am335x_leds.c. The LEDs are used to encode OS-related
  83. events as follows:
  84. SYMBOL Meaning LED state
  85. LED1 LED3 LED4
  86. ----------------- ----------------------- ---- ---- ------------
  87. LED_STARTED NuttX has been started ON OFF OFF
  88. LED_HEAPALLOCATE Heap has been allocated OFF ON OFF
  89. LED_IRQSENABLED Interrupts enabled ON ON OFF
  90. LED_STACKCREATED Idle stack created ON ON OFF
  91. LED_INIRQ In an interrupt N/C N/C Soft glow
  92. LED_SIGNAL In a signal handler N/C N/C Soft glow
  93. LED_ASSERTION An assertion failed N/C N/C Soft glow
  94. LED_PANIC The system has crashed N/C N/C 2Hz Flashing
  95. LED_IDLE MCU is is sleep mode Not used
  96. After booting, LED1 and 3 are not longer used by the system and can be used for
  97. other purposes by the application (Of course, all LEDs are available to the
  98. application if CONFIG_ARCH_LEDS is not defined.
  99. Buttons
  100. =======
  101. JTAG
  102. ====
  103. Booting NuttX from an SD card
  104. =============================
  105. These are the steps to get U-Boot booting from SD Card:
  106. 1. Configure and build the NuttX Beaglebone Black configuration. You
  107. should have a file alled nuttx.bin when the build completes.
  108. 2. Insert a FLASH stick into the host PC and format it for FAT32 FS.
  109. 3. Copy nuttx.bin into FLASH stick root.
  110. 4. Remove the FLASH stick from the host PC. Insert into the Beaglebone
  111. Black microSD slot.
  112. 5. Connect a RS-232 Converted or USB serial adapter onto the Beaglebone
  113. Black board and open a serial terminal on the host PC to communicate
  114. with the target.
  115. 6. Reset the Stop Beaglebone Black boot. You should see output from
  116. U-boot in the serial console. Stop the normal boot-up sequence
  117. after the U-Boot prompt before Linux is started.:
  118. Hit any key to stop autoboot: 0
  119. U-Boot#
  120. 7. Load Nuttx into memory from the U-Boot prompt and run
  121. U-Boot# load mmc 0 0x8a000000 nuttx.bin
  122. U-Boot# go 0x8a000000
  123. If your are running the 'nsh' configuration you then should see:
  124. NuttShell (NSH)
  125. nsh>
  126. Configurations
  127. ==============
  128. Information Common to All Configurations
  129. ----------------------------------------
  130. Each Beaglebone Black configuration is maintained in a sub-directory and
  131. can be selected as follow:
  132. tools/configure.sh [OPTIONS] beaglebone-black/<subdir>
  133. Where [OPTIONS] include -l to configure for a Linux host platform and
  134. -c means to configure for a Windows Cygwin host platform. -h will give
  135. you the list of all options.
  136. Before building, make sure the PATH environment variable includes the
  137. correct path to the directory than holds your toolchain binaries.
  138. And then build NuttX by simply typing the following. At the conclusion of
  139. the make, the nuttx binary will reside in an ELF file called, simply, nuttx.
  140. make
  141. The <subdir> that is provided above as an argument to the tools/configure.sh
  142. must be is one of the following.
  143. NOTES:
  144. 1. These configurations use the mconf-based configuration tool. To
  145. change any of these configurations using that tool, you should:
  146. a. Build and install the kconfig-mconf tool. See nuttx/README.txt
  147. see additional README.txt files in the NuttX tools repository.
  148. b. Execute 'make menuconfig' in nuttx/ in order to start the
  149. reconfiguration process.
  150. 2. Unless stated otherwise, all configurations generate console
  151. output on UART0.
  152. 3. All of these configurations use the Code Sourcery for Windows toolchain
  153. (unless stated otherwise in the description of the configuration). That
  154. toolchain selection can easily be reconfigured using 'make menuconfig'.
  155. Here are the relevant current settings:
  156. Build Setup:
  157. CONFIG_HOST_WINDOWS=y : Microsoft Windows
  158. CONFIG_WINDOWS_CYGWIN=y : Using Cygwin or other POSIX environment
  159. System Type -> Toolchain:
  160. CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery for Windows
  161. Configuration Sub-directories
  162. -----------------------------
  163. nsh:
  164. This configuration directory provide the NuttShell (NSH). There are
  165. STATUS:
  166. 2019-01-06: Work in progress. Till now it is possible to pass arm_boot(), but
  167. Prefetch abort is met when devnull_register() call is done. Have no idea why.
  168. I was able to trace down to _inode_search() call. If I put any debug statement
  169. like "up_lowputc('0');" right after "desc->node = node;" statement at line 425
  170. the code does not crash.
  171. 2019-01-09: The NSH configuration is now functional.
  172. 2019-01-16: Correct timer interrupts by switching to DMTimer2 (DMTimer1ms is
  173. not initialized by U-Boot).