User manual

38 CY8CKIT-049-4xxx PSoC® 4 Prototyping Kit Guide, Doc. #: 001-90711 Rev. *G
Code Examples
Figure 5-1. UART Bootloader
The Bootloader Base Project includes the source code in the main.c and the UART_Btld.c files,
which support bootloading the PSoC 4 device. The source code is available for reference, but is not
necessary to create bootloadable applications.
5.2 Bootloadable Code Example
The example in Programming a CY8CKIT-049-4xxx Project Using the Bootloader on page 19
showed how to bootload the application code for a blinking LED project into the device using the
USB-Serial controller.
In the bootloadable code example, the following components are used:
Bootloadable
PWM
Clock
Digital Output Pin
Digital Constants (logic HIGH/LOW)
Off-Chip Components (external resistor, LED, and Vss)
In this code example, the PWM component is used to drive an output on a pin connected to the user
LED. The bootloadable component is placed to ensure that your application code is correctly
mapped to the target PSoC 4 bootloader flash-space mapping.