Modular programming

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modular programming

Jump to solution
2,391 Views
desroc01
Contributor II

I am using the MC9S12DP256B and I have a question about modular programming.

I would like to know if it is possible to update only certains parts of an application already burn in the MCU.

Let say my project contains 3 librairies and I decided to change one of them. Is is possible to send (burn) only the new code of this library.

Do I have the burn 4 separate .s28 files ? (3 libraires and a small "core" applicaiton) ?

Is there any type of dynamic library in embedded ?

Would it be possible with PIC code (position independant code) ?

Thanks

Labels (1)
Tags (1)
0 Kudos
1 Solution
639 Views
mke_et
Contributor IV
You might be able to do it but you'd have to manage your loading/programming pretty well.
 
First off, you'd have to had your core 'detect' the libraries and handle the fact that they might not be where expected.
 
Then you'd have to make sure your libraries had 'jump tables' or at least well defined entry points common to any change or enhancement you might make down the road.
 
Then you'd have to manage placement.  Not only to insure that the libraries each sat on an erase block boundary to start, but also how then ended with the next snippet of code.  And provide for a 'buffer' space to grow, as your replacements and/or upgrades may not be exactly the same.
 
Finally, you'd have to make sure your S-record updater and/or programmer was smart enough to know to only erase the sector/block that was referenced in an s-record, and to leave everything else alone.
 
Mike
 

View solution in original post

0 Kudos
1 Reply
640 Views
mke_et
Contributor IV
You might be able to do it but you'd have to manage your loading/programming pretty well.
 
First off, you'd have to had your core 'detect' the libraries and handle the fact that they might not be where expected.
 
Then you'd have to make sure your libraries had 'jump tables' or at least well defined entry points common to any change or enhancement you might make down the road.
 
Then you'd have to manage placement.  Not only to insure that the libraries each sat on an erase block boundary to start, but also how then ended with the next snippet of code.  And provide for a 'buffer' space to grow, as your replacements and/or upgrades may not be exactly the same.
 
Finally, you'd have to make sure your S-record updater and/or programmer was smart enough to know to only erase the sector/block that was referenced in an s-record, and to leave everything else alone.
 
Mike
 
0 Kudos