jtag
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
jtag [2017/04/25 14:04] – [ST-LINK V2 aluminium] kingkevin | jtag [2018/01/06 12:08] – [Altera USB-Blaster] add clones kingkevin | ||
---|---|---|---|
Line 68: | Line 68: | ||
It comes in the same box, with the same cables, the enclosure is the same, even the board name has been taken over (MB936), but the board isn't the same. | It comes in the same box, with the same cables, the enclosure is the same, even the board name has been taken over (MB936), but the board isn't the same. | ||
The BOM doesn' | The BOM doesn' | ||
- | The original adapter | + | The original adapter |
This is completely missing on the clone since the connector pins are directly connected to the micro-controller. | This is completely missing on the clone since the connector pins are directly connected to the micro-controller. | ||
Thus it only supports target signal levels of 3.3V and sometimes 5V since the pins are 5V tolerant. | Thus it only supports target signal levels of 3.3V and sometimes 5V since the pins are 5V tolerant. | ||
Line 130: | Line 130: | ||
The [[http:// | The [[http:// | ||
- | The seem to use the same board also for several other programmers, | + | They seem to use the same board also for several other programmers, |
{{: | {{: | ||
{{: | {{: | ||
- | I've also reversed the board layout to get the {{:jtag:baite_schematic.pdf|schematic}}. | + | I've also reversed the board layout to get the {{:jtag:baite.pdf|schematic}}. |
The connector pins are all protected with 220 ohms resistors. | The connector pins are all protected with 220 ohms resistors. | ||
Line 141: | Line 141: | ||
{{: | {{: | ||
- | There is a newer version marked as " | + | There is a newer version marked as " |
* all pads for the micro-controller are present (there is even solder mask between them) | * all pads for the micro-controller are present (there is even solder mask between them) | ||
* they added a SWD port | * they added a SWD port | ||
Line 159: | Line 159: | ||
* the ARM Cortex SWJ connector uses a small header (not very dupont-wire friendly) | * the ARM Cortex SWJ connector uses a small header (not very dupont-wire friendly) | ||
* the separate UART is not always populated (UART is also available on the SWJ connector) | * the separate UART is not always populated (UART is also available on the SWJ connector) | ||
- | * it is quite expensive (> $50) | + | * it is expensive (> $50), but this price is quite reasonable since it supports the project |
- | * it is always | + | * it was sold out for quite some time, encouraging me to look for an alternative |
- | But because | + | Because |
It has been [[https:// | It has been [[https:// | ||
It has also been [[http:// | It has also been [[http:// | ||
Line 168: | Line 168: | ||
This has less power pins (who needs 2xGND, 2x5V, 3x3.3V anyway), but provides enough function pins to add UART (and SRST). | This has less power pins (who needs 2xGND, 2x5V, 3x3.3V anyway), but provides enough function pins to add UART (and SRST). | ||
- | To build the firmware ([[https://sourceforge.net/p/blackmagicdebug/mailman/ | + | To build the firmware ([[https://github.com/blacksphere/blackmagic/pull/274|patch]] integration pending): |
<code bash> | <code bash> | ||
- | git clone https:// | + | git clone https:// |
cd blackmagic | cd blackmagic | ||
git submodule init | git submodule init | ||
git submodule update | git submodule update | ||
- | wget -O 0001-add-new-platform-Baite-ST-Link-V2-clone.patch " | + | git checkout baite-platform |
- | patch -p1 < 0001-add-new-platform-Baite-ST-Link-V2-clone.patch | + | # if you are usgin GCC >= 7 |
+ | git cherry-pick 2ebcffa2a4911090b43c36594dae6b58d4bb2f27 | ||
make | make | ||
cd src | cd src | ||
Line 182: | Line 183: | ||
</ | </ | ||
- | First we need to re-program | + | Now we need to re-flash the Baite dongle.\\ |
- | As you can see on the {{:jtag:baite_schematic.pdf|schematic}} the JTAG and SWD pins of the micro-controller are not connected (there even are no pads on the board for the pins to be soldered on). | + | As you can see on the {{:jtag:baite.pdf|schematic}} the JTAG and SWD pins of the micro-controller are not connected (there even are no pads on the board for the pins to be soldered on). |
But on the back of the board you can find test points so to program the device using the serial bootloader: | But on the back of the board you can find test points so to program the device using the serial bootloader: | ||
Line 198: | Line 199: | ||
To start the serial bootloader when powering the dongle you need to set BOOT0 high by connecting it to +3.3V or DTR (or any high signal present on the USB to UART converter). | To start the serial bootloader when powering the dongle you need to set BOOT0 high by connecting it to +3.3V or DTR (or any high signal present on the USB to UART converter). | ||
- | To flash the Black Magic DFU bootloader | + | To flash the Black Magic firmware |
Since the flash is read/write protected you first need to clear these option bits. | Since the flash is read/write protected you first need to clear these option bits. | ||
Line 208: | Line 209: | ||
# erase flash | # erase flash | ||
stm32flash -o / | stm32flash -o / | ||
- | # flash DFU bootloader | + | # flash the DFU bootloader |
- | stm32flash -w blackmagic/src/ | + | stm32flash -w src/ |
+ | # flash the main firmware | ||
+ | stm32flash -w src/ | ||
</ | </ | ||
- | Unplug and re-plug the Baite dongle and you should see the device in DFU bootlader mode. | + | Since this adapter is based on an STM32F103C8 micro-controller with 64 kB of flash the DFU bootloader only advertises 56 kB of flash available for the main application. |
- | Flash the main application firmware | + | Because the blackmagic |
- | <code bash> | + | STM32F103C8 micro-controllers often have 128 kB of flash though, thus it is still possible to flash the blackmagic |
- | dfu-util -d 1d50:6017 -s 0x08002000: | + | Verification during flashing ensured the whole firmware has been written successfully. |
- | </ | + | |
Unplug and re-plug the Baite dongle. | Unplug and re-plug the Baite dongle. | ||
The adapter should be running the main application and two USB CDC ACM ports will appear. | The adapter should be running the main application and two USB CDC ACM ports will appear. | ||
- | You can re-flash the device from the main application using dfu-util: | + | You can re-flash the device from the main application using dfu-util |
<code bash> | <code bash> | ||
dfu-util -d 1d50:6018 -s 0x08002000: | dfu-util -d 1d50:6018 -s 0x08002000: | ||
</ | </ | ||
- | |||
- | or short RX to ground (pin 5 and 7) to force the DFU bootloader start when plugin in the dongle (in case the main application is buggy). | ||
Here is the new "BMP Baite" {{ : | Here is the new "BMP Baite" {{ : | ||
Line 243: | Line 243: | ||
</ | </ | ||
===== Altera USB-Blaster ===== | ===== Altera USB-Blaster ===== | ||
+ | |||
+ | {{ : | ||
The [[https:// | The [[https:// | ||
It is often used to flash FPGA, but is a general purpose JTAG adapter. | It is often used to flash FPGA, but is a general purpose JTAG adapter. | ||
- | |||
- | I have a cheap [[http:// | ||
- | The original uses FTDI FT245 and MAX CPLD chips. | ||
- | This one uses a Silicon Labs C8051F321 micro-controller and a 74LVC125 quad buffer, but there are many other clone variants. | ||
- | |||
- | {{: | ||
- | {{: | ||
- | {{: | ||
- | {{: | ||
:!: be aware that here the VCC{TARGET} pin has to be connected to a reference voltage used for the JTAG communication, | :!: be aware that here the VCC{TARGET} pin has to be connected to a reference voltage used for the JTAG communication, | ||
Line 332: | Line 325: | ||
</ | </ | ||
+ | The original uses FTDI FT245 and MAX CPLD chips. | ||
+ | There are numerous clone variants, with various quality and voltage support. | ||
+ | |||
+ | ==== SiLabs USB-Blaster ==== | ||
+ | |||
+ | This one uses a Silicon Labs C8051F321 micro-controller and a 74LVC125 quad buffer (for signal voltages from 1.65 to 3.6 V). | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | ==== PIC USB-Blaster ==== | ||
+ | |||
+ | This one uses a Microchip PIC18F14 micro-controller and has no buffer (thus only supporting 5 V signals). | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | ==== ARMJISHU USB-Blaster ==== | ||
+ | |||
+ | This one uses a ST STM32F101 (as a STM32F103 with USB support) micro-controller and a 74HC244 octal-buffer (for signal voltages from 2.0 to 6.0 V). | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | I also reversed the {{: | ||
+ | It shows that the hardware can also drive the signals (at 3.3 V) in case Vcc_target is not connected, and you can add an uSD card slot or SPI flash. | ||
+ | I don't know if these features are supported in software. | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
===== SEGGER J-Link ===== | ===== SEGGER J-Link ===== | ||
jtag.txt · Last modified: 2024/01/07 17:49 by 127.0.0.1