Skip to main content
Visitor II
November 19, 2024
Solved

LWIP issue in STM32H730VBT6

  • November 19, 2024
  • 2 replies
  • 1026 views

Hello,

 

I'm trying to bring up a simple ethernet client on a STM32H730VBT6 custom board.

Looks like I have a 128KB of Flash and 560KB of RAM and my code would not fit into flash after I have enabled.

I modified the linker script to to remap the text section to point from FLASH TO RAM_D1.

PS : Not sure what other things I'm breaking by doing this. The code compiles okay and now my memory region looks like this after the modification.

surendersampath_0-1732028992992.png

I'm having a hard fault @HardFault_Handler() at stm32h7xx_it.c:93 0x24001c08

I believe my lwip heap is pointing to the wrong location in the RAM. 

 

Can someone help me understand how to fix this or map only the sections of lwip to ram?

Attached my .ioc file.

 

 

    This topic has been closed for replies.
    Best answer by Pavel A.

    128KB of Flash is not much, but a simple LwIP based program without a RTOS should fit. Look at examples provided by ST. Maybe even a FreeRTOS based program will fit. Note that if you try to relocate some code to RAM, it still occupies place in the flash (guess why?) unless you want to run it only under debugger.

     

     

     

    2 replies

    Pavel A.Answer
    Super User
    November 19, 2024

    128KB of Flash is not much, but a simple LwIP based program without a RTOS should fit. Look at examples provided by ST. Maybe even a FreeRTOS based program will fit. Note that if you try to relocate some code to RAM, it still occupies place in the flash (guess why?) unless you want to run it only under debugger.

     

     

     

    ST Employee
    November 19, 2024

    Hello @surendersampath ,

    you should consider maybe using an external memory using QUADPSI or FMC to store your code as even moving the code to Ram will require a copy of it to be in flash in order to loaded into RAM as RAM is volatile memory.

    so either try to optimize the code and trim unnecessary bits to be able to put it in the128kb of flash or make use of and external memory using Load and Run or execute in place methods with QUADPSI (check examples for H735 in STM32CubeH7/Projects/STM32H735G-DK/Examples/OSPI at master · STMicroelectronics/STM32CubeH7)

    Regards