Skip to content

Instantly share code, notes, and snippets.

View ekawahyu's full-sized avatar

Eka Susilo ekawahyu

View GitHub Profile
@ekawahyu
ekawahyu / usbdev.sh
Created June 12, 2023 17:07
Simple bash script to list of multiple USB serial devices by their name
#!/bin/bash
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do
(
syspath="${sysdevpath%/dev}"
devname="$(udevadm info -q name -p $syspath)"
[[ "$devname" == "bus/"* ]] && exit
eval "$(udevadm info -q property --export -p $syspath)"
[[ -z "$ID_SERIAL" ]] && exit
echo "/dev/$devname - $ID_SERIAL"
@ekawahyu
ekawahyu / STLink Upgrade on Apple M1.md
Last active June 22, 2023 13:31
STLink Upgrade on Apple M1
@ekawahyu
ekawahyu / msp430-gcc-4.7.0-build.sh
Last active July 18, 2023 14:45
Script to build msp430-gcc-4.7.0
#!/bin/bash
set -e
# Prerequisite for Linux (Ubuntu-based):
# sudo apt-get install libncurses-dev flex libgmp3-dev libmpfr-dev bison libmpc-dev zlib1g-dev automake build-essential libtool patch tar wget
# If you have newer texinfo in the system, please uninstall or temporarily disable it during building this script:
# sudo apt-get purge texinfo
# Prerequisite for macOS (Homebrew):

Issue Description

Rosetta, the x86_64 emulation layer on Apple Silcon doesn't seem to support an instruction the latest gcc-arm-embedded (11.x) needs. As the workaround, we install the previous known good version (10.3).

Workaround

On terminal, execute the following to install the last known good version (10.3):

$ brew tap --force homebrew/cask