DSbob

C equivalent of ORG?

Discussion created by DSbob on May 31, 2007
Latest reply on Jun 4, 2007 by CrasyCat
I've spent years programming HC05 in asm.  New to C and Flash, using S08QG8.  I need to store a calibration value in flash.
 
With help from this forum, I have it written to second to last page, 0xFC00.
 
Memory write protection starts at last page and works toward lower pages, right?  So with a flash writer in my application, I sure want to protect program memory! 
 
I want to write the calibration value at 0xE000, and make sure the complier/linker starts the application program at 0xE200, the second page of flash.  I've studied Segments and Sections in the linker prm file but don't see how to force that.  Any suggestions?
 
Writing this, I've come to realize each debug session will probably overwrite the calibration value through mass erase.  I think that can be delt with, have used command files.  Will a w(rite bytes, words, etc) post load command actually write to flash, so I can debug normal operation? 

Outcomes