README 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ================================================================================
  2. Useful notes on bulding and using of U-Boot on ARC EM Development Kit (AKA EMDK)
  3. ================================================================================
  4. BOARD OVERVIEW
  5. The DesignWare ARC EM Development Kit is FPGA-bases platform for rapid
  6. software development on the ARC EM family of processors.
  7. Since this board is based on FPGA it's possible to load and use different
  8. versions of ARC EM CPUs. U-Boot is built to be run on the simplest
  9. possible configuration which means the same one binary will work on more
  10. advanced configurations as well.
  11. The board has the following features useful for U-Boot:
  12. * On-board 2-channel FTDI TTL-to-USB converter
  13. - The first channel is used for serial debug port (which makes it possible
  14. to use a serial connection on pretty much any host machine be it
  15. Windows, Linux or Mac).
  16. On Linux machine typucally FTDI serial port would be /dev/ttyUSB0.
  17. There's no HW flow-control and baud-rate is 115200.
  18. - The second channel is used for built-in Digilent USB JTAG probe.
  19. That means no extra hardware is required to access ARC core from a
  20. debugger on development host. Both proprietary MetaWare debugger and
  21. open source OpenOCD + GDB client are supported.
  22. - Also with help of this FTDI chip it is possible to reset entire
  23. board with help of a special `rff-ftdi-reset` utility, see:
  24. https://github.com/foss-for-synopsys-dwc-arc-processors/rff-ftdi-reset
  25. * Micro SD-card slot
  26. - U-Boot expects to see the very first partition on the card formatted as
  27. FAT file-system and uses it for keeping its environment in `uboot.env`
  28. file. Note uboot.env is not just a text file but it is auto-generated
  29. file created by U-Boot on invocation of `saveenv` command.
  30. It contains a checksum which makes this saved environment invalid in
  31. case of maual modification.
  32. - There might be more useful files on that first FAT partition like
  33. user applications, data files etc.
  34. * 256 KiB of "ROM"
  35. - This so-called "ROM" is a part of FPGA image and even though it
  36. might be unlocked for writes its initial content will be restored
  37. on the next power-on.
  38. BUILDING U-BOOT
  39. 1. Configure U-Boot:
  40. ------------------------->8----------------------
  41. make emdk_defconfig
  42. ------------------------->8----------------------
  43. 2. To build Elf file (for example to be used with host debugger via JTAG
  44. connection to the target board):
  45. ------------------------->8----------------------
  46. make mdbtrick
  47. ------------------------->8----------------------
  48. This will produce `u-boot` Elf file.
  49. 3. To build binary image to be put in "ROM":
  50. ------------------------->8----------------------
  51. make u-boot.bin
  52. ------------------------->8----------------------
  53. EXECUTING U-BOOT
  54. 1. The EMDK board is supposed to auto-start U-Boot image stored in ROM on
  55. power-on. For that make sure VCCIO DIP-switches are all in "off" state.
  56. 2. Though it is possible to load U-Boot as a simple Elf file via JTAG right
  57. in "ROM" and start it from the debugger. One important note here we first
  58. need to enable writes into "ROM" by writing 1 to 0xf0001000.
  59. 2.1. In case of proprietary MetaWare debugger run:
  60. ------------------------->8----------------------
  61. mdb -dll=opxdarc.so -OK -preloadexec="eval *(int*)0xf0001000=0" u-boot
  62. ------------------------->8----------------------