• 0 Posts
  • 7 Comments
Joined 18 天前
cake
Cake day: 2025年12月28日

help-circle
  • Not moving the goalposts at all, you’re just missing the forest for the trees. The main point is that there are plenty of use cases that can use pure C with no assembly. I went with a simple example because I thought you’d have an issue with more complex examples like sending a notification over SMS via modem or providing a serial interface for sensor data.

    I don’t feel like arguing for the sake of arguing, though, and I feel like we’re in a pedantry spiral, so I’ll leave the conversation at that. Hope you enjoy your day.



  • Not necessarily. Let’s say that…

    • The stack pointer is defined in the vector table to point somewhere into RAM.
    • The reset vector points to some function _entry(), with a linker script to take care of its memory placement.
    • All other interrupt handlers are arbitrary C functions.

    You can compile only your C source file that defines _entry() and interrupt vectors, then flash the resulting firmware. No assembly involved, no external linkage, and no stdlib required.