Skip to content

Instantly share code, notes, and snippets.

Jay Kickliter JayKickliter

Block or report user

Report or block JayKickliter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View interlaced_ntsc.v
module interlaced_ntsc (
input wire clk,
input wire [2:0] pixel_data, // 0 ( black )..5 (bright white)
output wire h_sync_out, // single clock tick indicating pixel_y will incrememt on next clock ( for debugging )
output wire v_sync_out, // single clock tick indicating pixel_y will reset to 0 or 1 on next clock, depending on the field ( for debugging )
output wire [9:0] pixel_y, // which line
output wire [9:0] pixel_x,
output wire pixel_is_visible,
output reg [2:0] ntsc_out
@JayKickliter
JayKickliter / building-ti-opencl-from-source.md
Last active Jan 12, 2019
Compiling TI OpenCL and dependencies from source
View building-ti-opencl-from-source.md

Compiling TI OpenCL and dependencies from source

In the following instructions, keep in mind that I'm using an install prefix of ~/ti as a placeholder while I attempt to bring on OpenCL by hand. That, and some other paths will be replaced with Buildroot-specific install directories later on.

Install host binaries

C66x DSP compiler

@JayKickliter
JayKickliter / hdb.rs
Last active Aug 25, 2018
Parse from hex, decimal, or binary
View hdb.rs
use std::num::ParseIntError;
trait FromHexDecBin: Sized {
type Error;
fn from_hex_dec_bin(&str) -> Result<Self, Self::Error>;
}
macro_rules! impl_from_hex_dec_bin {
($T:tt, $E:ty) => {
impl FromHexDecBin for $T {
@JayKickliter
JayKickliter / main.rs
Last active Jun 19, 2018
Runtime debugging Tock apps
View main.rs
pub unsafe fn reset_handler() {
// Lots of stuff
for (proc_num, proc_) in PROCESSES.as_ref().iter().enumerate() {
match proc_ {
Some(p) => {
load_process_hook(proc_num as u32, p.package_name, p.flash_non_protected_start() as u32)
},
None => (),
}
}
@JayKickliter
JayKickliter / fosphor_cmdline_client_ci16.diff
Created May 14, 2018
fosphor command-line app to read complex i16 samples from stdin
View fosphor_cmdline_client_ci16.diff
diff --git a/lib/fosphor/Makefile b/lib/fosphor/Makefile
index a8fb3bb..07af0e6 100644
--- a/lib/fosphor/Makefile
+++ b/lib/fosphor/Makefile
@@ -1,6 +1,6 @@
UNAME=$(shell uname)
CC=gcc
-CFLAGS=-Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g
+CFLAGS=-Wall -O2 `pkg-config freetype2 glfw3 --cflags` -g
LDLIBS=`pkg-config freetype2 glfw3 --libs` -lm
View MakefileLocation.mk
# $(CURRENT_DIR) contains the location of this makefile
CURRENT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
@JayKickliter
JayKickliter / compdb.mk
Created Feb 28, 2018
Generate 'compile_commands.json' in Makefile
View compdb.mk
%.compdb_entry: %.c
@echo " {" > $@
@echo " \"command\": \"cc $(CFLAGS) $(CPPFLAGS) -c $<\"," >> $@
@echo " \"directory\": \"$(CURDIR)\"," >> $@
@echo " \"file\": \"$<\"" >> $@
@echo " }," >> $@
COMPDB_ENTRIES = $(addsuffix .compdb_entry, $(basename $(SOURCES)))
compile_commands.json: $(COMPDB_ENTRIES)
@JayKickliter
JayKickliter / tock_ffi_example.md
Last active Sep 13, 2017
Generating Tock userland header from rust source
View tock_ffi_example.md

Common rust source for both rust driver and userland code.

use core::intrinsics::transmute;

#[repr(C)]
#[derive(Debug, Clone, Copy)]
pub enum Partnum {
    CC1121,
    CC1120,
View improved tock userland debug symbols
diff --git a/userland/Configuration.mk b/userland/Configuration.mk
index 47e5d9c8..43e41e5c 100644
--- a/userland/Configuration.mk
+++ b/userland/Configuration.mk
@@ -43,7 +43,7 @@ override ASFLAGS += -mthumb
override CFLAGS += -std=gnu11
override CPPFLAGS += \
-frecord-gcc-switches\
- -g\
+ -gdwarf-2\
@JayKickliter
JayKickliter / debugging.md
Last active Oct 23, 2017
Debugging MBed nRF52DK board with GDB
View debugging.md

Debugging nRF52DK MBed applications with GDB

Step 1 (one time only): replace MBed bootloader with JLink bootloader

  1. Power down nRF52DK
  2. Power up nRF52DK while holding down IF BOOT/RESET button
  3. Drag JLink bootloader binary to BOOTLOADER volume
  4. Power-cycle

At this point, the MBed bootloader has been replaced with JLink's.

You can’t perform that action at this time.