Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import SAMBA 3.1
- import SAMBA.Connection.JLink 3.1
- import SAMBA.Device.SAMA5D2 3.1
- AppletLoader {
- connection: JLinkConnection {
- //port: "99999999"
- }
- device: SAMA5D2 {
- config {
- nandIoset: 2
- nandBusWidth: 8
- nandHeader: 0xc0902405
- //PMECC configuration: 0xc0902405
- //PMECC enabled
- //Sector size: 512
- //Sectors per page: 4
- //Spare size: 64
- //ECC bits: 4
- //ECC offset: 36
- }
- }
- onConnectionOpened: {
- // initialize NAND flash applet
- appletInitialize("nandflash")
- // erase all memory
- // appletErase(0, connection.applet.memorySize)
- appletErase(0, 0x1100000)
- // write files
- appletWrite(0x00000, "boot.bin", true)
- appletWrite(0x10000, "zImage")
- appletWrite(0x1000000, "at91-sama5d2_xplained.dtb")
- // appletWrite(0x2000000, "rootfs.ubi")
- // initialize boot config applet
- appletInitialize("bootconfig")
- // Use BUREG0 as boot configuration word
- appletWriteBootCfg(BootCfg.BSCR, BSCR.fromText("VALID,BUREG0"))
- // Enable external boot only on NFC IOSET2
- appletWriteBootCfg(BootCfg.BUREG0,
- BCW.fromText("EXT_MEM_BOOT,UART1_IOSET1,JTAG_IOSET1," +
- "SDMMC1_DISABLED,SDMMC0_DISABLED,NFC_IOSET2," +
- "NFC_IOSET1,SPI1_DISABLED,SPI0_DISABLED," +
- "QSPI1_DISABLED,QSPI0_DISABLED"))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement