-
Notifications
You must be signed in to change notification settings - Fork 36
Running Your First Examples
The first example to try with your Openlab Fox is the led example:
make test_leds
make flash_test_leds
The orange and green leds should blink.
Source code for this example is available in
openlab/appli/tests/drivers/leds.c
This example can also be used to test your OpenOCD setup for GDB and start a remote debugging session.
HiKoB JTAG are equipped with an USB hub that connect two serial ports to your PC. The first serial port is used to control the JTAG interface while the second one is connected to the CPU.
The default serial communication speed for OpenLab is set
to 500kbaud. We usually use the pyserial
extension to configure the port although any tool will do.
The device will show up as /dev/ttyUSB* on Linux, a usual COM port
on Windows.
The pyserial extension comes with a very handy python script called
miniterm.py that we will use for the demo.
$ make flash_test_uart
$ miniterm.py -b 500000 -p /dev/ttyUSB1
--- Miniterm on /dev/ttyUSB1: 500000,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
Platform starting in 1...
Platform starting in 1...
Platform starting in 1...
Platform starting in 1...
GO!
Hello, World #0
Hello, World #FFFFFFFF
Hello, World #FFFFFFFE
Hello, World #FFFFFFFD
Hello, World #FFFFFFFC
Hello, World #FFFFFFFB
teraterm for Windows (see note)
The source code for the uart example can be found here
openlab/appli/tests/drivers/uart.c
Openlab Fox platforms are equiped with a USB port, using the test_usb_cdc_acm
target will provide you with a firmware that will add a serial USB device to
your PC. This device will be available through the JTAG integrated USB hub but
will remain available once the JTAG is off and your USB cable is plugged directly
on the Fox platform.
The device will show up as /dev/ttyACM* on Linux, a usual COM port
on Windows and a /dev/cu.usbmodem* on MacOSX.