Hello,
I modified a sample app "blinky" on segger, to include main.cpp instead of main.c
Then when I built, I got a compile time error stating in main.cpp "void main(void)" should be changed to "int main( )"
I changed and it compiled successfully.
Now when I am running it on the board, the execution is not entering "int main( )" rather the execution is straight away entering fault_s.S, as in the screenshot:
Kindly help me in understanding why this is happening so and how I can get the execution to return to "int main( )" ..?
PS. I am using blinky sample app on segger, only changes I made is
- Excluded main.c from the build
- Added main.cpp (Attaching for your reference)
- Added main.cpp in CMakeLists.txt (Attaching for your reference)
It is building successfully.
main.cpp
CMakeLists.txt