Skip to content

Instantly share code, notes, and snippets.

View corecode's full-sized avatar

Simon Schubert corecode

View GitHub Profile
#mw-panel {
position: absolute !important;
left: -9.5em !important;
background: white !important;
border: solid #ddd 1px !important;
}
#mw-panel:hover {
left: 0em !important;
}
I: h=h1+h2+d;
II: b=b1+b2+b3+b4;
III: b4=d/w;
IV: h2=a*b2/t;
V: b1/cp=2*h1/b2;
VI: b3=2*h1/w;
VII: t^2=b2^2+4*h1^2;
VIII: cp+d=c;
/* this dies */
I: h = a*sin(gamma) + d + hp;
II: b1/cp = hp/b2;
III: hp^2+b2^2=t^2;
IV: tan(beta) = hp/b3;
V: tan(beta) = d/b4;
(%i2) I:h = hp+d+a*sin(gamma)
(%o2) h = a sin(gamma) + hp + d
(%i3) II:b1/cp = hp/b2
b1 hp
(%o3) -- = --
cp b2
(%i4) III:b2^2+hp^2 = t^2
2 2 2
(%o4) hp + b2 = t
(%i5) IV:tan(beta) = hp/b3
define i32 @foo(i32 %a, i32 %b) {
%a1 = alloca i32
store i32 %a, i32* %a1
%b2 = alloca i32
store i32 %b, i32* %b2
%1 = load i32* %a1
%2 = load i32* %b2
%3 = add i32 %1, %2
%c3 = alloca i32
store i32 %3, i32* %c3
/usr/bin/../lib/gcc/arm-none-eabi/4.9.3/collect2 -plugin /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/liblto_plugin.so -p
lugin-opt=/usr/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccH8T8c8.res -plugin-opt=
-pass-through=-lgcc -plugin-opt=-pass-through=-lplatform -plugin-opt=-pass-through=-lg -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lplatform -plugin-opt=-pass-
through=-lnosys --sysroot=/usr/bin/../arm-none-eabi -X -o master.elf /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7e-m
/fpu/crti.o /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7e-m/fpu/crtbegin.o /usr/bin/../lib/gcc/arm-none-eabi/4.9.3/.
./../../../arm-none-eabi/lib/armv7e-m/fpu/crt0.o -L../platform/wunderbar -L/usr/bin/../lib/gcc/arm-none-eabi/4.9.3/ar
mv7e-m/fpu -L/usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu -L/usr/bin/../arm-non
e-eabi/lib/armv7e-m/fpu -L/usr/bin/../lib/gcc/arm-none-eabi/4.9.3 -L/usr/bin/../
@corecode
corecode / bar.c
Last active August 29, 2015 14:15
extern int __attribute__((section(".data.foo"))) x;
int __attribute__((section(".text.foo"))) foo(int);
int __attribute__((section(".text.bar"), noinline)) bar(int y) {
return foo(x + y);
}
extern "C" void _start(void) {
volatile int i;
volatile int v = bar(i);
arm-none-eabi-gcc -DSHORT_ISR -fplan9-extensions -ggdb3 -ffunction-sections -fdata-sections -Os -Wall -Wno-main -Wsha
dow -mcpu=cortex-m0 -msoft-float -mthumb -ffunction-sections -fdata-sections -fno-builtin -fstrict-volatile-bitfields
-flto -fno-use-linker-plugin -std=gnu11 -I/home/corecode/devel/electronics/mchck/mchck/src/board/simple-swd-adapter
-I/home/corecode/devel/electronics/mchck/mchck/src/soc/kinetis/MKL26Z4 -I/home/corecode/devel/electronics/mchck/mchck
/src/soc/kinetis -I/home/corecode/devel/electronics/mchck/mchck/src/soc/cortex-m -I/home/corecode/devel/electronics/m
chck/mchck/src/include -I/home/corecode/devel/electronics/mchck/mchck/src -c -o main-kinetis.o main-kinetis.c
/home/corecode/devel/electronics/mchck/mchck/build/scripts/linkdep -o main-kinetis.linkdep main-kinetis.o