gnu: openocd: Update to 0.10.0
* gnu/packages/embedded.scm (openocd): Update to 0.10.0. [arguments] <configure-flags>: Add "--enable-sysfsgpio" flag. Remove "--enable-oocd_trace" flag. [arguments] <phases>: Add phase "change-udev-group". Add phase "install-udev-rules". * gnu/packages/patches/openocd-nrf52.patch: Modify to apply on 0.10.0. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
2da8865a70
commit
ea1aa4525e
@ -355,59 +355,66 @@ language.")
|
|||||||
(license license:bsd-2)))
|
(license license:bsd-2)))
|
||||||
|
|
||||||
(define-public openocd
|
(define-public openocd
|
||||||
;; FIXME: Use tarball release after nrf52 patch is merged.
|
(package
|
||||||
(let ((commit "674141e8a7a6413cb803d90c2a20150260015f81")
|
(name "openocd")
|
||||||
(revision "1"))
|
(version "0.10.0")
|
||||||
(package
|
(source (origin
|
||||||
(name "openocd")
|
(method url-fetch)
|
||||||
(version (string-append "0.9.0-" revision "."
|
(uri (string-append "mirror://sourceforge/openocd/openocd/"
|
||||||
(string-take commit 7)))
|
version "/openocd-" version ".tar.gz"))
|
||||||
(source (origin
|
(sha256
|
||||||
(method git-fetch)
|
(base32
|
||||||
(uri (git-reference
|
"09p57y3c2spqx4vjjlz1ljm1lcd0j9q8g76ywxqgn3yc34wv18zd"))
|
||||||
(url "https://git.code.sf.net/p/openocd/code.git")
|
;; FIXME: Remove after nrf52 patch is merged.
|
||||||
(commit commit)))
|
(patches
|
||||||
(sha256
|
(search-patches "openocd-nrf52.patch"))))
|
||||||
(base32
|
(build-system gnu-build-system)
|
||||||
"1i86jp0wawq78d73z8hp7q1pn7lmlvhjjr19f7299h4w40a5jf8j"))
|
(native-inputs
|
||||||
(file-name (string-append name "-" version "-checkout"))
|
`(("autoconf" ,autoconf)
|
||||||
(patches
|
("automake" ,automake)
|
||||||
(search-patches "openocd-nrf52.patch"))))
|
("libtool" ,libtool)
|
||||||
(build-system gnu-build-system)
|
("pkg-config" ,pkg-config)))
|
||||||
(native-inputs
|
(inputs
|
||||||
`(("autoconf" ,autoconf)
|
`(("hidapi" ,hidapi)
|
||||||
("automake" ,automake)
|
("jimtcl" ,jimtcl)
|
||||||
("libtool" ,libtool)
|
("libftdi" ,libftdi)
|
||||||
("pkg-config" ,pkg-config)))
|
("libjaylink" ,libjaylink)
|
||||||
(inputs
|
("libusb-compat" ,libusb-compat)))
|
||||||
`(("hidapi" ,hidapi)
|
(arguments
|
||||||
("jimtcl" ,jimtcl)
|
'(#:configure-flags
|
||||||
("libftdi" ,libftdi)
|
(append (list "--disable-werror"
|
||||||
("libjaylink" ,libjaylink)
|
"--enable-sysfsgpio"
|
||||||
("libusb-compat" ,libusb-compat)))
|
"--disable-internal-jimtcl"
|
||||||
(arguments
|
"--disable-internal-libjaylink")
|
||||||
'(#:configure-flags
|
(map (lambda (programmer)
|
||||||
(append (list "--disable-werror"
|
(string-append "--enable-" programmer))
|
||||||
"--disable-internal-jimtcl"
|
'("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
|
||||||
"--disable-internal-libjaylink")
|
"gw16012" "jlink" "opendous" "osbdm"
|
||||||
(map (lambda (programmer)
|
"parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
|
||||||
(string-append "--enable-" programmer))
|
"remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
|
||||||
'("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
|
"usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
|
||||||
"gw16012" "jlink" "oocd_trace" "opendous" "osbdm"
|
"presto" "openjtag")))
|
||||||
"parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
|
#:phases
|
||||||
"remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
|
(modify-phases %standard-phases
|
||||||
"usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
|
(add-before 'configure 'autoreconf
|
||||||
"presto" "openjtag")))
|
(lambda _
|
||||||
#:phases
|
(zero? (system* "autoreconf" "-vfi"))))
|
||||||
(modify-phases %standard-phases
|
(add-after 'autoreconf 'change-udev-group
|
||||||
(add-after 'unpack 'autoreconf
|
(lambda _
|
||||||
(lambda _
|
(substitute* "contrib/60-openocd.rules"
|
||||||
(zero? (system* "autoreconf" "-vfi")))))))
|
(("plugdev") "dialout"))
|
||||||
(home-page "http://openocd.org")
|
#t))
|
||||||
(synopsis "On-Chip Debugger")
|
(add-after 'install 'install-udev-rules
|
||||||
(description "OpenOCD provides on-chip programming and debugging support
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(install-file "contrib/60-openocd.rules"
|
||||||
|
(string-append
|
||||||
|
(assoc-ref outputs "out")
|
||||||
|
"/lib/udev/rules.d/")))))))
|
||||||
|
(home-page "http://openocd.org")
|
||||||
|
(synopsis "On-Chip Debugger")
|
||||||
|
(description "OpenOCD provides on-chip programming and debugging support
|
||||||
with a layered architecture of JTAG interface and TAP support.")
|
with a layered architecture of JTAG interface and TAP support.")
|
||||||
(license license:gpl2+))))
|
(license license:gpl2+)))
|
||||||
|
|
||||||
;; The commits for all propeller tools are the latest versions as published
|
;; The commits for all propeller tools are the latest versions as published
|
||||||
;; here: https://github.com/dbetz/propeller-gcc
|
;; here: https://github.com/dbetz/propeller-gcc
|
||||||
|
@ -21,19 +21,19 @@ Signed-off-by: Michael Dietz <mjdietzx@gmail.com>
|
|||||||
---
|
---
|
||||||
|
|
||||||
diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am
|
diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am
|
||||||
index c167e8f..b6a2be3 100644
|
index 727e4f2..839667c 100644
|
||||||
--- a/src/flash/nor/Makefile.am
|
--- a/src/flash/nor/Makefile.am
|
||||||
+++ b/src/flash/nor/Makefile.am
|
+++ b/src/flash/nor/Makefile.am
|
||||||
@@ -37,6 +37,7 @@ NOR_DRIVERS = \
|
@@ -36,6 +36,7 @@ NOR_DRIVERS = \
|
||||||
niietcm4.c \
|
%D%/niietcm4.c \
|
||||||
non_cfi.c \
|
%D%/non_cfi.c \
|
||||||
nrf51.c \
|
%D%/nrf51.c \
|
||||||
+ nrf52.c \
|
+ %D%/nrf52.c \
|
||||||
numicro.c \
|
%D%/numicro.c \
|
||||||
ocl.c \
|
%D%/ocl.c \
|
||||||
pic32mx.c \
|
%D%/pic32mx.c \
|
||||||
diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c
|
diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c
|
||||||
index 56a5cb2..3e071bd 100644
|
index 56a5cb2..071273e 100644
|
||||||
--- a/src/flash/nor/drivers.c
|
--- a/src/flash/nor/drivers.c
|
||||||
+++ b/src/flash/nor/drivers.c
|
+++ b/src/flash/nor/drivers.c
|
||||||
@@ -48,6 +48,7 @@ extern struct flash_driver mdr_flash;
|
@@ -48,6 +48,7 @@ extern struct flash_driver mdr_flash;
|
||||||
@ -48,7 +48,7 @@ index 56a5cb2..3e071bd 100644
|
|||||||
&mrvlqspi_flash,
|
&mrvlqspi_flash,
|
||||||
&niietcm4_flash,
|
&niietcm4_flash,
|
||||||
&nrf51_flash,
|
&nrf51_flash,
|
||||||
+ &nrf52_flash,
|
+ &nrf52_flash,
|
||||||
&numicro_flash,
|
&numicro_flash,
|
||||||
&ocl_flash,
|
&ocl_flash,
|
||||||
&pic32mx_flash,
|
&pic32mx_flash,
|
||||||
@ -792,47 +792,31 @@ index 0000000..7f2bd35
|
|||||||
+ .protect_check = nrf52_protect_check,
|
+ .protect_check = nrf52_protect_check,
|
||||||
+};
|
+};
|
||||||
diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg
|
diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg
|
||||||
index c1cbf1a..a2567ff 100644
|
index c1cbf1a..41a22ff 100644
|
||||||
--- a/tcl/target/nrf52.cfg
|
--- a/tcl/target/nrf52.cfg
|
||||||
+++ b/tcl/target/nrf52.cfg
|
+++ b/tcl/target/nrf52.cfg
|
||||||
@@ -5,15 +5,22 @@
|
@@ -10,6 +10,13 @@ if { [info exists CHIPNAME] } {
|
||||||
source [find target/swj-dp.tcl]
|
set _CHIPNAME nrf52
|
||||||
|
}
|
||||||
|
|
||||||
if { [info exists CHIPNAME] } {
|
|
||||||
- set _CHIPNAME $CHIPNAME
|
|
||||||
+ set _CHIPNAME $CHIPNAME
|
|
||||||
} else {
|
|
||||||
- set _CHIPNAME nrf52
|
|
||||||
+ set _CHIPNAME nrf52
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# Work-area is a space in RAM used for flash programming, by default use 16kB.
|
+# Work-area is a space in RAM used for flash programming, by default use 16kB.
|
||||||
+if { [info exists WORKAREASIZE] } {
|
+if { [info exists WORKAREASIZE] } {
|
||||||
+ set _WORKAREASIZE $WORKAREASIZE
|
+ set _WORKAREASIZE $WORKAREASIZE
|
||||||
+} else {
|
+} else {
|
||||||
+ set _WORKAREASIZE 0x4000
|
+ set _WORKAREASIZE 0x4000
|
||||||
}
|
+}
|
||||||
|
+
|
||||||
if { [info exists CPUTAPID] } {
|
if { [info exists CPUTAPID] } {
|
||||||
- set _CPUTAPID $CPUTAPID
|
set _CPUTAPID $CPUTAPID
|
||||||
+ set _CPUTAPID $CPUTAPID
|
|
||||||
} else {
|
} else {
|
||||||
- set _CPUTAPID 0x2ba01477
|
@@ -22,7 +29,15 @@ set _TARGETNAME $_CHIPNAME.cpu
|
||||||
+ set _CPUTAPID 0x2ba01477
|
|
||||||
}
|
|
||||||
|
|
||||||
swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
|
|
||||||
@@ -21,8 +28,15 @@ swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
|
|
||||||
set _TARGETNAME $_CHIPNAME.cpu
|
|
||||||
target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
|
target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
|
||||||
|
|
||||||
-adapter_khz 10000
|
adapter_khz 10000
|
||||||
+$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
+$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
||||||
|
|
||||||
-if { ![using_hla] } {
|
if { ![using_hla] } {
|
||||||
- cortex_m reset_config sysresetreq
|
cortex_m reset_config sysresetreq
|
||||||
+if {![using_hla]} {
|
|
||||||
+ cortex_m reset_config sysresetreq
|
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+flash bank $_CHIPNAME.flash nrf52 0x00000000 0 1 1 $_TARGETNAME
|
+flash bank $_CHIPNAME.flash nrf52 0x00000000 0 1 1 $_TARGETNAME
|
||||||
|
Loading…
Reference in New Issue
Block a user