5 ms·
Each has its own place. I write code in all languages including Python and C. Yet, I have to write code in assembly even today when the particular problem state
by ashwin67 9y ago
Each has its own place. I write code in all languages including Python and C. Yet, I have to write code in assembly even today when the particular problem statement requires its usage. Such generalization can only be expected from a marketing campaign that this post really is.
- fhood 9y agoWhat specific tasks require assembly?
- monocasa 9y agoNot the OP, but I've written assembly in our codebase for: * First stage initialization * Interrupt prologue/epilogue * Bitbanging where you want deterministic cycle counts * For using the FIQ for very high priority interrupts. It has it's own registers partially banked, so if you stay in r8-r13 you don't have to save and restore state at all. So we don't use assembly for magic go faster juice, but instead when there's a coding constraint that we can't easily explain to the compiler.
- zwieback 9y agoAlso sometimes to take advantage of unique instruction sets or on-board peripherals that aren't well supported by compilers.
- elcritch 9y agoI'm curious to hear more how/why you use FIQ? From googling it looks like it's an ARM feature. How can/does that work with a general purpose OS or are you using bare metal ARM?
- monocasa 9y agoWe've got our own internal RTOS, not a general purpose OS. We use it for different things depending on the board, but my favorite is a really sweet profiler that's integrated with our watchdog logic that'll give us ~1000 PC+SP samples in the 100msec or so before our watchdog timer resets our board. That's pretty invaluable for debugging.
- boznz 9y agotiming, timing, timing
- codewritinfool 9y agoAgreed. I often don't have the resources on the target required to even attempt this.