Keil Logo

C51: RE-USE LIBRARY FUNCTIONS FROM A BOOT APPLICATION


Information in this article applies to:

  • C51 Version 8.00
  • PK51 Professional Developer's Kit

QUESTION

I am writing a BOOT code that contains certain library functions. I would like to locate this library functions on specific addresses so that I can re-use them in the application (without the need to duplicate them into each application).

However, all intrinsic library functions of the C51 run-time library share the same segment name ?C?LIB_CODE, which makes it practically impossible to locate them individually using linker directives.

Is there a clever solution to my problem?

ANSWER

Yes, take a look at Application Note 180: Multi-Application Programming for 8051 Devices. This application note contains two files:

  • App1Entry.asm: Defines the functions that are in the BOOT section of your code that will be re-used in the APPLICATION section.
  • App1Call.asm: Contains only entry point definitions for the BOOT section. This module is located in the APPLICATION section of your code.

The example in the application note implements a jump table that allows modifications of the BOOT part independent of the APPLICATION part. This technique even allows you to update the BOOT section after the APPLICATION has been released.

MORE INFORMATION

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Wednesday, July 5, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.