-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some limited JSON Patch support for board description files.
Boards can now be provided as .patch files that are JSON documents containing two nodes: - `base` is the board that this is based on, which can be another .patch file, a full path (note: relative paths are not yet supported, but they should be for out-of-tree BSPs). - `patch` is a JSON Patch. The patch is a subset of RFC 6902. Current limitations: - It doesn't handle escapes in keys or any weird keys. - It assumes that numbers in the JSON Pointer path are array indexes and will do the wrong thing if you try to replace or add an object field with a number as a key. - It doesn't implement the copy, move, or test operations, only add, remove, and replace. This is sufficient to be useful. The Arty A7 and Sonata Simulator JSON files are now replaced with patches.
- Loading branch information
1 parent
f485b5d
commit 3cffc5c
Showing
5 changed files
with
227 additions
and
233 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"base": "ibex-safe-simulator", | ||
"patch": [ | ||
{ | ||
"op": "add", | ||
"path": "/devices/gpio_led0", | ||
"value": { | ||
"start": 0x8f00f000, | ||
"length": 0x800 | ||
} | ||
}, | ||
{ | ||
"op": "add", | ||
"path": "/kunyan_ethernet", | ||
"value": { | ||
"start": 0x14004000, | ||
"end": 0x14008000 | ||
} | ||
}, | ||
{ | ||
"op": "add", | ||
"path": "/interrupts/1", | ||
"value": { | ||
"name": "UARTInterrupt", | ||
"number": 2, | ||
"priority": 3, | ||
"edge_triggered": true | ||
} | ||
}, | ||
{ | ||
"op": "add", | ||
"path": "/interrupts/2", | ||
"value": { | ||
"name": "EthernetTransmitInterrupt", | ||
"number": 3, | ||
"priority": 3 | ||
} | ||
}, | ||
{ | ||
"op": "add", | ||
"path": "/interrupts/3", | ||
"value": { | ||
"name": "EthernetReceiveInterrupt", | ||
"number": 4, | ||
"priority": 3 | ||
} | ||
}, | ||
{ | ||
"op": "add", | ||
"path": "/driver_includes/0", | ||
"value": "${sdk}/include/platform/synopsis" | ||
}, | ||
{ | ||
"op": "add", | ||
"path": "/driver_includes/0", | ||
"value": "${sdk}/include/platform/arty-a7" | ||
}, | ||
{ | ||
"op": "replace", | ||
"path": "/timer_hz", | ||
"value": 33000000 | ||
}, | ||
{ | ||
"op": "replace", | ||
"path": "/tickrate_hz", | ||
"value": 100 | ||
}, | ||
{ | ||
"op": "remove", | ||
"path": "/simulation" | ||
}, | ||
{ | ||
"op": "remove", | ||
"path": "/simulator" | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"base": "sonata-prerelease", | ||
"patch": [ | ||
{ | ||
"op": "replace", | ||
"path": "/simulation", | ||
"value": true | ||
}, | ||
{ | ||
"op": "replace", | ||
"path": "/simulator", | ||
"value": "${sdk}/../scripts/run-sonata-sim.sh" | ||
} | ||
] | ||
} |
Oops, something went wrong.