Writing firmware: assembly or high level?

前端 未结 17 1879
时光说笑
时光说笑 2020-12-13 02:29

Related to:

  • Testing firmware
  • starting a microcontroller simulator/emulator
  • Interpreting assembly code

If you are writing co

17条回答
  •  醉话见心
    2020-12-13 03:09

    If you're writing code that is highly dependent on device-specific peripherals, and the tool chain you're using doesn't provide the necessary intrinsics to utilize them efficiently (like the crappy Freescale DSP563CC compiler), then use assembly.

    Besides that, I think the unwritten rules of using assembly vs. a high-level language are more or less the same as those for desktop software development: keep the code clean, maintainable, and optimize hot code with machine language.

提交回复
热议问题