Skip to content

Instantly share code, notes, and snippets.

View jerrylogansquare's full-sized avatar
🏠
Working from home

Jerry Morrow jerrylogansquare

🏠
Working from home
  • Chicago, Illinois, USA
View GitHub Profile
@tejainece
tejainece / configure_modelsim.sh
Last active June 30, 2024 06:42
This script installs all the 32 bit library dependencies of modelsim and also compiles freetype.
#!/bin/bash
ALTERA_PATH=~/altera/13.1/
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib \
lib32z1 lib32stdc++6 lib32gcc1 \
expat:i386 fontconfig:i386 libfreetype6:i386 libexpat1:i386 libc6:i386 libgtk-3-0:i386 \
libcanberra0:i386 libpng12-0:i386 libice6:i386 libsm6:i386 libncurses5:i386 zlib1g:i386 \
@meikj
meikj / list.c
Last active August 29, 2022 21:12
Implementation of a doubly-linked list in C.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
/***************************************************************************
* Helper Types
***************************************************************************/
/* Basic example person data structure. */
@hasenbanck
hasenbanck / gist:1e40681b7d74e942a0dd21de8d97bc5e
Created August 8, 2018 06:53
How to use the Backup SRAM of a STM32F7 / STM32
This might also work for other STM32 chips. I use the HAL, so it also might be supported by your chip.
To use the Backup SRAM (most of the time 4 Kb), you need to add a backup power source (like a battery or a supercap)
to the VBAT pin of your STM32. I use a simple CR2032 battery.
Use following code to get access to the Backup SRAM:
__HAL_RCC_PWR_CLK_ENABLE();
HAL_PWR_EnableBkUpAccess();
__HAL_RCC_BKPSRAM_CLK_ENABLE();