Welcome to ELEC2645

A retro games console. Its LCD screen shows ELEC2645 Embedded Systems Project, the ELEC2645 Bot d[o_0]b and PRESS START, next to a pixel-art Parkinson Building clock tower. Beside the screen are a joystick and two buttons.

This is the reference website for the ELEC2645 labs. It covers the C programming and embedded systems topics you need, from your first printf() to a games console of your own.

No pointers were harmed in the making of this website. Several were left dangling.

How to use this site

This site is a reference, not a book: you do not need to read it from start to finish.

  • Use it alongside your lab activity. When an activity guide uses something new, such as fgets(), a struct or a Makefile, look it up here.
  • Search for what you need. The search box at the top of every page finds functions, keywords and error messages.
  • Run the examples. Most pages build up in small steps and end with a complete example. Use the copy button on the code block, compile it, run it, then change something and see what happens.
  • Check “Common mistakes” first. When your build fails or your program does something strange, the “Common mistakes” section of the relevant page lists the problems students meet most often.
  • Minerva has the tasks and deadlines. The activities, assessment briefs and submission points are on Minerva. This site explains the ideas behind them.

Which sections go with each unit

Unit What you do Start with
Unit 1: C programming C recap, arrays and strings, functions and modular code, memory and pointers C Basics, Arrays, Strings and Structs, Functions, Files, Building C Projects, Pointers, Debugging
Unit 2: command line project A menu-driven program built as a finite state machine, split into modules and checked with unit tests Command Line Basics, Finite State Machines, Multi-file C projects, Makefiles, Testing, and Saving and loading records for storing data
Unit 3: STM32 hardware Programming the NUCLEO-L476RG board: the LCD, joystick, timers, PWM and interrupts STM32, LCD, Joystick, Timers, PWM, Interrupts
Unit 4: group games console Each group member writes a game, and the group combines them into one console with a menu The Unit 3 sections, plus Game characters as state machines and Working as a team

Each unit builds on the one before. If a Unit 3 page loses you, the C it relies on is in the Unit 1 and 2 sections.

Tools

The Tools section covers what you use alongside the C from the first week:

  • Codespaces: opening a Codespace, compiling, running and using tasks
  • Git and GitHub: recording your work, branches and pull requests, and sharing a repository with your group
  • Markdown basics: writing READMEs and documentation, with links and images
  • Code styling: the layout and naming rules used in this module

Further reading

All the material needed for assessment will be described on this site, but no one resource can teach you all of C or how best to use it in all situations. The following are other places you can look that I have gone through myself:


This site uses Just the Docs, a documentation theme for Jekyll.