You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
I have replicated [https://black-magic.org/_downloads/9268bd95a59bf58b68008004df51c31f/bmpm_v2_1c_schematic.pdf](BMP21 schematics) and tried to download the native firmware into it using segger j-link, but it doesn't work. I tried to debug it using segger j-link from the command line, it seems like stm32f103Cb has entered hard fault handler. I tried to build the source code for the BMP21 (I know it's a legacy board) but all the targets I see in meson build are this:
👋🏼 First off, a point of nomenclature.. what you're wanting to work with are not targets - those, strictly, are the things the firmware supports debugging. You are wanting to build for a specific probe. In your case, native.
Second, without knowing what exactly you tried to load, where, and with what option bytes set.. there's too little information here to be able to help.
You will need to load the project bootloader onto the STM32F103 first, and make sure it enumerates and boots. You can then load the firmware, the firmware does not include the bootloader in the image. You will need to have set the option bytes appropriately for the HW3 platform (v2.1c hardware is hardware ABI version 3) so the firmware can correctly determine what it's running on.
To build the bootloader, you will need to run ninja -C build boot-bin in addition to a normal compilation run which generates you the firmware.
@dragonmux
I am sorry I didn't elaborate on what I am trying to achieve.
I have made the to-be called debugger board for my needs and here is an image of it in the PCB design software:
after I received the board, I soldered all the components onto it and made sure that the MCU USB port is working by writing my own code for it. what I am trying to accomplish now it have the black magic firmware running on it so that I can use this board as a debugger for other boards.
I download the binary file for Stable Release v1.10.2 and tried to download the binary file into my debugger board using a j-link but it wasn't working (doesn't appear under the ports tab in the device manager). I tried older release which is Stable Release V1.6.1 but also, it's not working.
I tried to debug the firmware but it seems like the binary I am trying to download isn't build for stm32f103cb because it seems like it's trapped inside a hardfault handler function.
Everything in our original reply still applies. You still need to provision the bootloader, and option bytes. The firmware on its own is not sufficient for a from-scratch bringup. It's not about the release chosen, the board simply doesn't have the bootloader or option bytes to start with. We would also strongly advise using main (v2.0.0-rc1) and not v1.10.2 but that doesn't change our advise above.
@dragonmux
I am sorry but I am just a noob, I can't find the boot-bin directory, I have seen it mentioned on the official website [https://black-magic.org/knowledge/compiling-windows.html](Compiling on Windows)
I have searched in the downloaded repository and after running the command: meson setup build --cross-file cross-file/native.ini
and another time after running the command: meson compile -C build
I got the binary and executable files for the target but no 'blackmagic_native_bootloader.elf' is found.
It's not a directory, it's a specific target in the Meson build system - hence telling you to use ninja directly instead of meson compile. ninja -C build tells Ninja to operate in the build directory, what comes after that is the name of a build target [Ninja nomenclature, not project].
ninja -C build boot-bin will make you the bootloader .elf and .bin. Again, this is not a directory or source file, it is the name of a build target.
Activity
dragonmux commentedon Jan 8, 2025
👋🏼 First off, a point of nomenclature.. what you're wanting to work with are not targets - those, strictly, are the things the firmware supports debugging. You are wanting to build for a specific probe. In your case,
native.Second, without knowing what exactly you tried to load, where, and with what option bytes set.. there's too little information here to be able to help.
You will need to load the project bootloader onto the STM32F103 first, and make sure it enumerates and boots. You can then load the firmware, the firmware does not include the bootloader in the image. You will need to have set the option bytes appropriately for the HW3 platform (v2.1c hardware is hardware ABI version 3) so the firmware can correctly determine what it's running on.
To build the bootloader, you will need to run
ninja -C build boot-binin addition to a normal compilation run which generates you the firmware.abdosalem490 commentedon Jan 8, 2025
@dragonmux

I am sorry I didn't elaborate on what I am trying to achieve.
I have made the to-be called debugger board for my needs and here is an image of it in the PCB design software:
after I received the board, I soldered all the components onto it and made sure that the MCU USB port is working by writing my own code for it. what I am trying to accomplish now it have the black magic firmware running on it so that I can use this board as a debugger for other boards.
I download the binary file for Stable Release v1.10.2 and tried to download the binary file into my debugger board using a j-link but it wasn't working (doesn't appear under the ports tab in the device manager). I tried older release which is Stable Release V1.6.1 but also, it's not working.
I tried to debug the firmware but it seems like the binary I am trying to download isn't build for stm32f103cb because it seems like it's trapped inside a hardfault handler function.
can you tell what I am doing wrong?
dragonmux commentedon Jan 8, 2025
Everything in our original reply still applies. You still need to provision the bootloader, and option bytes. The firmware on its own is not sufficient for a from-scratch bringup. It's not about the release chosen, the board simply doesn't have the bootloader or option bytes to start with. We would also strongly advise using
main(v2.0.0-rc1) and not v1.10.2 but that doesn't change our advise above.Bootloader first, make sure that enumerates.
abdosalem490 commentedon Jan 8, 2025
@dragonmux
I am sorry but I am just a noob, I can't find the boot-bin directory, I have seen it mentioned on the official website [https://black-magic.org/knowledge/compiling-windows.html](Compiling on Windows)
I have searched in the downloaded repository and after running the command:
meson setup build --cross-file cross-file/native.iniand another time after running the command:
meson compile -C buildI got the binary and executable files for the target but no 'blackmagic_native_bootloader.elf' is found.
dragonmux commentedon Jan 8, 2025
It's not a directory, it's a specific target in the Meson build system - hence telling you to use
ninjadirectly instead ofmeson compile.ninja -C buildtells Ninja to operate in thebuilddirectory, what comes after that is the name of a build target [Ninja nomenclature, not project].ninja -C build boot-binwill make you the bootloader .elf and .bin. Again, this is not a directory or source file, it is the name of a build target.