Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Submodules

libnxembeddedtools.ngultra.address module

This module contains all the addresses of memories of NGUltra.

...

Anchor
libnxembeddedtools.ngultra.address.NGUltraAddress
libnxembeddedtools.ngultra.address.NGUltraAddress
class libnxembeddedtools.ngultra.address.NGUltraAddress

Bases: object

Anchor
libnxembeddedtools.ngultra.address.NGUltraAddress.DDR_ba
libnxembeddedtools.ngultra.address.NGUltraAddress.DDR_ba
DDR_ba = 2147483648
Anchor
libnxembeddedtools.ngultra.address.NGUltraAddress.ERAM_ba
libnxembeddedtools.ngultra.address.NGUltraAddress.ERAM_ba
ERAM_ba = 50331648

...

libnxembeddedtools.ngultra.bl1 module

This module contains all the needed to generate a BL1 descriptorused by the BL1.

...

Anchor
libnxembeddedtools.ngultra.bsm.Loader
libnxembeddedtools.ngultra.bsm.Loader
class libnxembeddedtools.ngultra.bsm.Loader(iface)

Bases: object

Class used to program the BSM.

Parameters:

iface (Interface) – interface used to communicate with the board.

Anchor
libnxembeddedtools.ngultra.bsm.Loader.program
libnxembeddedtools.ngultra.bsm.Loader.program
program(nxbFile, address=None)

Program the BSM with the provided nxbFile:

Parameters:
  • nxbFile (str) – NXB to program.

  • address (int) – Address where the NXB is stored. If None, it uses the default loader address in the eRAM.

...

libnxembeddedtools.ngultra.fastcommands module

...

Anchor
libnxembeddedtools.ngultra.fastcommands.FastCommands
libnxembeddedtools.ngultra.fastcommands.FastCommands
class libnxembeddedtools.ngultra.fastcommands.FastCommands(iface)

Bases: object

Anchor
libnxembeddedtools.ngultra.fastcommands.FastCommands.ngultraInit
libnxembeddedtools.ngultra.fastcommands.FastCommands.ngultraInit
ngultraInit()

Initialise NGUltra (PLLs and DDR).

Anchor
libnxembeddedtools.ngultra.fastcommands.FastCommands.programBSM
libnxembeddedtools.ngultra.fastcommands.FastCommands.programBSM
programBSM(nxbFile, address=None)

Program the BSM with a given NXB file.

Parameters:
  • nxbFile (str) – Path of the NXB file.

  • address (int) – Address where the NXB is stored. If None, it uses the default loader address in the eRAM.

Anchor
libnxembeddedtools.ngultra.fastcommands.FastCommands.readFlash
libnxembeddedtools.ngultra.fastcommands.FastCommands.readFlash
readFlash(flashId, outputFile, base_address, size)

Read the flash and write the result in a file

Parameters:
  • flashId (int) – flash to read;

  • outputFile (str) – Path of the file where to write the result.

  • base_address (int) – Address in the flash where to read the file.

  • size (int) – Number of 256 bytes to read.

Anchor
libnxembeddedtools.ngultra.fastcommands.FastCommands.writeFlash
libnxembeddedtools.ngultra.fastcommands.FastCommands.writeFlash
writeFlash(flashId, inputFile, base_address, byteorder='little')

Write the flash with the given file.

Parameters:
  • flashId (int) – flash to write;

  • inputFile (str) – Path of the file to write.

  • base_address (int) – Address in the flash where to write the file.

  • byteorder (str) – Byteorder of the file. Must be “little” or “big”.

...

Anchor
libnxembeddedtools.ngultra.flash.Controller
libnxembeddedtools.ngultra.flash.Controller
class libnxembeddedtools.ngultra.flash.Controller

Bases: object

This class is dedicted dedicated to the management of the flash controller.

Anchor
libnxembeddedtools.ngultra.flash.Controller.erase
libnxembeddedtools.ngultra.flash.Controller.erase
erase(flashId)

Totally erase the specified flash.

Parameters:

flashId (int) – The flash to erase.

Info

Flash id goes from 0 to 3.

