Bootloader Tutorial | Cypress Semiconductor
I'm looking for help on understanding the bootloader and bootloadable components of the PSOC Creator. I've looked at the forums a lot and seen some of the tutorial videos, but I'm still confused on how exactly to implement this.
End Goal: Running a CPU with Android on it connected to a PSOC microcontroller and capsense touch pad via I2C. I want to be able to update the firmware of the touchpad controller with a custom driver using the CPU to do I2C writes to the bootloader.
To get an understanding I'm starting with a simple project using LEDs to indicate switches between the bootloader project to two bootloadable projects on the PSOC 4000 kit.
I used the Bootloader Example project provided by Cypress and the two bootloadable projects which will simply toggle the red or green LED depending on which one is called by the bootloader. I call the Bootloader_Start() function in my bootloader main.c and then I poll two buttons attached to gnd and an IO. When the button is pressed the I call Bootloader_Exit() with the application ID of one of the bootloadable projects. The project then should begin to run and exit when the button is released.
Things I think I got wrong:
1.) While debugging the bootloader after I call Bootloader_Start() the code doesn't continue to run into the polling part. How do I properly implement this, so that if none of the buttons were pressed I would theoretically be able load an updated firmware for one of the bootloadables? (Soon I'll get to the point of using the bootloader utils api to create the custom driver to do this, not there yet though)
2.) I've seen some mention in the forums that the PSOC 4000 kit board already goes into a bootloader program and what I'm doing here won't work unless I point the bootloadbles to the bootloader workspace that comes with the kit. Is there away to implement my own bootloader on the PSOC kit, so I can expand my understanding of how this works?