(define-module (pico-sdk) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages cmake) #:use-module (gnu packages commencement) #:use-module (gnu packages embedded) #:use-module (guix git-download) #:use-module (guix build-system copy) #:use-module ((guix licenses) #:prefix license:)) ;; USE IT WITH CMAKE WITH; -DPICO_SDK_PATH=#$pico-sdk ;; WE HAVE THE VARIABLE SET TOO, JUST IN CASE (define-public pico-sdk (package (name "pico-sdk") (version "1.5.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/raspberrypi/pico-sdk") (commit version))) (file-name (string-append name "-" version)) (sha256 (base32 "0x92f213zm4mp0ffdar6hdp7jvjzfxa59agqja7xhd4prrvk3mr4")))) (native-search-paths (list (search-path-specification (variable "PICO_SDK_PATH") (files '("."))))) (build-system copy-build-system) (propagated-inputs (list cmake gnu-make (make-arm-none-eabi-toolchain-7-2018-q2-update) gcc-toolchain ; For elf2uf2 )) (home-page "https://github.com/raspberrypi/pico-sdk") (synopsis "The Raspberry Pi Pico SDK") (description "The SDK provides the headers, libraries and build system necessary to write programs for the RP2040-based devices such as the Raspberry Pi Pico in C, C++ or assembly language.") (license license:bsd-3)))