NXP S32K14x SDK startup code for C++

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

NXP S32K14x SDK startup code for C++

4,030件の閲覧回数
leo_cheng
Contributor I

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,  

CdevSigma SigmaDsp0(&dspdataConfigDsp0a, &dspdataConfigDsp0a, &dspHwConfigDsp0);

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

タグ(5)
0 件の賞賛
返信
3 返答(返信)

3,574件の閲覧回数
leo_cheng
Contributor I

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();
...
}

0 件の賞賛
返信

1,814件の閲覧回数
iniya_anto
Contributor I

How does it resolve?

I want to understand how c++ object initialisation happens after this?

0 件の賞賛
返信

3,574件の閲覧回数
raresvasile
NXP Employee
NXP Employee

Hi,

Unfortunately, S32 SDK for S32K14x does not support C++.

Best regards,

Rares

0 件の賞賛
返信