Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

TRAVEO™ T2G Forum Discussions

user_1705251
Level 1
First like received 5 sign-ins 5 replies posted
Level 1

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!

0 Likes
1 Solution
KumarAP
Moderator
Moderator 10 solutions authored First like given 25 sign-ins
Moderator

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

View solution in original post

0 Likes
4 Replies
KumarAP
Moderator
Moderator 10 solutions authored First like given 25 sign-ins
Moderator

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

0 Likes
user_1705251
Level 1
First like received 5 sign-ins 5 replies posted
Level 1

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

 

0 Likes
user_1705251
Level 1
First like received 5 sign-ins 5 replies posted
Level 1

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?

0 Likes
user_1705251
Level 1
First like received 5 sign-ins 5 replies posted
Level 1

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.