Steve Church

help with technical note TN228 CW5.7 9s08RE16

Discussion created by Steve Church on Feb 8, 2008
Latest reply on Jun 19, 2008 by David Kelly
I have been looking for a way to write to FLASH by transferring code to RAM and running from there. I have found TN228 which covers my needs nicely. However I have the following questions:

1.  The copy routine to copy from ROM to RAM goes

    char *srsPtr, *dstPtr;
    int count;

    srcPtr = (char *)Start_Copy_In_RAM;
    dstPtr = (char *)&func;                         //produces error "Non standard conversion used"

    for(count  = 0; count < (int) Size_Copy_In_RAM; count++;dstPtr++;srcPtr++)
       *dstPtr = *srcPtr;

 "func" is the name of the function to be copied across

Why the error here?

2. The note details "Start_In_ROM refers to the beginning of the segment...."  There is no mention in the code of this name. Is this a typo error.(You will have had to have read the TN to understand this)?

The note says it is valid for linker V5.0.19 or higher (HC08 V2.1.x or higher).

Has anyone ever used this TN?