Skip to main content

Systems Programming: Lessons from Building a Networking Stack for Microcontrollers

UB5.132 | Day 2 | 14:30 - 15:00 | Speakers: Patricio WHITTINGSLOW

Systems Programming: Lessons from Building a Networking Stack for Microcontrollers
A picture of a devroom at FOSDEM 2024
Open in browser

Notes

Abstract

Developing Go for micocontrollers with 32kB of RAM requires a big shift in thinking, moreso if you are trying to get a complete networking stack with Ethernet, TCP/IP, HTTP to run on said device.

Over the past years we've learned how to minimize memory usage and make programs run performantly on these small devices by adopting patterns common in the embedded industry, some of which make working with Go a even better experience than the norm.

This talk explores the tried and tested "Embedded Go" programming patterns we've found to work and make developing in Go a pleasure, no matter the hardware context: - Avoiding pointers to structs within structs: rethinking the Configure() method - Zero-value programming - Eliminating heap allocations during runtime - Reusing slice capacity - Bounded memory growth on your program - Safe pointer-to-slice with generational index handles


Notice: The placeholder video image is licensed under CC BY-SA 4.0. The original image can be found hereChanges made to the image are: Cropped the image to a new ratio, part of the image was cut off.