The S32DS project link reported an error

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

The S32DS project link reported an error

950 次查看
liuxy
Contributor II

Create a New S32DS Application Project. There is no problem with the compilation link itself. However, when adding a new code directory link, the following error occurs. How can I fix it

 

 

Finished building: ../src/fun.c

Building target: test.elf
Invoking: Standard S32DS C Linker
aarch64-none-elf-gcc -o "test.elf" "@test.args" -lc -lm -lgcc
/usr/local/NXP/S32DS.3.6.0/S32DS/build_tools/gcc_v9.2/gcc-9.2-arm64-eabi/bin/../lib/gcc/aarch64-none-elf/9.2.0/../../../../aarch64-none-elf/bin/ld: error: no memory region specified for loadable section `.bss'
collect2: 错误: ld 返回 1
make: *** [makefile:39:test.elf] 错误 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.

标记 (1)
0 项奖励
回复
3 回复数

932 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @liuxy 

The error you are encountering: error: no memory region specified for loadable section `.bss'
suggests that the linker does not know where to place the .bss section in memory. This typically happens when the linker script is either missing or incomplete.

I recommend referring to the official documentation for the GNU, which provides detailed guidance on how to define memory regions and assign sections properly.

GNU Linker (ld)

 

BR, VaneB

0 项奖励
回复

902 次查看
liuxy
Contributor II

    My understanding is that when I use the S32DS IDE tool for coding, I should not modify the bss segment of the ld part or the memory allocation of other parts.After all, the amount of my code was not overly large, so I initially thought it was a problem with the configuration of my ide environment. I searched on the official website but couldn't find a corresponding solution.

    I only added the header file and source file of the following function declaration and implementation, and then compiled them together with main.c, which would result in an error.

void myprintf(void)
{
printf("test");
}

0 项奖励
回复

884 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @liuxy 

To view the console output when using the printf function, please refer to the following community thread:

how to use the printf function in S32DS.3.5 ?

0 项奖励
回复