Data access violation error when debugging in IAR

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Data access violation error when debugging in IAR

3,396件の閲覧回数
WenWenDar
Contributor II

Hi all,

When debugging in IAR, a hardfault error occurs, prompting Data access violation (CFSR. DACCVIOL, MMFAR), At data address 0x20408594. 

However, it can be seen from the linker_flash_st32k312.iCF file that the address 0x20408594 is in the accessible SRAM area, as shown in the attachment.

Could you give me some advice? Thank you

タグ(1)
0 件の賞賛
返信
5 返答(返信)

3,379件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @WenWenDar,

This is an MPU data access violation.

Check the MPU configuration, you should know the start address, size and all the other attributes of all the regions.

 

Regards,

Daniel

0 件の賞賛
返信

3,303件の閲覧回数
WenWenDar
Contributor II
when i modify the linker file, i have to modify the MPU configuration at the same time, right?
Is there a document about MPU configration?
0 件の賞賛
返信

3,297件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @WenWenDar,

It depends on how you modify the linker file. Usually, the startup code that configures the MPU uses symbols from the linker file.

Anyway, you should know how the regions are configured - all their attributes, their size, if they overlap, etc.

Refer to ARM documentation.

https://developer.arm.com/documentation/ddi0489/f/memory-protection-unit?lang=en

 

Regards,

Daniel

0 件の賞賛
返信

3,341件の閲覧回数
WenWenDar
Contributor II
Thank you for your reply.

I modified the linker_flash_s32k312.icf . Increased the space of int_sram_no_cacheable and 

int_sram_shareable. Then this problem was solved. 

Could you give me some material about linker_flash_s32k312.icf?

Thank you!
0 件の賞賛
返信

3,326件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello WENPING LIU,


The .icf is a format used by the IAR IDE.

Refer to IAR documentation:


IAR C/C++ Development Guide Compiling and Linking

https://wwwfiles.iar.com/arm/webic/doc/EWARM_DevelopmentGuide.ENU.pdf


Regards,

Daniel

0 件の賞賛
返信