Skip to content

Latest commit

 

History

History
executable file
·
224 lines (222 loc) · 4.83 KB

File metadata and controls

executable file
·
224 lines (222 loc) · 4.83 KB

project

introduction

本项目主要用于linux-c开发,包括测试和实际开发,要做到类似freertos架构式的开发,以app为中心 以后方便两者之间的相互移植,转换,只不过本项目使用cmake来进行工程管理

use

添加一个app

  1. 在根目录CMakeLists.txt中添加一个app eg: set(HELLO_WORLD_APP 1)
  2. 在app目录,bsp目录等等添加 if (${HELLO_WORLD_APP}) endif (${HELLO_WORLD_APP})
  3. 在 app/中添加一个相应的app目录
  4. 在该app目录中添加相应的thread源文件
  5. 在该app目录中添加相应的function_f源文件,like freertos工程
  6. 在bsp中编写相应的设备底层初始化文件 eg: bsp_uart.c bsp_uart.h
  7. 在flib的CMakeLists.txt中做类似2的改变
  8. 在main的CMakeLists.txt中添加相应app要连接的静态库

cmds

查看线程

ps -T -p 1092(进程ID);可以先ps -a

c call c++

misc_f.cc misc_cc_f.h

file(GLOB srcs ”.c” ”.cc” “lib/*.c”), 添加*.cc

apps

drivers

thousand drivers development and test thousand drivers development and test

use

  1. cd /hello
  2. make ARCH=arm / make ARCH=riscv
  3. cp hello.ko home/e66/nfs_root

cmds

insmod hello.ko lsmod modprobe hello modprobe -r hello modinfo hello

ARM drivers [0%]

hello

compile
test

access_file_in_module

compile
test

auto_make_node

compile
test

char_drv

compile
test

timer

compile
test

hrtimer

compile
test

kthread

compile
test

waitqueue

compile
test

dedicated_workqueue

compile
test

device_packaged_data

compile
test

dynamic_register

compile
test

export_symbol

compile
test

framework

compile
test

ioctl

compile
test

kprobe

compile
test

lock

compile
test

lseek

compile
test

mmap

compile
test

multiplexing

compile
test

printk_message_level

compile
test

private_data

compile
test

uio

compile
test

user_kernel_data_access

compile
test

complete

compile
test

RISCV drivers [20%]

hello [100%]

compile
test

access_file_in_module [0%]

compile
test

auto_make_node [0%]

compile
test

char_drv [0%]

compile
test

timer [100%]

compile
test

hrtimer [100%]

compile
test

kthread

compile
test

waitqueue

compile
test

dedicated_workqueue

compile
test

device_packaged_data

compile
test

dynamic_register

compile
test

export_symbol

compile
test

framework

compile
test

ioctl

compile
test

kprobe

compile
test

lock

compile
test

lseek

compile
test

mmap

compile
test

multiplexing

compile
test

printk_message_level

compile
test

private_data

compile
test

uio

compile
test

user_kernel_data_access

compile
test

netlink

compile
test
use
1../netlink_app
  1. insmod netlink_module.ko

>>>>>>> 993102fcae6c03313767ea4076529417e1ee6d4d

packages install

mysql

mqtt

libevent

libcurl

openssl