|
发表于 2021-5-21 13:51:12
|
显示全部楼层
歸類現況: (RTX5 環境也相同 AC6 編譯會HARDFAULT會HARDFAULT)
AC 5:
__attribute__((section (".RAM_SDRAM"),zero_init)) uint16_t SDRAMSRAMCount;
__attribute__((section (".RAM_SDRAM"),zero_init)) uint32_t SDRAMSRAMBuf[20000];
LR_IROM1 0x08000000 0x00200000 { ; load region size_region
ER_IROM1 0x08000000 0x00200000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM2 0x24000000 0x00080000 { ; RW data
.ANY (+RW +ZI)
}
RW_DMARxDscrTab 0x30040000 0x60 {
*(.RxDecripSection)
}
RW_DMATxDscrTab 0x30040060 0x140 {
*(.TxDecripSection)
}
RW_Rx_Buffb 0x30040200 0x1800 {
*(.RxArraySection)
}
RW_IRAM5 0xC0000000 UNINIT 0x02000000 { ; RW data - 32MB SDRAM (0xC0000000)
;.ANY (+ZI) => 該段也不能加,加後會Hardfault: __Main 進不去
*(.RAM_SDRAM)
}
}
AC 6: /*-----------------------------------------------------------------------------------------------*/
__attribute__((section (".RAM_SDRAM"),zero_init)) uint16_t SDRAMSRAMCount;
__attribute__((section (".RAM_SDRAM"),zero_init)) uint32_t SDRAMSRAMBuf[20000];
會告警:
../../User/main.c(76): warning: unknown attribute 'zero_init' ignored [-Wunknown-attributes]
__attribute__((section (".RAM_SDRAM"),zero_init)) uint16_t SDRAMSRAMCount;
SCT:
.... 同上
RW_IRAM2 0x24000000 0x00080000 { ; RW data
.ANY (+RW +ZI)
}
RW_DMARxDscrTab 0x30040000 0x60 {
*(.RxDecripSection)
}
RW_DMATxDscrTab 0x30040060 0x140 {
*(.TxDecripSection)
}
RW_Rx_Buffb 0x30040200 0x1800 {
*(.RxArraySection)
}
SDRAM SECTION: 我這邊使用V7加入後就Hardfault:
RW_IRAM5 0xC0000000 UNINIT 0x02000000 { ; RW data - 32MB SDRAM (0xC0000000)
;.ANY (+ZI) =>
*(.RAM_SDRAM)
}
還是硬漢哥:
可提供你手邊AC6 SDRAM 的編譯的版本呢? 好參考研究,感謝您。 |
|