summaryrefslogtreecommitdiff
path: root/pico-sdk.scm
blob: ddf6050aed51c4c99b23a1ae13293c0705573956 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
(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)))