Start12.c and FLASH erase/write

Discussion created by sebasira on May 15, 2012
Latest reply on May 22, 2012 by Tom Thompson

Hi everybody!


I've got two people working on the same hardware but different application. They both work with MC9S12A256 and CW4.6.


The problem arrise when one could not perform FLASH erase, while the other can. They where using exactly the same FLASH routines. But one of them was not working.


So I made a simple test. Starting from each other project, I remove everything except flash routines. And indeed one worked, and the other one didn't.


I look at their settings. And only found a difference at "Assembler for HC12", and start12.c was also different.

I try changing the setting of the non-working with the one that worked and strange things happended. Sometimes it runs, others it hangs... But when run, the flash was written. I guess this might be related to the start12.c


Could you take a look at both "test" projects and give a hand here?


I think it's important to remark that we've never deal with the code of the start12.c.. We've always use the one generated with the wizard, so we don't know why they are different. (Maybe one was from and oldeir CW version. We use to use CW3.1)


Thanks in advance