You are here

Re-using components from Bootloader in application to save flash | Cypress Semiconductor

Re-using components from Bootloader in application to save flash

Summary: 3 Replies, Latest post by Paddy72 on 09 Feb 2015 01:36 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
user_347933176's picture
35 posts


I studied and tried the I2C Bootloader AN86526 document and it works great. But there is one question.

For my application I need a couple of routines such as i2c communication and writing to a display. These basic (library) routines will be used by BOTH Bootloader and application program. Is there a way to use the libraries from both programs ? I am aware that in that case the libraries cannot be overwritten in case of new versions but it could save me memory.

I'm testing now with PSOC4 on my pioneer kit but as soon as I get my PCBs I will run my application on a PSOC3. Bootloading via I2C.



user_1377889's picture
9283 posts

You could save some flash by changing the properties of already debugged files (as the generated files are). Right click on the file and set the optimization level to something better than "none".

This you may do with your own modules, too.



user_14586677's picture
7646 posts

Seems like you could build a table of f() pointers and

force their storage to a known location in FLASH and use

them in the bootloadable program as calls. I am thinking

this would have to be done in ASM calls from the bootloadable

to effect the code share.


Would be nice if compiler was "boot" aware......


Not being an expert on BL's will be interesting to see if there are any

alternative approaches.


Regards, Dana.

user_347933176's picture
35 posts

 Thanks for the replies, I will use the optimizing for now and if I run into memory problems later on I can study the second option.

Log in to post new comments.