The assembly code arises, because the C functions erases and programs new firmware into the cpu flash.
The C code compiles to assembly which accesses the library functions in Block1 in HCS12 CPU.
Thus when erasing BLOCK1 from flash program located in BLOCK2, causes the program to terminate.
Therfore the flash program assembly code is modified to call a copy of a renamed library file within BLOCK2.
I previously looked at returning a C variable, however it generates other unwanted lib calls.
If there was a setting in CW, then it would have been good quick solution.
Only concern was if CW compiler is going to do something, because passed variables are not used in the function.
"To avoid the warnings, the inline code would need to read each of the parameter variables using the parameter name."
How exactly, is this done in the inline assembly code, as it is just uses the stack variables?
CW says dont mix HLI with C declarations, which is why complete function is HLI.
Is there an example somewhere?
Thanks
Terry