- 博客(64)
- 资源 (13)
- 收藏
- 关注
原创 LunarG Vulkan Validiation Layer
1 useful linkhttps://vulkan.lunarg.com/doc/sdk/1.3.211.0/linux/layer_configuration.html2 Configure Vulkan LayersConfiguring Vulkan Layers using Vulkan Configurator .Developers can configure layers through a graphical user interface. Vulkan Configurator
2022-04-19 19:46:20 443
原创 Framebuffer
FramebufferA Framebuffer is a collection of buffers that can be used as the destination for rendering.OpenGL has two kinds of framebuffers: the Default Framebuffer, which is provided by the OpenGL Context; and user-created framebuffers called Framebu
2022-01-19 10:10:32 302
原创 OpenGL Buffer Object
1 Buffer ObjectBuffer Objects are OpenGL Objects that store an array of unformatted memory allocated by the OpenGL context (AKA(also know as) the GPU). These can be used to store vertex data, pixel data retrieved from images or the framebuffer, and a va
2022-01-14 14:19:17 306
原创 OpenGL Context
1 OpenGL ContextAn OpenGL context represents many things.A context stores all of the state associated with this instance of OpenGL.It represents the (potentially visible) default framebuffer that rendering commands will draw to when not drawing to a fr
2022-01-13 16:49:04 383
原创 Configure and build Mesa3D
1 环境Mesa3D 21.1.4Mesa3D-demosUbuntu 20.042 配置环境sudo apt install gcc;sudo apt install g++;sudo apt install vim;sudo apt install libx11-xcb-dev;sudo apt install libxext-dev;sudo apt install libxfixes-dev;sudo apt install libxcb-glx0-dev;sudo ap
2021-08-11 14:21:48 313 1
原创 Makefile compile Error Debug
my work directory and original MakefileAfter I run it, error will happenI added the CFLAGS = -c, then it successed.
2021-07-30 16:18:36 194
原创 KGDB调试内核
1 环境Ubuntu 20.04VMware Worksation 16 PlayerLinux Kernel 5.4.02 设置虚拟机2.1 准备两台虚拟机准备一台虚拟机,然后克隆一台虚拟机,下面以左边为客户端和右边为目标机展示.2.2 配置虚拟机配置串口配置客户机(左边客户端)和目标机(右边服务器端)\.\pipe\com_1配置好后,请使用如下图方式验证2.3 配置服务器端grub配置好串口后请打开服务器端grub,添加如下的信息.sudo
2021-07-14 23:14:50 521 4
原创 Linux USB驱动分析(四)
环境Linux Kernel 5.0Source Insight 3.5xHCI Spec前言接下来我们分析USB设备接入系统后的整个流程,接下来我们分析xHCI驱动流程。首先我们需要对xHCI有基本的认识.
2021-05-20 22:15:26 280
原创 Linux USB驱动分析(三)
环境Linux Kernel 5.0Source Insight 3.5USB Spec 2.0USB驱动分析(二)中,我们分析了hub_probe()函数.我们分析下,USB设备接入后,整个流程。1 背景知识The Hub Class defines one additional endpoint beyond Default Control Pipe, which is required for all hubs: the Status Change endpoint.The ho
2021-04-27 23:21:59 723
原创 Linux USB驱动分析(二)
环境Linux Kernel 5.0Source Insight 3.51 hub_probe()函数USB驱动分析(一)中,初始化并注册USB xHCI Host, 初始化并注册Root Hub, 最终调用hub_driver的hub_probe()函数.static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id){ struct usb_host_interface *desc;
2021-04-25 21:55:30 638
原创 Linux USB驱动分析(一)
1 USB总线初始化1.1 usb_init()函数在usb_init()函数中主要有如下的三个主要函数,分别注册usb总线,初始化usb hub驱动,注册usb设备通用驱动.static int __init usb_init(void){ int retval; retval = bus_register(&usb_bus_type); retval = usb_hub_init(); retval = usb_register_device_driver(&usb_ge
2021-04-24 21:55:35 1326
原创 vim使用手册
Vim 使用方法1 vimrc 配置(1)打开vimrcvim ~/.vimrc(2)填入下面的配置信息set nocompatiblefiletype offset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()Plugin 'VundleVim/Vundle.vim'call vundle#end()filetype plugin indent on"scope---------------------------------
2021-03-23 17:35:15 166
原创 Makefile
Makefile 常用规则wildcardone use of the wildcard function is to get a list of all the C source files in a directory.//获取当前目录下全部.c文件-test.c hello.c$(wildcard *.c)patsubstwe can change the list of c source files into a list of object files by replacing
2021-03-21 12:37:48 201 3
原创 字符设备驱动 (二)
1 开发环境Linux Kernel 4.18.0QEMU 5.2.0-vexpressSource Insight 3.52 并发控制linux设备驱动中存在多个进程对资源共享并发访问.因此需要对驱动并发控制进行深入分析.2.1 基本概念并发(Concurrency)指的是多个执行单元同时、并行被执行.竞态(Race Conditions):并发的执行单元对共享资源的访问则很容易导致竞态.临界区(Critical Section):每个进程中访问临界资源的那段代码称为临界区.临界
2021-02-23 14:26:07 358
原创 lseek的使用
NAMElseek - reposition read/write file offsetSYNOPSIS#include <sys/types.h>#include <unistd.h>off_t lseek(int fd, off_t offset, int whence);DESCRIPTIONlseek() repositions the file offset of the open file description associated..
2021-02-02 10:14:14 154
原创 字符设备驱动 (一)
1 字符设备驱动 (一)Linux Kernel 4.18.0QEMU 5.2.0-VexpressSource Insight 3.52 字符设备驱动Linux从各异的设备中提取共性,将其划分成三大类:字符设备、块设备和网络设备。常见的字符设备有键盘、鼠标、液晶显示、打印机等。2.1 字符设备结构体在Linux内核中使用cdev描述一个字符设备struct cdev { struct kobject kobj; struct module *owner; /*所属模块*/
2021-01-27 22:06:02 246
原创 Linux Kernel编译流程 (二)
1 vmlinux研究vmlinux文件的产生, zImage和Image产生Linux Kernel 4.18.20Source Insight 3.51.1 find all target首先当我们执行sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-命令后, 默认的target是all,所以我们首先在顶层Makefile中找到all, 发现如下代码片段cfg: u-boot.cfgall: $(ALL-y) cfg $(call
2021-01-19 19:36:35 1808 3
原创 Linux Kernel 编译流程 (一)
1 .config 文件产生研究Linux Kernel .config文件的产生, 添加自己的配置Linux Kernel 4.18.20Source Insight 3.51.1 find %config当我们执行sudo make ARCH=arm vexpress_defconfig命令行后,make会进入顶层Makefile文件,执行下面的语句. 而%config依赖scripts_basic 和 ouputmakefile, 所以我问首先去看scripts_basic#SRCAR
2021-01-18 23:28:25 2474
原创 u-boot 编译流程 (一)
1 .config研究.config文件的产生流程,添加自己的配置U-Boot 2017.11Source Insight1.1 find %config当我们执行sudo make smdk5250_defconfig命令行后,make会进入顶层Makefile文件,执行下面的语句. 而%config依赖scripts_basic 和 ouputmakefile, 所以我问首先去看scripts_basic%config: scripts_basic outputmakefile FORC
2021-01-18 14:25:37 498
原创 u-boot 编译流程 (二)
1 U-Boot.bin研究U-Boot.bin的产生,从而进一步研究Linux内核编译流程1.1 find all target首先当我们执行sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-命令后, 默认的target是all,所以我们首先在顶层Makefile中找到all, 发现如下代码片段all: $(ALL-y) cfg$(call cmd,cfgcheck,u-boot.cfg)1.2 find $(All-y) and cf
2021-01-17 01:21:40 1178
原创 基于QEMU的Linux Driver开发环境的配置
Setup Driver development EnvironmentSoftware: QEMU + Vexpress
2021-01-16 00:40:51 1236
原创 Weighted round-robin
//weighted_round_robin.ctypedef struct node { LinkListNode node; int weight; int effective_weight; int current_weight; int name;}node_t;int get_total_weight(void* list) { int i; int total_weight = 0; for (i = 0; i < L
2021-01-06 22:29:54 254
原创 Install QEMU 5.1.50
1 Compile glib-2.48tar -xzvf pcre-8.20.tar.gzcd pcre-8.20./configure --enable-unicode-properties --enable-utf8make && make installtar -zxvf libffi-3.3.tar.gzcd libffi-3.3./configuremake && make installcd glib-2.48.0./autogen.sh --
2020-10-16 19:44:27 377
原创 CRC-32(x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1) source code
#include <stdio.h> //x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1//encode high bit before low bit ..[high bit...low bit]unsigned int crc32(unsigned char data, unsigned int crc) { unsigned int crc32 = 0x04C11DB7; int i; crc ^= (data<<
2020-09-29 16:43:31 1022
原创 CRC16(X16+X15+X2+1) source code
#include <stdio.h> //x16+x15+x2+1: encode high bit before low bit ..[high bit...low bit] unsigned short crc16(unsigned char data, unsigned short crc) { unsigned short ccitt16 = 0x8005; int i; crc ^= (data<<8); for (i=0; i<8; i++){ if
2020-09-29 15:27:44 1884
原创 git 常用操作
1 git diffgit @@ -2,3 +2,4 @@•-开头的行,只出现在源文件中的行•+开头的行,只出现在目标文件中的行•空格开头的行,是源文件和目标文件中都出现的行•差异按照差异小结进行组织,每个差异小结的第一行都是定位语句,由@@开头,@@结尾。-2,3 +2,4在源文件( a/LICENSE)第二行开始的三行, 和目标文件(b/LICENSE)第二行开始的四行不同。 ...
2020-06-16 16:14:57 467
原创 USB 3.2 spec simple review
1 Basic Knowledgedownstream sublinkThe collection of lanes between the DFP Tx and the UFP Rx.DPPData Packet Payload. Contains the data packet’s data and a 32 -bit CRC.DPData Packet which consists of a Data Packet Header(DPH) followed by a D
2020-06-12 21:58:19 818
原创 USB2.0 Spec simple review
USB 2.0 Spec1 Basic knowledge2 Architecture Overview2.1 Electrical2.2 Bus Protocol2.3 Error Behavior2.4 System Configuration3 USB Data Flow Model3.1 Device Endpoints3.2 Pipes3.3 Frames and Microframes3.4 Control Transfers3.5 Bulk Transfers3.6 Interrupt Tra
2020-06-08 22:59:40 1162
原创 Config Github/Gitlab Problem&solution
Config Github Problem&solution1.(1)problemcdlab@cdlab-MS-7A95:~$ ssh -T git@ssh.github.comWarning: Permanently added the RSA host key for IP address '192.30.253.122' to the list of known hosts....
2019-07-22 15:52:09 166
原创 Three simple cases by using makefile---2
3.make_testmake_test-|----Makefile |----top_main.c |----print_hello |----hello.c |----Makefile |----print_world ...
2019-06-10 22:09:15 133
原创 Three simple cases by using makefile---1
I use three parts(make_test0, make_test1, make_test) to progressive introduction simple makefiles apply for project1.make_test0(directory)make_test0 ----Makefile |----top_main.c ...
2019-06-10 21:44:01 111
转载 Useful Test farmework
AceUnitAceUnit (Advanced C and Embedded Unit) bills itself as a comfortable C code unit test framework. It tries to mimick JUnit 4.x and includes reflection-like capabilities. AceUnit can be used i...
2019-05-31 15:02:16 125
原创 base64_encode_decode codes by using C
#include <stdio.h>#include <string.h>#include <stdlib.h>typedef unsigned char uint8_t;typedef unsigned int uint32_t;static char encoding_table[] = { 'A', 'B', 'C', 'D',...
2019-05-29 20:37:16 199
原创 how to use file name to get path of file and copy the files from srv to the local by using python
(1)we need to talk about the os.path.join(...)print("1:",os.path.join('aaaa','/bbbb','ccccc.txt'))==>1: /bbbb\ccccc.txtprint("1:",os.path.join('aaaa','bbbb','ccccc.txt'))==>1: aaaa\bb...
2019-05-24 15:17:01 208
原创 How to use python to write the specific value to the specific address in the binary file
(1) we need a binary file and use symbols(Ericconfig_Bin) to token the address in the binary file, maybe need some assembly knowledge to understand the following codes. .align 8 ...
2019-05-23 16:45:28 162
原创 How to install a function in section and to call the function
1) __attribute__((section("section_name")))fuctions: put the functions and datas into in the section pointed by "section_name"#define STR(x) (#x)#define ERIC_ATTRIB_SECTION(setction) __attribu...
2019-05-22 20:18:31 1120
链表队列工具.rar
2020-12-06
C_C++_设计模式_doc.rar
2020-07-23
基于单片机的温湿度采集系统/VC++上位机
2016-09-05
DHT11在液晶lcd1602显示
2015-04-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人