[STM32F429-DISC1] Use of Viper seems to crash the board #9784
Replies: 1 comment 6 replies
-
Interesting! That should definitely work (and it does work for me on a STM32F405 on both 1.19.1 and the current nightly). Thanks for providing a very minimal example! Note that using ar = bytearray(12)
@micropython.viper
def dummy_write():
a = ptr32(ar)
a[1] = 1234
print('before:', ar)
dummy_write()
print('after:', ar) or ar = bytearray(12)
@micropython.viper
def dummy_write(a: ptr32):
a[1] = 1234
print('before:', ar)
dummy_write(ar)
print('after:', ar) Both give me the same result as your original snippet -- but if you get different results then that might give a clue. Also if you could try with the latest nightly build that would be helpful too. There haven't been any specific changes to the native/viper emitter that I can think of that would explain this though. Can you link to the forum post where you got this snippet from? Was someone else seeing the same issue? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear community, I am quite new in the embedded world (but have several years of python experience), so bear with me if I am doing something stupidly wrong. I have a stm32f429 discovery board running MicroPython
STM32F429DISC-20220618-v1.19.1
firmware. It seems the board crashes as soon as I use the viper decorator. In my actual project I am trying to make use of the display with Peter's nano-gui and pinned the problem down to the viper emitter. Here's a minimal example (which I found on the old forum):Example here:
Executing this through
ampy
(or viampremote mount
) prints the "before" line, then returns to REPL (presumably it reboots, but I'm not sure). I get no other output (i.e., no error message or stacktrace).Any ideas how to proceed?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions