Skip to content

Instantly share code, notes, and snippets.

@cz172638
cz172638 / riscv_debug_module_v11.md
Created December 14, 2020 13:04 — forked from brabect1/riscv_debug_module_v11.md
Describes implementation of RISC-V Debug Module (primarily as per Debug Spec. v0.11).

RISC-V Debug Module Implementation

This gist discusses implementation of a Debug Module (DM) primarily per RISC-V Debug Specification v0.11. The core ideas, though, apply to Debug Specification v0.13. Information presented here come from various sources, but mostly from Debug Specs, riscv-isa-sim and from reverse engineering e200_opensource. Relevant source of information is also riscv-openocd.

General Discussion

RV Debug Task Group

RISC-V Foundation established a debug task group to propose and standardize mechanisms for external debugging of RISC-V (RV) cores. This effort resulted in drafting a RISC-V External Debug Supprt specification, early [v0.1

reword 0e47d9c asdf
squash 3ac11d1 asdf
pick d36076e Intriguing!
pick 49ebfed Policy.
pick 9d2983b Adding a 404 error page.
pick edfbc9c Adding hackish search index.
pick 48b5273 site map, json search index and addition to header
pick 201827e made help index prettier.
squash bac9c44 I broke it
squash 839a5e1 I broke it still
@cz172638
cz172638 / honda-fit-sport-2013-obd2-notes.md
Created June 28, 2018 16:07 — forked from JamesHagerman/honda-fit-sport-2013-obd2-notes.md
Sniffing OBDII on 2013 Honda Fit Sport

Honda OBDlink SX notes 2015-08-19

My OBDLink SX data:

>AT I
ELM327 v1.3a
>ST DI (HARDWARE ID STRING)
OBDLink SX r4.2
>ST I (FIRMARE ID STRING)
@cz172638
cz172638 / bin2elf.sh
Created November 15, 2017 22:20 — forked from tangrs/bin2elf.sh
Convert a memory dump/raw binary image into an ELF file
#!/bin/sh
# Convert a raw binary image into an ELF file suitable for loading into a disassembler
cat > raw$$.ld <<EOF
SECTIONS
{
EOF
echo " . = $3;" >> raw$$.ld
@cz172638
cz172638 / purge-null
Created June 20, 2017 13:54 — forked from palday/purge-null
A few ways to find and get rid of NULL bites in documents.
tr < file-with-nulls -d '\000' > file-without-nulls
sed 's/\x0//g' file-with-nulls > file-without-nulls
sed 's/\x0/ /g' file-with-nulls > file-without-nulls
grep -P '\000' < file-with-nulls >file-without-nulls
awk '/\000/ { print }'
@cz172638
cz172638 / pushd.py
Created April 6, 2016 13:27 — forked from Tatsh/pushd.py
pushd for Python
from os import chdir, getcwd
from os.path import realpath
class PushdContext:
cwd = None
original_dir = None
def __init__(self, dirname):
self.cwd = realpath(dirname)