Hi, I transportted my original program driver to RTD 4.0.0 from RTD 2.0.3. The demo startup file and demo ld file base on RTD 4.0.0 allocate the stack to dtcm area, and I thought it useful to save RAM area. But it resultted in a curious trouble that the program may run into hardfault when it stored some data into a stack addess.
For example, The stack area address I defined at ld file located at 0x20000000~0x20002000. I defined a struct data in the pit ISR, which has only 42 bytes, and the address of the struct data was allocated at 0x20001e60 in the pit ISR, once the code runs to "str r0, [r4, #0]" which r4 is 0x20001e60, the program then run into the hardfault. If I move the struct data to globle variable, the ISR would run ok.
Another method to avoid this trouble is disabling the MPU, I think I have some mistake on the MPU setting, the dtcm part setting is as below:
The ld file is uploaded as attachment.
please help me to check out the trouble, thanks a lot.
Hi, don't you have some conflict between descriptors' setup?