Attempting to access object in assembler

Discussion related to "under the hood" OpenMV topics.
mirkwood
Posts: 13
Joined: Tue Mar 10, 2020 4:08 am

Attempting to access object in assembler

Postby mirkwood » Thu Apr 09, 2020 7:22 am

When I pass an object such as an image to an @micropython.asm_thumb method, what does the number represent?
Is it a pointer to the underlying object, or is it a pointer to some sort of micro python object handle?
If it's a pointer, are some types of memory protected so you cannot access them?

I've tried passing an image hoping I get a reference to an image_t, but when I access the memory at the passed pointer it always returns 0.
User avatar
kwagyeman
Posts: 4270
Joined: Sun May 24, 2015 2:10 pm

Re: Attempting to access object in assembler

Postby kwagyeman » Thu Apr 09, 2020 4:43 pm

Hi, I just added a new feature to the latest firmware where you can do .bytearray() to get a bytearray ref of the image which allows read or write of the underlying data. Attached is a firmware image for the H7 you can use.

This will be out in the next release.
Attachments
firmware.zip
(1.15 MiB) Downloaded 22 times
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 24 guests