Welcome to the Serial Wire Debug Open Library!
This is an official website of the LibSWD, an Open solution for accessing the SW-DP (Serial Wire Debug Port) on ARM Cortex CPU based embedded systems. Library is available under "new" 3 clause BSD License. This project was started by Tomek Cedro to create and document Free and Open-Source SWD (Serial Wire Debug) access to new ARM-Cortex CPU cores. SWD is an alternative to JTAG method for accessing the DAP that allows low-level access to system resources such as system bus, memory, IO, even single stepping the code execution - a must-have for an embedded systems developer.
SWD works on both simple and advanced devices from the ARM Cortex family. By default Cortex CPU or FPGA'a IP Core is both JTAG and SWD capable, so the common name for this transport method is SWJ (Serial Wire and JTAG). It is the application requirement and designer choice if a final product supports JTAG, SWD, or both (SWJ). Here you can read short and interesting article on how SWD overcomes JTAG limitations.
LibSWD can be considered almost standalone to be easily integrated into third party software with minimal impact on existing program structure. LibSWD implements all utilities necessary to generate bit stream and queue bus operations on both high (operation) and low (bit) abstraction level. High level functions can be called from external application to generate queue that represent bus operations or simply produce a bitstream that can be later flushed into real hardware with simple set of functions (these functions can utilise existing cable drivers already implemented in external software).
The first approach and practical tests were performed on simple STM32Primer development kits using UrJTAG and OpenOCD utilities as described on the http://stm32primer2swd.sf.net project webstie. Some parts of this research were conducted as a cooperation between Orange Labs Warsaw and Orange Labs Paris, and some additionally by Cybernetic Research Student Group from Warsaw University of Technology in Poland that I am founder and member.
Releases
2011-11-11: libswd-0.3.tar.gz / libswd-0.3.pdf
2011-10-31: libswd-0.2.tar.gz / libswd-0.2.pdf
2011-04-02: libswd-0.1.tar.gz / libswd-0.1.pdf
Source Code Repository
Source code now use GIT for remote development and code repository, SVN is only used to store doxygen documentation. You can browse SVN, GIT, or checkout files to your local machine with command:
git clone git://libswd.git.sourceforge.net/gitroot/libswd/libswd
Documentation
LibSWD is documented using Doxygen. Documentation body is included within the source code and then generated with doxygen utility to obtain html/pdf output files (run make doxygen-doc command), therefore documentation sources and its result is integral part of the source code repository. All necessary documents are frozen upon release and delivered within the package to match code version (see Releases section). Meanwhile you can browse work-in-progress documentation:
- Download PDF manual (SVN version)
- Browse HTML manual (SVN version)
Practical part of this project is documented at: http://stm32primer2swd.sf.net/
References
- http://stm32primer2swd.sf.net - a practical implementation and verification of LibSWD on ARM-Cortex devices (using Stm32Primer2 and KT-LINK).
- ARM Document on SWD - Low Pin-Count Debug Interfaces for Multi-device Systems - short but good introduction, recommended lecure!
- STM32F103VE - ST website dedicated to the CPU used in Stm32Primer2, full documentation and examples.
- OpenOCD - Open-Source utility to (re)program target's memory and code debug.
- UrJTAG - Open-Source utility to perform low-level TAP operations on various hardware targets.
- ARM SWD Website - Official ARM website with SWD description.
- STM32 SWD Website - Official STM32 with SWD description.
- ARM Info Center - every information you need to get about ARM product is there (including CoreSight? on-chip trace and debug).
News
2011-11-11
- LibSWD 0.3 comes out, a major bugfix release:
- Fixed critical issue with ACK/DATA bitswap due erratic ARM documentation.
- Fixes and improvements in libswd.h.
- Debug hint function in Request packet decoposition (libswd_drv).
- Fixed OpenOCD drivers.
- Introduced SWD_LOGLEVEL_PAYLOAD even more verbose than debug.
- All transfers are now LSB-First.
- Major bugfixes.
2011-11-1
- Code repository now use only a GIT system. SVN only stores doxygen documentation in trunk for easier web browsing, including documentation and code for releases. Synchronization between svn and git is a mess, we don't need that, git is far better for code development :-)
2011-10-31
- LibSWD 0.2 release:
- Source code reorganization (split into different files).
- Build system fixes and documentation updates.
- Integration with OpenOCD.
- Bugfixes and improvements.
- Created function set for easier work on DAP.
- Error detection in swd_drv_transmit() - cmdq is truncated on error.
2011-04-02
- LibSWD initial version 0.1 released to the public.
- Basic functionality of transport, queue and drivers for ADIv5.0.
- Automated SW-DP activation/reset and IDCODE read.
- Tested and verified functionality on UrJTAG.
- Source code documented using Doxygen.
- Autotools integration for standarized build.
2011-03-23
- Integration with UrJTAG complete. Source code sent to developers.
- Functionality verification complete. Updated work in progress description at http://stm32primer2swd.sf.net/
- Started integration with OpenOCD...
2011-02-09
- Remote source code repository (SVN) started.
2010-12-29
- Official LibSWD project website launched at http://libswd.sf.net
2010-11-23
- Decision to implement SWD API as standalone library.
2010-10-21
- Work to create open swd implementation has begun.
- Website with progress log launched at http://stm32primer2swd.sourceforge.net/.
Support
Please use SourceForge Support Goodies or Trac Ticket System for support.
Attachments
- orangelabs-logo.png (51.0 KB) - added by cederom 14 months ago.
