Error while creating linker script

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

Error while creating linker script

跳至解决方案
2,676 次查看
DridriLaBastos
Contributor I

I was working on a project and all was fine until I restarted mcuXpresso and then I have this error anytime I tried to build my project. I tried to restart MCU, clean the project, rebuild, I always end up with this error and I have no idea why

Error while creating linker scriptError while creating linker script

 

标记 (1)
0 项奖励
1 解答
2,623 次查看
abnxpweb
Contributor III

Double check the name of your memory regions (in the Memory Configuration Editor) against the values in the "Extra linker script input sections" fields. It looks to me like you probably have a mismatch.

If you use the dropdown in the "Extra linker script input sections", the IDE displays the available set of memory region names, at that point in time. But if you then edit the memory region names, things can get out of step unless you reselect.

Hope this helps!

在原帖中查看解决方案

7 回复数
2,648 次查看
DridriLaBastos
Contributor I

I haven't done any changes to the project settings, the only things I've done is adding files to compile and include path. I do this from a base project, both the base project and the project I am working on have the same linker configuration :

DridriLaBastos_0-1617094373568.png

 

The base project compiles without troubles, the new one was fine until I added a source path and this error happens. I tried to delete the source files I added but it doesn't remove the error

0 项奖励
2,639 次查看
converse
Senior Contributor V

I’d suggest create a new project and copy your source files across intot the new project. 

0 项奖励
2,632 次查看
DridriLaBastos
Contributor I

This probably what I will have to do. I don't have this problem when I compile in RELEASE mode, and in debug, there is a linker file that is not correctly created: two sections `.TEXT` are created  and the second one is not properly formated: I have those two lines at the end of the file MIMXRT1064_S2OPC_Debug.ld:

.text : ALIGN(4)
    {

and the `SECTIONS` block is not properly closed

0 项奖励
2,624 次查看
abnxpweb
Contributor III

Double check the name of your memory regions (in the Memory Configuration Editor) against the values in the "Extra linker script input sections" fields. It looks to me like you probably have a mismatch.

If you use the dropdown in the "Extra linker script input sections", the IDE displays the available set of memory region names, at that point in time. But if you then edit the memory region names, things can get out of step unless you reselect.

Hope this helps!

2,605 次查看
DridriLaBastos
Contributor I

It was that, the section names were not the same, I don't why I never touche memory in this project, I only add source path and include path

0 项奖励
2,654 次查看
abnxpweb
Contributor III

Sounds like you have a problem with whatever entries you have got in the "Extra linker script input sections"  field of the IDE's Managed Linker Script setup. Check section 17.13.1 "Placing code and data into different Memory Regions" of the MCUXpresso IDE v11.3.0 User Guide:

abnxpweb_0-1617087330641.png

Hope this helps!

 

0 项奖励
2,666 次查看
converse
Senior Contributor V

Have you changed your memory map recently? If so, try reverting it.

0 项奖励