README 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. ================================================================================
  2. Useful notes on bulding and using of U-Boot on
  3. ARC IoT Development Kit (AKA IoTDK)
  4. ================================================================================
  5. BOARD OVERVIEW
  6. The DesignWare ARC IoT Development Kit is a versatile platform that includes
  7. the necessary hardware and software to accelerate software development and
  8. debugging of sensor fusion, voice recognition and face detection designs.
  9. The ARC IoT Development Kit includes a silicon implementation of the
  10. ARC Data Fusion IP Subsystem running at 144 MHz on SMIC's
  11. 55-nm ultra-low power process, and a rich set of peripherals commonly used
  12. in IoT designs such as USB, UART, SPI, I2C, PWM, SDIO and ADCs.
  13. The board is shipped with pre-installed U-Boot in non-volatile memory
  14. (eFlash) so on power-on user sees U-Boot start header and command line
  15. prompt which might be used for U-Boot environment fine-tuning, manual
  16. loading and execution of user application binaries etc.
  17. The board has the following features useful for U-Boot:
  18. * On-board 2-channel FTDI TTL-to-USB converter
  19. - The first channel is used for serial debug port (which makes it possible
  20. to use a serial connection on pretty much any host machine be it
  21. Windows, Linux or Mac).
  22. On Linux machine typucally FTDI serial port would be /dev/ttyUSB0.
  23. There's no HW flow-control and baud-rate is 115200.
  24. - The second channel is used for built-in Digilent USB JTAG probe.
  25. That means no extra hardware is required to access ARC core from a
  26. debugger on development host. Both proprietary MetaWare debugger and
  27. open source OpenOCD + GDB client are supported.
  28. - Also with help of this FTDI chip it is possible to reset entire
  29. board with help of a special `rff-ftdi-reset` utility, see:
  30. https://github.com/foss-for-synopsys-dwc-arc-processors/rff-ftdi-reset
  31. * Micro SD-card slot
  32. - U-Boot expects to see the very first partition on the card formatted as
  33. FAT file-system and uses it for keeping its environment in `uboot.env`
  34. file. Note uboot.env is not just a text file but it is auto-generated
  35. file created by U-Boot on invocation of `saveenv` command.
  36. It contains a checksum which makes this saved environment invalid in
  37. case of maual modification.
  38. - There might be more useful files on that first FAT partition like
  39. user applications, data files etc.
  40. * USB OTG connector
  41. - U-Boot may access USB mass-storage devices attached to this connector.
  42. Note only FAT file-system is supported. It might be used for storing
  43. user application binaries as well as micro SD-card mentioned above.
  44. * The following memories are avaialble on the board:
  45. - eFlash: 256 KiB @ 0x0000_0000
  46. A non-volatile memory from which ARC core may execute code directly.
  47. Still is is not direcly writable, thus this is not an ordinary RAM.
  48. - ICCM: 256 KiB @ 0x2000_0000
  49. Instruction Closely Coupled Memory - fast on-chip memory primary used
  50. for code being executed, still data could be placed in this memory too.
  51. In that sense it's just a general purpose RAM.
  52. - SRAM: 128 KiB @ 0x3000_0000
  53. On-chip SRAM. From user perspective is the same as ICCM above.
  54. - DCCM: 128 KiB @ 0x8000_0000
  55. Data Closely Coupled Memory is similar to ICCM with a major difference -
  56. ARC core cannot execute code from DCCM. So this is very special RAM
  57. only suitable for data.
  58. BUILDING U-BOOT
  59. 1. Configure U-Boot:
  60. ------------------------->8----------------------
  61. make iot_devkit_defconfig
  62. ------------------------->8----------------------
  63. 2. To build Elf file (for example to be used with host debugger via JTAG
  64. connection to the target board):
  65. ------------------------->8----------------------
  66. make mdbtrick
  67. ------------------------->8----------------------
  68. This will produce `u-boot` Elf file.
  69. 3. To build binary image to be put in "ROM":
  70. ------------------------->8----------------------
  71. make u-boot.bin
  72. ------------------------->8----------------------
  73. EXECUTING U-BOOT
  74. 1. The IoTDK board is supposed to auto-start U-Boot image stored in eFlash on
  75. power-on. Note it's possible to update that image - follow instructions in
  76. user's manual.
  77. 2. Though it is possible to load and start U-Boot as a simple Elf file
  78. via JTAG right in ICCM. For that it's required to re-configure U-Boot
  79. so it gets linked to ICCM address 0x2000_0000 (remember eFlash is not
  80. direcly writable).
  81. Run U-Boot's configuration utility with "make menuconfig", go to
  82. "Boot images" and change "Text Base" from default 0x00000000 to
  83. 0x20000000. Exit & save new configuration. Now run "make mdbtrick" to
  84. build new Elf.
  85. 2.1. In case of proprietary MetaWare debugger run:
  86. ------------------------->8----------------------
  87. mdb -digilent u-boot
  88. ------------------------->8----------------------
  89. USING U-BOOT
  90. Note due to limited memory size it's supposed that user will run binary
  91. images of their applications instead of loading Elf files.
  92. 1. To load and start application binary from micro SD-card execute
  93. the following commands in U-Boot's shell:
  94. ------------------------->8----------------------
  95. fatload mmc 0 0x20000000 yourapp.bin
  96. go 0x20000000
  97. ------------------------->8----------------------
  98. 2. To load and start application binary from USB mass-storage device execute
  99. the following commands in U-Boot's shell:
  100. ------------------------->8----------------------
  101. usb start
  102. fatload usb 0x20000000 yourapp.bin
  103. go 0x20000000
  104. ------------------------->8----------------------
  105. 3. To have a sequence of commands executed on U-Boot start put those
  106. commands in "bootcmd" with semicolon between them.
  107. For example to get (1) done automatically:
  108. ------------------------->8----------------------
  109. setenv bootcmd fatload mmc 0 0x20000000 yourapp.bin\; go 0x20000000
  110. saveenv
  111. ------------------------->8----------------------
  112. 4. To reboot the board just run:
  113. ------------------------->8----------------------
  114. reset
  115. ------------------------->8----------------------