-
Notifications
You must be signed in to change notification settings - Fork 6
Add README.md #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
emeb
wants to merge
4
commits into
blackmagic-debug:main
Choose a base branch
from
emeb:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add README.md #14
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| # bmpflash | ||
|
|
||
| A utility for accessing SPI flash devices using the Black Magic Debug Probe. | ||
|
|
||
| > [!NOTE] | ||
| > This project is currently still in early stages and under heavy development. | ||
|
|
||
| ## Building from source | ||
|
|
||
| ## Installation | ||
|
|
||
| Binary releases are not yet available and the utility must be built from | ||
| source. | ||
|
|
||
| ## Building from source | ||
|
|
||
| The project is configured and built using the Meson build system, you will need to create a build directory | ||
| and then configure the build depending on what you want. | ||
|
|
||
| ```sh | ||
| meson setup build | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > Some newer versions of meson have changed the syntax of the build script which will cause errors during this step. You may need to modify the script | ||
| as follows: Find the line in the file `meson.build` with `'b_debug=if-release'` and change it to `'debug=false'` and try rerunning the setup command. | ||
|
|
||
| You now should have a `build` directory from where you can build the app, this is also where your executable will appear. | ||
|
|
||
| The command `meson compile` will build the default targets, you may omit `-C build` if you run the command from within the `build` directory: | ||
|
|
||
| ```sh | ||
| meson compile -C build | ||
| ``` | ||
|
|
||
| You should now see the resulting executable in `build`: | ||
|
|
||
| ## Usage | ||
|
|
||
| From the help text that's printed with the command `bmpflash -h`: | ||
|
|
||
| ``` | ||
| bmpflash - Black Magic Probe companion utility for SPI Flash provisioning and usage | ||
|
|
||
| Usage: | ||
| bmpflash [options] {action} [actionOptions] | ||
|
|
||
| Options: | ||
| -h, --help Display this help message and exit | ||
| --version Display the program version information and exit | ||
| -v, --verbosity UINT Set the program output verbosity | ||
|
|
||
| Actions: | ||
| info Display information about attached Black Magic Probes | ||
| sfdp Display the SFDP (Serial Flash Discoverable Parameters) information for a Flash chip | ||
| provision Provision a BMP's on-board Flash for use with the auto-programming command in standalone mode | ||
| read Read the contents of a Flash chip into the file specified | ||
| write Write the contents of the file specified into a Flash chip | ||
| ``` | ||
|
|
||
| * `bmpflash info` will give you an overview of what hardware devices the tool can see | ||
| * `bmpflash sfdp -b <ext|int>` (where <ext|int> intends to convey you need to pick one of "ext" or "int" for the external and internal SPI busses) then gives you the Serial Flash Discoverable Parameters (SFDP) data for any chip found on the bus | ||
| * `bmpflash read` and `bmpflash write` then additionally take a file name after which should contain (or will be written with, in the case of read) the raw SPI Flash data you want to poke with | ||
| * `bmpflash provision` is for writing a BMP v2.3+'s internal SPI Flash with provisioning data for the upcoming auto-programming/one-touch-programming support | ||
|
|
||
| ## Hardware connection | ||
|
|
||
| In order to communicate with your SPI flash chip, you will need to connect the bmp to your chip. This diagram provides the proper hookups | ||
|
|
||
| <img src="https://black-magic.org/_images/unified-legend.svg" width="640" /> | ||
|
|
||
| Connect as follows: | ||
| * PICO - the SPI data input of the flash chip | ||
| * POCI - the SPI data output of the flash chip | ||
| * SCLK - the SPI clock input of the flash chip | ||
| * CS - the chip select input of the flash chip | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some further debugging turned up that the option is actually
b_ndebug- so, we'll make a commit changing theb_debugline tob_ndebug=if-releasewhich works and is fine. Till we do that, the advice should be to correct the option name.