2025-02-10 4:19 AM
Hi everyone,
I am trying to implement Micro-ROS over UDP on an STM32F7 (Nucleo-F767ZI), but I keep running into hard fault errors. I am using LWIP with FreeRTOS in STM32CubeIDE.
So far, I have:
Has anyone successfully gotten Micro-ROS over UDP working on an STM32F7? If so, could you share:
Any insights or working examples would be greatly appreciated!
Thanks in advance!
2025-02-10 4:46 AM
2025-02-14 6:32 AM
First, I recommend that you take a look at this micro-ROS link: https://github.com/micro-ROS/micro_ros_stm32cubemx_utils
Next, you need to change some configurations for both LWIP, Ethernet, and FreeRTOS. Since you have the STM32F767ZI, you need to change the "First Tx Descriptor Address" and the one for Rx as well. The default value generated by CubeMX causes Hard Faults. For this, I recommend using 0x2000e1e0 for Tx and 0x2000e140 for Rx. In LWIP, I recommend setting a static IP, and you also need to modify the "LWIP_RAM_HEAP_POINTER" and "MEM_SIZE" values. For this, I recommend 0x20020000 for the first one and 10*1024 for the second one.
Finally, you need to add:
.lwip_sec (NOLOAD) : {
*(.RxDecripSection)
*(.TxDecripSection)
} >RAM AT> FLASH
to the FLASH.ld file, because this configuration is not defined in it.
I recommend that you check the STM32F767ZI manual and see where SRAM1 is located. As for micro-ROS, I am still trying to find an implementation because, for now, I haven't been able to get it working with UDP either.
2025-02-14 6:33 AM
I forgot to mention this as well, but this link: https://community.st.com/t5/stm32-mcus-embedded-software/lwip-is-not-working-in-cmsis-v2/td-p/67495/page/2 might also help you get Ethernet working with the V2 of CMSIS.
2025-03-18 2:35 AM - edited 2025-03-18 4:18 AM
Thank you for your prompt response and assistance.
I wanted to provide an update regarding my firmware situation: I recently switched back to the F7 firmware version to 1.16.2 from version 1.17.2 after experiencing some challenges with the newer release. So far, the older firmware (1.16.2) has been functioning flawlessly. Notably, it does not require manual memory address configurations.
Additionally, I’ve successfully implemented micro-ROS over UDP using this firmware version (1.16.2) without encountering any issues thus far. I’ll continue monitoring performance as I proceed with further testing.
Once again, thank you for your support.