Lab 5: System Initialization
Project Build Options
2. We need to setup the search path to include the peripheral register header files. Click:
Project Build Options…
Select the Compiler tab. In the Preprocessor Category, find the Include Search
Path (-i) box and enter:
..\DSP281x_headers\include
This is the path for the header files. Then select OK to save the Build Options.
Modify Memory Configuration
3. Open and inspect the user linker command file User_5_6_7.cmd. Notice that the
section “codestart” is being linked to a memory block named BEGIN_H0. The
codestart section contains code that branches to the code entry point of the project. The
bootloader must branch to the codestart section at the end of the boot process. Recall that
the "Boot to H0" bootloader mode branches to address 0x3F8000 upon bootloader
completion.
Modify the configuration file lab.cdb to create a new memory block named
BEGIN_H0: base = 0x3F8000, length = 0x0002, space = code. Uncheck the “create
a heap in memory” box. You will also need to modify the existing memory block
H0SARAM to avoid any overlaps with this new memory block.
Setup System Initialization
4. Modify SysCtrl.c to implement the system initialization as described in the objective
for this lab.
5. Open and inspect Gpio.c. Notice that the shared I/O pins have been set to the GPIO
function. (Note: In Main_5.c do not edit the “main loop” section. This section will be
used to test the watchdog operation.) Save your work.
Build and Load
6. Click the “Build” button and watch the tools run in the build window. The output
file should automatically load.
7. Under Debug on the menu bar click “Reset CPU”.
8. Under Debug on the menu bar click “Go Main”. You should now be at the start of
Main().
5 - 16 C28x - System Initialization