SD Card based bootloader for PSoC3

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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.

   

PSoC Rocks,

   

 

   

Regards,

   

kmmankad

0 Likes
10 Replies
Anonymous
Not applicable

That is an interesting concept. I wonder if this will be picked up here in the forum.

   

Are there more members here that have tried this out?

   

Just curious.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Great work! Do you know whether this will work on a PSoC5? Or will it need modifications?

0 Likes
Anonymous
Not applicable

Hey,

   

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.

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

(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.

0 Likes
Anonymous
Not applicable

 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.

0 Likes
Anonymous
Not applicable

 hi ,i am using psoc 5lp board i am writing data in to 8 gb sd card  through sd card mode protocol (4 bit sd  card mode)  if any emfile is there please give link 

0 Likes
Anonymous
Not applicable

 you mean you need a link to the emFile firmware library?

   

here it is 

   

http://www.cypress.com/?rID=58694

0 Likes
VlYe_281166
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked
    Hello, kmmankad   
   
        
   
    I'd ported your great project to PSoC5LP and stopped at writing to flash function     CyWriteRowFull.    
   
        
   
     The program fells into exception trap     CY_ISR(IntDefaultHandler)      in     CM3Start.c      module.   
   
        
   
    Before, I tested that this function works fine with       USB HID Bootloader part of your program.   
   
        
   
    Also, the     program finished successfuly if I comment CyWriteRowFull call.   
   
        
   
    So, I have no idea what it could be. Hope you have more experience to clear the problem.   
   

Thanks in advance,

   

Vladimir

0 Likes
lock attach
Attachments are accessible only for community members.
VlYe_281166
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

P.S. Here is the project Bundle

0 Likes