Skip to main content

arduino-coldfire-bdm

An interface to Motorola® Coldfire processors' Background Debug Interface (BDM) using an Arduino.

pip install arduino-coldfire-bdm

What?

A long long time ago (the mid-1990s), Motorola created a series of CPUs derived from the 68k architecture, called the Coldfire. These processors are largely obsolete today, but are still found in certain industrial equipment and embedded devices released around that time; including some vintage synthesizers, like the Alesis A6 Andromeda.

This repository contains two things:

  • an Arduino sketch, which allows connecting pretty much any Arduino to a Coldfire processor's Background Debug Mode (BDM) port to send and receive data
  • a Python library to connect to an Arduino over USB serial, to allow running high-level debugging commands, like:
    • tracing execution (i.e.: like GDB or LLDB)
    • dumping the contents of memory to a file
    • erasing and re-flashing an attached flash memory chip
    • testing attached RAM chips
    • whatever else you want; it's Python! You can script it.

This library, when paired with an Arduino, performs many of the same functions as PEMicro's Multilink debugging probes. This library is free, runs wherever you can run an Arduino and Python code (rather than just on Windows), and requires no drivers. However, this library is way slower, is missing a ton of functions, and has no IDE support.

Why?

I bought a broken Alesis A6 Andromeda, and wanted to try fixing it by re-flashing its firmware without doing any soldering, because I'm bad at soldering. Read about that journey on my blog.

How?

I read the MCF5307 data sheet (484 pages) very carefully. It documents how to connect to a Coldfire BDM port from first principles.

See the top of arduino-coldfire-bdm.ino to figure out which pins to connect between the Arduino and your Coldfire's debug port.

Can I use this for other things?

Probably. There are certain assumptions made (especially around interfacing with Flash or RAM) that apply only to the Andromeda, and may not be useful for other devices. Pull requests to make this code more generic would be welcomed.

What if I brick my device?

Here's the license; I take no responsibility if this software is misused. You should probably read the software carefully first.

Also; I tested this with a 5V Arduino on a 3.3V Coldfire CPU. It seemed to work just fine. That might fry your device; your mileage may vary.

Copyright (c) 2022 Peter Sobot

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.

Metadata

Release files for arduino-coldfire-bdm 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arduino-coldfire-bdm 0.1.0
File Size Uploaded
arduino_coldfire_bdm-0.1.0.tar.gz 15.9 kB Details

Release files / arduino_coldfire_bdm-0.1.0.tar.gz

Download URL arduino_coldfire_bdm-0.1.0.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
95fa4578206d9417f55ac190bf4084a82631e8bae9d51e8d11bb7cacb34bc9eb
BLAKE2b-256 checksum
How to use checksums
fd76702f5ade15a295b77a310e56bec1297b21ae221deb7f30b0bc0927a8f5ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page