Submodules
libnxembeddedtools.ngultra.address module
This module contains all the addresses of memories of NGUltra.
-
class
libnxembeddedtools.ngultra.address.
NGUltraAddress
Bases:
object
-
DDR_ba
= 2147483648
-
ERAM_ba
= 50331648
-
libnxembeddedtools.ngultra.bl1 module
This module contains all the needed to generate a BL1 descriptorused by the BL1.
-
class
libnxembeddedtools.ngultra.bl1.
DescriptorGenerator
(desc_path) Bases:
object
This class is dedicated to the descriptor generation.
Parameters: desc_path (str) – Final path of the BL1 descriptor.
-
generate
() Generate the final descriptor.
-
libnxembeddedtools.ngultra.bsm module
This module contains everything to program the BSM of NGUltra
-
class
libnxembeddedtools.ngultra.bsm.
Loader
(iface) Bases:
object
Class used to program the BSM.
Parameters: iface (
Interface
) – interface used to communicate with the board.-
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
This module contains the tools to use the fast commands. Fast commands are a set a commands that use a running programm on the SoCto speed up the transfer of files. With fast commands you can read/write the flash and program the BSM.
When using fast commands, you will interrupt and replace the running program on core 0.
-
class
libnxembeddedtools.ngultra.fastcommands.
FastCommands
(iface) Bases:
object
-
ngultraInit
() Initialise NGUltra (PLLs and DDR).
-
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.
-
-
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.
-
-
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”.
-
-
libnxembeddedtools.ngultra.flash module
This module contains everything to read/write data from/into the flash memory.
-
class
libnxembeddedtools.ngultra.flash.
Controller
Bases:
object
This class is dedicated to the management of the flash controller.
-
erase
(flashId) Totally erase the specified flash.
Parameters: flashId (int) – The flash to erase.
Flash id goes from 0 to 3.
-
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.
Flash id goes from 0 to 3.
Sector size depends of the flash. For the “S25FL512S” (used on the bringup board) the sector size is 256KB.
-
-
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.
Flash id goes from 0 to 3.
-
-
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”.
Flash id goes from 0 to 3.
-
-
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.
Flash id goes from 0 to 3.
-
-
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.
Flash id goes from 0 to 3.
-
-
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.
Flash id goes from 0 to 3.
-
-
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;
Flash id goes from 0 to 3.
-
-
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”.
Flash id goes from 0 to 3.
-
-
libnxembeddedtools.ngultra.memory module
This module contains usefull commands for the memory of NGUltra
-
class
libnxembeddedtools.ngultra.memory.
Memory
(iface=None) Bases:
object
Class representing the Memory of the SoC.
-
loadImage
(image, core, address) Load a binary file for the specified core. If the load address is contained on the eRAM, the eRAM will be scrubbed first.
Parameters: -
image (str) – Path of the binary file to load.
-
core (int) – Core where to load the image.
-
address (int) – Core where to load the image.
This will not set the PC of the core.
-
-
scrubEram
() Totally erase the eRAM.
-
libnxembeddedtools.ngultra.reset module
This module contains everything to send reset to the target.
-
class
libnxembeddedtools.ngultra.reset.
Reset
(remoteAPI) Bases:
object
This class contains everything to send all types of reset to the target.
-
postMortemReset
() Perform a Post Mortem reset
-
powerOnReset
() Perform a System reset
-
systemReset
() Perform a System reset
-