An example of writing pure c on the teensy 3.1.
You will need the C compiler, linker and objcopy from the arm-none-eabi toolkit:
- arm-none-eabi-gcc
- arm-none-eabi-ld
- arm-none-eabi-objcopy
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0043", GROUP="users", MODE="0666" | |
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0001", GROUP="users", MODE="0666" | |
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="users", MODE="0666" | |
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="ee18", GROUP="users", MODE="0666" |
import unittest | |
from a1 import * | |
class TestA1Functions(unittest.TestCase): | |
def test_seconds_difference(self): | |
self.assertEqual(seconds_difference(1800.0, 3600.0), 1800.0) | |
self.assertEqual(seconds_difference(3600.0, 1800.0), -1800.0) | |
self.assertEqual(seconds_difference(1800.0, 2160.0), 360.0) | |
self.assertEqual(seconds_difference(1800.0, 1800.0), 0.0) |
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/home/james/sketchbook/libraries/Blink /tmp/build4026121571324884541.tmp/sketch_sep05a.cpp -o /tmp/build4026121571324884541.tmp/sketch_sep05a.cpp.o | |
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/home/james/sketchbook/libraries/Blink -I/home/james/sketchbook/libraries/Blink/utility /home/james/sketchbook/libraries/Blink/Blink.cpp -o /tmp/build4026121571324884541.tmp/Blink/Blink.cpp.o | |
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -c -g -O |
<ActionMaps version="1"> | |
<CustomisationUIHeader label="decopled" description="" image=""> | |
<devices> | |
<keyboard instance="1"/> | |
</devices> | |
</CustomisationUIHeader> | |
<options type="keyboard" instance="1"/> | |
<actionmap name="spaceship_movement"> | |
<action name="v_decoupled_strafe_up"> | |
<rebind defaultInput="r" device="keyboard" input="w"/> |
-- Basic Settings | |
-- cl_fov = 90 | |
-- pl_movement.power_sprint_targetFov = 90 | |
-- r_DrawNearFoV = 90 | |
Con_Restricted = 0 | |
r_Fullscreen = 0 | |
r_FullscreenPreemption = 1 | |
r_FullscreenWindow = 1 | |
-- Anti-Aliasing |
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
function required() { | |
hash "${1}" 2>/dev/null || { echo >&2 "${1} is required but is not installed. Aborting."; exit 1; } | |
} | |
required wget | |
required unzip |
*.swp | |
*.elf | |
*.hex | |
*.o |
*.swp | |
*.elf | |
*.hex | |
*.o |
#![feature(lang_items,no_std,core_intrinsics,asm,start)] | |
#![no_std] | |
#![crate_type="staticlib"] | |
use core::intrinsics::{volatile_store}; | |
#[lang="stack_exhausted"] extern fn stack_exhausted() {} | |
#[lang="eh_personality"] extern fn eh_personality() {} | |
#[lang="panic_fmt"] | |
#[no_mangle] |