How to fill unused memory for CW for 8/16bit and kinetis Gnu.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to fill unused memory for CW for 8/16bit and kinetis Gnu.

How to fill unused memory for CW for 8/16bit and kinetis Gnu.

In many of user applications we use a CRC/checksum to verify that the code/flash on the target is not modified. For this, not only the code/data in flash counts, but as well all the unused gaps in the memory map. Instead to leave it up to the flasher/debugger (which usually erases it to 0xFF), I want to fill it with my pattern. For example 0xAA.

 

How to implement?

There may be several ways,  but I think the easiest way is to modify linker file.   the linker file structures are different for different MCUs.   For example, CW for 8bit/16bit and Coldfire V1 uses PRM file;  while CW for kinetis Gnu compiler uses ld file. We will talk about each of the case separately.


1. CW for 8bit/16bit and Coldfire V1.

1.1 .  NO FILL command involved.

We define a segment  in prm file

MYCONST_ROM     =  READ_ONLY    0x0870 TO 0x08FF;

Then allocate MYCONST  into it inside PLACEMENT.

MYCONST    INTO  MYCONST_ROM;

In C code, we only define  my_const_var(0xCCDD) at this range.

#pragma CONST_SEG MYCONST

const unsigned int my_const_var = 0xCCDD;

#pragma CONST_SEG DEFAULT

 

After build, we will see only 0xCCDD in this area in generated s19 file:

S1050870CCDDD9

 

1.2  use FILL command to fill unused area of MYCONST_ROM

With FILL command we can fill unused area of a section.  Add “FILL 0xAA” :

MYCONST_ROM       =  READ_ONLY 0x0870 TO 0x08FF FILL 0XAA;

 

Rebuild the project. we will see the rest of the field of MYCONST_ROM  is filled in  S19 file:

S1230870CCDDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACF

S1230890AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA04

S12308B0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE4

S12308D0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC4

S11308F0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA54


2. CW for kinetis GNU compiler:

2.1 . No fill() command involed.

Define segment in MEMORY section:

my_section    (rx) : ORIGIN = 0X00000800, LENGTH = 0x20

 

define output  SECTION:

.myData :

{

    . = ALIGN(4); 

         KEEP(*(.myData))

    . = ALIGN(4);

}> my_section

In C code, define const variable “my_const” (0xCCCCDDDD)

const int my_const __attribute__((section(".myData"))) = 0xCCCCDDDD;

 

After build, we will see only 0xCCCCDDDD in this area in generated s19 file:

S1070800DDDDCCCC9E


2.2 Use FILL(0xaa)  command to fill unused area of my_section with 0xAA.

Here is the modified code in ld file, I highlight the code I add:

.myData :

{

       . = ALIGN(4); 

                 KEEP(*(.myData))

    . = ALIGN(4);

    FILL(0xaa)

    . = ORIGIN(my_section) + LENGTH(my_section) ;

  }> my_section

Rebuild the project. we will see the rest of the field of my_section is filled with 0xAA in  S19 file:

S1130800DDDDCCCCAAAAAAAAAAAAAAAAAAAAAAAA9A

S1130810AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA34



Labels (1)
Comments

Helpful document!

useful!!!

Helpfull to ensure full memory is fill correctly when using a flash programmer.

Does anyone know if it is possible to output the codesize leaving out the 'Filled' part?

Hi Peter,

What I use too is using SRecord 1.64  as a postbuild step to fill memory.

That way you can do it independently.

As how this works in general, have a look at CRC Checksum Generation with ‘SRecord’ Tools for GNU and Eclipse | MCU on Eclipse 

I hope this helps,

Erich

