unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 01/10] gnu: Add dummy linker for propeller-elf.
@ 2016-12-26 16:04 Ricardo Wurmus
  2016-12-26 16:04 ` [PATCH 02/10] gnu: Add propeller-binutils Ricardo Wurmus
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for
propeller-elf.
---
 gnu/packages/bootstrap.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 11ebd79..dd922c3 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -174,6 +174,7 @@ successful, or false to signal an error."
         ((string=? system "arm-eabi") "no-ld.so")
         ((string=? system "xtensa-elf") "no-ld.so")
         ((string=? system "avr") "no-ld.so")
+        ((string=? system "propeller-elf") "no-ld.so")
         ((string=? system "i686-mingw") "no-ld.so")
 
         (else (error "dynamic linker name not known for this system"
-- 
2.10.2

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

* [PATCH 02/10] gnu: Add propeller-binutils.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
@ 2016-12-26 16:04 ` Ricardo Wurmus
  2016-12-31  0:31   ` Ludovic Courtès
  2016-12-26 16:04 ` [PATCH 03/10] gnu: Add propeller-gcc Ricardo Wurmus
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index bd064e6..150f4af 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -30,7 +30,9 @@
   #:use-module (guix build utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages dejagnu)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gdb)
@@ -369,3 +371,49 @@ language.")
       (description "OpenOCD provides on-chip programming and debugging support
 with a layered architecture of JTAG interface and TAP support.")
       (license license:gpl2+))))
