Skip to content
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

misc: Add bootloader build instructions to README.md #2078

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

9names
Copy link

@9names 9names commented Feb 16, 2025

Detailed description

Add basic instructions on how to build the BMP bootloader to README.md.
The existing documentation tells you how to build probe firmware but assumes you've already got a working bootloader - took me a while to work out how to build this, so I figure it is worth documenting.

Your checklist for this pull request

Closing issues

Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do actually document this on the website in the firmware hacking guide, but having it more readily discoverable here and in such a cleanly described way seems reasonable to us, so LGTM - merging.

Thank you for the contribution!

@dragonmux dragonmux added this to the v2.0 release milestone Feb 16, 2025
@dragonmux dragonmux added Enhancement General project improvement Documentation Project documentation labels Feb 16, 2025
@9names
Copy link
Author

9names commented Mar 1, 2025

I think I skimmed through the hacking guide but missed that section.
If the bootloader commands were in a code block like every other console command on that page, and used meson to invoke the command rather than cd'ing and then invoking ninja directly, maybe it would stand out more?

I can't find a repo for the firmware hacking guide to make a PR for that too, so here's what I suggest for the updated hacking guide text:


To start, we need to create a build directory from a configuration with Meson and then ask Meson to run the build:

meson setup build --cross-file=cross-file/native.ini
meson compile -C build

This will result in the following binary files in the build directory:

blackmagic_native_firmware.elf - ELF binary of the Black Magic debug probe.

blackmagic_native_firmware.bin - Flat binary of the Black Magic debug probe, load at 0x8002000.

If you need the bootloader as well, after running the above build run

meson compile -C build boot-bin

which will compile the bootloader and generate a .bin file for it for use with provisioning tools. This results in two files:

blackmagic_native_bootloader.elf - ELF binary of the Black Magic DFU bootloader.

blackmagic_native_bootloader.bin - Flat binary of the DFU bootloader, load at 0x8000000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Project documentation Enhancement General project improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants