FAQ_MA35_Family M4 RAM Resize

Post Reply
yhcheng3
Posts: 55
Joined: 02 Dec 2022, 10:46

11 Apr 2024, 14:39

Question :

How to adjust the memory allocation of M4?


Answer.
Using the latest BSP, you can modify the usage space of M4 as follows:
Buildroot can modify the usage space of M4 (maximum 4MB). Users can modify it according to their needs.

1. Modify Kernel of device tree: ma35d1-som-512m.dts

Code: Select all

reserved-memory {
       #address-cells = <2>;
       #size-cells = <2>;
       ranges;
       rproc_buf: rproc_buf@0 {
         //reg = <0x0 0x80020000 0x0 0x60000>; /* 384KB */
         reg = <0x0 0x80020000 0x0 0x3E0000>; /* 3M+896KB */
         no-map;
         };
2. Modify MA35D1_Buildroot/board/nuvoton/ma35d1/uboot-env.txt

Modify :
kernel_addr_r=0x80080000
To:
kernel_addr_r=0x80400000

Code: Select all

uint8_t test_buf[3 * 1024 * 1024];
int main()
{

    SYS_Init();
    /* Init UART to 115200-8n1 for print message */
    UART_Open(UART16, 115200);
    /* Connect UART to PC, and open a terminal tool to receive following message */
    printf("Hello World\n");

    /* Got no where to go, just loop forever */
    while(1)
        {
            memset(test_buf, 0x00, sizeof(test_buf));

            printf("Hello World\n");
        }

}



#MA35 , #M4
.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests