Merge pull request #48286 from matthewbauer/avrgcc

avr: use new cross compilation infrastructure
This commit is contained in:
Matthew Bauer
2018-10-30 13:49:08 -05:00
committed by GitHub
38 changed files with 362 additions and 530 deletions

View File

@@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub
, gcc-arm-embedded, libftdi
, gcc-arm-embedded, binutils-arm-embedded, libftdi
, python, pythonPackages
}:
@@ -17,8 +17,11 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
nativeBuildInputs = [
gcc-arm-embedded binutils-arm-embedded
];
buildInputs = [
gcc-arm-embedded
libftdi
python
pythonPackages.intelhex

View File

@@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
description = "A Device Firmware Update based USB programmer for Atmel chips with a USB bootloader";
homepage = http://dfu-programmer.sourceforge.net/;
maintainers = [ maintainers.the-kenny ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation {
sha256 = "1a663bv3lvm7bsf2wcaj2c0vpmniak7w5hwix5qgz608bvm2v781";
};
buildInputs = [ unzip libusb ];
buildInputs = [ libusb ];
installPhase = ''
install -Dm755 teensy_loader_cli $out/bin/teensy-loader-cli
@@ -21,6 +21,6 @@ stdenv.mkDerivation {
description = "Firmware uploader for the Teensy microcontroller boards";
homepage = https://www.pjrc.com/teensy/;
maintainers = with maintainers; [ the-kenny ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@@ -1,4 +1,5 @@
{ stdenv, fetchFromGitHub, avrbinutils, avrgcc, avrlibc, libelf, which, git, pkgconfig, freeglut
{ stdenv, fetchFromGitHub, libelf, which, git, pkgconfig, freeglut
, avrbinutils, avrgcc, avrlibc
, libGLU_combined }:
stdenv.mkDerivation rec {
@@ -15,14 +16,10 @@ stdenv.mkDerivation rec {
# ld: cannot find -lsimavr
enableParallelBuilding = false;
preConfigure = ''
substituteInPlace Makefile.common --replace "-I../simavr/sim/avr -I../../simavr/sim/avr" \
"-I${avrlibc}/avr/include -L${avrlibc}/avr/lib/avr5 -B${avrlibc}/avr/lib -I../simavr/sim/avr -I../../simavr/sim/avr"
'';
buildFlags = "AVR_ROOT=${avrlibc}/avr SIMAVR_VERSION=${version}";
installFlags = buildFlags + " DESTDIR=$(out)";
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
@@ -31,8 +28,8 @@ stdenv.mkDerivation rec {
patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ which git avrbinutils avrgcc avrlibc libelf freeglut libGLU_combined ];
nativeBuildInputs = [ which git pkgconfig avrgcc avrbinutils ];
buildInputs = [ libelf freeglut libGLU_combined ];
meta = with stdenv.lib; {
description = "A lean and mean Atmel AVR simulator";
@@ -43,4 +40,3 @@ stdenv.mkDerivation rec {
};
}