Asking about pragma memory section in GCC build 1620 in S32DS 3.3

取消
显示结果 
搜索替代 
您的意思是: 
已解决

Asking about pragma memory section in GCC build 1620 in S32DS 3.3

跳至解决方案
1,753 次查看
namnguyenviet
NXP Employee
NXP Employee

Hello guys,

In NXP GCC build 1620 integrated in S32DS 3.3, is that pragma for memory section has already supported? If yes, then do we have a note in the release note for that update? My customer in concern whether it's supported in our NXP GCC, as it's required in AUTOSAR OS concept. 

Many thanks,

Nam

标记 (4)
1 解答
1,633 次查看
alexanderfedoto
NXP Employee
NXP Employee

According to release notes in compiler directory (see <>/S32DS.3.3/S32DS/build_tools/gcc_b1620/gcc-6.3-arm32-eabi/releasenotes.pdf) - yes it is:

pastedImage_1.png

在原帖中查看解决方案

3 回复数
956 次查看
comsytec
NXP Employee
NXP Employee

In version of 9.2.0 #pragma GCC section text ".mcal_text" has no effect for functions like snprintf, vsnprintf ... (standard functions) despite there is custom implementation of them and there is no prototype include before using desired mapping

#define ETH_43_PFE_START_SEC_CODE
#include "Eth_43_PFE_MemMap.h"

extern int snprintf(char_t *str, size_t size, const char_t *pcocStr, ...);
extern int vsnprintf(char_t *str, size_t size, const char_t *pcocStr, va_list VarArg);

Only __attribute__ is solution. Perhaps this is a bug.

0 项奖励
950 次查看
comsytec
NXP Employee
NXP Employee

For builtin functions need to add options like
-fno-builtin-memcpy 
-fno-builtin-memset 
-fno-builtin-memcmp 
-fno-builtin-memmove 
-fno-builtin-strcmp 
-fno-builtin-strcpy 
-fno-builtin-strncpy 
-fno-builtin-strlen 
-fno-builtin-abs 
-fno-builtin-snprintf 
-fno-builtin-vsnprintf 

and then the

#define ETH_43_PFE_START_SEC_CODE
#include "Eth_43_PFE_MemMap.h"

achieving desired effect

0 项奖励
1,634 次查看
alexanderfedoto
NXP Employee
NXP Employee

According to release notes in compiler directory (see <>/S32DS.3.3/S32DS/build_tools/gcc_b1620/gcc-6.3-arm32-eabi/releasenotes.pdf) - yes it is:

pastedImage_1.png