FAQ: One .ldf file for release and debug

Document created by Kader.M Employee on Nov 21, 2017
Version 1Show Document
  • View in full screen mode



We have .ldf file, and we have to assign one L1_data_bzs section to MEM_L2_SRAM since we didn't have enough space. When we change from debug to release or backwards, we have to do this over and over, we want to avoid that. 





When using the Startup code/LDF addin, the generated LDF will be regenerated when switching between Release and Debug configurations because there may be different LDF features required. If you make changes to the regenerated parts of the LDF these will be lost when that happens. The way to retain changes between LDF regenerations is to ensure that they are done in the special user configurable areas of the LDF that are delineated by comments that begin with $VDSG.


Based on your description the way to do it would be to use the user modifiable area of output segment L2_bsz_prio0, for example:

 L2_bsz_prio0 ZERO_INIT

   /*$VDSG<input-sections-L2_bszdata_prio0> */
   /* Text inserted between these $VDSG comments will be preserved */
   INPUT_SECTIONS( $OBJS_LIBS(L1_bsz) ) // Added here to be retained when LDF is regenerated
   /*$VDSG<input-sections-L2_bszdata_prio0> */