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

Locating a function to a specific start address - still don't understand

Locating a function to a specific start address

I still have problems with this issue.

I have a function,

Eobd_ADP_pf()
, which I want to store starting at address 0x50000.

I have seen the examples about SECTIONS, but this example refers to object files:

"abc.obj SECTIONS( ?PR?ABC%NCODE ( 0x12000 ) )"

I don't write code in object files, I write in C!

What shall I do?

And by the way, I assume that ?PR?ABC is not a C function, it is a code section in some way, what defines that section?
I only want to locate this single function, not a whole section.


Thanks

Parents
  • Keil C51 places all code in a single .c file into a single segment. The only way you can get one function into its own segment is to put that function in its own .c file.

    The "Segment Naming Conventions" section of the manual in chapter 6 details the conventions for naming segments. "?PR?" is a prefix that means "program" -- that is, executable code.

Reply
  • Keil C51 places all code in a single .c file into a single segment. The only way you can get one function into its own segment is to put that function in its own .c file.

    The "Segment Naming Conventions" section of the manual in chapter 6 details the conventions for naming segments. "?PR?" is a prefix that means "program" -- that is, executable code.

Children