Skip to content

Instantly share code, notes, and snippets.

View thibthibaut's full-sized avatar
🐧
~

Thibaut Vercueil thibthibaut

🐧
~
  • Paris, France
View GitHub Profile
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# thibthibaut wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp
# ----------------------------------------------------------------------------
import cv2
import numpy as np
import pytesseract as ts
/* 32-byte alignment buffer for cache coherency operations. BUFF_SIZE is a 32-bytes multiple. */
uint8_t pBuff[BUFF_SIZE] __attribute__ ((aligned (32)));
/* Write data to main memory with DMA */
fancy_dma_operation(pBuff);
/* Make subsequent CPU reads coherent with DMA writes to main memory */
SCB_InvalidateDCache_by_Addr((uint32_t *)pBuff, BUFF_SIZE);
import argparse
# Create the parser and add arguments
parser = argparse.ArgumentParser()
parser.add_argument(dest='argument0', help="This is the first argument")
# Cast the input to string, int or float type
parser.add_argument(dest='argument1', type=str, help="A string argument")
parser.add_argument(dest='argument2', type=int, help="An integer argument")
parser.add_argument(dest='argument3', type=float, help="A float argument")
'''
Sharpness detector
Copyright (c) 1991 - 2024 THIBAUTV CORPORATION
Warning This software is under beerware licence. By using it you agree to the
terms and conditions of this licence. See below.
----------------------------------------------------------------------------
"THE BEER-WARE LICENSE" (Revision 42):
Thibaut V wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return.
#!/bin/sh
set -e
pandoc -thtml < "$1" | elinks -dump -dump-color-mode 1 | less -R
We couldn’t find that file to show.
@thibthibaut
thibthibaut / innosetup-linux-macos.org.md
Last active August 13, 2021 15:48 — forked from amake/innosetup-linux-macos.org
Inno Setup on Linux and macOS
  • Inno Setup on Linux and macOS

[[http://www.jrsoftware.org/isinfo.php][Inno Setup]] is a popular installer builder for Windows. Of course it is made to run on Windows only, by default. But what if you want to build Windows installers /off/ Windows, i.e. on Linux or macOS?

You're in luck: It's possible to run Inno Setup anywhere that [[https://www.docker.com/][Docker]] runs (including Linux and macOS), and even have a passable experience writing your setup script.

How Debug a STM32CubeIDEProject with custom Makefile

From here

  1. File > New > Makefile project with Existing Code Give a name
    • Point to the project location
    • Select MCU ARM GCC
  2. OK - you will now have to make sure that the makefile is found by the build system. Hint, check: Project Properties > C/C++ Build > Builder Settings > Build directory
  3. Once you have a working makefile you probably want to debug as well...
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pygdbmi.gdbcontroller import GdbController
from pprint import pprint as print
import time
import subprocess
GDB_SERVER_PATH = "/opt/st/stm32cubeide_1.7.0/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_2.0.0.202105311346/tools/bin/ST-LINK_gdbserver"
CUBEPROG_PATH = "/local/home/vercueit/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/"