Skip to content

Instantly share code, notes, and snippets.

@ag88
ag88 / Makefile
Last active December 23, 2019 05:31
libmaple Makefile v0 alpha
# version 0 (alpha)
#
# This make file for libmaple core is possibly *dangerous*
# i.e. it compiles the sources (in src and STM32F1) directory
# and overwrite all the stuff in $(out_dir)
# $(out_dir) is the binary directory where the object files are dumped there
#
# make clean *deletes* the *$(out_dir)* (coded here as bin )
#
# this is a relative path makefile
@ag88
ag88 / ARMDebianUbuntu.md
Last active April 13, 2023 12:11 — forked from Liryna/ARMDebianUbuntu.md
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

@ag88
ag88 / stm32usb-serial-esp8266.ino
Last active December 16, 2019 10:05
stm32duino (libmaple core) usb-serial with connectivity to ESP8266
/* distribution: MIT lic*/
#include "Arduino.h"
#include <usb_serial.h>
#include <HardwareSerial.h>
#include <libmaple/usart.h>
#include <libmaple/usb_cdcacm.h>
void docmd();
bool chkcmd();
void setserial();
@ag88
ag88 / gist:7da790bb0c2473a08aeeba2cd883bf49
Last active November 27, 2020 14:35
deploy tomcat webapp.war from command line using curl
curl --request PUT --upload-file webapp.war --basic --user user:password \
http://hostname:port/manager/text/deploy?path=/web_path\&update=true
@ag88
ag88 / RTClock.cpp
Last active March 11, 2021 09:55
stm32duino libmaple f4 backup registers
/******************************************************************************
* The MIT License
*
* Copyright (c) 2010 LeafLabs LLC.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
@ag88
ag88 / Makefile-stm32duino-stm32f407ve-black
Last active August 11, 2021 11:23
Makefile for stm32duino for board STM32F407VE black
# version 0 (alpha)
# this is only tested in linux
# this is for this board https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0.html
#
# This make file for stm32duino core is possibly *dangerous*
# i.e. it compiles the sources (in src and Arduino_Core_STM32) directory
# and overwrite all the stuff in $(out_dir)
# $(out_dir) is the binary directory where the object files are dumped there
#
# make clean *deletes* the *$(out_dir)* (coded here as build )
@ag88
ag88 / Makefile-stm32duino-stm32f407ve-black-marlin
Last active August 14, 2021 04:15
Makefile for stm32duino for board STM32F407VE black for Marlin firmware 2.0
# version 0 (alpha)
#
# This make file for stm32duino core and Marlin 2.0 is possibly *dangerous*
# i.e. it compiles the sources (in src, Marlin, Arduino_Core_STM32, variants and CMSIS_5) directory
# and overwrite all the stuff in $(out_dir)
# $(out_dir) is the binary directory where the object files are dumped there
#
# make clean *deletes* the *$(out_dir)* (coded here as build )
#
# this is a relative path makefile
@ag88
ag88 / WebdavFileSystem.java
Last active March 2, 2023 20:19
webdav-nio-filesystem-provider
/*
Copyright 2012-2013 University of Stavanger, Norway
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@ag88
ag88 / armbbnspawn.md
Last active January 16, 2024 10:50
Building Armbian using Ubuntu (jammy) in a systemd-nspawn container

Building Armbian using Ubuntu (jammy) in a systemd-nspawn container

These are some steps for building armbian using Ubuntu (jammy) in a systemd-nspawn container. This is an alternative for building armbian from a Linux system (as like docker containers).

However this method requires the PREFER_DOCKER=no build flag as docker engines cannot be run within a systemd-nspawn container.

@ag88
ag88 / hostapd.conf.md
Last active April 16, 2024 06:38
hostapd.conf for 2.4g or 5g 802.11ac on Orangepi Zero 3
  • install hostapd
    apt install hostapd  
    
  • configure hostapd
    /etc/hostapd/hostapd.conf
# the interface used by the AP
interface=wlan0