diff mbox

[v2,4/4] gnu: Add arm-none-eabi-toolchain.

Message ID 20160919202340.4122-5-theodoros.for@openmailbox.org
State New
Headers show

Commit Message

Theodoros Foradis Sept. 19, 2016, 8:23 p.m. UTC
* gnu/packages/embedded.scm (arm-none-eabi-toolchain): New procedure.
(arm-none-eabi-toolchain-4.9, arm-none-eabi-toolchain-nano-4.9): New variables.
(arm-none-eabi-toolchain-6, arm-none-eabi-toolchain-nano-6): New variables.
---
 gnu/packages/embedded.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
diff mbox

Patch

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 29033b9..0adbcfa 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -188,3 +188,39 @@  usable on embedded products.")
            "--enable-newlib-nano-formatted-io"
            "--disable-nls"))))))
 
+(define (arm-none-eabi-toolchain xgcc newlib-arm-none-eabi)
+  (let ((newlib (newlib-arm-none-eabi xgcc)))
+    (package
+      (name "arm-none-eabi-toolchain")
+      (version
+       (cond ((string=? (package-name newlib) "newlib")
+              (package-version xgcc))
+             ((string=? (package-name newlib) "newlib-nano")
+              (string-append "nano-" (package-version xgcc)))))
+      (source #f)
+      (build-system trivial-build-system)
+      (arguments '(#:builder (mkdir %output)))
+      (propagated-inputs
+       `(("binutils" ,xbinutils-arm-none-eabi)
+         ("gcc" ,xgcc)
+         ("newlib" ,newlib)))
+      (synopsis "Complete GCC tool chain for ARM bare metal development")
+      (description "This package provides a complete GCC tool chain for ARM
+bare metal development.  This includes the GCC arm-none-eabi cross compiler and
+newlib (or newlib-nano) as the C library.  The supported programming languages
+are C and C++.")
+      (home-page (package-home-page xgcc))
+      (license (package-license xgcc)))))
+
+(define-public arm-none-eabi-toolchain-4.9
+  (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 newlib-arm-none-eabi))
+
+(define-public arm-none-eabi-toolchain-6
+  (arm-none-eabi-toolchain  gcc-arm-none-eabi-6  newlib-arm-none-eabi))
+
+(define-public arm-none-eabi-toolchain-nano-4.9
+  (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 newlib-nano-arm-none-eabi))
+
+(define-public arm-none-eabi-toolchain-nano-6
+  (arm-none-eabi-toolchain gcc-arm-none-eabi-6 newlib-nano-arm-none-eabi))
+