I was using an H7-based custom board fine with IDE 2.9.2. When I made the leap to 4.2.5 something broke my ability to run scripts. I created a new fork and clone from the latest master, and I worked through all of the pinout changes to my custom board so it compiles. It runs a tiny script like print(“Hello”) but if I even add an import time module the script will immediately reset the processor. That feels like a memory issue.
Strangly, I also get some “TypeError: can’t convert object to str” errors when I import img or time libraries.
Any ideas?
Doug, we can’t debug custom boards. Let me know if you want to buy some more consulting hours for help.
Strangly, I also get some “TypeError: can’t convert object to str” errors when I import img or time libraries.
Your build is likely corrupted. I’d clean everything and then rebuild.
Clean build of the mpy-cross fixed the TypeErrors. I’ll continue banging on the memory stuff and let you know if we need some help. Thanks!
I’m close to a fix. It was not setting the location and size of the heap. It looks like it’s supposed to work when mpconfigboard.mk uses the linker script stm32h743.ld to calculate _heap_start and _heap_end. The linker script grabs part info from mpconfigboard.h. Something along that chain is broken because when it compiles it can’t find declarations for _heap_start or _heap_end. And I’m suspicious about whether the stack is set optimally.
I can make the firmware run py scripts by hard-coding a location for the heap in main.c, but I don’t know what the best values for heap and stack should be. I’d rather the whole thing works as intended, that is, by leveraging the linker scripts that were supplied by STMicro.
Yeah, trying to merge output from ST’s tools into our firmware would be a nightmare. Good luck.