| |||||||||||||
Technical Support On-Line Manuals LX51 User's Guide | Segment InformationThe linker creates special symbols (using no program or data space) that contain address and length information for segments used in an application.
You may create declarations from external variables to access this information. For example, use the following to get information about the length of the main function in the measure module: extern unsigned char _PR_main_measure_L_; unsigned main_length = (unsigned int) & _PR_main_measure_L_; The SROM.H header file contains macro definitions that simplify access to segment information: #include <srom.h> SROM_PS(main_measure) // Create external declarations for main_measure unsigned measure_size = SROM_PS_LEN(main_measure); unsigned measure_start = SROM_PS_SRC(main_measure); unsigned measure_end = SROM_PS_END(main_measure); unsigned measure_target = SROM_PS_TRG(main_measure); | ||||||||||||
| |||||||||||||