Common library

Discussion in 'Embedded Systems and Microcontrollers' started by Toon76, Apr 10, 2013.

  1. Toon76

    Thread Starter New Member

    Apr 10, 2013
    2
    0
    Hi everybody !

    I'm new here but need an advice for a particular embbeded project.

    I'm currently workin in a small company which develops industrial embedded systems for construction etc.
    I'm currently working on a new architecture and I tought about a concept but have no idea if it's possible and how to do this.

    The idea is : I need to use a file system stack in my bootloader and in my embedded application. To save memory space, it could be nice to use this as a library module which could be in a sections and used by the bootloader and the application.

    How to link this library with these two users ? Is it possible and did you already managed such a project ?

    Thanks to those who could help me! :)
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,453
    3,371
    Sure it can be done, but firstly you will have to tell us your target system and dev software.
    You can put the libraries into ROM and note the function addresses.
    You can then declare these addresses in the application development.
    This was standard practice in ROM-based Mac and PC.
     
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    I've seen it discussed several times on the PIC32 forums. No one ever seemed to be able to realize a working implementation.

    Besides, it's 2013. Why would anyone need to save memory space?
     
  4. Toon76

    Thread Starter New Member

    Apr 10, 2013
    2
    0
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    This shares many characteristics with what on many systems is called the "kernel." Using that term may help your search for existing art.

    It can be as simple as maintaining a list of exported function pointers from the bootloader. The hard part is keeping things synchronous. If the bootloader changes then the pointers change, though you can put a redirect table in some place that doesn't change when you recompile the rest of the loader.
     
    Last edited: Apr 11, 2013
Loading...