all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#32907] [PATCH] gnu: Add stlink.
@ 2018-10-02 15:28 Clément Lassieur
  2018-10-02 15:34 ` Clément Lassieur
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Clément Lassieur @ 2018-10-02 15:28 UTC (permalink / raw)
  To: 32907

* gnu/packages/embedded.scm (stlink): New variable.
---
 gnu/packages/embedded.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 017422461..6e8bec771 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,6 +28,7 @@
   #:use-module (guix svn-download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix build utils)
@@ -1104,3 +1106,40 @@ and displaying decoded target responses.
 @end enumerate")
     (home-page "https://www.freecalypso.org/")
     (license license:public-domain)))
+
+(define-public stlink
+  (package
+    (name "stlink")
+    (version "1.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/texane/stlink/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "01z1cz1a5xbbhd163qrqcgp4bi1k145pb80jmwdz50g7sfzmy570"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ;no tests
+                #:configure-flags
+                (let* ((out (assoc-ref %outputs "out"))
+                       (etc (in-vicinity out "etc"))
+                       (modprobe (in-vicinity etc "modprobe.d"))
+                       (udev-rules (in-vicinity etc "udev/rules.d")))
+                  (list (string-append "-DSTLINK_UDEV_RULES_DIR=" udev-rules)
+                        (string-append "-DSTLINK_MODPROBED_DIR=" modprobe)))))
+    (inputs
+     `(("libusb" ,libusb)))
+    (synopsis "Programmer for STM32 Discovery boards")
+    (description "This package provides a firmware programmer for the STM32
+Discovery boards.  It supports two versions of the chip: ST-LINK/V1 (on
+STM32VL discovery kits) and ST-LINK/V2 (on STM32L discovery and later kits).
+Two different transport layers are used: ST-LINK/V1 uses SCSI passthru
+commands over USB, and ST-LINK/V2 and ST-LINK/V2-1 (seen on Nucleo boards) use
+raw USB commands.")
+    (home-page "https://github.com/texane/stlink")
+    ;; The flashloaders/stm32l0x.s and flashloaders/stm32lx.s source files are
+    ;; licensed under the GPLv2+.
+    (license (list license:bsd-3 license:gpl2+))))
-- 
2.19.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#32907] [PATCH] gnu: Add stlink.
  2018-10-02 15:28 [bug#32907] [PATCH] gnu: Add stlink Clément Lassieur
@ 2018-10-02 15:34 ` Clément Lassieur
  2018-10-03 22:20 ` bug#32907: " Clément Lassieur
  2018-10-05 20:08 ` [bug#32907] " Ludovic Courtès
  2 siblings, 0 replies; 5+ messages in thread
From: Clément Lassieur @ 2018-10-02 15:34 UTC (permalink / raw)
  To: 32907


Clément Lassieur <clement@lassieur.org> writes:

> * gnu/packages/embedded.scm (stlink): New variable.
> ---
>  gnu/packages/embedded.scm | 39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>
> diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
> index 017422461..6e8bec771 100644
> --- a/gnu/packages/embedded.scm
> +++ b/gnu/packages/embedded.scm
> @@ -4,6 +4,7 @@
>  ;;; Copyright © 2016 David Craven <david@craven.ch>
>  ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
>  ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
> +;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -27,6 +28,7 @@
>    #:use-module (guix svn-download)
>    #:use-module (guix git-download)
>    #:use-module ((guix licenses) #:prefix license:)
> +  #:use-module (guix build-system cmake)
>    #:use-module (guix build-system gnu)
>    #:use-module (guix build-system trivial)
>    #:use-module (guix build utils)
> @@ -1104,3 +1106,40 @@ and displaying decoded target responses.
>  @end enumerate")
>      (home-page "https://www.freecalypso.org/")
>      (license license:public-domain)))
> +
> +(define-public stlink
> +  (package
> +    (name "stlink")
> +    (version "1.5.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://github.com/texane/stlink/archive/v"
> +                           version ".tar.gz"))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "01z1cz1a5xbbhd163qrqcgp4bi1k145pb80jmwdz50g7sfzmy570"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:tests? #f                      ;no tests
> +                #:configure-flags
            ^
I'll fix that indentation issue.

> +                (let* ((out (assoc-ref %outputs "out"))
> +                       (etc (in-vicinity out "etc"))
> +                       (modprobe (in-vicinity etc "modprobe.d"))
> +                       (udev-rules (in-vicinity etc "udev/rules.d")))
> +                  (list (string-append "-DSTLINK_UDEV_RULES_DIR=" udev-rules)
> +                        (string-append "-DSTLINK_MODPROBED_DIR=" modprobe)))))
> +    (inputs
> +     `(("libusb" ,libusb)))
> +    (synopsis "Programmer for STM32 Discovery boards")
> +    (description "This package provides a firmware programmer for the STM32
> +Discovery boards.  It supports two versions of the chip: ST-LINK/V1 (on
> +STM32VL discovery kits) and ST-LINK/V2 (on STM32L discovery and later kits).
> +Two different transport layers are used: ST-LINK/V1 uses SCSI passthru
> +commands over USB, and ST-LINK/V2 and ST-LINK/V2-1 (seen on Nucleo boards) use
> +raw USB commands.")
> +    (home-page "https://github.com/texane/stlink")
> +    ;; The flashloaders/stm32l0x.s and flashloaders/stm32lx.s source files are
> +    ;; licensed under the GPLv2+.
> +    (license (list license:bsd-3 license:gpl2+))))

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#32907: [PATCH] gnu: Add stlink.
  2018-10-02 15:28 [bug#32907] [PATCH] gnu: Add stlink Clément Lassieur
  2018-10-02 15:34 ` Clément Lassieur
@ 2018-10-03 22:20 ` Clément Lassieur
  2018-10-05 20:08 ` [bug#32907] " Ludovic Courtès
  2 siblings, 0 replies; 5+ messages in thread
From: Clément Lassieur @ 2018-10-03 22:20 UTC (permalink / raw)
  To: 32907-done

Clément Lassieur <clement@lassieur.org> writes:

> * gnu/packages/embedded.scm (stlink): New variable.

Pushed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#32907] [PATCH] gnu: Add stlink.
  2018-10-02 15:28 [bug#32907] [PATCH] gnu: Add stlink Clément Lassieur
  2018-10-02 15:34 ` Clément Lassieur
  2018-10-03 22:20 ` bug#32907: " Clément Lassieur
@ 2018-10-05 20:08 ` Ludovic Courtès
  2018-10-05 23:08   ` Clément Lassieur
  2 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2018-10-05 20:08 UTC (permalink / raw)
  To: Clément Lassieur; +Cc: 32907

Clément Lassieur <clement@lassieur.org> skribis:

> * gnu/packages/embedded.scm (stlink): New variable.

LGTM, thanks!

Ludo'.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#32907] [PATCH] gnu: Add stlink.
  2018-10-05 20:08 ` [bug#32907] " Ludovic Courtès
@ 2018-10-05 23:08   ` Clément Lassieur
  0 siblings, 0 replies; 5+ messages in thread
From: Clément Lassieur @ 2018-10-05 23:08 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32907

Ludovic Courtès <ludo@gnu.org> writes:

> Clément Lassieur <clement@lassieur.org> skribis:
>
>> * gnu/packages/embedded.scm (stlink): New variable.
>
> LGTM, thanks!

Thank you!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-05 23:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-02 15:28 [bug#32907] [PATCH] gnu: Add stlink Clément Lassieur
2018-10-02 15:34 ` Clément Lassieur
2018-10-03 22:20 ` bug#32907: " Clément Lassieur
2018-10-05 20:08 ` [bug#32907] " Ludovic Courtès
2018-10-05 23:08   ` Clément Lassieur

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.