Section D.5 Starting Each New Project
We’ll start every project after Blinky by making a copy of
TemplateProject. If TemplateProject is shown as closed in the Project Explorer, right-click it and choose Open Project first, because a closed project cannot be copied. Then right-click on TemplateProject and select Copy, then right-click again, select Paste, type in the name of the new project and click Copy (Figure D.3.1). TemplateProject itself stays unchanged. Add the files the project needs to the new copy. Each file goes in one of the following folders:
-
A
.cfile that belongs to this project only, such as the program that containsmain(), goes in the project’sSrcfolder. -
A
.hheader file that belongs to this project only goes in the project’sIncfolder. -
A library that many projects use, such as
uart.canduart.hori2c.candi2c.h, goes inLibrary/mylib. Both the.cfile and the.hfile go there.
Library is a linked folder: every copy of TemplateProject refers to the same Library folder inside ES28, rather than holding a copy of it. A file you put in mylib is therefore available to every project at once, and a change you make to it in one project changes it in all of them.
