gdb command

file kill list next step run quit watch print break shell gcc -g xxx xxx.c ./xxx gdb xxx file xxx run list break number run watch string2[size-1] next step
默认分类 | 2015-07-30 14:18 | 阅读 1517 次 | 评论 0 条

udp and tcp

1 udp socket(...); bind(...); while(1) { recvfrom(...); process(...); sendto(...); } 2 tcp socket(...); bind(...); listen(...); while(1) { accept(...); while(1) { read(...); process(...); write(...); } close(...); }
默认分类 | 2015-07-30 11:43 | 阅读 1184 次 | 评论 0 条

RT5350 APP

Step1:install toolchain 拷贝解压文件 #cp RT288x_SDK/toolchain/buildroot-gcc342.tar.bz2 /opt #tar jxvf buildroot-gcc342.tar.bz2 新建文件 #mkdir /opt/buildroot-gdb #mkdir /opt/buildroot-gdb/bin Step2:install LZMA Utility 解压文件 #tar xvf RT288x_SDK/toolchain/lzma-4.32.7.tar.gz #cd RT288x_SD...
默认分类 | 2015-07-23 08:47 | 阅读 4080 次 | 评论 0 条

RT5350 GPIO

fd = open("/dev/gpio", O_RDONLY); if (ioctl(fd, RALINK_GPIO_SET_DIR_IN, RALINK_GPIO(0)) < 0) // 这里能看到对gpio号0设置输入模式 3. 使能gpio的中断功能; if (ioctl(fd, RALINK_GPIO_ENABLE_INTP) < 0) 4. 注册进程的进程号到相应的gpio号,用来接收相应引脚发生中断时,接收来自中断处理程序发个应用进程一个信号。 info.pid = getpid(); info.irq = 0; ...
默认分类 | 2015-07-22 19:23 | 阅读 4195 次 | 评论 0 条

file system

#include <fcntl.h>; #include <unistd.h>; #include <sys/types.h>; #include <sys/stat.h>; int open(const char *pathname,int flags); int open(const char *pathname,int flags,mode_t mode); int close(int fd); #include <unistd.h>; ssize_t read(int fd, void *buffer,size_t count); ssize_t wr...
默认分类 | 2015-07-15 22:23 | 阅读 1374 次 | 评论 0 条

process management

#include <unistd.h>; int execl(const char *path,const char *arg,...); int execlp(const char *file,const char *arg,...); int execle(const char *path,const char *arg,...); int execv(const char *path,char *const argv[]); int execvp(const char *file,char *const argv[]): #include <unistd.h>...
默认分类 | 2015-07-15 22:17 | 阅读 1333 次 | 评论 0 条

process function

#include <unistd.h> pid_t getpid(void); pid_t fork(); int pipe(int fides[2]); int sigemptyset(sigset_t *set); int sigfillset(sigset_t *set); int sigaddset(sigset_t *set,int signo); int sigdelset(sigset_t *set,int signo); int sigismember(sigset_t *set,...
默认分类 | 2015-07-15 17:34 | 阅读 1480 次 | 评论 0 条

stm32 uclinux 2

cp -a $(rootfs_dir)/* $(target_out_romfs) cp -f $(target_out_kernel)/fs/ext2/ext2.ko $(target_out_romfs)/lib/modules cp -f $(target_out_kernel)/fs/mbcacke.ko $(target_out_romfs?lic/modules cp -f $(target_out_user)/bin/* $(target_out_romfs)/usr/bin vi...
默认分类 | 2015-07-14 13:50 | 阅读 1890 次 | 评论 0 条

stm32 uclinux

su apt-get install eclipse-cdt apt-get install genromfs apt-get install libncurses5-dev apt-get install git apt-get install mc mc uclinux ctrl+O .ACTIVE.sh ctrl+O make #include int main() { pr...
默认分类 | 2015-07-14 12:30 | 阅读 4861 次 | 评论 0 条
浏览106347次
文章分类