2021-11-06 06:33 AM
Hi, I have to develope a system where an stm32 connected via ethernet handles files stored in a sdcard through an FTP connection from a PC.
I know there is a sample from ST exactly about this but I can't get it to work on my nucleo H723 board, it seems that somehow the generated files from cubemx are totally scrambled, different content and placed in different locations.
Infact if I try to setup a project using cubemx as found in an online blog the project is generated but I cannot find ethernetif.c under src folder for example...
Could you please help me and show me the right directions?
thanks
Solved! Go to Solution.
2021-11-11 12:48 PM
Thanks, I finally figured it out. It was not working because on cortexM7 processors MPU and ram needs to be configured carefully.
For the posterity I was really helped from this article, pay attention to the linker script editing and the macro definition in project options: https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working
Also my MCU is an H723 so it is the special case with not enough ram in D2 and my MPU region base address needed to be 0x30000000 instead of 0x30040000.
Thanks again to who tryied to help me, really appreciate it.
2021-11-06 03:16 PM
FTP and TFTP are very different. Decide which one do you need.
2021-11-07 01:38 AM
I'd say TFTP which seems to be somehow included in the cubemx configuration options...
But my ultimate goal is to have file trasfers working via ethernet, whatever works I'll pick it.
2021-11-07 11:16 AM
For TFTP, you may want to start from LwIP UDP echo server then merge TFTP from project for other board.
2021-11-09 03:44 AM
Thanks I'll try
2021-11-09 08:13 AM
No way.
I tryied setting up the project in cube mx and copying only the .c/.h of the TCP & UDP echo servers and copying in main.c the relevant part in setup and in the while(1): the project compiles with no errors or warnings but I'm unable to get any answer from a ping.
Maybe importing the whole original project could have worked but I need to start from cubemx since there are other parts of the project which has already been written and that depends on the current HAL initialization...
Too bad that the provided examples doesn't follow the current cubemx structure generation.
2021-11-09 12:33 PM
Start from the LwIP UDP echo server example which is exactly for your board (nucleo H723).
Get it working: ping and whatever it should do. Do not change anything until you see it working.
Then get TFTP working.
Only then try to generate something in cube. Examine and merge differences.
> Too bad that the provided examples doesn't follow the current cubemx structure generation.
Yep.
2021-11-11 12:38 PM
2 months ago I started from link below, however I use it to write firmware to an onboard SPI Flash with an STM32F417 and stm32cubeide.
https://community.st.com/s/question/0D53W00000LFUOmSAP/lwip-tftp-on-stm-boards
2021-11-11 12:48 PM
Thanks, I finally figured it out. It was not working because on cortexM7 processors MPU and ram needs to be configured carefully.
For the posterity I was really helped from this article, pay attention to the linker script editing and the macro definition in project options: https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working
Also my MCU is an H723 so it is the special case with not enough ram in D2 and my MPU region base address needed to be 0x30000000 instead of 0x30040000.
Thanks again to who tryied to help me, really appreciate it.
2023-01-17 07:29 PM
thank you for your comment.
I have already seen this article and modified my cubeMx MPU Base Address to 0x30000000, but as I said in the question article, when I try to debug the project, it moves to the MemMange_Handle(void) function.