Preparation tasks

From Digital Systems
Revision as of 20:08, 6 August 2021 by Mike (talk | contribs) (→‎Todo's for Mike)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Here's a checklist of hardware and software tasks to be completed before the course begins again in January, 2022. Apologies for giving references to Debian packages and leaving you (Ian) to work out where they live in Fedora.

  • Order a sufficient quantity of V2 micro:bits:
  • Install an enhanced version of Geany 1.37, with the change found here on GitHub:
Update (6/8/2021): The enhanced version of Geany isn't desperately needed, because the existing sizes of the build menus is enough for the particular examples I plan to use in the lab. We still need Geany ≥1.37 though, because it adds support for ARM assembly language syntax.
  • Install GCC plus tools and GDB for ARM cross-compiling. Probably gcc-arm-none-eabi and gdb-multiarch these days, together with dependencies like binutils, gas and glibc.
  • Install BSD utilities to get hexdump; package bsdmainutils on Debian.
  • Install pyOCD via python3-pip and pip3 install pyocd.
  • Install minicom with defaults set in /etc/minirc.dfl for /dev/ttyACM0 and 9600 8N1.
  • Install udev rules that make all three of the micro:bit's USB endpoints accessible to users: the serial device /dev/ttyACM0, a mass storage device, and a generic HID device that is the debugger interface. Compare the existing /etc/udev/51-microbit.rules on lab machines, but note that the V2 microbit may have a different USB id.
USB id's from actual samples: V1 0D28:0204, V2 0D28:0204 (the same, so no problem there).
  • Install pulseview plus the fx2lafw firmware for FX2-based logic analysers. Package sigrok-firmware-fx2lafw on Fedora.
  • Possibly add udev rules to allow access to a logic analyser pod.
I think the required rules are in /usr/lib/rules.d/{60,61}-libsigrok*.rules already.

The list of packages needed on a vanilla RPi used as the host:

sudo apt-get -y install \
    geany geany-plugin-projectorganizer \
    gcc-arm-none-eabi gdb-arm-none-eabi \
    pulseview sigrok-firmware-fx2lafw minicom \
    python3-pip bsdmainutils sed

Todo's for Mike

  • Install the debug script in those labs that need it.
  • Prepare Geany project files and installation script.
  • Add bonus programs to Lab 2.

The setup script should

  • Modify mime types to associate Geany with *.geany files (see below).
  • Install the GnuARM file type for Geany.
  • Modify Geany preferences:
    • Disable 'Load Files from last session'.
    • Enable Project Organizer extension: this requires knowing where is installed. Care needed if the setup script is going to work both on Fedora and on Debian and derivatives.
    • Select Project tab in sidebar.


File association

The existing setup script for Bare Metal micro:bit creates files (see GitHub for the contents):

  • $HOME/.local/share/mime/packages/application-x-geany-project.xml
  • $HOME/.local/share/applications/geany.desktop

and then runs update-mime-database and update-desktop-database on the two directories respectively.

GnuARM filetype

Note that this modification is potentially disruptive to others who might use Geany to edit native assembly language files on x86 – so probably better done locally for each user.

  • Install filetypes.GnuARM.conf in $HOME/.config/geany/filedefs.
  • Remove the setting for [Extensions] GnuAS and add one for [Extensions] GnuARM in $HOME/.config/geany/filetype_extensions.conf