Skip to content

Instantly share code, notes, and snippets.

Cache Rules Everything Around Me

Jay Kickliter JayKickliter

Cache Rules Everything Around Me
View GitHub Profile
JayKickliter / .ccls
Created Jul 31, 2020
ccls file for arm cortex-m4 project
View .ccls
JayKickliter /
Created Jun 27, 2020
How I compile Erlang from source on macOS

How I compile Erlang from source on macOS

CFLAGS="-Og -ggdb3 -fno-omit-frame-pointer" \
CXXFLAGS="-Og -ggdb3 -fno-omit-frame-pointer" \
./configure \
      --prefix=$HOME/.local \
      --disable-silent-rules \
      --enable-dynamic-ssl-lib \
      --with-ssl=/usr/local/opt/openssl \
JayKickliter / ASan.cmake
Created May 22, 2020
Defines a custom CMake build type ASan for use with the address santizier
View ASan.cmake
# This file provides a custom build type, `CMAKE_BUILD_TYPE_ASAN`
set(CMAKE_C_FLAGS_ASAN "${CMAKE_C_FLAGS_RELWITHDEBINFO} -fsanitize=address -fno-omit-frame-pointer -fno-common" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fsanitize=address -fno-omit-frame-pointer -fno-common" CACHE STRING "" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASan")
JayKickliter / FindErlang.cmake
Created May 22, 2020
Provides CMake `find_package(Erlang)` using modern cmake
View FindErlang.cmake
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or for details.
Finds Erlang libraries.
Imported Targets
JayKickliter / main.c
Created Feb 27, 2020
Serializing LoRa packets into JSON with parson
View main.c
#include "parson.h"
#include <stdio.h>
"rxpkt": [
"chan": 0,
"codr": "4\/5",
JayKickliter / tickless.c
Created Jan 16, 2020
FreeRTOS tickless idle with STM32 LPTIM
View tickless.c
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include "system_config_lptim.h"
#include "system_config_power.h"
#include "system_config_irq.h"
#include "FreeRTOS.h"
#include "FreeRTOSConfig.h"
JayKickliter /
Last active Nov 22, 2019
Bit accumulator in Rust
use num::{PrimInt, Zero};
struct BitAcc<T: Default, const N: u8> {
acc: T,
n: u8,
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 /
Last active Jan 12, 2019
Compiling TI OpenCL and dependencies from source

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 /
Last active Apr 14, 2020
Parse from hex, decimal, or binary
trait FromHexDecBin: Sized {
type Error;
fn from_hex_dec_bin(s: &str) -> Result<Self, Self::Error>;
macro_rules! impl_from_hex_dec_bin {
($T:tt, $E:ty) => {
impl FromHexDecBin for $T {
type Error = $E;
fn from_hex_dec_bin(s: &str) -> Result<$T, Self::Error> {
You can’t perform that action at this time.