Hi,
I have at least two object files whose data (.data and .bss) needs to go into SRAM_DTC, and not just their globals. I have an app that uses USDHC. If I build a version of this app with all data put in SRAM_DTC by default (using C/C++ Build >Settings > Linker > Managed Linker Script settings), it works perfectly. However, if I build a version that puts all data into SRAM_OC by default, it doesn't work at all. I think it's due to some things being accessed via DMA that need to be in DTC. I know I can use __attribute__ section tags inside my code, but this is not helping. I need to be able to be able to tell the linker to put an entire .o file of .data/.bss into DTC using a linker file (unless there is another way). I tried this using the flexspi nor example as a base and modifying it thusly:
linkscripts/bss.ldt:
<#if memory.name=="SRAM_DTC">
*esp_sdio.o(.bss*)
*esp_slave.o(.bss*)
</#if>
data.ldt:
<#if memory.name=="SRAM_DTC">
*esp_sdio.o(.data*)
*esp_slave.o(.data*)
</#if>
main_bss.ldt:
*(EXCLUDE_FILE(*esp_sdio.o *esp_slave.o) .bss*)
main_data.ldt:
*(EXCLUDE_FILE(*esp_sdio.o *esp_slave.o) .data*)
But unfortunately, this causes problems with any other data where I've specifically used __attribute__ section to put things into DTC (they end up in OC instead!) in other object modules.
Can anyone help me with this?
Thanks!