Skip to content

Instantly share code, notes, and snippets.

View JayKickliter's full-sized avatar
💭
Cache Rules Everything Around Me

Jay Kickliter JayKickliter

💭
Cache Rules Everything Around Me
View GitHub Profile
diff --git a/userland/Configuration.mk b/userland/Configuration.mk
index 47e5d9c8..43e41e5c 100644
--- a/userland/Configuration.mk
+++ b/userland/Configuration.mk
@@ -43,7 +43,7 @@ override ASFLAGS += -mthumb
override CFLAGS += -std=gnu11
override CPPFLAGS += \
-frecord-gcc-switches\
- -g\
+ -gdwarf-2\
@JayKickliter
JayKickliter / debugging.md
Last active October 23, 2017 06:52
Debugging MBed nRF52DK board with GDB

Debugging nRF52DK MBed applications with GDB

Step 1 (one time only): replace MBed bootloader with JLink bootloader

  1. Power down nRF52DK
  2. Power up nRF52DK while holding down IF BOOT/RESET button
  3. Drag JLink bootloader binary to BOOTLOADER volume
  4. Power-cycle

At this point, the MBed bootloader has been replaced with JLink's.

@JayKickliter
JayKickliter / newlib_nano_links.md
Last active May 14, 2017 21:14
Guides to using Newlib-nano on bare-metal targets
AlignAfterOpenBracket: Align # If true, horizontally aligns arguments after an open bracket.
AlignConsecutiveAssignments: true # This will align the assignment operators of consecutive lines
AlignConsecutiveDeclarations: true # This will align the declaration names of consecutive lines
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: TopLevel
@JayKickliter
JayKickliter / Makefile
Last active May 7, 2017 21:58
GNU Make: force recompile when flags change
# Make OBJS depend on CPP/C/CXX/LD flags
$(OBJS): $(BUILDDIR)/flags.txt
# Creates a new flags.txt file when flags change
# make will detect this change and force a rebuild of
# all the sources
.PHONY: flags
$(BUILDDIR)/flags.txt: flags
$(Q){ \
TMP=`mktemp`; \
@JayKickliter
JayKickliter / *scratch*
Created May 6, 2017 22:02
List symbol sizes produced by `arm-none-eabi-gcc` from largest to smallest
arm-none-eabi-nm --size-sort --reverse --demangle --radix=d firmware_image.elf
@JayKickliter
JayKickliter / gcc-version-number.md
Last active April 24, 2017 22:36
Read GCC version number

Just the version number

$ arm-none-eabi-gcc -dumpversion
5.3.1

Full version information

@JayKickliter
JayKickliter / build_arm_gdb.sh
Last active March 14, 2024 20:36
Building `arm-none-eabi-gdb` with python support
#!/usr/bin/env sh
export TARGET=arm-none-eabi
export PREFIX=$HOME/.local
export PATH=$PATH:$PREFIX/bin
export VERSION=7.8.1
export GDB=gdb-$VERSION
rm -rf $GDB
@JayKickliter
JayKickliter / tock_bringup_notes.md
Last active April 4, 2017 21:52
Notes on bringing up tock on a custom board

Q. Why are base interrupts separated from peripheral interrupts?

A. Because the linker keeps 'em separated:

/* Place vector table at the beginning of ROM.
 *
 * The first 16 entries in the ARM vector table are defined by ARM and
 * are common among all ARM chips. The remaining entries are
 * chip-specific, which Tock defines in a separate .irqs section
@JayKickliter
JayKickliter / emacs-gfm.md
Last active November 13, 2022 18:38
Render github-flavored markdown (GFM) in emacs using `pandoc`

Command line usage

pandoc pandoc --quiet -f gfm -s somefile.md

What the options mean:

  1. --quiet: supress "[WARNING] This document format requires a nonempty <title> element."
  2. -f gfm: input format is Github Flavored Markdown