DSPʵÑéÐĵÃÌå»á ÏÂÔر¾ÎÄ

1Ñ¡Ôñ

project/rebuildall»òµ¥»÷£¨rebuildall£©²Ëµ¥Ìõ°´Å¥£¬ccsÖØ¡ð

нøÐб༭¡¢»ã±à¡¢

Á¬½Ó¹¤³ÌÀïµÄËùÓÐÎļþ¡£Õâ¸ö´¦ÀíµÄÓйØÐÅÏ¢ÔÚ´°¿ÚµÍ²¿Ò»¸öС¿òÀïÏÔʾ£»

2ĬÈÏʱ£¬.out

Îļþ±àÒ뵽λÓÚµ±Ç°¹¤³ÌÎļþ¼ÐÖеĵ÷ÊÔ(debug)£¬Ä¿Â¼ÖСð

Ò²¿ÉÒÔͨ¹ýccs¹¤

¾ßÌõÑ¡ÔñÒ»¸ö´æ´¢Ä¿Â¼£»

3Ñ¡Ôñ

file/loadprogram¡£Ñ¡ÖÐvolume1.out£¬²¢°´open¡£¡ð

£¨c:\\ti\\myproj

ects\\volume1\\debug\\Îļþ¼ÐÖС££©ccs½«³ÌÐò×°Ôص½Ä¿±êdspÉÏ£¬´ò¿ªÏÔʾ³ÌÐò·´»ã±àÖ¸ÁîµÄdisassembly´°¿Ú£»

4Ñ¡Ôñ

view/mixedsource/asm.£¬ÕâÑù¿ÉÒÔͬʱ²é¿´cÔ´³ÌÐòºÍ²úÉúµÄ»ã¡ð

±à´úÂ룻 5ÔÚ»ìºÏ´°¿Úµ¥»÷

»ã±àÖ¸Áµ¥»÷ÓÐЧָÁ¶ø²»ÊÇÖ¸ÁîµÄµØÖ·»òÖ¸ÁîËù¡ð

´«µÝµÄÇøÓò£©£¬µ¥

»÷f1£¬ccs¿ÉÒÔÑ°ÕÒ´ËÖ¸ÁîµÄ°ïÖú¡£ÕâÊÇѧϰָÁîµÄºÜºÃµÄ·½·¨£»

6Ñ¡Ôñ

debug/gomain£¬´ÓÖ÷³ÌÐò¿ªÊ¼Ö´ÐУ»¡ð

7Ñ¡Ôñdebug/run

»òµ¥»÷(run)°´Å¥£»¡ð

8Ñ¡Ôñ

debug/halt£¬Í˳ö³ÌÐòÔËÐС£¡ð

£¨8£©¸ü¸Ä³ÌÐòµÄ

Ñ¡Ôñ¡¢¶¨Î»Óï·¨´íÎó

1Ñ¡Ôñ

project/buildoptions£»¡ð

preprocessor£¬

ÔÚdefinesymbolsÇøÓò¼üÈëfileio£¬°´tab¼ü£»3µ¥»÷ok£¬±£´æеÄÑ¡ÔñÉèÖ㻡ð

4Ñ¡Ôñ

project/rebuildall»òµ¥»÷(rebuildall)°´Å¥¡£Ö»Òª¹¤³ÌÑ¡Ôñ¡ð

¸ü¸Ä£¬Ôò±ØÐëÖØÐÂ

±àÒëËùÓеÄÎļþ£»

5±àÒëÐÅÏ¢ÏÔʾ£¬

³ÌÐò°üº¬±à¼­´íÎó¡£µ¥»÷build£¬Äã¿ÉÒÔ¿´¼ûÓï·¨´íÎóÐÅ¡ð

Ï¢£»

6Ë«»÷ÃèÊöÓï·¨´í

ÎóλÖõĺìÉ«ÎÄ×Ö£¨µÚ68ÐУ©¡ð¡£×¢Òâvolume.cÔ´³ÌÐòÒÑ´ò¿ª£¬ÇÒ¹â±êλÓÚÏÂÃæµÄÐÐÉÏ£º

processing(input,output);£»7Óï·¨´íÎóλÓÚ¹â±êλÖõÄÉÏÒ»ÐУ¨¶ªÁ˸ö·ÖºÅ£©¡ð£¬È磺puts(begin rocessing);£»

8×¢Ò⣺edit´°

¿Ú±êÌâÀ¸ÖеÄÎļþÃû¸½½ü³öÏÖÐǺţ¨*£©¡ð£¬Ö¸Ê¾Ô´³ÌÐòÒѾ­±»Ð޸ģ¬Îļþ±£´æºó£¬ÐǺÅÏûʧ£»

9Ñ¡Ôñfile/save£¬

