Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÖ®gccÃüÁî

      ÔÚLinuxϽøÐÐCÓïÑÔ±à³Ì£¬±ØȻҪ²ÉÓÃGNU GCCÀ´±àÒëCÔ´´úÂëÉú³É¿ÉÖ´ÐгÌÐò¡£GccÖ¸ÁîµÄÒ»°ã¸ñʽΪ£º
Gcc [Ñ¡Ïî] Òª±àÒëµÄÎļþ [Ñ¡Ïî] [Ä¿±êÎļþ]¡£ÆäÖУ¬Ä¿±êÎļþ¿Éȱʡ£¬GccĬÈÏÉú³É¿ÉÖ´ÐеÄÎļþÃûΪ£º±àÒëÎļþ.out
¿´Ò»Ï¾­µäÈëÃųÌÐò"Hello World£¡"
# vi hello.c £¬±à¼­ÈçÏ£º
#include <stdlib.h>
#include <stdio.h>
void main(void)
{
       printf("hello world!\r\n");
}
ÓÃgcc±àÒë³ÉÖ´ÐгÌÐò¡£#gcc hello.c£¬¸ÃÃüÁhello.cÖ±½ÓÉú³É×îÖÕ¶þ½øÖÆ¿ÉÖ´ÐгÌÐòa.out¡£./a.out¾Í¿ÉÒÔÖ´ÐС£
      ÕâÌõÃüÁîÒþº¬Ö´ÐÐÁË£¨1£©Ô¤´¦Àí¡¢£¨2£©»ã±à¡¢(3)±àÒë¡¢(4)Á´½Ó£¬ÐγÉ×îÖյĶþ½øÖÆ¿ÉÖ´ÐгÌÐò¡£ÏÖÔÚÎÒÃǾÍÓÃGCCµÄÃüÁîÑ¡ÏîÀ´Öð¸öÆÊÎöGCC¹ý³Ì¡£
1£©£¬Ô¤´¦Àí(Pre-processing)¡£Ôڸý׶Σ¬±àÒëÆ÷½«CÔ´´úÂëÖеİüº¬µÄÍ·ÎļþÈçstdio.h±àÒë½øÀ´£¬Óû§¿ÉÒÔʹÓÃgccµÄÑ¡Ïî”-E”½øÐв鿴¡£Ó÷¨£º#gcc -E hello.c -o hello.i£¬×÷Ó㺽«hello.cÔ¤´¦ÀíÊä³öhello.iÎļþ¡£Í¨¹ývi hello.i¿ÉÒÔ¿´µ½Ô¤´¦Àí¹ý³ÌÐÅÏ¢¡£
2£©£¬±àÒë½×¶Î(Compiling)¡£ÔÚÕâ¸ö½×¶ÎÖУ¬GccÊ×ÏÈÒª¼ì²é´úÂëµÄ¹æ·¶ÐÔ¡¢ÊÇ·ñÓÐÓï·¨´íÎóµÈ£¬ÒÔÈ·¶¨´úÂëµÄʵ¼ÊÒª×öµÄ¹¤×÷£¬ÔÚ¼ì²éÎÞÎóºó£¬Gcc°Ñ´úÂë·­Òë³É»ã±àÓïÑÔ¡£Óû§¿ÉÒÔʹÓÔ-S”Ñ¡ÏîÀ´½øÐв鿴£¬Éú³É»ã±à´úÂë¡£
Ó÷¨£º[root]# gcc –S hello.i –o hello.s
3£©£¬»ã±à½×¶Î(Assembling)¡£»ã±à½×¶ÎÊǰѱàÒë½×¶ÎÉú³ÉµÄ”.s”Îļþת³É¶þ½øÖÆÄ¿±ê´úÂë¡£Ó÷¨£º[root]# gcc –c hello.s –o hello.o
4£©£¬Á´½Ó½×¶Î(Link)¡£Ó÷¨£º[root]# gcc hello.o –o hello.exe£¬×÷Ó㺽«±àÒëÊä³öÎļþhello.oÁ´½Ó³É×îÖÕ¿ÉÖ´ÐÐÎļþhello.exe¡£
      ÔÚÕâ¸ö³ÌÐòÖв¢Ã»Óж¨Òå”printf”µÄº¯ÊýʵÏÖ£¬ÇÒÔÚÔ¤±àÒëÖаüº¬½øµÄ”stdio.h”ÖÐÒ²Ö»Óиú¯ÊýµÄÉùÃ÷£¬¶øûÓж¨Ò庯ÊýµÄʵÏÖ£¬ÄÇô£¬ÊÇÔÚÄÄÀïʵÏÖ”printf”º¯ÊýµÄÄØ£¿×îºóµÄ´ð°¸ÊÇ£ºÏµÍ³°ÑÕâЩº¯ÊýʵÏÖ¶¼±»×öµ½ÃûΪlibc.so.6µÄ¿âÎļþÖÐÈ¥ÁË¡£¿ÉÒÔÓÃlddÃüÁî²é¿´¶¯Ì¬¿â¼ÓÔØÇé¿ö£º[root]# ldd hello.exe¡£
       º¯Êý¿âÒ»°ã·ÖΪ¾²Ì¬¿âºÍ¶¯Ì¬¿âÁ½ÖÖ¡£¾²Ì¬¿âÊÇÖ¸±àÒëÁ´½Óʱ£¬°Ñ¿âÎļþµÄ´úÂëÈ«²¿¼ÓÈëµ½¿ÉÖ´ÐÐÎļþÖУ¬Òò´ËÉú³ÉµÄÎļþ±È½Ï´ó£¬µ«ÔÚ


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