+
+;; The commits for all propeller tools are the latest versions as published
+;; here: https://github.com/dbetz/propeller-gcc
+
+(define propeller-binutils
+  (let ((xbinutils (cross-binutils "propeller-elf"))
+        (commit "3bfba30076f8ce160a2f42914fdb68f24445fd44")
+        (revision "1"))
+    (package
+      (inherit xbinutils)
+      (name "propeller-binutils")
+      (version (string-append "0.0.0-" revision "." (string-take commit 9)))
+      (source (origin (inherit (package-source xbinutils))
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/totalspectrum/binutils-propeller.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "1v3rgxwj7b8817wy5ccf8621v75qcxvcxygk4acr3hbc6yqybr8h"))))
+      (arguments
+       `(;; FIXME: For some reason there are many test failures.  Some of them
+         ;; appear to be due to regular expression mismatch, but it's not
+         ;; obvious how to fix the failures.
+         #:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-/bin/sh-in-tests
+             (lambda _
+               (substitute* '("sim/testsuite/Makefile.in"
+                              "sim/testsuite/mips64el-elf/Makefile.in"
+                              "sim/testsuite/d10v-elf/Makefile.in"
+                              "sim/testsuite/sim/cris/asm/badarch1.ms")
+                 (("/bin/sh") (which "sh")))
+               #t)))
+         ,@(substitute-keyword-arguments (package-arguments xbinutils)
+             ((#:configure-flags flags)
+              `(cons "--disable-nls" ,flags)))))
+      (native-inputs
+       `(("bison" ,bison)
+         ("flex" ,flex)
+         ("texinfo" ,texinfo)
+         ("dejagnu" ,dejagnu)
+         ,@(package-native-inputs xbinutils))))))
+
-- 
2.10.2

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

* [PATCH 03/10] gnu: Add propeller-gcc.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
  2016-12-26 16:04 ` [PATCH 02/10] gnu: Add propeller-binutils Ricardo Wurmus
@ 2016-12-26 16:04 ` Ricardo Wurmus
  2016-12-31  0:33   ` Ludovic Courtès
  2016-12-26 16:04 ` [PATCH 04/10] gnu: Add proplib Ricardo Wurmus
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 150f4af..3ef2a3a 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -417,3 +417,37 @@ with a layered architecture of JTAG interface and TAP support.")
          ("dejagnu" ,dejagnu)
          ,@(package-native-inputs xbinutils))))))
 
+(define-public propeller-gcc
+  (let ((xgcc (cross-gcc "propeller-elf"
+                         propeller-binutils))
+        (commit "b4f45a4725e0b6d0af59e594c4e3e35ca4105867")
+        (revision "1"))
+    (package (inherit xgcc)
+      (name "propeller-gcc")
+      (version (string-append "6.0.0-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/totalspectrum/gcc-propeller.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "0d9kdxm2fzanjqa7q5850kzbsfl0fqyaahxn74h6nkxxacwa11zb"))
+                (patches
+                 (append
+                  (origin-patches (package-source gcc-6))
+                  (search-patches "gcc-cross-environment-variables.patch")))))
+      (native-inputs
+       `(("flex" ,flex)
+         ,@(package-native-inputs xgcc)))
+      (native-search-paths
+       (list (search-path-specification
+              (variable "CROSS_C_INCLUDE_PATH")
+              (files '("propeller-elf/include")))
+             (search-path-specification
+              (variable "CROSS_LIBRARY_PATH")
+              (files '("propeller-elf/lib")))))
+      (home-page "https://github.com/totalspectrum/gcc-propeller")
+      (synopsis "GCC for the Parallax Propeller"))))
+
-- 
2.10.2

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

* [PATCH 04/10] gnu: Add proplib.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
  2016-12-26 16:04 ` [PATCH 02/10] gnu: Add propeller-binutils Ricardo Wurmus
  2016-12-26 16:04 ` [PATCH 03/10] gnu: Add propeller-gcc Ricardo Wurmus
@ 2016-12-26 16:04 ` Ricardo Wurmus
  2016-12-31  0:33   ` Ludovic Courtès
  2016-12-26 16:04 ` [PATCH 05/10] gnu: Add propeller-toolchain Ricardo Wurmus
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 3ef2a3a..d2d15ce 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -451,3 +451,76 @@ with a layered architecture of JTAG interface and TAP support.")
       (home-page "https://github.com/totalspectrum/gcc-propeller")
       (synopsis "GCC for the Parallax Propeller"))))
 
+(define-public proplib
+  (let ((commit "844741fe0ceb140ab2fdf9d0667f68c1c39c31da")
+        (revision "1"))
+    (package
+      (name "proplib")
+      (version (string-append "0.0.0-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/totalspectrum/proplib.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "0q7irf1x8iqx07n7lzksax9armrdkizs49swsz76nbks0mw67wiv"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; no tests
+         #:make-flags
+         (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+               (string-append "BUILD="  (getcwd) "/build"))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-after 'unpack 'fix-Makefile
+             (lambda _
+               (substitute* "Makefile"
+                 ;; The GCC sources are not part of this package, so we cannot
+                 ;; install the out-of-tree license file.
+                 (("cp \\.\\..*") "")
+                 ;; Control the installation time of the headers.
+                 ((" install-includes") ""))
+               #t))
+           ;; The Makefile does not separate building from installation, so we
+           ;; have to create the target directories at build time.
+           (add-before 'build 'create-target-directories
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (zero? (apply system* "make" "install-dirs" make-flags))))
+           (add-before 'build 'set-cross-environment-variables
+             (lambda* (#:key outputs #:allow-other-keys)
+               (setenv "CROSS_LIBRARY_PATH"
+                       (string-append (assoc-ref outputs "out")
+                                      "/propeller-elf/lib:"
+                                      (or (getenv "CROSS_LIBRARY_PATH") "")))
+               (setenv "CROSS_C_INCLUDE_PATH"
+                       (string-append (assoc-ref outputs "out")
+                                      "/propeller-elf/include:"
+                                      (or (getenv "CROSS_C_INCLUDE_PATH") "")))
+               #t))
+           (add-after 'build 'build-tiny
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (zero? (apply system* "make" "tiny" make-flags))))
+           ;; The build of the tiny libraries depends on the includes to be
+           ;; available.  Since we set CROSS_C_INCLUDE_PATH to the output
+           ;; directory, we have to install the includes first.
+           (add-before 'build-tiny 'install-includes
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (zero? (apply system* "make" "install-includes" make-flags))))
+           (add-after 'install 'install-tiny
+             (lambda* (#:key make-flags #:allow-other-keys)
+               (zero? (apply system* "make" "install-tiny" make-flags)))))))
+      (native-inputs
+       `(("propeller-gcc" ,propeller-gcc)
+         ("propeller-binutils" ,propeller-binutils)
+         ("perl" ,perl)))
+      (home-page "https://github.com/totalspectrum/proplib")
+      (synopsis "C library for the Parallax Propeller")
+      (description "This is a C library for the Parallax Propeller
+micro-controller.")
+      ;; Most of the code is released under the Expat license.  Some of the
+      ;; included code is public domain and some changes are BSD licensed.
+      (license license:expat))))
+
-- 
2.10.2

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