»ò°´ctrl+s£¬½«¸ü¸Ä±£´æµ½volume.c£»¡ð

10Ñ¡Ôñ

project/build£¬»ò(incrementalbuild)µ¥»÷¹¤¾ßÌõ£¬ccsÖØбà¡ð

ÒëÒѾ­Ð޸ĵÄÎļþ£» 11Ñ¡Ôñ

file/loadprogram£¬Ñ¡ÖÐvolume1.out£»¡ð

12Ñ¡Ôñ

debug/gomain£¬´ÓÖ÷º¯Êý¿ªÊ¼Ö´ÐС£ÓÉ¡úÖ´ÐпÉÒÔÔÝÍ££»¡ð

13Ñ¡Ôñ

debug/run»ò(run)µ¥»÷²Ëµ¥Ìõ£»¡ð

14Ñ¡Ôñ

debug/halt£¬Í˳ö³ÌÐòÔËÐС£¡ð

£¨9£©Ê¹Óöϵã

£¨breakpoints£©ºÍ¹Û²ì´°¿Ú£¨watchwindow£©³ÌÐòÖ´ÐÐʱ³£³£ÐèÒª¼ì²é±äÁ¿µÄÖµ¡£

1file/reloadpr

ogram£»¡ð

2Ë«»÷

projectview´°ÖеÄvolume.c¡£¿ÉÒÔ½«´°¿Ú±ä´ó£¬¿´µ½¸ü¶àµÄÔ´¡ð

´úÂ룻 3½«¹â±ê·ÅÔÚ

dataio()£»¡ð

4µ¥»÷

(togglebreakpoint)¹¤¾ßÌõ£¬»ò°´f9¡£Ñ¡Ôñ¿Õ°×Çøָʾ¶ÏµãÒѾ­Éè¡ð

Ö㨺ìɫͼ±ê£©£» 5Ñ¡Ôñ

view/watchwindow£¬ÔÚccs´°¿ÚµÄÓÒϽdzöÏÖµ¥¸öÇøÓò£¬Í¬Ê±£¬Õâ¡ð

¸öÇøÓòÏÔʾ¹Û²ì±ä

Á¿µÄÖµ£»

6Èç¹û²»ÔÚÖ÷³ÌÐò£¬

Ñ¡Ôñdebug/gomain£»¡ð

7Ñ¡Ôñdebug/run£¬

»ò°´f5£»¡ð

8Ñ¡Ôñwatch1£»¡ð 9µ¥»÷nameÀ¸ÖÐ

±í´ïʽͼ±ê£¬¼üÈëÒª¹Û²ìµÄ±äÁ¿Ãûdataio£»¡ð

µÄ°×É«ÇøÓò£¬±£´æ¸ü¸Ä¡£Õâ¸öÖµ½«Á¢¼´³öÏÖÔÚÏÂÃæµÄÀý¡ð

(stepover)»ò°´f10£¬¿ç¹ý¶Ôdataio()µÄµ÷Ó㻡ð

(removeallbreakpoints)¡£¡ð

µÄwatchwindow

µÄÖµ£¬Ò²¿ÉÒÔ¹Û²ìÒ»¸ö½á¹¹µÄÔªËصÄÖµ¡£

µÄ±í´ïʽͼ±ê£¬¼üÈëÒª¹Û²ì±í´ïʽÃû³Æstr£»¡ð

µÄ°×É«¿Õ¼ä£¬±£´æ¸ü¸Ä¡£ÊýÖµ½«Á¢¼´³öÏÖÔÚÏÂÃæµÄÀý×Ó¡ð

reviewingthesourcecodeµ÷³övolume.cÖÐÈ«¾ÖÉêÃ÷¡¢²¢³õʼ»¯µÄ¡ð

¹¹¡£volume.h¶¨ÒåÁËparmsµÄ½á¹¹ÀàÐÍ£»

ºÅ£¬ccs½«½á¹¹ÖÐËùÓÐÔªËغÍÔªËØÖµ¡£Ë«»÷½á¹¹ÖÐÔªËصġð

掙术

ÔÚwatchwindowÖÐvalueÀ¸£¬¸ü¸Ä±äÁ¿µÄÖµ¡£×¢Ò⣺watchwindowÖСðÒ²±äΪºìÉ«£¬±íʾÒѾ­ÊÖ¶¯Ð޸ģ»

watchwindowÖÐstr±äÁ¿£¬°´delete¼ü¡£ÆäËû±äÁ¿Í¬Àí£»¡ð

debug/breakpoints£¬ÔÚbreakpointsÖУ¬µ¥»÷deleteall£¬È»ºó¡ð

probepoint£¨ÎªÁËÎļþi/o£©

