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.
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)
How to set up to avoid this situation? Thanks very much!
Best Regards
tian
已解决! 转到解答。
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.
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:
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:
Look forward to your reply!
Best Regards
tian
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.
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