* [PATCH 05/10] gnu: Add propeller-toolchain.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
                   ` (2 preceding siblings ...)
  2016-12-26 16:04 ` [PATCH 04/10] gnu: Add proplib Ricardo Wurmus
@ 2016-12-26 16:04 ` Ricardo Wurmus
  2016-12-31  0:34   ` Ludovic Courtès
  2016-12-26 16:04 ` [PATCH 06/10] gnu: Add openspin Ricardo Wurmus
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index d2d15ce..615379b 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -524,3 +524,20 @@ micro-controller.")
       ;; included code is public domain and some changes are BSD licensed.
       (license license:expat))))
 
+(define-public propeller-toolchain
+  (package
+    (name "propeller-toolchain")
+    (version (package-version propeller-gcc))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments '(#:builder (mkdir %output)))
+    (propagated-inputs
+     `(("binutils" ,propeller-binutils)
+       ("libc" ,proplib)
+       ("gcc" ,propeller-gcc)))
+    (synopsis "Complete GCC tool chain for Propeller micro-controllers")
+    (description "This package provides a complete GCC tool chain for
+Propeller micro-controller development.")
+    (home-page (package-home-page propeller-gcc))
+    (license (package-license propeller-gcc))))
+
-- 
2.10.2

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

* [PATCH 06/10] gnu: Add openspin.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
                   ` (3 preceding siblings ...)
  2016-12-26 16:04 ` [PATCH 05/10] gnu: Add propeller-toolchain Ricardo Wurmus
@ 2016-12-26 16:04 ` Ricardo Wurmus
  2016-12-31  0:34   ` Ludovic Courtès
  2016-12-26 16:04 ` [PATCH 07/10] gnu: Add propeller-load Ricardo Wurmus
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 615379b..bfdc28e 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -541,3 +541,36 @@ Propeller micro-controller development.")
     (home-page (package-home-page propeller-gcc))
     (license (package-license propeller-gcc))))
 
+(define-public openspin
+  (package
+    (name "openspin")
+    (version "1.00.78")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/parallaxinc/"
+                                  "OpenSpin/archive/" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1k2dbz1v604g4r2d9qhckg2m8dnhiya760mbsqfsg4waxal87yb7"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         ;; Makefile does not include "install" target
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out")
+                                       "/bin")))
+               (mkdir-p bin)
+               (install-file "build/openspin" bin)
+               #t))))))
+    (home-page "https://github.com/parallaxinc/OpenSpin")
+    (synopsis "Spin/PASM compiler for the Parallax Propeller")
+    (description "OpenSpin is a compiler for the Spin/PASM language of the
+Parallax Propeller.  It was ported from Chip Gracey's original x86 assembler
+code.")
+    (license license:expat)))
+
-- 
2.10.2

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

* [PATCH 07/10] gnu: Add propeller-load.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
                   ` (4 preceding siblings ...)
  2016-12-26 16:04 ` [PATCH 06/10] gnu: Add openspin Ricardo Wurmus
@ 2016-12-26 16:04 ` Ricardo Wurmus
  2016-12-31  0:35   ` Ludovic Courtès
  2016-12-26 16:04 ` [PATCH 08/10] gnu: Add spin2cpp Ricardo Wurmus
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index bfdc28e..0fac052 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -574,3 +574,36 @@ Parallax Propeller.  It was ported from Chip Gracey's original x86 assembler
 code.")
     (license license:expat)))
 
