README 3.6 KB

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