Skip to content

Compilation flags

BigEd edited this page Jun 8, 2016 · 2 revisions

There is quite a lot of use of conditional compilation to build a firmware image for a specific Pi Model.

The starting point is a Pi Model flag that defined in the generated Makefile

  • RPI2
  • RPI3
  • RPIBPLUS
  • RPIZERO

At most one of these should be defined.

If none of these symbols are present, then the build will target the Raspberry Pi Model B Rev. 1.0

The Pi Model is used throughout the code, but especially in src/tube-defs.h, where lots of additional things are configured based on the Pi Model.

There are a couple of things worth noting, but nothing that should need to be changed:

  • HAS_40PINS indicates the target has a 40 pin GPIO header, and this is used to gate some additional test functionality that allows the duration of the ISR to be observed (via a signal output on GPIO21 on pin 40).

  • If USE_MULTICORE is commented out, then builds for the Pi 2/3 will only use a single core (the other will be put to sleep).