Embedded Linux Examples
The Linux examples are contained in the bookâs compressed file under the ProgEmbSys/chapter12 directory. If you followed the installation instructions in Appendix B, the files should be located in the proper directory. Otherwise, these files can be extracted into any directory, but we recommend installing the example source code files in the /opt/ProgEmbSys/chapter12 directory.
Tip
We do not cover building the Linux kernel that runs on the Arcom board. For additional information about building the Linux kernel, refer to the Arcom Embedded Linux Technical Manual.
Building the Linux Examples
To build any of the Chapter 12 Linux examples, proceed as follows.
Open a terminal window and change to the directory of the examples you would like to build. For instance, to build the blink example, enter the command:
#
cd /opt/ProgEmbSys/chapter12/blink
Then build the example code using the makefile with the following command:
#
make
This should produce two executable files named blink and blinkdbg.
Downloading and Running the Linux Examples
To download the examples and run them on the Arcom board, first boot embedded Linux. Make sure you connect the Arcom boardâs COM1 port to your PCâs serial port and are running a console program, such as minicom.
Tip
Ensure you have the Arcom boardâs Ethernet board connected to the main board. Then connect an Ethernet cable between the Arcom board and your computer (either directly or via a hub). The instructions for connecting the Ethernet ...
Get Programming Embedded Systems, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.