I have a micropython firmware that integrates the tensorflow micro c++ api. It works for ESP32 and I'm trying to increase the number of boards it supports starting with stm32 with a Nucleo H743ZI2 board (1MB RAM, 2MB Flash).
I'm encountering an issue when I try to run the hello world example where instead of printing out an approximate sine wave it crashes and resets the board.
Is there a specific function I can set a breakpoint on before the board resets where I can see the backtrace of exactly where the fault occured?
I have a test firmware that can be used to reproduce this issue:
1. Download the firmware from:
https://github.com/mocleiri/tensorflow- ... 1397545963
2. Flash the firmware.elf using stm32cubeprogrammer. I have it with alot of debug symbols present because I didn't want variables getting optimized out when trying to see what was going on in visual studio code.
3. After flashing copy https://github.com/mocleiri/tensorflow- ... o_world.py and https://github.com/mocleiri/tensorflow- ... del.tflite
to /flash.
4. Then in run import hello_world to trigger the below behavior:
MicroPython v1.17-123-g7f1434442 on 2021-10-29; NUCLEO_H743ZI2 MICROLITE with STM32H743
Type "help()" for more information.
>>> import microlite
>>> help (microlite)
object <module 'microlite'> is of type module
__name__ -- microlite
__version__ -- e87305ee53c124188d0390b1ef8ec0555760d4d6
interpreter -- <class 'interpreter'>
tensor -- <class 'tensor'>
>>> import hello_world
interpreter_make_new: model size = 2488, tensor area = 2064
MicroPython v1.17-123-g7f1434442 on 2021-10-29; NUCLEO_H743ZI2 MICROLITE with STM32H743
Type "help()" for more information.
>>>
What is supposed to happen is what happens on ESP32 which prints out an approximate sine wave: https://github.com/mocleiri/tensorflow- ... /README.md
[Nucleo-H743ZI2] Where to set breakpoint to find cause of board reset
Re: [Nucleo-H743ZI2] Where to set breakpoint to find cause of board reset
I found out that you can have the board hold on a hard fault. This will show you the stack trace where the problem occurred:
Code: Select all
pyb.fault_debug(1)