+(define-public propeller-load
+  (let ((commit "ba9c0a7251cf751d8d292ae19ffa03132097c0c0")
+        (revision "1"))
+    (package
+      (name "propeller-load")
+      (version "3.4.0")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/dbetz/propeller-load.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "1qv3xaapl9fmj3zn58b60sprp4rnvnlpci8ci0pdrzkw6fhvx3pg"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; no tests
+         #:make-flags
+         (list "OS=linux"
+               (string-append "TARGET=" (assoc-ref %outputs "out")))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure))))
+      (native-inputs
+       `(("openspin" ,openspin)
+         ("propeller-toolchain" ,propeller-toolchain)))
+      (home-page "https://github.com/dbetz/propeller-load")
+      (synopsis "Loader for Parallax Propeller micro-controllers")
+      (description "This package provides the tool @code{propeller-load} to
+upload binaries to a Parallax Propeller micro-controller.")
+      (license license:expat))))
+
-- 
2.10.2

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

* [PATCH 08/10] gnu: Add spin2cpp.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
                   ` (5 preceding siblings ...)
  2016-12-26 16:04 ` [PATCH 07/10] gnu: Add propeller-load Ricardo Wurmus
@ 2016-12-26 16:04 ` Ricardo Wurmus
  2016-12-31  0:36   ` Ludovic Courtès
  2016-12-26 16:04 ` [PATCH 09/10] gnu: Add spinsim Ricardo Wurmus
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 0fac052..b7e7951 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -607,3 +607,52 @@ code.")
 upload binaries to a Parallax Propeller micro-controller.")
       (license license:expat))))
 
+(define-public spin2cpp
+  (package
+    (name "spin2cpp")
+    (version "3.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/totalspectrum/spin2cpp/"
+                                  "archive/v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "00i8i0dspd5115ggkv5vx2xqb21l6y38wz0bakgby8n3b4k9xnk0"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ;; The tests assume that a micro-controller is connected.
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'set-cross-environment-variables
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CROSS_LIBRARY_PATH"
+                     (string-append (assoc-ref inputs "propeller-toolchain")
+                                    "/propeller-elf/lib"))
+             (setenv "CROSS_C_INCLUDE_PATH"
+                     (string-append (assoc-ref inputs "propeller-toolchain")
+                                    "/propeller-elf/include"))
+             #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out")
+                                       "/bin")))
+               (for-each (lambda (file)
+                           (install-file (string-append "build/" file)
+                                         bin))
+                         '("testlex" "spin2cpp" "fastspin")))
+             #t)))))
+    (native-inputs
+     `(("bison" ,bison)
+       ("propeller-load" ,propeller-load)
+       ("propeller-toolchain" ,propeller-toolchain)))
+    (home-page "https://github.com/totalspectrum/spin2cpp")
+    (synopsis "Convert Spin code to C, C++, or PASM code")
+    (description "This is a set of tools for converting the Spin language for
+the Parallax Propeller micro-controller into C or C++ code, into PASM, or even
+directly into an executable binary.  The binaries produced use LMM PASM, so
+they are much faster than regular Spin bytecodes (but also quite a bit
+larger).")
+    (license license:expat)))
+
-- 
2.10.2

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

* [PATCH 09/10] gnu: Add spinsim.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
                   ` (6 preceding siblings ...)
  2016-12-26 16:04 ` [PATCH 08/10] gnu: Add spin2cpp Ricardo Wurmus
@ 2016-12-26 16:04 ` Ricardo Wurmus
  2016-12-31  0:36   ` Ludovic Courtès
  2016-12-26 16:04 ` [PATCH 10/10] gnu: Add propeller-development-suite Ricardo Wurmus
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

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

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index b7e7951..11aa68e 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -656,3 +656,39 @@ they are much faster than regular Spin bytecodes (but also quite a bit
 larger).")
     (license license:expat)))
 
