forked from M-Labs/nix-scripts
openocd: patch SPI flash snafu. Closes #62
This commit is contained in:
parent
e79318171b
commit
9a76e0fdb6
24
artiq-fast/pkgs/openocd-jtagspi.nix
Normal file
24
artiq-fast/pkgs/openocd-jtagspi.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
diff --git a/src/flash/nor/spi.c b/src/flash/nor/spi.c
|
||||||
|
index af72ffc4..e5c9a9bd 100644
|
||||||
|
--- a/src/flash/nor/spi.c
|
||||||
|
+++ b/src/flash/nor/spi.c
|
||||||
|
@@ -90,8 +90,8 @@ const struct flash_device flash_devices[] = {
|
||||||
|
FLASH_ID("mac 25r6435f", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x001728c2, 0x100, 0x10000, 0x800000),
|
||||||
|
FLASH_ID("micron n25q064", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0017ba20, 0x100, 0x10000, 0x800000),
|
||||||
|
FLASH_ID("micron n25q128", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0018ba20, 0x100, 0x10000, 0x1000000),
|
||||||
|
- FLASH_ID("micron n25q256 3v", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0019ba20, 0x100, 0x10000, 0x2000000),
|
||||||
|
- FLASH_ID("micron n25q256 1.8v", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0019bb20, 0x100, 0x10000, 0x2000000),
|
||||||
|
+ FLASH_ID("micron n25q256 3v", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0019ba20, 0x100, 0x10000, 0x2000000),
|
||||||
|
+ FLASH_ID("micron n25q256 1.8v", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0019bb20, 0x100, 0x10000, 0x2000000),
|
||||||
|
FLASH_ID("micron mt25ql512", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0020ba20, 0x100, 0x10000, 0x4000000),
|
||||||
|
FLASH_ID("micron mt25ql01", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0021ba20, 0x100, 0x10000, 0x8000000),
|
||||||
|
FLASH_ID("micron mt25ql02", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0022ba20, 0x100, 0x10000, 0x10000000),
|
||||||
|
@@ -124,7 +124,7 @@ const struct flash_device flash_devices[] = {
|
||||||
|
FLASH_ID("issi is25lp064", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0017609d, 0x100, 0x10000, 0x800000),
|
||||||
|
FLASH_ID("issi is25lp128d", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0018609d, 0x100, 0x10000, 0x1000000),
|
||||||
|
FLASH_ID("issi is25wp128d", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0018709d, 0x100, 0x10000, 0x1000000),
|
||||||
|
- FLASH_ID("issi is25lp256d", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0019609d, 0x100, 0x10000, 0x2000000),
|
||||||
|
+ FLASH_ID("issi is25lp256d", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x0019609d, 0x100, 0x10000, 0x2000000),
|
||||||
|
FLASH_ID("issi is25wp256d", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x0019709d, 0x100, 0x10000, 0x2000000),
|
||||||
|
FLASH_ID("issi is25lp512m", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x001a609d, 0x100, 0x10000, 0x4000000),
|
||||||
|
FLASH_ID("issi is25wp512m", 0x13, 0xec, 0x12, 0xdc, 0xc7, 0x001a709d, 0x100, 0x10000, 0x4000000),
|
@ -15,8 +15,12 @@ let
|
|||||||
cp $src/*.bit $out/share/bscan-spi-bitstreams
|
cp $src/*.bit $out/share/bscan-spi-bitstreams
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
# https://docs.lambdaconcept.com/screamer/troubleshooting.html#error-contents-differ
|
||||||
|
openocd-fixed = openocd.overrideAttrs(oa: {
|
||||||
|
patches = oa.patches or [] ++ [ ./openocd-jtagspi.nix ];
|
||||||
|
});
|
||||||
in
|
in
|
||||||
buildEnv {
|
buildEnv {
|
||||||
name = "openocd-bscanspi";
|
name = "openocd-bscanspi";
|
||||||
paths = [ openocd bscan_spi_bitstreams-pkg ];
|
paths = [ openocd-fixed bscan_spi_bitstreams-pkg ];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user