Running programs

From RFID Wiki


The way to launch programs depends on the type of platform. E.g., eCos builds require uploading of programs; host builds that use the Pegoda reader require a wrapper script around programs to enable them to locate the Pegoda .dlls.


Contents

[edit] Simulator build

For simulator builds, just run the program (with the appropriate options).


[edit] eCos build

For running on the Triton using an eCos build, you need to open a terminal window that listens to the serial port that is connected to the Guardian. Use hyperterm under Windows, use minicom -o under Linux. For the Triton, the default settings are: 115200 8N1. For the Stamp-bf537, default settings are: 57600 8N1.

The running program prints to/reads from this terminal.

[edit] Upload and run the program

Two possibilities: Ethernet and Serial Line. Ethernet only works if the Guardian has Ethernet (v1, v4).

  • Ethernet
On the host machine (the machine where you built the executble), copy the executable to the TFTP region:
$ cp <executable-name> /tftpboot/
Enter upload command via TFTP from the default host to the Guardian that boots RedBoot:
RedBoot> load <executable-name>
RedBoot> go
Or for a U-Boot platform:
BF537> tftp 0x01000000 <executable-name>
####### progress markers
BF537> bootelf
Load address and filename can be stored in flash, so next time the upload command can be abbreviated:
BF537> setenv bootfile <executable-name>
BF537> setenv fileaddr 0x01000000
BF537> saveenv
BF537> tftp ####### progress markers
BF537> bootelf
  • Serial line
Start the reception side on the guardian:
RedBoot> load -m ymodem
Then use the ymodem upload mechanism of your terminal program to start the upload. For minicom, that is ^As and specify the (stripped) executable that you built (main.stripped etc). For hyperterm, use the [Send File] button.
After the upload has finished, start the program from RedBoot:
RedBoot> run
Don't use the RedBoot command 'go'. It triggers a bug our RedBoot/hardware combination.

[edit] Host build

For host builds, the environment needs to be set to find the Philips Pegoda DLLs. There is a wrapper to accomplish this:

$ ~MRG/bin/env.bash [main arguments...]