This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using IAR, nRF52810, and C++

I am trying to get a project working with a main.cpp file, some C++ modules, and the 16.0.0 SDK using the IAR compiler. However, using the nrfx/mdk startup files, it never actually reaches my main function, instead hanging before it even reaches it. If I debug before main, I see that it seems to jump to a very random spot when loading __iar_program_start. I used the provided linker file (from the SDK, not from IAR).

Does anyone know what I need to do to get my main.cpp::main file linked in as the main file? IAR has an 8 year old example, but it doesn't do anything with SDKs or the like and they have a C++ startup file, but it's seems to assume pure C++ instead of a mix.

Related