£¨probepoint£©£¬´Ópc»úÖеÄÎļþ¶ÁÊý¾Ý¡£

ÓÃ̽Õ룺

10µ¥»÷¹Û²ì´°¿ÚÖÐ

×ÓÖУ» 11µ¥»÷

12Íê³Éºó£¬µ¥»÷

£¨10£©Ê¹Óôø½á¹¹

³ýÁ˹۲ì¼òµ¥±äÁ¿

1Ñ¡Ôñwatch1£»¡ð 2µ¥»÷nameÀ¸ÖÐ

3µ¥»÷¹Û²ì´°¿ÚÖÐ

ÖУ» 4´Ó

ÀàÐÍΪparmsµÄ½á

5µ¥»÷strÉϵÄ+

value£¬±à¼­ÔªËØ

ÊýÖµµÄ¸ü¸Ä£¬ÊýÖµ

7Ñ¡Ôñ

8Ñ¡Ôñ

µ¥»÷ok¡£ £¨11£©Ìí¼Ó̽Õë

¿ÉÒÔÌí¼Ó̽Õë

°´ÕÕÏÂÃæµÄ²½Öèʹ

´ÓÖ÷pcÖд«µÝÊä

ÈëÊý¾Ý£¬µ½Ëã·¨ËùʹÓõÄÄ¿±êµÄ»º³åÆ÷ÖУ»

´ÓÄ¿±êµÄ»º³åÆ÷ÖÐ

´«µÝÊä³öÊý¾Ý£¬µ½Ö÷pcÖУ»

ÓÃÊý¾ÝÐ޸Ĵ°¿Ú¡£ ÏÂÃ潫ѧϰÈçºÎʹ

ÓÃprobepoint£¬½«pcÎļþÖеÄÄÚÈÝ£¬×÷Ϊ²âÊÔÊý¾Ý£¬´«µÝµ½Ä¿±êdspÖС£ÁíÍ⣬Ҳ¿ÉÒÔʹÓöϵãÐÞ¸ÄËùÓдò¿ªµÄ´°¿Ú¡£1Ñ¡Ôñfile/loadprogram£¬Ñ¡ÖÐvolume1.out£¬µ¥»÷open£»¡ð

2Ë«»÷

projectviewÖеÄvolume.c£»¡ð

3½«¹â±ê·Åµ½Ö÷³Ì

ÐòÖÐdataio()£»¡ð

4µ¥»÷

(toggleprobepoint)¡£Ñ¡Ôñ¿Õ°×ÇøÓòָʾ̽ÕëÒѾ­ÉèÖã¨À¼É«Í¼¡ð

±ê£©£¬Èç¹û·ÏÖ¹ Ñ¡ÔñÇø£¬´ËÐÐΪÀ¼

É«ÏÔÁÁ£»

5´Ófile²Ëµ¥£¬

Ñ¡Ôñfilei/o¡£³öÏÖfilei/o¶Ô»°¿ò£¬Òò´Ë¿ÉÒÔÑ¡ÔñÊä¡ð

ÈëÊä³öÎļþ£» 6ÔÚfileinput£¬

µ¥»÷addfile£»¡ð

7ä¯ÀÀvolume1

¹¤³ÌÎļþ¼Ð£¬Ñ¡ÖÐsine.dat£¬µ¥»÷open¡£sine.datÎļþÊÇ¡ð

ÕýÏÒ²¨µÄÊ®Áù½øÖÆ

ÊýÖµ£¬³öÏÖsine.datÎļþµÄ¿ØÖÆ´°¿Ú¡£Ôٺ󣬵±ÔËÐгÌÐòʱ£¬¿ÉÒÔÔÚÊý¾ÝÎļþÖÐʹÓô˴°¿ÚÆô¶¯¡¢Í£Ö¹¡¢·µ»Ø¡¢»ò¿ì½ø£»8ÔÚfilei/o¶Ô»°¿ò£¬¸ü¸ÄaddressΪinp_buffer£¬lengthΪ100£¬ÔÚ¡ð

wraparoundÖпÉ

ÒÔÌí¼ÓÑ¡ÖзûºÅ£»

9µ¥»÷

addprobepoint¡£³öÏÖbreak/probepoints¶Ô»°¿òÖеÄprobe¡ð

points£» 10ÔÚ

probepointÁбíÖУ¬ÏÔÁÁÐÐΪ£ºvolume.cline61-->no¡ð

connection£» 11ÔÚconnectto

ÇøÓòÖУ¬µ¥»÷ϼýÍ·£¬´ÓÁбíÖÐÑ¡ÖÐsine.dat£»¡ð

12µ¥»÷replace¡£

probepointÁбí¸ÄÏòÏÔʾÕâ¸öprobepointÁ¬½Óµ½¡ð

sine.datÎļþ£»