how to fix this compile error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to fix this compile error

2,913 Views
814420552
Contributor III

when I add some code for timer function and the adding code is the following picture ,anther part is  new a isr function ftmTimerISR。

pastedImage_1.png

the DS32 compiler report the following errors 

Executing target #19 flash_partitioning_s32k116.elf
Invoking: Standard S32DS C Linker
arm-none-eabi-gcc -o "flash_partitioning_s32k116.elf" "@flash_partitioning_s32k116.args"
c:/nxp/s32ds_arm_v2018.r1/cross_tools/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: flash_partitioning_s32k116.elf section `.text' will not fit in region `m_text'
c:/nxp/s32ds_arm_v2018.r1/cross_tools/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: section .data loaded at [200020c0,200025f3] overlaps section .text loaded at [200000c0,20002717]
c:/nxp/s32ds_arm_v2018.r1/cross_tools/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `m_text' overflowed by 1716 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:82: flash_partitioning_s32k116.elf] Error 1

0 Kudos
Reply
6 Replies

2,655 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

If you didn't modify m_text section size in linker file, your program is simple too big to fit in flash memory. You can try to turn on optimization for size or write your code more efficiently. 

pastedImage_1.png

Jiri

0 Kudos
Reply

2,638 Views
juliana_rojas30
Contributor III

Hi @jiri_kral ,

I tried the solution you suggested, but it seems not to be working. Do you have any other suggestion? The error that I am getting is the one shown below:

juliana_rojas30_0-1600934439570.png

Thanks in advance!

0 Kudos
Reply

2,628 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

Looks, that linker can't find ammclib. Please make sure that you added correct path to ammclib into project properties: 

jiri_kral_0-1600938049338.png

Jiri 

 

2,626 Views
juliana_rojas30
Contributor III

Hi @jiri_kral , I truly appreciate your fast response.

I had that Library space empty, so, I copied this path:

juliana_rojas30_0-1600938955867.png

Into the space you pointed out. So, now it looks like this:

juliana_rojas30_1-1600939032890.png

Then pressed "Built", but I am still getting the same error.

Note: What's written in the upper space (below Libraries (-l)) was there already.

Thanks again! 

0 Kudos
Reply

2,617 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

 

it is possible share your project? I'll look at it. 

 

Jiri 

0 Kudos
Reply

2,612 Views
juliana_rojas30
Contributor III

Hi @jiri_kral ,

I went and looked for the .a file directly into the simulink files and copied the path and worked (not the one that was in linked resources). I had some issues after that but I was capable of fixing the issue.

Thanks for your help!

0 Kudos
Reply