Skip to content

Instantly share code, notes, and snippets.

View tnishinaga's full-sized avatar

Toshifumi NISHINAGA tnishinaga

  • Japan
  • 15:45 (UTC +09:00)
View GitHub Profile
@tnishinaga
tnishinaga / bcm2712.cfg
Created April 7, 2024 05:58
OpenoOCD config file for BCM2712(Raspberry Pi 5)
# bcm2712.cfg
# SPDX-License-Identifier: GPL-2.0-or-later
# OpenOCD target config file
# This file is based on target/bcm2711.cfg
# I have checked that it works with Open On-Chip Debugger 0.12.0
# using the Raspberry Pi Debug-Probe interface
transport select swd
adapter speed 1000
@tnishinaga
tnishinaga / sc2a11_m3.cfg
Created November 24, 2021 17:18
OpenOCD config for Synquacer cm3
set _CHIPNAME sc2a11
set _TARGETNAME $_CHIPNAME.cpu
adapter speed 1000
transport select jtag
jtag_ntrst_delay 100
reset_config trst_and_srst
telnet_port 4444
diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp
index f9f79273..d22035dd 100644
--- a/bindings/cxx/classes.cpp
+++ b/bindings/cxx/classes.cpp
@@ -287,12 +287,12 @@ shared_ptr<UserDevice> Context::create_user_device(
default_delete<UserDevice>{}};
}
-shared_ptr<Packet> Context::create_header_packet(Glib::TimeVal start_time)
+shared_ptr<Packet> Context::create_header_packet(Glib::TimeSpan start_time)
@tnishinaga
tnishinaga / resistor_combination.py
Last active April 4, 2021 08:40
E96系抵抗値の組み合わせを計算するコード
import math
import copy
resistor_e96 = [
1.00, 1.02, 1.05, 1.07, 1.10, 1.13, 1.15, 1.18, 1.21, 1.24, 1.27, 1.30, 1.33, 1.37, 1.40, 1.43, 1.47, 1.50, 1.54, 1.58, 1.62, 1.65, 1.69, 1.74, 1.78, 1.82, 1.87, 1.91, 1.96, 2.00, 2.05, 2.10, 2.15, 2.21, 2.26, 2.32, 2.37, 2.43, 2.49, 2.55, 2.61, 2.67, 2.74, 2.80, 2.87, 2.94, 3.01, 3.09, 3.16, 3.24, 3.32, 3.40, 3.48, 3.57, 3.65, 3.74, 3.83, 3.92, 4.02, 4.12, 4.22, 4.32, 4.42, 4.53, 4.64, 4.75, 4.87, 4.99, 5.11, 5.23, 5.36, 5.49, 5.62, 5.76, 5.90, 6.04, 6.19, 6.34, 6.49, 6.65, 6.81, 6.98, 7.15, 7.32, 7.50, 7.68, 7.87, 8.06, 8.25, 8.45, 8.66, 8.87, 9.09, 9.31, 9.53, 9.76
]
# dpを使うために整数にする
SHIFT = 100
diff --git a/openmp/runtime/CMakeLists.txt b/openmp/runtime/CMakeLists.txt
index 6d8a539f1b16..249ed7065f8e 100644
--- a/openmp/runtime/CMakeLists.txt
+++ b/openmp/runtime/CMakeLists.txt
@@ -69,7 +69,7 @@ endif()
# FUJITSU A64FX is a special processor because its cache line size is 256.
# We need to pass this information into kmp_config.h.
-if(LIBOMP_ARCH STREQUAL "aarch64")
+if(LIBOMP_ARCH STREQUAL "aarch64" AND NOT APPLE)
@tnishinaga
tnishinaga / errorlog.txt
Created September 7, 2020 16:00
esp32 fprintf to tcp socket error log
I (48636) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.2
I (51966) wifi softAP: accept success
abort() was called at PC 0x40082c46 on core 0
0x40082c46: lock_acquire_generic at /Users/tnishinaga/opt/esp-idf/components/newlib/locks.c:142
Backtrace:0x4008804f:0x3ffc8ca0 0x400887ad:0x3ffc8cc0 0x4008f59a:0x3ffc8ce0 0x40082c46:0x3ffc8d50 0x40082d69:0x3ffc8d80 0x40136621:0x3ffc8da0 0x40131fa9:0x3ffc9060 0x40131ea1:0x3ffc90b0 0x400889ab:0x3ffc90e0 0x4008b6b8:0x3ffc9100 0x4008b7d9:0x3ffc9140 0x40082c7e:0x3ffc9160 0x40082d69:0x3ffc9190 0x4013bd06:0x3ffc91b0 0x4013e2f9:0x3ffc9540 0x40132249:0x3ffc9570 0x400d77e5:0x3ffc95c0 0x400887b5:0x3ffc9690
0x4008804f: panic_abort at /Users/tnishinaga/opt/esp-idf/components/esp_system/panic.c:349
@tnishinaga
tnishinaga / and_inst.S
Last active August 12, 2020 19:31
ARM勉強会 ARM入門資料の発表原稿
.global hoge
hoge:
andeq r0, r0, r1
andal r0, r0, r1
and r0, r0, r1
tnishinaga@takanawa:~$ sudo ethtool -k enp1s0 | grep ": on"
rx-checksumming: on
generic-receive-offload: on
rx-vlan-offload: on
tx-vlan-offload: on
highdma: on [fixed]
!gigabit_switch_version_1.00
!
calendar set 12 52 44 january 1 1970
!
sntp server 220.130.158.54
!
sntp zone japan
!
!
!
/dts-v1/;
/memreserve/ 0x0000000000000000 0x0000000000001000;
/ {
compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
model = "Raspberry Pi 4 Model B";
interrupt-parent = <0x1>;
#address-cells = <0x2>;
#size-cells = <0x1>;