Rules
Before you read the information on this Web page and before you register for the labs, please spend some time to read the rules that we apply to conduct the laboratory work in this course.
- It is prohibited to use AI tools, including those included into text editors or IDEs, to generate (parts of) the code or the reports. This is the case even if modifications are introduced.
- Submitted code and reports MUST BE YOURS. If we suspect generative AI tools were used against the rule above, we will report to the disciplinary board.
- You may (this is not a recommendation) use such tools for general conceptual questions. Be however always very critical due to hallucinations and errors. Always cross-check with other sources
- You cannot use AI tools to answer any of the questions during the demonstration.
- A lab group consists of 1 or 2 students. We (strongly) recommend working in pairs, both for qualitative and for quantitative reasons.
- Demonstrations are individual examinations, even if they are typically conducted in pairs. Each member of the pair should be able to answer any question about any part of the submission. Failure to do so will be considered as a misleading attempt.
If you have any questions, or if you are not sure about the exact meaning of any of the rules, you must consult the course leader or the lab assistant before you start working with the labs.
Lab Registration
Please form a group of two and sign up for the labs through the web interface.
The distribution of the deadlines does not exactly correspond to the time required for each chapter to complete. It is a good idea to finish the chapters that are easier for you, before their deadlines.
Please read the lab manual carefully without jumping over any part of it.
Deadlines
- Grouping up and registering on webreg (see "Lab Regitration above) [important deadline for webreg registration: 08-April kl 23:59]
- Chapter 0 (warm up) [No demo].
- Chapter 1 (bit manipulation) [soft deadline: session 2, 10-April].
- Chapter 2 (mixing c and assembler) [soft deadline: session 5, 22-April]
- Chapter 3 (polling and interrupts) [soft deadline: session 7, 29-April]
- Chapter 4 (preemptive multithreading) [soft deadline: session 9, 06-May]
- Chapter 5 (state machines) [soft deadline: session 11, 19-May]
- Last demonstration occasion [hard deadline: session 13, 22-May]
Lab Documents
Resources
- C or assembler on host machine (chapter 1, and with slight modifications, chapter 2)
- Only involves compiling, debugging and running C or X86 code on the host machine.
- Just needs a C compiler (e.g. gcc) and debugger (e.g., gdb)
- NASM assembler for i386
- LibePC running on Qemu (chapters 0, 2, 3, and 4):
- Short reference to available libepc functions.
- Longer reference to libepc functions
- Debugging with qemu (unsupported)
- see: qemu and gdb.
- in makeNrun.sh, change: "qemu-system-i386 -drive format=raw,file=floppy.img,if=floppy" to "qemu-system-i386 -S -gdb tcp::9000 -drive format=raw,file=floppy.img,if=floppy"
- run gdb from another window
- in gdb run: "target remote localhost:9000". Gdb should connect to qemu.
- in gdb, add breakpoint to the first instruction you are interested in (after make, you can see in link.map that the first instruction to llmultiply is 0x100 in chap4, and first instruction to SerialPut is 0x130 in chap5). You add a breakpoint to llmultuiply with "b *0x100" if llmultiply starts at address 0x100 in link.map.
- You can press "c" to continue, "s" for single insruction, "i r" for registers, "i r eax" for register eax, "x/10i $eip" to print 10 instructions starting at $eip (or anther address), "print (int) *0x402008" to print as integer the 4 bytes starting at given address.
- See qemu and gdb if you want to follow interrupts.
- Cross compilation.
- STM32CubeIDE (Chapter 5)
- The IDE is available in the SU rooms. You can also access it via thinlinc, but then you cannot connect the board to load, run and debug programs.
- You can install the IDE om your machine (whether Windows, Mac or Linux). Read more here about downloading STM32CubeIDE.
- A quick start, including debugging, with the IDE can be found here
- User manual for the STM32L562E-DK can be found here
Page responsible: Ahmed Rezine
Last updated: 2026-03-23
