QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样
========================================================
Eclipse IDE 官方使用文档: http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_proj_paths.htm
伪代码 ——>>>>>>>>>>>>>>>>
===================================
main()
uart.open
uart.setting
net.open
net.setting
can.open
can.setting
----------------------------
uart.read.thread.start ——> *uart.read.fun
net.read.thread.start ——> *net.read.fun
can.read.thead.start ——> *can.read.fun
----------------------------
uart.read.thread.stop
net.read.thread.stop
can.read.thread.stop
----------------------------
uart.close
net.close
can.close
======================================
new thread
*uart.read.fun; *net.read.fun; *can.read.fun;
while(1) {
read.data
judge.data
send.data ——> *data.handle.fun (msg? new thread?)
}
======================================
synchronized fun
Used by *data.handle.fun:
*uart.write.fun
*net.write.fun
*can.write.fun
======================================
======================================
pthread_create error
project properitys --> Autotools --> Configure Settings -->
Command:
CFLAGS=" -g -O0 -lpthread --sysroot=/home/summer/test-yocto/qemuarm" CXXFLAGS=" -g -O0 --sysroot=/home/summer/test-yocto/qemuarm" LDFLAGS=" --sysroot=/home/summer/test-yocto/qemuarm" CPPFLAGS=" --sysroot=/home/summer/test-yocto/qemuarm" configure --with-libtool-sysroot=/home/summer/test-yocto/qemuarm
All Options:
--host=arm-poky-linux-gnueabi --build=x86_64-linux --target=arm-poky-linux-gnueabi
======================================
Yocto Application Makefile
CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux
LD=i586-poky-linux-ld --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux
CFLAGS=-O2 -pipe -g -feliminate-unused-debug-types
CXXFLAGS=-O2 -pipe -g -feliminate-unused-debug-types
======================================
Create New Project: Eclipse with yocto plugin
To create a project based on a Yocto template and then display the source code, follow these steps:
-
Select "Project" from the "File -> New" menu.
-
Double click
CC++
. -
Double click
C Project
to create the project. -
Expand
Yocto Project ADT Autotools Project
. -
Select
Hello World ANSI C Autotools Project
. This is an Autotools-based project based on a Yocto template. -
Put a name in the
Project name:
field. Do not use hyphens as part of the name. -
Click "Next".
-
Add information in the
Author
andCopyright notice
fields. -
Be sure the
License
field is correct. -
Click "Finish".
-
If the "open perspective" prompt appears, click "Yes" so that you in the C/C++ perspective.
-
The left-hand navigation pane shows your project. You can display your source by double clicking the project's source file.