Hello,
Does anyone know if S32k14x SDK startup code supports C++ with IAR ARM compiler? I ran into a compile error,
Fatal error[Lp049]: there was no reference to __iar_data_init3, but it is needed to call extra init routines
There is a global C++ object in the source code,
if remove it, the error is gone.
And the startup code and link file for IAR are used,
S32SDK_S32K14x_RTM_2.0.0\platform\devices\S32K146\linker\iar\S32K146_128_flash.icf
S32SDK_S32K14x_RTM_2.0.0\platform\devices\S32K146\startup\iar\startup_S32K146.s
S32SDK_S32K14x_RTM_2.0.0\platform\devices\startup.c
Thanks,
Leo
Got this answer from IAR
1. Add "--skip_dynamic_initialization" option during link process
2. Add c++ dynamic initialization in early part of Main():
#include "iar_dynamic_init.h"
void main()
{
...
__iar_dynamic_initialization();
...
}
How does it resolve?
I want to understand how c++ object initialisation happens after this?
Hi,
Unfortunately, S32 SDK for S32K14x does not support C++.
Best regards,
Rares