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;
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().
Regards,
Daniel
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 */
In that case, you should see ld errors.
Something like this:
Can it be compiled?
If so, you should see the variables the .map file.
Regards,
Daniel
It can be compiled , and did you modify the LD file like me?
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:
Regards,
Daniel