Wow thats pretty deep. Well I am shooting for a s1 record, or a s2 whichever is easier. I would like to make this as simple as possible, and get more advanced once I have the basics down. Take a look at my prm file.
NAMES
END
SECTIONS
RAM = READ_WRITE 0x0800 TO 0x1799;
PSEUDO_ROM = READ_ONLY 0x1800 TO 0x3fff;
//FLASH = READ_ONLY 0xC000 TO 0xEFFF;
END
PLACEMENT
_PRESTART, STARTUP,
ROM_VAR, STRINGS,
NON_BANKED,DEFAULT_ROM,
COPY INTO PSEUDO_ROM;
DEFAULT_RAM INTO RAM;
END
STACKSIZE 0x100
This works like a charm, but it is to Ram only. As you can see i have commented my attempt at a simple flash definition. When I copy into the flash i get "Invalid S record!" After every attempt I take a look at page 3F, and the first two lines (8000-801F) contain fresh data, and the rest is untouched. Heres what my bbl looks like
OPENFILE "%ABS_FILE%.s1"
format=motorola
busWidth=1
origin=0
len=0x10000
destination=0
SRECORD=S1
SENDBYTE 1 "%ABS_FILE%"
CLOSE
l hope this helps. Also, what non-volitile memory will my processor have while its running? I want to be able to save some data from the GPIO on the HCS12 while its running, and not have to worry about loosing the data if power is lost.