+(define-public spinsim
+  (let ((commit "66915a7ad1a3a2cf990a725bb341fab8d11eb620")
+        (revision "1"))
+    (package
+      (name "spinsim")
+      (version (string-append "0.75-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/parallaxinc/spinsim.git")
+                      (commit commit)))
+                (file-name (string-append name "-" commit "-checkout"))
+                (sha256
+                 (base32
+                  "1n9kdhlxsdx7bz6c80w8dhi96zp633gd6qs0x9i4ii8qv4i7sj5k"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; no tests
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((bin (string-append (assoc-ref outputs "out")
+                                         "/bin")))
+                 (install-file "build/spinsim" bin))
+               #t)))))
+      (home-page "https://github.com/parallaxinc/spinsim")
+      (synopsis "Spin simulator")
+      (description "This package provides the tool @code{spinsim}, a simulator
+and simple debugger for Spin programs written for a Parallax Propeller
+micro-controller.  Spinsim supports execution from cog memory and hub
+execution, but it does not support multi-tasking.  It supports about
+two-thirds of the opcodes in the P2 instruction set.")
+      (license license:expat))))
+
-- 
2.10.2

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

* [PATCH 10/10] gnu: Add propeller-development-suite.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
                   ` (7 preceding siblings ...)
  2016-12-26 16:04 ` [PATCH 09/10] gnu: Add spinsim Ricardo Wurmus
@ 2016-12-26 16:04 ` Ricardo Wurmus
  2016-12-31  0:37   ` Ludovic Courtès
  2016-12-30 21:26 ` [PATCH 01/10] gnu: Add dummy linker for propeller-elf Kei Kebreau
  2016-12-31  0:29 ` Ludovic Courtès
  10 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-26 16:04 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/embedded.scm (propeller-development-suite): New variable.
---
 gnu/packages/embedded.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 11aa68e..30acdbf 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -692,3 +692,23 @@ execution, but it does not support multi-tasking.  It supports about
 two-thirds of the opcodes in the P2 instruction set.")
       (license license:expat))))
 
