NXP S32K14x SDK startup code for C++

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

NXP S32K14x SDK startup code for C++

2,971 次查看
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 回复数

2,515 次查看
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 项奖励
回复

755 次查看
iniya_anto
Contributor I

How does it resolve?

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

0 项奖励
回复

2,515 次查看
raresvasile
NXP Employee
NXP Employee

Hi,

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

Best regards,

Rares

0 项奖励
回复