2024-03-16 10:53 PM
I am trying to write own startup file in c++ till now everything is working but I am having issue when declaring and defining something in the global scope it's most probably related to the static constructor that cpp need but I don't know how to fix this can anyone help me with this?
Thanks in advance
2024-03-17 07:48 AM
> I am having issue when declaring and defining something in the global scope
What issue are you having? To define something in the global scope is a straightforward task.
uint32_t global_variable = 42;
> it's most probably related to the static constructor that cpp need but I don't know how to fix this can anyone help me with this?
Maybe, maybe not. Show the issue in more detail.
Part of the job of the startup file is to initialize global objects, so you won't be able to use them until you do this.
2024-03-17 07:58 AM
Please see the startup files in latest CMSIS libraries from ARM. The startup files there are written in C (not C++).