Yocto开发笔记之《应用程序架构》(QQ交流群:519230208)

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:

  1. Select "Project" from the "File -> New" menu.

  2. Double click CC++.

  3. Double click C Project to create the project.

  4. Expand Yocto Project ADT Autotools Project.

  5. Select Hello World ANSI C Autotools Project. This is an Autotools-based project based on a Yocto template.

  6. Put a name in the Project name: field. Do not use hyphens as part of the name.

  7. Click "Next".

  8. Add information in the Author and Copyright notice fields.

  9. Be sure the License field is correct.

  10. Click "Finish".

  11. If the "open perspective" prompt appears, click "Yes" so that you in the C/C++ perspective.

  12. The left-hand navigation pane shows your project. You can display your source by double clicking the project's source file.

原文地址:https://www.cnblogs.com/alanfang/p/5034579.html