2020-10-29 03:08 PM
I would like the interrupt handlers to be written in the C ++ style, that is, they are static classes, but there is practically no information on the Internet about where to get a C ++ startup file or how to make it yourself. Has anyone encountered such a problem?
2020-10-29 03:41 PM
> Has anyone encountered such a problem?
I'm not convinced it's a problem.
The startup file is in assembly because it needs to load the data segments into memory and other low-level things. Don't think you're going to replicate that in C++. Not sure what you mean by "static class".
Also see:
2020-10-30 11:25 AM
Cortex-M architecture is designed to allow to aesily write the startup code in C. Have a look to:
http://adastra-soft.com/design-a-generic-startup-file-and-a-linker-script/
But C++ is more complicatd.
The interrupt handlers have to be C functions, or static member of a class (and where to get the class pointer?).
See: https://community.arm.com/developer/tools-software/tools/f/keil-forum/26156/c-interrupt
It is a big work to write all in C++.
It is probably more interesting to write a C to C++ wrapper for each ISR.