This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Function

Hello,
We recently purchase keil PK51 software, we wanted to solve following error's, kindly help us.

1. When we compile our code by using PK51, it generate random functions.
We required to set function address as we written in our code.

2. when we link 2 files, we required 1st file code generate at position on 1st and after that generate 2nd file code.

3. we wanted to keep less code in our micro controller Rom, rest all code we wanted to keep in external ep-rom, so that when ever we wanted to upgrade our program, we just replace the ep-rom.

Thanks and regards

Sandeep Gupta

  • The linker has options to set the absolute addresses for locating segments. If you put one function in each .c file, then you can even locate individual functions.

    If you want to have a ROM-based library for other upgradable code to call, it's often wise to make the interface a table of addresses so that the library implementation can move around without changing the interface. Just store the addresses of the library routines in a table, and store that table at a well-known location.