Skip to content

Commit

Permalink
blueTag first release
Browse files Browse the repository at this point in the history
  • Loading branch information
DESKTOP-7VKKLTO\ian committed Feb 3, 2025
1 parent 4bda9a6 commit 4d6714d
Show file tree
Hide file tree
Showing 10 changed files with 3,316 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/jtag/bluetag.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ void bluetag_handler(struct command_result* res) {
// 2. if the help assignment in commands[] struct is 0x00, it can be handled here (or ignored)
// res.help_flag is set by the command line parser if the user enters -h
// we can use the ui_help_show function to display the help text we configured above
if (ui_help_show(res->help_flag, usage, count_of(usage), &options[0], count_of(options))) {
return;
}
//if (ui_help_show(res->help_flag, usage, count_of(usage), &options[0], count_of(options))) {
// return;
//}

// check for verb (jtag, swd, cli)

Expand Down
37 changes: 37 additions & 0 deletions src/lib/bluetag/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# CHANGELOG.md

## 1.0.2 (2024-11-19)

Fixes:

- JTAG scan function underwent a major change, should be more reliable now
- SWD scan time is now optimized, should be much faster than before

Features:
- Updated default available channels from 9 to 16

Others:
- Updated description of the project with an image describing the pinout information

## 1.0.1 (2024-07-31)

Fixes:

- None

Features:
- Updated "jep106.inc" to include recent information (July 2024)

Others:
- Implemented github actions for online compilation
- Added workflow to automatically generate uf2 binary on each release

## 1.0.0 (2021-09-29)

Fixes:

- None

Features:

- Initial release
33 changes: 33 additions & 0 deletions src/lib/bluetag/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Fetch ubuntu image
FROM ubuntu:22.04

# Install prerequisites
RUN \
apt update && \
apt install -y git python3 && \
apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential

# Install Pico SDK
RUN \
mkdir -p /project/src/ && \
cd /project/ && \
git clone https://github.com/raspberrypi/pico-sdk.git --branch master && \
cd pico-sdk/ && \
git submodule update --init && \
cd /

# Set the Pico SDK environment variable
ENV PICO_SDK_PATH=/project/pico-sdk/

# Copy in our source files
COPY src/* /project/src/

# Build project
RUN \
mkdir -p /project/src/build && \
cd /project/src/build && \
cmake .. && \
make

# Command that will be invoked when the container starts
ENTRYPOINT ["/bin/bash"]
21 changes: 21 additions & 0 deletions src/lib/bluetag/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Aodrulez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
40 changes: 40 additions & 0 deletions src/lib/bluetag/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# [ blueTag ]

JTAGulator alternative for RP2040 microcontroller based development boards including RPi Pico. Huge shout-out to Joe Grand for his JTAGulator project!




![](images/BlueTag.png?raw=true "blueTag detecting SWD pinout on STM32 Blue Pill & a Raspberry Pi Pico")


## Pinout
![](images/BlueTagPinout.png?raw=true "blueTag Pinout")


## Installation
- Download latest release version of blueTag ("blueTag-vX.X.X.uf2") from this github repository's release section
- Press & hold 'BOOTSEL' button on a RP2040 microcontroller based development board, connect it to a computer via USB cable & then release the button
- Copy "blueTag-vX.X.X.uf2" file onto the newly detected flash drive (RPI-RP2*) on your computer


## Usage
- Connect the RP2040 microcontroller based development board running blueTag to your computer using USB cable
- Connect the development board's GPIO pins (GPIO0-GPIO15 so 16 channels in all) to your target's test-points
- Connect the development board's "GND" pin to target's "GND"
- Open a terminal emulator program of your choice that supports "Serial" communication (Ex. Teraterm, Putty, Minicom)
- Select "Serial" communication & connect to the development board's newly assigned COM port
- blueTag supports auto-baudrate detection so you should not have to perform any additional settings
- Press any key in the terminal emulator program to start using blueTag

> **_NOTE 1:_** Most RP2040 microcontroller based development board's GPIO pins function at 3.3v. For connecting to devices running other voltage levels, use of external level shifter(s) will be required.
> **_NOTE 2:_** Since the algorithm verifies channels in order (from 0 to 15), connect the channels in sequence (from 0 to 15) to your target's testpads/test points for the quickest execution time.
## References & special thanks

- https://github.com/grandideastudio/jtagulator
- https://research.kudelskisecurity.com/2019/05/16/swd-arms-alternative-to-jtag/
- https://github.com/jbentham/picoreg
- https://github.com/szymonh/SWDscan
- Arm Debug Interface Architecture Specification (debug_interface_v5_2_architecture_specification_IHI0031F.pdf)
Binary file added src/lib/bluetag/images/BlueTag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/bluetag/images/BlueTagPinout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4d6714d

Please sign in to comment.