LX51: Locate Common Code Segments
Information in this article applies to:
We are using Linker Code Packing, and the linker generates segments with the name ?L?COMxxxx. However, we need to locate these segments to a specific address region. Since these segments always belong to the memory class CODE it seems to be impossible to locate them.
I have even tried to use a wildcard in the SEGMENTS directive (for example ?L?COM*(C:0x2000)) but this does not work either.
Is there any way to locate these segments in specific address ranges?
The linker generated segments with the name ?L?COMxxxx are generated very late during the optimization process. The only way to locate them is to use the memory class CODE. When you need to locate your application code to a specific memory region, you may use the USERCLASS directive.
The required steps for the setup in µVision are explained below:
Note: The linker generates the common code sequences very late, and therefore the size is not known when the application code segments are located. You may need to adjust the address ranges for the different memory classes when you are getting *** ERROR L107: ADDRESS SPACE OVERFLOW linker errors.
Last Reviewed: Thursday, February 25, 2021
of your data.