%3CLINGO-SUB%20id%3D%22lingo-sub-1118902%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20to%20fill%20unused%20memory%20for%20CW%20for%208%2F16bit%20and%20kinetis%20Gnu.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118902%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EIn%20many%20of%20user%20applications%20we%20use%20a%20CRC%2Fchecksum%20to%20verify%20that%20the%20code%2Fflash%20on%20the%20target%20is%20not%20modified.%20For%20this%2C%20not%20only%20the%20code%2Fdata%20in%20flash%20counts%2C%20but%20as%20well%20all%20the%20unused%20gaps%20in%20the%20memory%20map.%20Instead%20to%20leave%20it%20up%20to%20the%20flasher%2Fdebugger%20(which%20usually%20erases%20it%20to%200xFF)%2C%20I%20want%20to%20fill%20it%20with%20my%20pattern.%20For%20example%200xAA.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EHow%20to%20implement%3F%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EThere%20may%20be%20several%20ways%2C%26nbsp%3B%20but%20I%20think%20the%20easiest%20way%20is%20to%20modify%20linker%20file.%26nbsp%3B%26nbsp%3B%20the%20linker%20file%20structures%20are%20different%20for%20different%20MCUs.%26nbsp%3B%26nbsp%3B%20For%20example%2C%20CW%20for%208bit%2F16bit%20and%20Coldfire%20V1%20uses%20PRM%20file%3B%26nbsp%3B%20while%20CW%20for%20kinetis%20Gnu%20compiler%20uses%20ld%20file.%20We%20will%20talk%20about%20each%20of%20the%20case%20separately.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2016.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3CSTRONG%3E1.%20CW%20for%208bit%2F16bit%20and%20Coldfire%20V1.%20%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3CSTRONG%3E1.1%20.%26nbsp%3B%20NO%20FILL%20command%20involved.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EWe%20define%20a%20segment%26nbsp%3B%20in%20%3CSPAN%20style%3D%22color%3A%20red%3B%22%3Eprm%3C%2FSPAN%3E%20file%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%20background%3A%20yellow%3B%22%3EMYCONST_ROM%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%26nbsp%3B%20READ_ONLY%26nbsp%3B%26nbsp%3B%26nbsp%3B%200x0870%20TO%200x08FF%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EThen%20allocate%20MYCONST%26nbsp%3B%20into%20it%20inside%20PLACEMENT.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%20background%3A%20yellow%3B%22%3EMYCONST%26nbsp%3B%26nbsp%3B%26nbsp%3B%20INTO%26nbsp%3B%20MYCONST_ROM%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EIn%20C%20code%2C%20we%20only%20define%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3Emy_const_var(0xCCDD)%20at%20this%20range.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3E%23pragma%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20CONST_SEG%20MYCONST%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3Econst%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3Eunsigned%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3Eint%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20my_const_var%20%3D%200xCCDD%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3E%23pragma%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20CONST_SEG%20DEFAULT%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20build%2C%20we%20will%20see%20only%200xCCDD%20in%20this%20area%20in%20generated%20s19%20file%3A%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3ES1050870%3CSPAN%20style%3D%22color%3A%20red%3B%22%3E%3CSTRONG%3ECCDD%3C%2FSTRONG%3E%3C%2FSPAN%3ED9%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E1%3CSTRONG%3E.2%26nbsp%3B%20use%20FILL%20command%20to%20fill%20unused%20area%20of%20MYCONST_ROM%3C%2FSTRONG%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EWith%20FILL%20command%20we%20can%20fill%20unused%20area%20of%20a%20section.%26nbsp%3B%20Add%20%E2%80%9CFILL%200xAA%E2%80%9D%20%3A%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%20background%3A%20yellow%3B%22%3EMYCONST_ROM%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3D%26nbsp%3B%20READ_ONLY%200x0870%20TO%200x08FF%20%3CSPAN%20style%3D%22color%3A%20red%3B%22%3EFILL%200XAA%3C%2FSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERebuild%20the%20project.%20we%20will%20see%20the%20rest%20of%20the%20field%20of%20%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3EMYCONST_ROM%3C%2FSPAN%3E%26nbsp%3B%20is%20filled%20in%26nbsp%3B%20S19%20file%3A%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3ES1230870%3CSPAN%20style%3D%22color%3A%20red%3B%22%3ECCDD%3C%2FSPAN%3EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACF%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3ES1230890AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA04%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3ES12308B0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE4%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3ES12308D0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC4%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3ES11308F0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA54%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2016.0pt%3B%22%3E%3CSTRONG%3E2.%20CW%20for%20kinetis%20GNU%20compiler%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3CSTRONG%3E2.1%20.%20No%20fill()%20command%20involed.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%20.25in%3B%22%3EDefine%20segment%20in%20MEMORY%20section%3A%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20%3CSPAN%20style%3D%22background%3A%20yellow%3B%22%3Emy_section%26nbsp%3B%26nbsp%3B%26nbsp%3B%20(rx)%20%3A%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23006699%3B%20background%3A%20yellow%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3EORIGIN%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%20background%3A%20yellow%3B%22%3E%20%3D%200X00000800%2C%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23006699%3B%20background%3A%20yellow%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3ELENGTH%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%20background%3A%20yellow%3B%22%3E%20%3D%200x20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edefine%20output%26nbsp%3B%20SECTION%3A%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20.myData%20%3A%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20%7B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%230099ff%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3EALIGN%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E(4)%3B%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20style%3D%22color%3A%20%230099ff%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3EKEEP%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E(*(.myData))%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%230099ff%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3EALIGN%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E(4)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%7D%26gt%3B%20my_section%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3EIn%20C%20code%2C%20define%20const%20variable%20%E2%80%9Cmy_const%E2%80%9D%20(0xCCCCDDDD)%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3Econst%3C%2FSTRONG%3E%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3Eint%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20my_const%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%237f0055%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3E__attribute__%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E((section(%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20%232a00ff%3B%22%3E%22.myData%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E)))%20%3D%200xCCCCDDDD%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20build%2C%20we%20will%20see%20only%200xCCCCDDDD%20in%20this%20area%20in%20generated%20s19%20file%3A%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3ES1070800%3CSPAN%20style%3D%22color%3A%20red%3B%22%3EDDDDCCCC%3C%2FSPAN%3E9E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3CSTRONG%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'Times%20New%20Roman'%2C'serif'%3B%22%3E%3CSTRONG%3E2.2%20Use%20FILL(0xaa)%26nbsp%3B%20command%20to%20fill%20unused%20area%20of%20my_section%20with%200xAA.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%20.25in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3EHere%20is%20the%20modified%20code%20in%20ld%20file%2C%20I%20highlight%20the%20code%20I%20add%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%20.25in%3B%20margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20.myData%20%3A%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%20.25in%3B%20margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%20%7B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%230099ff%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3EALIGN%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E(4)%3B%26nbsp%3B%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20style%3D%22color%3A%20%230099ff%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3EKEEP%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E(*(.myData))%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%20.25in%3B%20margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%230099ff%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3EALIGN%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E(4)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%20.25in%3B%20margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CSPAN%20style%3D%22background%3A%20yellow%3B%22%3EFILL(0xaa)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%20.25in%3B%20margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%20background%3A%20yellow%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%20%3D%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23006699%3B%20background%3A%20yellow%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3EORIGIN%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%20background%3A%20yellow%3B%22%3E(my_section)%20%2B%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23006699%3B%20background%3A%20yellow%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3ELENGTH%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%20background%3A%20yellow%3B%22%3E(my_section)%20%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%20.25in%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3E%26nbsp%3B%20%7D%26gt%3B%20my_section%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ERebuild%20the%20project.%20we%20will%20see%20the%20rest%20of%20the%20field%20of%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20color%3A%20black%3B%22%3Emy_section%3C%2FSPAN%3E%20is%20filled%20with%200xAA%20in%26nbsp%3B%20S19%20file%3A%3C%2FP%3E%3CP%20style%3D%22margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20background%3A%20%23D9D9D9%3B%22%3ES1130800%3CSPAN%20style%3D%22color%3A%20red%3B%22%3EDDDDCCCC%3C%2FSPAN%3EAAAAAAAAAAAAAAAAAAAAAAAA9A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Courier%20New'%3B%20background%3A%20%23D9D9D9%3B%22%3ES1130810AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA34%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22background%3A%20%23D9D9D9%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1118902%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EGeneral%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1118907%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20fill%20unused%20memory%20for%20CW%20for%208%2F16bit%20and%20kinetis%20Gnu.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118907%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Peter%2C%3C%2FP%3E%3CP%3EWhat%20I%20use%20too%20is%20using%20%3CA%20class%3D%22link-titled%22%20href%3D%22http%3A%2F%2Fsrecord.sourceforge.net%2F%22%20title%3D%22http%3A%2F%2Fsrecord.sourceforge.net%2F%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESRecord%201.64%3C%2FA%3E%26nbsp%3B%20as%20a%20postbuild%20step%20to%20fill%20memory.%3C%2FP%3E%3CP%3EThat%20way%20you%20can%20do%20it%20independently.%3C%2FP%3E%3CP%3EAs%20how%20this%20works%20in%20general%2C%20have%20a%20look%20at%20%3CA%20class%3D%22link-titled%22%20href%3D%22https%3A%2F%2Fmcuoneclipse.com%2F2015%2F04%2F26%2Fcrc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse%2F%22%20title%3D%22https%3A%2F%2Fmcuoneclipse.com%2F2015%2F04%2F26%2Fcrc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse%2F%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ECRC%20Checksum%20Generation%20with%20%E2%80%98SRecord%E2%80%99%20Tools%20for%20GNU%20and%20Eclipse%20%7C%20MCU%20on%20Eclipse%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20hope%20this%20helps%2C%3C%2FP%3E%3CP%3EErich%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1118906%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20fill%20unused%20memory%20for%20CW%20for%208%2F16bit%20and%20kinetis%20Gnu.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118906%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHelpfull%20to%20ensure%20full%20memory%20is%20fill%20correctly%20when%20using%20a%20flash%20programmer.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EDoes%20anyone%20know%20if%20it%20is%20possible%20to%20output%20the%20codesize%20leaving%20out%20the%20'Filled'%20part%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1118905%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20fill%20unused%20memory%20for%20CW%20for%208%2F16bit%20and%20kinetis%20Gnu.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118905%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMore%20on%20the%20topic%20using%20GNU%20tools%20for%20filling%20memory%3A%20%3CA%20href%3D%22http%3A%2F%2Fmcuoneclipse.com%2F2014%2F06%2F23%2Ffilling-unused-memory-with-the-gnu-linker%2F%22%20title%3D%22http%3A%2F%2Fmcuoneclipse.com%2F2014%2F06%2F23%2Ffilling-unused-memory-with-the-gnu-linker%2F%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EFILLing%20unused%20Memory%20with%20the%20GNU%20Linker%20%7C%20MCU%20on%20Eclipse%3C%2FA%3E%20%3C%2FP%3E%3CP%3EAnd%20here%20is%20how%20to%20calculate%20a%20CRC%3A%20%3CA%20href%3D%22http%3A%2F%2Fmcuoneclipse.com%2F2015%2F04%2F26%2Fcrc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse%2F%22%20title%3D%22http%3A%2F%2Fmcuoneclipse.com%2F2015%2F04%2F26%2Fcrc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse%2F%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ECRC%20Checksum%20Generation%20with%20%E2%80%98SRecord%E2%80%99%20Tools%20for%20GNU%20and%20Eclipse%20%7C%20MCU%20on%20Eclipse%3C%2FA%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1118904%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20fill%20unused%20memory%20for%20CW%20for%208%2F16bit%20and%20kinetis%20Gnu.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118904%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Euseful!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1118903%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20How%20to%20fill%20unused%20memory%20for%20CW%20for%208%2F16bit%20and%20kinetis%20Gnu.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118903%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHelpful%20document!%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎07-03-2014 04:11 AM
Updated by: