|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.pc.tools.NXJFlashUpdate
public class NXJFlashUpdate
Class to allow the updating and verification of the leJOS firmware.
Constructor Summary | |
---|---|
NXJFlashUpdate(NXJFlashUI ui)
|
Method Summary | |
---|---|
byte[] |
createFilesystemImage()
Create a memory image for the leJOS file system. |
byte[] |
createFirmwareImage(java.io.File vmName,
java.io.File menuName,
java.lang.String home)
Create the memory image ready to be flashed to the device. |
NXTSamba |
openSambaDevice(int timeout)
Locate and open an nxt device in SAM-BA mode. |
void |
rebootDevice(NXTSamba nxt)
|
void |
resetDevice(NXTInfo nxt)
Attempt to restart the nxt in SAM-BA mode. |
void |
updateDevice(NXTSamba nxt,
byte[] memoryImage,
byte[] fs,
boolean verify)
Update the NXT with the new memory image. |
void |
updateDevice(NXTSamba nxt,
byte[] memoryImage,
byte[] fs,
boolean verifyFirm,
boolean verifyFS,
boolean reboot)
|
int |
verifyFilesystem(NXTSamba nxt,
byte[] fs)
|
int |
verifyFirmware(NXTSamba nxt,
byte[] image)
Verify the firware downloaded to the device. |
int |
verifyPages(NXTSamba nxt,
int first,
byte[] memoryImage)
Verify that the contents of the nxt flash memory match the supplied image. |
void |
writeFilesystem(NXTSamba nxt,
byte[] fs)
Format the nxt file system. |
void |
writeFirmware(NXTSamba nxt,
byte[] memoryImage)
Update the NXT with the new memory image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NXJFlashUpdate(NXJFlashUI ui)
Method Detail |
---|
public byte[] createFirmwareImage(java.io.File vmName, java.io.File menuName, java.lang.String home) throws java.io.IOException
commandLine
- Options for the location of the firmware and menu.
java.io.IOException
public byte[] createFilesystemImage()
public NXTSamba openSambaDevice(int timeout) throws NXTCommException, java.io.IOException
NXTCommException
java.io.IOException
public void resetDevice(NXTInfo nxt) throws NXTCommException, java.io.IOException
nxt
- The device to reset
NXTCommException
java.io.IOException
public int verifyPages(NXTSamba nxt, int first, byte[] memoryImage) throws java.io.IOException
nxt
- device to verifyfirst
- starting addressmemoryImage
- memory address to compare with
java.io.IOException
public void writeFirmware(NXTSamba nxt, byte[] memoryImage) throws java.io.IOException
nxt
- Device to update, must be open in SAM-BA mode.memoryImage
- New image for the devicecommandLine
- Update options
java.io.IOException
public void writeFilesystem(NXTSamba nxt, byte[] fs) throws java.io.IOException
nxt
- Device to formatfs
- File system image to use
java.io.IOException
public int verifyFirmware(NXTSamba nxt, byte[] image) throws java.io.IOException
nxt
- device to verifyimage
- firmware image to compare against
java.io.IOException
public int verifyFilesystem(NXTSamba nxt, byte[] fs) throws java.io.IOException
java.io.IOException
public void rebootDevice(NXTSamba nxt) throws java.io.IOException
java.io.IOException
public void updateDevice(NXTSamba nxt, byte[] memoryImage, byte[] fs, boolean verify) throws java.io.IOException
nxt
- Device to update, must be open in SAM-BA mode.memoryImage
- New firmware image for the devicefs
- File system image.verify
- Should we verify the updates?
java.io.IOException
public void updateDevice(NXTSamba nxt, byte[] memoryImage, byte[] fs, boolean verifyFirm, boolean verifyFS, boolean reboot) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |