Hey,I've written out a proof-of-concept SD card based bootloader.
The Bootloader will write a pre-specified file from an attached SD Card(SPI interfaced) to
the chip's flash,and execute a software reset following that.
This is actually a stock USB HID bootloader that has been given this extra functionality.After an SD card bootload
attempt,the bootloader will enumerate as a USB HID too,and can accept the program CYACD file from there as well.
Hence this extra feature can be added easily to any kind of existing bootloader,or can also function standalone.
Note that this uses the emFile Component,and hence will need its dependent source files which can be downloaded from http://www.cypress.com/go/comp_emfile
This code has been tested with the CY8CKIT-030,and the microSD module from www.embeddedmarket.com with PSoC Creator updated to Component Pack 3.
Find the code here https://github.com/kmmankad/SDBoot
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
thanks for the kind words guys.
Yes,this can most definitely work with the PSoC5,only the method of creating the emFile part will change.I dont have a PSoC5 kit around,so cant test it.
But it works beautifully with the PSoC3 😄
Actually this can be made more streamlined my modifying the cy_boot component itself.But I didnt want to touch that,so this currently has code thats added onto a USB Bootloader.
Also,this takes up quite a bit of flash,which can be reduced by writing your own SDCard interfacing routines.I plan to do that sometime in the future,so lets see.The emFile ones,while convinient,seem to take up some flash space.
(Sorry,I should keep it all in one post.I recall stuff just after I hit 'Submit')
This doesnt do any checksum stuff,because I believe in an ideal world.But its really simple to implement the Basic Summation type of checksum.
This also doesnt check the SiliconID and revision.I mean,the code is there,but I've commented it out.
Great work kmmankad 🙂 You can try out the new PSoC creator 2.1 (EA) to modify the bootloader alone without meddling with Cy_Boot component as it is a seperate component consuming much smaller size.
Thanks in advance,