linuxµÄplatformÇý¶¯

´ÓLinux 2.6ÆðÒýÈëÁËÒ»Ì×еÄÇý¶¯¹ÜÀíºÍ×¢²á»úÖÆ:Platform_deviceºÍPlatform_driver¡£
LinuxÖд󲿷ֵÄÉ豸Çý¶¯£¬¶¼¿ÉÒÔʹÓÃÕâÌ×»úÖÆ, É豸ÓÃPlatform_device±íʾ£¬Çý¶¯ÓÃPlatform_driver½øÐÐ×¢²á¡£
 
Linux platform driver»úÖƺʹ«Í³µÄdevice driver »úÖÆ(ͨ¹ýdriver_registerº¯Êý½øÐÐ×¢²á)Ïà±È£¬Ò»¸öÊ®·ÖÃ÷ÏÔ ......

linux ÉϵçÖ´ÐеĵÚÒ»Ìõ´úÂëÊÇÔÚÄÚ´æÀïÂð£¿

Õª×Ôoldlinux£º
ÉϵçÖ´ÐеĵÚÒ»Ìõ´úÂëÊÇÔÚÄÚ´æÀïÂð£¿
“·ÃÎʵÄF000h : FFF0hÊÇÄÚ´æµÄµØÖ·»¹ÊÇ´æ·ÅbiosµÄromµØÖ·¡¡”¡¡
¡¡¡¡Õâ¸öÊÇÓɱ±ÇÅÄÚµÄÒ»¸ö¼Ä´æÆ÷ÉèÖõģ¨¾ßÌåµÄ×ÊÁÏÄã¿ÉÒÔÈ¥ÕÒһЩоƬ×éµÄ×ÊÁÏ£©¡£µ±±±ÇÅÊÕµ½£Ã£Ð£ÕÍⲿµÄµØÖ·×ÜÏßÉϵÄÐźÅʱ£¬»á¸ù¾ÝÕâ¸ö¼Ä´æÆ÷ÄÚµÄÖµÀ´¾ö¶¨ÊÇ´ÓÄÚ´æÀïÈ¡ÄÚÈÝ»¹ÊÇ°ÑÕâ¸öµØ ......

LinuxÖеȴý¶ÓÁлúÖÆ·ÖÎö

 LinuxÖеȴý¶ÓÁлúÖÆ·ÖÎö
 
ʲôÊǵȴý¶ÓÁУ¿
       ÔÚÈí¼þ¿ª·¢ÖÐÈÎÎñ¾­³£ÓÉÓÚijÖÖÌõ¼þûÓеõ½Âú×ã¶ø²»µÃ²»½øÈë˯Ãß״̬£¬È»ºóµÈ´ýÌõ¼þµÃµ½Âú×ãµÄʱºòÔÙ¼ÌÐøÔËÐУ¬½øÈëÔËÐÐ״̬¡£ÕâÖÖÐèÇóÐèÒªµÈ´ý¶ÓÁлúÖƵÄÖ§³Ö¡£LinuxÖÐÌṩÁ˵ȴý¶ÓÁеĻúÖÆ£¬¸Ã»úÖÆÔÚÄÚºËÖÐÓ¦Óúܹ㷺¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