1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros@foradis.org>
4 ;;; Copyright © 2016 David Craven <david@craven.ch>
5 ;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
8 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
9 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages embedded)
27 #:use-module (guix utils)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix svn-download)
31 #:use-module (guix git-download)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system python)
36 #:use-module (guix build-system trivial)
37 #:use-module ((guix build utils) #:select (alist-replace delete-file-recursively))
38 #:use-module (gnu packages)
39 #:use-module (gnu packages admin)
40 #:use-module (gnu packages autotools)
41 #:use-module ((gnu packages base) #:prefix base:)
42 #:use-module (gnu packages bison)
43 #:use-module (gnu packages boost)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages cross-base)
46 #:use-module (gnu packages dejagnu)
47 #:use-module (gnu packages flex)
48 #:use-module (gnu packages gcc)
49 #:use-module (gnu packages gdb)
50 #:use-module (gnu packages guile)
51 #:use-module (gnu packages libftdi)
52 #:use-module (gnu packages libusb)
53 #:use-module (gnu packages messaging)
54 #:use-module (gnu packages perl)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages python-xyz)
58 #:use-module (gnu packages swig)
59 #:use-module (gnu packages texinfo)
60 #:use-module (gnu packages xorg)
61 #:use-module (srfi srfi-1))
63 ;; We must not use the released GCC sources here, because the cross-compiler
64 ;; does not produce working binaries. Instead we take the very same SVN
65 ;; revision from the branch that is used for a release of the "GCC ARM
66 ;; embedded" project on launchpad.
67 ;; See https://launchpadlibrarian.net/218827644/release.txt
68 (define-public gcc-arm-none-eabi-4.9
69 (let ((xgcc (cross-gcc "arm-none-eabi"
71 #:xbinutils (cross-binutils "arm-none-eabi")))
73 (svn-revision 227977))
74 (package (inherit xgcc)
75 (version (string-append (package-version xgcc) "-"
76 revision "." (number->string svn-revision)))
81 (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_9-branch/")
82 (revision svn-revision)))
83 (file-name (string-append "gcc-arm-embedded-" version "-checkout"))
86 "113r98kygy8rrjfv2pd3z6zlfzbj543pq7xyq8bgh72c608mmsbr"))
88 ;; Remove the one patch that doesn't apply to this 4.9 snapshot (the
89 ;; patch is for 4.9.4 and later but this svn snapshot is older).
90 (patches (remove (lambda (patch)
91 (string=? (basename patch)
92 "gcc-arm-bug-71399.patch"))
93 (origin-patches (package-source xgcc))))))
97 ,@(package-native-inputs xgcc)))
99 (substitute-keyword-arguments (package-arguments xgcc)
101 `(modify-phases ,phases
102 (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
103 (lambda* (#:key inputs #:allow-other-keys)
104 (let ((gcc (assoc-ref inputs "gcc")))
105 ;; Remove the default compiler from CPLUS_INCLUDE_PATH to
106 ;; prevent header conflict with the GCC from native-inputs.
107 (setenv "CPLUS_INCLUDE_PATH"
109 (delete (string-append gcc "/include/c++")
110 (string-split (getenv "CPLUS_INCLUDE_PATH")
114 "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
115 (getenv "CPLUS_INCLUDE_PATH"))
117 (add-after 'unpack 'fix-genmultilib
119 (substitute* "gcc/genmultilib"
120 (("#!/bin/sh") (string-append "#!" (which "sh"))))
122 ((#:configure-flags flags)
123 ;; The configure flags are largely identical to the flags used by the
124 ;; "GCC ARM embedded" project.
125 `(append (list "--enable-multilib"
127 "--with-multilib-list=armv6-m,armv7-m,armv7e-m"
128 "--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm"
130 "--disable-decimal-float"
133 "--disable-libmudflap"
134 "--disable-libquadmath"
136 "--disable-libstdcxx-pch"
141 (delete "--disable-multilib" ,flags)))))
143 (list (search-path-specification
144 (variable "CROSS_C_INCLUDE_PATH")
145 (files '("arm-none-eabi/include")))
146 (search-path-specification
147 (variable "CROSS_CPLUS_INCLUDE_PATH")
148 (files '("arm-none-eabi/include")))
149 (search-path-specification
150 (variable "CROSS_LIBRARY_PATH")
151 (files '("arm-none-eabi/lib"))))))))
153 (define-public gcc-arm-none-eabi-6
155 (inherit gcc-arm-none-eabi-4.9)
156 (version (package-version gcc-6))
157 (source (origin (inherit (package-source gcc-6))
160 (origin-patches (package-source gcc-6))
161 (search-patches "gcc-6-cross-environment-variables.patch"
162 "gcc-6-arm-none-eabi-multilib.patch")))))))
164 (define-public newlib-arm-none-eabi
170 (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-"
174 "01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl"))))
175 (build-system gnu-build-system)
177 `(#:out-of-source? #t
178 ;; The configure flags are identical to the flags used by the "GCC ARM
179 ;; embedded" project.
180 #:configure-flags '("--target=arm-none-eabi"
181 "--enable-newlib-io-long-long"
182 "--enable-newlib-register-fini"
183 "--disable-newlib-supplied-syscalls"
186 (modify-phases %standard-phases
187 (add-after 'unpack 'fix-references-to-/bin/sh
189 (substitute* '("libgloss/arm/cpu-init/Makefile.in"
190 "libgloss/arm/Makefile.in"
191 "libgloss/libnosys/Makefile.in"
192 "libgloss/Makefile.in")
193 (("/bin/sh") (which "sh")))
196 `(("xbinutils" ,(cross-binutils "arm-none-eabi"))
197 ("xgcc" ,gcc-arm-none-eabi-4.9)
198 ("texinfo" ,texinfo)))
199 (home-page "https://www.sourceware.org/newlib/")
200 (synopsis "C library for use on embedded systems")
201 (description "Newlib is a C library intended for use on embedded
202 systems. It is a conglomeration of several library parts that are easily
203 usable on embedded products.")
204 (license (license:non-copyleft
205 "https://www.sourceware.org/newlib/COPYING.NEWLIB"))))
207 (define-public newlib-nano-arm-none-eabi
208 (package (inherit newlib-arm-none-eabi)
211 (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi)
212 ;; The configure flags are identical to the flags used by the "GCC ARM
213 ;; embedded" project. They optimize newlib for use on small embedded
214 ;; systems with limited memory.
215 ((#:configure-flags flags)
216 ''("--target=arm-none-eabi"
218 "--disable-newlib-supplied-syscalls"
219 "--enable-newlib-reent-small"
220 "--disable-newlib-fvwrite-in-streamio"
221 "--disable-newlib-fseek-optimization"
222 "--disable-newlib-wide-orient"
223 "--enable-newlib-nano-malloc"
224 "--disable-newlib-unbuf-stream-opt"
226 "--enable-newlib-global-atexit"
227 "--enable-newlib-nano-formatted-io"
229 (synopsis "Newlib variant for small systems with limited memory")))
232 ;;; The following definitions are for the "7-2018-q2-update" variant of the
233 ;;; ARM cross toolchain as offered on https://developer.arm.com
234 (define-public gcc-arm-none-eabi-7-2018-q2-update
235 (let ((xgcc (cross-gcc "arm-none-eabi"
237 #:xbinutils (cross-binutils "arm-none-eabi")))
239 (svn-revision 261907))
240 (package (inherit xgcc)
241 (version (string-append "7-2018-q2-update-"
242 revision "." (number->string svn-revision)))
247 (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-7-branch/")
248 (revision svn-revision)))
249 (file-name (string-append "gcc-arm-embedded-" version "-checkout"))
252 "192ggs63bixf3irpijgfkjks73yx1r3a4i6grk1y0i0iny76pmx5"))
255 (origin-patches (package-source gcc-7))
256 (search-patches "gcc-7-cross-environment-variables.patch")))))
260 ,@(alist-delete "isl" (package-native-inputs xgcc))))
262 (substitute-keyword-arguments (package-arguments xgcc)
264 `(modify-phases ,phases
265 (add-after 'unpack 'expand-version-string
267 (make-file-writable "gcc/DEV-PHASE")
268 (with-output-to-file "gcc/DEV-PHASE"
270 (display "7-2018-q2-update")))
272 (add-after 'unpack 'fix-genmultilib
274 (substitute* "gcc/genmultilib"
275 (("#!/bin/sh") (string-append "#!" (which "sh"))))
277 (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
278 (lambda* (#:key inputs #:allow-other-keys)
279 (let ((gcc (assoc-ref inputs "gcc")))
280 ;; Remove the default compiler from CPLUS_INCLUDE_PATH to
281 ;; prevent header conflict with the GCC from native-inputs.
282 (setenv "CPLUS_INCLUDE_PATH"
284 (delete (string-append gcc "/include/c++")
285 (string-split (getenv "CPLUS_INCLUDE_PATH")
289 "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
290 (getenv "CPLUS_INCLUDE_PATH"))
292 ((#:configure-flags flags)
293 ;; The configure flags are largely identical to the flags used by the
294 ;; "GCC ARM embedded" project.
295 `(append (list "--enable-multilib"
297 "--with-multilib-list=rmprofile"
298 "--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm"
300 "--disable-decimal-float"
303 "--disable-libmudflap"
304 "--disable-libquadmath"
306 "--disable-libstdcxx-pch"
311 (delete "--disable-multilib" ,flags)))))
313 (list (search-path-specification
314 (variable "CROSS_C_INCLUDE_PATH")
315 (files '("arm-none-eabi/include")))
316 (search-path-specification
317 (variable "CROSS_CPLUS_INCLUDE_PATH")
318 (files '("arm-none-eabi/include")))
319 (search-path-specification
320 (variable "CROSS_LIBRARY_PATH")
321 (files '("arm-none-eabi/lib"))))))))
323 (define-public newlib-arm-none-eabi-7-2018-q2-update
324 ;; This is the same commit as used for the 7-2018-q2-update release
325 ;; according to the release.txt.
326 (let ((commit "3ccfb407af410ba7e54ea0da11ae1e40b554a6f4")
329 (inherit newlib-arm-none-eabi)
330 (version (git-version "3.0.0" revision commit))
335 (url "http://sourceware.org/git/newlib-cygwin.git")
337 (file-name (git-file-name "newlib" commit))
340 "1dq23fqrk75g1a4v7569fvnnw5q440zawbxi3w0g05n8jlqsmvcy"))))
342 (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi)
343 ;; The configure flags are identical to the flags used by the "GCC ARM
344 ;; embedded" project.
345 ((#:configure-flags flags)
346 `(cons* "--enable-newlib-io-c99-formats"
347 "--enable-newlib-retargetable-locking"
351 `(("xbinutils" ,(cross-binutils "arm-none-eabi"))
352 ("xgcc" ,gcc-arm-none-eabi-7-2018-q2-update)
353 ("texinfo" ,texinfo))))))
355 (define-public newlib-nano-arm-none-eabi-7-2018-q2-update
356 (package (inherit newlib-arm-none-eabi-7-2018-q2-update)
359 (package-arguments newlib-nano-arm-none-eabi))
360 (synopsis "Newlib variant for small systems with limited memory")))
363 (define (make-libstdc++-arm-none-eabi xgcc newlib)
364 (let ((libstdc++ (make-libstdc++ xgcc)))
365 (package (inherit libstdc++)
366 (name "libstdc++-arm-none-eabi")
368 (substitute-keyword-arguments (package-arguments libstdc++)
369 ((#:configure-flags flags)
370 ``("--target=arm-none-eabi"
371 "--host=arm-none-eabi"
372 "--disable-libstdcxx-pch"
374 "--with-multilib-list=armv6-m,armv7-m,armv7e-m"
379 ,(string-append "--with-gxx-include-dir="
380 (assoc-ref %outputs "out")
381 "/arm-none-eabi/include")))))
385 ,@(package-native-inputs libstdc++))))))
387 (define (arm-none-eabi-toolchain xgcc newlib)
388 "Produce a cross-compiler toolchain package with the compiler XGCC and the C
389 library variant NEWLIB."
390 (let ((newlib-with-xgcc (package (inherit newlib)
392 (alist-replace "xgcc" (list xgcc)
393 (package-native-inputs newlib))))))
395 (name (string-append "arm-none-eabi"
396 (if (string=? (package-name newlib-with-xgcc)
400 (version (package-version xgcc))
402 (build-system trivial-build-system)
404 '(#:modules ((guix build union))
407 (use-modules (ice-9 match)
410 (((names . directories) ...)
411 (union-build (assoc-ref %outputs "out")
415 `(("binutils" ,(cross-binutils "arm-none-eabi"))
416 ("libstdc++" ,(make-libstdc++-arm-none-eabi xgcc newlib-with-xgcc))
418 ("newlib" ,newlib-with-xgcc)))
419 (synopsis "Complete GCC tool chain for ARM bare metal development")
420 (description "This package provides a complete GCC tool chain for ARM
421 bare metal development. This includes the GCC arm-none-eabi cross compiler
422 and newlib (or newlib-nano) as the C library. The supported programming
423 languages are C and C++.")
424 (home-page (package-home-page xgcc))
425 (license (package-license xgcc)))))
427 (define-public arm-none-eabi-toolchain-4.9
428 (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9
429 newlib-arm-none-eabi))
431 (define-public arm-none-eabi-nano-toolchain-4.9
432 (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9
433 newlib-nano-arm-none-eabi))
435 (define-public arm-none-eabi-toolchain-6
436 (arm-none-eabi-toolchain gcc-arm-none-eabi-6
437 newlib-arm-none-eabi))
439 (define-public arm-none-eabi-nano-toolchain-6
440 (arm-none-eabi-toolchain gcc-arm-none-eabi-6
441 newlib-nano-arm-none-eabi))
443 (define-public arm-none-eabi-toolchain-7-2018-q2-update
444 (arm-none-eabi-toolchain gcc-arm-none-eabi-7-2018-q2-update
445 newlib-arm-none-eabi-7-2018-q2-update))
447 (define-public arm-none-eabi-nano-toolchain-7-2018-q2-update
448 (arm-none-eabi-toolchain gcc-arm-none-eabi-7-2018-q2-update
449 newlib-nano-arm-none-eabi-7-2018-q2-update))
451 (define-public gdb-arm-none-eabi
454 (name "gdb-arm-none-eabi")
456 `(#:configure-flags '("--target=arm-none-eabi"
459 "--enable-languages=c,c++"
461 ,@(package-arguments gdb)))))
463 (define-public libjaylink
470 (url "https://repo.or.cz/libjaylink.git")
472 (file-name (git-file-name name version))
475 "0ndyfh51hiqyv2yscpj6qd091w7myxxjid3a6rx8f6k233vy826q"))))
476 (build-system gnu-build-system)
478 `(("autoconf" ,autoconf)
479 ("automake" ,automake)
481 ("pkg-config" ,pkg-config)))
483 `(("libusb" ,libusb)))
484 (home-page "https://repo.or.cz/w/libjaylink.git")
485 (synopsis "Library to interface Segger J-Link devices")
486 (description "libjaylink is a shared library written in C to access
487 SEGGER J-Link and compatible devices.")
488 (license license:gpl2+)))
490 (define-public jimtcl
497 (url "https://github.com/msteveb/jimtcl")
499 (file-name (git-file-name name version))
502 "06rn60cx9sapc175vxvan87b8j5rkhh5gvvz7343xznzwlr0wcgk"))))
503 (build-system gnu-build-system)
506 (modify-phases %standard-phases
508 ;; This package doesn't use autoconf.
509 (lambda* (#:key outputs #:allow-other-keys)
510 (let ((out (assoc-ref outputs "out")))
511 (invoke "./configure"
512 (string-append "--prefix=" out)))))
513 (add-before 'check 'delete-failing-tests
515 ;; XXX All but 1 TTY tests fail (Inappropriate ioctl for device).
516 (delete-file "tests/tty.test")
521 `(("inetutils" ,inetutils))) ; for hostname
522 (home-page "http://jim.tcl.tk/index.html")
523 (synopsis "Small footprint Tcl implementation")
524 (description "Jim is a small footprint implementation of the Tcl programming
526 (license license:bsd-2)))
528 (define-public openocd
529 (let ((commit "9a877a83a1c8b1f105cdc0de46c5cbc4d9e8799e")
533 (version (string-append "0.10.0-" revision "."
534 (string-take commit 7)))
538 (url "https://git.code.sf.net/p/openocd/code")
540 (file-name (string-append name "-" version "-checkout"))
543 "1q536cp80v2bcy6xwk08f1r2ljyw13jchx3a1z7d3ni3vqql7rc6"))))
544 (build-system gnu-build-system)
546 `(("autoconf" ,autoconf)
547 ("automake" ,automake)
549 ("which" ,base:which)
550 ("pkg-config" ,pkg-config)))
555 ("libjaylink" ,libjaylink)
556 ("libusb-compat" ,libusb-compat)))
559 (append (list "LIBS=-lutil"
562 "--disable-internal-jimtcl"
563 "--disable-internal-libjaylink")
564 (map (lambda (programmer)
565 (string-append "--enable-" programmer))
566 '("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
567 "gw16012" "jlink" "opendous" "osbdm"
568 "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
569 "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
570 "usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
571 "presto" "openjtag")))
573 (modify-phases %standard-phases
576 (patch-shebang "bootstrap")
577 (invoke "./bootstrap" "nosubmodule")))
578 (add-after 'autoreconf 'change-udev-group
580 (substitute* "contrib/60-openocd.rules"
581 (("plugdev") "dialout"))
583 (add-after 'install 'install-udev-rules
584 (lambda* (#:key outputs #:allow-other-keys)
585 (install-file "contrib/60-openocd.rules"
587 (assoc-ref outputs "out")
588 "/lib/udev/rules.d/"))
590 (home-page "http://openocd.org")
591 (synopsis "On-Chip Debugger")
592 (description "OpenOCD provides on-chip programming and debugging support
593 with a layered architecture of JTAG interface and TAP support.")
594 (license license:gpl2+))))
596 ;; The commits for all propeller tools are the stable versions published at
597 ;; https://github.com/propellerinc/propgcc in the release_1_0. According to
598 ;; personal correspondence with the developers in July 2017, more recent
599 ;; versions are currently incompatible with the "Simple Libraries".
601 (define propeller-binutils
602 (let ((xbinutils (cross-binutils "propeller-elf"))
603 (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
607 (name "propeller-binutils")
608 (version (string-append "0.0.0-" revision "." (string-take commit 9)))
609 (source (origin (inherit (package-source xbinutils))
612 (url "https://github.com/parallaxinc/propgcc")
614 (file-name (string-append name "-" commit "-checkout"))
617 "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))
618 (patch-flags (list "-p1" "--directory=binutils"))))
620 `(;; FIXME: For some reason there are many test failures. It's not
621 ;; obvious how to fix the failures.
624 (modify-phases %standard-phases
625 (add-after 'unpack 'chdir
626 (lambda _ (chdir "binutils") #t)))
627 ,@(substitute-keyword-arguments (package-arguments xbinutils)
628 ((#:configure-flags flags)
629 `(cons "--disable-werror" ,flags)))))
635 ,@(package-native-inputs xbinutils))))))
637 (define-public propeller-gcc-6
638 (let ((xgcc (cross-gcc "propeller-elf"
639 #:xbinutils propeller-binutils))
640 (commit "b4f45a4725e0b6d0af59e594c4e3e35ca4105867")
642 (package (inherit xgcc)
643 (name "propeller-gcc")
644 (version (string-append "6.0.0-" revision "." (string-take commit 9)))
648 (url "https://github.com/totalspectrum/gcc-propeller")
650 (file-name (string-append name "-" commit "-checkout"))
653 "0d9kdxm2fzanjqa7q5850kzbsfl0fqyaahxn74h6nkxxacwa11zb"))
656 (origin-patches (package-source gcc-6))
657 (search-patches "gcc-cross-environment-variables.patch")))))
660 ,@(package-native-inputs xgcc)))
661 ;; All headers and cross libraries of the propeller toolchain are
662 ;; installed under the "propeller-elf" prefix.
664 (list (search-path-specification
665 (variable "CROSS_C_INCLUDE_PATH")
666 (files '("propeller-elf/include")))
667 (search-path-specification
668 (variable "CROSS_LIBRARY_PATH")
669 (files '("propeller-elf/lib")))))
670 (home-page "https://github.com/totalspectrum/gcc-propeller")
671 (synopsis "GCC for the Parallax Propeller"))))
673 (define-public propeller-gcc-4
674 (let ((xgcc propeller-gcc-6)
675 (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
677 (package (inherit xgcc)
678 (name "propeller-gcc")
679 (version (string-append "4.6.1-" revision "." (string-take commit 9)))
683 (url "https://github.com/parallaxinc/propgcc")
685 (file-name (string-append name "-" commit "-checkout"))
688 "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))
689 (patch-flags (list "-p1" "--directory=gcc"))
692 (origin-patches (package-source gcc-4.7))
693 (search-patches "gcc-4.6-gnu-inline.patch"
694 "gcc-cross-environment-variables.patch")))))
696 (substitute-keyword-arguments (package-arguments propeller-gcc-6)
698 `(modify-phases ,phases
699 (add-after 'unpack 'chdir
700 (lambda _ (chdir "gcc") #t))))))
703 ,@(package-native-inputs propeller-gcc-6)))
704 (home-page "https://github.com/parallaxinc/propgcc")
705 (supported-systems (delete "aarch64-linux" %supported-systems)))))
707 ;; Version 6 is experimental and may not work correctly. This is why we
708 ;; default to version 4, which is also used in the binary toolchain bundle
709 ;; provided by Parallax Inc.
710 (define-public propeller-gcc propeller-gcc-4)
713 ;; FIXME: We do not build the tiny library because that would require C++
714 ;; headers, which are not available. This may require adding a propeller-elf
715 ;; variant of the libstdc++ package.
716 (define-public proplib
717 (let ((commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
721 (version (string-append "0.0.0-" revision "." (string-take commit 9)))
725 (url "https://github.com/parallaxinc/propgcc")
727 (file-name (string-append name "-" commit "-checkout"))
730 "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))))
731 (build-system gnu-build-system)
733 `(#:tests? #f ; no tests
735 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
736 (string-append "BUILD=" (getcwd) "/build"))
738 (modify-phases %standard-phases
740 (add-after 'unpack 'chdir
741 (lambda _ (chdir "lib") #t))
742 (add-after 'chdir 'fix-Makefile
744 (substitute* "Makefile"
745 ;; Control the installation time of the headers.
746 ((" install-includes") ""))
748 ;; The Makefile does not separate building from installation, so we
749 ;; have to create the target directories at build time.
750 (add-before 'build 'create-target-directories
751 (lambda* (#:key make-flags #:allow-other-keys)
752 (apply invoke "make" "install-dirs" make-flags)))
753 (add-before 'build 'set-cross-environment-variables
754 (lambda* (#:key outputs #:allow-other-keys)
755 (setenv "CROSS_LIBRARY_PATH"
756 (string-append (assoc-ref outputs "out")
757 "/propeller-elf/lib:"
758 (or (getenv "CROSS_LIBRARY_PATH") "")))
759 (setenv "CROSS_C_INCLUDE_PATH"
760 (string-append (assoc-ref outputs "out")
761 "/propeller-elf/include:"
762 (or (getenv "CROSS_C_INCLUDE_PATH") "")))
764 (add-before 'install 'install-includes
765 (lambda* (#:key make-flags #:allow-other-keys)
766 (apply invoke "make" "install-includes" make-flags))))))
768 `(("propeller-gcc" ,propeller-gcc)
769 ("propeller-binutils" ,propeller-binutils)
771 (home-page "https://github.com/parallaxinc/propgcc")
772 (synopsis "C library for the Parallax Propeller")
773 (description "This is a C library for the Parallax Propeller
775 ;; Most of the code is released under the Expat license. Some of the
776 ;; included code is public domain and some changes are BSD licensed.
777 (license license:expat))))
779 (define-public propeller-toolchain
781 (name "propeller-toolchain")
782 (version (package-version propeller-gcc))
784 (build-system trivial-build-system)
785 (arguments '(#:builder (begin (mkdir %output) #t)))
787 `(("binutils" ,propeller-binutils)
789 ("gcc" ,propeller-gcc)))
790 (synopsis "Complete GCC tool chain for Propeller micro-controllers")
791 (description "This package provides a complete GCC tool chain for
792 Propeller micro-controller development.")
793 (home-page (package-home-page propeller-gcc))
794 (license (package-license propeller-gcc))))
796 (define-public openspin
803 (url "https://github.com/parallaxinc/OpenSpin")
805 (file-name (git-file-name name version))
808 "0ghk8hj4717ydhqzx2pfs6737s1cxng6sgg2xgbkwvcfclxdbrd0"))))
809 (build-system gnu-build-system)
811 `(#:tests? #f ; no tests
813 (modify-phases %standard-phases
815 (add-after 'unpack 'remove-timestamp
817 (substitute* "SpinSource/openspin.cpp"
818 ((" Compiled on.*$") "\\n\");"))
820 ;; Makefile does not include "install" target
822 (lambda* (#:key outputs #:allow-other-keys)
823 (let ((bin (string-append (assoc-ref outputs "out")
826 (install-file "build/openspin" bin)
828 (home-page "https://github.com/parallaxinc/OpenSpin")
829 (synopsis "Spin/PASM compiler for the Parallax Propeller")
830 (description "OpenSpin is a compiler for the Spin/PASM language of the
831 Parallax Propeller. It was ported from Chip Gracey's original x86 assembler
833 (license license:expat)))
835 (define-public propeller-load
836 (let ((commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
839 (name "propeller-load")
844 (url "https://github.com/parallaxinc/propgcc")
846 (file-name (string-append name "-" commit "-checkout"))
849 "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))))
850 (build-system gnu-build-system)
852 `(#:tests? #f ; no tests
855 (string-append "TARGET=" (assoc-ref %outputs "out")))
857 (modify-phases %standard-phases
858 (add-after 'unpack 'chdir
859 (lambda _ (chdir "loader") #t))
860 (delete 'configure))))
862 `(("openspin" ,openspin)
863 ("propeller-toolchain" ,propeller-toolchain)))
864 (home-page "https://github.com/parallaxinc/propgcc")
865 (synopsis "Loader for Parallax Propeller micro-controllers")
866 (description "This package provides the tool @code{propeller-load} to
867 upload binaries to a Parallax Propeller micro-controller.")
868 (license license:expat))))
870 (define-public spin2cpp
877 (url "https://github.com/totalspectrum/spin2cpp")
878 (commit (string-append "v" version))))
879 (file-name (git-file-name name version))
882 "0wznqvsckzzz4hdy2rpvj6jqpxw4yn7i0c7zxfm6i46k8gg9327b"))))
883 (build-system gnu-build-system)
885 `(#:tests? #f ;; The tests assume that a micro-controller is connected.
887 (modify-phases %standard-phases
889 (add-before 'build 'set-cross-environment-variables
890 (lambda* (#:key inputs #:allow-other-keys)
891 (setenv "CROSS_LIBRARY_PATH"
892 (string-append (assoc-ref inputs "propeller-toolchain")
893 "/propeller-elf/lib"))
894 (setenv "CROSS_C_INCLUDE_PATH"
895 (string-append (assoc-ref inputs "propeller-toolchain")
896 "/propeller-elf/include"))
899 (lambda* (#:key outputs #:allow-other-keys)
900 (let ((bin (string-append (assoc-ref outputs "out")
902 (for-each (lambda (file)
903 (install-file (string-append "build/" file)
905 '("testlex" "spin2cpp" "fastspin")))
909 ("propeller-load" ,propeller-load)
910 ("propeller-toolchain" ,propeller-toolchain)))
911 (home-page "https://github.com/totalspectrum/spin2cpp")
912 (synopsis "Convert Spin code to C, C++, or PASM code")
913 (description "This is a set of tools for converting the Spin language for
914 the Parallax Propeller micro-controller into C or C++ code, into PASM, or even
915 directly into an executable binary. The binaries produced use LMM PASM, so
916 they are much faster than regular Spin bytecodes (but also quite a bit
918 (license license:expat)))
920 (define-public spinsim
921 (let ((commit "66915a7ad1a3a2cf990a725bb341fab8d11eb620")
925 (version (string-append "0.75-" revision "." (string-take commit 9)))
929 (url "https://github.com/parallaxinc/spinsim")
931 (file-name (string-append name "-" commit "-checkout"))
934 "1n9kdhlxsdx7bz6c80w8dhi96zp633gd6qs0x9i4ii8qv4i7sj5k"))))
935 (build-system gnu-build-system)
937 `(#:tests? #f ; no tests
939 (modify-phases %standard-phases
942 (lambda* (#:key outputs #:allow-other-keys)
943 (let ((bin (string-append (assoc-ref outputs "out")
945 (install-file "build/spinsim" bin))
947 (home-page "https://github.com/parallaxinc/spinsim")
948 (synopsis "Spin simulator")
949 (description "This package provides the tool @code{spinsim}, a simulator
950 and simple debugger for Spin programs written for a Parallax Propeller
951 micro-controller. Spinsim supports execution from cog memory and hub
952 execution, but it does not support multi-tasking. It supports about
953 two-thirds of the opcodes in the P2 instruction set.")
954 (license license:expat))))
956 (define-public propeller-development-suite
958 (name "propeller-development-suite")
959 (version (package-version propeller-gcc))
961 (build-system trivial-build-system)
962 (arguments '(#:builder (begin (mkdir %output) #t)))
964 `(("toolchain" ,propeller-toolchain)
965 ("openspin" ,openspin)
966 ("propeller-load" ,propeller-load)
967 ("spin2cpp" ,spin2cpp)
968 ("spinsim" ,spinsim)))
969 (synopsis "Complete development suite for Propeller micro-controllers")
970 (description "This meta-package provides a complete environment for the
971 development with Parallax Propeller micro-controllers. It includes the GCC
972 toolchain, the loader, the Openspin compiler, the Spin2cpp tool, and the Spin
974 (home-page (package-home-page propeller-gcc))
975 (license (package-license propeller-gcc))))
977 (define-public binutils-vc4
978 (let ((commit "708acc851880dbeda1dd18aca4fd0a95b2573b36"))
980 (name "binutils-vc4")
981 (version (string-append "2.23.51-0." (string-take commit 7)))
985 (url "https://github.com/puppeh/binutils-vc4")
987 (file-name (string-append name "-" version "-checkout"))
990 "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63"))))
991 (build-system gnu-build-system)
993 `(#:configure-flags '("--target=vc4-elf"
995 "--enable-cgen-maint")
997 (modify-phases %standard-phases
998 (add-after 'unpack 'unpack-cgen
999 (lambda* (#:key inputs #:allow-other-keys)
1000 (copy-recursively (string-append (assoc-ref inputs "cgen")
1003 (add-after 'unpack-cgen 'fix-cgen-guile
1005 (substitute* "opcodes/Makefile.in"
1006 (("guile\\{,-\\}1.8") "guile"))
1007 (invoke "which" "guile"))))))
1013 (url "https://github.com/puppeh/cgen")
1014 (commit "d8e2a9eb70425f180fdd5bfd032884b0855f2032")))
1017 "14b3h2ji740s8zq5vwm4qdcxs4aa4wxi6wb9di3bv1h39x14nyr9"))))
1018 ("texinfo" ,texinfo)
1021 ("guile-1.8" ,guile-1.8)
1022 ("which" ,base:which)))
1023 (synopsis "Binutils for VC4")
1024 (description "This package provides @code{binutils} for VideoCore IV,
1025 the Raspberry Pi chip.")
1026 (license license:gpl3+)
1027 (home-page "https://github.com/puppeh/vc4-toolchain/"))))
1029 (define-public gcc-vc4
1030 (let ((commit "0fe4b83897341742f9df65797474cb0feab4b377")
1031 (xgcc (cross-gcc "vc4-elf" #:xgcc gcc-6 #:xbinutils binutils-vc4)))
1032 (package (inherit xgcc)
1037 (url "https://github.com/puppeh/gcc-vc4")
1039 (file-name (string-append name
1041 (package-version xgcc)
1045 "0kvaq4s0assvinmmicwqp07d0wwldcw0fv6f4k13whp3q5909jnr"))
1047 (search-patches "gcc-6-fix-buffer-size.patch"
1048 "gcc-6-fix-isl-includes.patch"))))
1051 ,@(package-native-inputs xgcc)))
1052 (synopsis "GCC for VC4")
1053 (description "This package provides @code{gcc} for VideoCore IV,
1054 the Raspberry Pi chip."))))
1056 (define-public python-libmpsse
1058 (name "python-libmpsse")
1064 (url "https://github.com/daym/libmpsse")
1065 (commit (string-append "v" version))))
1066 (file-name "libmpsse-checkout")
1069 "1rypfb96k2szqgygp3jnwg2zq9kwmfz0460dsahn3r2vkzml8wn7"))))
1070 (build-system gnu-build-system)
1072 `(("libftdi" ,libftdi)
1073 ("python" ,python)))
1075 `(("pkg-config" ,pkg-config)
1077 ("which" ,base:which)))
1079 `(#:tests? #f ; No tests exist.
1080 #:parallel-build? #f ; Would be buggy.
1082 (list (string-append "CFLAGS=-Wall -fPIC -fno-strict-aliasing -g -O2 "
1083 "$(shell pkg-config --cflags libftdi1)"))
1085 (modify-phases %standard-phases
1086 (add-after 'unpack 'set-environment-up
1087 (lambda* (#:key inputs outputs #:allow-other-keys)
1088 (let ((python (assoc-ref inputs "python")))
1090 (setenv "PYDEV" (string-append python
1092 ,(version-major+minor (package-version python))))
1095 (lambda* (#:key inputs outputs make-flags #:allow-other-keys #:rest args)
1096 (let* ((out (assoc-ref outputs "out"))
1097 (out-python (string-append out
1099 ,(version-major+minor (package-version python))
1101 (install (assoc-ref %standard-phases 'install)))
1102 (install #:make-flags (cons (string-append "PYLIB=" out-python)
1104 (home-page "https://code.google.com/archive/p/libmpsse/")
1105 (synopsis "Python library for MPSSE SPI I2C JTAG adapter by FTDI")
1106 (description "This package provides a library in order to support the
1107 MPSSE (Multi-Protocol Synchronous Serial Engine) adapter by FTDI that can do
1109 (license license:gpl2+)))
1111 (define-public python2-libmpsse
1113 (inherit python-libmpsse)
1114 (name "python2-libmpsse")
1116 (substitute-keyword-arguments (package-arguments python-libmpsse)
1118 `(modify-phases ,phases
1119 (replace 'set-environment-up
1120 (lambda* (#:key inputs outputs #:allow-other-keys)
1121 (let ((python (assoc-ref inputs "python")))
1123 (setenv "PYDEV" (string-append python
1125 ,(version-major+minor (package-version python-2))))
1128 (lambda* (#:key inputs outputs make-flags #:allow-other-keys #:rest args)
1129 (let* ((out (assoc-ref outputs "out"))
1130 (out-python (string-append out
1132 ,(version-major+minor (package-version python-2))
1134 (install (assoc-ref %standard-phases 'install)))
1135 (install #:make-flags (cons (string-append "PYLIB=" out-python)
1138 (alist-replace "python" (list python-2)
1139 (package-inputs python-libmpsse)))))
1141 (define-public picprog
1147 (uri (string-append "http://www.iki.fi/hyvatti/pic/picprog-"
1149 (file-name (string-append name "-" version ".tar.gz"))
1152 "1r04hg1n3v2jf915qr05la3q9cxy7a5jnh9cc98j04lh6c9p4x85"))
1153 (patches (search-patches "picprog-non-intel-support.patch"))))
1154 (build-system gnu-build-system)
1156 `(#:tests? #f ; No tests exist.
1158 (modify-phases %standard-phases
1159 (add-after 'unpack 'patch-paths
1160 (lambda* (#:key outputs #:allow-other-keys)
1161 (substitute* "Makefile"
1162 (("/usr/local") (assoc-ref outputs "out"))
1163 ((" -o 0 -g 0 ") " ")
1166 (add-before 'install 'mkdir
1167 (lambda* (#:key outputs #:allow-other-keys)
1168 (let ((out (assoc-ref outputs "out")))
1169 (mkdir-p (string-append out "/bin"))
1170 (mkdir-p (string-append out "/man/man1"))
1172 (delete 'configure))))
1173 (synopsis "Programs Microchip's PIC microcontrollers")
1174 (description "This program programs Microchip's PIC microcontrollers.")
1175 (home-page "https://hyvatti.iki.fi/~jaakko/pic/picprog.html")
1176 (license license:gpl3+)))
1178 (define-public fc-host-tools
1180 (name "fc-host-tools")
1184 (uri (string-append "ftp://ftp.freecalypso.org/pub/GSM/"
1185 "FreeCalypso/fc-host-tools-r" version ".tar.bz2"))
1188 "09ccd76khfvlx4dwi9dhrzl5mm68402mlych0g7f9ncfr5jzyf26"))))
1189 (build-system gnu-build-system)
1191 `(#:tests? #f ; No tests exist.
1193 (list (string-append "INSTALL_PREFIX=" %output)
1194 (string-append "INCLUDE_INSTALL_DIR=" %output "include/rvinterf"))
1196 (modify-phases %standard-phases
1197 (add-after 'unpack 'patch-installation-paths
1198 (lambda* (#:key outputs #:allow-other-keys)
1199 (substitute* '("Makefile"
1200 "rvinterf/etmsync/fsiomain.c"
1201 "rvinterf/etmsync/fsnew.c"
1202 "rvinterf/asyncshell/help.c"
1203 "rvinterf/libinterf/launchrvif.c"
1204 "loadtools/defpath.c"
1205 "loadtools/Makefile"
1206 "miscutil/c139explore"
1207 "miscutil/pirexplore"
1208 "ffstools/tiffs-wrappers/installpath.c"
1209 "uptools/atcmd/atinterf.c")
1210 (("/opt/freecalypso/loadtools")
1211 (string-append (assoc-ref outputs "out") "/lib/freecalypso/loadtools"))
1212 (("\\$\\{INSTALL_PREFIX\\}/loadtools")
1213 (string-append (assoc-ref outputs "out") "/lib/freecalypso/loadtools"))
1214 (("\\$\\{INSTALL_PREFIX\\}/target-bin")
1215 (string-append (assoc-ref outputs "out") "/lib/freecalypso/target-bin"))
1216 (("/opt/freecalypso")
1217 (assoc-ref outputs "out")))
1219 (delete 'configure))))
1221 `(("libx11" ,libx11)))
1222 (synopsis "Freecalypso host tools")
1223 (description "This package provides some tools for debugging FreeCalypso phones and the FreeCalypso FCDEV3B dev board.
1226 @item fc-e1decode: Decodes a binary Melody E1 file into an ASCII source file.
1227 @item fc-e1gen: Encodes an ASCII Melody E1 file into a binary Melody E1 file.
1228 @item fc-fr2tch: Converts a GSM 06.10 speech recording from libgsm to hex
1229 strings of TCH bits to be fed to the GSM 05.03 channel encoder of a TI
1231 @item fc-tch2fr: Converts hex strings of TCH bits to libgsm.
1232 @item fc-gsm2vm: utility converts a GSM 06.10 speech sample from the libgsm
1233 source format into a voice memo file that can be uploaded into the FFS of a
1234 FreeCalypso device and played with the audio_vm_play_start() API or the
1235 AT@@VMP command that invokes the latter.
1236 @item fc-rgbconv: Convers RGB 5:6:5 to RGB 8:8:8 and vice versa.
1237 @item rvinterf: Communicates with a TI Calypso GSM device via RVTMUX.
1238 @item rvtdump: produces a human-readable dump of all output emitted by a
1239 TI-based GSM fw on the RVTMUX binary packet interface.
1240 @item fc-shell: FreeCalypso firmwares have a feature of our own invention
1241 (not present in any pre-existing ones) to accept AT commands over the RVTMUX
1242 interface. It is useful when no second UART is available for a dedicated
1243 standard AT command interface. fc-shell is the tool that allows you to send
1244 AT commands to the firmware in this manner.
1245 @item fc-memdump: Captures a memory dump from a GSM device.
1246 @item fc-serterm: Trivial serial terminal. Escapes binary chars.
1247 @item fc-fsio: Going through rvinterf, this tool connects to GSM devices and
1248 allows you to manipulate the device's flash file system.
1249 @item tiaud-compile: Compiles an audio mode configuration table for TI's
1250 Audio Service from our own ASCII source format into the binary format for
1251 uploading into FreeCalypso GSM device FFS with fc-fsio.
1252 @item tiaud-decomp: Decodes TI's audio mode configuration files read out of
1253 FFS into our own ASCII format.
1254 @item tiaud-mkvol: Generates the *.vol binary files which need to accompany
1255 the main *.cfg ones.
1256 @item fc-compalram: Allows running programs on the device without writing
1257 them to flash storage.
1258 @item fc-xram: Allows running programs on the device without writing them
1260 @item fc-iram: Allows running programs on the device without writing them
1262 @item fc-loadtool: Writes programs to the device's flash storage.
1263 @item pirffs: Allows listing and extracting FFS content captured as a raw
1264 flash image from Pirelli phones.
1265 @item mokoffs: Allows listing and extracting FFS content captured as a raw
1266 flash image from OpenMoko phones.
1267 @item tiffs: Allows listing and extracting FFS content captured as a raw
1268 flash image from TI phones.
1269 @item c139explore: Run-from-RAM program for C139 phones that
1270 exercises their peripheral hardware: LCD, keypad backlight, buzzer, vibrator.
1271 @item pirexplore: Run-from-RAM program for Pirelli DP-L10 phones that
1272 exercises their peripheral hardware, primarily their LCD.
1273 @item tfc139: Breaks into Mot C1xx phones via shellcode injection, allowing
1274 you to reflash locked phones with new firmware with fc-loadtool.
1275 @item ctracedec: GSM firmwares built in TI's Windows environment have a
1276 compressed trace misfeature whereby many of the ASCII strings
1277 in debug trace messages get replaced with numeric indices at
1278 build time, and these numeric indices are all that gets emitted
1279 on the RVTMUX serial channel. This tools decodes these numeric indices
1280 back to strings in trace output.
1281 @item fc-cal2text: This utility takes a dump of TI's /gsm/rf flash file system
1282 directory subtree as input (either extracted in vitro with tiffs
1283 or read out in vivo with fc-fsio) and converts all RF tables
1284 found therein into a readable ASCII format.
1285 @item imei-luhn: Computes or verifies the Luhn check digit of an IMEI number.
1286 @item fc-dspapidump: Reads and dumps the contents of the DSP API RAM in a
1287 target Calypso GSM device.
1288 @item fc-vm2hex: Converts the old-fashioned (non-AMR) voice memo files read
1289 out of FFS into hex strings.
1290 @item fc-buzplay: Plays piezoelectic buzzer melodies on an actual
1291 Calypso device equipped with such a buzzer (Mot C1xx, TI's D-Sample board,
1292 our planned future HSMBP) by loading a buzplayer agent onto the target and
1293 feeding melodies to be played to it.
1294 @item fc-tmsh: TI-based GSM firmwares provide a rich set of Test Mode commands
1295 that can be issued through the RVTMUX (debug trace) serial channel.
1296 This program is our test mode shell for sending Test Mode commands to targets
1297 and displaying decoded target responses.
1298 @item fcup-smsend: Send a short message via SMS
1299 @item fcup-smsendmult: Send multiple short messages via SMS in one go
1300 @item fcup-smsendpdu: Send multiple short messages given in PDU format via SMS
1301 @item sms-pdu-decode: Decode PDU format messages
1302 @item fc-dspromdump: Dump DSP ROM.
1303 @item pcm-sms-decode: Decode /pcm/SMS binary files read out of FFS maintained
1304 by Pirelli DP-L10. Display the SMS in human-readable form.
1305 @item srec-regions: Parse S-record (TI's *.m0), identify the set of
1306 discontiguous regions into which this SREC image deposits bits, and list
1307 these identified regions.
1309 (home-page "https://www.freecalypso.org/")
1310 (license license:public-domain)))
1312 (define-public stlink
1320 (url "https://github.com/texane/stlink")
1321 (commit (string-append "v" version))))
1322 (file-name (git-file-name name version))
1325 "1d5gxiqpsm8fc105cxlp27af9fk339fap5h6nay21x5a7n61jgyc"))))
1326 (build-system cmake-build-system)
1328 `(#:tests? #f ;no tests
1330 (let* ((out (assoc-ref %outputs "out"))
1331 (etc (in-vicinity out "etc"))
1332 (modprobe (in-vicinity etc "modprobe.d"))
1333 (udev-rules (in-vicinity etc "udev/rules.d")))
1334 (list (string-append "-DSTLINK_UDEV_RULES_DIR=" udev-rules)
1335 (string-append "-DSTLINK_MODPROBED_DIR=" modprobe)))))
1337 `(("libusb" ,libusb)))
1338 (synopsis "Programmer for STM32 Discovery boards")
1339 (description "This package provides a firmware programmer for the STM32
1340 Discovery boards. It supports two versions of the chip: ST-LINK/V1 (on
1341 STM32VL discovery kits) and ST-LINK/V2 (on STM32L discovery and later kits).
1342 Two different transport layers are used: ST-LINK/V1 uses SCSI passthru
1343 commands over USB, and ST-LINK/V2 and ST-LINK/V2-1 (seen on Nucleo boards) use
1345 (home-page "https://github.com/texane/stlink")
1346 ;; The flashloaders/stm32l0x.s and flashloaders/stm32lx.s source files are
1347 ;; licensed under the GPLv2+.
1348 (license (list license:bsd-3 license:gpl2+))))
1357 (uri (pypi-uri "west" version))
1360 "0ql6ij1hrj2ir5wkxm96zgig5qwvfwa75w77wh2y13w6b9cqcr4b"))))
1362 `(("python-colorama" ,python-colorama)
1363 ("python-configobj" ,python-configobj)
1364 ("python-pykwalify" ,python-pykwalify)
1365 ("python-pyyaml" ,python-pyyaml)))
1366 (build-system python-build-system)
1367 (home-page "https://github.com/zephyrproject-rtos/west")
1368 (synopsis "Zephyr RTOS Project meta-tool")
1369 (description "West is the swiss-army knife command line tool of the Zephyr
1370 project. Its built-in commands provide a multiple repository management
1371 system with features inspired by Google’s Repo tool and Git submodules. West
1372 simplifies configuration and is also pluggable: you can write your own west
1373 \"extension commands\" which add additional features to west. Zephyr uses
1374 this feature to provide conveniences for building applications, flashing and
1375 debugging them, and more.")
1376 (license license:expat)))
1378 (define-public ebusd
1385 (url "https://github.com/john30/ebusd")
1386 (commit (string-append "v" version))))
1387 (file-name (string-append name "-" version "-checkout"))
1390 "0iva70bam7wdx60bpd3an9kxr28zxlvp3vprivgqshwwdhqa0hzp"))))
1391 (build-system gnu-build-system)
1394 (modify-phases %standard-phases
1395 (add-after 'install 'install-config
1396 (lambda* (#:key inputs outputs #:allow-other-keys)
1397 (let ((config-destination
1398 (string-append (assoc-ref outputs "out")
1400 (copy-recursively (string-append (assoc-ref inputs "config")
1405 `(("mosquitto" ,mosquitto)))
1407 `(("automake" ,automake)
1408 ("autoconf" ,autoconf)
1413 (url "https://github.com/john30/ebusd-configuration")
1414 (commit "666c0f6b9c4d7545eff7f43ab28a1c7baeab7913")))
1415 (file-name "config-checkout")
1418 "0yxnx8p4lbk614l16854r9s9d8s9c7ixgczfs8mph94xz0wkda7x"))))))
1419 (synopsis "Daemon for communicating with eBUS devices")
1420 (description "This package provides @command{ebusd}, a daemon for
1421 handling communication with eBUS devices connected to a 2-wire bus system
1422 (\"energy bus\" used by numerous heating systems).")
1423 (home-page "https://ebusd.eu/")
1424 (license license:gpl3+)))
1426 (define-public ucsim
1429 (version "0.6-pre67")
1433 "http://mazsola.iit.uni-miskolc.hu/ucsim/download/unix/"
1434 "devel/ucsim-" version ".tar.gz"))
1437 "0aahj9pbfjphjrm4hgs9pfmp6d5aikaq4yvxlrvhywjinnnf0qp1"))))
1438 (build-system gnu-build-system)
1440 `(#:configure-flags '("--enable-avr-port"
1441 "--enable-m6809-port"
1442 "--enable-p1516-port"
1443 "--enable-st7-port")
1445 (modify-phases %standard-phases
1446 (add-after 'unpack 'patch-makefiles
1448 (substitute* (find-files "." "(\\.mk$|\\.in$)")
1449 (("/bin/sh") (which "sh")))
1451 (add-after 'install 'remove-empty-directory
1452 (lambda* (#:key outputs #:allow-other-keys)
1453 (delete-file-recursively
1454 (string-append (assoc-ref outputs "out") "/share/man"))
1459 (home-page "http://mazsola.iit.uni-miskolc.hu/ucsim/")
1460 (synopsis "Simulators for various microcontroller families")
1461 (description "μCsim is a collection of software simulators for
1462 microcontrollers in the Atmel AVR; Intel MCS-51 (8051); Motorola 68HC08 and
1463 6809; P1516; Padauk PDK13, PDK14 and PDK15; STMicroelectronics ST7 and STM8;
1464 and Zilog Z80 families, plus many of their variants.")
1465 (license license:gpl2+)))
1474 "mirror://sourceforge/sdcc/sdcc"
1475 "/" version "/sdcc-src-" version ".tar.bz2"))
1478 "042fxw5mnsfhpc0z9lxfsw88kdkm32pwrxacp88kj2n2dy0814a8"))
1479 (modules '((guix build utils)))
1482 ;; Remove non-free source files
1483 (delete-file-recursively "device/non-free")
1484 ;; Remove bundled μCsim source
1485 (delete-file-recursively "sim")
1487 (patches (search-patches "sdcc-disable-non-free-code.patch"))))
1488 (build-system gnu-build-system)
1493 ("python-2" ,python-2)
1494 ("texinfo" ,texinfo)
1497 `(;; GPUTILS is required for the PIC ports, but the licensing status of
1498 ;; some of the files contained in its distribution is unclear (see
1499 ;; https://issues.guix.gnu.org/44557). For this reason it is not yet
1500 ;; available as a package in Guix.
1502 '("--disable-pic14-port" "--disable-pic16-port" "--disable-ucsim")
1504 (modify-phases %standard-phases
1505 (add-after 'unpack 'patch-makefiles
1507 (substitute* (find-files "." "(\\.mk$|\\.in$)")
1508 (("/bin/sh") (which "sh")))
1510 (home-page "http://sdcc.sourceforge.net")
1511 (synopsis "C compiler suite for 8-bit microcontrollers")
1512 (description "SDCC is a retargetable, optimizing Standard C compiler suite
1513 that targets 8-bit microcontrollers in the Intel MCS-51 (8051); Motorola
1514 68HC08; Padauk PDK13, PDK14 and PDK15; STMicroelectronics STM8; and Zilog Z80
1515 families, plus many of their variants.")
1516 (license (list license:gpl2+
1521 license:public-domain