cancel
Showing results for 
Search instead for 
Did you mean: 

LWIP issue in STM32H730VBT6

surendersampath
Associate

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

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.

 

 

 

View solution in original post

2 REPLIES 2
Pavel A.
Evangelist III

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.

 

 

 

STea
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.