Skip to content

Instantly share code, notes, and snippets.

View jeremyherbert's full-sized avatar
🦆
🪿

Jeremy Herbert jeremyherbert

🦆
🪿
View GitHub Profile
Tue Nov 2 04:55:00 2021 kern.info kernel: [ 0.000000] Initmem setup node 0 [mem 0x00000000-0x07ffffff]
Tue Nov 2 04:55:00 2021 kern.debug kernel: [ 0.000000] On node 0 totalpages: 32768
Tue Nov 2 04:55:00 2021 kern.debug kernel: [ 0.000000] free_area_init_node: node 0, pgdat 8032a160, node_mem_map 81000000
Tue Nov 2 04:55:00 2021 kern.debug kernel: [ 0.000000] Normal zone: 256 pages used for memmap
Tue Nov 2 04:55:00 2021 kern.debug kernel: [ 0.000000] Normal zone: 0 pages reserved
Tue Nov 2 04:55:00 2021 kern.debug kernel: [ 0.000000] Normal zone: 32768 pages, LIFO batch:7
Tue Nov 2 04:55:00 2021 kern.warn kernel: [ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Tue Nov 2 04:55:00 2021 kern.warn kernel: [ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
Tue Nov 2 04:55:00 2021 kern.debug kernel: [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
Tue Nov 2 04:55:00 2021 kern.debug kernel: [ 0.000000] p
PORTB |= (1 << 2); // set pin 2
PORTB &= ~(1 << 2); // clear pin 2
@jeremyherbert
jeremyherbert / main.c
Last active May 6, 2020 07:50
Zephyr BLE test
#include <zephyr.h>
#include <device.h>
#include <drivers/gpio.h>
#include <bluetooth/bluetooth.h>
#define LED_PORT DT_ALIAS_LED0_GPIOS_CONTROLLER
#define LED DT_ALIAS_LED0_GPIOS_PIN
@jeremyherbert
jeremyherbert / f360_python_debug_runner.py
Created March 16, 2020 02:04
fusion360 addin to run python scripts from json
import adsk.core
import adsk.fusion
import importlib
import inspect
import traceback
import os
import sys
import gettext
import types
import tempfile
USBD: event SUSPEND
USBD: event RESUME
USBD: event SETUP_RECEIVED
Get Status
process_control_request 620: assert failed
Stall EP0
USBD: event BUS_RESET
USBD: event SETUP_RECEIVED
Set Address
USBD: event XFER_COMPLETE
@jeremyherbert
jeremyherbert / main.c
Last active December 12, 2019 03:32
tinyusb example cdc_msc for STM32F042F6P6 with crystal-less oscillator
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@jeremyherbert
jeremyherbert / gist:a57d667b3162f9e2e85d4e3f53675e2b
Created December 11, 2019 05:27
working conda list for pyside2 windows install
# packages in environment at C:\Users\jeremy\Anaconda3\envs\testenvqt:
#
# Name Version Build Channel
ca-certificates 2019.11.28 hecc5488_0 conda-forge
certifi 2019.11.28 py37_0 conda-forge
clang 9.0.0 default_hf44288c_4 conda-forge
clang-tools 9.0.0 default_hf44288c_4 conda-forge
clangdev 9.0.0 default_hf44288c_4 conda-forge
clangxx 9.0.0 default_h6bfbf51_4 conda-forge
icu 64.2 he025d50_1 conda-forge
@jeremyherbert
jeremyherbert / gist:d6ec7f2624b038289db0f16002428c92
Created December 11, 2019 05:18
conda list for windows 10 x64
# packages in environment at C:\Users\jeremy\Anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py37_0
alabaster 0.7.12 py37_0
anaconda 2019.10 py37_0
anaconda-client 1.7.2 py37_0
anaconda-navigator 1.9.7 py37_0
anaconda-project 0.8.3 py_0
asn1crypto 1.0.1 py37_0
achi pro sc default setup:
Sensor break power -> 0.0
Cycle time 2 (output 2 - cool) -> 10.0
Cycle time 1 (output 1 - heat) -> 3.0
Deviation alarm setpoint -> 1.00
High alarm setpoint -> 300.
Holdback -> 0.
Heat (output 1) output limit -> 100.0
Setpoint high limit -> 260.
@jeremyherbert
jeremyherbert / gist:84c10a4af766c4d6c9a5
Created January 11, 2015 20:10
Make run for cocotb
$ make
make -k -C examples
make[1]: Entering directory `/home/jeremy/cocotb/examples'
make[2]: Entering directory `/home/jeremy/cocotb/examples/plusargs'
make results.xml
make[3]: Entering directory `/home/jeremy/cocotb/examples/plusargs'
mkdir -p sim_build
iverilog -o sim_build/sim.vvp -D COCOTB_SIM=1 /home/jeremy/cocotb/examples/plusargs/tb_top.v
mkdir -p /home/jeremy/cocotb/build/obj/x86_64
mkdir -p /home/jeremy/cocotb/build/libs/x86_64