摘要: 通过Python内建库ctypes调用C语言。 #!/usr/bin/python3 # file : bytes_test.py import ctypes as ct import os # 编译C程序为动态库 os.system("gcc -fpic -shared bytes_test.c 阅读全文
posted @ 2023-11-08 17:44 立秋了 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 1 工具列表 Python3及其程序库pyvisa Python3下载 IO Suite Libraries 下载 2 下载 Python3安装需要勾选“Add Python 3.10 to PATH”,其他都可以默认安装。 pyvisa安装。打开cmd,输入指令“pip install pyvis 阅读全文
posted @ 2023-02-25 17:42 立秋了 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 1 数据类型转换 2 常用库 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; 3 关键字 4 简单的例子 library ieee; use ieee.std_logic_1164.all; use ieee. 阅读全文
posted @ 2023-01-01 11:14 立秋了 阅读(68) 评论(0) 推荐(0) 编辑
摘要: void main() { char *u; while(1){ u = (char*)malloc(); if(u) *u = 'u'; } } 阅读全文
posted @ 2022-12-11 01:36 立秋了 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 使用`apt install`时报错: dpkg-dev未配置,dpkg-dev依赖binutils,但binutils未安装,"E:Sub-process /usr/bin/dpkg returned an error code (1)"(隐号内是原文)。 阅读全文
posted @ 2022-11-06 21:40 立秋了 阅读(585) 评论(0) 推荐(1) 编辑
摘要: 1 代码 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <termios.h> # 阅读全文
posted @ 2022-10-01 11:50 立秋了 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 1 快速解决 对于报错fatal: Could not read from remote repository.,网上一般都通过添加ssh密钥解决。但我遇到的多了一条Permission denied, user: '–git',这条报错中的“方框”在终端不可见,就是这个方框导致用户名错误。这个方框 阅读全文
posted @ 2022-07-23 13:03 立秋了 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 添加用户到sudo;软件更新;安装WIFI驱动;亮度调节问题; 阅读全文
posted @ 2022-05-21 16:38 立秋了 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 场景 MDK开发STM32程序,有一段运行正常的程序。 程序中有一些冗余代码,删除后构建正常。硬件测试时问题来了,恢复冗余代码,程序正常。查看冗余代码,包含C库的一些底层函数(如_sys_exit),而在其他代码中调用了pirntf,但不包含冗余代码构建却无错误无警告。 void _sys_exit 阅读全文
posted @ 2021-12-04 20:28 立秋了 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 三个文件,一条命令构建。 -- 文件:oo.ads package OO is type Object is tagged record X : Float; Y : Float; end record; function Area (Obj : Object) return Float; type 阅读全文
posted @ 2021-06-08 09:57 立秋了 阅读(28) 评论(0) 推荐(0) 编辑