Native Module vs Frozen Module #16835
Unanswered
gabsi-w
asked this question in
STM32 / Pyboard
Replies: 1 comment
-
If you accept that the firmware needs to be rebuilt, then a "external C module" is the best supported. Native modules are nice in that they can be dropped in at runtime, but is more complex to write due to the linking limitations. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys,
I am writing my system for a custom hardware based on an STM32F746 MCU. The thing is, I want to rewrite some drivers(like the serial interfaces) to better adecquate to my system and make it also modular. For this I was thinking of offering the additional drivers as MPY files. But I also have a restriction here: in my main.c I have a specific timer that runs at 1ms and whenever its callback is called it runs to an array of functions to call all of them, one by one (there is a maximum number, of course). I also created a function which receives a function as a parameter and link it to the first empty position of this array. I would like to make this function available for my drivers, but (preferrably) not for the micropython user. So, the question is, due to the aforementioned constraints, which approach would be better: Completely out of the firmware Native C module or Frozen C Module + MPY?
P.S.: I am currently trying the first one and it is very challenging due to the fact that I can only do things in runtime, I had to make the add1msInt function public to Micropython and even so I and not being able to properly add the functions to the interrupts. The second option I am a bit clueless.
Beta Was this translation helpful? Give feedback.
All reactions