

Other package managers such as MacPorts (or all Linux-based package managers for the various distributions) run as root (or as a specialized user with reduced privileges) in order to make it more difficult for malware to tamper any file in the package manager's prefix, and to prevent un-authorized users from modifying the set of packages installed. This is different than what all other package managers (on Linux and macOS) do.Īccording to Homebrew's developers, this approach purportedly has the advantage of reducing the attack surface of a hypothetic malware that modifies Homebrew's executables for malicious purposes, but it makes it possible for malware to modify all of the files installed by Homebrew easily (as executable distributed by Homebrew are often not signed). Homebrew specifically forbids being run with elevated privileges using sudo when installing packages.

Homebrew, macOS, and filesystem permissions

With Homebrew, installing st-flash and stm32flash can be performed through the following commands: If you prefer MacPorts, you can search the same packages (or 'ports') on the MacPorts port index. In the following discussion we will assume you have Homebrew available and installed on your system. Both of them provide all packages you need to get started with development on STM32 MCUs. However, thanks to community efforts, there are two third-party package managers for macOS that provide a similar experience to Linux for easily installing tools and programs on the command line: Homebrew and MacPorts. In contrast to Linux but similarly to Windows, macOS does not provide a system package manager. STM32 microcontrollers are the most important target for Miosix, and programming them requires specialized tools which on Linux are often installed through a package manager. Then follow the instructions on screen to complete the installation.
