Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am illustris on github.
  • I am illustris (https://keybase.io/illustris) on keybase.
  • I have a public key whose fingerprint is 084B D98E 9A82 A04F B475 851E E905 7543 CFE2 6FB5

To claim this, I am signing this object:

riscv-spike.elf: file format elf64-littleriscv
Disassembly of section .text:
0000000080000000 <boot>:
80000000: 1400006f j 80000140 <_mstart>
0000000080000004 <debugloop>:
illustris@RISCV:~/FreeRTOS/Demo/riscv-spike$ rv 17 && spike -d riscv-spike.elf
'/opt/riscv' -> '/home/illustris/rv17'
: until pc 0 6a4
: reg 0 mepc
0x0000000000004e84
:
core 0: 0x00000000000006a4 (0x10010113) addi sp, sp, 256
:
core 0: 0x00000000000006a8 (0x10000073) sret
: pc 0
core 0: 0x0000000080000000 (0x006f8f93) addi t6, t6, 6
:
core 0: 0x0000000080000004 (0x300f9073) csrw mstatus, t6
: reg 0 mstatus
0x0000000000000002
: reg 0 t6
0x0000000000000006
:
# The name of your project (used to name the compiled .hex file)
TARGET = $(notdir $(CURDIR))
# The teensy version to use, 30, 31, 35, 36, or LC
TEENSY = 36
# Set to 24000000, 48000000, or 96000000 to set CPU core speed
#TEENSY_CORE_SPEED = 48000000
TEENSY_CORE_SPEED = 180000000
#include <FlexCAN.h>
#include <kinetis_flexcan.h>
int led = 13;
// create CAN object
FlexCAN CANReceiver(500000);
static CAN_message_t msg;
void setup() {
// init CAN bus
@illustris
illustris / example.c
Created March 25, 2018 06:30
Example code for efficiently tailing a log file
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/inotify.h>
#include <sys/stat.h>
#include <fcntl.h>
@illustris
illustris / F612W_dosubmit_bypass.js
Created April 6, 2018 05:37
Modified dosubmit function to bypass captcha on ZTE F612W router login page
function dosubmit()
{
if (getObj("Frm_Username").value == "")
{
getObj("errmsg").innerHTML = "Username cannot be empty.";
getObj("myLayer").style.visibility = "visible" ;
return;
}
else
{
@illustris
illustris / manual_bisect.py
Created May 3, 2018 13:14
A short script I wrote to manually bisect a list of commits. Git bisect doesn;t play well with repo or submodules
def binsearch(commits):
if len(commits) == 1:
print commits[0]
else:
print commits[(len(commits)-1)/2]
answer = ""
while answer not in ["y", "n"]:
answer = raw_input("Working? [Y/N] ").lower()
if answer == "n":
binsearch(commits[(len(commits)+1)/2 : ])
#include "libkdump.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
// initialize libkdump
//Configure libkdump
libkdump_config_t config;
//get default config