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.

  1. 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:

  2. # cd /opt/ProgEmbSys/chapter12/blink
  3. Then build the example code using the makefile with the following command:

  4. # make
  5. 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.