S32K344 S32DS Opening the DMA module causes static variables not to be initialized

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

S32K344 S32DS Opening the DMA module causes static variables not to be initialized

ソリューションへジャンプ
1,385件の閲覧回数
_tian_10
Contributor I

Hi all! 

        In the S32DS development environment, the addition of the DMA RTD module caused the static variable to be incorrectly initialized and the value to be 0. The chip is not operating properly, and it is in HardFault_Handler.

       Details are as follows:

After DMA is configured, the content in the screenshot section of the added configuration file may cause this situation.

_tian_10_0-1716373236217.png

It causes the static variable to have an initial state of 0 instead of an initial value, as follows:(Observe the variable before it is run and just entered debugging state)

_tian_10_1-1716373793799.png

How to set up to avoid this situation?  Thanks very much!

Best Regards

tian

 

 

0 件の賞賛
返信
1 解決策
1,338件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @_tian_10 

Please test if you have the same behavior with any example that uses DMA. Also, there is the possibility that a wrong memory allocation is causing abnormal code execution, so please verify the linker file. 

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,369件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @_tian_10 

Please provide more details about the situation. Also, if possible provide the steps to reproduce the issue. 

 

B.R.

VaneB

0 件の賞賛
返信
1,348件の閲覧回数
_tian_10
Contributor I

Hi VaneB!

 Thank you for your attention! 

 Today I did some careful debugging again and found some problems with the data and bss initializer functions.(init_data_bss)as follow:

_tian_10_0-1716453548403.png

The function here is to load the initialization data in ROM into RAM, but at this time the ROM address content actually points to the RAM space, and the contents of the RAM address space are all 0.

I don't know why this is the case, in the correct project the ROM address points to the ROM space, like the following:

_tian_10_1-1716454115368.png

Look forward to your reply!

Best Regards

tian

 

0 件の賞賛
返信
1,339件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @_tian_10 

Please test if you have the same behavior with any example that uses DMA. Also, there is the possibility that a wrong memory allocation is causing abnormal code execution, so please verify the linker file. 

0 件の賞賛
返信
1,294件の閲覧回数
_tian_10
Contributor I

Hi VaneB!

     Many thanks for your replying.The problem has been solved。The ld file is not modified when SPD is transplanted,A conflict occurs after the DMA module is added。

    Is there any reference document for SPD transplantation or related materials? The modification of ld file was ignored due to insufficient materials.

Best Regards

tian

0 件の賞賛
返信