use NixOS 19.03 multiarch gdb instead of custom build
This commit is contained in:
parent
4a334465da
commit
a426c5aad7
@ -1,5 +1,5 @@
|
|||||||
[target.thumbv7em-none-eabihf]
|
[target.thumbv7em-none-eabihf]
|
||||||
runner = "arm-none-eabihf-gdb -q -x openocd.gdb"
|
runner = "gdb -q -x openocd.gdb"
|
||||||
rustflags = [
|
rustflags = [
|
||||||
"-C", "link-arg=-Tlink.x",
|
"-C", "link-arg=-Tlink.x",
|
||||||
]
|
]
|
||||||
|
13
nix/gdb.nix
13
nix/gdb.nix
@ -1,13 +0,0 @@
|
|||||||
# TODO: gdb 8.2.1 from NixOS >= 19.XX is multiarch by default.
|
|
||||||
# remove the following as `gdb` is already in scope
|
|
||||||
|
|
||||||
{ stdenv, gdb }:
|
|
||||||
|
|
||||||
gdb.override {
|
|
||||||
stdenv = stdenv.override {
|
|
||||||
targetPlatform = {
|
|
||||||
config = "arm-none-eabihf";
|
|
||||||
libc = "newlib";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
let
|
let
|
||||||
gdb = callPackage ./nix/gdb.nix {};
|
|
||||||
adc2tcp = callPackage ./default.nix {
|
adc2tcp = callPackage ./default.nix {
|
||||||
inherit rustManifest;
|
inherit rustManifest;
|
||||||
mozillaOverlay = import <mozillaOverlay>;
|
mozillaOverlay = import <mozillaOverlay>;
|
||||||
@ -13,5 +12,4 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
build = lib.hydraJob adc2tcp;
|
build = lib.hydraJob adc2tcp;
|
||||||
gdb = lib.hydraJob gdb;
|
|
||||||
}
|
}
|
||||||
|
@ -3,23 +3,16 @@
|
|||||||
let
|
let
|
||||||
mozillaOverlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
|
mozillaOverlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
|
||||||
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
|
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; };
|
||||||
# `lib.systems.examples.armhf-embedded` from nixpkgs master
|
|
||||||
# (TODO: use directly starting with NixOS 19.0X)
|
|
||||||
targetPlatform = {
|
|
||||||
config = "arm-none-eabihf";
|
|
||||||
libc = "newlib";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
with pkgs;
|
with pkgs;
|
||||||
let
|
let
|
||||||
rustPlatform = callPackage ./nix/rustPlatform.nix {};
|
rustPlatform = callPackage ./nix/rustPlatform.nix {};
|
||||||
openocd = callPackage ./nix/openocd.nix {};
|
openocd = callPackage ./nix/openocd.nix {};
|
||||||
gdb = callPackage ./nix/gdb.nix {};
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "adc2tcp-env";
|
name = "adc2tcp-env";
|
||||||
buildInputs = with rustPlatform.rust; [
|
buildInputs = with rustPlatform.rust; [
|
||||||
rustc cargo gdb
|
rustc cargo pkgs.gdb
|
||||||
];
|
];
|
||||||
|
|
||||||
# Set Environment Variables
|
# Set Environment Variables
|
||||||
|
Loading…
Reference in New Issue
Block a user