Anchor
libnxembeddedtools.ngultra.flash.Controller.eraseSector
libnxembeddedtools.ngultra.flash.Controller.eraseSector
eraseSector(flashId, address)

Erase a sector of the specified flash.

Parameters:
  • flashId (int) – The flash to erase.

  • address (int) – Begining of the sector to erase.

Info

Flash id goes from 0 to 3.

Info

Sector size depends of the flash. For the “S25FL512S” (used on the bringup board) the sector size is 256KB.

Anchor
libnxembeddedtools.ngultra.flash.Controller.fastReadData
libnxembeddedtools.ngultra.flash.Controller.fastReadData
fastReadData(flashId, outputFile, address, size)

Dump the content of the specified flash to a file using fast commands API.

Parameters:
  • flashId (int) – The flash to read.

  • outputFile (str) – Path of the file of the dump.

  • address (int) – Address where to write the data.

  • size (str) – Number of 256B block to read.

Info

Flash id goes from 0 to 3.

Anchor
libnxembeddedtools.ngultra.flash.Controller.fastWriteData
libnxembeddedtools.ngultra.flash.Controller.fastWriteData
fastWriteData(flashId, inputFile, address, byteorder='little')

Write a file to the specified flash using fast commands API.

Parameters:
  • flashId (int) – The flash to write.

  • inputFile (str) – Path of the file to write

  • address (int) – Address where to write the data.

  • byteorder (str) – Byteorder of the file. Must be “big” or “little”.

Info

Flash id goes from 0 to 3.

Anchor
libnxembeddedtools.ngultra.flash.Controller.fastWriteDataPadded
libnxembeddedtools.ngultra.flash.Controller.fastWriteDataPadded
fastWriteDataPadded(flashId, inputFile, address, byteorder='little', modulo=64)

Write a file to the specified flash using fast commands API. This file will be padded before writing it.

Parameters:
  • flashId (int) – The flash to write.

  • inputFile (str) – Path of the file to write

  • address (int) – Address where to write the data.

  • byteorder (str) – Byteorder of the file. Must be “big” or “little”.

  • modulo (int) – Used to compute the size of the padding.

Info

Flash id goes from 0 to 3.

Anchor
libnxembeddedtools.ngultra.flash.Controller.readToFile
libnxembeddedtools.ngultra.flash.Controller.readToFile
readToFile(flashId, outputFile, address, size)

Dump the content of the specified flash to a file.

Parameters:
  • flashId (int) – The flash to read.

  • outputFile (str) – Path of the file of the dump.

  • address (int) – Address where to write the data.

  • size (str) – Number of 256B block to read.

Info

Flash id goes from 0 to 3.

Anchor
libnxembeddedtools.ngultra.flash.Controller.writeBL1
libnxembeddedtools.ngultra.flash.Controller.writeBL1
writeBL1(flashId, inputFile, key)

Write the specified file on the specified flash considering it as a BL1. This file will be signed and written at address 0.

Parameters:
  • flashId (int) – The flash to write.

  • inputFile (str) – Path of the file to write.

  • key (str) – Path of the key needed to sign the file.

Info

Flash id goes from 0 to 3.

Anchor
libnxembeddedtools.ngultra.flash.Controller.writeData
libnxembeddedtools.ngultra.flash.Controller.writeData
writeData(flashId, address, data)

Write the specified flash with provided data.

Parameters:
  • flashId (int) – The flash to write.

  • address (int) – Address where to write the data.

  • data (list) – Data to write;

Info

Flash id goes from 0 to 3.

Anchor
libnxembeddedtools.ngultra.flash.Controller.writeFromFile
libnxembeddedtools.ngultra.flash.Controller.writeFromFile
writeFromFile(flashId, inputFile, address, byteorder='little')

Write a file to the specified flash.

Parameters:
  • flashId (int) – The flash to write.

  • inputFile (str) – Path of the file to write

  • address (int) – Address where to write the data.

  • byteorder (str) – Byteorder of the file. Must be “big” or “little”.

Info

Flash id goes from 0 to 3.

...