Modular programming

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Modular programming

跳至解决方案
2,652 次查看
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

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
900 次查看
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 项奖励
回复
1 回复
901 次查看
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 项奖励
回复