MicroPython future development

Hi Folks:

Sorry I’ve dropped the ball on this a bit in the last few weeks; unfortunately I had some deadlines at work and haven’t had time to work on it.

I’ll try to get some done this week. The suggestion to use the RP2 port as the basis is timely, as I haven’t really started the work yet so not too bad to pivot to that.

Cheers,
Matt V.

2 Likes

@mvdw Sure, thanks for your contribution~

I’ve managed to mostly port the rtl8722 over to use a generic toolchain, and updated to a much later micropython tree.

It almost builds, just fails at the link stage because it doesn’t fit into RAM; I think it’s because there are several duplicate linkages that takes it over the ram size.

The repo is at https://github.com/mvdw73/micropython/tree/rtl8722-dev, make sure to choose the rtl8722-dev branch.

2 Likes

Nice, I will take a look, but I think I know the reason, bcos I always enable PSRAM while using MicroPython, but PSRAM is not enabled by default, so there will be RAM shortage (However, I do agree with you–there must be something taking too much extra RAM than necessary, becuase 512KB SRAM is quite big already)

Note that I also had to change one data structure in the gc.h header file, as there was a namespace clash with one of the FreeRTOS headers. There was a “#define free vPortFree” line in one of the headers in the rtl tree, that clashed with a struct member of free in the gc_info_t struct. I just changed all the members of the gc_info_t struct to have leading underscores, but in order for a permanent fix we’ll need to be more careful about which headers are included into which C files, so we don’t have to rely on an upstream patch.

2 Likes

Looking great @mvdw! There’s still quite a lot of tidy-up work to do (that I am happy to help with), just not sure how best to document/track it all.

Would you be able to join Slack? We’ve created a channel to discuss the port. Simon and I are also considering a zoom call soon - maybe Thursday evening? - would be great if you could join in!

1 Like

Definitely can join slack; despite the fact that I am an electronics engineer I am a little bit behind the times when it comes to slack/discord/devops/CI etc but I’m really trying to learn. So this will be a good opportunity for some “career development” :slightly_smiling_face:

If you give me some more information I’ll join up.

1 Like

@mvdw Just click the “autoinvite here” from above :wink:

I was really tempted to do a whole stack of the tidy up work and had to hold myself back…

In the short term I’ll install slack (no deb package - only rpm!); let me know the space I need to connect to. Then when we are all on board we can triage the work to be done.

Cheers,
Matt.

Yeah, getting it building in the current form is definitely the right way to go, then we can start to refactor and tidy-up.

Installing slack is a slightly better experience but you can log in via a browser too if that’s easier. The channel is ameba-port. I can invite you to the channel after you join (or you can add yourself).

I’m usually fairly busy through the day but will try to be responsive in the evenings.

Hi @mattyt ,

Sorry I’ve been distracted for a while (whew! Is it 18 months already??). For the phase of the project I was working with, we finally went with a Raspberry Pi for the initial proof of concept testing, but now we are wanting to use something a bit more embedded and are using the RTL8720DN boards, specifically the BW16 variant. I have some of these boards, in the RTLduino form factor, in the raw form factor, and also in the raw form factor with the UF.L connector loaded and (I’m promised) enabled.

Currently having issues with running umqttsimple.py - apparently the usocket module is very incomplete in this micropython port, so hopefully I can fix that quickly.

On another note, I’m heading to PyCon.au in August, so I hope to catch up with you (and Damien), and maybe you can give me a shove to actually do some work with the port instead of promising and then going on radio silence…

Maybe we can make a plan for one of the hackathon days to do some work - I’m at the conference right through so we might be able to make some good headway.