1 Reply Latest reply on Aug 20, 2018 10:53 PM by geon

    Sharing library between bootloader and bootloadable projects.

    chris.vanbrederode_3548136

      Hello,

       

      I have a project for PSoC 5 well along that uses a custom bootloader to load a .cyacd file from a SD Card and run it, as well as the ability to download and save new firmware files OTA.  All of these things are working well enough, but I have a question about libraries.

       

      Both the bootloader project and the bootloadable project use the emFile library for accessing the SD Card.  (They also use the same source file for a crc function).  I imagine that this means that the program code for emFile exists in Flash twice in the running system, once for each project.  I'm not running out of flash, but I'm trying to be forward thinking and minimize usage where I can.

       

      My question is this: is it possible for the the bootloadable project to call the emFile functions from within the bootloader section of Flash? 

       

      Chris VanBrederode

        • 1. Re: Sharing library between bootloader and bootloadable projects.
          geon

          Bootloadable can call bootloader project functions residing in flash using function pointers. PSoC Creator generates <project>.map file which details function and variable placement in device memory. It is available in Results tab in PSoC Creator.

           

          Please use bootloader project function pointer along with parameters to call from bootloadable project. Please note that resources which the Bootloader Function uses needs to be present in the Bootloadable Project with same configurations.