Hello,
All these products have available standard Flash drivers.
Wanting to program in C does not mean you need Flash programming routines in C.
IDEs like CodeWarrior handle mixing both ASM, C and even C++.
Also, even if you didn't want to see a line of ASM for these Flash drivers, they are available as S-Record.
Here is a direct example I took from the Driver Zip file :
Code: //////////////////////////////////////////////////////////////////////////// // Mass Erase Flash //////////////////////////////////////////////////////////////////////////// dest = FLASH_START1; number = 1; // For mass erase, number should be as 1 returnCode = FlashErase (CMD_MASS_ERASE, dest, number, HighVoltage, CallBack); if (SGF_OK != returnCode) goto EXIT; //////////////////////////////////////////////////////////////////////////// // Verify Flash after Erasing //////////////////////////////////////////////////////////////////////////// size = FLASH_END1 - FLASH_START1 + 1; source = (UINT16)buffer; returnCode = DataVerify (TRUE, dest, size, source, &failAddress, CallBack); if (SGF_OK != returnCode) goto EXIT; // Verify the second part dest = FLASH_START2; size = FLASH_END2 - FLASH_START2 + 1; returnCode = DataVerify (TRUE, dest, size, source, &failAddress, CallBack); if (SGF_OK != returnCode) goto EXIT;
That code demonstrate how to call the routines in C.
The Flash driver package is always available from the product page.
For the S08, here is a link:
HCS08SGFNVMSSD (1.44MB)
Standard Software Driver for HCS08 SGF Flash
Program/erase software driver for SGF NVM (flash and EEPROM) in HCS08.
If this package does not work, please report so someone in FSL fixes it.
Cheers,
Alban.