08 2013 档案

摘要:虽然 vi 用了好几年, 但没有真正的驾驭好vivi ---- vee-eyevim, a X-based interface1 insert mode2 command modei --- insertcw --- change wordtypeseterstty command : when the terimal is not control , can display and set the reponding key-values.:pre & fgh | |j Vk ^ | |number as prefix parameters ---- 4L0 (begin of li 阅读全文

posted @ 2013-08-30 09:08 kwingmei 阅读(232) 评论(0) 推荐(0)

摘要:按照网友的说明 下载相应的包解压安装, 就是在安装mtd-utils的时候才出现 /usr/include 的目录 说 cross-compilation 是unsafe, 不知道具体原因, 大概知道cross-compiler 引用了开发系统中的头文件, 想了一下, 在common.mk 中有如下内容PREFIX=/usr...INCLUDEDIR=$(PREFIX)/include可能是我Makefile 中修改 PREFIX 变量, 应该有相应的修改, 我不管那么多。 直接注释 “# PREFIX=/usr” 编译就好了我用了一下忙力 cp ..../sbin/* nfs/rootfs/ 阅读全文

posted @ 2013-08-28 23:52 kwingmei 阅读(364) 评论(0) 推荐(0)

摘要:今天 心血来潮 看 embedded linux primer 中的mtd在ubuntu 中试着 不过 不好玩就随便在3.10.9 中修改了一些mtd的配置然后编译, 运行 好像把mtd的分区读出来了网卡报了一些问题, 然后就是vfs(错误) 到了文件系统上网看了一些信息, 然后才去看nfs的配置, 果然没有配置,然后给配上, 启动成功了:[root@FriendlyARM /proc]# uname -aLinux FriendlyARM 3.10.9-km #6 Wed Aug 28 18:35:50 CST 2013 armv6l GNU/Linux这其中有很多地方还是不明,这里是没有用 阅读全文

posted @ 2013-08-28 18:50 kwingmei 阅读(361) 评论(0) 推荐(0)

摘要:d/a 分压,分流--> 成性线关系权电阻/t型解码分辨率 = FS(满量程)/(2^n)5v/256 = 19.5mV5v/4096 = 1.22m线性度:理想与实际的最大偏差 / FS绝对精度:绝对精度 < LSB建立时间:DAC0832 电流输出 (可接运算放大器)8位1uS数据双,单,直通模式TTL电平兼容a2d双积分a/d转换器 ---- 高精度(慢)逐次逼近比较器 ----- 精度/速度/价格 适中并行a/d转换器 ----- 快 阅读全文

posted @ 2013-08-27 13:08 kwingmei 阅读(276) 评论(0) 推荐(0)

摘要:0001 #ifndef _LINUX_CDEV_H0002 #define _LINUX_CDEV_H0003 0004 #include 0005 #include 0006 #include 0007 0008 struct file_operations;0009 struct inode;0010 struct module;0011 0012 struct cdev {0013 struct kobject kobj; /* 继承了一个k对象 */0014 struct module *owner; /* owner 只是一个指针 */0015 ... 阅读全文

posted @ 2013-08-25 21:23 kwingmei 阅读(393) 评论(0) 推荐(0)

摘要:linux kernel primer:doit file:make -C /source_path/linux-2.6.38 ARCH=arm CROSS_COMP=arm-linux- SUBDIRS=$PWD modulesMakefile file:obj-m += hellomod.o运行 ./doit 即可编译内核时的选项: #define TAINT_PROPRIETORY_MODULE (1<<0) #define TAINT_FORCED_MODULE (1<<1) #define TAINT_UNSAFE_SMP (1<<2)#defin 阅读全文

posted @ 2013-08-25 17:28 kwingmei 阅读(489) 评论(0) 推荐(0)

摘要:中断产生时 中断标志位置1, 向cpu申请中断。cpu响应中断时, TCON中的中断标志位由cpu清零 SCON中的中断标志位须软件清零。-----INT0 IE0 0003H highT0 TF0 000BH -----INT1 IE1 0013HT1 IF1 001BHserial RI/TI 0023H LOWIE 特殊功能寄存器 interrup enable EA位控制所有的中断 EX0 控制外部中断0 EX1 控制外部中断1 ET0 控制T0 ET1 控制T1IE = EA | - | - | ES | ET1 | EX1 |... 阅读全文

posted @ 2013-08-25 00:55 kwingmei 阅读(327) 评论(0) 推荐(0)

摘要:1 电平特性: 高/低电平2 单片机:TTL +5v 0v3 RS232: 计算机串口高电平-12V/ 低电平+12v (负逻辑)4 通讯要电平转换芯片: MAX2325 c51特点6 肉眼50ms7 数码管(共阳极 common anode/共阴极 common catode)(电压和电流要考虑)8 静态显示/动态显示(较少的锁存器/ 肉眼效果) 阅读全文

posted @ 2013-08-24 23:41 kwingmei 阅读(395) 评论(0) 推荐(0)

摘要:unix2docperl -i -p -e 's/\n/\r\n/' filesed -i -e 's/$/\r/' filedoc2unixtr -d '\r' file2perl -i -p -e 's/\r//' filesed -i -e 's/\r//' filepackihx 应该是使用在unix平台, 我用packihx出来的结果就是 换行少了‘\r’ 末尾少了‘\n’于是用这个处理。Intel的hex文件1 each Line in an Intel HEX caontains one HEX re 阅读全文

posted @ 2013-08-24 16:57 kwingmei 阅读(535) 评论(0) 推荐(0)

摘要:资源:; STC89C52; 8k FLASH, 512BYTE RAM, 32 I/Oport; 3 timer, 1 uart, 8 interrupt source; ; SST89E516; 64K FLASH, 1024 RAM, 32 I/O port; 3 timer, 1 UART, 10 interrupt source; suport keil51 online debugdemo0.asm org 0hmain: inc R0 ; inc(increment) add 1 R0=01, [01]=01; R0到R7这8个寄存器可以用作寄存器寻址 MOV A ,R0~R7; 阅读全文

posted @ 2013-08-24 15:19 kwingmei 阅读(205) 评论(0) 推荐(0)

摘要:中键的快捷键使用:选择文本--移动鼠标--中键(即粘贴选择的文本到鼠标移动的地方)1. One common shortcut is to paste selected text. (This is sometimes called primary selection paste.) Select the text you want to paste, then go to where you want to paste it and middle-click. The selected text is pasted at the mouse position.注意:粘贴文本用中键 与 cli 阅读全文

posted @ 2013-08-23 20:32 kwingmei 阅读(432) 评论(0) 推荐(0)

摘要:sudo apt-get install smbfsbut failedfollow the hintssudo apt-get install cifs-utilsoknow i can mount windows share direcotry挂载windows的共享目录mount -c cifs -ouser=xxx,passwd=yyy //192.168.1.1/share_dir /mount_point 阅读全文

posted @ 2013-08-23 20:27 kwingmei 阅读(734) 评论(0) 推荐(0)

摘要:sudo fallocate -l 768m swap.filesudo chmod 600 swap.filesudo mkswap swap.filesudo swapon swap.filesudo vi /etc/fstabadd line:/boot/swap.file none swap sw 0 0 阅读全文

posted @ 2013-08-23 20:20 kwingmei 阅读(194) 评论(0) 推荐(0)

摘要:# 开启ip转发echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward# 用iptables 实现拦截 nat伪装sudo iptables -t nat -I POSTROUTING -j MASQUERADEsudo ifconfig eth0 down #关闭网卡sudo ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE #然后改地址sudo ifconfig eth0 up #然后启动网卡查看当前系统所有的监听端口nc -zv localhost 1-65535如何查看HTTP头w3m -dump_head htt 阅读全文

posted @ 2013-08-23 20:10 kwingmei 阅读(192) 评论(0) 推荐(0)

摘要:数据库总是没有好好学习, 在校学 sqlserver 当时有点抵制, 现在觉得有点后悔,在大的时候学习 mysql 当时还不知道怎么安装。 后来多次学习 都没有深入(惭愧)数据的处理不在其复杂的特性, 不在其市场, 而在于其适用。信息的精髓 与社会的发展(引导)。price/performance/scalabilityMySQL is relatively light-weight, can be extremely fast when applications leverage architecture. Lots of features stay free as the database 阅读全文

posted @ 2013-08-23 20:08 kwingmei 阅读(211) 评论(0) 推荐(0)

摘要:2470 /*2471 * This is the 'heart' of the zoned buddy allocator.2472 *//* 参数理解: *//* GFP = Get Free Pages ? *//* 098 typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t; *//* #define DECLARE_BITMAP(name,bits) \ unsigned long name[BITS_TO_LONGS(bits)] *//* typedef struct { unsign 阅读全文

posted @ 2013-08-23 12:55 kwingmei 阅读(493) 评论(0) 推荐(0)

摘要:Spacebar (page down) 空格键Shift-Spacebar (page up) shift+空格Ctrl+F (find) 查找 / 快速查找 “/”Alt-N (find next) 下一个 或者 enter键shift+Ctrl+D (bookmark page)Ctrl+T (new tab)Ctrl+K (go to search box)Ctrl+L (go to address bar) / Alt + D — highlights the text in the Location BarCtrl+= (increase text size)Ctrl+- (dec 阅读全文

posted @ 2013-08-23 11:53 kwingmei 阅读(245) 评论(0) 推荐(0)

摘要:由于有次使用for_each_zone 的函数 无法使用mm/bootmem.c#0027 这里定义吗 ?0026 #ifndef CONFIG_NEED_MULTIPLE_NODES0027 struct pglist_data __refdata contig_page_data = {0028 .bdata = &bootmem_node_data[0]0029 };0030 EXPORT_SYMBOL(contig_page_data);mm/bootmem.c#0027 ?0026 #ifndef CONFIG_NEED_MULTIPLE_NODES0027 stru... 阅读全文

posted @ 2013-08-22 23:02 kwingmei 阅读(524) 评论(0) 推荐(0)

摘要:/* this routine was borrowed from */void tty_write_message1( struct tty_struct *tty, char *msg ){ if( tty && tty->driver->ops->write ) tty->driver->ops->write( tty, msg, strlen( msg) ); return ;}在3.5内核中好像没有了(Y)调用:tty_write_message( current->signal->tty, msg); 阅读全文

posted @ 2013-08-22 18:12 kwingmei 阅读(293) 评论(0) 推荐(0)

摘要:linux/list.h0018 /*0019 * Simple doubly linked list implementation.0020 *0021 * Some of the internal functions ("__xxx") are useful when0022 * manipulating whole lists rather than single entries, as0023 * sometimes we already know the next/prev entries and we can0024 * generate better code 阅读全文

posted @ 2013-08-22 12:26 kwingmei 阅读(212) 评论(0) 推荐(0)

摘要:fuser fuser - identify processes using files or socketsscreen screen manager with VT100/ANSI terminal emulation 串口/屏幕共享 ctrl+a+d detach screen 阅读全文

posted @ 2013-08-22 11:48 kwingmei 阅读(124) 评论(0) 推荐(0)

摘要:the arm instruction setthe arm has six operation modes:user (unprivileged mode under which most tasks run)fiq (entered when a hight priority(fast) interrrupt is raised)irq (entered whene a low priority(normal ) interrrupt is raised )supervisor( entered on reset and when a software interrupt instruct 阅读全文

posted @ 2013-08-22 09:39 kwingmei 阅读(482) 评论(0) 推荐(0)

摘要:udev is a device manager for the Linux kernel. Primarily, it manages device nodes in /dev. It is the successor of devfs and hotplug, which means that it handles the /dev directory and all user space actions when adding/removing devices, including firmware load.与传统的顺序加载不同,udev 可以并行加载内核模块,具有潜在的性能优势。异步 阅读全文

posted @ 2013-08-22 00:18 kwingmei 阅读(321) 评论(0) 推荐(0)

摘要:GRUB 2 is the default boot loader and manager for Ubuntu since version 9.10 (Karmic Koala). As the computer starts, GRUB 2 either presents a menu and awaits user input or automatically transfers control to an operating system kernel. 作用GRUB 2 is a descendant of GRUB (GRand Unified Bootloader) 源It ha 阅读全文

posted @ 2013-08-21 23:38 kwingmei 阅读(325) 评论(0) 推荐(0)

摘要:s3c-fb s3c-fb: window 0: fb Serial: 8250/16550 driver, 4 ports, IRQ sharing disableds3c6400-uart.0: ttySAC0 at MMIO 0x7f005000 (irq = 69) is a S3C6400/10console [ttySAC0] enableds3c6400-uart.1: ttySAC1 at MMIO 0x7f005400 (irq = 70) is a S3C6400/10s3c6400-uart.2: ttySAC2 at MMIO 0x7f005800 (irq = 71) 阅读全文

posted @ 2013-08-21 20:19 kwingmei 阅读(379) 评论(0) 推荐(0)

摘要:--with-sysroot=$LFSFor cross compilation, this tells the build system to look in $LFS for the target system libraries as needed.--with-lib-path=/tools/libThis specifies which library path the linker should be configured to use.--target=$LFS_TGTBecause the machine description in the LFS_TGT variable 阅读全文

posted @ 2013-08-18 01:36 kwingmei 阅读(237) 评论(0) 推荐(0)

摘要:sysdeps/ieee754/flt-32/s_isnanf.c:37:1:error: '__EI___isnanf' aliased to external symbol '__GI___isnanf' · Need general guide on how to build Linux Stream...注释37行就可以进行了, 不知道怎么解决, 跟一天了On 31/08/2012, at 8:08 AM, Richard Henderson wrote:> Dunno if alpha is going to be the only g 阅读全文

posted @ 2013-08-17 17:00 kwingmei 阅读(498) 评论(0) 推荐(0)

摘要:five 32-bit timerthese timers are used to generate internal interrupts to the arm subsystemTimer0Timer1 (timer0 timer1 include a PWM function[Pulse Width Modulation], which candrive an external I/O signal. the PWM for timer0 and 1 have an optinonal dead-zone generator capability)timer 2, 3,4 没有输出针5 阅读全文

posted @ 2013-08-17 00:17 kwingmei 阅读(240) 评论(0) 推荐(0)

摘要:arm-linux-ld: error: Source object drivers/mtd/nand/s3c_nand_mlc.fo has EABI version 5, but target drivers/mtd/nand/built-in.o has EABI version 0arm-linux-ld: failed to merge target specific data of file drivers/mtd/nand/s3c_nand_mlc.fomake[3]: *** [drivers/mtd/nand/built-in.o] 错误 1make[2]: *** [dri 阅读全文

posted @ 2013-08-16 10:33 kwingmei 阅读(340) 评论(0) 推荐(0)

摘要:http://permalink.gmane.org/gmane.linux.usb.general/45661 do {2493 grstctl = readl(hsotg->regs + S3C_GRSTCTL);2494 } while (!(grstctl & S3C_GRSTCTL_CSftRst) && timeout-- > 0);2495 2496 if (!(grstctl & S3C_GRSTCTL_CSftRst)) {2497 dev_err(hsotg->dev, "Failed to get CSftRst 阅读全文

posted @ 2013-08-15 12:00 kwingmei 阅读(162) 评论(0) 推荐(0)

摘要:void uart_putchar(unsigned char k){while(!(UTRSTAT0&0x04)) ; UTXH0 = k;}unsigned char uart_getchar(void){unsigned char c;while(!(UTRSTAT0&1<<0)) ; c = URXH0;return c;}真是 踏遍铁鞋无觅处, 害我1天在整啊 阅读全文

posted @ 2013-08-14 15:17 kwingmei 阅读(131) 评论(0) 推荐(0)

摘要:跳转指令b/blcond | ... | L(是否有L) | signed_immed_24(24-bit的有符号的立即数) |目录/home/km/arm/u-boot-mini6410/board/samsung/mini6410ifndef TEXT_BASETEXT_BASE = 0xc7e00000endif 阅读全文

posted @ 2013-08-14 11:00 kwingmei 阅读(190) 评论(0) 推荐(0)

摘要:Monitor Commands - Overview:============================命令go - start application at address 'addr'run - run commands in an environment variablebootm - boot application image from memorybootp - boot image via network using BootP/TFTP protocoltftpboot- boot image via network using TFTP protoco 阅读全文

posted @ 2013-08-14 07:01 kwingmei 阅读(296) 评论(0) 推荐(0)

摘要:Software Configuration:=======================软件的配置Configuration is usually done using C preprocessor defines; therationale behind that is to avoid dead code whenever possible.使用c的预处理 避免 “dead code”两种配置变量There are two classes of configuration variables:* Configuration _OPTIONS_: 选址性的 These are selec 阅读全文

posted @ 2013-08-14 01:47 kwingmei 阅读(315) 评论(0) 推荐(0)

摘要:Summary:========包含uboot源代码 (包含的架构有: PPC, ARM, MIPS, etc)This directory contains the source code for U-Boot, a boot loader for Embedded boards based on PowerPC, ARM, MIPSand several other processors, 可以安装到启动的rom中用来初始化或是测试硬件或是下载/运行程序which can be installed in a boot ROM and used toinitialize and test t 阅读全文

posted @ 2013-08-14 01:06 kwingmei 阅读(286) 评论(0) 推荐(0)

摘要:make smdk6410_configmake 找到smdk6410_config: 目标unconfig:smdk6410_config: unconfig @echo "----------------------" @echo $(@) # 目标 是 smdk6410_config @echo "----------------------" @echo $(MKCONFIG) #/home/km/arm/uboot/uboot/mkconfig 是一个脚本 @echo "----------------------" @ec 阅读全文

posted @ 2013-08-13 23:54 kwingmei 阅读(147) 评论(0) 推荐(0)

摘要:clock structure to generate ARMCLK, HCLKX2, and HCLK. clock dividerconsists of two partspre-dividersandpost divers.there are two pre-dividers to divide by 2 and 5which are fixed and not software configurable.the post-deviders can be configured by software using CLK_DIV0 register.266667一句经典名言: 在IT行业, 阅读全文

posted @ 2013-08-13 10:39 kwingmei 阅读(261) 评论(0) 推荐(0)

摘要:S3C6410中断控制器由两个VIC(Vectored Interrupt Controller, ARM PrimeCell)组成和两个TZIC’s(TrustZone Interrupt Controller SP890)。两个TZIC’s和VIC’s很好的接合起来支持64个中断源。但是单从三星提供的硬件手册上,很彻底了解VIC中断的工作方式,还需要从ARM公 司下载VIC控制器说明手册,ARM PrimeCell Vectored Interrupt Controller (PL192),通读该手册才能帮助我们很好理解VIC中断控制原理。 --摘之前由于不能使用 __irq 而是使用了 阅读全文

posted @ 2013-08-12 16:03 kwingmei 阅读(373) 评论(0) 推荐(0)

摘要:general purpose i/os3c64101 gpa-2 b3 c4 d5 e6 f7 g8 h9 i10 j11 k12 l13 m14 n15 o16 p17 gpqGPxCON: configureGPxDAT: dataGPxUD: up/down (是否使用上拉电阻)GPxCONSLPGPxPUDSLPSLP=sleepGPIO consists of two part, alive-part and off-part. In Alive-part power is supplied on sleep mode,but in off-part it is not the s 阅读全文

posted @ 2013-08-07 19:08 kwingmei 阅读(190) 评论(0) 推荐(0)

摘要:符号定义的伪指令全局GBLA 数 0GBLL 逻辑 FAULSEGBLS 串局部LCLALCLLLCLS赋值SETASETLSETSRLIST {列表}RegList RLIST {r0-r5, r8, r15}BCB (b=byte)str DCB "This is a test!"str = "This is a terst!" 阅读全文

posted @ 2013-08-07 16:02 kwingmei 阅读(140) 评论(0) 推荐(0)

摘要:1 跳转指令 1 直接修改pc指针 2 跳转指令 b b {condition} target_addr ; b eq label bl bl {conditon} target_addr ; before jump; save pc-pointer to r14 blx bx2 mov 指令 mov {condition}{S} target, source S是否影响标志位 mvn r0, #0xff ; r0=0xffffff003 TST TST r0, #%1 ; (%表示二进制)4 add简单, 要好好学习 阅读全文

posted @ 2013-08-07 13:07 kwingmei 阅读(190) 评论(0) 推荐(0)

摘要:3 down vote acceptedI recommend getting gdb from the Linaro toolchain rather than the Ubuntu repositories. Download gcc-linaro-arm-linux-gnueabihf-4.7-2012.10-20121022_linux.tar.bz2 from here and you'll find:bin/arm-linux-gnueabihf-gdbarm-linux-gnueabihf/debug-root/usr/bin/gdbserverThe latter is 阅读全文

posted @ 2013-08-07 12:23 kwingmei 阅读(458) 评论(0) 推荐(0)

摘要:1 立即数寻址 #1 '#'add r0, r0, #12 寄存器寻址add r0, r1, r23 寄存器间接寻址 '[]'add r0, r1, [r2]ldr r0, [r1]4 基址变子寻址ldr r0, [R1, #4]ldr r0, [R1, #4]! ; 还要 r1=r1+45 多寄存器寻址6 相对寻址 跳转时7 堆栈寻址(递增, 递减)(满堆栈, 空堆栈) 阅读全文

posted @ 2013-08-07 10:39 kwingmei 阅读(176) 评论(0) 推荐(0)

摘要:37个 32-bit的寄存器31个通用寄存器 6个状态寄存器arm 模式下 16个通用寄存器 2个状态寄存器r15(pc)r13, r14较特殊the unbanked registerr0-r7the banked registerr8-r14低5为 1 2 3 7 11 15I 中断位F 快速终端T 模式为 T=1 thumb模式r15 --pcr13 --- spr14 =lr =link register指向函数的返回地址spsr* 是 cpsr的备份 阅读全文

posted @ 2013-08-07 09:52 kwingmei 阅读(196) 评论(0) 推荐(0)

摘要:arm 状态 32-bit : 32位对齐thumb 状态 16-bit : 半字对齐 ?可以相互的切换arm 存储器格式32-bit --- 4G4字节对齐有大端, xscale有小端, here模式1 用户模式(Usr)2 FIQ : fast3 irq : interrupt4 svc5 abt6 sys7 und1 可以是软件(认为)改变2 被动的改变用户模式 与 非用户模式(特权模式)除 用户与系统模式 5中异常模式 阅读全文

posted @ 2013-08-07 08:56 kwingmei 阅读(116) 评论(0) 推荐(0)

摘要:^^ARM Assembler is very easy to learn due to the very flexible three operand opcodes. After MIPS it is the most straight forward assembler dialect out there. If you know one dialect of assembler you can become a fluent ARM-assembler programmer over a weekend.AREA Example, CODE, READONLY ; declare... 阅读全文

posted @ 2013-08-07 08:47 kwingmei 阅读(144) 评论(0) 推荐(0)

摘要:.├── bin│ ├── busybox│ └── sh -> busybox├── dev│ └── console└── lib ├── ld-2.11.so ├── ld-linux.so.3 -> ld-2.11.so ├── libc-2.11.so ├── libcrypt-2.11.so ├── libcrypt.so.1 -> libcrypt-2.11.so ├── libc.so.6 -> libc-2.11.so ├── libm-2.11.so └── libm.so.6 -> libm-2.11.sobusybox 是交叉编译的一个fi 阅读全文

posted @ 2013-08-06 22:40 kwingmei 阅读(332) 评论(0) 推荐(0)

摘要:step 1:创建根文件系统目录cd /opt/FriendlyARM/mini6410/linuxmkdir rootfscd rootfsmkdir bin dev etc lib proc sbin sys usr mnt tmp varmkdir usr/bin usr/lib usr/sbin lib/modulesstep2:创建设备文件:cd dev/mknod -m 666 console c 5 1mknod -m 666 null c 1 3cd ..step3:安装/etc(配置文件可以从其他做好的嵌入式系统中cp)tarzxvf etc.tar.gz –C /xxx/r 阅读全文

posted @ 2013-08-06 20:23 kwingmei 阅读(562) 评论(0) 推荐(0)

导航