Skip to content
Discussion options

You must be logged in to vote

Basically what you want is what is being implemented in #9529 which is a way to embed MicroPython into an existing piece of C/C++ software.

We plan to add more examples and hopefully merge it soon, but there should be enough to play around with.

Regarding the fixed number of instructions, I realised you can actually do something very close to this using the VM loop hook: https://github.com/micropython/micropython/blob/master/py/mpconfig.h#L588 -- basically you can have the VM run your custom function run after jump instructions and you can implement your own counter and raise an exception as necessary. Obviously not quite the same as every instruction, but should solve the same problem?

Replies: 3 comments 12 replies

Comment options

You must be logged in to vote
1 reply
@AlexApps99
Comment options

Comment options

You must be logged in to vote
9 replies
@jimmo
Comment options

@AlexApps99
Comment options

@jimmo
Comment options

@stinos
Comment options

@AlexApps99
Comment options

Answer selected by AlexApps99
Comment options

You must be logged in to vote
2 replies
@AlexApps99
Comment options

@cwalther
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants