Skip to content

Instantly share code, notes, and snippets.

View jonahgraham's full-sized avatar
💭
Away until 25 March

Jonah Graham jonahgraham

💭
Away until 25 March
View GitHub Profile
@jonahgraham
jonahgraham / autosave.py
Last active February 22, 2016 16:44 — forked from tracymiranda/autosave.py
This script runs with Eclipse EASE Jython engine.It autosaves the current editor every 30 seconds or when the editor is deactivated.
# Before running this script you will need to turn on the 'Allow Scripts to run code in UI thread'
# setting by checking the box under Window>Preferences>Scripting.
# To run you can right click on the file and select Run As>EASE Script.
# A save message is printed out in the Console view every time an editor is saved.
# To turn off the autosave just stop the script for example, by pressing the
# 'Terminate' red square button in the Eclipse Console view.
import time
loadModule("/System/Platform")
loadModule("/System/UI")
@jonahgraham
jonahgraham / ECF-2016-CDT-demo.md
Created October 22, 2016 08:40
EclipseCon France 2016 CDT Demo

Setup and Build Project

  1. Start in C Perspective
  2. Build Automatically Off
  3. cd /scratch/python
  4. File Open Projects for /scratch/python/Python-3.4.2

Show How To Configure Scanner

@jonahgraham
jonahgraham / answer.md
Created March 22, 2017 15:59
CDT: Completions suggesting unreachable code (originally http://stackoverflow.com/a/42956434/2796832)

CDT does not present unreachable in code completions. The issue you are facing is the definition of unreachable AFAICT.

In C, everything that is not static is "public" and can be called from anywhere else. No declaration is even necessary (although I would recommend -Wall -Werror, but that is a separate discussion).

For example, consider file.c with contents:

static void func_private1(void) {}

static void func_private2(void) {}

@jonahgraham
jonahgraham / open-isa-linux-getting-started-install.sh
Last active September 10, 2019 23:03
Install the tools needed for open-isa getting started on Linux as documented here: https://open-isa.org/get-started/
#!/bin/bash
# This script can be used to download and install the tools as specified on https://open-isa.org/get-started/.
# Running this scipt will result in all the tools being added as sub-folders:
# - Eclipse: ./eclipse/eclipse
# - SDK: ./vega
# - Toolchain: ./toolchain
# - Toolchain OCD: ./toolchain/openocd
# - Toolchain bin dir: ./toolchain/riscv32-unknown-elf-gcc/bin/
# - OVPsim: ./riscv-ovpsim