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

find start of free code space

Hello,

I need to find the beginning of free code space to use for a flash filesystem. I did not see any compiler defined symbols in the M51 file to help.

I can declare a large array in code space and use the _AT_ directive to place it high in memory but this adds considerably to emulator download time.

Or I can periodically check the symbol table for the last used code, but this can be troublesome.

I'm using the Cygnal C8051F023 if it matters.

Any ideas?

Thanks

Parents
  • I see that the LX51 linker allows you to locate a segment as the last segment using the SEGMENTS command. This would work for me as I would specify that the filesystem segment would be last.

    Unfortunately, I'm using UV2 which seems to only use BL51 linker.

    BL51 has the CODE command which allows you to specify the order of the segments, but you have to list every segment (each routine is a seperate segment), in order to get one to be the last segment.

    I'd like a way to use all the unused code space for a flash filesystem.

    Any ideas?

Reply
  • I see that the LX51 linker allows you to locate a segment as the last segment using the SEGMENTS command. This would work for me as I would specify that the filesystem segment would be last.

    Unfortunately, I'm using UV2 which seems to only use BL51 linker.

    BL51 has the CODE command which allows you to specify the order of the segments, but you have to list every segment (each routine is a seperate segment), in order to get one to be the last segment.

    I'd like a way to use all the unused code space for a flash filesystem.

    Any ideas?

Children