GNU bug report logs -
#48767
[PATCH 0/7] Add msp430 toolchain
Previous Next
Full log
View this message in rfc822 format
From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
* gnu/packages/embedded.scm (msp430-toolchain): New variable.
---
gnu/packages/embedded.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 49f3eda5fb..8401f68542 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -598,6 +598,44 @@ usable on embedded products.")
(license (license:non-copyleft
"https://www.sourceware.org/newlib/COPYING.NEWLIB"))))
+(define (make-msp430-toolchain xgcc newlib)
+ "Produce a cross-compiler toolchain package with the compiler XGCC and the C
+library variant NEWLIB."
+ (let ((newlib-with-xgcc (package (inherit newlib)
+ (native-inputs
+ (alist-replace "xgcc" (list xgcc)
+ (package-native-inputs newlib))))))
+ (package
+ (name "msp430-toolchain")
+ (version (package-version xgcc))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ '(#:modules ((guix build union))
+ #:builder
+ (begin
+ (use-modules (ice-9 match)
+ (guix build union))
+ (match %build-inputs
+ (((names . directories) ...)
+ (union-build (assoc-ref %outputs "out")
+ directories)
+ #t)))))
+ (propagated-inputs
+ `(("binutils" ,(cross-binutils "msp430-elf"))
+ ("gcc" ,xgcc)
+ ("gcc-msp430-support-files" ,gcc-msp430-support-files)
+ ("newlib" ,newlib-with-xgcc)))
+ (synopsis "Complete GCC tool chain for MSP430")
+ (description "This package provides a complete GCC tool chain for MSP430.
+This includes the GCC msp430-elf cross compiler and newlib as the C library.
+The supported programming language is C.")
+ (home-page (package-home-page xgcc))
+ (license (package-license xgcc)))))
+
+(define-public msp430-toolchain
+ (make-msp430-toolchain gcc-msp430 newlib-msp430))
+
(define-public libjaylink
(package
(name "libjaylink")
--
2.33.0
This bug report was last modified 2 years and 303 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.