iap in micropython?
-
- Posts: 31
- Joined: Wed Dec 02, 2015 1:47 pm
iap in micropython?
can I use thr IAP funcation with micropython?
-
- Posts: 31
- Joined: Wed Dec 02, 2015 1:47 pm
Re: iap in micropython?
IAP:In Application Programming, via uart
Re: iap in micropython?
You can definitely do it. Are you thinking of some particular module? Or are you just talking about the concept on general?
Re: iap in micropython?
Hi Dave
How could I split the internal flash memory into two banks(one for existing firmware and another for backup). I might need to do this specifically in case if I need to go for remote firmware upload with the help of a gsm module.
What if I download the firmware from remote server , place it in the sd card and then load it into the flash?, Would it be good approach?
For your reference, I have been using PyboardV11
Thanks in advance!!
How could I split the internal flash memory into two banks(one for existing firmware and another for backup). I might need to do this specifically in case if I need to go for remote firmware upload with the help of a gsm module.
What if I download the firmware from remote server , place it in the sd card and then load it into the flash?, Would it be good approach?
For your reference, I have been using PyboardV11
Thanks in advance!!
lnsri22
Re: iap in micropython?
In order to do this you'll require some special common code that lives at the beginning of the flash (where the rest vector and interrupt vectors live.
It's also possible to execute code from RAM, so a common technique is that you load some code into RAM and that code copies the flash in from the new location into the execution location.
The thing to keep in mind is that if something happens before that process completes (i.e. power is removed) then you can wind up with an unbootable board that needs to be recovered by DFU.
The ISR vectors can be repositioned at runtime, so it would be possible to have some special code that lives at the default location which switches between 2 instances in flash. I'm not away of anybody that's done this for the pyboard, so while eveything is theoretically possible, there are lots of little details to work out.
While mboot doesn't support what you're trying to do, it has many of the elements that you'll need, so it would be worthwhile looking at it.
It's also possible to execute code from RAM, so a common technique is that you load some code into RAM and that code copies the flash in from the new location into the execution location.
The thing to keep in mind is that if something happens before that process completes (i.e. power is removed) then you can wind up with an unbootable board that needs to be recovered by DFU.
The ISR vectors can be repositioned at runtime, so it would be possible to have some special code that lives at the default location which switches between 2 instances in flash. I'm not away of anybody that's done this for the pyboard, so while eveything is theoretically possible, there are lots of little details to work out.
While mboot doesn't support what you're trying to do, it has many of the elements that you'll need, so it would be worthwhile looking at it.