Once your program is working, you can save it onto the PXS by writing it into the Flash file system. The Flash file system is managed using the RedBoot FIS commands. To list the files in the Flash file system, use the fis listcommand:
RedBoot> fis list FLASH: 0x05030000 - 0x05400000, 61 blocks of 0x00010000 bytes each. Name FLASH Addr Mem Addr Length Entry Point hdlcsrv 0x05030000 0x00000000 0x00080000 0x00000000 laygocfg 0x053D0000 0x053D0000 0x00010000 0x00000000 pxscfg 0x053E0000 0x053E0000 0x00010000 0x00000000 FIS_directory 0x053F0000 0x053F0000 0x00010000 0x00000000
The last 3 blocks of Flash (entries laygocfg
, pxscfg
and FIS_directory
)
are reserved for system use and should never be deleted or modified. This
leaves 58 pages pages of 64K each available to store programs.
To write a program image into Flash, load it into the PXS, then use the fis create command:
RedBoot> load -r pdktest.bin Loading from default TFTP server: 192.168.250.2 Defaulting to entry point of 0x00000000. Raw load done: 436448 bytes read Address range: 00000000-0006a8e0, Entry point: 00000000, RedBoot> fis create pdktest ... Erase from 0x050B0000-0x05120000: ....... ... Program from 0x00000000-0x0006a8e1 at 0x050B0000: ....... ... Erase from 0x053f0000-0x05400000: . ... Program from 0x007a0000-0x007b0000 at 0x053f0000: . RedBoot> fis list FLASH: 0x05030000 - 0x05400000, 61 blocks of 0x00010000 bytes each. Name FLASH Addr Mem Addr Length Entry Point hdlcsrv 0x05030000 0x00000000 0x00080000 0x00000000 pdktest 0x050B0000 0x00000000 0x00070000 0x00000000 laygocfg 0x053D0000 0x053D0000 0x00010000 0x00000000 pxscfg 0x053E0000 0x053E0000 0x00010000 0x00000000 FIS_directory 0x053F0000 0x053F0000 0x00010000 0x00000000
Once the program is written into Flash, it can be set to load as the default application:
RedBoot> default Default application: hdlcsrv RedBoot> app Installed applications: hdlcsrv version 3.23 pdktest version 1.18 RedBoot> default pdktest Default application: pdktest
The program can also be loaded and executed directly from Flash:
RedBoot> fis load pdktest RedBoot> go
To delete an entry in the Flash file system, use the fis delete command:
RedBoot> fis delete pdktest Delete image 'pdktest' - are you sure (y/n)? y ... Erase from 0x050B0000-0x05120000: ....... ... Erase from 0x053f0000-0x05400000: . ... Program from 0x007a0000-0x007b0000 at 0x053f0000: .
If you want to update an program image for which there is already an entry in Flash, first delete the entry, then load the image and recreate the entry.