## Section1.4Setting Up Your Raspberry Pi

In this section I describe how I set up my Raspberry Pi to do all the programming described in this book. Yes, I really have run all the programs on both my original Raspberry Pi 1 Model B and my new Raspberry Pi 3 Model B. You may choose to do things differently, depending on which Raspberry Pi you are using and your personal preferences.

This book is based on using the Raspbian operating system. I installed Raspbian version 9 (Stretch). It includes most of the programming tools you will need, but I recommend adding the binutils-doc package to get full documentation for the GNU assembler, as (sometimes called gas).The installed compilers, gcc and g++, are version 6.3.0, and the assembler version is 2.28.

You will also use a text editor for all your programming. Do not use a word processor. Word processors add a lot of hidden control characters to format the text. These hidden characters confuse compilers and assemblers, causing them not to work.

Raspbian comes with several simple text editors already installed. Go to www.raspberrypi.org and look under “HELP.” Under “DOCUMENTATION” click on “LINUX.” Then click on “Text editors” under “Usage.” I have found that many students like GNU Nano because it is easy to use.

You have probably learned how to program using an Integrated Development Environment (IDE) , which incorporates several programs within a single user interface:

Text Editor

Used to write the source code and save it in a file.

Compiler

Translates the source code into machine language that can be executed by the CPU.

Integrates all the functions in your program, including externally accessed libraries of functions, and to determine where each component will be loaded into memory when the program is executed.