题中的warning是代码最优化时(common code optimization)堆栈指针不一致造成。在菜单->edit->standard setting->compiler for HC12->option中选中Main Optimize Target,再选中optimize for execution time,即可。