- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want set heap and stack to DTCM(replace of SRAM),and it run normal.
But when i write flash, the code crashes, I think it coursed by ROM API.
So what happend? how to solve it?
thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please elaborate a little more regarding the issue.
Also please take care that you are not accessing any reserved memory region.
I would suggest you to refer the "flash" example of latest SDL 7.5 (Path after installation -->> T2G_Sample_Driver_Library_7.5.0\tviibh8m\src\examples\flash).
You can uncomment the macro "LINK_CM7_STACK_HEAP_TO_SRAM_NOT_DTCM" present in linker_directives file (path -->> T2G_Sample_Driver_Library_7.5.0\tviibh8m\tools\ghs\linker_directives.ld).
Link for latest SDL : https://softwaretools.infineon.com/tools/com.ifx.tb.tool.traveoiisampledriverlibraryutil?utm_source=...
Thank you.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please elaborate a little more regarding the issue.
Also please take care that you are not accessing any reserved memory region.
I would suggest you to refer the "flash" example of latest SDL 7.5 (Path after installation -->> T2G_Sample_Driver_Library_7.5.0\tviibh8m\src\examples\flash).
You can uncomment the macro "LINK_CM7_STACK_HEAP_TO_SRAM_NOT_DTCM" present in linker_directives file (path -->> T2G_Sample_Driver_Library_7.5.0\tviibh8m\tools\ghs\linker_directives.ld).
Link for latest SDL : https://softwaretools.infineon.com/tools/com.ifx.tb.tool.traveoiisampledriverlibraryutil?utm_source=...
Thank you.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you!
I migrated the Sample_Driver_Library code to the latest version 7.5.0, but it alos does not work.
I think it caused by ipc (m7 core and rom api), and when i write flash, the var g_scratch.u32[0] changed to 0xF0000013(modified by ipc), it means the ipc failed(knows by call Cy_Srom_GetResponseType()).
Some variables assigned by the stack may need to be used by ipc, so when i use m7 self dtcm as stack It crashed.
But erase flash works well, how to solve this issue?
i attach my link file(IAR compiler)
thank you very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And I saw that macro "LINK_CM7_STACK_HEAP_TO_SRAM_NOT_DTCM" is open(ghs compiler), Is it not recommended to use DTCM as stack?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks to @KumarAP ,remind me of the definition of variables(locate on SRAM or DTCM).
typedef struct
{
uint32_t srcAddr : 32; // 32-bit aligned address of SRAM where data to be programmed will be stored
} cy_stc_program_row_arg3_t;
this srcAddr whill be used by IPC, so if it locate on self-dtcm, SROM API can not access to the address.
So the solution is that locating srcAddr on SRAM.