Skip to content

Instantly share code, notes, and snippets.

View Tosainu's full-sized avatar
🌸
ヾ( ╹◡╹ 🌸 )ノ"

Kenta Sato Tosainu

🌸
ヾ( ╹◡╹ 🌸 )ノ"
View GitHub Profile
#include <concepts>
#include <iostream>
#include <tuple>
#include <type_traits>
#include <utility>
extern "C" {
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
@Tosainu
Tosainu / changes.diff
Last active September 1, 2022 15:22
OpenOCD target configuration for Xilinx Zynq UltraScale+ MPSoC (A53 + R5)
--- /usr/share/openocd/scripts/target/xilinx_zynqmp.cfg 2022-04-23 07:16:16.000000000 +0900
+++ xilinx_zynqmp_r5.cfg 2022-09-01 23:58:36.341650918 +0900
@@ -93,6 +93,10 @@
}
eval $_smp_command
+
+target create $_CHIPNAME.r5.0 cortex_r4 -dap $_CHIPNAME.dap -dbgbase 0x803f0000 -coreid 0
+target create $_CHIPNAME.r5.1 cortex_r4 -dap $_CHIPNAME.dap -dbgbase 0x803f2000 -coreid 1
+
@Tosainu
Tosainu / serialfwd.cc
Created June 3, 2022 17:36
serial port <-> TCP
#include <array>
#include <charconv>
#include <cstdlib>
#include <iostream>
#include <memory>
#include <stdexcept>
#include <string_view>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/serial_port.hpp>
@Tosainu
Tosainu / gpio_chdev_v2.c
Created April 26, 2022 09:53
GPIO chdev v2 memo
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <unistd.h>
#include <linux/gpio.h>
/target
#include <chrono>
#include <iostream>
#include <memory>
#include <thread>
#include <vector>
#include <boost/asio.hpp>
using namespace std::chrono_literals;
@Tosainu
Tosainu / Dockerfile
Last active May 23, 2021 08:04
複数インターフェイス環境でのマルチキャスト通信テスト
FROM alpine as builder
RUN apk add boost-dev g++
ARG src
ARG bin
COPY "${src}" /
RUN g++ -Wall -Wextra -Werror -pedantic-errors -std=c++17 -O3 /${src} -o /${bin} -lboost_coroutine
FROM alpine
RUN apk add --no-cache libstdc++ boost-coroutine
ARG bin
diff --git a/wilc/Makefile b/wilc/Makefile
index 7eb8cf0..b581506 100644
--- a/wilc/Makefile
+++ b/wilc/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-ccflags-y += -I$(src)/ -DWILC_ASIC_A0 -DWILC_DEBUGFS
+ccflags-y += -I$(src)/ -DWILC_ASIC_A0
+ccflags-y += -DDISABLE_PWRSAVE_AND_SCAN_DURING_IP
--- PKGBUILD.orig 2020-08-06 08:56:57.467622808 +0900
+++ PKGBUILD 2020-08-06 08:59:57.396027278 +0900
@@ -1,29 +1,30 @@
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Sébastien Luttringer
-pkgname=vicious
+_pkgname=vicious
+pkgname=vicious-lua53
pkgver=2.4.1
@Tosainu
Tosainu / Dockerfile
Last active September 29, 2020 13:04
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN \
apt-get update && \
apt-get install --no-install-recommends -y \
curl ca-certificates git \
gcc g++ libc-dev clang clang cmake make patchutils \
libboost-all-dev libeigen3-dev libyaml-dev libprotobuf-dev protobuf-compiler libgtkmm-3.0-dev \