Skip to content

Instantly share code, notes, and snippets.

View morganrallen's full-sized avatar

Morgan 'ARR!' Allen morganrallen

  • Allen Industries
  • Oakland
View GitHub Profile
@morganrallen
morganrallen / broke.css
Created December 6, 2014 08:11
where's it braked?
#dbg-mq {
color: white;
height: 10px;
position: absolute;
right: 10px;
top: 10px;
width: 10px;
z-index: 1000000;
}
#dbg-mq div {
@morganrallen
morganrallen / breakout.br
Last active August 29, 2015 14:11
breakout
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="6.5.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.01" unitdist="mm" unit="mm" style="lines" multiple="1" display="yes" altdistance="0.025" altunitdist="inch" altunit="inch"/>
<layers>
@morganrallen
morganrallen / gist:0cd98599cc0f3560bc9f
Created December 26, 2014 23:50
ESP8266 bootloader GPIO2 output
ets Jan 8 2013,rst cause:1, boot mode:(3,7)
load 0x40100000, len 24404, room 16
tail 4
chksum 0x5f
load 0x3ffe8000, len 3428, room 4
tail 0
chksum 0x85
load 0x3ffe8d70, len 6624, room 8
tail 8
@morganrallen
morganrallen / gist:6678b11474574e975096
Created January 8, 2015 22:00
runtimejs build error
deps/libcxx/include/type_traits: In substitution of 'template<class _Tp, class ... _Args> typename std::__1::__select_2nd<decltype (std::__1::move((_Tp)((declval<_Args>)()...))), std::__1::integral_constant<bool, true> >::type std::__1::__is_constructible_test(_Tp&&, _Args&& ...) [with _Tp = v8::UniquePersistent<v8::Value>; _Args = {v8::UniquePersistent<v8::Value>&}]':
deps/libcxx/include/type_traits:2066:8: required from 'struct std::__1::__libcpp_is_constructible<false, v8::UniquePersistent<v8::Value>, v8::UniquePersistent<v8::Value>&>'
deps/libcxx/include/type_traits:2117:8: required from 'struct std::__1::__is_constructible_void_check<false, v8::UniquePersistent<v8::Value>, v8::UniquePersistent<v8::Value>&>'
deps/libcxx/include/type_traits:2143:30: required from 'struct std::__1::is_constructible<v8::UniquePersistent<v8::Value>, v8::UniquePersistent<v8::Value>&>'
deps/libcxx/include/type_traits:2358:30: required from 'struct std::__1::is_copy_constructible<v8::UniquePersistent<v8::Value> >'
deps/l
var fs = require("fs");
var ws = fs.createWriteStream("0xbfc40000-0xbffffff0-scaled.log");
var rs = fs.createReadStream("0xbfc40000-0xbffffff0.log");
var line = 0;
function tohex(n) {
var out = n.toString(16);
return out;
@morganrallen
morganrallen / bin1.diff
Created September 22, 2015 21:50
Dumps and diff of rom1 slot before and after OTA
371,380c371,380
< 0001720: a032 1306 c5ec ff3d 0c4d 0192 0100 1cc5 .2.....=.M......
< 0001730: 1099 a029 5928 81c5 efff c8a1 d8b1 0891 ...)Y(..........
< 0001740: 12c1 300d f000 0000 21fd fa12 c1d0 c981 ..0.....!.......
< 0001750: d991 e9a1 2802 0971 e832 2812 3d0e 0160 ....(..q.2(.=..`
< 0001760: fac0 0000 d2c2 fc22 a370 0107 fbc0 0000 .......".p......
< 0001770: 3d01 cd02 1cc4 3b2d 202e 8201 04fb c000 =.....;- .......
< 0001780: 0042 a370 2201 000c 1320 2393 2241 003d .B.p".... #."A.=
< 0001790: 0c2a 2d1b 2220 2e82 01fd fac0 0000 0871 .*-." .........q
< 00017a0: d891 2d0c e8a1 c881 12c1 300d f000 0000 ..-.......0.....
/home/morgan/devel/ESP8266/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: build/rom0.elf section `.text' will not fit in region `iram1_0_seg'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(mallocr.o):(.literal+0x10): undefined reference to `_sbrk_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(mallocr.o): In function `_malloc_r':
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdlib/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdlib/mallocr.c:2152: undefined reference to `_sbrk_r'
C:\build\build\RC-2010.1\lxinnovation\delivery\lx106\104196\xbuild\Target-libs\newlib\xtensa-elf\newlib\libc\stdlib/\build\tree\RC-2010.1_kuma\p4root\Xtensa\Target-libs\newlib\newlib\libc\stdlib/mallocr.c:2189: undefined reference to `_sbrk_r'
/home/morgan/devel/ESP8266/esp_iot_sdk_v1.4.0//lib/libc.a(freer.o): In function `_malloc_trim_r':
C:\build\build\RC-2010.1
@morganrallen
morganrallen / esp32.md
Last active January 6, 2022 13:57
ESP32 hacking notes

Basic hookup

As I plan to make a custom breakout board I wanted to solder as few connections as possible. I was able to boot the device, with UART (out at least) soldering the following.

PIN NAME
0 GND
1 3V3
2 EN
@morganrallen
morganrallen / package.json
Created January 22, 2016 17:40
Abusing tape reporting stream to provide post-test cleanup
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "tape test*.js"
},
"author": "",
"license": "ISC"
@morganrallen
morganrallen / esp8266-function-pointer-failure.c
Created February 9, 2016 02:55
Minimal example showing the address of a function pointer being incorrect after a system callback
#include <c_types.h>
#include <osapi.h>
#include <user_interface.h>
#include <espconn.h>
#include <mem.h>
#include <gpio.h>
typedef int (* oGetValueCB)();
typedef void (* oSetValueCB)(int, int);