Duet Wifi 3.2beta2 crashes with long menu file
-
When the menu file is over 30 lines long the board restarts when the menu is selected. Making the menu shorter by a few lines makes it stable for a little bit and crashes after a moment. Short menus < 20 seem to work fine. Maybe memory issue?
My HW:
Duet Wifi v1.03 with 3.2beta2 firmwareMy config:
M918 P1 E4 F2000000
crashing menu file:
text R0 C2 F0 T"x:" alter N510 D1 W26 text C46 T"y:" alter N511 D1 W26 text C88 T"z:" alter N512 D2 W32 image R12 C0 L"hline.img" text R14 C1 F0 T"x" button C11 T"-50 " A"G91 G1 X-50 F6000" button C32 T"-10 " A"G91 G1 X-10 F6000" button C50 T" -1 " A"G91 G1 X-1 F6000" button C69 T"+1 " A"G91 G1 X1 F6000" button C87 T"+10 " A"G91 G1 X10 F6000" button C108 T"+50 " A"G91 G1 X50 F6000" text R26 C1 F0 T"y" button C11 T"-50 " A"G91 G1 Y-50 F6000" button C32 T"-10 " A"G91 G1 Y-10 F6000" button C50 T" -1 " A"G91 G1 Y-1 F6000" button C69 T"+1 " A"G91 G1 Y1 F6000" button C87 T"+10 " A"G91 G1 Y10 F6000" button C108 T"+50 " A"G91 G1 Y50 F6000" text R38 C1 F0 T"z" button C11 T"-25 " A"G91 G1 Z-25 F6000" button C32 T"-5 " A"G91 G1 Z-5 F6000" button C50 T" -1 " A"G91 G1 Z-1 F6000" button C69 T"+1 " A"G91 G1 Z1 F6000" button C87 T"+5 " A"G91 G1 Z5 F6000" button C108 T"+25 " A"G91 G1 Z25 F6000" image R50 C0 L"hline.img" button R51 C0 F0 T"<" A"return" button T" Home All " A"M98 P/sys/homeall.g"
-
Please run M122 and check the value shown as Never Used RAM.
-
Never used ram: 76
value with smaller menu: 468
value without screen (no M918): 5968 -
That's the problem then, RepRapFirmware has run out of RAM. Try creating fewer elements per menu page.
-
What value I should be aiming for safe operation?
-
I suggest you aim for at least 200 bytes free, after switching between different menus repeatedly and doing a print.
The difficulty is that RRF on the Duet WiFi/Ethernet supports up to 12 stepper drivers, so it needs more RAM for the movement buffers than the Maestro does.
-
I'm using only 3 motors is there an easy way to free this memory, I can recompile firmware if needed.
-
@spw said in Duet Wifi 3.2beta2 crashes with long menu file:
I'm using only 3 motors is there an easy way to free this memory, I can recompile firmware if needed.
Yes, you can reduce the value of NumDms in file Move.h. I suggest you reduce the *8 to *4.
-
Thank you it helped a lot. I reduced *8 to *5 and it doubled free memory, now with the complex menu, I still have 4000+ bytes free.
Since the memory is dynamically allocated do you think you could add a GCode to reallocate this buffer so I don't have to recompile firmware with every version, I think other users would benefit too since 4 motors + 1 or 2 heater is the most common setup.
-
@spw said in Duet Wifi 3.2beta2 crashes with long menu file:
Thank you it helped a lot. I reduced *8 to *5 and it doubled free memory, now with the complex menu, I still have 4000+ bytes free.
Since the memory is dynamically allocated do you think you could add a GCode to reallocate this buffer so I don't have to recompile firmware with every version, I think other users would benefit too since 4 motors + 1 or 2 heater is the most common setup.
Can you share your compiled firmware with only 5 motors?
-