HN user

eerimoq

312 karma
Posts15
Comments29
View on HN

For me it's pretty simple. I love Python. I like speed. I like embedded. This is an attempt to take advantage of Python's type hints to create fast and hopefully small binaries that can be executed on embedded devices limited amount of resources (both CPU and RAM).

There are probably other languages that would serve the same purpose, but oh well, I can't resist creating another. =)

Of course the language can help the programmer to write better code. High level constructs and easily available libraries that are well tested and widely used helps a lot. However, the biggest problem is not the language, it's that the programmer simply writes faulty code.

I'm just referring to the fec driver kernel module, not the user space software. But I might of course be wrong. I've done lots of iterations trying to optimize the boot time on this tiny embedded system, and it's not always easy to remember all details. It could be that the fec driver is asynchronously probed. I guess I have to try it again at some point. =)

I'm curious as well, and yes, by reboot I mean calling "reboot(RB_AUTOBOOT)". I was under the impression that the ROM code has to start over from the beginning, which I think it does. Maybe it can skip some initialization since the SoC is already up and running. Maybe there is some initial hardware setup that is only done at power on. It's hard to tell as this part of the boot sequence runs closed source NXP code.

The C code that applies a patch can do so using just a couple 100 bytes of RAM, depending on the chosen compression algorithm. Heatshrink is probably a good choice for an MCU.

There are two kind of patches; normal and in-place. The normal patch requires the old firmware to be readable until the patching procedure is completed. The in-place patch is designed to write the new firmware to the same memory area as the old is read from.

You can read more about in-place patches here: https://detools.readthedocs.io/en/latest/#id2