How to program into NV flash.


Make a profile as follows:
linker seach = C:\school\ECE625\gcc\lib\gcc-lib\m6811-elf\3.3.6-m68hc1x-20060122\mshort

ioports 0 400
eeprom 400 c00
data 1000 3000
text c000 2f8a
vectors ef8a 80
stack 4000

Be sure MPU type is 68hc12.

Click the starup code tab and check use a source file that is in my project.
Done with making profile.




Be sure to add the vector.s file to the project.

Add the PandSStartup.s file to the project.

Compile.

Edit the Make_s2.bat file to change the names of the files to the names of the files in our project.

Execute Make_s2.bat.



Move J9 to the left. Switch the switch to RUN (left).

Start Tera Term at 9600 Baud and turn on HC12.

Type a to erase (must always erase flash first). The monitor will appear to hang for bit. Wait for it to come back.

Type b to program. Monitor will sit there waiting for you.

On Tera Term goto File->SendFile then navigate to your *.s29 file that was made by Make_s2.bat.

Send it. You should see some stars like this *********

When done the monitor will come back. Move J9 and the Switch to the right.

DONE!!!! You can now hit reset or power off or whatever.



To recover the monitor so the same steps starting at move J9 to the left ... but navigate Tera Term to the MiniDragon\Document directory and use the db12DP256-16.S29 file.
