[Nix-dev] Cross development for STM32

Philip Potter philip.g.potter at gmail.com
Thu Aug 25 10:01:19 CEST 2016


Hi Tim,

I've been compiling some stuff for STM32 recently -- in particular,
the micropython fork for the STM32-based TiLDA-Mk3 board [1][2]. I
just had to install the gcc-arm-embedded package and I was able to
start compiling code.

My shell.nix (for setting up a nix-shell development environment) was
not particularly complicated:

let pkgs = import <nixpkgs> {};
  stdenv = pkgs.stdenv;
in
stdenv.mkDerivation {
  name = "micropython-0.0.1";
  buildInputs = with pkgs; [ git cmake python pythonPackages.pyusb
pkgs.libusb1 gcc-arm-embedded ];
}

With this, I was able to clone https://github.com/emfcamp/micropython
and run `make -C stmhal BOARD=STM32L475_EMFBADGE` to build the .dfu
file.

Phil

[1] https://badge.emfcamp.org/wiki/TiLDA_MK3
[2] https://www.youtube.com/watch?v=sww4gJPse4o

On 25 August 2016 at 02:02, Tim Barbour <trb at categorical.net> wrote:
> I have some STM32 boards (e.g. Maple Mini) to play with. I am not trying to
> port Nixos to them, because they are not really powerful enough to run Linux;
> instead I plan to run ChibiOS/RT on them.
>
> I would appreciate suggestions as to a good way to setup an STM32
> cross-development environment on Nixos, so that I can write software that will
> run on (link with) ChibiOS/RT on the STM32 board.
>
> Tim
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list