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

Setting A function in predeterming place in code memory

I need to writer a C function that mush be in a protected space in flash memory, But I don know how to specify the memory loaction of the function.

I'm using a 8051 core with on board flash using the UVision 2 dev sys.

ed.

Parents
  • If you put the function in a source file on its own you can then specify the address you want the function to reside at via the 'User segments' box under the LX51 locate tab.

    You need to enter:

    ?CO?FILENAME(C:0x1234)

    where 'FILENAME' is the name of your source file and '0x1234' is the address you want the function to be at.

    Stefan

Reply
  • If you put the function in a source file on its own you can then specify the address you want the function to reside at via the 'User segments' box under the LX51 locate tab.

    You need to enter:

    ?CO?FILENAME(C:0x1234)

    where 'FILENAME' is the name of your source file and '0x1234' is the address you want the function to be at.

    Stefan

Children
No data