cancel
Showing results for 
Search instead for 
Did you mean: 

Divide memory

Snm.1
Associate III

Hello, I divided memory of the stm32h747. we want to divide memory in c code. there is below which ld file code we are using now. If there is better things than bellow, please give answerr..

 

MEMORY
{
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /* Memory is divided. Actual start is 0x08000000 and actual length is 2048K */
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K

DMA_BUFF_SECTION (rwx) : ORIGIN = 0x30000000, LENGTH = 2K

RAM_D2 (xrw) : ORIGIN = 0x30000000 + 2K, LENGTH = 286K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}

 

.DMA_UART_BUFF(NOLOAD) :
{
. = ALIGN(1);

} > DMA_BUFF_SECTION

 

#define DMA_RX_BUFF_LEN 1024
#define DMA_TX_BUFF_LEN 1024

__attribute__ ((section(".DMA_UART_BUFF"), used)) uint8_t dma_rx_buffer[DMA_RX_BUFF_LEN];
__attribute__ ((section(".DMA_UART_BUFF"), used)) uint8_t dma_tx_buffer[DMA_TX_BUFF_LEN];

0 REPLIES 0