+(define-public propeller-development-suite
+  (package
+    (name "propeller-development-suite")
+    (version (package-version propeller-gcc))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments '(#:builder (mkdir %output)))
+    (propagated-inputs
+     `(("toolchain" ,propeller-toolchain)
+       ("openspin" ,openspin)
+       ("propeller-load" ,propeller-load)
+       ("spin2cpp" ,spin2cpp)
+       ("spinsim" ,spinsim)))
+    (synopsis "Complete development suite for Propeller micro-controllers")
+    (description "This meta-package provides a complete environment for the
+development with Parallax Propeller micro-controllers.  It includes the GCC
+toolchain, the loader, the Openspin compiler, the Spin2cpp tool, and the Spin
+simulator.")
+    (home-page (package-home-page propeller-gcc))
+    (license (package-license propeller-gcc))))
-- 
2.10.2

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

* Re: [PATCH 01/10] gnu: Add dummy linker for propeller-elf.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
                   ` (8 preceding siblings ...)
  2016-12-26 16:04 ` [PATCH 10/10] gnu: Add propeller-development-suite Ricardo Wurmus
@ 2016-12-30 21:26 ` Kei Kebreau
  2017-01-01 12:40   ` Ricardo Wurmus
  2016-12-31  0:29 ` Ludovic Courtès
  10 siblings, 1 reply; 24+ messages in thread
From: Kei Kebreau @ 2016-12-30 21:26 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

Ricardo Wurmus <rekado@elephly.net> writes:

> * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for
> propeller-elf.
> ---
>  gnu/packages/bootstrap.scm | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index 11ebd79..dd922c3 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
> @@ -174,6 +174,7 @@ successful, or false to signal an error."
>          ((string=? system "arm-eabi") "no-ld.so")
>          ((string=? system "xtensa-elf") "no-ld.so")
>          ((string=? system "avr") "no-ld.so")
> +        ((string=? system "propeller-elf") "no-ld.so")
>          ((string=? system "i686-mingw") "no-ld.so")
>  
>          (else (error "dynamic linker name not known for this system"

Linting complains about propeller-gcc's patch file name(s) not starting
with the package name. Also, openspin does not build reproducibly. Other
than those two things, this LGTM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: [PATCH 01/10] gnu: Add dummy linker for propeller-elf.
  2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
                   ` (9 preceding siblings ...)
  2016-12-30 21:26 ` [PATCH 01/10] gnu: Add dummy linker for propeller-elf Kei Kebreau
@ 2016-12-31  0:29 ` Ludovic Courtès
  10 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:29 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for
> propeller-elf.

OK!

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

* Re: [PATCH 02/10] gnu: Add propeller-binutils.
  2016-12-26 16:04 ` [PATCH 02/10] gnu: Add propeller-binutils Ricardo Wurmus
@ 2016-12-31  0:31   ` Ludovic Courtès
  2016-12-31 17:03     ` Ricardo Wurmus
  0 siblings, 1 reply; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:31 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> * gnu/packages/embedded.scm (propeller-binutils): New variable.

[...]

> +         ,@(substitute-keyword-arguments (package-arguments xbinutils)
> +             ((#:configure-flags flags)
> +              `(cons "--disable-nls" ,flags)))))

That shouldn't be needed.

> +      (native-inputs
> +       `(("bison" ,bison)
> +         ("flex" ,flex)
> +         ("texinfo" ,texinfo)
> +         ("dejagnu" ,dejagnu)

The test failures you see are because you added DejaGNU here.  The other
Binutils instances don’t have it, so few tests are run I guess.  :-)

If this is not needed for bootstrapping, I’d suggest removing it.

Otherwise LGTM, thanks!

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

* Re: [PATCH 03/10] gnu: Add propeller-gcc.
  2016-12-26 16:04 ` [PATCH 03/10] gnu: Add propeller-gcc Ricardo Wurmus
@ 2016-12-31  0:33   ` Ludovic Courtès
  0 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:33 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> * gnu/packages/embedded.scm (propeller-gcc): New variable.

[...]

> +      (native-search-paths
> +       (list (search-path-specification
> +              (variable "CROSS_C_INCLUDE_PATH")
> +              (files '("propeller-elf/include")))
> +             (search-path-specification
> +              (variable "CROSS_LIBRARY_PATH")
> +              (files '("propeller-elf/lib")))))

Could you add a comment explaining this file layout convention?

Otherwise LGTM!

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

* Re: [PATCH 04/10] gnu: Add proplib.
  2016-12-26 16:04 ` [PATCH 04/10] gnu: Add proplib Ricardo Wurmus
@ 2016-12-31  0:33   ` Ludovic Courtès
  0 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:33 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

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

[...]

> +(define-public proplib
> +  (let ((commit "844741fe0ceb140ab2fdf9d0667f68c1c39c31da")
> +        (revision "1"))
> +    (package
> +      (name "proplib")
> +      (version (string-append "0.0.0-" revision "." (string-take commit 9)))
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/totalspectrum/proplib.git")
> +                      (commit commit)))

No release either?

LGTM, thanks!

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

* Re: [PATCH 05/10] gnu: Add propeller-toolchain.
  2016-12-26 16:04 ` [PATCH 05/10] gnu: Add propeller-toolchain Ricardo Wurmus
@ 2016-12-31  0:34   ` Ludovic Courtès
  0 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:34 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> * gnu/packages/embedded.scm (propeller-toolchain): New variable.

LGTM, thanks!

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

* Re: [PATCH 06/10] gnu: Add openspin.
  2016-12-26 16:04 ` [PATCH 06/10] gnu: Add openspin Ricardo Wurmus
@ 2016-12-31  0:34   ` Ludovic Courtès
  0 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:34 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

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

LGTM, thanks!

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

* Re: [PATCH 07/10] gnu: Add propeller-load.
  2016-12-26 16:04 ` [PATCH 07/10] gnu: Add propeller-load Ricardo Wurmus
@ 2016-12-31  0:35   ` Ludovic Courtès
  0 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:35 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> * gnu/packages/embedded.scm (propeller-load): New variable.

OK!

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

* Re: [PATCH 08/10] gnu: Add spin2cpp.
  2016-12-26 16:04 ` [PATCH 08/10] gnu: Add spin2cpp Ricardo Wurmus
@ 2016-12-31  0:36   ` Ludovic Courtès
  0 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:36 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

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

LGTM!

> +         (add-before 'build 'set-cross-environment-variables
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (setenv "CROSS_LIBRARY_PATH"
> +                     (string-append (assoc-ref inputs "propeller-toolchain")
> +                                    "/propeller-elf/lib"))
> +             (setenv "CROSS_C_INCLUDE_PATH"
> +                     (string-append (assoc-ref inputs "propeller-toolchain")
> +                                    "/propeller-elf/include"))

Too bad we have to repeat this here.

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

* Re: [PATCH 09/10] gnu: Add spinsim.
  2016-12-26 16:04 ` [PATCH 09/10] gnu: Add spinsim Ricardo Wurmus
@ 2016-12-31  0:36   ` Ludovic Courtès
  0 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:36 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

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

OK!

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

* Re: [PATCH 10/10] gnu: Add propeller-development-suite.
  2016-12-26 16:04 ` [PATCH 10/10] gnu: Add propeller-development-suite Ricardo Wurmus
@ 2016-12-31  0:37   ` Ludovic Courtès
  0 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2016-12-31  0:37 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> * gnu/packages/embedded.scm (propeller-development-suite): New variable.

LGTM.

Impressive piece of work, thank you!

Ludo’.

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

* Re: [PATCH 02/10] gnu: Add propeller-binutils.
  2016-12-31  0:31   ` Ludovic Courtès
@ 2016-12-31 17:03     ` Ricardo Wurmus
  2017-01-02 22:34       ` Ludovic Courtès
  0 siblings, 1 reply; 24+ messages in thread
From: Ricardo Wurmus @ 2016-12-31 17:03 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


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

> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> * gnu/packages/embedded.scm (propeller-binutils): New variable.
>
> [...]
>
>> +         ,@(substitute-keyword-arguments (package-arguments xbinutils)
>> +             ((#:configure-flags flags)
>> +              `(cons "--disable-nls" ,flags)))))
>
> That shouldn't be needed.

Okay.

>> +      (native-inputs
>> +       `(("bison" ,bison)
>> +         ("flex" ,flex)
>> +         ("texinfo" ,texinfo)
>> +         ("dejagnu" ,dejagnu)
>
> The test failures you see are because you added DejaGNU here.  The other
> Binutils instances don’t have it, so few tests are run I guess.  :-)
>
> If this is not needed for bootstrapping, I’d suggest removing it.

I added DejaGNU because it provides “runtest”, which is needed by the
tests.  Without DejaGNU the check phase fails trying to execute
“runtest”.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
http://elephly.net

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

* Re: [PATCH 01/10] gnu: Add dummy linker for propeller-elf.
  2016-12-30 21:26 ` [PATCH 01/10] gnu: Add dummy linker for propeller-elf Kei Kebreau
@ 2017-01-01 12:40   ` Ricardo Wurmus
  0 siblings, 0 replies; 24+ messages in thread
From: Ricardo Wurmus @ 2017-01-01 12:40 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: guix-devel


Kei Kebreau <kei@openmailbox.org> writes:

> Also, openspin does not build reproducibly.

Thanks for letting me know.  I’ve identified the cause (embedded
__DATE__) and fixed it.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
http://elephly.net

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

* Re: [PATCH 02/10] gnu: Add propeller-binutils.
  2016-12-31 17:03     ` Ricardo Wurmus
@ 2017-01-02 22:34       ` Ludovic Courtès
  0 siblings, 0 replies; 24+ messages in thread
From: Ludovic Courtès @ 2017-01-02 22:34 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

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

[...]

>>> +      (native-inputs
>>> +       `(("bison" ,bison)
>>> +         ("flex" ,flex)
>>> +         ("texinfo" ,texinfo)
>>> +         ("dejagnu" ,dejagnu)
>>
>> The test failures you see are because you added DejaGNU here.  The other
>> Binutils instances don’t have it, so few tests are run I guess.  :-)
>>
>> If this is not needed for bootstrapping, I’d suggest removing it.
>
> I added DejaGNU because it provides “runtest”, which is needed by the
> tests.  Without DejaGNU the check phase fails trying to execute
> “runtest”.

I wonder why this is an error here.  The behavior in vanilla Binutils is
to simply warn about the lack of ‘runtest’ (which is why it doesn’t have
#:tests? #f):

--8<---------------cut here---------------start------------->8---
srcdir=`cd . && pwd`; export srcdir; \
r=`pwd`; export r; \
LC_ALL=C; export LC_ALL; \
EXPECT=expect; export EXPECT; \
runtest=runtest; \
if /gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0/bin/bash -c "$runtest --version" > /dev/null 2>&1; then \
  CC="gcc" CC_FOR_BUILD="gcc" \
  CC_FOR_TARGET="gcc" CFLAGS_FOR_TARGET="-g -O2" \
	$runtest --tool binutils --srcdir ${srcdir}/testsuite \
		; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
WARNING: could not find `runtest'
make[5]: Leaving directory '/tmp/nix-build-binutils-2.27.drv-0/binutils-2.27/binutils'
--8<---------------cut here---------------end--------------->8---

(From <https://mirror.hydra.gnu.org/log/xv32q9gbrvkyg01y0pj7m4clh6k29n15-binutils-2.27>.)

Ludo’.

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

end of thread, other threads:[~2017-01-02 22:34 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-26 16:04 [PATCH 01/10] gnu: Add dummy linker for propeller-elf Ricardo Wurmus
2016-12-26 16:04 ` [PATCH 02/10] gnu: Add propeller-binutils Ricardo Wurmus
2016-12-31  0:31   ` Ludovic Courtès
2016-12-31 17:03     ` Ricardo Wurmus
2017-01-02 22:34       ` Ludovic Courtès
2016-12-26 16:04 ` [PATCH 03/10] gnu: Add propeller-gcc Ricardo Wurmus
2016-12-31  0:33   ` Ludovic Courtès
2016-12-26 16:04 ` [PATCH 04/10] gnu: Add proplib Ricardo Wurmus
2016-12-31  0:33   ` Ludovic Courtès
2016-12-26 16:04 ` [PATCH 05/10] gnu: Add propeller-toolchain Ricardo Wurmus
2016-12-31  0:34   ` Ludovic Courtès
2016-12-26 16:04 ` [PATCH 06/10] gnu: Add openspin Ricardo Wurmus
2016-12-31  0:34   ` Ludovic Courtès
2016-12-26 16:04 ` [PATCH 07/10] gnu: Add propeller-load Ricardo Wurmus
2016-12-31  0:35   ` Ludovic Courtès
2016-12-26 16:04 ` [PATCH 08/10] gnu: Add spin2cpp Ricardo Wurmus
2016-12-31  0:36   ` Ludovic Courtès
2016-12-26 16:04 ` [PATCH 09/10] gnu: Add spinsim Ricardo Wurmus
2016-12-31  0:36   ` Ludovic Courtès
2016-12-26 16:04 ` [PATCH 10/10] gnu: Add propeller-development-suite Ricardo Wurmus
2016-12-31  0:37   ` Ludovic Courtès
2016-12-30 21:26 ` [PATCH 01/10] gnu: Add dummy linker for propeller-elf Kei Kebreau
2017-01-01 12:40   ` Ricardo Wurmus
2016-12-31  0:29 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).