Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. import SAMBA 3.1
  2. import SAMBA.Connection.JLink 3.1
  3. import SAMBA.Device.SAMA5D2 3.1
  4.  
  5. AppletLoader {
  6. connection: JLinkConnection {
  7. //port: "99999999"
  8. }
  9.  
  10. device: SAMA5D2 {
  11. config {
  12. nandIoset: 2
  13. nandBusWidth: 8
  14. nandHeader: 0xc0902405
  15. //PMECC configuration: 0xc0902405
  16. //PMECC enabled
  17. //Sector size: 512
  18. //Sectors per page: 4
  19. //Spare size: 64
  20. //ECC bits: 4
  21. //ECC offset: 36
  22. }
  23. }
  24.  
  25. onConnectionOpened: {
  26.  
  27. // initialize NAND flash applet
  28. appletInitialize("nandflash")
  29.  
  30. // erase all memory
  31. // appletErase(0, connection.applet.memorySize)
  32. appletErase(0, 0x1100000)
  33.  
  34.  
  35. // write files
  36. appletWrite(0x00000, "boot.bin", true)
  37. appletWrite(0x10000, "zImage")
  38. appletWrite(0x1000000, "at91-sama5d2_xplained.dtb")
  39. // appletWrite(0x2000000, "rootfs.ubi")
  40.  
  41. // initialize boot config applet
  42. appletInitialize("bootconfig")
  43.  
  44. // Use BUREG0 as boot configuration word
  45. appletWriteBootCfg(BootCfg.BSCR, BSCR.fromText("VALID,BUREG0"))
  46.  
  47. // Enable external boot only on NFC IOSET2
  48. appletWriteBootCfg(BootCfg.BUREG0,
  49. BCW.fromText("EXT_MEM_BOOT,UART1_IOSET1,JTAG_IOSET1," +
  50. "SDMMC1_DISABLED,SDMMC0_DISABLED,NFC_IOSET2," +
  51. "NFC_IOSET1,SPI1_DISABLED,SPI0_DISABLED," +
  52. "QSPI1_DISABLED,QSPI0_DISABLED"))
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement