Cov txheej txheem:
Video: Serial Debugging Nrog CloudX: 3 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Hauv txoj haujlwm no, kuv xav kom piav qhia lub tswv yim ntawm kev debugging ntawm lub davhlau ya nyob twg. Tab sis ua ntej pib, cia piav qhia nws lub tswv yim los ntawm nws lub ntsiab lus.
1. serial kev sib txuas lus
kev sib txuas lus txuas yog rau kev sib txuas lus ntawm CloudX board thiab khoos phis tawj lossis lwm yam khoom siv. Txhua lub CloudX cov laug cam muaj tsawg kawg ib qho pom chaw nres nkoj (tseem hu ua UART lossis USART): Serial. Nws sib txuas lus ntawm tus lej RX thiab TX tus pin nrog lwm lub hardwares lossis cov qauv kev sib txuas lus (xws li gsm thiab gps) ib yam li khoos phis tawj ntawm USB siv SoftCard. Yog li, yog tias koj siv cov haujlwm no, koj tsis tuaj yeem siv TX thiab RX rau cov tswv yim digital lossis tso tawm. Koj tuaj yeem siv CloudX ib puag ncig lub hauv paus saib xyuas kev sib txuas lus nrog CloudX pawg thawj coj. Nyem rau kab ntawv saib lub pob hauv lub cuab yeej thiab xaiv tib qho baud tus nqi siv hauv qhov ntsuas hu ua serialBegin ().
2. Debug
Debugging yooj yim txhais tau tias txheeb xyuas thiab tshem tawm qhov ua yuam kev los ntawm (khoos phis tawj khoos phis tawj lossis software). Kev debugging yog ib feem ntawm cov txheej txheem ntsuas software thiab yog ib feem tseem ceeb ntawm tag nrho kev txhim kho software lub neej. Cia ua piv txwv tias koj cov cai tau suav ua tiav thiab koj tab tom sim koj cov cuab yeej thiab nws tsis ua haujlwm raws li qhov xav tau, txawm hais tias muaj ntau txoj hauv kev los debug koj cov cai; ib txoj hauv kev yooj yim thiab siv tau los debug nws yog los ntawm kev siv debugging cov lej. CloudX IDE tsim 2 hom ntaub ntawv ntawm kev sau ua tiav, HEX thiab COFF cov ntaub ntawv. HEX cov ntaub ntawv yog siv lub tshuab nruj me ntsis uas yog bootloaded rau hauv pawg thawj coj rau kev ua tiav hauv ntiaj teb tiag tiag tab sis kuj tseem tuaj yeem ua haujlwm ntawm koj lub PC sim ua software zoo li Proteus Isis thaum COFF cov ntaub ntawv yog cov ntawv nyeem tau ua tiav ntawm koj lub PC simulation softwares (Proteus Isis). Txog qhov no peb yuav txiav txim siab ob hom kev debugging ntawm cov txheej txheem raws cai,
1. Soft Serial Debugging:
Hauv txoj hauv kev no, txhua qhov kev sim thiab kev debug tau ua tiav hauv PC los ntawm qee cov software muaj txiaj ntsig zoo li Proteus ISIS. Vim tias CloudX pib tsim cov ntaub ntawv COFF, Kuv pom zoo siv qhov no rau PC kev sim vim nrog koj tuaj yeem pib ua ntu nruab nrab ntawm kab ntawm cov lej thiab xam qhov twg muaj teeb meem los ntawm, thiab yog tias koj cov cai yuav tsum khiav yam tsis muaj kauj ruam, siv virtual teminal los ntawm "virtual" hom cuab yeej "cuab yeej, koj ib txwm tuaj yeem paub qhov twg kab twg yog tus tswj hwm tau khiav ntawm txhua lub sijhawm. cia saib qhov piv txwv no,
Kauj ruam 1:
/*
* Cov ntaub ntawv: newmain.c
* Tus sau: OGBOYE GODWIN * * Tsim rau Lub Rau Hli 28, 2018, 10:15 AM */
#suav nrog
#suav nrog
/* peb yuav ua
liab pin1 ntsuab pin2 daj pin3 *khawm pin4 */ char *qhia = "hmmm, kuv tau kov lawm"; teeb tsa () {pinMode (1, OUTPUT); pinMode (2, NTAWV); pinMode (3, NTAWV); pinMode (4, INPUT); Serial_begin (9600); loop () {thaum (! readPin (4)); Serial_writeText (qhia); Serial_writeText ("โฆ. txav mus rau liab"); Serial_write (0x0D); portWrite (1, 0x00) cov; pinSelect (1, HIGH); qeeb (200); // sim tshem tawm ntawm kev tawm tswv yim tag nrho ncua thiab pom dab tsi tshwm sim // tom qab ntawd hloov lawv (koj yeej yuav nyiam!). thaum (! readPin (4)); Serial_writeText (qhia); Serial_writeText ("โฆ.moog rau ntsuab"); Serial_write (0x0D); portWrite (1, 0x00) cov; pinSelect (2, HIGH); qeeb (200); // sim tshem tawm ntawm kev tawm tswv yim tag nrho ncua thiab pom dab tsi tshwm sim // tom qab ntawd hloov lawv (koj yeej yuav nyiam!).
thaum (! readPin (4));
Serial_writeText (qhia); Serial_writeText ("โฆ. txav mus rau daj"); Serial_write (0x0D); portWrite (1, 0x00) cov; pinSelect (3, HIGH); qeeb (200); // sim tshem tawm ntawm kev tawm tswv yim tag nrho ncua thiab pom dab tsi tshwm sim // tom qab ntawd hloov lawv (koj yeej yuav nyiam!). }}
nrog rau qhov no koj tuaj yeem pom yuav ua li cas Serial debugging yog qhov tseem ceeb yog tias koj tshem qhov ncua sijhawm. yog tias koj tau ua qhov ntawd koj yuav tau pom muaj teeb meem li cas txoj cai yooj yim tuaj yeem ua rau yog tias nws tau ua tiav hauv lub ntiaj teb tiag tiag yam tsis muaj kev ncua sijhawm ntawd.
Kauj ruam 2:
2. Kho vajtse debugging:
Hauv txoj hauv kev no, txhua qhov kev sim thiab kev debug yog ua los ntawm kev txuas CloudX tsab ntawv pov thawj lub rooj rau lub PC siv softCard thiab siv ob qho tib si CloudX IDE lub davhlau ya nyob twg (pom zoo) lossis qee yam software zoo li Proteus ISIS compim, realTerm, thiab lwm yam Tsim COFF cov ntaub ntawv siv tsis tau ntawm no vim tias txoj hauv kev no xav tau HEX bootloaded rau hauv kho vajtse, Kuv pom zoo siv qhov no rau CloudX softcard. Nco ntsoov tias koj cov cai khiav tsis muaj kauj ruam yog li koj tuaj yeem ib txwm paub tias kab twg yog tus tswj hwm tau khiav ntawm txhua lub sijhawm los ntawm cov ntawv tso tawm. cia saib qhov chaws no zoo ib yam piv txwv teev tseg saum toj no, teeb tsa koj lub khoos phis tawj kom similer rau kuv lub teeb liab liab --------- rau pin1 ntsuab LED --------- pin2 daj LED- ------- pin3 khawm --------- pin4
Kauj ruam 3:
cov kauj ruam
1. Siv tib txoj cai raws li saud
2. bootload rau hauv koj lub rooj tsavxwm
3. pib CloudX lub davhlau ya nyob twg los ntawm txhaj "txuas" khawm hauv lub cuab yeej
4. xaiv qhov chaw nres nkoj xav tau thiab tus nqi baud (9600 hauv qhov kev qhia no)
5. pib lub davhlau ya nyob twg los ntawm txhaj rau txuas (txiav tawm yog tias koj xav txiav luam yeeb)
6. nrog qhov chaw nres nkoj tau qhib/txuas nrog, ib ntus thawb lub pob ntawm qhov yuav thiab koj yuav pom cov ntawv tso tawm uas pom ntawm lub qhov rais davhlau ya nyob twg. Nco ntsoov tias yog tias koj muaj kev ncua sijhawm ntawm txoj cai, koj yuav tau txais ntau kab ntawm cov ntawv tso tawm ua haujlwm nrawm heev yam tsis muaj kev tswj ua ntej koj tshem koj txhais tes tawm ntawm lub pob. Yog tias yog vim li cas hauv koj cov cai, koj muaj cov teeb meem zoo li no lossis zoo sib xws, koj ib txwm tuaj yeem siv txoj hauv kev no los debug.
Pom zoo:
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Ua Si Cov Khoom Ua Si Ua Tau Zoo!: 7 Cov Kauj Ruam (nrog Duab)
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Siv Hluav Taws Xob Ua Tau Zoo!: Qho khoom ua si hloov pauv qhib txoj hauv kev tshiab thiab kev daws teeb meem kom tso cai rau menyuam yaus uas muaj lub cev muaj peev xwm txwv lossis kev xiam oos qhab kev loj hlob los cuam tshuam nrog cov khoom ua si ntawm nws tus kheej. Hauv ntau qhov xwm txheej, cov menyuam yaus uas xav tau cov khoom ua si hloov pauv tsis tuaj yeem nkag mus
Cov Khaub Ncaws Khaub Ncaws Niaj Hnub Nyoog Vintage Cov Kab Xev Nrog Cov Ntaub Ntawv MP3: 8 Kauj Ruam (nrog Duab)
Kev Sau Ntiag Tug Vintage Cassette Tapes Nrog Cov Ntaub Ntawv MP3: Nrog cov kab xev nplaum kab xev popping hauv pop-kab lis kev cai tam sim no ntau dua li yav tas los, ntau tus neeg xav tsim lawv tus kheej cov ntawv. Hauv qhov kev qhia no, kuv yuav qhia koj yuav ua li cas (yog tias koj muaj daim kab xev kaw) kaw koj tus kheej cov kab xev nrog cov thev naus laus zis niaj hnub
Cov Khaub Ncaws Khaub Ncaws Jelly Donuts - Kev Taw Qhia rau Xaws Cov Khaub Ncaws Nrog Makey Makey: 4 Cov Kauj Ruam (nrog Duab)
Cov Khaub Ncaws Khaub Ncaws Khaub Ncaws - Kev Taw Qhia rau Xaws Cov Khaub Ncaws Nrog Makey Makey: Peb pom hauv Twitter tias ntau ntawm peb Cov Khaub Ncaws thiab Makey Makey cov neeg ntxeev siab xav paub ntau ntxiv txog kev xaws khaub ncaws, yog li peb tau tsim qhov kev qhia no kom qhia rau koj sai ntawm kev xaws khaub ncaws thiab yuav ua li cas koj tuaj yeem xaws qee cov khoom sib dhos. (Qhov no yog
Basic Java Debugging: 9 Kauj Ruam
Basic Java Debugging: Phau ntawv qhia no qhia txog cov kauj ruam yooj yim los ntawm kev txheeb xyuas rau Java kev ua yuam kev. Phau ntawv qhia no tsis muab kev pabcuam hauv kev teeb tsa java programming software thiab cia siab tias koj twb tau ua tiav txoj haujlwm no ua ntej ua ntej. Rau qhov zoo tshaj plaws
Cov cuab yeej cuab tam - Ceramic hauv Cov Ntsiab Lus ntawm Cov Txheej Txheem Digital thiab Analog 2015: 3 Cov Kauj Ruam (nrog Duab)
Cov cuab yeej cuab tam - Ceramic hauv Cov Ntsiab Lus ntawm Digital thiab Analog Cov Txheej Txheem 2015: Txog tam sim no, cov khoom siv hlau yog cov khoom siv tes ua uas tsis muaj kev cuam tshuam digital. Vim li no, nws zoo siab heev los ua phooj ywg nrog cov cuab yeej tshiab. Lub hauv paus pib yog daim ntawv qub thiab CNC Styrocutter.DESIGNBOOM