processor attempted a load or store at a location that does not permit the operation, S32K312

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

processor attempted a load or store at a location that does not permit the operation, S32K312

1,194 Views
lijin_zhang
Contributor I

When I only used to drive part of the program, the program was fine, when I added part of the function, there was a hardware interrupt, indicating an error;

The link file was changed after adding the function;

lijin_zhang_0-1675668027741.png

lijin_zhang_0-1675668089271.pnglijin_zhang_1-1675668118642.png

 

 

0 Kudos
Reply
5 Replies

1,183 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @lijin_zhang,

What function have you added?

Does the error occur during the startup after the code is loaded before a breakpoint at main()?

If so, you can start debugging startiing from the startup().

danielmartynek_0-1675673676315.png

 

Regards,

Daniel

 

0 Kudos
Reply

1,168 Views
lijin_zhang
Contributor I

Thank you very much for your reply!  I think it's probably not because official routines can be replicated.

If I take any of the official test cases and add a large enough array to change the link files, I can reproduce the problem,I think there is a RAM  area overflow, for example : (.BSS ) 

The Settings are as follows:

int_flash : ORIGIN = 0x00400000, LENGTH = 0x001D4000 /* 2048K - 176K (sBAF + HSE)*/
int_itcm : ORIGIN = 0x00000000, LENGTH = 0x00008000 /* 32K */
/*int_dtcm : ORIGIN = 0x20000000, LENGTH = 0x00010000*/ /* 64K */
int_dtcm : ORIGIN = 0x20000000, LENGTH = 0x00008000
int_sram : ORIGIN = 0x20400000, LENGTH = 0x00014F00 /* 80 KB */
int_sram_fls_rsv : ORIGIN = 0x20414F00, LENGTH = 0x00000100 /*0.25K*/
int_sram_stack_c0 : ORIGIN = 0x20415000, LENGTH = 0x00000800 /* 2k*/
int_sram_no_cacheable : ORIGIN = 0x20415800, LENGTH = 0x000025FF /* 32kb , needs to include int_results */
int_sram_results : ORIGIN = 0x20417DFF, LENGTH = 0x00000200
int_sram_shareable : ORIGIN = 0x20008000, LENGTH = 0x00010000 /* 3.5KB */
ram_rsvd2 : ORIGIN = 0x20418000, LENGTH = 0 /* End of SRAM */

lijin_zhang_0-1675910117480.png

Look forward to your reply!

 

 

0 Kudos
Reply

1,154 Views
danielmartynek
NXP TechSupport
NXP TechSupport

In that case, you should see ld errors.

Something like this:

danielmartynek_0-1675944562411.png

Can it be compiled?

If so, you should see the variables the .map file.

 

Regards,

Daniel

0 Kudos
Reply

1,129 Views
lijin_zhang
Contributor I

It can be compiled , and did you modify the LD file like me?

0 Kudos
Reply

1,109 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @lijin_zhang,

Yes, the code compiles with the modified linker file.

But I can't reproduce the fault exception.

I would need to have your whole project and run it on my side.

There is a wrong address in the linker you posted though:

danielmartynek_0-1676385470487.png

Regards,

Daniel

 

0 Kudos
Reply