Skip to main content

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 .c file that belongs to this project only, such as the program that contains main(), goes in the project’s Src folder.
  • A .h header file that belongs to this project only goes in the project’s Inc folder.
  • A library that many projects use, such as uart.c and uart.h or i2c.c and i2c.h, goes in Library/mylib. Both the .c file and the .h file 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.