STM32H7-node-red-CM7.list 1.9 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224412254122641227412284122941230412314123241233412344123541236412374123841239412404124141242412434124441245412464124741248412494125041251412524125341254412554125641257412584125941260412614126241263412644126541266412674126841269412704127141272412734127441275412764127741278412794128041281412824128341284412854128641287412884128941290412914129241293412944129541296412974129841299413004130141302413034130441305413064130741308413094131041311413124131341314413154131641317413184131941320413214132241323413244132541326413274132841329413304133141332413334133441335413364133741338413394134041341413424134341344413454134641347413484134941350413514135241353413544135541356413574135841359413604136141362413634136441365413664136741368413694137041371413724137341374413754137641377413784137941380413814138241383413844138541386413874138841389413904139141392413934139441395413964139741398413994140041401414024140341404414054140641407414084140941410414114141241413414144141541416414174141841419414204142141422414234142441425414264142741428414294143041431414324143341434414354143641437414384143941440414414144241443414444144541446414474144841449414504145141452414534145441455414564145741458414594146041461414624146341464414654146641467414684146941470414714147241473414744147541476414774147841479414804148141482414834148441485414864148741488414894149041491414924149341494414954149641497414984149941500415014150241503415044150541506415074150841509415104151141512415134151441515415164151741518415194152041521415224152341524415254152641527415284152941530415314153241533415344153541536415374153841539415404154141542415434154441545415464154741548415494155041551415524155341554415554155641557415584155941560415614156241563415644156541566415674156841569415704157141572415734157441575415764157741578415794158041581415824158341584415854158641587415884158941590415914159241593415944159541596415974159841599416004160141602416034160441605416064160741608416094161041611416124161341614416154161641617416184161941620416214162241623416244162541626416274162841629416304163141632416334163441635416364163741638416394164041641416424164341644416454164641647416484164941650416514165241653416544165541656416574165841659416604166141662416634166441665416664166741668416694167041671416724167341674416754167641677416784167941680416814168241683416844168541686416874168841689416904169141692416934169441695416964169741698416994170041701417024170341704417054170641707417084170941710417114171241713417144171541716417174171841719417204172141722417234172441725417264172741728417294173041731417324173341734417354173641737417384173941740417414174241743417444174541746417474174841749417504175141752417534175441755417564175741758417594176041761417624176341764417654176641767417684176941770417714177241773417744177541776417774177841779417804178141782417834178441785417864178741788417894179041791417924179341794417954179641797417984179941800418014180241803418044180541806418074180841809418104181141812418134181441815418164181741818418194182041821418224182341824418254182641827418284182941830418314183241833418344183541836418374183841839418404184141842418434184441845418464184741848418494185041851418524185341854418554185641857418584185941860418614186241863418644186541866418674186841869418704187141872418734187441875418764187741878418794188041881418824188341884418854188641887418884188941890418914189241893418944189541896418974189841899419004190141902419034190441905419064190741908419094191041911419124191341914419154191641917419184191941920419214192241923419244192541926419274192841929419304193141932419334193441935419364193741938419394194041941419424194341944419454194641947419484194941950419514195241953419544195541956419574195841959419604196141962419634196441965419664196741968419694197041971419724197341974419754197641977419784197941980419814198241983419844198541986419874198841989419904199141992419934199441995419964199741998419994200042001420024200342004420054200642007420084200942010420114201242013420144201542016420174201842019420204202142022420234202442025420264202742028420294203042031420324203342034420354203642037420384203942040420414204242043420444204542046420474204842049420504205142052420534205442055420564205742058420594206042061420624206342064420654206642067420684206942070420714207242073420744207542076420774207842079420804208142082420834208442085420864208742088420894209042091420924209342094420954209642097420984209942100421014210242103421044210542106421074210842109421104211142112421134211442115421164211742118421194212042121421224212342124421254212642127421284212942130421314213242133421344213542136421374213842139421404214142142421434214442145421464214742148421494215042151421524215342154421554215642157421584215942160421614216242163421644216542166421674216842169421704217142172421734217442175421764217742178421794218042181421824218342184421854218642187421884218942190421914219242193421944219542196421974219842199422004220142202422034220442205422064220742208422094221042211422124221342214422154221642217422184221942220422214222242223422244222542226422274222842229422304223142232422334223442235422364223742238422394224042241422424224342244422454224642247422484224942250422514225242253422544225542256422574225842259422604226142262422634226442265422664226742268422694227042271422724227342274422754227642277422784227942280422814228242283422844228542286422874228842289422904229142292422934229442295422964229742298422994230042301423024230342304423054230642307423084230942310423114231242313423144231542316423174231842319423204232142322423234232442325423264232742328423294233042331423324233342334423354233642337423384233942340423414234242343423444234542346423474234842349423504235142352423534235442355423564235742358423594236042361423624236342364423654236642367423684236942370423714237242373423744237542376423774237842379423804238142382423834238442385423864238742388423894239042391423924239342394423954239642397423984239942400424014240242403424044240542406424074240842409424104241142412424134241442415424164241742418424194242042421424224242342424424254242642427424284242942430424314243242433424344243542436424374243842439424404244142442424434244442445424464244742448424494245042451424524245342454424554245642457424584245942460424614246242463424644246542466424674246842469424704247142472424734247442475424764247742478424794248042481424824248342484424854248642487424884248942490424914249242493424944249542496424974249842499425004250142502425034250442505425064250742508425094251042511425124251342514425154251642517425184251942520425214252242523425244252542526425274252842529425304253142532425334253442535425364253742538425394254042541425424254342544425454254642547425484254942550425514255242553425544255542556425574255842559425604256142562425634256442565425664256742568425694257042571425724257342574425754257642577425784257942580425814258242583425844258542586425874258842589425904259142592425934259442595425964259742598425994260042601426024260342604426054260642607426084260942610426114261242613426144261542616426174261842619426204262142622426234262442625426264262742628426294263042631426324263342634426354263642637426384263942640426414264242643426444264542646426474264842649426504265142652426534265442655426564265742658426594266042661426624266342664426654266642667426684266942670426714267242673426744267542676426774267842679426804268142682426834268442685426864268742688426894269042691426924269342694426954269642697426984269942700427014270242703427044270542706427074270842709427104271142712427134271442715427164271742718427194272042721427224272342724427254272642727427284272942730427314273242733427344273542736427374273842739427404274142742427434274442745427464274742748427494275042751427524275342754427554275642757427584275942760427614276242763427644276542766427674276842769427704277142772427734277442775427764277742778427794278042781427824278342784427854278642787427884278942790427914279242793427944279542796427974279842799428004280142802428034280442805428064280742808428094281042811428124281342814428154281642817428184281942820428214282242823428244282542826428274282842829428304283142832428334283442835428364283742838428394284042841428424284342844428454284642847428484284942850428514285242853428544285542856428574285842859428604286142862428634286442865428664286742868428694287042871428724287342874428754287642877428784287942880428814288242883428844288542886428874288842889428904289142892428934289442895428964289742898428994290042901429024290342904429054290642907429084290942910429114291242913429144291542916429174291842919429204292142922429234292442925429264292742928429294293042931429324293342934429354293642937429384293942940429414294242943429444294542946429474294842949429504295142952429534295442955429564295742958429594296042961429624296342964429654296642967429684296942970429714297242973429744297542976429774297842979429804298142982429834298442985429864298742988429894299042991429924299342994429954299642997429984299943000430014300243003430044300543006430074300843009430104301143012430134301443015430164301743018430194302043021430224302343024430254302643027430284302943030430314303243033430344303543036430374303843039430404304143042430434304443045430464304743048430494305043051430524305343054430554305643057430584305943060430614306243063430644306543066430674306843069430704307143072430734307443075430764307743078430794308043081430824308343084430854308643087430884308943090430914309243093430944309543096430974309843099431004310143102431034310443105431064310743108431094311043111431124311343114431154311643117431184311943120431214312243123431244312543126431274312843129431304313143132431334313443135431364313743138431394314043141431424314343144431454314643147431484314943150431514315243153431544315543156431574315843159431604316143162431634316443165431664316743168431694317043171431724317343174431754317643177431784317943180431814318243183431844318543186431874318843189431904319143192431934319443195431964319743198431994320043201432024320343204432054320643207432084320943210432114321243213432144321543216432174321843219432204322143222432234322443225432264322743228432294323043231432324323343234432354323643237432384323943240432414324243243432444324543246432474324843249432504325143252432534325443255432564325743258432594326043261432624326343264432654326643267432684326943270432714327243273432744327543276432774327843279432804328143282432834328443285432864328743288432894329043291432924329343294432954329643297432984329943300433014330243303433044330543306433074330843309433104331143312433134331443315433164331743318433194332043321433224332343324433254332643327433284332943330433314333243333433344333543336433374333843339433404334143342433434334443345433464334743348433494335043351433524335343354433554335643357433584335943360433614336243363433644336543366433674336843369433704337143372433734337443375433764337743378433794338043381433824338343384433854338643387433884338943390433914339243393433944339543396433974339843399434004340143402434034340443405434064340743408434094341043411434124341343414434154341643417434184341943420434214342243423434244342543426434274342843429434304343143432434334343443435434364343743438434394344043441434424344343444434454344643447434484344943450434514345243453434544345543456434574345843459434604346143462434634346443465434664346743468434694347043471434724347343474434754347643477434784347943480434814348243483434844348543486434874348843489434904349143492434934349443495434964349743498434994350043501435024350343504435054350643507435084350943510435114351243513435144351543516435174351843519435204352143522435234352443525435264352743528435294353043531435324353343534435354353643537435384353943540435414354243543435444354543546435474354843549435504355143552435534355443555435564355743558435594356043561435624356343564435654356643567435684356943570435714357243573435744357543576435774357843579435804358143582435834358443585435864358743588435894359043591435924359343594435954359643597435984359943600436014360243603436044360543606436074360843609436104361143612436134361443615436164361743618436194362043621436224362343624436254362643627436284362943630436314363243633436344363543636436374363843639436404364143642436434364443645436464364743648436494365043651436524365343654436554365643657436584365943660436614366243663436644366543666436674366843669436704367143672436734367443675436764367743678436794368043681436824368343684436854368643687436884368943690436914369243693436944369543696436974369843699437004370143702437034370443705437064370743708437094371043711437124371343714437154371643717437184371943720437214372243723437244372543726437274372843729437304373143732437334373443735437364373743738437394374043741437424374343744437454374643747437484374943750437514375243753437544375543756437574375843759437604376143762437634376443765437664376743768437694377043771437724377343774437754377643777437784377943780437814378243783437844378543786437874378843789437904379143792437934379443795437964379743798437994380043801438024380343804438054380643807438084380943810438114381243813438144381543816438174381843819438204382143822438234382443825438264382743828438294383043831438324383343834438354383643837438384383943840438414384243843438444384543846438474384843849438504385143852438534385443855438564385743858438594386043861438624386343864438654386643867438684386943870438714387243873438744387543876438774387843879438804388143882438834388443885438864388743888438894389043891438924389343894438954389643897438984389943900439014390243903439044390543906439074390843909439104391143912439134391443915439164391743918439194392043921439224392343924439254392643927439284392943930439314393243933439344393543936439374393843939439404394143942439434394443945439464394743948439494395043951439524395343954439554395643957439584395943960439614396243963439644396543966439674396843969439704397143972439734397443975439764397743978439794398043981439824398343984439854398643987439884398943990439914399243993439944399543996439974399843999440004400144002440034400444005440064400744008440094401044011440124401344014440154401644017440184401944020440214402244023440244402544026440274402844029440304403144032440334403444035440364403744038440394404044041440424404344044440454404644047440484404944050440514405244053440544405544056440574405844059440604406144062440634406444065440664406744068440694407044071440724407344074440754407644077440784407944080440814408244083440844408544086440874408844089440904409144092440934409444095440964409744098440994410044101441024410344104441054410644107441084410944110441114411244113441144411544116441174411844119441204412144122441234412444125441264412744128441294413044131441324413344134441354413644137441384413944140441414414244143441444414544146441474414844149441504415144152441534415444155441564415744158441594416044161441624416344164441654416644167441684416944170441714417244173441744417544176441774417844179441804418144182441834418444185441864418744188441894419044191441924419344194441954419644197441984419944200442014420244203442044420544206442074420844209442104421144212442134421444215442164421744218442194422044221442224422344224442254422644227442284422944230442314423244233442344423544236442374423844239442404424144242442434424444245442464424744248442494425044251442524425344254442554425644257442584425944260442614426244263442644426544266442674426844269442704427144272442734427444275442764427744278442794428044281442824428344284442854428644287442884428944290442914429244293442944429544296442974429844299443004430144302443034430444305443064430744308443094431044311443124431344314443154431644317443184431944320443214432244323443244432544326443274432844329443304433144332443334433444335443364433744338443394434044341443424434344344443454434644347443484434944350443514435244353443544435544356443574435844359443604436144362443634436444365443664436744368443694437044371443724437344374443754437644377443784437944380443814438244383443844438544386443874438844389443904439144392443934439444395443964439744398443994440044401444024440344404444054440644407444084440944410444114441244413444144441544416444174441844419444204442144422444234442444425444264442744428444294443044431444324443344434444354443644437444384443944440444414444244443444444444544446444474444844449444504445144452444534445444455444564445744458444594446044461444624446344464444654446644467444684446944470444714447244473444744447544476444774447844479444804448144482444834448444485444864448744488444894449044491444924449344494444954449644497444984449944500445014450244503445044450544506445074450844509445104451144512445134451444515445164451744518445194452044521445224452344524445254452644527445284452944530445314453244533445344453544536445374453844539445404454144542445434454444545445464454744548445494455044551445524455344554445554455644557445584455944560445614456244563445644456544566445674456844569445704457144572445734457444575445764457744578445794458044581445824458344584445854458644587445884458944590445914459244593445944459544596445974459844599446004460144602446034460444605446064460744608446094461044611446124461344614446154461644617446184461944620446214462244623446244462544626446274462844629446304463144632446334463444635446364463744638446394464044641446424464344644446454464644647446484464944650446514465244653446544465544656446574465844659446604466144662446634466444665446664466744668446694467044671446724467344674446754467644677446784467944680446814468244683446844468544686446874468844689446904469144692446934469444695446964469744698446994470044701447024470344704447054470644707447084470944710447114471244713447144471544716447174471844719447204472144722447234472444725447264472744728447294473044731447324473344734447354473644737447384473944740447414474244743447444474544746447474474844749447504475144752447534475444755447564475744758447594476044761447624476344764447654476644767447684476944770447714477244773447744477544776447774477844779447804478144782447834478444785447864478744788447894479044791447924479344794447954479644797447984479944800448014480244803448044480544806448074480844809448104481144812448134481444815448164481744818448194482044821448224482344824448254482644827448284482944830448314483244833448344483544836448374483844839448404484144842448434484444845448464484744848448494485044851448524485344854448554485644857448584485944860448614486244863448644486544866448674486844869448704487144872448734487444875448764487744878448794488044881448824488344884448854488644887448884488944890448914489244893448944489544896448974489844899449004490144902449034490444905449064490744908449094491044911449124491344914449154491644917449184491944920449214492244923449244492544926449274492844929449304493144932449334493444935449364493744938449394494044941449424494344944449454494644947449484494944950449514495244953449544495544956449574495844959449604496144962449634496444965449664496744968449694497044971449724497344974449754497644977449784497944980449814498244983449844498544986449874498844989449904499144992449934499444995449964499744998449994500045001450024500345004450054500645007450084500945010450114501245013450144501545016450174501845019450204502145022450234502445025450264502745028450294503045031450324503345034450354503645037450384503945040450414504245043450444504545046450474504845049450504505145052450534505445055450564505745058450594506045061450624506345064450654506645067450684506945070450714507245073450744507545076450774507845079450804508145082450834508445085450864508745088450894509045091450924509345094450954509645097450984509945100451014510245103451044510545106451074510845109451104511145112451134511445115451164511745118451194512045121451224512345124451254512645127451284512945130451314513245133451344513545136451374513845139451404514145142451434514445145451464514745148451494515045151451524515345154451554515645157451584515945160451614516245163451644516545166451674516845169451704517145172451734517445175451764517745178451794518045181451824518345184451854518645187451884518945190451914519245193451944519545196451974519845199452004520145202452034520445205452064520745208452094521045211452124521345214452154521645217452184521945220452214522245223452244522545226452274522845229452304523145232452334523445235452364523745238452394524045241452424524345244452454524645247452484524945250452514525245253452544525545256452574525845259452604526145262452634526445265452664526745268452694527045271452724527345274452754527645277452784527945280452814528245283452844528545286452874528845289452904529145292452934529445295452964529745298452994530045301453024530345304453054530645307453084530945310453114531245313453144531545316453174531845319453204532145322453234532445325453264532745328453294533045331453324533345334453354533645337453384533945340453414534245343453444534545346453474534845349453504535145352453534535445355453564535745358453594536045361453624536345364453654536645367453684536945370453714537245373453744537545376453774537845379453804538145382453834538445385453864538745388453894539045391453924539345394453954539645397453984539945400454014540245403454044540545406454074540845409454104541145412454134541445415454164541745418454194542045421454224542345424454254542645427454284542945430454314543245433454344543545436454374543845439454404544145442454434544445445454464544745448454494545045451454524545345454454554545645457454584545945460454614546245463454644546545466454674546845469454704547145472454734547445475454764547745478454794548045481454824548345484454854548645487454884548945490454914549245493454944549545496454974549845499455004550145502455034550445505455064550745508455094551045511455124551345514455154551645517455184551945520455214552245523455244552545526455274552845529455304553145532455334553445535455364553745538455394554045541455424554345544455454554645547455484554945550455514555245553455544555545556455574555845559455604556145562455634556445565455664556745568455694557045571455724557345574455754557645577455784557945580455814558245583455844558545586455874558845589455904559145592455934559445595455964559745598455994560045601456024560345604456054560645607456084560945610456114561245613456144561545616456174561845619456204562145622456234562445625456264562745628456294563045631456324563345634456354563645637456384563945640456414564245643456444564545646456474564845649456504565145652456534565445655456564565745658456594566045661456624566345664456654566645667456684566945670456714567245673456744567545676456774567845679456804568145682456834568445685456864568745688456894569045691456924569345694456954569645697456984569945700457014570245703457044570545706457074570845709457104571145712457134571445715457164571745718457194572045721457224572345724457254572645727457284572945730457314573245733457344573545736457374573845739457404574145742457434574445745457464574745748457494575045751457524575345754457554575645757457584575945760457614576245763457644576545766457674576845769457704577145772457734577445775457764577745778457794578045781457824578345784457854578645787457884578945790457914579245793457944579545796457974579845799458004580145802458034580445805458064580745808458094581045811458124581345814458154581645817458184581945820458214582245823458244582545826458274582845829458304583145832458334583445835458364583745838458394584045841458424584345844458454584645847458484584945850458514585245853458544585545856458574585845859458604586145862458634586445865458664586745868458694587045871458724587345874458754587645877458784587945880458814588245883458844588545886458874588845889458904589145892458934589445895458964589745898458994590045901459024590345904459054590645907459084590945910459114591245913459144591545916459174591845919459204592145922459234592445925459264592745928459294593045931459324593345934459354593645937459384593945940459414594245943459444594545946459474594845949459504595145952459534595445955459564595745958459594596045961459624596345964459654596645967459684596945970459714597245973459744597545976459774597845979459804598145982459834598445985459864598745988459894599045991459924599345994459954599645997459984599946000460014600246003460044600546006460074600846009460104601146012460134601446015460164601746018460194602046021460224602346024460254602646027460284602946030460314603246033460344603546036460374603846039460404604146042460434604446045460464604746048460494605046051460524605346054460554605646057460584605946060460614606246063460644606546066460674606846069460704607146072460734607446075460764607746078460794608046081460824608346084460854608646087460884608946090460914609246093460944609546096460974609846099461004610146102461034610446105461064610746108461094611046111461124611346114461154611646117461184611946120461214612246123461244612546126461274612846129461304613146132461334613446135461364613746138461394614046141461424614346144461454614646147461484614946150461514615246153461544615546156461574615846159461604616146162461634616446165461664616746168461694617046171461724617346174461754617646177461784617946180461814618246183461844618546186461874618846189461904619146192461934619446195461964619746198461994620046201462024620346204462054620646207462084620946210462114621246213462144621546216462174621846219462204622146222462234622446225462264622746228462294623046231462324623346234462354623646237462384623946240462414624246243462444624546246462474624846249462504625146252462534625446255462564625746258462594626046261462624626346264462654626646267462684626946270462714627246273462744627546276462774627846279462804628146282462834628446285462864628746288462894629046291462924629346294462954629646297462984629946300463014630246303463044630546306463074630846309463104631146312463134631446315463164631746318463194632046321463224632346324463254632646327463284632946330463314633246333463344633546336463374633846339463404634146342463434634446345463464634746348463494635046351463524635346354463554635646357463584635946360463614636246363463644636546366463674636846369463704637146372463734637446375463764637746378463794638046381463824638346384463854638646387463884638946390463914639246393463944639546396463974639846399464004640146402464034640446405464064640746408464094641046411464124641346414464154641646417464184641946420464214642246423464244642546426464274642846429464304643146432464334643446435464364643746438464394644046441464424644346444464454644646447464484644946450464514645246453464544645546456464574645846459464604646146462464634646446465464664646746468464694647046471464724647346474464754647646477464784647946480464814648246483464844648546486464874648846489464904649146492464934649446495464964649746498464994650046501465024650346504465054650646507465084650946510465114651246513465144651546516465174651846519465204652146522465234652446525465264652746528465294653046531465324653346534465354653646537465384653946540465414654246543465444654546546465474654846549465504655146552465534655446555465564655746558465594656046561465624656346564465654656646567465684656946570465714657246573465744657546576465774657846579465804658146582465834658446585465864658746588465894659046591465924659346594465954659646597465984659946600466014660246603466044660546606466074660846609466104661146612466134661446615466164661746618466194662046621466224662346624466254662646627466284662946630466314663246633466344663546636466374663846639466404664146642466434664446645466464664746648466494665046651466524665346654466554665646657466584665946660466614666246663466644666546666466674666846669466704667146672466734667446675466764667746678466794668046681466824668346684466854668646687466884668946690466914669246693466944669546696466974669846699467004670146702467034670446705467064670746708467094671046711467124671346714467154671646717467184671946720467214672246723467244672546726467274672846729467304673146732467334673446735467364673746738467394674046741467424674346744467454674646747467484674946750467514675246753467544675546756467574675846759467604676146762467634676446765467664676746768467694677046771467724677346774467754677646777467784677946780467814678246783467844678546786467874678846789467904679146792467934679446795467964679746798467994680046801468024680346804468054680646807468084680946810468114681246813468144681546816468174681846819468204682146822468234682446825468264682746828468294683046831468324683346834468354683646837468384683946840468414684246843468444684546846468474684846849468504685146852468534685446855468564685746858468594686046861468624686346864468654686646867468684686946870468714687246873468744687546876468774687846879468804688146882468834688446885468864688746888468894689046891468924689346894468954689646897468984689946900469014690246903469044690546906469074690846909469104691146912469134691446915469164691746918469194692046921469224692346924469254692646927469284692946930469314693246933469344693546936469374693846939469404694146942469434694446945469464694746948469494695046951469524695346954469554695646957469584695946960469614696246963469644696546966469674696846969469704697146972469734697446975469764697746978469794698046981469824698346984469854698646987469884698946990469914699246993469944699546996469974699846999470004700147002470034700447005470064700747008470094701047011470124701347014470154701647017470184701947020470214702247023470244702547026470274702847029470304703147032470334703447035470364703747038470394704047041470424704347044470454704647047470484704947050470514705247053470544705547056470574705847059470604706147062470634706447065470664706747068470694707047071470724707347074470754707647077470784707947080470814708247083470844708547086470874708847089470904709147092470934709447095470964709747098470994710047101471024710347104471054710647107471084710947110471114711247113471144711547116471174711847119471204712147122471234712447125471264712747128471294713047131471324713347134471354713647137471384713947140471414714247143471444714547146471474714847149471504715147152471534715447155471564715747158471594716047161471624716347164471654716647167471684716947170471714717247173471744717547176471774717847179471804718147182471834718447185471864718747188471894719047191471924719347194471954719647197471984719947200472014720247203472044720547206472074720847209472104721147212472134721447215472164721747218472194722047221472224722347224472254722647227472284722947230472314723247233472344723547236472374723847239472404724147242472434724447245472464724747248472494725047251472524725347254472554725647257472584725947260472614726247263472644726547266472674726847269472704727147272472734727447275472764727747278472794728047281472824728347284472854728647287472884728947290472914729247293472944729547296472974729847299473004730147302473034730447305473064730747308473094731047311473124731347314473154731647317473184731947320473214732247323473244732547326473274732847329473304733147332473334733447335473364733747338473394734047341473424734347344473454734647347473484734947350473514735247353473544735547356473574735847359473604736147362473634736447365473664736747368473694737047371473724737347374473754737647377473784737947380473814738247383473844738547386473874738847389473904739147392473934739447395473964739747398473994740047401474024740347404474054740647407474084740947410474114741247413474144741547416474174741847419474204742147422474234742447425474264742747428474294743047431474324743347434474354743647437474384743947440474414744247443474444744547446474474744847449474504745147452474534745447455474564745747458474594746047461474624746347464474654746647467474684746947470474714747247473474744747547476474774747847479474804748147482474834748447485474864748747488474894749047491474924749347494474954749647497474984749947500475014750247503475044750547506475074750847509475104751147512475134751447515475164751747518475194752047521475224752347524475254752647527475284752947530475314753247533475344753547536475374753847539475404754147542475434754447545475464754747548475494755047551475524755347554475554755647557475584755947560475614756247563475644756547566475674756847569475704757147572475734757447575475764757747578475794758047581475824758347584475854758647587475884758947590475914759247593475944759547596475974759847599476004760147602476034760447605476064760747608476094761047611476124761347614476154761647617476184761947620476214762247623476244762547626476274762847629476304763147632476334763447635476364763747638476394764047641476424764347644476454764647647476484764947650476514765247653476544765547656476574765847659476604766147662476634766447665476664766747668476694767047671476724767347674476754767647677476784767947680476814768247683476844768547686476874768847689476904769147692476934769447695476964769747698476994770047701477024770347704477054770647707477084770947710477114771247713477144771547716477174771847719477204772147722477234772447725477264772747728477294773047731477324773347734477354773647737477384773947740477414774247743477444774547746477474774847749477504775147752477534775447755477564775747758477594776047761477624776347764477654776647767477684776947770477714777247773477744777547776477774777847779477804778147782477834778447785477864778747788477894779047791477924779347794477954779647797477984779947800478014780247803478044780547806478074780847809478104781147812478134781447815478164781747818478194782047821478224782347824478254782647827478284782947830478314783247833478344783547836478374783847839478404784147842478434784447845478464784747848478494785047851478524785347854478554785647857478584785947860478614786247863478644786547866478674786847869478704787147872478734787447875478764787747878478794788047881478824788347884478854788647887478884788947890478914789247893478944789547896478974789847899479004790147902479034790447905479064790747908479094791047911479124791347914479154791647917479184791947920479214792247923479244792547926479274792847929479304793147932479334793447935479364793747938479394794047941479424794347944479454794647947479484794947950479514795247953479544795547956479574795847959479604796147962479634796447965479664796747968479694797047971479724797347974479754797647977479784797947980479814798247983479844798547986479874798847989479904799147992479934799447995479964799747998479994800048001480024800348004480054800648007480084800948010480114801248013480144801548016480174801848019480204802148022480234802448025480264802748028480294803048031480324803348034480354803648037480384803948040480414804248043480444804548046480474804848049480504805148052480534805448055480564805748058480594806048061480624806348064480654806648067480684806948070480714807248073480744807548076480774807848079480804808148082480834808448085480864808748088480894809048091480924809348094480954809648097480984809948100481014810248103481044810548106481074810848109481104811148112481134811448115481164811748118481194812048121481224812348124481254812648127481284812948130481314813248133481344813548136481374813848139481404814148142481434814448145481464814748148481494815048151481524815348154481554815648157481584815948160481614816248163481644816548166481674816848169481704817148172481734817448175481764817748178481794818048181481824818348184481854818648187481884818948190481914819248193481944819548196481974819848199482004820148202482034820448205482064820748208482094821048211482124821348214482154821648217482184821948220482214822248223482244822548226482274822848229482304823148232482334823448235482364823748238482394824048241482424824348244482454824648247482484824948250482514825248253482544825548256482574825848259482604826148262482634826448265482664826748268482694827048271482724827348274482754827648277482784827948280482814828248283482844828548286482874828848289482904829148292482934829448295482964829748298482994830048301483024830348304483054830648307483084830948310483114831248313483144831548316483174831848319483204832148322483234832448325483264832748328483294833048331483324833348334483354833648337483384833948340483414834248343483444834548346483474834848349483504835148352483534835448355483564835748358483594836048361483624836348364483654836648367483684836948370483714837248373483744837548376483774837848379483804838148382483834838448385483864838748388483894839048391483924839348394483954839648397483984839948400484014840248403484044840548406484074840848409484104841148412484134841448415484164841748418484194842048421484224842348424484254842648427484284842948430484314843248433484344843548436484374843848439484404844148442484434844448445484464844748448484494845048451484524845348454484554845648457484584845948460484614846248463484644846548466484674846848469484704847148472484734847448475484764847748478484794848048481484824848348484484854848648487484884848948490484914849248493484944849548496484974849848499485004850148502485034850448505485064850748508485094851048511485124851348514485154851648517485184851948520485214852248523485244852548526485274852848529485304853148532485334853448535485364853748538485394854048541485424854348544485454854648547485484854948550485514855248553485544855548556485574855848559485604856148562485634856448565485664856748568485694857048571485724857348574485754857648577485784857948580485814858248583485844858548586485874858848589485904859148592485934859448595485964859748598485994860048601486024860348604486054860648607486084860948610486114861248613486144861548616486174861848619486204862148622486234862448625486264862748628486294863048631486324863348634486354863648637486384863948640486414864248643486444864548646486474864848649486504865148652486534865448655486564865748658486594866048661486624866348664486654866648667486684866948670486714867248673486744867548676486774867848679486804868148682486834868448685486864868748688486894869048691486924869348694486954869648697486984869948700487014870248703487044870548706487074870848709487104871148712487134871448715487164871748718487194872048721487224872348724487254872648727487284872948730487314873248733487344873548736487374873848739487404874148742487434874448745487464874748748487494875048751487524875348754487554875648757487584875948760487614876248763487644876548766487674876848769487704877148772487734877448775487764877748778487794878048781487824878348784487854878648787487884878948790487914879248793487944879548796487974879848799488004880148802488034880448805488064880748808488094881048811
  1. STM32H7-node-red-CM7.elf: file format elf32-littlearm
  2. Sections:
  3. Idx Name Size VMA LMA File off Algn
  4. 0 .isr_vector 00000298 08000000 08000000 00001000 2**0
  5. CONTENTS, ALLOC, LOAD, READONLY, DATA
  6. 1 .text 00013fd8 080002a0 080002a0 000012a0 2**4
  7. CONTENTS, ALLOC, LOAD, READONLY, CODE
  8. 2 .rodata 00003e44 08014278 08014278 00015278 2**2
  9. CONTENTS, ALLOC, LOAD, READONLY, DATA
  10. 3 .ARM.extab 00000000 080180bc 080180bc 0001a08c 2**0
  11. CONTENTS
  12. 4 .ARM 00000008 080180bc 080180bc 000190bc 2**2
  13. CONTENTS, ALLOC, LOAD, READONLY, DATA
  14. 5 .preinit_array 00000000 080180c4 080180c4 0001a08c 2**0
  15. CONTENTS, ALLOC, LOAD, DATA
  16. 6 .init_array 00000004 080180c4 080180c4 000190c4 2**2
  17. CONTENTS, ALLOC, LOAD, READONLY, DATA
  18. 7 .fini_array 00000004 080180c8 080180c8 000190c8 2**2
  19. CONTENTS, ALLOC, LOAD, READONLY, DATA
  20. 8 .data 0000008c 24000000 080180cc 0001a000 2**2
  21. CONTENTS, ALLOC, LOAD, DATA
  22. 9 .bss 00019d10 2400008c 08018158 0001a08c 2**2
  23. ALLOC
  24. 10 ._user_heap_stack 00000604 24019d9c 08018158 0001ad9c 2**0
  25. ALLOC
  26. 11 .lwip_sec 00024b83 30020000 30020000 0001b000 2**2
  27. ALLOC
  28. 12 .ARM.attributes 0000002e 00000000 00000000 0001a08c 2**0
  29. CONTENTS, READONLY
  30. 13 .debug_info 00057232 00000000 00000000 0001a0ba 2**0
  31. CONTENTS, READONLY, DEBUGGING, OCTETS
  32. 14 .debug_abbrev 0000ab68 00000000 00000000 000712ec 2**0
  33. CONTENTS, READONLY, DEBUGGING, OCTETS
  34. 15 .debug_loclists 0001f9dd 00000000 00000000 0007be54 2**0
  35. CONTENTS, READONLY, DEBUGGING, OCTETS
  36. 16 .debug_aranges 00002c80 00000000 00000000 0009b838 2**3
  37. CONTENTS, READONLY, DEBUGGING, OCTETS
  38. 17 .debug_rnglists 000028cc 00000000 00000000 0009e4b8 2**0
  39. CONTENTS, READONLY, DEBUGGING, OCTETS
  40. 18 .debug_macro 0004c109 00000000 00000000 000a0d84 2**0
  41. CONTENTS, READONLY, DEBUGGING, OCTETS
  42. 19 .debug_line 00057a8c 00000000 00000000 000ece8d 2**0
  43. CONTENTS, READONLY, DEBUGGING, OCTETS
  44. 20 .debug_str 001a9140 00000000 00000000 00144919 2**0
  45. CONTENTS, READONLY, DEBUGGING, OCTETS
  46. 21 .comment 00000043 00000000 00000000 002eda59 2**0
  47. CONTENTS, READONLY
  48. 22 .debug_frame 00008c70 00000000 00000000 002eda9c 2**2
  49. CONTENTS, READONLY, DEBUGGING, OCTETS
  50. 23 .debug_line_str 00000064 00000000 00000000 002f670c 2**0
  51. CONTENTS, READONLY, DEBUGGING, OCTETS
  52. Disassembly of section .text:
  53. 080002a0 <__do_global_dtors_aux>:
  54. 80002a0: b510 push {r4, lr}
  55. 80002a2: 4c05 ldr r4, [pc, #20] @ (80002b8 <__do_global_dtors_aux+0x18>)
  56. 80002a4: 7823 ldrb r3, [r4, #0]
  57. 80002a6: b933 cbnz r3, 80002b6 <__do_global_dtors_aux+0x16>
  58. 80002a8: 4b04 ldr r3, [pc, #16] @ (80002bc <__do_global_dtors_aux+0x1c>)
  59. 80002aa: b113 cbz r3, 80002b2 <__do_global_dtors_aux+0x12>
  60. 80002ac: 4804 ldr r0, [pc, #16] @ (80002c0 <__do_global_dtors_aux+0x20>)
  61. 80002ae: f3af 8000 nop.w
  62. 80002b2: 2301 movs r3, #1
  63. 80002b4: 7023 strb r3, [r4, #0]
  64. 80002b6: bd10 pop {r4, pc}
  65. 80002b8: 2400008c .word 0x2400008c
  66. 80002bc: 00000000 .word 0x00000000
  67. 80002c0: 08014260 .word 0x08014260
  68. 080002c4 <frame_dummy>:
  69. 80002c4: b508 push {r3, lr}
  70. 80002c6: 4b03 ldr r3, [pc, #12] @ (80002d4 <frame_dummy+0x10>)
  71. 80002c8: b11b cbz r3, 80002d2 <frame_dummy+0xe>
  72. 80002ca: 4903 ldr r1, [pc, #12] @ (80002d8 <frame_dummy+0x14>)
  73. 80002cc: 4803 ldr r0, [pc, #12] @ (80002dc <frame_dummy+0x18>)
  74. 80002ce: f3af 8000 nop.w
  75. 80002d2: bd08 pop {r3, pc}
  76. 80002d4: 00000000 .word 0x00000000
  77. 80002d8: 24000090 .word 0x24000090
  78. 80002dc: 08014260 .word 0x08014260
  79. 080002e0 <strcmp>:
  80. 80002e0: f810 2b01 ldrb.w r2, [r0], #1
  81. 80002e4: f811 3b01 ldrb.w r3, [r1], #1
  82. 80002e8: 2a01 cmp r2, #1
  83. 80002ea: bf28 it cs
  84. 80002ec: 429a cmpcs r2, r3
  85. 80002ee: d0f7 beq.n 80002e0 <strcmp>
  86. 80002f0: 1ad0 subs r0, r2, r3
  87. 80002f2: 4770 bx lr
  88. 080002f4 <strlen>:
  89. 80002f4: 4603 mov r3, r0
  90. 80002f6: f813 2b01 ldrb.w r2, [r3], #1
  91. 80002fa: 2a00 cmp r2, #0
  92. 80002fc: d1fb bne.n 80002f6 <strlen+0x2>
  93. 80002fe: 1a18 subs r0, r3, r0
  94. 8000300: 3801 subs r0, #1
  95. 8000302: 4770 bx lr
  96. ...
  97. 08000310 <memchr>:
  98. 8000310: f001 01ff and.w r1, r1, #255 @ 0xff
  99. 8000314: 2a10 cmp r2, #16
  100. 8000316: db2b blt.n 8000370 <memchr+0x60>
  101. 8000318: f010 0f07 tst.w r0, #7
  102. 800031c: d008 beq.n 8000330 <memchr+0x20>
  103. 800031e: f810 3b01 ldrb.w r3, [r0], #1
  104. 8000322: 3a01 subs r2, #1
  105. 8000324: 428b cmp r3, r1
  106. 8000326: d02d beq.n 8000384 <memchr+0x74>
  107. 8000328: f010 0f07 tst.w r0, #7
  108. 800032c: b342 cbz r2, 8000380 <memchr+0x70>
  109. 800032e: d1f6 bne.n 800031e <memchr+0xe>
  110. 8000330: b4f0 push {r4, r5, r6, r7}
  111. 8000332: ea41 2101 orr.w r1, r1, r1, lsl #8
  112. 8000336: ea41 4101 orr.w r1, r1, r1, lsl #16
  113. 800033a: f022 0407 bic.w r4, r2, #7
  114. 800033e: f07f 0700 mvns.w r7, #0
  115. 8000342: 2300 movs r3, #0
  116. 8000344: e8f0 5602 ldrd r5, r6, [r0], #8
  117. 8000348: 3c08 subs r4, #8
  118. 800034a: ea85 0501 eor.w r5, r5, r1
  119. 800034e: ea86 0601 eor.w r6, r6, r1
  120. 8000352: fa85 f547 uadd8 r5, r5, r7
  121. 8000356: faa3 f587 sel r5, r3, r7
  122. 800035a: fa86 f647 uadd8 r6, r6, r7
  123. 800035e: faa5 f687 sel r6, r5, r7
  124. 8000362: b98e cbnz r6, 8000388 <memchr+0x78>
  125. 8000364: d1ee bne.n 8000344 <memchr+0x34>
  126. 8000366: bcf0 pop {r4, r5, r6, r7}
  127. 8000368: f001 01ff and.w r1, r1, #255 @ 0xff
  128. 800036c: f002 0207 and.w r2, r2, #7
  129. 8000370: b132 cbz r2, 8000380 <memchr+0x70>
  130. 8000372: f810 3b01 ldrb.w r3, [r0], #1
  131. 8000376: 3a01 subs r2, #1
  132. 8000378: ea83 0301 eor.w r3, r3, r1
  133. 800037c: b113 cbz r3, 8000384 <memchr+0x74>
  134. 800037e: d1f8 bne.n 8000372 <memchr+0x62>
  135. 8000380: 2000 movs r0, #0
  136. 8000382: 4770 bx lr
  137. 8000384: 3801 subs r0, #1
  138. 8000386: 4770 bx lr
  139. 8000388: 2d00 cmp r5, #0
  140. 800038a: bf06 itte eq
  141. 800038c: 4635 moveq r5, r6
  142. 800038e: 3803 subeq r0, #3
  143. 8000390: 3807 subne r0, #7
  144. 8000392: f015 0f01 tst.w r5, #1
  145. 8000396: d107 bne.n 80003a8 <memchr+0x98>
  146. 8000398: 3001 adds r0, #1
  147. 800039a: f415 7f80 tst.w r5, #256 @ 0x100
  148. 800039e: bf02 ittt eq
  149. 80003a0: 3001 addeq r0, #1
  150. 80003a2: f415 3fc0 tsteq.w r5, #98304 @ 0x18000
  151. 80003a6: 3001 addeq r0, #1
  152. 80003a8: bcf0 pop {r4, r5, r6, r7}
  153. 80003aa: 3801 subs r0, #1
  154. 80003ac: 4770 bx lr
  155. 80003ae: bf00 nop
  156. 080003b0 <SystemInit>:
  157. */
  158. void SystemInit (void)
  159. {
  160. /* FPU settings ------------------------------------------------------------*/
  161. #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
  162. SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2))); /* set CP10 and CP11 Full Access */
  163. 80003b0: 4b2d ldr r3, [pc, #180] @ (8000468 <SystemInit+0xb8>)
  164. 80003b2: f8d3 2088 ldr.w r2, [r3, #136] @ 0x88
  165. 80003b6: f442 0270 orr.w r2, r2, #15728640 @ 0xf00000
  166. 80003ba: f8c3 2088 str.w r2, [r3, #136] @ 0x88
  167. #endif
  168. /*SEVONPEND enabled so that an interrupt coming from the CPU(n) interrupt signal is
  169. detectable by the CPU after a WFI/WFE instruction.*/
  170. SCB->SCR |= SCB_SCR_SEVONPEND_Msk;
  171. 80003be: 691a ldr r2, [r3, #16]
  172. 80003c0: f042 0210 orr.w r2, r2, #16
  173. 80003c4: 611a str r2, [r3, #16]
  174. #if defined(CORE_CM7)
  175. /* Reset the RCC clock configuration to the default reset state ------------*/
  176. /* Increasing the CPU frequency */
  177. if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY)))
  178. 80003c6: 4b29 ldr r3, [pc, #164] @ (800046c <SystemInit+0xbc>)
  179. 80003c8: 681b ldr r3, [r3, #0]
  180. 80003ca: f003 030f and.w r3, r3, #15
  181. 80003ce: 2b06 cmp r3, #6
  182. 80003d0: d806 bhi.n 80003e0 <SystemInit+0x30>
  183. {
  184. /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
  185. MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT));
  186. 80003d2: 4a26 ldr r2, [pc, #152] @ (800046c <SystemInit+0xbc>)
  187. 80003d4: 6813 ldr r3, [r2, #0]
  188. 80003d6: f023 030f bic.w r3, r3, #15
  189. 80003da: f043 0307 orr.w r3, r3, #7
  190. 80003de: 6013 str r3, [r2, #0]
  191. }
  192. /* Set HSION bit */
  193. RCC->CR |= RCC_CR_HSION;
  194. 80003e0: 4b23 ldr r3, [pc, #140] @ (8000470 <SystemInit+0xc0>)
  195. 80003e2: 681a ldr r2, [r3, #0]
  196. 80003e4: f042 0201 orr.w r2, r2, #1
  197. 80003e8: 601a str r2, [r3, #0]
  198. /* Reset CFGR register */
  199. RCC->CFGR = 0x00000000;
  200. 80003ea: 2200 movs r2, #0
  201. 80003ec: 611a str r2, [r3, #16]
  202. /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */
  203. RCC->CR &= 0xEAF6ED7FU;
  204. 80003ee: 6819 ldr r1, [r3, #0]
  205. 80003f0: 4a20 ldr r2, [pc, #128] @ (8000474 <SystemInit+0xc4>)
  206. 80003f2: 400a ands r2, r1
  207. 80003f4: 601a str r2, [r3, #0]
  208. /* Decreasing the number of wait states because of lower CPU frequency */
  209. if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY)))
  210. 80003f6: 4b1d ldr r3, [pc, #116] @ (800046c <SystemInit+0xbc>)
  211. 80003f8: 681b ldr r3, [r3, #0]
  212. 80003fa: f013 0f08 tst.w r3, #8
  213. 80003fe: d006 beq.n 800040e <SystemInit+0x5e>
  214. {
  215. /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */
  216. MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT));
  217. 8000400: 4a1a ldr r2, [pc, #104] @ (800046c <SystemInit+0xbc>)
  218. 8000402: 6813 ldr r3, [r2, #0]
  219. 8000404: f023 030f bic.w r3, r3, #15
  220. 8000408: f043 0307 orr.w r3, r3, #7
  221. 800040c: 6013 str r3, [r2, #0]
  222. }
  223. /* Reset D1CFGR register */
  224. RCC->D1CFGR = 0x00000000;
  225. 800040e: 4b18 ldr r3, [pc, #96] @ (8000470 <SystemInit+0xc0>)
  226. 8000410: 2200 movs r2, #0
  227. 8000412: 619a str r2, [r3, #24]
  228. /* Reset D2CFGR register */
  229. RCC->D2CFGR = 0x00000000;
  230. 8000414: 61da str r2, [r3, #28]
  231. /* Reset D3CFGR register */
  232. RCC->D3CFGR = 0x00000000;
  233. 8000416: 621a str r2, [r3, #32]
  234. /* Reset PLLCKSELR register */
  235. RCC->PLLCKSELR = 0x02020200;
  236. 8000418: 4917 ldr r1, [pc, #92] @ (8000478 <SystemInit+0xc8>)
  237. 800041a: 6299 str r1, [r3, #40] @ 0x28
  238. /* Reset PLLCFGR register */
  239. RCC->PLLCFGR = 0x01FF0000;
  240. 800041c: 4917 ldr r1, [pc, #92] @ (800047c <SystemInit+0xcc>)
  241. 800041e: 62d9 str r1, [r3, #44] @ 0x2c
  242. /* Reset PLL1DIVR register */
  243. RCC->PLL1DIVR = 0x01010280;
  244. 8000420: 4917 ldr r1, [pc, #92] @ (8000480 <SystemInit+0xd0>)
  245. 8000422: 6319 str r1, [r3, #48] @ 0x30
  246. /* Reset PLL1FRACR register */
  247. RCC->PLL1FRACR = 0x00000000;
  248. 8000424: 635a str r2, [r3, #52] @ 0x34
  249. /* Reset PLL2DIVR register */
  250. RCC->PLL2DIVR = 0x01010280;
  251. 8000426: 6399 str r1, [r3, #56] @ 0x38
  252. /* Reset PLL2FRACR register */
  253. RCC->PLL2FRACR = 0x00000000;
  254. 8000428: 63da str r2, [r3, #60] @ 0x3c
  255. /* Reset PLL3DIVR register */
  256. RCC->PLL3DIVR = 0x01010280;
  257. 800042a: 6419 str r1, [r3, #64] @ 0x40
  258. /* Reset PLL3FRACR register */
  259. RCC->PLL3FRACR = 0x00000000;
  260. 800042c: 645a str r2, [r3, #68] @ 0x44
  261. /* Reset HSEBYP bit */
  262. RCC->CR &= 0xFFFBFFFFU;
  263. 800042e: 6819 ldr r1, [r3, #0]
  264. 8000430: f421 2180 bic.w r1, r1, #262144 @ 0x40000
  265. 8000434: 6019 str r1, [r3, #0]
  266. /* Disable all interrupts */
  267. RCC->CIER = 0x00000000;
  268. 8000436: 661a str r2, [r3, #96] @ 0x60
  269. /* Enable CortexM7 HSEM EXTI line (line 78)*/
  270. EXTI_D2->EMR3 |= 0x4000UL;
  271. 8000438: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000
  272. 800043c: f8d2 30e4 ldr.w r3, [r2, #228] @ 0xe4
  273. 8000440: f443 4380 orr.w r3, r3, #16384 @ 0x4000
  274. 8000444: f8c2 30e4 str.w r3, [r2, #228] @ 0xe4
  275. if((DBGMCU->IDCODE & 0xFFFF0000U) < 0x20000000U)
  276. 8000448: 4b0e ldr r3, [pc, #56] @ (8000484 <SystemInit+0xd4>)
  277. 800044a: 681a ldr r2, [r3, #0]
  278. 800044c: 4b0e ldr r3, [pc, #56] @ (8000488 <SystemInit+0xd8>)
  279. 800044e: 4013 ands r3, r2
  280. 8000450: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000
  281. 8000454: d203 bcs.n 800045e <SystemInit+0xae>
  282. {
  283. /* if stm32h7 revY*/
  284. /* Change the switch matrix read issuing capability to 1 for the AXI SRAM target (Target 7) */
  285. *((__IO uint32_t*)0x51008108) = 0x000000001U;
  286. 8000456: 4b0d ldr r3, [pc, #52] @ (800048c <SystemInit+0xdc>)
  287. 8000458: 2201 movs r2, #1
  288. 800045a: f8c3 2108 str.w r2, [r3, #264] @ 0x108
  289. /*
  290. * Disable the FMC bank1 (enabled after reset).
  291. * This, prevents CPU speculation access on this bank which blocks the use of FMC during
  292. * 24us. During this time the others FMC master (such as LTDC) cannot use it!
  293. */
  294. FMC_Bank1_R->BTCR[0] = 0x000030D2;
  295. 800045e: 4b0c ldr r3, [pc, #48] @ (8000490 <SystemInit+0xe0>)
  296. 8000460: f243 02d2 movw r2, #12498 @ 0x30d2
  297. 8000464: 601a str r2, [r3, #0]
  298. #endif /* USER_VECT_TAB_ADDRESS */
  299. #else
  300. #error Please #define CORE_CM4 or CORE_CM7
  301. #endif /* CORE_CM4 */
  302. }
  303. 8000466: 4770 bx lr
  304. 8000468: e000ed00 .word 0xe000ed00
  305. 800046c: 52002000 .word 0x52002000
  306. 8000470: 58024400 .word 0x58024400
  307. 8000474: eaf6ed7f .word 0xeaf6ed7f
  308. 8000478: 02020200 .word 0x02020200
  309. 800047c: 01ff0000 .word 0x01ff0000
  310. 8000480: 01010280 .word 0x01010280
  311. 8000484: 5c001000 .word 0x5c001000
  312. 8000488: ffff0000 .word 0xffff0000
  313. 800048c: 51008000 .word 0x51008000
  314. 8000490: 52004000 .word 0x52004000
  315. 08000494 <vApplicationStackOverflowHook>:
  316. void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName)
  317. {
  318. /* ETH_CODE: add breakpoint when stack oveflow is detected by FreeRTOS.
  319. * Useful for debugging issues.
  320. */
  321. __BKPT(0);
  322. 8000494: be00 bkpt 0x0000
  323. }
  324. 8000496: 4770 bx lr
  325. 08000498 <MX_GPIO_Init>:
  326. * @brief GPIO Initialization Function
  327. * @param None
  328. * @retval None
  329. */
  330. static void MX_GPIO_Init(void)
  331. {
  332. 8000498: b088 sub sp, #32
  333. /* GPIO Ports Clock Enable */
  334. __HAL_RCC_GPIOG_CLK_ENABLE();
  335. 800049a: 4b2b ldr r3, [pc, #172] @ (8000548 <MX_GPIO_Init+0xb0>)
  336. 800049c: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  337. 80004a0: f042 0240 orr.w r2, r2, #64 @ 0x40
  338. 80004a4: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  339. 80004a8: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  340. 80004ac: f002 0240 and.w r2, r2, #64 @ 0x40
  341. 80004b0: 9201 str r2, [sp, #4]
  342. 80004b2: 9a01 ldr r2, [sp, #4]
  343. __HAL_RCC_GPIOA_CLK_ENABLE();
  344. 80004b4: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  345. 80004b8: f042 0201 orr.w r2, r2, #1
  346. 80004bc: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  347. 80004c0: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  348. 80004c4: f002 0201 and.w r2, r2, #1
  349. 80004c8: 9202 str r2, [sp, #8]
  350. 80004ca: 9a02 ldr r2, [sp, #8]
  351. __HAL_RCC_GPIOC_CLK_ENABLE();
  352. 80004cc: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  353. 80004d0: f042 0204 orr.w r2, r2, #4
  354. 80004d4: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  355. 80004d8: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  356. 80004dc: f002 0204 and.w r2, r2, #4
  357. 80004e0: 9203 str r2, [sp, #12]
  358. 80004e2: 9a03 ldr r2, [sp, #12]
  359. __HAL_RCC_GPIOE_CLK_ENABLE();
  360. 80004e4: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  361. 80004e8: f042 0210 orr.w r2, r2, #16
  362. 80004ec: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  363. 80004f0: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  364. 80004f4: f002 0210 and.w r2, r2, #16
  365. 80004f8: 9204 str r2, [sp, #16]
  366. 80004fa: 9a04 ldr r2, [sp, #16]
  367. __HAL_RCC_GPIOB_CLK_ENABLE();
  368. 80004fc: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  369. 8000500: f042 0202 orr.w r2, r2, #2
  370. 8000504: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  371. 8000508: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  372. 800050c: f002 0202 and.w r2, r2, #2
  373. 8000510: 9205 str r2, [sp, #20]
  374. 8000512: 9a05 ldr r2, [sp, #20]
  375. __HAL_RCC_GPIOI_CLK_ENABLE();
  376. 8000514: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  377. 8000518: f442 7280 orr.w r2, r2, #256 @ 0x100
  378. 800051c: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  379. 8000520: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  380. 8000524: f402 7280 and.w r2, r2, #256 @ 0x100
  381. 8000528: 9206 str r2, [sp, #24]
  382. 800052a: 9a06 ldr r2, [sp, #24]
  383. __HAL_RCC_GPIOH_CLK_ENABLE();
  384. 800052c: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  385. 8000530: f042 0280 orr.w r2, r2, #128 @ 0x80
  386. 8000534: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  387. 8000538: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0
  388. 800053c: f003 0380 and.w r3, r3, #128 @ 0x80
  389. 8000540: 9307 str r3, [sp, #28]
  390. 8000542: 9b07 ldr r3, [sp, #28]
  391. }
  392. 8000544: b008 add sp, #32
  393. 8000546: 4770 bx lr
  394. 8000548: 58024400 .word 0x58024400
  395. 0800054c <MPU_Config>:
  396. }
  397. /* MPU Configuration */
  398. void MPU_Config(void)
  399. {
  400. 800054c: b530 push {r4, r5, lr}
  401. 800054e: b085 sub sp, #20
  402. MPU_Region_InitTypeDef MPU_InitStruct = {0};
  403. 8000550: 2400 movs r4, #0
  404. 8000552: 9400 str r4, [sp, #0]
  405. 8000554: 9401 str r4, [sp, #4]
  406. 8000556: 9402 str r4, [sp, #8]
  407. 8000558: 9403 str r4, [sp, #12]
  408. /* Disables the MPU */
  409. HAL_MPU_Disable();
  410. 800055a: f000 fd13 bl 8000f84 <HAL_MPU_Disable>
  411. /** Initializes and configures the Region and the memory to be protected
  412. */
  413. MPU_InitStruct.Enable = MPU_REGION_ENABLE;
  414. 800055e: 2501 movs r5, #1
  415. 8000560: f88d 5000 strb.w r5, [sp]
  416. MPU_InitStruct.Number = MPU_REGION_NUMBER0;
  417. 8000564: f88d 4001 strb.w r4, [sp, #1]
  418. MPU_InitStruct.BaseAddress = 0x0;
  419. 8000568: 9401 str r4, [sp, #4]
  420. MPU_InitStruct.Size = MPU_REGION_SIZE_4GB;
  421. 800056a: 231f movs r3, #31
  422. 800056c: f88d 3008 strb.w r3, [sp, #8]
  423. MPU_InitStruct.SubRegionDisable = 0x87;
  424. 8000570: 2387 movs r3, #135 @ 0x87
  425. 8000572: f88d 3009 strb.w r3, [sp, #9]
  426. MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
  427. 8000576: f88d 400a strb.w r4, [sp, #10]
  428. MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
  429. 800057a: f88d 400b strb.w r4, [sp, #11]
  430. MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
  431. 800057e: f88d 500c strb.w r5, [sp, #12]
  432. MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
  433. 8000582: f88d 500d strb.w r5, [sp, #13]
  434. MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
  435. 8000586: f88d 400e strb.w r4, [sp, #14]
  436. MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
  437. 800058a: f88d 400f strb.w r4, [sp, #15]
  438. HAL_MPU_ConfigRegion(&MPU_InitStruct);
  439. 800058e: 4668 mov r0, sp
  440. 8000590: f000 fd16 bl 8000fc0 <HAL_MPU_ConfigRegion>
  441. /** Initializes and configures the Region and the memory to be protected
  442. */
  443. MPU_InitStruct.Number = MPU_REGION_NUMBER1;
  444. 8000594: f88d 5001 strb.w r5, [sp, #1]
  445. MPU_InitStruct.BaseAddress = 0x30020000;
  446. 8000598: 4b13 ldr r3, [pc, #76] @ (80005e8 <MPU_Config+0x9c>)
  447. 800059a: 9301 str r3, [sp, #4]
  448. MPU_InitStruct.Size = MPU_REGION_SIZE_128KB;
  449. 800059c: 2310 movs r3, #16
  450. 800059e: f88d 3008 strb.w r3, [sp, #8]
  451. MPU_InitStruct.SubRegionDisable = 0x0;
  452. 80005a2: f88d 4009 strb.w r4, [sp, #9]
  453. MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1;
  454. 80005a6: f88d 500a strb.w r5, [sp, #10]
  455. MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
  456. 80005aa: 2303 movs r3, #3
  457. 80005ac: f88d 300b strb.w r3, [sp, #11]
  458. MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
  459. 80005b0: f88d 400d strb.w r4, [sp, #13]
  460. HAL_MPU_ConfigRegion(&MPU_InitStruct);
  461. 80005b4: 4668 mov r0, sp
  462. 80005b6: f000 fd03 bl 8000fc0 <HAL_MPU_ConfigRegion>
  463. /** Initializes and configures the Region and the memory to be protected
  464. */
  465. MPU_InitStruct.Number = MPU_REGION_NUMBER2;
  466. 80005ba: 2302 movs r3, #2
  467. 80005bc: f88d 3001 strb.w r3, [sp, #1]
  468. MPU_InitStruct.BaseAddress = 0x30040000;
  469. 80005c0: 4b0a ldr r3, [pc, #40] @ (80005ec <MPU_Config+0xa0>)
  470. 80005c2: 9301 str r3, [sp, #4]
  471. MPU_InitStruct.Size = MPU_REGION_SIZE_512B;
  472. 80005c4: 2308 movs r3, #8
  473. 80005c6: f88d 3008 strb.w r3, [sp, #8]
  474. MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
  475. 80005ca: f88d 400a strb.w r4, [sp, #10]
  476. MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
  477. 80005ce: f88d 500d strb.w r5, [sp, #13]
  478. MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE;
  479. 80005d2: f88d 500f strb.w r5, [sp, #15]
  480. HAL_MPU_ConfigRegion(&MPU_InitStruct);
  481. 80005d6: 4668 mov r0, sp
  482. 80005d8: f000 fcf2 bl 8000fc0 <HAL_MPU_ConfigRegion>
  483. /* Enables the MPU */
  484. HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
  485. 80005dc: 2004 movs r0, #4
  486. 80005de: f000 fcdf bl 8000fa0 <HAL_MPU_Enable>
  487. }
  488. 80005e2: b005 add sp, #20
  489. 80005e4: bd30 pop {r4, r5, pc}
  490. 80005e6: bf00 nop
  491. 80005e8: 30020000 .word 0x30020000
  492. 80005ec: 30040000 .word 0x30040000
  493. 080005f0 <StartDefaultTask>:
  494. {
  495. 80005f0: b508 push {r3, lr}
  496. MX_LWIP_Init();
  497. 80005f2: f002 fef3 bl 80033dc <MX_LWIP_Init>
  498. 80005f6: e002 b.n 80005fe <StartDefaultTask+0xe>
  499. my_counter = 0;
  500. 80005f8: 4613 mov r3, r2
  501. 80005fa: 2200 movs r2, #0
  502. 80005fc: 601a str r2, [r3, #0]
  503. osDelay(pdMS_TO_TICKS(1000));
  504. 80005fe: f44f 707a mov.w r0, #1000 @ 0x3e8
  505. 8000602: f003 fc4b bl 8003e9c <osDelay>
  506. my_counter++;
  507. 8000606: 4a03 ldr r2, [pc, #12] @ (8000614 <StartDefaultTask+0x24>)
  508. 8000608: 6813 ldr r3, [r2, #0]
  509. 800060a: 3301 adds r3, #1
  510. 800060c: 6013 str r3, [r2, #0]
  511. if(my_counter > 10)
  512. 800060e: 2b0a cmp r3, #10
  513. 8000610: d9f5 bls.n 80005fe <StartDefaultTask+0xe>
  514. 8000612: e7f1 b.n 80005f8 <StartDefaultTask+0x8>
  515. 8000614: 240000a8 .word 0x240000a8
  516. 08000618 <HAL_TIM_PeriodElapsedCallback>:
  517. * a global variable "uwTick" used as application time base.
  518. * @param htim : TIM handle
  519. * @retval None
  520. */
  521. void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
  522. {
  523. 8000618: b508 push {r3, lr}
  524. /* USER CODE BEGIN Callback 0 */
  525. /* USER CODE END Callback 0 */
  526. if (htim->Instance == TIM6) {
  527. 800061a: 6802 ldr r2, [r0, #0]
  528. 800061c: 4b05 ldr r3, [pc, #20] @ (8000634 <HAL_TIM_PeriodElapsedCallback+0x1c>)
  529. 800061e: 429a cmp r2, r3
  530. 8000620: d000 beq.n 8000624 <HAL_TIM_PeriodElapsedCallback+0xc>
  531. MilliTimer++;
  532. }
  533. /* USER CODE BEGIN Callback 1 */
  534. /* USER CODE END Callback 1 */
  535. }
  536. 8000622: bd08 pop {r3, pc}
  537. HAL_IncTick();
  538. 8000624: f000 fc26 bl 8000e74 <HAL_IncTick>
  539. MilliTimer++;
  540. 8000628: 4a03 ldr r2, [pc, #12] @ (8000638 <HAL_TIM_PeriodElapsedCallback+0x20>)
  541. 800062a: 6813 ldr r3, [r2, #0]
  542. 800062c: 3301 adds r3, #1
  543. 800062e: 6013 str r3, [r2, #0]
  544. }
  545. 8000630: e7f7 b.n 8000622 <HAL_TIM_PeriodElapsedCallback+0xa>
  546. 8000632: bf00 nop
  547. 8000634: 40001000 .word 0x40001000
  548. 8000638: 24019c48 .word 0x24019c48
  549. 0800063c <Error_Handler>:
  550. \details Disables IRQ interrupts by setting the I-bit in the CPSR.
  551. Can only be executed in Privileged modes.
  552. */
  553. __STATIC_FORCEINLINE void __disable_irq(void)
  554. {
  555. __ASM volatile ("cpsid i" : : : "memory");
  556. 800063c: b672 cpsid i
  557. void Error_Handler(void)
  558. {
  559. /* USER CODE BEGIN Error_Handler_Debug */
  560. /* User can add his own implementation to report the HAL error return state */
  561. __disable_irq();
  562. while (1)
  563. 800063e: e7fe b.n 800063e <Error_Handler+0x2>
  564. 08000640 <SystemClock_Config>:
  565. {
  566. 8000640: b500 push {lr}
  567. 8000642: b09d sub sp, #116 @ 0x74
  568. RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  569. 8000644: 224c movs r2, #76 @ 0x4c
  570. 8000646: 2100 movs r1, #0
  571. 8000648: a809 add r0, sp, #36 @ 0x24
  572. 800064a: f013 f835 bl 80136b8 <memset>
  573. RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
  574. 800064e: 2220 movs r2, #32
  575. 8000650: 2100 movs r1, #0
  576. 8000652: a801 add r0, sp, #4
  577. 8000654: f013 f830 bl 80136b8 <memset>
  578. HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY);
  579. 8000658: 2004 movs r0, #4
  580. 800065a: f001 febf bl 80023dc <HAL_PWREx_ConfigSupply>
  581. __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
  582. 800065e: 2300 movs r3, #0
  583. 8000660: 9300 str r3, [sp, #0]
  584. 8000662: 4b26 ldr r3, [pc, #152] @ (80006fc <SystemClock_Config+0xbc>)
  585. 8000664: 6ada ldr r2, [r3, #44] @ 0x2c
  586. 8000666: f022 0201 bic.w r2, r2, #1
  587. 800066a: 62da str r2, [r3, #44] @ 0x2c
  588. 800066c: 6adb ldr r3, [r3, #44] @ 0x2c
  589. 800066e: f003 0301 and.w r3, r3, #1
  590. 8000672: 9300 str r3, [sp, #0]
  591. 8000674: 4b22 ldr r3, [pc, #136] @ (8000700 <SystemClock_Config+0xc0>)
  592. 8000676: 699a ldr r2, [r3, #24]
  593. 8000678: f442 4240 orr.w r2, r2, #49152 @ 0xc000
  594. 800067c: 619a str r2, [r3, #24]
  595. 800067e: 699b ldr r3, [r3, #24]
  596. 8000680: f403 4340 and.w r3, r3, #49152 @ 0xc000
  597. 8000684: 9300 str r3, [sp, #0]
  598. 8000686: 9b00 ldr r3, [sp, #0]
  599. while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
  600. 8000688: 4b1d ldr r3, [pc, #116] @ (8000700 <SystemClock_Config+0xc0>)
  601. 800068a: 699b ldr r3, [r3, #24]
  602. 800068c: f413 5f00 tst.w r3, #8192 @ 0x2000
  603. 8000690: d0fa beq.n 8000688 <SystemClock_Config+0x48>
  604. RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
  605. 8000692: 2301 movs r3, #1
  606. 8000694: 9309 str r3, [sp, #36] @ 0x24
  607. RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  608. 8000696: f44f 3380 mov.w r3, #65536 @ 0x10000
  609. 800069a: 930a str r3, [sp, #40] @ 0x28
  610. RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  611. 800069c: 2302 movs r3, #2
  612. 800069e: 9312 str r3, [sp, #72] @ 0x48
  613. RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  614. 80006a0: 9313 str r3, [sp, #76] @ 0x4c
  615. RCC_OscInitStruct.PLL.PLLM = 5;
  616. 80006a2: 2205 movs r2, #5
  617. 80006a4: 9214 str r2, [sp, #80] @ 0x50
  618. RCC_OscInitStruct.PLL.PLLN = 160;
  619. 80006a6: 22a0 movs r2, #160 @ 0xa0
  620. 80006a8: 9215 str r2, [sp, #84] @ 0x54
  621. RCC_OscInitStruct.PLL.PLLP = 2;
  622. 80006aa: 9316 str r3, [sp, #88] @ 0x58
  623. RCC_OscInitStruct.PLL.PLLQ = 4;
  624. 80006ac: 2304 movs r3, #4
  625. 80006ae: 9317 str r3, [sp, #92] @ 0x5c
  626. RCC_OscInitStruct.PLL.PLLR = 4;
  627. 80006b0: 9318 str r3, [sp, #96] @ 0x60
  628. RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2;
  629. 80006b2: 2308 movs r3, #8
  630. 80006b4: 9319 str r3, [sp, #100] @ 0x64
  631. RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
  632. 80006b6: 2300 movs r3, #0
  633. 80006b8: 931a str r3, [sp, #104] @ 0x68
  634. RCC_OscInitStruct.PLL.PLLFRACN = 0;
  635. 80006ba: 931b str r3, [sp, #108] @ 0x6c
  636. if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  637. 80006bc: a809 add r0, sp, #36 @ 0x24
  638. 80006be: f001 fed7 bl 8002470 <HAL_RCC_OscConfig>
  639. 80006c2: b9b0 cbnz r0, 80006f2 <SystemClock_Config+0xb2>
  640. RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
  641. 80006c4: 233f movs r3, #63 @ 0x3f
  642. 80006c6: 9301 str r3, [sp, #4]
  643. RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  644. 80006c8: 2303 movs r3, #3
  645. 80006ca: 9302 str r3, [sp, #8]
  646. RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
  647. 80006cc: 2300 movs r3, #0
  648. 80006ce: 9303 str r3, [sp, #12]
  649. RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
  650. 80006d0: 2308 movs r3, #8
  651. 80006d2: 9304 str r3, [sp, #16]
  652. RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
  653. 80006d4: 2340 movs r3, #64 @ 0x40
  654. 80006d6: 9305 str r3, [sp, #20]
  655. RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
  656. 80006d8: 9306 str r3, [sp, #24]
  657. RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
  658. 80006da: f44f 6280 mov.w r2, #1024 @ 0x400
  659. 80006de: 9207 str r2, [sp, #28]
  660. RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
  661. 80006e0: 9308 str r3, [sp, #32]
  662. if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
  663. 80006e2: 2102 movs r1, #2
  664. 80006e4: a801 add r0, sp, #4
  665. 80006e6: f002 faf7 bl 8002cd8 <HAL_RCC_ClockConfig>
  666. 80006ea: b920 cbnz r0, 80006f6 <SystemClock_Config+0xb6>
  667. }
  668. 80006ec: b01d add sp, #116 @ 0x74
  669. 80006ee: f85d fb04 ldr.w pc, [sp], #4
  670. Error_Handler();
  671. 80006f2: f7ff ffa3 bl 800063c <Error_Handler>
  672. Error_Handler();
  673. 80006f6: f7ff ffa1 bl 800063c <Error_Handler>
  674. 80006fa: bf00 nop
  675. 80006fc: 58000400 .word 0x58000400
  676. 8000700: 58024800 .word 0x58024800
  677. 08000704 <main>:
  678. {
  679. 8000704: b500 push {lr}
  680. 8000706: b083 sub sp, #12
  681. MPU_Config();
  682. 8000708: f7ff ff20 bl 800054c <MPU_Config>
  683. \details Turns on I-Cache
  684. */
  685. __STATIC_FORCEINLINE void SCB_EnableICache (void)
  686. {
  687. #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U)
  688. if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */
  689. 800070c: 4b3d ldr r3, [pc, #244] @ (8000804 <main+0x100>)
  690. 800070e: 695b ldr r3, [r3, #20]
  691. 8000710: f413 3f00 tst.w r3, #131072 @ 0x20000
  692. 8000714: d113 bne.n 800073e <main+0x3a>
  693. \details Acts as a special kind of Data Memory Barrier.
  694. It completes when all explicit memory accesses before this instruction complete.
  695. */
  696. __STATIC_FORCEINLINE void __DSB(void)
  697. {
  698. __ASM volatile ("dsb 0xF":::"memory");
  699. 8000716: f3bf 8f4f dsb sy
  700. __ASM volatile ("isb 0xF":::"memory");
  701. 800071a: f3bf 8f6f isb sy
  702. __DSB();
  703. __ISB();
  704. SCB->ICIALLU = 0UL; /* invalidate I-Cache */
  705. 800071e: 4b39 ldr r3, [pc, #228] @ (8000804 <main+0x100>)
  706. 8000720: 2200 movs r2, #0
  707. 8000722: f8c3 2250 str.w r2, [r3, #592] @ 0x250
  708. __ASM volatile ("dsb 0xF":::"memory");
  709. 8000726: f3bf 8f4f dsb sy
  710. __ASM volatile ("isb 0xF":::"memory");
  711. 800072a: f3bf 8f6f isb sy
  712. __DSB();
  713. __ISB();
  714. SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */
  715. 800072e: 695a ldr r2, [r3, #20]
  716. 8000730: f442 3200 orr.w r2, r2, #131072 @ 0x20000
  717. 8000734: 615a str r2, [r3, #20]
  718. __ASM volatile ("dsb 0xF":::"memory");
  719. 8000736: f3bf 8f4f dsb sy
  720. __ASM volatile ("isb 0xF":::"memory");
  721. 800073a: f3bf 8f6f isb sy
  722. #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
  723. uint32_t ccsidr;
  724. uint32_t sets;
  725. uint32_t ways;
  726. if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */
  727. 800073e: 4b31 ldr r3, [pc, #196] @ (8000804 <main+0x100>)
  728. 8000740: 695b ldr r3, [r3, #20]
  729. 8000742: f413 3f80 tst.w r3, #65536 @ 0x10000
  730. 8000746: d127 bne.n 8000798 <main+0x94>
  731. SCB->CSSELR = 0U; /* select Level 1 data cache */
  732. 8000748: 4b2e ldr r3, [pc, #184] @ (8000804 <main+0x100>)
  733. 800074a: 2200 movs r2, #0
  734. 800074c: f8c3 2084 str.w r2, [r3, #132] @ 0x84
  735. __ASM volatile ("dsb 0xF":::"memory");
  736. 8000750: f3bf 8f4f dsb sy
  737. __DSB();
  738. ccsidr = SCB->CCSIDR;
  739. 8000754: f8d3 4080 ldr.w r4, [r3, #128] @ 0x80
  740. /* invalidate D-Cache */
  741. sets = (uint32_t)(CCSIDR_SETS(ccsidr));
  742. 8000758: f3c4 304e ubfx r0, r4, #13, #15
  743. 800075c: e000 b.n 8000760 <main+0x5c>
  744. ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) );
  745. #if defined ( __CC_ARM )
  746. __schedule_barrier();
  747. #endif
  748. } while (ways-- != 0U);
  749. } while(sets-- != 0U);
  750. 800075e: 4618 mov r0, r3
  751. ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
  752. 8000760: f3c4 02c9 ubfx r2, r4, #3, #10
  753. SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) |
  754. 8000764: f643 73e0 movw r3, #16352 @ 0x3fe0
  755. 8000768: ea03 1340 and.w r3, r3, r0, lsl #5
  756. 800076c: ea43 7382 orr.w r3, r3, r2, lsl #30
  757. 8000770: 4924 ldr r1, [pc, #144] @ (8000804 <main+0x100>)
  758. 8000772: f8c1 3260 str.w r3, [r1, #608] @ 0x260
  759. } while (ways-- != 0U);
  760. 8000776: 4613 mov r3, r2
  761. 8000778: 3a01 subs r2, #1
  762. 800077a: 2b00 cmp r3, #0
  763. 800077c: d1f2 bne.n 8000764 <main+0x60>
  764. } while(sets-- != 0U);
  765. 800077e: 1e43 subs r3, r0, #1
  766. 8000780: 2800 cmp r0, #0
  767. 8000782: d1ec bne.n 800075e <main+0x5a>
  768. 8000784: f3bf 8f4f dsb sy
  769. __DSB();
  770. SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */
  771. 8000788: 694b ldr r3, [r1, #20]
  772. 800078a: f443 3380 orr.w r3, r3, #65536 @ 0x10000
  773. 800078e: 614b str r3, [r1, #20]
  774. 8000790: f3bf 8f4f dsb sy
  775. __ASM volatile ("isb 0xF":::"memory");
  776. 8000794: f3bf 8f6f isb sy
  777. HAL_Init();
  778. 8000798: f000 fb3e bl 8000e18 <HAL_Init>
  779. SystemClock_Config();
  780. 800079c: f7ff ff50 bl 8000640 <SystemClock_Config>
  781. ITM->TCR |= ITM_TCR_ITMENA_Msk;
  782. 80007a0: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000
  783. 80007a4: f8d3 2e80 ldr.w r2, [r3, #3712] @ 0xe80
  784. 80007a8: f042 0201 orr.w r2, r2, #1
  785. 80007ac: f8c3 2e80 str.w r2, [r3, #3712] @ 0xe80
  786. ITM->TER |= 1UL;
  787. 80007b0: f8d3 2e00 ldr.w r2, [r3, #3584] @ 0xe00
  788. 80007b4: f042 0201 orr.w r2, r2, #1
  789. 80007b8: f8c3 2e00 str.w r2, [r3, #3584] @ 0xe00
  790. MX_GPIO_Init();
  791. 80007bc: f7ff fe6c bl 8000498 <MX_GPIO_Init>
  792. __HAL_RCC_HSEM_CLK_ENABLE();
  793. 80007c0: 4b11 ldr r3, [pc, #68] @ (8000808 <main+0x104>)
  794. 80007c2: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  795. 80007c6: f042 7200 orr.w r2, r2, #33554432 @ 0x2000000
  796. 80007ca: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  797. 80007ce: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0
  798. 80007d2: f003 7300 and.w r3, r3, #33554432 @ 0x2000000
  799. 80007d6: 9301 str r3, [sp, #4]
  800. 80007d8: 9b01 ldr r3, [sp, #4]
  801. HAL_HSEM_FastTake(HSEM_ID_0);
  802. 80007da: 2000 movs r0, #0
  803. 80007dc: f001 fde6 bl 80023ac <HAL_HSEM_FastTake>
  804. HAL_HSEM_Release(HSEM_ID_0,0);
  805. 80007e0: 2100 movs r1, #0
  806. 80007e2: 4608 mov r0, r1
  807. 80007e4: f001 fdf2 bl 80023cc <HAL_HSEM_Release>
  808. osKernelInitialize();
  809. 80007e8: f003 fabe bl 8003d68 <osKernelInitialize>
  810. defaultTaskHandle = osThreadNew(StartDefaultTask, NULL, &defaultTask_attributes);
  811. 80007ec: 4a07 ldr r2, [pc, #28] @ (800080c <main+0x108>)
  812. 80007ee: 2100 movs r1, #0
  813. 80007f0: 4807 ldr r0, [pc, #28] @ (8000810 <main+0x10c>)
  814. 80007f2: f003 faf1 bl 8003dd8 <osThreadNew>
  815. 80007f6: 4b07 ldr r3, [pc, #28] @ (8000814 <main+0x110>)
  816. 80007f8: 6018 str r0, [r3, #0]
  817. mqtt_cli_init();
  818. 80007fa: f000 f8e7 bl 80009cc <mqtt_cli_init>
  819. osKernelStart();
  820. 80007fe: f003 fac5 bl 8003d8c <osKernelStart>
  821. while (1)
  822. 8000802: e7fe b.n 8000802 <main+0xfe>
  823. 8000804: e000ed00 .word 0xe000ed00
  824. 8000808: 58024400 .word 0x58024400
  825. 800080c: 08014344 .word 0x08014344
  826. 8000810: 080005f1 .word 0x080005f1
  827. 8000814: 240000ac .word 0x240000ac
  828. 08000818 <MqttClientPubTask>:
  829. }
  830. }
  831. }
  832. void MqttClientPubTask(void *argument)
  833. {
  834. 8000818: b500 push {lr}
  835. 800081a: b085 sub sp, #20
  836. 800081c: e003 b.n 8000826 <MqttClientPubTask+0xe>
  837. {
  838. MQTTPublish(&mqttClient, "test", &message); //publish a message
  839. }
  840. }
  841. osDelay(pdMS_TO_TICKS(1000));
  842. 800081e: f44f 707a mov.w r0, #1000 @ 0x3e8
  843. 8000822: f003 fb3b bl 8003e9c <osDelay>
  844. if(mqttClient.isconnected)
  845. 8000826: 4b09 ldr r3, [pc, #36] @ (800084c <MqttClientPubTask+0x34>)
  846. 8000828: 6a1b ldr r3, [r3, #32]
  847. 800082a: 2b00 cmp r3, #0
  848. 800082c: d0f7 beq.n 800081e <MqttClientPubTask+0x6>
  849. message.payload = (void*)str;
  850. 800082e: 4b08 ldr r3, [pc, #32] @ (8000850 <MqttClientPubTask+0x38>)
  851. 8000830: 9302 str r3, [sp, #8]
  852. message.payloadlen = strlen(str);
  853. 8000832: 2317 movs r3, #23
  854. 8000834: 9303 str r3, [sp, #12]
  855. if(is_link_up())
  856. 8000836: f002 fdc9 bl 80033cc <is_link_up>
  857. 800083a: 2800 cmp r0, #0
  858. 800083c: d0ef beq.n 800081e <MqttClientPubTask+0x6>
  859. MQTTPublish(&mqttClient, "test", &message); //publish a message
  860. 800083e: 466a mov r2, sp
  861. 8000840: 4904 ldr r1, [pc, #16] @ (8000854 <MqttClientPubTask+0x3c>)
  862. 8000842: 4802 ldr r0, [pc, #8] @ (800084c <MqttClientPubTask+0x34>)
  863. 8000844: f011 ff1e bl 8012684 <MQTTPublish>
  864. 8000848: e7e9 b.n 800081e <MqttClientPubTask+0x6>
  865. 800084a: bf00 nop
  866. 800084c: 24000cb0 .word 0x24000cb0
  867. 8000850: 08014368 .word 0x08014368
  868. 8000854: 08014380 .word 0x08014380
  869. 08000858 <MqttMessageArrived>:
  870. return MQTT_SUCCESS;
  871. }
  872. void MqttMessageArrived(MessageData* msg)
  873. {
  874. 8000858: b538 push {r3, r4, r5, lr}
  875. MQTTMessage* message = msg->message;
  876. 800085a: 6804 ldr r4, [r0, #0]
  877. memset(msgBuffer, 0, sizeof(msgBuffer));
  878. 800085c: 4d08 ldr r5, [pc, #32] @ (8000880 <MqttMessageArrived+0x28>)
  879. 800085e: f44f 6280 mov.w r2, #1024 @ 0x400
  880. 8000862: 2100 movs r1, #0
  881. 8000864: 4628 mov r0, r5
  882. 8000866: f012 ff27 bl 80136b8 <memset>
  883. memcpy(msgBuffer, message->payload,message->payloadlen);
  884. 800086a: 68e2 ldr r2, [r4, #12]
  885. 800086c: 68a1 ldr r1, [r4, #8]
  886. 800086e: 4628 mov r0, r5
  887. 8000870: f013 f807 bl 8013882 <memcpy>
  888. printf("MQTT MSG[%d]:%s\n", (int)message->payloadlen, msgBuffer);
  889. 8000874: 462a mov r2, r5
  890. 8000876: 68e1 ldr r1, [r4, #12]
  891. 8000878: 4802 ldr r0, [pc, #8] @ (8000884 <MqttMessageArrived+0x2c>)
  892. 800087a: f012 fdc5 bl 8013408 <iprintf>
  893. }
  894. 800087e: bd38 pop {r3, r4, r5, pc}
  895. 8000880: 240000b0 .word 0x240000b0
  896. 8000884: 08014388 .word 0x08014388
  897. 08000888 <MqttConnectBroker>:
  898. {
  899. 8000888: b510 push {r4, lr}
  900. 800088a: b09a sub sp, #104 @ 0x68
  901. NewNetwork(&net);
  902. 800088c: 4c28 ldr r4, [pc, #160] @ (8000930 <MqttConnectBroker+0xa8>)
  903. 800088e: 4620 mov r0, r4
  904. 8000890: f012 f800 bl 8012894 <NewNetwork>
  905. ret = ConnectNetwork(&net, BROKER_IP, MQTT_PORT);
  906. 8000894: f240 725b movw r2, #1883 @ 0x75b
  907. 8000898: 4926 ldr r1, [pc, #152] @ (8000934 <MqttConnectBroker+0xac>)
  908. 800089a: 4620 mov r0, r4
  909. 800089c: f012 f80a bl 80128b4 <ConnectNetwork>
  910. if(ret != MQTT_SUCCESS)
  911. 80008a0: 2800 cmp r0, #0
  912. 80008a2: d131 bne.n 8000908 <MqttConnectBroker+0x80>
  913. MQTTClientInit(&mqttClient, &net, 1000, sndBuffer, sizeof(sndBuffer), rcvBuffer, sizeof(rcvBuffer));
  914. 80008a4: 4c24 ldr r4, [pc, #144] @ (8000938 <MqttConnectBroker+0xb0>)
  915. 80008a6: f44f 6380 mov.w r3, #1024 @ 0x400
  916. 80008aa: 9302 str r3, [sp, #8]
  917. 80008ac: 4a23 ldr r2, [pc, #140] @ (800093c <MqttConnectBroker+0xb4>)
  918. 80008ae: 9201 str r2, [sp, #4]
  919. 80008b0: 9300 str r3, [sp, #0]
  920. 80008b2: 4b23 ldr r3, [pc, #140] @ (8000940 <MqttConnectBroker+0xb8>)
  921. 80008b4: f44f 727a mov.w r2, #1000 @ 0x3e8
  922. 80008b8: 491d ldr r1, [pc, #116] @ (8000930 <MqttConnectBroker+0xa8>)
  923. 80008ba: 4620 mov r0, r4
  924. 80008bc: f011 fc26 bl 801210c <MQTTClientInit>
  925. MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
  926. 80008c0: 2258 movs r2, #88 @ 0x58
  927. 80008c2: 4920 ldr r1, [pc, #128] @ (8000944 <MqttConnectBroker+0xbc>)
  928. 80008c4: a804 add r0, sp, #16
  929. 80008c6: f012 ffdc bl 8013882 <memcpy>
  930. data.MQTTVersion = 3;
  931. 80008ca: 2303 movs r3, #3
  932. 80008cc: f88d 3018 strb.w r3, [sp, #24]
  933. data.clientID.cstring = "test_user1";
  934. 80008d0: 4b1d ldr r3, [pc, #116] @ (8000948 <MqttConnectBroker+0xc0>)
  935. 80008d2: 9307 str r3, [sp, #28]
  936. data.username.cstring = "test_user1";
  937. 80008d4: 9314 str r3, [sp, #80] @ 0x50
  938. data.password.cstring = "1234";
  939. 80008d6: 4b1d ldr r3, [pc, #116] @ (800094c <MqttConnectBroker+0xc4>)
  940. 80008d8: 9317 str r3, [sp, #92] @ 0x5c
  941. data.keepAliveInterval = 100;
  942. 80008da: 2364 movs r3, #100 @ 0x64
  943. 80008dc: f8ad 3028 strh.w r3, [sp, #40] @ 0x28
  944. ret = MQTTConnect(&mqttClient, &data);
  945. 80008e0: a904 add r1, sp, #16
  946. 80008e2: 4620 mov r0, r4
  947. 80008e4: f011 fe12 bl 801250c <MQTTConnect>
  948. if(ret != MQTT_SUCCESS)
  949. 80008e8: 4604 mov r4, r0
  950. 80008ea: b998 cbnz r0, 8000914 <MqttConnectBroker+0x8c>
  951. ret = MQTTSubscribe(&mqttClient, "test_second", QOS0, MqttMessageArrived);
  952. 80008ec: 4b18 ldr r3, [pc, #96] @ (8000950 <MqttConnectBroker+0xc8>)
  953. 80008ee: 2200 movs r2, #0
  954. 80008f0: 4918 ldr r1, [pc, #96] @ (8000954 <MqttConnectBroker+0xcc>)
  955. 80008f2: 4811 ldr r0, [pc, #68] @ (8000938 <MqttConnectBroker+0xb0>)
  956. 80008f4: f011 febe bl 8012674 <MQTTSubscribe>
  957. if(ret != MQTT_SUCCESS)
  958. 80008f8: 4604 mov r4, r0
  959. 80008fa: b990 cbnz r0, 8000922 <MqttConnectBroker+0x9a>
  960. printf("MQTT_ConnectBroker O.K.\n");
  961. 80008fc: 4816 ldr r0, [pc, #88] @ (8000958 <MqttConnectBroker+0xd0>)
  962. 80008fe: f012 fdeb bl 80134d8 <puts>
  963. }
  964. 8000902: 4620 mov r0, r4
  965. 8000904: b01a add sp, #104 @ 0x68
  966. 8000906: bd10 pop {r4, pc}
  967. printf("ConnectNetwork failed.\n");
  968. 8000908: 4814 ldr r0, [pc, #80] @ (800095c <MqttConnectBroker+0xd4>)
  969. 800090a: f012 fde5 bl 80134d8 <puts>
  970. return -1;
  971. 800090e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  972. 8000912: e7f6 b.n 8000902 <MqttConnectBroker+0x7a>
  973. net_disconnect(&net);
  974. 8000914: 4806 ldr r0, [pc, #24] @ (8000930 <MqttConnectBroker+0xa8>)
  975. 8000916: f011 ff69 bl 80127ec <net_disconnect>
  976. printf("MQTTConnect failed.\n");
  977. 800091a: 4811 ldr r0, [pc, #68] @ (8000960 <MqttConnectBroker+0xd8>)
  978. 800091c: f012 fddc bl 80134d8 <puts>
  979. return ret;
  980. 8000920: e7ef b.n 8000902 <MqttConnectBroker+0x7a>
  981. net_disconnect(&net);
  982. 8000922: 4803 ldr r0, [pc, #12] @ (8000930 <MqttConnectBroker+0xa8>)
  983. 8000924: f011 ff62 bl 80127ec <net_disconnect>
  984. printf("MQTTSubscribe failed.\n");
  985. 8000928: 480e ldr r0, [pc, #56] @ (8000964 <MqttConnectBroker+0xdc>)
  986. 800092a: f012 fdd5 bl 80134d8 <puts>
  987. return ret;
  988. 800092e: e7e8 b.n 8000902 <MqttConnectBroker+0x7a>
  989. 8000930: 24000d18 .word 0x24000d18
  990. 8000934: 0801439c .word 0x0801439c
  991. 8000938: 24000cb0 .word 0x24000cb0
  992. 800093c: 240004b0 .word 0x240004b0
  993. 8000940: 240008b0 .word 0x240008b0
  994. 8000944: 08014278 .word 0x08014278
  995. 8000948: 080143c4 .word 0x080143c4
  996. 800094c: 080143d0 .word 0x080143d0
  997. 8000950: 08000859 .word 0x08000859
  998. 8000954: 080143ec .word 0x080143ec
  999. 8000958: 08014410 .word 0x08014410
  1000. 800095c: 080143ac .word 0x080143ac
  1001. 8000960: 080143d8 .word 0x080143d8
  1002. 8000964: 080143f8 .word 0x080143f8
  1003. 08000968 <MqttClientSubTask>:
  1004. {
  1005. 8000968: b508 push {r3, lr}
  1006. 800096a: e003 b.n 8000974 <MqttClientSubTask+0xc>
  1007. osDelay(pdMS_TO_TICKS(1000));
  1008. 800096c: f44f 707a mov.w r0, #1000 @ 0x3e8
  1009. 8000970: f003 fa94 bl 8003e9c <osDelay>
  1010. if (gnetif.ip_addr.addr == 0 || gnetif.netmask.addr == 0 || gnetif.gw.addr == 0) //system has no valid ip address
  1011. 8000974: 4b12 ldr r3, [pc, #72] @ (80009c0 <MqttClientSubTask+0x58>)
  1012. 8000976: 685b ldr r3, [r3, #4]
  1013. 8000978: 2b00 cmp r3, #0
  1014. 800097a: d0f7 beq.n 800096c <MqttClientSubTask+0x4>
  1015. 800097c: 4b10 ldr r3, [pc, #64] @ (80009c0 <MqttClientSubTask+0x58>)
  1016. 800097e: 689b ldr r3, [r3, #8]
  1017. 8000980: 2b00 cmp r3, #0
  1018. 8000982: d0f3 beq.n 800096c <MqttClientSubTask+0x4>
  1019. 8000984: 4b0e ldr r3, [pc, #56] @ (80009c0 <MqttClientSubTask+0x58>)
  1020. 8000986: 68db ldr r3, [r3, #12]
  1021. 8000988: 2b00 cmp r3, #0
  1022. 800098a: d0ef beq.n 800096c <MqttClientSubTask+0x4>
  1023. printf("DHCP/Static IP O.K.\n");
  1024. 800098c: 480d ldr r0, [pc, #52] @ (80009c4 <MqttClientSubTask+0x5c>)
  1025. 800098e: f012 fda3 bl 80134d8 <puts>
  1026. break;
  1027. 8000992: e008 b.n 80009a6 <MqttClientSubTask+0x3e>
  1028. MQTTDisconnect(&mqttClient);
  1029. 8000994: 480c ldr r0, [pc, #48] @ (80009c8 <MqttClientSubTask+0x60>)
  1030. 8000996: f011 feff bl 8012798 <MQTTDisconnect>
  1031. MqttConnectBroker();
  1032. 800099a: f7ff ff75 bl 8000888 <MqttConnectBroker>
  1033. osDelay(pdMS_TO_TICKS(1000));
  1034. 800099e: f44f 707a mov.w r0, #1000 @ 0x3e8
  1035. 80009a2: f003 fa7b bl 8003e9c <osDelay>
  1036. if(!mqttClient.isconnected)
  1037. 80009a6: 4b08 ldr r3, [pc, #32] @ (80009c8 <MqttClientSubTask+0x60>)
  1038. 80009a8: 6a1b ldr r3, [r3, #32]
  1039. 80009aa: 2b00 cmp r3, #0
  1040. 80009ac: d0f2 beq.n 8000994 <MqttClientSubTask+0x2c>
  1041. MQTTYield(&mqttClient, 500); //handle timer
  1042. 80009ae: f44f 71fa mov.w r1, #500 @ 0x1f4
  1043. 80009b2: 4805 ldr r0, [pc, #20] @ (80009c8 <MqttClientSubTask+0x60>)
  1044. 80009b4: f011 fd12 bl 80123dc <MQTTYield>
  1045. osDelay(pdMS_TO_TICKS(100));
  1046. 80009b8: 2064 movs r0, #100 @ 0x64
  1047. 80009ba: f003 fa6f bl 8003e9c <osDelay>
  1048. 80009be: e7f2 b.n 80009a6 <MqttClientSubTask+0x3e>
  1049. 80009c0: 24000db4 .word 0x24000db4
  1050. 80009c4: 08014428 .word 0x08014428
  1051. 80009c8: 24000cb0 .word 0x24000cb0
  1052. 080009cc <mqtt_cli_init>:
  1053. void mqtt_cli_init(void)
  1054. {
  1055. 80009cc: b508 push {r3, lr}
  1056. mqttClientSubTaskHandle = osThreadNew(MqttClientSubTask, NULL, &mqttClientSubTaskAttr); //subscribe task
  1057. 80009ce: 4a07 ldr r2, [pc, #28] @ (80009ec <mqtt_cli_init+0x20>)
  1058. 80009d0: 2100 movs r1, #0
  1059. 80009d2: 4807 ldr r0, [pc, #28] @ (80009f0 <mqtt_cli_init+0x24>)
  1060. 80009d4: f003 fa00 bl 8003dd8 <osThreadNew>
  1061. 80009d8: 4b06 ldr r3, [pc, #24] @ (80009f4 <mqtt_cli_init+0x28>)
  1062. 80009da: 6018 str r0, [r3, #0]
  1063. mqttClientPubTaskHandle = osThreadNew(MqttClientPubTask, NULL, &mqttClientPubTaskAttr); //publish task
  1064. 80009dc: 4a06 ldr r2, [pc, #24] @ (80009f8 <mqtt_cli_init+0x2c>)
  1065. 80009de: 2100 movs r1, #0
  1066. 80009e0: 4806 ldr r0, [pc, #24] @ (80009fc <mqtt_cli_init+0x30>)
  1067. 80009e2: f003 f9f9 bl 8003dd8 <osThreadNew>
  1068. 80009e6: 4b06 ldr r3, [pc, #24] @ (8000a00 <mqtt_cli_init+0x34>)
  1069. 80009e8: 6018 str r0, [r3, #0]
  1070. }
  1071. 80009ea: bd08 pop {r3, pc}
  1072. 80009ec: 08014488 .word 0x08014488
  1073. 80009f0: 08000969 .word 0x08000969
  1074. 80009f4: 24000d2c .word 0x24000d2c
  1075. 80009f8: 08014464 .word 0x08014464
  1076. 80009fc: 08000819 .word 0x08000819
  1077. 8000a00: 24000d28 .word 0x24000d28
  1078. 08000a04 <HAL_MspInit>:
  1079. /* USER CODE END 0 */
  1080. /**
  1081. * Initializes the Global MSP.
  1082. */
  1083. void HAL_MspInit(void)
  1084. {
  1085. 8000a04: b500 push {lr}
  1086. 8000a06: b083 sub sp, #12
  1087. /* USER CODE BEGIN MspInit 0 */
  1088. /* USER CODE END MspInit 0 */
  1089. __HAL_RCC_SYSCFG_CLK_ENABLE();
  1090. 8000a08: 4b0a ldr r3, [pc, #40] @ (8000a34 <HAL_MspInit+0x30>)
  1091. 8000a0a: f8d3 20f4 ldr.w r2, [r3, #244] @ 0xf4
  1092. 8000a0e: f042 0202 orr.w r2, r2, #2
  1093. 8000a12: f8c3 20f4 str.w r2, [r3, #244] @ 0xf4
  1094. 8000a16: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4
  1095. 8000a1a: f003 0302 and.w r3, r3, #2
  1096. 8000a1e: 9301 str r3, [sp, #4]
  1097. 8000a20: 9b01 ldr r3, [sp, #4]
  1098. /* System interrupt init*/
  1099. /* PendSV_IRQn interrupt configuration */
  1100. HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
  1101. 8000a22: 2200 movs r2, #0
  1102. 8000a24: 210f movs r1, #15
  1103. 8000a26: f06f 0001 mvn.w r0, #1
  1104. 8000a2a: f000 fa97 bl 8000f5c <HAL_NVIC_SetPriority>
  1105. /* USER CODE BEGIN MspInit 1 */
  1106. /* USER CODE END MspInit 1 */
  1107. }
  1108. 8000a2e: b003 add sp, #12
  1109. 8000a30: f85d fb04 ldr.w pc, [sp], #4
  1110. 8000a34: 58024400 .word 0x58024400
  1111. 08000a38 <HAL_InitTick>:
  1112. uint32_t uwTimclock, uwAPB1Prescaler;
  1113. uint32_t uwPrescalerValue;
  1114. uint32_t pFLatency;
  1115. /*Configure the TIM6 IRQ priority */
  1116. if (TickPriority < (1UL << __NVIC_PRIO_BITS))
  1117. 8000a38: 280f cmp r0, #15
  1118. 8000a3a: d901 bls.n 8000a40 <HAL_InitTick+0x8>
  1119. HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
  1120. uwTickPrio = TickPriority;
  1121. }
  1122. else
  1123. {
  1124. return HAL_ERROR;
  1125. 8000a3c: 2001 movs r0, #1
  1126. return HAL_TIM_Base_Start_IT(&htim6);
  1127. }
  1128. /* Return function status */
  1129. return HAL_ERROR;
  1130. }
  1131. 8000a3e: 4770 bx lr
  1132. {
  1133. 8000a40: b510 push {r4, lr}
  1134. 8000a42: b08a sub sp, #40 @ 0x28
  1135. 8000a44: 4604 mov r4, r0
  1136. HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0U);
  1137. 8000a46: 2200 movs r2, #0
  1138. 8000a48: 4601 mov r1, r0
  1139. 8000a4a: 2036 movs r0, #54 @ 0x36
  1140. 8000a4c: f000 fa86 bl 8000f5c <HAL_NVIC_SetPriority>
  1141. HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn);
  1142. 8000a50: 2036 movs r0, #54 @ 0x36
  1143. 8000a52: f000 fa93 bl 8000f7c <HAL_NVIC_EnableIRQ>
  1144. uwTickPrio = TickPriority;
  1145. 8000a56: 4b1a ldr r3, [pc, #104] @ (8000ac0 <HAL_InitTick+0x88>)
  1146. 8000a58: 601c str r4, [r3, #0]
  1147. __HAL_RCC_TIM6_CLK_ENABLE();
  1148. 8000a5a: 4b1a ldr r3, [pc, #104] @ (8000ac4 <HAL_InitTick+0x8c>)
  1149. 8000a5c: f8d3 20e8 ldr.w r2, [r3, #232] @ 0xe8
  1150. 8000a60: f042 0210 orr.w r2, r2, #16
  1151. 8000a64: f8c3 20e8 str.w r2, [r3, #232] @ 0xe8
  1152. 8000a68: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8
  1153. 8000a6c: f003 0310 and.w r3, r3, #16
  1154. 8000a70: 9300 str r3, [sp, #0]
  1155. 8000a72: 9b00 ldr r3, [sp, #0]
  1156. HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
  1157. 8000a74: a901 add r1, sp, #4
  1158. 8000a76: a802 add r0, sp, #8
  1159. 8000a78: f002 faac bl 8002fd4 <HAL_RCC_GetClockConfig>
  1160. uwAPB1Prescaler = clkconfig.APB1CLKDivider;
  1161. 8000a7c: 9b07 ldr r3, [sp, #28]
  1162. if (uwAPB1Prescaler == RCC_HCLK_DIV1)
  1163. 8000a7e: b9bb cbnz r3, 8000ab0 <HAL_InitTick+0x78>
  1164. uwTimclock = HAL_RCC_GetPCLK1Freq();
  1165. 8000a80: f002 fa96 bl 8002fb0 <HAL_RCC_GetPCLK1Freq>
  1166. 8000a84: 4603 mov r3, r0
  1167. uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U);
  1168. 8000a86: 4a10 ldr r2, [pc, #64] @ (8000ac8 <HAL_InitTick+0x90>)
  1169. 8000a88: fba2 2303 umull r2, r3, r2, r3
  1170. 8000a8c: 0c9b lsrs r3, r3, #18
  1171. 8000a8e: 3b01 subs r3, #1
  1172. htim6.Instance = TIM6;
  1173. 8000a90: 480e ldr r0, [pc, #56] @ (8000acc <HAL_InitTick+0x94>)
  1174. 8000a92: 4a0f ldr r2, [pc, #60] @ (8000ad0 <HAL_InitTick+0x98>)
  1175. 8000a94: 6002 str r2, [r0, #0]
  1176. htim6.Init.Period = (1000000U / 1000U) - 1U;
  1177. 8000a96: f240 32e7 movw r2, #999 @ 0x3e7
  1178. 8000a9a: 60c2 str r2, [r0, #12]
  1179. htim6.Init.Prescaler = uwPrescalerValue;
  1180. 8000a9c: 6043 str r3, [r0, #4]
  1181. htim6.Init.ClockDivision = 0;
  1182. 8000a9e: 2300 movs r3, #0
  1183. 8000aa0: 6103 str r3, [r0, #16]
  1184. htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
  1185. 8000aa2: 6083 str r3, [r0, #8]
  1186. if(HAL_TIM_Base_Init(&htim6) == HAL_OK)
  1187. 8000aa4: f002 fc5e bl 8003364 <HAL_TIM_Base_Init>
  1188. 8000aa8: b130 cbz r0, 8000ab8 <HAL_InitTick+0x80>
  1189. return HAL_ERROR;
  1190. 8000aaa: 2001 movs r0, #1
  1191. }
  1192. 8000aac: b00a add sp, #40 @ 0x28
  1193. 8000aae: bd10 pop {r4, pc}
  1194. uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq();
  1195. 8000ab0: f002 fa7e bl 8002fb0 <HAL_RCC_GetPCLK1Freq>
  1196. 8000ab4: 0043 lsls r3, r0, #1
  1197. 8000ab6: e7e6 b.n 8000a86 <HAL_InitTick+0x4e>
  1198. return HAL_TIM_Base_Start_IT(&htim6);
  1199. 8000ab8: 4804 ldr r0, [pc, #16] @ (8000acc <HAL_InitTick+0x94>)
  1200. 8000aba: f002 fab7 bl 800302c <HAL_TIM_Base_Start_IT>
  1201. 8000abe: e7f5 b.n 8000aac <HAL_InitTick+0x74>
  1202. 8000ac0: 2400000c .word 0x2400000c
  1203. 8000ac4: 58024400 .word 0x58024400
  1204. 8000ac8: 431bde83 .word 0x431bde83
  1205. 8000acc: 24000d30 .word 0x24000d30
  1206. 8000ad0: 40001000 .word 0x40001000
  1207. 08000ad4 <NMI_Handler>:
  1208. {
  1209. /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
  1210. /* USER CODE END NonMaskableInt_IRQn 0 */
  1211. /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
  1212. while (1)
  1213. 8000ad4: e7fe b.n 8000ad4 <NMI_Handler>
  1214. 08000ad6 <HardFault_Handler>:
  1215. void HardFault_Handler(void)
  1216. {
  1217. /* USER CODE BEGIN HardFault_IRQn 0 */
  1218. /* USER CODE END HardFault_IRQn 0 */
  1219. while (1)
  1220. 8000ad6: e7fe b.n 8000ad6 <HardFault_Handler>
  1221. 08000ad8 <MemManage_Handler>:
  1222. void MemManage_Handler(void)
  1223. {
  1224. /* USER CODE BEGIN MemoryManagement_IRQn 0 */
  1225. /* USER CODE END MemoryManagement_IRQn 0 */
  1226. while (1)
  1227. 8000ad8: e7fe b.n 8000ad8 <MemManage_Handler>
  1228. 08000ada <BusFault_Handler>:
  1229. void BusFault_Handler(void)
  1230. {
  1231. /* USER CODE BEGIN BusFault_IRQn 0 */
  1232. /* USER CODE END BusFault_IRQn 0 */
  1233. while (1)
  1234. 8000ada: e7fe b.n 8000ada <BusFault_Handler>
  1235. 08000adc <UsageFault_Handler>:
  1236. void UsageFault_Handler(void)
  1237. {
  1238. /* USER CODE BEGIN UsageFault_IRQn 0 */
  1239. /* USER CODE END UsageFault_IRQn 0 */
  1240. while (1)
  1241. 8000adc: e7fe b.n 8000adc <UsageFault_Handler>
  1242. 08000ade <DebugMon_Handler>:
  1243. /* USER CODE END DebugMonitor_IRQn 0 */
  1244. /* USER CODE BEGIN DebugMonitor_IRQn 1 */
  1245. /* USER CODE END DebugMonitor_IRQn 1 */
  1246. }
  1247. 8000ade: 4770 bx lr
  1248. 08000ae0 <TIM6_DAC_IRQHandler>:
  1249. /**
  1250. * @brief This function handles TIM6 global interrupt, DAC1_CH1 and DAC1_CH2 underrun error interrupts.
  1251. */
  1252. void TIM6_DAC_IRQHandler(void)
  1253. {
  1254. 8000ae0: b508 push {r3, lr}
  1255. /* USER CODE BEGIN TIM6_DAC_IRQn 0 */
  1256. /* USER CODE END TIM6_DAC_IRQn 0 */
  1257. HAL_TIM_IRQHandler(&htim6);
  1258. 8000ae2: 4802 ldr r0, [pc, #8] @ (8000aec <TIM6_DAC_IRQHandler+0xc>)
  1259. 8000ae4: f002 faee bl 80030c4 <HAL_TIM_IRQHandler>
  1260. /* USER CODE BEGIN TIM6_DAC_IRQn 1 */
  1261. /* USER CODE END TIM6_DAC_IRQn 1 */
  1262. }
  1263. 8000ae8: bd08 pop {r3, pc}
  1264. 8000aea: bf00 nop
  1265. 8000aec: 24000d30 .word 0x24000d30
  1266. 08000af0 <ETH_IRQHandler>:
  1267. /**
  1268. * @brief This function handles Ethernet global interrupt.
  1269. */
  1270. void ETH_IRQHandler(void)
  1271. {
  1272. 8000af0: b508 push {r3, lr}
  1273. /* USER CODE BEGIN ETH_IRQn 0 */
  1274. /* USER CODE END ETH_IRQn 0 */
  1275. HAL_ETH_IRQHandler(&heth);
  1276. 8000af2: 4802 ldr r0, [pc, #8] @ (8000afc <ETH_IRQHandler+0xc>)
  1277. 8000af4: f001 f823 bl 8001b3e <HAL_ETH_IRQHandler>
  1278. /* USER CODE BEGIN ETH_IRQn 1 */
  1279. /* USER CODE END ETH_IRQn 1 */
  1280. }
  1281. 8000af8: bd08 pop {r3, pc}
  1282. 8000afa: bf00 nop
  1283. 8000afc: 24000e4c .word 0x24000e4c
  1284. 08000b00 <ITM_SendChar>:
  1285. \param [in] ch Character to transmit.
  1286. \returns Character to transmit.
  1287. */
  1288. __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch)
  1289. {
  1290. if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */
  1291. 8000b00: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000
  1292. 8000b04: f8d3 3e80 ldr.w r3, [r3, #3712] @ 0xe80
  1293. 8000b08: f013 0f01 tst.w r3, #1
  1294. 8000b0c: d011 beq.n 8000b32 <ITM_SendChar+0x32>
  1295. ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */
  1296. 8000b0e: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000
  1297. 8000b12: f8d3 3e00 ldr.w r3, [r3, #3584] @ 0xe00
  1298. if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */
  1299. 8000b16: f013 0f01 tst.w r3, #1
  1300. 8000b1a: d101 bne.n 8000b20 <ITM_SendChar+0x20>
  1301. 8000b1c: 4770 bx lr
  1302. {
  1303. while (ITM->PORT[0U].u32 == 0UL)
  1304. {
  1305. __NOP();
  1306. 8000b1e: bf00 nop
  1307. while (ITM->PORT[0U].u32 == 0UL)
  1308. 8000b20: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000
  1309. 8000b24: 681b ldr r3, [r3, #0]
  1310. 8000b26: 2b00 cmp r3, #0
  1311. 8000b28: d0f9 beq.n 8000b1e <ITM_SendChar+0x1e>
  1312. }
  1313. ITM->PORT[0U].u8 = (uint8_t)ch;
  1314. 8000b2a: b2c3 uxtb r3, r0
  1315. 8000b2c: f04f 4260 mov.w r2, #3758096384 @ 0xe0000000
  1316. 8000b30: 7013 strb r3, [r2, #0]
  1317. }
  1318. return (ch);
  1319. }
  1320. 8000b32: 4770 bx lr
  1321. 08000b34 <_getpid>:
  1322. }
  1323. int _getpid(void)
  1324. {
  1325. return 1;
  1326. }
  1327. 8000b34: 2001 movs r0, #1
  1328. 8000b36: 4770 bx lr
  1329. 08000b38 <_kill>:
  1330. int _kill(int pid, int sig)
  1331. {
  1332. errno = EINVAL;
  1333. 8000b38: 4b02 ldr r3, [pc, #8] @ (8000b44 <_kill+0xc>)
  1334. 8000b3a: 2216 movs r2, #22
  1335. 8000b3c: 601a str r2, [r3, #0]
  1336. return -1;
  1337. }
  1338. 8000b3e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  1339. 8000b42: 4770 bx lr
  1340. 8000b44: 24019d8c .word 0x24019d8c
  1341. 08000b48 <_exit>:
  1342. void _exit (int status)
  1343. {
  1344. 8000b48: b508 push {r3, lr}
  1345. _kill(status, -1);
  1346. 8000b4a: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
  1347. 8000b4e: f7ff fff3 bl 8000b38 <_kill>
  1348. while (1) {} /* Make sure we hang here */
  1349. 8000b52: e7fe b.n 8000b52 <_exit+0xa>
  1350. 08000b54 <_read>:
  1351. }
  1352. __attribute__((weak)) int _read(int file, char *ptr, int len)
  1353. {
  1354. 8000b54: b570 push {r4, r5, r6, lr}
  1355. 8000b56: 460c mov r4, r1
  1356. 8000b58: 4616 mov r6, r2
  1357. int DataIdx;
  1358. for (DataIdx = 0; DataIdx < len; DataIdx++)
  1359. 8000b5a: 2500 movs r5, #0
  1360. 8000b5c: e006 b.n 8000b6c <_read+0x18>
  1361. {
  1362. *ptr++ = __io_getchar();
  1363. 8000b5e: f3af 8000 nop.w
  1364. 8000b62: 4621 mov r1, r4
  1365. 8000b64: f801 0b01 strb.w r0, [r1], #1
  1366. for (DataIdx = 0; DataIdx < len; DataIdx++)
  1367. 8000b68: 3501 adds r5, #1
  1368. *ptr++ = __io_getchar();
  1369. 8000b6a: 460c mov r4, r1
  1370. for (DataIdx = 0; DataIdx < len; DataIdx++)
  1371. 8000b6c: 42b5 cmp r5, r6
  1372. 8000b6e: dbf6 blt.n 8000b5e <_read+0xa>
  1373. }
  1374. return len;
  1375. }
  1376. 8000b70: 4630 mov r0, r6
  1377. 8000b72: bd70 pop {r4, r5, r6, pc}
  1378. 08000b74 <_write>:
  1379. __attribute__((weak)) int _write(int file, char *ptr, int len)
  1380. {
  1381. 8000b74: b570 push {r4, r5, r6, lr}
  1382. 8000b76: 460c mov r4, r1
  1383. 8000b78: 4616 mov r6, r2
  1384. int DataIdx;
  1385. for (DataIdx = 0; DataIdx < len; DataIdx++)
  1386. 8000b7a: 2500 movs r5, #0
  1387. 8000b7c: e004 b.n 8000b88 <_write+0x14>
  1388. {
  1389. // __io_putchar(*ptr++);
  1390. ITM_SendChar(*ptr++);
  1391. 8000b7e: f814 0b01 ldrb.w r0, [r4], #1
  1392. 8000b82: f7ff ffbd bl 8000b00 <ITM_SendChar>
  1393. for (DataIdx = 0; DataIdx < len; DataIdx++)
  1394. 8000b86: 3501 adds r5, #1
  1395. 8000b88: 42b5 cmp r5, r6
  1396. 8000b8a: dbf8 blt.n 8000b7e <_write+0xa>
  1397. }
  1398. return len;
  1399. }
  1400. 8000b8c: 4630 mov r0, r6
  1401. 8000b8e: bd70 pop {r4, r5, r6, pc}
  1402. 08000b90 <_close>:
  1403. int _close(int file)
  1404. {
  1405. return -1;
  1406. }
  1407. 8000b90: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  1408. 8000b94: 4770 bx lr
  1409. 08000b96 <_fstat>:
  1410. int _fstat(int file, struct stat *st)
  1411. {
  1412. st->st_mode = S_IFCHR;
  1413. 8000b96: f44f 5300 mov.w r3, #8192 @ 0x2000
  1414. 8000b9a: 604b str r3, [r1, #4]
  1415. return 0;
  1416. }
  1417. 8000b9c: 2000 movs r0, #0
  1418. 8000b9e: 4770 bx lr
  1419. 08000ba0 <_isatty>:
  1420. int _isatty(int file)
  1421. {
  1422. return 1;
  1423. }
  1424. 8000ba0: 2001 movs r0, #1
  1425. 8000ba2: 4770 bx lr
  1426. 08000ba4 <_lseek>:
  1427. int _lseek(int file, int ptr, int dir)
  1428. {
  1429. return 0;
  1430. }
  1431. 8000ba4: 2000 movs r0, #0
  1432. 8000ba6: 4770 bx lr
  1433. 08000ba8 <_sbrk>:
  1434. *
  1435. * @param incr Memory size
  1436. * @return Pointer to allocated memory
  1437. */
  1438. void *_sbrk(ptrdiff_t incr)
  1439. {
  1440. 8000ba8: b410 push {r4}
  1441. 8000baa: 4603 mov r3, r0
  1442. extern uint8_t _end; /* Symbol defined in the linker script */
  1443. extern uint8_t _estack; /* Symbol defined in the linker script */
  1444. extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
  1445. const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
  1446. 8000bac: 4a0c ldr r2, [pc, #48] @ (8000be0 <_sbrk+0x38>)
  1447. 8000bae: 490d ldr r1, [pc, #52] @ (8000be4 <_sbrk+0x3c>)
  1448. const uint8_t *max_heap = (uint8_t *)stack_limit;
  1449. uint8_t *prev_heap_end;
  1450. /* Initialize heap end at first call */
  1451. if (NULL == __sbrk_heap_end)
  1452. 8000bb0: 480d ldr r0, [pc, #52] @ (8000be8 <_sbrk+0x40>)
  1453. 8000bb2: 6800 ldr r0, [r0, #0]
  1454. 8000bb4: b150 cbz r0, 8000bcc <_sbrk+0x24>
  1455. {
  1456. __sbrk_heap_end = &_end;
  1457. }
  1458. /* Protect heap from growing into the reserved MSP stack */
  1459. if (__sbrk_heap_end + incr > max_heap)
  1460. 8000bb6: 480c ldr r0, [pc, #48] @ (8000be8 <_sbrk+0x40>)
  1461. 8000bb8: 6800 ldr r0, [r0, #0]
  1462. 8000bba: 4403 add r3, r0
  1463. 8000bbc: 1a52 subs r2, r2, r1
  1464. 8000bbe: 4293 cmp r3, r2
  1465. 8000bc0: d808 bhi.n 8000bd4 <_sbrk+0x2c>
  1466. errno = ENOMEM;
  1467. return (void *)-1;
  1468. }
  1469. prev_heap_end = __sbrk_heap_end;
  1470. __sbrk_heap_end += incr;
  1471. 8000bc2: 4a09 ldr r2, [pc, #36] @ (8000be8 <_sbrk+0x40>)
  1472. 8000bc4: 6013 str r3, [r2, #0]
  1473. return (void *)prev_heap_end;
  1474. }
  1475. 8000bc6: f85d 4b04 ldr.w r4, [sp], #4
  1476. 8000bca: 4770 bx lr
  1477. __sbrk_heap_end = &_end;
  1478. 8000bcc: 4806 ldr r0, [pc, #24] @ (8000be8 <_sbrk+0x40>)
  1479. 8000bce: 4c07 ldr r4, [pc, #28] @ (8000bec <_sbrk+0x44>)
  1480. 8000bd0: 6004 str r4, [r0, #0]
  1481. 8000bd2: e7f0 b.n 8000bb6 <_sbrk+0xe>
  1482. errno = ENOMEM;
  1483. 8000bd4: 4b06 ldr r3, [pc, #24] @ (8000bf0 <_sbrk+0x48>)
  1484. 8000bd6: 220c movs r2, #12
  1485. 8000bd8: 601a str r2, [r3, #0]
  1486. return (void *)-1;
  1487. 8000bda: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  1488. 8000bde: e7f2 b.n 8000bc6 <_sbrk+0x1e>
  1489. 8000be0: 24080000 .word 0x24080000
  1490. 8000be4: 00000400 .word 0x00000400
  1491. 8000be8: 24000d7c .word 0x24000d7c
  1492. 8000bec: 24019da0 .word 0x24019da0
  1493. 8000bf0: 24019d8c .word 0x24019d8c
  1494. 08000bf4 <Reset_Handler>:
  1495. .section .text.Reset_Handler
  1496. .weak Reset_Handler
  1497. .type Reset_Handler, %function
  1498. Reset_Handler:
  1499. ldr sp, =_estack /* set stack pointer */
  1500. 8000bf4: f8df d034 ldr.w sp, [pc, #52] @ 8000c2c <LoopFillZerobss+0xe>
  1501. /* Call the clock system initialization function.*/
  1502. bl SystemInit
  1503. 8000bf8: f7ff fbda bl 80003b0 <SystemInit>
  1504. /* Copy the data segment initializers from flash to SRAM */
  1505. ldr r0, =_sdata
  1506. 8000bfc: 480c ldr r0, [pc, #48] @ (8000c30 <LoopFillZerobss+0x12>)
  1507. ldr r1, =_edata
  1508. 8000bfe: 490d ldr r1, [pc, #52] @ (8000c34 <LoopFillZerobss+0x16>)
  1509. ldr r2, =_sidata
  1510. 8000c00: 4a0d ldr r2, [pc, #52] @ (8000c38 <LoopFillZerobss+0x1a>)
  1511. movs r3, #0
  1512. 8000c02: 2300 movs r3, #0
  1513. b LoopCopyDataInit
  1514. 8000c04: e002 b.n 8000c0c <LoopCopyDataInit>
  1515. 08000c06 <CopyDataInit>:
  1516. CopyDataInit:
  1517. ldr r4, [r2, r3]
  1518. 8000c06: 58d4 ldr r4, [r2, r3]
  1519. str r4, [r0, r3]
  1520. 8000c08: 50c4 str r4, [r0, r3]
  1521. adds r3, r3, #4
  1522. 8000c0a: 3304 adds r3, #4
  1523. 08000c0c <LoopCopyDataInit>:
  1524. LoopCopyDataInit:
  1525. adds r4, r0, r3
  1526. 8000c0c: 18c4 adds r4, r0, r3
  1527. cmp r4, r1
  1528. 8000c0e: 428c cmp r4, r1
  1529. bcc CopyDataInit
  1530. 8000c10: d3f9 bcc.n 8000c06 <CopyDataInit>
  1531. /* Zero fill the bss segment. */
  1532. ldr r2, =_sbss
  1533. 8000c12: 4a0a ldr r2, [pc, #40] @ (8000c3c <LoopFillZerobss+0x1e>)
  1534. ldr r4, =_ebss
  1535. 8000c14: 4c0a ldr r4, [pc, #40] @ (8000c40 <LoopFillZerobss+0x22>)
  1536. movs r3, #0
  1537. 8000c16: 2300 movs r3, #0
  1538. b LoopFillZerobss
  1539. 8000c18: e001 b.n 8000c1e <LoopFillZerobss>
  1540. 08000c1a <FillZerobss>:
  1541. FillZerobss:
  1542. str r3, [r2]
  1543. 8000c1a: 6013 str r3, [r2, #0]
  1544. adds r2, r2, #4
  1545. 8000c1c: 3204 adds r2, #4
  1546. 08000c1e <LoopFillZerobss>:
  1547. LoopFillZerobss:
  1548. cmp r2, r4
  1549. 8000c1e: 42a2 cmp r2, r4
  1550. bcc FillZerobss
  1551. 8000c20: d3fb bcc.n 8000c1a <FillZerobss>
  1552. /* Call static constructors */
  1553. bl __libc_init_array
  1554. 8000c22: f012 fdff bl 8013824 <__libc_init_array>
  1555. /* Call the application's entry point.*/
  1556. bl main
  1557. 8000c26: f7ff fd6d bl 8000704 <main>
  1558. bx lr
  1559. 8000c2a: 4770 bx lr
  1560. ldr sp, =_estack /* set stack pointer */
  1561. 8000c2c: 24080000 .word 0x24080000
  1562. ldr r0, =_sdata
  1563. 8000c30: 24000000 .word 0x24000000
  1564. ldr r1, =_edata
  1565. 8000c34: 2400008c .word 0x2400008c
  1566. ldr r2, =_sidata
  1567. 8000c38: 080180cc .word 0x080180cc
  1568. ldr r2, =_sbss
  1569. 8000c3c: 2400008c .word 0x2400008c
  1570. ldr r4, =_ebss
  1571. 8000c40: 24019d9c .word 0x24019d9c
  1572. 08000c44 <ADC3_IRQHandler>:
  1573. * @retval None
  1574. */
  1575. .section .text.Default_Handler,"ax",%progbits
  1576. Default_Handler:
  1577. Infinite_Loop:
  1578. b Infinite_Loop
  1579. 8000c44: e7fe b.n 8000c44 <ADC3_IRQHandler>
  1580. 08000c46 <LAN8742_RegisterBusIO>:
  1581. * @retval LAN8742_STATUS_OK if OK
  1582. * LAN8742_STATUS_ERROR if missing mandatory function
  1583. */
  1584. int32_t LAN8742_RegisterBusIO(lan8742_Object_t *pObj, lan8742_IOCtx_t *ioctx)
  1585. {
  1586. if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick)
  1587. 8000c46: b188 cbz r0, 8000c6c <LAN8742_RegisterBusIO+0x26>
  1588. 8000c48: 68ca ldr r2, [r1, #12]
  1589. 8000c4a: b192 cbz r2, 8000c72 <LAN8742_RegisterBusIO+0x2c>
  1590. 8000c4c: 688a ldr r2, [r1, #8]
  1591. 8000c4e: b19a cbz r2, 8000c78 <LAN8742_RegisterBusIO+0x32>
  1592. 8000c50: 690a ldr r2, [r1, #16]
  1593. 8000c52: b1a2 cbz r2, 8000c7e <LAN8742_RegisterBusIO+0x38>
  1594. {
  1595. return LAN8742_STATUS_ERROR;
  1596. }
  1597. pObj->IO.Init = ioctx->Init;
  1598. 8000c54: 680a ldr r2, [r1, #0]
  1599. 8000c56: 6082 str r2, [r0, #8]
  1600. pObj->IO.DeInit = ioctx->DeInit;
  1601. 8000c58: 684a ldr r2, [r1, #4]
  1602. 8000c5a: 60c2 str r2, [r0, #12]
  1603. pObj->IO.ReadReg = ioctx->ReadReg;
  1604. 8000c5c: 68ca ldr r2, [r1, #12]
  1605. 8000c5e: 6142 str r2, [r0, #20]
  1606. pObj->IO.WriteReg = ioctx->WriteReg;
  1607. 8000c60: 688a ldr r2, [r1, #8]
  1608. 8000c62: 6102 str r2, [r0, #16]
  1609. pObj->IO.GetTick = ioctx->GetTick;
  1610. 8000c64: 690a ldr r2, [r1, #16]
  1611. 8000c66: 6182 str r2, [r0, #24]
  1612. return LAN8742_STATUS_OK;
  1613. 8000c68: 2000 movs r0, #0
  1614. 8000c6a: 4770 bx lr
  1615. return LAN8742_STATUS_ERROR;
  1616. 8000c6c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  1617. 8000c70: 4770 bx lr
  1618. 8000c72: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  1619. 8000c76: 4770 bx lr
  1620. 8000c78: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  1621. 8000c7c: 4770 bx lr
  1622. 8000c7e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  1623. }
  1624. 8000c82: 4770 bx lr
  1625. 08000c84 <LAN8742_Init>:
  1626. * LAN8742_STATUS_READ_ERROR if connot read register
  1627. * LAN8742_STATUS_WRITE_ERROR if connot write to register
  1628. * LAN8742_STATUS_RESET_TIMEOUT if cannot perform a software reset
  1629. */
  1630. int32_t LAN8742_Init(lan8742_Object_t *pObj)
  1631. {
  1632. 8000c84: b570 push {r4, r5, r6, lr}
  1633. 8000c86: b082 sub sp, #8
  1634. 8000c88: 4605 mov r5, r0
  1635. uint32_t tickstart = 0, regvalue = 0, addr = 0;
  1636. 8000c8a: 2300 movs r3, #0
  1637. 8000c8c: 9301 str r3, [sp, #4]
  1638. int32_t status = LAN8742_STATUS_OK;
  1639. if(pObj->Is_Initialized == 0)
  1640. 8000c8e: 6844 ldr r4, [r0, #4]
  1641. 8000c90: 2c00 cmp r4, #0
  1642. 8000c92: d14a bne.n 8000d2a <LAN8742_Init+0xa6>
  1643. {
  1644. if(pObj->IO.Init != 0)
  1645. 8000c94: 6883 ldr r3, [r0, #8]
  1646. 8000c96: b103 cbz r3, 8000c9a <LAN8742_Init+0x16>
  1647. {
  1648. /* GPIO and Clocks initialization */
  1649. pObj->IO.Init();
  1650. 8000c98: 4798 blx r3
  1651. }
  1652. /* for later check */
  1653. pObj->DevAddr = LAN8742_MAX_DEV_ADDR + 1;
  1654. 8000c9a: 2320 movs r3, #32
  1655. 8000c9c: 602b str r3, [r5, #0]
  1656. int32_t status = LAN8742_STATUS_OK;
  1657. 8000c9e: 2600 movs r6, #0
  1658. /* Get the device address from special mode register */
  1659. for(addr = 0; addr <= LAN8742_MAX_DEV_ADDR; addr ++)
  1660. 8000ca0: e002 b.n 8000ca8 <LAN8742_Init+0x24>
  1661. {
  1662. if(pObj->IO.ReadReg(addr, LAN8742_SMR, &regvalue) < 0)
  1663. {
  1664. status = LAN8742_STATUS_READ_ERROR;
  1665. 8000ca2: f06f 0604 mvn.w r6, #4
  1666. for(addr = 0; addr <= LAN8742_MAX_DEV_ADDR; addr ++)
  1667. 8000ca6: 3401 adds r4, #1
  1668. 8000ca8: 2c1f cmp r4, #31
  1669. 8000caa: d80d bhi.n 8000cc8 <LAN8742_Init+0x44>
  1670. if(pObj->IO.ReadReg(addr, LAN8742_SMR, &regvalue) < 0)
  1671. 8000cac: 696b ldr r3, [r5, #20]
  1672. 8000cae: aa01 add r2, sp, #4
  1673. 8000cb0: 2112 movs r1, #18
  1674. 8000cb2: 4620 mov r0, r4
  1675. 8000cb4: 4798 blx r3
  1676. 8000cb6: 2800 cmp r0, #0
  1677. 8000cb8: dbf3 blt.n 8000ca2 <LAN8742_Init+0x1e>
  1678. /* Can't read from this device address
  1679. continue with next address */
  1680. continue;
  1681. }
  1682. if((regvalue & LAN8742_SMR_PHY_ADDR) == addr)
  1683. 8000cba: 9b01 ldr r3, [sp, #4]
  1684. 8000cbc: f003 031f and.w r3, r3, #31
  1685. 8000cc0: 42a3 cmp r3, r4
  1686. 8000cc2: d1f0 bne.n 8000ca6 <LAN8742_Init+0x22>
  1687. {
  1688. pObj->DevAddr = addr;
  1689. 8000cc4: 602c str r4, [r5, #0]
  1690. status = LAN8742_STATUS_OK;
  1691. 8000cc6: 2600 movs r6, #0
  1692. break;
  1693. }
  1694. }
  1695. if(pObj->DevAddr > LAN8742_MAX_DEV_ADDR)
  1696. 8000cc8: 6828 ldr r0, [r5, #0]
  1697. 8000cca: 281f cmp r0, #31
  1698. 8000ccc: d826 bhi.n 8000d1c <LAN8742_Init+0x98>
  1699. {
  1700. status = LAN8742_STATUS_ADDRESS_ERROR;
  1701. }
  1702. /* if device address is matched */
  1703. if(status == LAN8742_STATUS_OK)
  1704. 8000cce: 2e00 cmp r6, #0
  1705. 8000cd0: d137 bne.n 8000d42 <LAN8742_Init+0xbe>
  1706. {
  1707. /* set a software reset */
  1708. if(pObj->IO.WriteReg(pObj->DevAddr, LAN8742_BCR, LAN8742_BCR_SOFT_RESET) >= 0)
  1709. 8000cd2: 692b ldr r3, [r5, #16]
  1710. 8000cd4: f44f 4200 mov.w r2, #32768 @ 0x8000
  1711. 8000cd8: 2100 movs r1, #0
  1712. 8000cda: 4798 blx r3
  1713. 8000cdc: 2800 cmp r0, #0
  1714. 8000cde: db33 blt.n 8000d48 <LAN8742_Init+0xc4>
  1715. {
  1716. /* get software reset status */
  1717. if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, &regvalue) >= 0)
  1718. 8000ce0: 696b ldr r3, [r5, #20]
  1719. 8000ce2: aa01 add r2, sp, #4
  1720. 8000ce4: 2100 movs r1, #0
  1721. 8000ce6: 6828 ldr r0, [r5, #0]
  1722. 8000ce8: 4798 blx r3
  1723. 8000cea: 2800 cmp r0, #0
  1724. 8000cec: db2f blt.n 8000d4e <LAN8742_Init+0xca>
  1725. {
  1726. tickstart = pObj->IO.GetTick();
  1727. 8000cee: 69ab ldr r3, [r5, #24]
  1728. 8000cf0: 4798 blx r3
  1729. 8000cf2: 4604 mov r4, r0
  1730. /* wait until software reset is done or timeout occured */
  1731. while(regvalue & LAN8742_BCR_SOFT_RESET)
  1732. 8000cf4: 9b01 ldr r3, [sp, #4]
  1733. 8000cf6: f413 4f00 tst.w r3, #32768 @ 0x8000
  1734. 8000cfa: d011 beq.n 8000d20 <LAN8742_Init+0x9c>
  1735. {
  1736. if((pObj->IO.GetTick() - tickstart) <= LAN8742_SW_RESET_TO)
  1737. 8000cfc: 69ab ldr r3, [r5, #24]
  1738. 8000cfe: 4798 blx r3
  1739. 8000d00: 1b00 subs r0, r0, r4
  1740. 8000d02: f5b0 7ffa cmp.w r0, #500 @ 0x1f4
  1741. 8000d06: d80d bhi.n 8000d24 <LAN8742_Init+0xa0>
  1742. {
  1743. if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, &regvalue) < 0)
  1744. 8000d08: 696b ldr r3, [r5, #20]
  1745. 8000d0a: aa01 add r2, sp, #4
  1746. 8000d0c: 2100 movs r1, #0
  1747. 8000d0e: 6828 ldr r0, [r5, #0]
  1748. 8000d10: 4798 blx r3
  1749. 8000d12: 2800 cmp r0, #0
  1750. 8000d14: daee bge.n 8000cf4 <LAN8742_Init+0x70>
  1751. {
  1752. status = LAN8742_STATUS_READ_ERROR;
  1753. 8000d16: f06f 0604 mvn.w r6, #4
  1754. 8000d1a: e001 b.n 8000d20 <LAN8742_Init+0x9c>
  1755. status = LAN8742_STATUS_ADDRESS_ERROR;
  1756. 8000d1c: f06f 0602 mvn.w r6, #2
  1757. status = LAN8742_STATUS_WRITE_ERROR;
  1758. }
  1759. }
  1760. }
  1761. if(status == LAN8742_STATUS_OK)
  1762. 8000d20: b97e cbnz r6, 8000d42 <LAN8742_Init+0xbe>
  1763. 8000d22: e003 b.n 8000d2c <LAN8742_Init+0xa8>
  1764. status = LAN8742_STATUS_RESET_TIMEOUT;
  1765. 8000d24: f06f 0601 mvn.w r6, #1
  1766. 8000d28: e7fa b.n 8000d20 <LAN8742_Init+0x9c>
  1767. int32_t status = LAN8742_STATUS_OK;
  1768. 8000d2a: 2600 movs r6, #0
  1769. {
  1770. tickstart = pObj->IO.GetTick();
  1771. 8000d2c: 69ab ldr r3, [r5, #24]
  1772. 8000d2e: 4798 blx r3
  1773. 8000d30: 4604 mov r4, r0
  1774. /* Wait for 2s to perform initialization */
  1775. while((pObj->IO.GetTick() - tickstart) <= LAN8742_INIT_TO)
  1776. 8000d32: 69ab ldr r3, [r5, #24]
  1777. 8000d34: 4798 blx r3
  1778. 8000d36: 1b03 subs r3, r0, r4
  1779. 8000d38: f5b3 6ffa cmp.w r3, #2000 @ 0x7d0
  1780. 8000d3c: d9f9 bls.n 8000d32 <LAN8742_Init+0xae>
  1781. {
  1782. }
  1783. pObj->Is_Initialized = 1;
  1784. 8000d3e: 2301 movs r3, #1
  1785. 8000d40: 606b str r3, [r5, #4]
  1786. }
  1787. return status;
  1788. }
  1789. 8000d42: 4630 mov r0, r6
  1790. 8000d44: b002 add sp, #8
  1791. 8000d46: bd70 pop {r4, r5, r6, pc}
  1792. status = LAN8742_STATUS_WRITE_ERROR;
  1793. 8000d48: f06f 0603 mvn.w r6, #3
  1794. 8000d4c: e7f9 b.n 8000d42 <LAN8742_Init+0xbe>
  1795. status = LAN8742_STATUS_READ_ERROR;
  1796. 8000d4e: f06f 0604 mvn.w r6, #4
  1797. return status;
  1798. 8000d52: e7f6 b.n 8000d42 <LAN8742_Init+0xbe>
  1799. 08000d54 <LAN8742_GetLinkState>:
  1800. * LAN8742_STATUS_10MBITS_HALFDUPLEX if 10Mb/s HD
  1801. * LAN8742_STATUS_READ_ERROR if connot read register
  1802. * LAN8742_STATUS_WRITE_ERROR if connot write to register
  1803. */
  1804. int32_t LAN8742_GetLinkState(lan8742_Object_t *pObj)
  1805. {
  1806. 8000d54: b510 push {r4, lr}
  1807. 8000d56: b082 sub sp, #8
  1808. 8000d58: 4604 mov r4, r0
  1809. uint32_t readval = 0;
  1810. 8000d5a: 2300 movs r3, #0
  1811. 8000d5c: 9301 str r3, [sp, #4]
  1812. /* Read Status register */
  1813. if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BSR, &readval) < 0)
  1814. 8000d5e: 6943 ldr r3, [r0, #20]
  1815. 8000d60: aa01 add r2, sp, #4
  1816. 8000d62: 2101 movs r1, #1
  1817. 8000d64: 6800 ldr r0, [r0, #0]
  1818. 8000d66: 4798 blx r3
  1819. 8000d68: 2800 cmp r0, #0
  1820. 8000d6a: db39 blt.n 8000de0 <LAN8742_GetLinkState+0x8c>
  1821. {
  1822. return LAN8742_STATUS_READ_ERROR;
  1823. }
  1824. /* Read Status register again */
  1825. if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BSR, &readval) < 0)
  1826. 8000d6c: 6963 ldr r3, [r4, #20]
  1827. 8000d6e: aa01 add r2, sp, #4
  1828. 8000d70: 2101 movs r1, #1
  1829. 8000d72: 6820 ldr r0, [r4, #0]
  1830. 8000d74: 4798 blx r3
  1831. 8000d76: 2800 cmp r0, #0
  1832. 8000d78: db35 blt.n 8000de6 <LAN8742_GetLinkState+0x92>
  1833. {
  1834. return LAN8742_STATUS_READ_ERROR;
  1835. }
  1836. if((readval & LAN8742_BSR_LINK_STATUS) == 0)
  1837. 8000d7a: 9b01 ldr r3, [sp, #4]
  1838. 8000d7c: f013 0f04 tst.w r3, #4
  1839. 8000d80: d034 beq.n 8000dec <LAN8742_GetLinkState+0x98>
  1840. /* Return Link Down status */
  1841. return LAN8742_STATUS_LINK_DOWN;
  1842. }
  1843. /* Check Auto negotiaition */
  1844. if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, &readval) < 0)
  1845. 8000d82: 6963 ldr r3, [r4, #20]
  1846. 8000d84: aa01 add r2, sp, #4
  1847. 8000d86: 2100 movs r1, #0
  1848. 8000d88: 6820 ldr r0, [r4, #0]
  1849. 8000d8a: 4798 blx r3
  1850. 8000d8c: 2800 cmp r0, #0
  1851. 8000d8e: db30 blt.n 8000df2 <LAN8742_GetLinkState+0x9e>
  1852. {
  1853. return LAN8742_STATUS_READ_ERROR;
  1854. }
  1855. if((readval & LAN8742_BCR_AUTONEGO_EN) != LAN8742_BCR_AUTONEGO_EN)
  1856. 8000d90: 9b01 ldr r3, [sp, #4]
  1857. 8000d92: f413 5f80 tst.w r3, #4096 @ 0x1000
  1858. 8000d96: d10c bne.n 8000db2 <LAN8742_GetLinkState+0x5e>
  1859. {
  1860. if(((readval & LAN8742_BCR_SPEED_SELECT) == LAN8742_BCR_SPEED_SELECT) && ((readval & LAN8742_BCR_DUPLEX_MODE) == LAN8742_BCR_DUPLEX_MODE))
  1861. 8000d98: f403 5204 and.w r2, r3, #8448 @ 0x2100
  1862. 8000d9c: f5b2 5f04 cmp.w r2, #8448 @ 0x2100
  1863. 8000da0: d02a beq.n 8000df8 <LAN8742_GetLinkState+0xa4>
  1864. {
  1865. return LAN8742_STATUS_100MBITS_FULLDUPLEX;
  1866. }
  1867. else if ((readval & LAN8742_BCR_SPEED_SELECT) == LAN8742_BCR_SPEED_SELECT)
  1868. 8000da2: f413 5f00 tst.w r3, #8192 @ 0x2000
  1869. 8000da6: d129 bne.n 8000dfc <LAN8742_GetLinkState+0xa8>
  1870. {
  1871. return LAN8742_STATUS_100MBITS_HALFDUPLEX;
  1872. }
  1873. else if ((readval & LAN8742_BCR_DUPLEX_MODE) == LAN8742_BCR_DUPLEX_MODE)
  1874. 8000da8: f413 7f80 tst.w r3, #256 @ 0x100
  1875. 8000dac: d028 beq.n 8000e00 <LAN8742_GetLinkState+0xac>
  1876. {
  1877. return LAN8742_STATUS_10MBITS_FULLDUPLEX;
  1878. 8000dae: 2004 movs r0, #4
  1879. 8000db0: e01d b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1880. return LAN8742_STATUS_10MBITS_HALFDUPLEX;
  1881. }
  1882. }
  1883. else /* Auto Nego enabled */
  1884. {
  1885. if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_PHYSCSR, &readval) < 0)
  1886. 8000db2: 6963 ldr r3, [r4, #20]
  1887. 8000db4: aa01 add r2, sp, #4
  1888. 8000db6: 211f movs r1, #31
  1889. 8000db8: 6820 ldr r0, [r4, #0]
  1890. 8000dba: 4798 blx r3
  1891. 8000dbc: 2800 cmp r0, #0
  1892. 8000dbe: db21 blt.n 8000e04 <LAN8742_GetLinkState+0xb0>
  1893. {
  1894. return LAN8742_STATUS_READ_ERROR;
  1895. }
  1896. /* Check if auto nego not done */
  1897. if((readval & LAN8742_PHYSCSR_AUTONEGO_DONE) == 0)
  1898. 8000dc0: 9b01 ldr r3, [sp, #4]
  1899. 8000dc2: f413 5f80 tst.w r3, #4096 @ 0x1000
  1900. 8000dc6: d020 beq.n 8000e0a <LAN8742_GetLinkState+0xb6>
  1901. {
  1902. return LAN8742_STATUS_AUTONEGO_NOTDONE;
  1903. }
  1904. if((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_100BTX_FD)
  1905. 8000dc8: f003 031c and.w r3, r3, #28
  1906. 8000dcc: 2b18 cmp r3, #24
  1907. 8000dce: d01e beq.n 8000e0e <LAN8742_GetLinkState+0xba>
  1908. {
  1909. return LAN8742_STATUS_100MBITS_FULLDUPLEX;
  1910. }
  1911. else if ((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_100BTX_HD)
  1912. 8000dd0: 2b08 cmp r3, #8
  1913. 8000dd2: d01e beq.n 8000e12 <LAN8742_GetLinkState+0xbe>
  1914. {
  1915. return LAN8742_STATUS_100MBITS_HALFDUPLEX;
  1916. }
  1917. else if ((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_10BT_FD)
  1918. 8000dd4: 2b14 cmp r3, #20
  1919. 8000dd6: d001 beq.n 8000ddc <LAN8742_GetLinkState+0x88>
  1920. {
  1921. return LAN8742_STATUS_10MBITS_FULLDUPLEX;
  1922. }
  1923. else
  1924. {
  1925. return LAN8742_STATUS_10MBITS_HALFDUPLEX;
  1926. 8000dd8: 2005 movs r0, #5
  1927. 8000dda: e008 b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1928. return LAN8742_STATUS_10MBITS_FULLDUPLEX;
  1929. 8000ddc: 2004 movs r0, #4
  1930. 8000dde: e006 b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1931. return LAN8742_STATUS_READ_ERROR;
  1932. 8000de0: f06f 0004 mvn.w r0, #4
  1933. 8000de4: e003 b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1934. return LAN8742_STATUS_READ_ERROR;
  1935. 8000de6: f06f 0004 mvn.w r0, #4
  1936. 8000dea: e000 b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1937. return LAN8742_STATUS_LINK_DOWN;
  1938. 8000dec: 2001 movs r0, #1
  1939. }
  1940. }
  1941. }
  1942. 8000dee: b002 add sp, #8
  1943. 8000df0: bd10 pop {r4, pc}
  1944. return LAN8742_STATUS_READ_ERROR;
  1945. 8000df2: f06f 0004 mvn.w r0, #4
  1946. 8000df6: e7fa b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1947. return LAN8742_STATUS_100MBITS_FULLDUPLEX;
  1948. 8000df8: 2002 movs r0, #2
  1949. 8000dfa: e7f8 b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1950. return LAN8742_STATUS_100MBITS_HALFDUPLEX;
  1951. 8000dfc: 2003 movs r0, #3
  1952. 8000dfe: e7f6 b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1953. return LAN8742_STATUS_10MBITS_HALFDUPLEX;
  1954. 8000e00: 2005 movs r0, #5
  1955. 8000e02: e7f4 b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1956. return LAN8742_STATUS_READ_ERROR;
  1957. 8000e04: f06f 0004 mvn.w r0, #4
  1958. 8000e08: e7f1 b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1959. return LAN8742_STATUS_AUTONEGO_NOTDONE;
  1960. 8000e0a: 2006 movs r0, #6
  1961. 8000e0c: e7ef b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1962. return LAN8742_STATUS_100MBITS_FULLDUPLEX;
  1963. 8000e0e: 2002 movs r0, #2
  1964. 8000e10: e7ed b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1965. return LAN8742_STATUS_100MBITS_HALFDUPLEX;
  1966. 8000e12: 2003 movs r0, #3
  1967. 8000e14: e7eb b.n 8000dee <LAN8742_GetLinkState+0x9a>
  1968. ...
  1969. 08000e18 <HAL_Init>:
  1970. * need to ensure that the SysTick time base is always set to 1 millisecond
  1971. * to have correct HAL operation.
  1972. * @retval HAL status
  1973. */
  1974. HAL_StatusTypeDef HAL_Init(void)
  1975. {
  1976. 8000e18: b510 push {r4, lr}
  1977. __HAL_ART_CONFIG_BASE_ADDRESS(0x08100000UL); /* Configure the Cortex-M4 ART Base address to the Flash Bank 2 : */
  1978. __HAL_ART_ENABLE(); /* Enable the Cortex-M4 ART */
  1979. #endif /* DUAL_CORE && CORE_CM4 */
  1980. /* Set Interrupt Group Priority */
  1981. HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
  1982. 8000e1a: 2003 movs r0, #3
  1983. 8000e1c: f000 f88c bl 8000f38 <HAL_NVIC_SetPriorityGrouping>
  1984. /* Update the SystemCoreClock global variable */
  1985. #if defined(RCC_D1CFGR_D1CPRE)
  1986. common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU);
  1987. 8000e20: f001 fe60 bl 8002ae4 <HAL_RCC_GetSysClockFreq>
  1988. 8000e24: 490f ldr r1, [pc, #60] @ (8000e64 <HAL_Init+0x4c>)
  1989. 8000e26: 698b ldr r3, [r1, #24]
  1990. 8000e28: f3c3 2303 ubfx r3, r3, #8, #4
  1991. 8000e2c: 4a0e ldr r2, [pc, #56] @ (8000e68 <HAL_Init+0x50>)
  1992. 8000e2e: 5cd3 ldrb r3, [r2, r3]
  1993. 8000e30: f003 031f and.w r3, r3, #31
  1994. 8000e34: 40d8 lsrs r0, r3
  1995. common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE)>> RCC_CDCFGR1_CDCPRE_Pos]) & 0x1FU);
  1996. #endif
  1997. /* Update the SystemD2Clock global variable */
  1998. #if defined(RCC_D1CFGR_HPRE)
  1999. SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU));
  2000. 8000e36: 698b ldr r3, [r1, #24]
  2001. 8000e38: f003 030f and.w r3, r3, #15
  2002. 8000e3c: 5cd3 ldrb r3, [r2, r3]
  2003. 8000e3e: f003 031f and.w r3, r3, #31
  2004. 8000e42: fa20 f303 lsr.w r3, r0, r3
  2005. 8000e46: 4a09 ldr r2, [pc, #36] @ (8000e6c <HAL_Init+0x54>)
  2006. 8000e48: 6013 str r3, [r2, #0]
  2007. #endif
  2008. #if defined(DUAL_CORE) && defined(CORE_CM4)
  2009. SystemCoreClock = SystemD2Clock;
  2010. #else
  2011. SystemCoreClock = common_system_clock;
  2012. 8000e4a: 4b09 ldr r3, [pc, #36] @ (8000e70 <HAL_Init+0x58>)
  2013. 8000e4c: 6018 str r0, [r3, #0]
  2014. #endif /* DUAL_CORE && CORE_CM4 */
  2015. /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
  2016. if(HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK)
  2017. 8000e4e: 200f movs r0, #15
  2018. 8000e50: f7ff fdf2 bl 8000a38 <HAL_InitTick>
  2019. 8000e54: b110 cbz r0, 8000e5c <HAL_Init+0x44>
  2020. {
  2021. return HAL_ERROR;
  2022. 8000e56: 2401 movs r4, #1
  2023. /* Init the low level hardware */
  2024. HAL_MspInit();
  2025. /* Return function status */
  2026. return HAL_OK;
  2027. }
  2028. 8000e58: 4620 mov r0, r4
  2029. 8000e5a: bd10 pop {r4, pc}
  2030. 8000e5c: 4604 mov r4, r0
  2031. HAL_MspInit();
  2032. 8000e5e: f7ff fdd1 bl 8000a04 <HAL_MspInit>
  2033. return HAL_OK;
  2034. 8000e62: e7f9 b.n 8000e58 <HAL_Init+0x40>
  2035. 8000e64: 58024400 .word 0x58024400
  2036. 8000e68: 08014328 .word 0x08014328
  2037. 8000e6c: 24000000 .word 0x24000000
  2038. 8000e70: 24000004 .word 0x24000004
  2039. 08000e74 <HAL_IncTick>:
  2040. * implementations in user file.
  2041. * @retval None
  2042. */
  2043. __weak void HAL_IncTick(void)
  2044. {
  2045. uwTick += (uint32_t)uwTickFreq;
  2046. 8000e74: 4b03 ldr r3, [pc, #12] @ (8000e84 <HAL_IncTick+0x10>)
  2047. 8000e76: 781b ldrb r3, [r3, #0]
  2048. 8000e78: 4a03 ldr r2, [pc, #12] @ (8000e88 <HAL_IncTick+0x14>)
  2049. 8000e7a: 6811 ldr r1, [r2, #0]
  2050. 8000e7c: 440b add r3, r1
  2051. 8000e7e: 6013 str r3, [r2, #0]
  2052. }
  2053. 8000e80: 4770 bx lr
  2054. 8000e82: bf00 nop
  2055. 8000e84: 24000008 .word 0x24000008
  2056. 8000e88: 24000d80 .word 0x24000d80
  2057. 08000e8c <HAL_GetTick>:
  2058. * implementations in user file.
  2059. * @retval tick value
  2060. */
  2061. __weak uint32_t HAL_GetTick(void)
  2062. {
  2063. return uwTick;
  2064. 8000e8c: 4b01 ldr r3, [pc, #4] @ (8000e94 <HAL_GetTick+0x8>)
  2065. 8000e8e: 6818 ldr r0, [r3, #0]
  2066. }
  2067. 8000e90: 4770 bx lr
  2068. 8000e92: bf00 nop
  2069. 8000e94: 24000d80 .word 0x24000d80
  2070. 08000e98 <HAL_GetREVID>:
  2071. * @brief Returns the device revision identifier.
  2072. * @retval Device revision identifier
  2073. */
  2074. uint32_t HAL_GetREVID(void)
  2075. {
  2076. return((DBGMCU->IDCODE) >> 16);
  2077. 8000e98: 4b01 ldr r3, [pc, #4] @ (8000ea0 <HAL_GetREVID+0x8>)
  2078. 8000e9a: 6818 ldr r0, [r3, #0]
  2079. }
  2080. 8000e9c: 0c00 lsrs r0, r0, #16
  2081. 8000e9e: 4770 bx lr
  2082. 8000ea0: 5c001000 .word 0x5c001000
  2083. 08000ea4 <HAL_SYSCFG_ETHInterfaceSelect>:
  2084. void HAL_SYSCFG_ETHInterfaceSelect(uint32_t SYSCFG_ETHInterface)
  2085. {
  2086. /* Check the parameter */
  2087. assert_param(IS_SYSCFG_ETHERNET_CONFIG(SYSCFG_ETHInterface));
  2088. MODIFY_REG(SYSCFG->PMCR, SYSCFG_PMCR_EPIS_SEL, (uint32_t)(SYSCFG_ETHInterface));
  2089. 8000ea4: 4a03 ldr r2, [pc, #12] @ (8000eb4 <HAL_SYSCFG_ETHInterfaceSelect+0x10>)
  2090. 8000ea6: 6853 ldr r3, [r2, #4]
  2091. 8000ea8: f423 0360 bic.w r3, r3, #14680064 @ 0xe00000
  2092. 8000eac: 4303 orrs r3, r0
  2093. 8000eae: 6053 str r3, [r2, #4]
  2094. }
  2095. 8000eb0: 4770 bx lr
  2096. 8000eb2: bf00 nop
  2097. 8000eb4: 58000400 .word 0x58000400
  2098. 08000eb8 <__NVIC_EnableIRQ>:
  2099. if ((int32_t)(IRQn) >= 0)
  2100. 8000eb8: 2800 cmp r0, #0
  2101. 8000eba: db07 blt.n 8000ecc <__NVIC_EnableIRQ+0x14>
  2102. NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
  2103. 8000ebc: f000 021f and.w r2, r0, #31
  2104. 8000ec0: 0940 lsrs r0, r0, #5
  2105. 8000ec2: 2301 movs r3, #1
  2106. 8000ec4: 4093 lsls r3, r2
  2107. 8000ec6: 4a02 ldr r2, [pc, #8] @ (8000ed0 <__NVIC_EnableIRQ+0x18>)
  2108. 8000ec8: f842 3020 str.w r3, [r2, r0, lsl #2]
  2109. }
  2110. 8000ecc: 4770 bx lr
  2111. 8000ece: bf00 nop
  2112. 8000ed0: e000e100 .word 0xe000e100
  2113. 08000ed4 <__NVIC_SetPriority>:
  2114. if ((int32_t)(IRQn) >= 0)
  2115. 8000ed4: 2800 cmp r0, #0
  2116. 8000ed6: db04 blt.n 8000ee2 <__NVIC_SetPriority+0xe>
  2117. NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
  2118. 8000ed8: 0109 lsls r1, r1, #4
  2119. 8000eda: b2c9 uxtb r1, r1
  2120. 8000edc: 4b04 ldr r3, [pc, #16] @ (8000ef0 <__NVIC_SetPriority+0x1c>)
  2121. 8000ede: 5419 strb r1, [r3, r0]
  2122. 8000ee0: 4770 bx lr
  2123. SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
  2124. 8000ee2: f000 000f and.w r0, r0, #15
  2125. 8000ee6: 0109 lsls r1, r1, #4
  2126. 8000ee8: b2c9 uxtb r1, r1
  2127. 8000eea: 4b02 ldr r3, [pc, #8] @ (8000ef4 <__NVIC_SetPriority+0x20>)
  2128. 8000eec: 5419 strb r1, [r3, r0]
  2129. }
  2130. 8000eee: 4770 bx lr
  2131. 8000ef0: e000e400 .word 0xe000e400
  2132. 8000ef4: e000ed14 .word 0xe000ed14
  2133. 08000ef8 <NVIC_EncodePriority>:
  2134. {
  2135. 8000ef8: b500 push {lr}
  2136. uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */
  2137. 8000efa: f000 0007 and.w r0, r0, #7
  2138. PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp);
  2139. 8000efe: f1c0 0c07 rsb ip, r0, #7
  2140. 8000f02: f1bc 0f04 cmp.w ip, #4
  2141. 8000f06: bf28 it cs
  2142. 8000f08: f04f 0c04 movcs.w ip, #4
  2143. SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
  2144. 8000f0c: 1d03 adds r3, r0, #4
  2145. 8000f0e: 2b06 cmp r3, #6
  2146. 8000f10: d90f bls.n 8000f32 <NVIC_EncodePriority+0x3a>
  2147. 8000f12: 1ec3 subs r3, r0, #3
  2148. ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) |
  2149. 8000f14: f04f 3eff mov.w lr, #4294967295 @ 0xffffffff
  2150. 8000f18: fa0e f00c lsl.w r0, lr, ip
  2151. 8000f1c: ea21 0100 bic.w r1, r1, r0
  2152. 8000f20: 4099 lsls r1, r3
  2153. ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL)))
  2154. 8000f22: fa0e fe03 lsl.w lr, lr, r3
  2155. 8000f26: ea22 020e bic.w r2, r2, lr
  2156. }
  2157. 8000f2a: ea41 0002 orr.w r0, r1, r2
  2158. 8000f2e: f85d fb04 ldr.w pc, [sp], #4
  2159. SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS));
  2160. 8000f32: 2300 movs r3, #0
  2161. 8000f34: e7ee b.n 8000f14 <NVIC_EncodePriority+0x1c>
  2162. ...
  2163. 08000f38 <HAL_NVIC_SetPriorityGrouping>:
  2164. reg_value = SCB->AIRCR; /* read old register configuration */
  2165. 8000f38: 4906 ldr r1, [pc, #24] @ (8000f54 <HAL_NVIC_SetPriorityGrouping+0x1c>)
  2166. 8000f3a: 68cb ldr r3, [r1, #12]
  2167. reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
  2168. 8000f3c: f423 63e0 bic.w r3, r3, #1792 @ 0x700
  2169. 8000f40: 041b lsls r3, r3, #16
  2170. 8000f42: 0c1b lsrs r3, r3, #16
  2171. (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */
  2172. 8000f44: 0200 lsls r0, r0, #8
  2173. 8000f46: f400 60e0 and.w r0, r0, #1792 @ 0x700
  2174. ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
  2175. 8000f4a: 4303 orrs r3, r0
  2176. reg_value = (reg_value |
  2177. 8000f4c: 4a02 ldr r2, [pc, #8] @ (8000f58 <HAL_NVIC_SetPriorityGrouping+0x20>)
  2178. 8000f4e: 431a orrs r2, r3
  2179. SCB->AIRCR = reg_value;
  2180. 8000f50: 60ca str r2, [r1, #12]
  2181. /* Check the parameters */
  2182. assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup));
  2183. /* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */
  2184. NVIC_SetPriorityGrouping(PriorityGroup);
  2185. }
  2186. 8000f52: 4770 bx lr
  2187. 8000f54: e000ed00 .word 0xe000ed00
  2188. 8000f58: 05fa0000 .word 0x05fa0000
  2189. 08000f5c <HAL_NVIC_SetPriority>:
  2190. * This parameter can be a value between 0 and 15
  2191. * A lower priority value indicates a higher priority.
  2192. * @retval None
  2193. */
  2194. void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
  2195. {
  2196. 8000f5c: b510 push {r4, lr}
  2197. 8000f5e: 4604 mov r4, r0
  2198. return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos));
  2199. 8000f60: 4b05 ldr r3, [pc, #20] @ (8000f78 <HAL_NVIC_SetPriority+0x1c>)
  2200. 8000f62: 68d8 ldr r0, [r3, #12]
  2201. assert_param(IS_NVIC_SUB_PRIORITY(SubPriority));
  2202. assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority));
  2203. prioritygroup = NVIC_GetPriorityGrouping();
  2204. NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority));
  2205. 8000f64: f3c0 2002 ubfx r0, r0, #8, #3
  2206. 8000f68: f7ff ffc6 bl 8000ef8 <NVIC_EncodePriority>
  2207. 8000f6c: 4601 mov r1, r0
  2208. 8000f6e: 4620 mov r0, r4
  2209. 8000f70: f7ff ffb0 bl 8000ed4 <__NVIC_SetPriority>
  2210. }
  2211. 8000f74: bd10 pop {r4, pc}
  2212. 8000f76: bf00 nop
  2213. 8000f78: e000ed00 .word 0xe000ed00
  2214. 08000f7c <HAL_NVIC_EnableIRQ>:
  2215. * This parameter can be an enumerator of IRQn_Type enumeration
  2216. * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32h7xxxx.h))
  2217. * @retval None
  2218. */
  2219. void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
  2220. {
  2221. 8000f7c: b508 push {r3, lr}
  2222. /* Check the parameters */
  2223. assert_param(IS_NVIC_DEVICE_IRQ(IRQn));
  2224. /* Enable interrupt */
  2225. NVIC_EnableIRQ(IRQn);
  2226. 8000f7e: f7ff ff9b bl 8000eb8 <__NVIC_EnableIRQ>
  2227. }
  2228. 8000f82: bd08 pop {r3, pc}
  2229. 08000f84 <HAL_MPU_Disable>:
  2230. \details Ensures the apparent order of the explicit memory operations before
  2231. and after the instruction, without ensuring their completion.
  2232. */
  2233. __STATIC_FORCEINLINE void __DMB(void)
  2234. {
  2235. __ASM volatile ("dmb 0xF":::"memory");
  2236. 8000f84: f3bf 8f5f dmb sy
  2237. {
  2238. /* Make sure outstanding transfers are done */
  2239. __DMB();
  2240. /* Disable fault exceptions */
  2241. SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
  2242. 8000f88: 4b04 ldr r3, [pc, #16] @ (8000f9c <HAL_MPU_Disable+0x18>)
  2243. 8000f8a: 6a5a ldr r2, [r3, #36] @ 0x24
  2244. 8000f8c: f422 3280 bic.w r2, r2, #65536 @ 0x10000
  2245. 8000f90: 625a str r2, [r3, #36] @ 0x24
  2246. /* Disable the MPU and clear the control register*/
  2247. MPU->CTRL = 0;
  2248. 8000f92: 2200 movs r2, #0
  2249. 8000f94: f8c3 2094 str.w r2, [r3, #148] @ 0x94
  2250. }
  2251. 8000f98: 4770 bx lr
  2252. 8000f9a: bf00 nop
  2253. 8000f9c: e000ed00 .word 0xe000ed00
  2254. 08000fa0 <HAL_MPU_Enable>:
  2255. * @retval None
  2256. */
  2257. void HAL_MPU_Enable(uint32_t MPU_Control)
  2258. {
  2259. /* Enable the MPU */
  2260. MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk;
  2261. 8000fa0: f040 0001 orr.w r0, r0, #1
  2262. 8000fa4: 4b05 ldr r3, [pc, #20] @ (8000fbc <HAL_MPU_Enable+0x1c>)
  2263. 8000fa6: f8c3 0094 str.w r0, [r3, #148] @ 0x94
  2264. /* Enable fault exceptions */
  2265. SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
  2266. 8000faa: 6a5a ldr r2, [r3, #36] @ 0x24
  2267. 8000fac: f442 3280 orr.w r2, r2, #65536 @ 0x10000
  2268. 8000fb0: 625a str r2, [r3, #36] @ 0x24
  2269. __ASM volatile ("dsb 0xF":::"memory");
  2270. 8000fb2: f3bf 8f4f dsb sy
  2271. __ASM volatile ("isb 0xF":::"memory");
  2272. 8000fb6: f3bf 8f6f isb sy
  2273. /* Ensure MPU setting take effects */
  2274. __DSB();
  2275. __ISB();
  2276. }
  2277. 8000fba: 4770 bx lr
  2278. 8000fbc: e000ed00 .word 0xe000ed00
  2279. 08000fc0 <HAL_MPU_ConfigRegion>:
  2280. /* Check the parameters */
  2281. assert_param(IS_MPU_REGION_NUMBER(MPU_Init->Number));
  2282. assert_param(IS_MPU_REGION_ENABLE(MPU_Init->Enable));
  2283. /* Set the Region number */
  2284. MPU->RNR = MPU_Init->Number;
  2285. 8000fc0: 7842 ldrb r2, [r0, #1]
  2286. 8000fc2: 4b16 ldr r3, [pc, #88] @ (800101c <HAL_MPU_ConfigRegion+0x5c>)
  2287. 8000fc4: f8c3 2098 str.w r2, [r3, #152] @ 0x98
  2288. if ((MPU_Init->Enable) != 0UL)
  2289. 8000fc8: 7803 ldrb r3, [r0, #0]
  2290. 8000fca: b1fb cbz r3, 800100c <HAL_MPU_ConfigRegion+0x4c>
  2291. assert_param(IS_MPU_ACCESS_CACHEABLE(MPU_Init->IsCacheable));
  2292. assert_param(IS_MPU_ACCESS_BUFFERABLE(MPU_Init->IsBufferable));
  2293. assert_param(IS_MPU_SUB_REGION_DISABLE(MPU_Init->SubRegionDisable));
  2294. assert_param(IS_MPU_REGION_SIZE(MPU_Init->Size));
  2295. MPU->RBAR = MPU_Init->BaseAddress;
  2296. 8000fcc: 6843 ldr r3, [r0, #4]
  2297. 8000fce: 4a13 ldr r2, [pc, #76] @ (800101c <HAL_MPU_ConfigRegion+0x5c>)
  2298. 8000fd0: f8c2 309c str.w r3, [r2, #156] @ 0x9c
  2299. MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) |
  2300. 8000fd4: 7b01 ldrb r1, [r0, #12]
  2301. ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) |
  2302. 8000fd6: 7ac3 ldrb r3, [r0, #11]
  2303. 8000fd8: 061b lsls r3, r3, #24
  2304. MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) |
  2305. 8000fda: ea43 7301 orr.w r3, r3, r1, lsl #28
  2306. ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) |
  2307. 8000fde: 7a81 ldrb r1, [r0, #10]
  2308. ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) |
  2309. 8000fe0: ea43 43c1 orr.w r3, r3, r1, lsl #19
  2310. ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) |
  2311. 8000fe4: 7b41 ldrb r1, [r0, #13]
  2312. ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) |
  2313. 8000fe6: ea43 4381 orr.w r3, r3, r1, lsl #18
  2314. ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) |
  2315. 8000fea: 7b81 ldrb r1, [r0, #14]
  2316. ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) |
  2317. 8000fec: ea43 4341 orr.w r3, r3, r1, lsl #17
  2318. ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) |
  2319. 8000ff0: 7bc1 ldrb r1, [r0, #15]
  2320. ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) |
  2321. 8000ff2: ea43 4301 orr.w r3, r3, r1, lsl #16
  2322. ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) |
  2323. 8000ff6: 7a41 ldrb r1, [r0, #9]
  2324. ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) |
  2325. 8000ff8: ea43 2301 orr.w r3, r3, r1, lsl #8
  2326. ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) |
  2327. 8000ffc: 7a01 ldrb r1, [r0, #8]
  2328. ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) |
  2329. 8000ffe: ea43 0341 orr.w r3, r3, r1, lsl #1
  2330. ((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos);
  2331. 8001002: 7801 ldrb r1, [r0, #0]
  2332. ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) |
  2333. 8001004: 430b orrs r3, r1
  2334. MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) |
  2335. 8001006: f8c2 30a0 str.w r3, [r2, #160] @ 0xa0
  2336. 800100a: 4770 bx lr
  2337. }
  2338. else
  2339. {
  2340. MPU->RBAR = 0x00;
  2341. 800100c: 4b03 ldr r3, [pc, #12] @ (800101c <HAL_MPU_ConfigRegion+0x5c>)
  2342. 800100e: 2200 movs r2, #0
  2343. 8001010: f8c3 209c str.w r2, [r3, #156] @ 0x9c
  2344. MPU->RASR = 0x00;
  2345. 8001014: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0
  2346. }
  2347. }
  2348. 8001018: 4770 bx lr
  2349. 800101a: bf00 nop
  2350. 800101c: e000ed00 .word 0xe000ed00
  2351. 08001020 <HAL_GetCurrentCPUID>:
  2352. * @brief Returns the current CPU ID.
  2353. * @retval CPU identifier
  2354. */
  2355. uint32_t HAL_GetCurrentCPUID(void)
  2356. {
  2357. if (((SCB->CPUID & 0x000000F0U) >> 4 )== 0x7U)
  2358. 8001020: 4b04 ldr r3, [pc, #16] @ (8001034 <HAL_GetCurrentCPUID+0x14>)
  2359. 8001022: 681b ldr r3, [r3, #0]
  2360. 8001024: f3c3 1303 ubfx r3, r3, #4, #4
  2361. 8001028: 2b07 cmp r3, #7
  2362. 800102a: d001 beq.n 8001030 <HAL_GetCurrentCPUID+0x10>
  2363. {
  2364. return CM7_CPUID;
  2365. }
  2366. else
  2367. {
  2368. return CM4_CPUID;
  2369. 800102c: 2001 movs r0, #1
  2370. }
  2371. }
  2372. 800102e: 4770 bx lr
  2373. return CM7_CPUID;
  2374. 8001030: 2003 movs r0, #3
  2375. 8001032: 4770 bx lr
  2376. 8001034: e000ed00 .word 0xe000ed00
  2377. 08001038 <ETH_UpdateDescriptor>:
  2378. * @param heth: pointer to a ETH_HandleTypeDef structure that contains
  2379. * the configuration information for ETHERNET module
  2380. * @retval HAL status
  2381. */
  2382. static void ETH_UpdateDescriptor(ETH_HandleTypeDef *heth)
  2383. {
  2384. 8001038: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  2385. 800103c: b082 sub sp, #8
  2386. 800103e: 4607 mov r7, r0
  2387. uint32_t descidx;
  2388. uint32_t desccount;
  2389. ETH_DMADescTypeDef *dmarxdesc;
  2390. uint8_t *buff = NULL;
  2391. 8001040: 2300 movs r3, #0
  2392. 8001042: 9301 str r3, [sp, #4]
  2393. uint8_t allocStatus = 1U;
  2394. descidx = heth->RxDescList.RxBuildDescIdx;
  2395. 8001044: f8d0 8068 ldr.w r8, [r0, #104] @ 0x68
  2396. dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
  2397. 8001048: f108 0312 add.w r3, r8, #18
  2398. 800104c: f850 4023 ldr.w r4, [r0, r3, lsl #2]
  2399. desccount = heth->RxDescList.RxBuildDescCnt;
  2400. 8001050: 6ec5 ldr r5, [r0, #108] @ 0x6c
  2401. uint8_t allocStatus = 1U;
  2402. 8001052: 2601 movs r6, #1
  2403. while ((desccount > 0U) && (allocStatus != 0U))
  2404. 8001054: e013 b.n 800107e <ETH_UpdateDescriptor+0x46>
  2405. #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1)
  2406. /*Call registered Allocate callback*/
  2407. heth->rxAllocateCallback(&buff);
  2408. #else
  2409. /* Allocate callback */
  2410. HAL_ETH_RxAllocateCallback(&buff);
  2411. 8001056: a801 add r0, sp, #4
  2412. 8001058: f002 fce4 bl 8003a24 <HAL_ETH_RxAllocateCallback>
  2413. #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */
  2414. if (buff == NULL)
  2415. 800105c: 9b01 ldr r3, [sp, #4]
  2416. 800105e: b113 cbz r3, 8001066 <ETH_UpdateDescriptor+0x2e>
  2417. {
  2418. allocStatus = 0U;
  2419. }
  2420. else
  2421. {
  2422. WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff);
  2423. 8001060: 6123 str r3, [r4, #16]
  2424. WRITE_REG(dmarxdesc->DESC0, (uint32_t)buff);
  2425. 8001062: 6023 str r3, [r4, #0]
  2426. 8001064: e010 b.n 8001088 <ETH_UpdateDescriptor+0x50>
  2427. allocStatus = 0U;
  2428. 8001066: 2600 movs r6, #0
  2429. 8001068: e00e b.n 8001088 <ETH_UpdateDescriptor+0x50>
  2430. {
  2431. WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC);
  2432. }
  2433. else
  2434. {
  2435. WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V);
  2436. 800106a: f04f 4301 mov.w r3, #2164260864 @ 0x81000000
  2437. 800106e: 60e3 str r3, [r4, #12]
  2438. 8001070: e014 b.n 800109c <ETH_UpdateDescriptor+0x64>
  2439. }
  2440. /* Increment current rx descriptor index */
  2441. INCR_RX_DESC_INDEX(descidx, 1U);
  2442. /* Get current descriptor address */
  2443. dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
  2444. 8001072: f103 0212 add.w r2, r3, #18
  2445. 8001076: f857 4022 ldr.w r4, [r7, r2, lsl #2]
  2446. desccount--;
  2447. 800107a: 3d01 subs r5, #1
  2448. 800107c: 4698 mov r8, r3
  2449. while ((desccount > 0U) && (allocStatus != 0U))
  2450. 800107e: b1a5 cbz r5, 80010aa <ETH_UpdateDescriptor+0x72>
  2451. 8001080: b19e cbz r6, 80010aa <ETH_UpdateDescriptor+0x72>
  2452. if (READ_REG(dmarxdesc->BackupAddr0) == 0U)
  2453. 8001082: 6923 ldr r3, [r4, #16]
  2454. 8001084: 2b00 cmp r3, #0
  2455. 8001086: d0e6 beq.n 8001056 <ETH_UpdateDescriptor+0x1e>
  2456. if (allocStatus != 0U)
  2457. 8001088: 2e00 cmp r6, #0
  2458. 800108a: d0f8 beq.n 800107e <ETH_UpdateDescriptor+0x46>
  2459. __ASM volatile ("dmb 0xF":::"memory");
  2460. 800108c: f3bf 8f5f dmb sy
  2461. if (heth->RxDescList.ItMode != 0U)
  2462. 8001090: 6dbb ldr r3, [r7, #88] @ 0x58
  2463. 8001092: 2b00 cmp r3, #0
  2464. 8001094: d0e9 beq.n 800106a <ETH_UpdateDescriptor+0x32>
  2465. WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC);
  2466. 8001096: f04f 4341 mov.w r3, #3238002688 @ 0xc1000000
  2467. 800109a: 60e3 str r3, [r4, #12]
  2468. INCR_RX_DESC_INDEX(descidx, 1U);
  2469. 800109c: f108 0301 add.w r3, r8, #1
  2470. 80010a0: 2b03 cmp r3, #3
  2471. 80010a2: d9e6 bls.n 8001072 <ETH_UpdateDescriptor+0x3a>
  2472. 80010a4: f1a8 0303 sub.w r3, r8, #3
  2473. 80010a8: e7e3 b.n 8001072 <ETH_UpdateDescriptor+0x3a>
  2474. }
  2475. }
  2476. if (heth->RxDescList.RxBuildDescCnt != desccount)
  2477. 80010aa: 6efb ldr r3, [r7, #108] @ 0x6c
  2478. 80010ac: 42ab cmp r3, r5
  2479. 80010ae: d008 beq.n 80010c2 <ETH_UpdateDescriptor+0x8a>
  2480. {
  2481. /* Set the Tail pointer address */
  2482. WRITE_REG(heth->Instance->DMACRDTPR, 0);
  2483. 80010b0: 683b ldr r3, [r7, #0]
  2484. 80010b2: f503 5380 add.w r3, r3, #4096 @ 0x1000
  2485. 80010b6: 2200 movs r2, #0
  2486. 80010b8: f8c3 2128 str.w r2, [r3, #296] @ 0x128
  2487. heth->RxDescList.RxBuildDescIdx = descidx;
  2488. 80010bc: f8c7 8068 str.w r8, [r7, #104] @ 0x68
  2489. heth->RxDescList.RxBuildDescCnt = desccount;
  2490. 80010c0: 66fd str r5, [r7, #108] @ 0x6c
  2491. }
  2492. }
  2493. 80010c2: b002 add sp, #8
  2494. 80010c4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  2495. 080010c8 <ETH_SetMACConfig>:
  2496. * @{
  2497. */
  2498. static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf)
  2499. {
  2500. 80010c8: b430 push {r4, r5}
  2501. uint32_t macregval;
  2502. /*------------------------ MACCR Configuration --------------------*/
  2503. macregval = (macconf->InterPacketGapVal |
  2504. 80010ca: 688b ldr r3, [r1, #8]
  2505. macconf->SourceAddrControl |
  2506. 80010cc: 680a ldr r2, [r1, #0]
  2507. macregval = (macconf->InterPacketGapVal |
  2508. 80010ce: 4313 orrs r3, r2
  2509. ((uint32_t)macconf->ChecksumOffload << 27) |
  2510. 80010d0: 790a ldrb r2, [r1, #4]
  2511. macconf->SourceAddrControl |
  2512. 80010d2: ea43 63c2 orr.w r3, r3, r2, lsl #27
  2513. ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) |
  2514. 80010d6: 7b0a ldrb r2, [r1, #12]
  2515. ((uint32_t)macconf->ChecksumOffload << 27) |
  2516. 80010d8: ea43 53c2 orr.w r3, r3, r2, lsl #23
  2517. ((uint32_t)macconf->Support2KPacket << 22) |
  2518. 80010dc: 7b4a ldrb r2, [r1, #13]
  2519. ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) |
  2520. 80010de: ea43 5382 orr.w r3, r3, r2, lsl #22
  2521. ((uint32_t)macconf->CRCStripTypePacket << 21) |
  2522. 80010e2: 7b8a ldrb r2, [r1, #14]
  2523. ((uint32_t)macconf->Support2KPacket << 22) |
  2524. 80010e4: ea43 5342 orr.w r3, r3, r2, lsl #21
  2525. ((uint32_t)macconf->AutomaticPadCRCStrip << 20) |
  2526. 80010e8: 7bca ldrb r2, [r1, #15]
  2527. ((uint32_t)macconf->CRCStripTypePacket << 21) |
  2528. 80010ea: ea43 5302 orr.w r3, r3, r2, lsl #20
  2529. ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) |
  2530. 80010ee: 7c0a ldrb r2, [r1, #16]
  2531. 80010f0: 2a00 cmp r2, #0
  2532. 80010f2: f040 80b0 bne.w 8001256 <ETH_SetMACConfig+0x18e>
  2533. 80010f6: f44f 2200 mov.w r2, #524288 @ 0x80000
  2534. ((uint32_t)macconf->AutomaticPadCRCStrip << 20) |
  2535. 80010fa: 4313 orrs r3, r2
  2536. ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) |
  2537. 80010fc: 7c4a ldrb r2, [r1, #17]
  2538. 80010fe: 2a00 cmp r2, #0
  2539. 8001100: f040 80ab bne.w 800125a <ETH_SetMACConfig+0x192>
  2540. 8001104: f44f 3200 mov.w r2, #131072 @ 0x20000
  2541. ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) |
  2542. 8001108: 4313 orrs r3, r2
  2543. ((uint32_t)macconf->JumboPacket << 16) |
  2544. 800110a: 7c8a ldrb r2, [r1, #18]
  2545. ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) |
  2546. 800110c: ea43 4302 orr.w r3, r3, r2, lsl #16
  2547. macconf->Speed |
  2548. 8001110: 694a ldr r2, [r1, #20]
  2549. ((uint32_t)macconf->JumboPacket << 16) |
  2550. 8001112: 4313 orrs r3, r2
  2551. macconf->DuplexMode |
  2552. 8001114: 698a ldr r2, [r1, #24]
  2553. macconf->Speed |
  2554. 8001116: 4313 orrs r3, r2
  2555. ((uint32_t)macconf->LoopbackMode << 12) |
  2556. 8001118: 7f0a ldrb r2, [r1, #28]
  2557. macconf->DuplexMode |
  2558. 800111a: ea43 3302 orr.w r3, r3, r2, lsl #12
  2559. ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) |
  2560. 800111e: 7f4a ldrb r2, [r1, #29]
  2561. ((uint32_t)macconf->LoopbackMode << 12) |
  2562. 8001120: ea43 23c2 orr.w r3, r3, r2, lsl #11
  2563. ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) |
  2564. 8001124: 7f8a ldrb r2, [r1, #30]
  2565. 8001126: 2a00 cmp r2, #0
  2566. 8001128: f040 8099 bne.w 800125e <ETH_SetMACConfig+0x196>
  2567. 800112c: f44f 6280 mov.w r2, #1024 @ 0x400
  2568. ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) |
  2569. 8001130: 4313 orrs r3, r2
  2570. ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) |
  2571. 8001132: 7fca ldrb r2, [r1, #31]
  2572. ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) |
  2573. 8001134: ea43 2342 orr.w r3, r3, r2, lsl #9
  2574. ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) |
  2575. 8001138: f891 2020 ldrb.w r2, [r1, #32]
  2576. 800113c: 2a00 cmp r2, #0
  2577. 800113e: f040 8090 bne.w 8001262 <ETH_SetMACConfig+0x19a>
  2578. 8001142: f44f 7280 mov.w r2, #256 @ 0x100
  2579. ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) |
  2580. 8001146: 4313 orrs r3, r2
  2581. macconf->BackOffLimit |
  2582. 8001148: 6a4a ldr r2, [r1, #36] @ 0x24
  2583. ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) |
  2584. 800114a: 4313 orrs r3, r2
  2585. ((uint32_t)macconf->DeferralCheck << 4) |
  2586. 800114c: f891 2028 ldrb.w r2, [r1, #40] @ 0x28
  2587. macconf->BackOffLimit |
  2588. 8001150: ea43 1302 orr.w r3, r3, r2, lsl #4
  2589. macconf->PreambleLength);
  2590. 8001154: 6aca ldr r2, [r1, #44] @ 0x2c
  2591. macregval = (macconf->InterPacketGapVal |
  2592. 8001156: 4313 orrs r3, r2
  2593. /* Write to MACCR */
  2594. MODIFY_REG(heth->Instance->MACCR, ETH_MACCR_MASK, macregval);
  2595. 8001158: 6804 ldr r4, [r0, #0]
  2596. 800115a: 6822 ldr r2, [r4, #0]
  2597. 800115c: f022 427f bic.w r2, r2, #4278190080 @ 0xff000000
  2598. 8001160: f422 027b bic.w r2, r2, #16449536 @ 0xfb0000
  2599. 8001164: f422 42fe bic.w r2, r2, #32512 @ 0x7f00
  2600. 8001168: f022 027c bic.w r2, r2, #124 @ 0x7c
  2601. 800116c: 4313 orrs r3, r2
  2602. 800116e: 6023 str r3, [r4, #0]
  2603. /*------------------------ MACECR Configuration --------------------*/
  2604. macregval = ((macconf->ExtendedInterPacketGapVal << 25) |
  2605. 8001170: 6bca ldr r2, [r1, #60] @ 0x3c
  2606. ((uint32_t)macconf->ExtendedInterPacketGap << 24) |
  2607. 8001172: f891 3038 ldrb.w r3, [r1, #56] @ 0x38
  2608. 8001176: 061b lsls r3, r3, #24
  2609. macregval = ((macconf->ExtendedInterPacketGapVal << 25) |
  2610. 8001178: ea43 6342 orr.w r3, r3, r2, lsl #25
  2611. ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) |
  2612. 800117c: f891 2030 ldrb.w r2, [r1, #48] @ 0x30
  2613. ((uint32_t)macconf->ExtendedInterPacketGap << 24) |
  2614. 8001180: ea43 4382 orr.w r3, r3, r2, lsl #18
  2615. ((uint32_t)macconf->SlowProtocolDetect << 17) |
  2616. 8001184: f891 2031 ldrb.w r2, [r1, #49] @ 0x31
  2617. ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) |
  2618. 8001188: ea43 4342 orr.w r3, r3, r2, lsl #17
  2619. ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) |
  2620. 800118c: f891 2032 ldrb.w r2, [r1, #50] @ 0x32
  2621. 8001190: 2a00 cmp r2, #0
  2622. 8001192: d168 bne.n 8001266 <ETH_SetMACConfig+0x19e>
  2623. 8001194: f44f 3280 mov.w r2, #65536 @ 0x10000
  2624. ((uint32_t)macconf->SlowProtocolDetect << 17) |
  2625. 8001198: 4313 orrs r3, r2
  2626. macconf->GiantPacketSizeLimit);
  2627. 800119a: 6b4a ldr r2, [r1, #52] @ 0x34
  2628. macregval = ((macconf->ExtendedInterPacketGapVal << 25) |
  2629. 800119c: 4313 orrs r3, r2
  2630. /* Write to MACECR */
  2631. MODIFY_REG(heth->Instance->MACECR, ETH_MACECR_MASK, macregval);
  2632. 800119e: 6804 ldr r4, [r0, #0]
  2633. 80011a0: 6862 ldr r2, [r4, #4]
  2634. 80011a2: f022 527c bic.w r2, r2, #1056964608 @ 0x3f000000
  2635. 80011a6: f422 22ef bic.w r2, r2, #489472 @ 0x77800
  2636. 80011aa: f422 62ff bic.w r2, r2, #2040 @ 0x7f8
  2637. 80011ae: f022 0207 bic.w r2, r2, #7
  2638. 80011b2: 4313 orrs r3, r2
  2639. 80011b4: 6063 str r3, [r4, #4]
  2640. /*------------------------ MACWTR Configuration --------------------*/
  2641. macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) |
  2642. 80011b6: f891 2040 ldrb.w r2, [r1, #64] @ 0x40
  2643. macconf->WatchdogTimeout);
  2644. 80011ba: 6c4b ldr r3, [r1, #68] @ 0x44
  2645. macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) |
  2646. 80011bc: ea43 2202 orr.w r2, r3, r2, lsl #8
  2647. /* Write to MACWTR */
  2648. MODIFY_REG(heth->Instance->MACWTR, ETH_MACWTR_MASK, macregval);
  2649. 80011c0: 6804 ldr r4, [r0, #0]
  2650. 80011c2: 68e5 ldr r5, [r4, #12]
  2651. 80011c4: 4b2b ldr r3, [pc, #172] @ (8001274 <ETH_SetMACConfig+0x1ac>)
  2652. 80011c6: 402b ands r3, r5
  2653. 80011c8: 4313 orrs r3, r2
  2654. 80011ca: 60e3 str r3, [r4, #12]
  2655. /*------------------------ MACTFCR Configuration --------------------*/
  2656. macregval = (((uint32_t)macconf->TransmitFlowControl << 1) |
  2657. 80011cc: f891 2054 ldrb.w r2, [r1, #84] @ 0x54
  2658. macconf->PauseLowThreshold |
  2659. 80011d0: 6d0b ldr r3, [r1, #80] @ 0x50
  2660. macregval = (((uint32_t)macconf->TransmitFlowControl << 1) |
  2661. 80011d2: ea43 0342 orr.w r3, r3, r2, lsl #1
  2662. ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) |
  2663. 80011d6: f891 204c ldrb.w r2, [r1, #76] @ 0x4c
  2664. 80011da: 2a00 cmp r2, #0
  2665. 80011dc: d145 bne.n 800126a <ETH_SetMACConfig+0x1a2>
  2666. 80011de: 2280 movs r2, #128 @ 0x80
  2667. macconf->PauseLowThreshold |
  2668. 80011e0: 4313 orrs r3, r2
  2669. (macconf->PauseTime << 16));
  2670. 80011e2: 6c8a ldr r2, [r1, #72] @ 0x48
  2671. macregval = (((uint32_t)macconf->TransmitFlowControl << 1) |
  2672. 80011e4: ea43 4302 orr.w r3, r3, r2, lsl #16
  2673. /* Write to MACTFCR */
  2674. MODIFY_REG(heth->Instance->MACTFCR, ETH_MACTFCR_MASK, macregval);
  2675. 80011e8: 6804 ldr r4, [r0, #0]
  2676. 80011ea: 6f22 ldr r2, [r4, #112] @ 0x70
  2677. 80011ec: f022 02f2 bic.w r2, r2, #242 @ 0xf2
  2678. 80011f0: 0412 lsls r2, r2, #16
  2679. 80011f2: 0c12 lsrs r2, r2, #16
  2680. 80011f4: 4313 orrs r3, r2
  2681. 80011f6: 6723 str r3, [r4, #112] @ 0x70
  2682. /*------------------------ MACRFCR Configuration --------------------*/
  2683. macregval = ((uint32_t)macconf->ReceiveFlowControl |
  2684. 80011f8: f891 2056 ldrb.w r2, [r1, #86] @ 0x56
  2685. ((uint32_t)macconf->UnicastPausePacketDetect << 1));
  2686. 80011fc: f891 3055 ldrb.w r3, [r1, #85] @ 0x55
  2687. macregval = ((uint32_t)macconf->ReceiveFlowControl |
  2688. 8001200: ea42 0243 orr.w r2, r2, r3, lsl #1
  2689. /* Write to MACRFCR */
  2690. MODIFY_REG(heth->Instance->MACRFCR, ETH_MACRFCR_MASK, macregval);
  2691. 8001204: 6804 ldr r4, [r0, #0]
  2692. 8001206: f8d4 3090 ldr.w r3, [r4, #144] @ 0x90
  2693. 800120a: f023 0303 bic.w r3, r3, #3
  2694. 800120e: 4313 orrs r3, r2
  2695. 8001210: f8c4 3090 str.w r3, [r4, #144] @ 0x90
  2696. /*------------------------ MTLTQOMR Configuration --------------------*/
  2697. /* Write to MTLTQOMR */
  2698. MODIFY_REG(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_MASK, macconf->TransmitQueueMode);
  2699. 8001214: 6802 ldr r2, [r0, #0]
  2700. 8001216: f8d2 3d00 ldr.w r3, [r2, #3328] @ 0xd00
  2701. 800121a: f023 0372 bic.w r3, r3, #114 @ 0x72
  2702. 800121e: 6d8c ldr r4, [r1, #88] @ 0x58
  2703. 8001220: 4323 orrs r3, r4
  2704. 8001222: f8c2 3d00 str.w r3, [r2, #3328] @ 0xd00
  2705. /*------------------------ MTLRQOMR Configuration --------------------*/
  2706. macregval = (macconf->ReceiveQueueMode |
  2707. 8001226: 6dcb ldr r3, [r1, #92] @ 0x5c
  2708. ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) |
  2709. 8001228: f891 2060 ldrb.w r2, [r1, #96] @ 0x60
  2710. 800122c: b9fa cbnz r2, 800126e <ETH_SetMACConfig+0x1a6>
  2711. 800122e: 2240 movs r2, #64 @ 0x40
  2712. macregval = (macconf->ReceiveQueueMode |
  2713. 8001230: 4313 orrs r3, r2
  2714. ((uint32_t)macconf->ForwardRxErrorPacket << 4) |
  2715. 8001232: f891 2061 ldrb.w r2, [r1, #97] @ 0x61
  2716. ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) |
  2717. 8001236: ea43 1302 orr.w r3, r3, r2, lsl #4
  2718. ((uint32_t)macconf->ForwardRxUndersizedGoodPacket << 3));
  2719. 800123a: f891 2062 ldrb.w r2, [r1, #98] @ 0x62
  2720. macregval = (macconf->ReceiveQueueMode |
  2721. 800123e: ea43 03c2 orr.w r3, r3, r2, lsl #3
  2722. /* Write to MTLRQOMR */
  2723. MODIFY_REG(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_MASK, macregval);
  2724. 8001242: 6801 ldr r1, [r0, #0]
  2725. 8001244: f8d1 2d30 ldr.w r2, [r1, #3376] @ 0xd30
  2726. 8001248: f022 027b bic.w r2, r2, #123 @ 0x7b
  2727. 800124c: 4313 orrs r3, r2
  2728. 800124e: f8c1 3d30 str.w r3, [r1, #3376] @ 0xd30
  2729. }
  2730. 8001252: bc30 pop {r4, r5}
  2731. 8001254: 4770 bx lr
  2732. ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) |
  2733. 8001256: 2200 movs r2, #0
  2734. 8001258: e74f b.n 80010fa <ETH_SetMACConfig+0x32>
  2735. ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) |
  2736. 800125a: 2200 movs r2, #0
  2737. 800125c: e754 b.n 8001108 <ETH_SetMACConfig+0x40>
  2738. ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) |
  2739. 800125e: 2200 movs r2, #0
  2740. 8001260: e766 b.n 8001130 <ETH_SetMACConfig+0x68>
  2741. ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) |
  2742. 8001262: 2200 movs r2, #0
  2743. 8001264: e76f b.n 8001146 <ETH_SetMACConfig+0x7e>
  2744. ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) |
  2745. 8001266: 2200 movs r2, #0
  2746. 8001268: e796 b.n 8001198 <ETH_SetMACConfig+0xd0>
  2747. ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) |
  2748. 800126a: 2200 movs r2, #0
  2749. 800126c: e7b8 b.n 80011e0 <ETH_SetMACConfig+0x118>
  2750. ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) |
  2751. 800126e: 2200 movs r2, #0
  2752. 8001270: e7de b.n 8001230 <ETH_SetMACConfig+0x168>
  2753. 8001272: bf00 nop
  2754. 8001274: fffffef0 .word 0xfffffef0
  2755. 08001278 <ETH_SetDMAConfig>:
  2756. static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf)
  2757. {
  2758. 8001278: b410 push {r4}
  2759. uint32_t dmaregval;
  2760. /*------------------------ DMAMR Configuration --------------------*/
  2761. MODIFY_REG(heth->Instance->DMAMR, ETH_DMAMR_MASK, dmaconf->DMAArbitration);
  2762. 800127a: 6802 ldr r2, [r0, #0]
  2763. 800127c: f502 5280 add.w r2, r2, #4096 @ 0x1000
  2764. 8001280: 6814 ldr r4, [r2, #0]
  2765. 8001282: 4b23 ldr r3, [pc, #140] @ (8001310 <ETH_SetDMAConfig+0x98>)
  2766. 8001284: 4023 ands r3, r4
  2767. 8001286: 680c ldr r4, [r1, #0]
  2768. 8001288: 4323 orrs r3, r4
  2769. 800128a: 6013 str r3, [r2, #0]
  2770. /*------------------------ DMASBMR Configuration --------------------*/
  2771. dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) |
  2772. 800128c: 790a ldrb r2, [r1, #4]
  2773. dmaconf->BurstMode |
  2774. 800128e: 688b ldr r3, [r1, #8]
  2775. dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) |
  2776. 8001290: ea43 3302 orr.w r3, r3, r2, lsl #12
  2777. ((uint32_t)dmaconf->RebuildINCRxBurst << 15));
  2778. 8001294: 7b0a ldrb r2, [r1, #12]
  2779. dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) |
  2780. 8001296: ea43 32c2 orr.w r2, r3, r2, lsl #15
  2781. MODIFY_REG(heth->Instance->DMASBMR, ETH_DMASBMR_MASK, dmaregval);
  2782. 800129a: 6803 ldr r3, [r0, #0]
  2783. 800129c: f503 5c80 add.w ip, r3, #4096 @ 0x1000
  2784. 80012a0: f8dc 4004 ldr.w r4, [ip, #4]
  2785. 80012a4: 4b1b ldr r3, [pc, #108] @ (8001314 <ETH_SetDMAConfig+0x9c>)
  2786. 80012a6: 4023 ands r3, r4
  2787. 80012a8: 4313 orrs r3, r2
  2788. 80012aa: f8cc 3004 str.w r3, [ip, #4]
  2789. /*------------------------ DMACCR Configuration --------------------*/
  2790. dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) |
  2791. 80012ae: 7b4a ldrb r2, [r1, #13]
  2792. dmaconf->MaximumSegmentSize);
  2793. 80012b0: 6a0b ldr r3, [r1, #32]
  2794. dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) |
  2795. 80012b2: ea43 4c02 orr.w ip, r3, r2, lsl #16
  2796. MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_MASK, dmaregval);
  2797. 80012b6: 6802 ldr r2, [r0, #0]
  2798. 80012b8: f502 5280 add.w r2, r2, #4096 @ 0x1000
  2799. 80012bc: f8d2 4100 ldr.w r4, [r2, #256] @ 0x100
  2800. 80012c0: 4b15 ldr r3, [pc, #84] @ (8001318 <ETH_SetDMAConfig+0xa0>)
  2801. 80012c2: 4023 ands r3, r4
  2802. 80012c4: ea43 030c orr.w r3, r3, ip
  2803. 80012c8: f8c2 3100 str.w r3, [r2, #256] @ 0x100
  2804. /*------------------------ DMACTCR Configuration --------------------*/
  2805. dmaregval = (dmaconf->TxDMABurstLength |
  2806. 80012cc: 690b ldr r3, [r1, #16]
  2807. ((uint32_t)dmaconf->SecondPacketOperate << 4) |
  2808. 80012ce: 7d0a ldrb r2, [r1, #20]
  2809. dmaregval = (dmaconf->TxDMABurstLength |
  2810. 80012d0: ea43 1302 orr.w r3, r3, r2, lsl #4
  2811. ((uint32_t)dmaconf->TCPSegmentation << 12));
  2812. 80012d4: 7f4a ldrb r2, [r1, #29]
  2813. dmaregval = (dmaconf->TxDMABurstLength |
  2814. 80012d6: ea43 3202 orr.w r2, r3, r2, lsl #12
  2815. MODIFY_REG(heth->Instance->DMACTCR, ETH_DMACTCR_MASK, dmaregval);
  2816. 80012da: 6803 ldr r3, [r0, #0]
  2817. 80012dc: f503 5c80 add.w ip, r3, #4096 @ 0x1000
  2818. 80012e0: f8dc 4104 ldr.w r4, [ip, #260] @ 0x104
  2819. 80012e4: 4b0d ldr r3, [pc, #52] @ (800131c <ETH_SetDMAConfig+0xa4>)
  2820. 80012e6: 4023 ands r3, r4
  2821. 80012e8: 4313 orrs r3, r2
  2822. 80012ea: f8cc 3104 str.w r3, [ip, #260] @ 0x104
  2823. /*------------------------ DMACRCR Configuration --------------------*/
  2824. dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) |
  2825. 80012ee: 7f0b ldrb r3, [r1, #28]
  2826. dmaconf->RxDMABurstLength);
  2827. 80012f0: 6989 ldr r1, [r1, #24]
  2828. dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) |
  2829. 80012f2: ea41 71c3 orr.w r1, r1, r3, lsl #31
  2830. /* Write to DMACRCR */
  2831. MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_MASK, dmaregval);
  2832. 80012f6: 6802 ldr r2, [r0, #0]
  2833. 80012f8: f502 5280 add.w r2, r2, #4096 @ 0x1000
  2834. 80012fc: f8d2 0108 ldr.w r0, [r2, #264] @ 0x108
  2835. 8001300: 4b07 ldr r3, [pc, #28] @ (8001320 <ETH_SetDMAConfig+0xa8>)
  2836. 8001302: 4003 ands r3, r0
  2837. 8001304: 430b orrs r3, r1
  2838. 8001306: f8c2 3108 str.w r3, [r2, #264] @ 0x108
  2839. }
  2840. 800130a: f85d 4b04 ldr.w r4, [sp], #4
  2841. 800130e: 4770 bx lr
  2842. 8001310: ffff87fd .word 0xffff87fd
  2843. 8001314: ffff2ffe .word 0xffff2ffe
  2844. 8001318: fffec000 .word 0xfffec000
  2845. 800131c: ffc0efef .word 0xffc0efef
  2846. 8001320: 7fc0ffff .word 0x7fc0ffff
  2847. 08001324 <ETH_MACDMAConfig>:
  2848. * @param heth: pointer to a ETH_HandleTypeDef structure that contains
  2849. * the configuration information for ETHERNET module
  2850. * @retval HAL status
  2851. */
  2852. static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth)
  2853. {
  2854. 8001324: b570 push {r4, r5, r6, lr}
  2855. 8001326: b0a2 sub sp, #136 @ 0x88
  2856. 8001328: 4606 mov r6, r0
  2857. ETH_MACConfigTypeDef macDefaultConf;
  2858. ETH_DMAConfigTypeDef dmaDefaultConf;
  2859. /*--------------- ETHERNET MAC registers default Configuration --------------*/
  2860. macDefaultConf.AutomaticPadCRCStrip = ENABLE;
  2861. 800132a: 2501 movs r5, #1
  2862. 800132c: f88d 5033 strb.w r5, [sp, #51] @ 0x33
  2863. macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10;
  2864. 8001330: 2400 movs r4, #0
  2865. 8001332: 9412 str r4, [sp, #72] @ 0x48
  2866. macDefaultConf.CarrierSenseBeforeTransmit = DISABLE;
  2867. 8001334: f88d 4041 strb.w r4, [sp, #65] @ 0x41
  2868. macDefaultConf.CarrierSenseDuringTransmit = DISABLE;
  2869. 8001338: f88d 4043 strb.w r4, [sp, #67] @ 0x43
  2870. macDefaultConf.ChecksumOffload = ENABLE;
  2871. 800133c: f88d 5028 strb.w r5, [sp, #40] @ 0x28
  2872. macDefaultConf.CRCCheckingRxPackets = ENABLE;
  2873. 8001340: f88d 5056 strb.w r5, [sp, #86] @ 0x56
  2874. macDefaultConf.CRCStripTypePacket = ENABLE;
  2875. 8001344: f88d 5032 strb.w r5, [sp, #50] @ 0x32
  2876. macDefaultConf.DeferralCheck = DISABLE;
  2877. 8001348: f88d 404c strb.w r4, [sp, #76] @ 0x4c
  2878. macDefaultConf.DropTCPIPChecksumErrorPacket = ENABLE;
  2879. 800134c: f88d 5084 strb.w r5, [sp, #132] @ 0x84
  2880. macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE;
  2881. 8001350: f44f 5300 mov.w r3, #8192 @ 0x2000
  2882. 8001354: 930f str r3, [sp, #60] @ 0x3c
  2883. macDefaultConf.ExtendedInterPacketGap = DISABLE;
  2884. 8001356: f88d 405c strb.w r4, [sp, #92] @ 0x5c
  2885. macDefaultConf.ExtendedInterPacketGapVal = 0x0;
  2886. 800135a: 9418 str r4, [sp, #96] @ 0x60
  2887. macDefaultConf.ForwardRxErrorPacket = DISABLE;
  2888. 800135c: f88d 4085 strb.w r4, [sp, #133] @ 0x85
  2889. macDefaultConf.ForwardRxUndersizedGoodPacket = DISABLE;
  2890. 8001360: f88d 4086 strb.w r4, [sp, #134] @ 0x86
  2891. macDefaultConf.GiantPacketSizeLimit = 0x618;
  2892. 8001364: f44f 63c3 mov.w r3, #1560 @ 0x618
  2893. 8001368: 9316 str r3, [sp, #88] @ 0x58
  2894. macDefaultConf.GiantPacketSizeLimitControl = DISABLE;
  2895. 800136a: f88d 4030 strb.w r4, [sp, #48] @ 0x30
  2896. macDefaultConf.InterPacketGapVal = ETH_INTERPACKETGAP_96BIT;
  2897. 800136e: 940b str r4, [sp, #44] @ 0x2c
  2898. macDefaultConf.Jabber = ENABLE;
  2899. 8001370: f88d 5035 strb.w r5, [sp, #53] @ 0x35
  2900. macDefaultConf.JumboPacket = DISABLE;
  2901. 8001374: f88d 4036 strb.w r4, [sp, #54] @ 0x36
  2902. macDefaultConf.LoopbackMode = DISABLE;
  2903. 8001378: f88d 4040 strb.w r4, [sp, #64] @ 0x40
  2904. macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS_4;
  2905. 800137c: 941d str r4, [sp, #116] @ 0x74
  2906. macDefaultConf.PauseTime = 0x0;
  2907. 800137e: 941b str r4, [sp, #108] @ 0x6c
  2908. macDefaultConf.PreambleLength = ETH_PREAMBLELENGTH_7;
  2909. 8001380: 9414 str r4, [sp, #80] @ 0x50
  2910. macDefaultConf.ProgrammableWatchdog = DISABLE;
  2911. 8001382: f88d 4064 strb.w r4, [sp, #100] @ 0x64
  2912. macDefaultConf.ReceiveFlowControl = DISABLE;
  2913. 8001386: f88d 407a strb.w r4, [sp, #122] @ 0x7a
  2914. macDefaultConf.ReceiveOwn = ENABLE;
  2915. 800138a: f88d 5042 strb.w r5, [sp, #66] @ 0x42
  2916. macDefaultConf.ReceiveQueueMode = ETH_RECEIVESTOREFORWARD;
  2917. 800138e: 2320 movs r3, #32
  2918. 8001390: 9320 str r3, [sp, #128] @ 0x80
  2919. macDefaultConf.RetryTransmission = ENABLE;
  2920. 8001392: f88d 5044 strb.w r5, [sp, #68] @ 0x44
  2921. macDefaultConf.SlowProtocolDetect = DISABLE;
  2922. 8001396: f88d 4055 strb.w r4, [sp, #85] @ 0x55
  2923. macDefaultConf.SourceAddrControl = ETH_SOURCEADDRESS_REPLACE_ADDR0;
  2924. 800139a: f04f 5340 mov.w r3, #805306368 @ 0x30000000
  2925. 800139e: 9309 str r3, [sp, #36] @ 0x24
  2926. macDefaultConf.Speed = ETH_SPEED_100M;
  2927. 80013a0: f44f 4380 mov.w r3, #16384 @ 0x4000
  2928. 80013a4: 930e str r3, [sp, #56] @ 0x38
  2929. macDefaultConf.Support2KPacket = DISABLE;
  2930. 80013a6: f88d 4031 strb.w r4, [sp, #49] @ 0x31
  2931. macDefaultConf.TransmitQueueMode = ETH_TRANSMITSTOREFORWARD;
  2932. 80013aa: 2302 movs r3, #2
  2933. 80013ac: 931f str r3, [sp, #124] @ 0x7c
  2934. macDefaultConf.TransmitFlowControl = DISABLE;
  2935. 80013ae: f88d 4078 strb.w r4, [sp, #120] @ 0x78
  2936. macDefaultConf.UnicastPausePacketDetect = DISABLE;
  2937. 80013b2: f88d 4079 strb.w r4, [sp, #121] @ 0x79
  2938. macDefaultConf.UnicastSlowProtocolPacketDetect = DISABLE;
  2939. 80013b6: f88d 4054 strb.w r4, [sp, #84] @ 0x54
  2940. macDefaultConf.Watchdog = ENABLE;
  2941. 80013ba: f88d 5034 strb.w r5, [sp, #52] @ 0x34
  2942. macDefaultConf.WatchdogTimeout = ETH_MACWTR_WTO_2KB;
  2943. 80013be: 941a str r4, [sp, #104] @ 0x68
  2944. macDefaultConf.ZeroQuantaPause = ENABLE;
  2945. 80013c0: f88d 5070 strb.w r5, [sp, #112] @ 0x70
  2946. /* MAC default configuration */
  2947. ETH_SetMACConfig(heth, &macDefaultConf);
  2948. 80013c4: a909 add r1, sp, #36 @ 0x24
  2949. 80013c6: f7ff fe7f bl 80010c8 <ETH_SetMACConfig>
  2950. /*--------------- ETHERNET DMA registers default Configuration --------------*/
  2951. dmaDefaultConf.AddressAlignedBeats = ENABLE;
  2952. 80013ca: f88d 5004 strb.w r5, [sp, #4]
  2953. dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED;
  2954. 80013ce: 9502 str r5, [sp, #8]
  2955. dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_RX1_TX1;
  2956. 80013d0: 9400 str r4, [sp, #0]
  2957. dmaDefaultConf.FlushRxPacket = DISABLE;
  2958. 80013d2: f88d 401c strb.w r4, [sp, #28]
  2959. dmaDefaultConf.PBLx8Mode = DISABLE;
  2960. 80013d6: f88d 400d strb.w r4, [sp, #13]
  2961. dmaDefaultConf.RebuildINCRxBurst = DISABLE;
  2962. 80013da: f88d 400c strb.w r4, [sp, #12]
  2963. dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT;
  2964. 80013de: f44f 1300 mov.w r3, #2097152 @ 0x200000
  2965. 80013e2: 9306 str r3, [sp, #24]
  2966. dmaDefaultConf.SecondPacketOperate = DISABLE;
  2967. 80013e4: f88d 4014 strb.w r4, [sp, #20]
  2968. dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT;
  2969. 80013e8: 9304 str r3, [sp, #16]
  2970. dmaDefaultConf.TCPSegmentation = DISABLE;
  2971. 80013ea: f88d 401d strb.w r4, [sp, #29]
  2972. dmaDefaultConf.MaximumSegmentSize = ETH_SEGMENT_SIZE_DEFAULT;
  2973. 80013ee: f44f 7306 mov.w r3, #536 @ 0x218
  2974. 80013f2: 9308 str r3, [sp, #32]
  2975. /* DMA default configuration */
  2976. ETH_SetDMAConfig(heth, &dmaDefaultConf);
  2977. 80013f4: 4669 mov r1, sp
  2978. 80013f6: 4630 mov r0, r6
  2979. 80013f8: f7ff ff3e bl 8001278 <ETH_SetDMAConfig>
  2980. }
  2981. 80013fc: b022 add sp, #136 @ 0x88
  2982. 80013fe: bd70 pop {r4, r5, r6, pc}
  2983. 08001400 <ETH_DMATxDescListInit>:
  2984. * @param heth: pointer to a ETH_HandleTypeDef structure that contains
  2985. * the configuration information for ETHERNET module
  2986. * @retval None
  2987. */
  2988. static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth)
  2989. {
  2990. 8001400: b410 push {r4}
  2991. ETH_DMADescTypeDef *dmatxdesc;
  2992. uint32_t i;
  2993. /* Fill each DMATxDesc descriptor with the right values */
  2994. for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++)
  2995. 8001402: 2200 movs r2, #0
  2996. 8001404: e010 b.n 8001428 <ETH_DMATxDescListInit+0x28>
  2997. {
  2998. dmatxdesc = heth->Init.TxDesc + i;
  2999. 8001406: 68c4 ldr r4, [r0, #12]
  3000. 8001408: eb02 0342 add.w r3, r2, r2, lsl #1
  3001. 800140c: ea4f 0cc3 mov.w ip, r3, lsl #3
  3002. 8001410: eb04 03c3 add.w r3, r4, r3, lsl #3
  3003. WRITE_REG(dmatxdesc->DESC0, 0x0);
  3004. 8001414: 2100 movs r1, #0
  3005. 8001416: f844 100c str.w r1, [r4, ip]
  3006. WRITE_REG(dmatxdesc->DESC1, 0x0);
  3007. 800141a: 6059 str r1, [r3, #4]
  3008. WRITE_REG(dmatxdesc->DESC2, 0x0);
  3009. 800141c: 6099 str r1, [r3, #8]
  3010. WRITE_REG(dmatxdesc->DESC3, 0x0);
  3011. 800141e: 60d9 str r1, [r3, #12]
  3012. WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc);
  3013. 8001420: 1d91 adds r1, r2, #6
  3014. 8001422: f840 3021 str.w r3, [r0, r1, lsl #2]
  3015. for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++)
  3016. 8001426: 3201 adds r2, #1
  3017. 8001428: 2a03 cmp r2, #3
  3018. 800142a: d9ec bls.n 8001406 <ETH_DMATxDescListInit+0x6>
  3019. }
  3020. heth->TxDescList.CurTxDesc = 0;
  3021. 800142c: 2300 movs r3, #0
  3022. 800142e: 6283 str r3, [r0, #40] @ 0x28
  3023. /* Set Transmit Descriptor Ring Length */
  3024. WRITE_REG(heth->Instance->DMACTDRLR, (ETH_TX_DESC_CNT - 1U));
  3025. 8001430: 6803 ldr r3, [r0, #0]
  3026. 8001432: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3027. 8001436: 2203 movs r2, #3
  3028. 8001438: f8c3 212c str.w r2, [r3, #300] @ 0x12c
  3029. /* Set Transmit Descriptor List Address */
  3030. WRITE_REG(heth->Instance->DMACTDLAR, (uint32_t) heth->Init.TxDesc);
  3031. 800143c: 68c2 ldr r2, [r0, #12]
  3032. 800143e: 6803 ldr r3, [r0, #0]
  3033. 8001440: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3034. 8001444: f8c3 2114 str.w r2, [r3, #276] @ 0x114
  3035. /* Set Transmit Descriptor Tail pointer */
  3036. WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc);
  3037. 8001448: 68c2 ldr r2, [r0, #12]
  3038. 800144a: 6803 ldr r3, [r0, #0]
  3039. 800144c: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3040. 8001450: f8c3 2120 str.w r2, [r3, #288] @ 0x120
  3041. }
  3042. 8001454: f85d 4b04 ldr.w r4, [sp], #4
  3043. 8001458: 4770 bx lr
  3044. 0800145a <ETH_DMARxDescListInit>:
  3045. * @param heth: pointer to a ETH_HandleTypeDef structure that contains
  3046. * the configuration information for ETHERNET module
  3047. * @retval None
  3048. */
  3049. static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth)
  3050. {
  3051. 800145a: b410 push {r4}
  3052. ETH_DMADescTypeDef *dmarxdesc;
  3053. uint32_t i;
  3054. for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
  3055. 800145c: 2100 movs r1, #0
  3056. 800145e: e013 b.n 8001488 <ETH_DMARxDescListInit+0x2e>
  3057. {
  3058. dmarxdesc = heth->Init.RxDesc + i;
  3059. 8001460: 6904 ldr r4, [r0, #16]
  3060. 8001462: eb01 0341 add.w r3, r1, r1, lsl #1
  3061. 8001466: ea4f 0cc3 mov.w ip, r3, lsl #3
  3062. 800146a: eb04 03c3 add.w r3, r4, r3, lsl #3
  3063. WRITE_REG(dmarxdesc->DESC0, 0x0);
  3064. 800146e: 2200 movs r2, #0
  3065. 8001470: f844 200c str.w r2, [r4, ip]
  3066. WRITE_REG(dmarxdesc->DESC1, 0x0);
  3067. 8001474: 605a str r2, [r3, #4]
  3068. WRITE_REG(dmarxdesc->DESC2, 0x0);
  3069. 8001476: 609a str r2, [r3, #8]
  3070. WRITE_REG(dmarxdesc->DESC3, 0x0);
  3071. 8001478: 60da str r2, [r3, #12]
  3072. WRITE_REG(dmarxdesc->BackupAddr0, 0x0);
  3073. 800147a: 611a str r2, [r3, #16]
  3074. WRITE_REG(dmarxdesc->BackupAddr1, 0x0);
  3075. 800147c: 615a str r2, [r3, #20]
  3076. /* Set Rx descritors addresses */
  3077. WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc);
  3078. 800147e: f101 0212 add.w r2, r1, #18
  3079. 8001482: f840 3022 str.w r3, [r0, r2, lsl #2]
  3080. for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++)
  3081. 8001486: 3101 adds r1, #1
  3082. 8001488: 2903 cmp r1, #3
  3083. 800148a: d9e9 bls.n 8001460 <ETH_DMARxDescListInit+0x6>
  3084. }
  3085. WRITE_REG(heth->RxDescList.RxDescIdx, 0);
  3086. 800148c: 2300 movs r3, #0
  3087. 800148e: 65c3 str r3, [r0, #92] @ 0x5c
  3088. WRITE_REG(heth->RxDescList.RxDescCnt, 0);
  3089. 8001490: 6603 str r3, [r0, #96] @ 0x60
  3090. WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0);
  3091. 8001492: 6683 str r3, [r0, #104] @ 0x68
  3092. WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0);
  3093. 8001494: 66c3 str r3, [r0, #108] @ 0x6c
  3094. WRITE_REG(heth->RxDescList.ItMode, 0);
  3095. 8001496: 6583 str r3, [r0, #88] @ 0x58
  3096. /* Set Receive Descriptor Ring Length */
  3097. WRITE_REG(heth->Instance->DMACRDRLR, ((uint32_t)(ETH_RX_DESC_CNT - 1U)));
  3098. 8001498: 6803 ldr r3, [r0, #0]
  3099. 800149a: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3100. 800149e: 2203 movs r2, #3
  3101. 80014a0: f8c3 2130 str.w r2, [r3, #304] @ 0x130
  3102. /* Set Receive Descriptor List Address */
  3103. WRITE_REG(heth->Instance->DMACRDLAR, (uint32_t) heth->Init.RxDesc);
  3104. 80014a4: 6902 ldr r2, [r0, #16]
  3105. 80014a6: 6803 ldr r3, [r0, #0]
  3106. 80014a8: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3107. 80014ac: f8c3 211c str.w r2, [r3, #284] @ 0x11c
  3108. /* Set Receive Descriptor Tail pointer Address */
  3109. WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (uint32_t)(ETH_RX_DESC_CNT - 1U))));
  3110. 80014b0: 6903 ldr r3, [r0, #16]
  3111. 80014b2: f103 0248 add.w r2, r3, #72 @ 0x48
  3112. 80014b6: 6803 ldr r3, [r0, #0]
  3113. 80014b8: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3114. 80014bc: f8c3 2128 str.w r2, [r3, #296] @ 0x128
  3115. }
  3116. 80014c0: f85d 4b04 ldr.w r4, [sp], #4
  3117. 80014c4: 4770 bx lr
  3118. ...
  3119. 080014c8 <ETH_Prepare_Tx_Descriptors>:
  3120. * @param pTxConfig: Tx packet configuration
  3121. * @param ItMode: Enable or disable Tx EOT interrept
  3122. * @retval Status
  3123. */
  3124. static uint32_t ETH_Prepare_Tx_Descriptors(ETH_HandleTypeDef *heth, ETH_TxPacketConfig *pTxConfig, uint32_t ItMode)
  3125. {
  3126. 80014c8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  3127. 80014cc: 4690 mov r8, r2
  3128. ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList;
  3129. uint32_t descidx = dmatxdesclist->CurTxDesc;
  3130. 80014ce: 6a84 ldr r4, [r0, #40] @ 0x28
  3131. uint32_t firstdescidx = dmatxdesclist->CurTxDesc;
  3132. uint32_t idx;
  3133. uint32_t descnbr = 0;
  3134. ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
  3135. 80014d0: eb00 0384 add.w r3, r0, r4, lsl #2
  3136. 80014d4: 699b ldr r3, [r3, #24]
  3137. ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer;
  3138. 80014d6: f8d1 c008 ldr.w ip, [r1, #8]
  3139. uint32_t bd_count = 0;
  3140. /* Current Tx Descriptor Owned by DMA: cannot be used by the application */
  3141. if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN)
  3142. 80014da: 68da ldr r2, [r3, #12]
  3143. 80014dc: 2a00 cmp r2, #0
  3144. 80014de: f2c0 8198 blt.w 8001812 <ETH_Prepare_Tx_Descriptors+0x34a>
  3145. || (dmatxdesclist->PacketAddress[descidx] != NULL))
  3146. 80014e2: 1d22 adds r2, r4, #4
  3147. 80014e4: eb00 0282 add.w r2, r0, r2, lsl #2
  3148. 80014e8: 69d2 ldr r2, [r2, #28]
  3149. 80014ea: 2a00 cmp r2, #0
  3150. 80014ec: f040 8193 bne.w 8001816 <ETH_Prepare_Tx_Descriptors+0x34e>
  3151. /***************************************************************************/
  3152. /***************** Context descriptor configuration (Optional) **********/
  3153. /***************************************************************************/
  3154. /* If VLAN tag is enabled for this packet */
  3155. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET)
  3156. 80014f0: 680a ldr r2, [r1, #0]
  3157. 80014f2: f012 0f04 tst.w r2, #4
  3158. 80014f6: d02c beq.n 8001552 <ETH_Prepare_Tx_Descriptors+0x8a>
  3159. {
  3160. /* Set vlan tag value */
  3161. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_VT, pTxConfig->VlanTag);
  3162. 80014f8: 68dd ldr r5, [r3, #12]
  3163. 80014fa: 4a81 ldr r2, [pc, #516] @ (8001700 <ETH_Prepare_Tx_Descriptors+0x238>)
  3164. 80014fc: 402a ands r2, r5
  3165. 80014fe: 6a4d ldr r5, [r1, #36] @ 0x24
  3166. 8001500: 432a orrs r2, r5
  3167. 8001502: 60da str r2, [r3, #12]
  3168. /* Set vlan tag valid bit */
  3169. SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_VLTV);
  3170. 8001504: 68da ldr r2, [r3, #12]
  3171. 8001506: f442 3280 orr.w r2, r2, #65536 @ 0x10000
  3172. 800150a: 60da str r2, [r3, #12]
  3173. /* Set the descriptor as the vlan input source */
  3174. SET_BIT(heth->Instance->MACVIR, ETH_MACVIR_VLTI);
  3175. 800150c: 6805 ldr r5, [r0, #0]
  3176. 800150e: 6e2a ldr r2, [r5, #96] @ 0x60
  3177. 8001510: f442 1280 orr.w r2, r2, #1048576 @ 0x100000
  3178. 8001514: 662a str r2, [r5, #96] @ 0x60
  3179. /* if inner VLAN is enabled */
  3180. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_INNERVLANTAG) != (uint32_t)RESET)
  3181. 8001516: 680a ldr r2, [r1, #0]
  3182. 8001518: f012 0f08 tst.w r2, #8
  3183. 800151c: d019 beq.n 8001552 <ETH_Prepare_Tx_Descriptors+0x8a>
  3184. {
  3185. /* Set inner vlan tag value */
  3186. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_IVT, (pTxConfig->InnerVlanTag << 16));
  3187. 800151e: 689a ldr r2, [r3, #8]
  3188. 8001520: b292 uxth r2, r2
  3189. 8001522: 6acd ldr r5, [r1, #44] @ 0x2c
  3190. 8001524: ea42 4205 orr.w r2, r2, r5, lsl #16
  3191. 8001528: 609a str r2, [r3, #8]
  3192. /* Set inner vlan tag valid bit */
  3193. SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_IVLTV);
  3194. 800152a: 68da ldr r2, [r3, #12]
  3195. 800152c: f442 3200 orr.w r2, r2, #131072 @ 0x20000
  3196. 8001530: 60da str r2, [r3, #12]
  3197. /* Set Vlan Tag control */
  3198. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_IVTIR, pTxConfig->InnerVlanCtrl);
  3199. 8001532: 68da ldr r2, [r3, #12]
  3200. 8001534: f422 2240 bic.w r2, r2, #786432 @ 0xc0000
  3201. 8001538: 6b0d ldr r5, [r1, #48] @ 0x30
  3202. 800153a: 432a orrs r2, r5
  3203. 800153c: 60da str r2, [r3, #12]
  3204. /* Set the descriptor as the inner vlan input source */
  3205. SET_BIT(heth->Instance->MACIVIR, ETH_MACIVIR_VLTI);
  3206. 800153e: 6805 ldr r5, [r0, #0]
  3207. 8001540: 6e6a ldr r2, [r5, #100] @ 0x64
  3208. 8001542: f442 1280 orr.w r2, r2, #1048576 @ 0x100000
  3209. 8001546: 666a str r2, [r5, #100] @ 0x64
  3210. /* Enable double VLAN processing */
  3211. SET_BIT(heth->Instance->MACVTR, ETH_MACVTR_EDVLP);
  3212. 8001548: 6805 ldr r5, [r0, #0]
  3213. 800154a: 6d2a ldr r2, [r5, #80] @ 0x50
  3214. 800154c: f042 6280 orr.w r2, r2, #67108864 @ 0x4000000
  3215. 8001550: 652a str r2, [r5, #80] @ 0x50
  3216. }
  3217. }
  3218. /* if tcp segmentation is enabled for this packet */
  3219. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)
  3220. 8001552: 680a ldr r2, [r1, #0]
  3221. 8001554: f012 0f10 tst.w r2, #16
  3222. 8001558: d009 beq.n 800156e <ETH_Prepare_Tx_Descriptors+0xa6>
  3223. {
  3224. /* Set MSS value */
  3225. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_MSS, pTxConfig->MaxSegmentSize);
  3226. 800155a: 689d ldr r5, [r3, #8]
  3227. 800155c: 4a69 ldr r2, [pc, #420] @ (8001704 <ETH_Prepare_Tx_Descriptors+0x23c>)
  3228. 800155e: 402a ands r2, r5
  3229. 8001560: 698d ldr r5, [r1, #24]
  3230. 8001562: 432a orrs r2, r5
  3231. 8001564: 609a str r2, [r3, #8]
  3232. /* Set MSS valid bit */
  3233. SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_TCMSSV);
  3234. 8001566: 68da ldr r2, [r3, #12]
  3235. 8001568: f042 6280 orr.w r2, r2, #67108864 @ 0x4000000
  3236. 800156c: 60da str r2, [r3, #12]
  3237. }
  3238. if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET)
  3239. || (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET))
  3240. 800156e: 680a ldr r2, [r1, #0]
  3241. if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET)
  3242. 8001570: f012 0214 ands.w r2, r2, #20
  3243. 8001574: d020 beq.n 80015b8 <ETH_Prepare_Tx_Descriptors+0xf0>
  3244. {
  3245. /* Set as context descriptor */
  3246. SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_CTXT);
  3247. 8001576: 68da ldr r2, [r3, #12]
  3248. 8001578: f042 4280 orr.w r2, r2, #1073741824 @ 0x40000000
  3249. 800157c: 60da str r2, [r3, #12]
  3250. 800157e: f3bf 8f5f dmb sy
  3251. /* Ensure rest of descriptor is written to RAM before the OWN bit */
  3252. __DMB();
  3253. /* Set own bit */
  3254. SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN);
  3255. 8001582: 68da ldr r2, [r3, #12]
  3256. 8001584: f042 4200 orr.w r2, r2, #2147483648 @ 0x80000000
  3257. 8001588: 60da str r2, [r3, #12]
  3258. /* Increment current tx descriptor index */
  3259. INCR_TX_DESC_INDEX(descidx, 1U);
  3260. 800158a: 1c66 adds r6, r4, #1
  3261. 800158c: 2e03 cmp r6, #3
  3262. 800158e: d900 bls.n 8001592 <ETH_Prepare_Tx_Descriptors+0xca>
  3263. 8001590: 1ee6 subs r6, r4, #3
  3264. /* Get current descriptor address */
  3265. dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
  3266. 8001592: eb00 0386 add.w r3, r0, r6, lsl #2
  3267. 8001596: 699b ldr r3, [r3, #24]
  3268. descnbr += 1U;
  3269. /* Current Tx Descriptor Owned by DMA: cannot be used by the application */
  3270. if (READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN)
  3271. 8001598: 68da ldr r2, [r3, #12]
  3272. 800159a: 2a00 cmp r2, #0
  3273. 800159c: db01 blt.n 80015a2 <ETH_Prepare_Tx_Descriptors+0xda>
  3274. descnbr += 1U;
  3275. 800159e: 2201 movs r2, #1
  3276. 80015a0: e00b b.n 80015ba <ETH_Prepare_Tx_Descriptors+0xf2>
  3277. {
  3278. dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[firstdescidx];
  3279. 80015a2: eb00 0484 add.w r4, r0, r4, lsl #2
  3280. 80015a6: 69a2 ldr r2, [r4, #24]
  3281. 80015a8: f3bf 8f5f dmb sy
  3282. /* Ensure rest of descriptor is written to RAM before the OWN bit */
  3283. __DMB();
  3284. /* Clear own bit */
  3285. CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN);
  3286. 80015ac: 68d3 ldr r3, [r2, #12]
  3287. 80015ae: f023 4300 bic.w r3, r3, #2147483648 @ 0x80000000
  3288. 80015b2: 60d3 str r3, [r2, #12]
  3289. return HAL_ETH_ERROR_BUSY;
  3290. 80015b4: 2002 movs r0, #2
  3291. 80015b6: e12f b.n 8001818 <ETH_Prepare_Tx_Descriptors+0x350>
  3292. uint32_t descidx = dmatxdesclist->CurTxDesc;
  3293. 80015b8: 4626 mov r6, r4
  3294. /***************************************************************************/
  3295. /***************** Normal descriptors configuration *****************/
  3296. /***************************************************************************/
  3297. descnbr += 1U;
  3298. 80015ba: f102 0e01 add.w lr, r2, #1
  3299. /* Set header or buffer 1 address */
  3300. WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer);
  3301. 80015be: f8dc 2000 ldr.w r2, [ip]
  3302. 80015c2: 601a str r2, [r3, #0]
  3303. /* Set header or buffer 1 Length */
  3304. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len);
  3305. 80015c4: 689a ldr r2, [r3, #8]
  3306. 80015c6: 4d4f ldr r5, [pc, #316] @ (8001704 <ETH_Prepare_Tx_Descriptors+0x23c>)
  3307. 80015c8: 4015 ands r5, r2
  3308. 80015ca: f8dc 2004 ldr.w r2, [ip, #4]
  3309. 80015ce: 4315 orrs r5, r2
  3310. 80015d0: 609d str r5, [r3, #8]
  3311. if (txbuffer->next != NULL)
  3312. 80015d2: f8dc 2008 ldr.w r2, [ip, #8]
  3313. 80015d6: 2a00 cmp r2, #0
  3314. 80015d8: d048 beq.n 800166c <ETH_Prepare_Tx_Descriptors+0x1a4>
  3315. {
  3316. txbuffer = txbuffer->next;
  3317. /* Set buffer 2 address */
  3318. WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer);
  3319. 80015da: 6815 ldr r5, [r2, #0]
  3320. 80015dc: 605d str r5, [r3, #4]
  3321. /* Set buffer 2 Length */
  3322. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16));
  3323. 80015de: 689d ldr r5, [r3, #8]
  3324. 80015e0: f8df c124 ldr.w ip, [pc, #292] @ 8001708 <ETH_Prepare_Tx_Descriptors+0x240>
  3325. 80015e4: ea05 0c0c and.w ip, r5, ip
  3326. 80015e8: 6855 ldr r5, [r2, #4]
  3327. 80015ea: ea4c 4505 orr.w r5, ip, r5, lsl #16
  3328. 80015ee: 609d str r5, [r3, #8]
  3329. WRITE_REG(dmatxdesc->DESC1, 0x0);
  3330. /* Set buffer 2 Length */
  3331. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U);
  3332. }
  3333. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)
  3334. 80015f0: 680d ldr r5, [r1, #0]
  3335. 80015f2: f015 0f10 tst.w r5, #16
  3336. 80015f6: d041 beq.n 800167c <ETH_Prepare_Tx_Descriptors+0x1b4>
  3337. {
  3338. /* Set TCP Header length */
  3339. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_THL, (pTxConfig->TCPHeaderLen << 19));
  3340. 80015f8: 68dd ldr r5, [r3, #12]
  3341. 80015fa: f425 0cf0 bic.w ip, r5, #7864320 @ 0x780000
  3342. 80015fe: 6a0d ldr r5, [r1, #32]
  3343. 8001600: ea4c 45c5 orr.w r5, ip, r5, lsl #19
  3344. 8001604: 60dd str r5, [r3, #12]
  3345. /* Set TCP payload length */
  3346. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen);
  3347. 8001606: 68dd ldr r5, [r3, #12]
  3348. 8001608: f8df c104 ldr.w ip, [pc, #260] @ 8001710 <ETH_Prepare_Tx_Descriptors+0x248>
  3349. 800160c: ea05 0c0c and.w ip, r5, ip
  3350. 8001610: 69cd ldr r5, [r1, #28]
  3351. 8001612: ea4c 0505 orr.w r5, ip, r5
  3352. 8001616: 60dd str r5, [r3, #12]
  3353. /* Set TCP Segmentation Enabled bit */
  3354. SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE);
  3355. 8001618: 68dd ldr r5, [r3, #12]
  3356. 800161a: f445 2580 orr.w r5, r5, #262144 @ 0x40000
  3357. 800161e: 60dd str r5, [r3, #12]
  3358. {
  3359. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl);
  3360. }
  3361. }
  3362. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET)
  3363. 8001620: 680d ldr r5, [r1, #0]
  3364. 8001622: f015 0f04 tst.w r5, #4
  3365. 8001626: d006 beq.n 8001636 <ETH_Prepare_Tx_Descriptors+0x16e>
  3366. {
  3367. /* Set Vlan Tag control */
  3368. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_VTIR, pTxConfig->VlanCtrl);
  3369. 8001628: 689d ldr r5, [r3, #8]
  3370. 800162a: f425 4c40 bic.w ip, r5, #49152 @ 0xc000
  3371. 800162e: 6a8d ldr r5, [r1, #40] @ 0x28
  3372. 8001630: ea4c 0505 orr.w r5, ip, r5
  3373. 8001634: 609d str r5, [r3, #8]
  3374. }
  3375. /* Mark it as First Descriptor */
  3376. SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD);
  3377. 8001636: 68dd ldr r5, [r3, #12]
  3378. 8001638: f045 5500 orr.w r5, r5, #536870912 @ 0x20000000
  3379. 800163c: 60dd str r5, [r3, #12]
  3380. /* Mark it as NORMAL descriptor */
  3381. CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT);
  3382. 800163e: 68dd ldr r5, [r3, #12]
  3383. 8001640: f025 4580 bic.w r5, r5, #1073741824 @ 0x40000000
  3384. 8001644: 60dd str r5, [r3, #12]
  3385. 8001646: f3bf 8f5f dmb sy
  3386. /* Ensure rest of descriptor is written to RAM before the OWN bit */
  3387. __DMB();
  3388. /* set OWN bit of FIRST descriptor */
  3389. SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN);
  3390. 800164a: 68dd ldr r5, [r3, #12]
  3391. 800164c: f045 4500 orr.w r5, r5, #2147483648 @ 0x80000000
  3392. 8001650: 60dd str r5, [r3, #12]
  3393. /* If source address insertion/replacement is enabled for this packet */
  3394. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_SAIC) != (uint32_t)RESET)
  3395. 8001652: 680d ldr r5, [r1, #0]
  3396. 8001654: f015 0f02 tst.w r5, #2
  3397. 8001658: d006 beq.n 8001668 <ETH_Prepare_Tx_Descriptors+0x1a0>
  3398. {
  3399. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_SAIC, pTxConfig->SrcAddrCtrl);
  3400. 800165a: 68dd ldr r5, [r3, #12]
  3401. 800165c: f025 7c60 bic.w ip, r5, #58720256 @ 0x3800000
  3402. 8001660: 68cd ldr r5, [r1, #12]
  3403. 8001662: ea4c 0505 orr.w r5, ip, r5
  3404. 8001666: 60dd str r5, [r3, #12]
  3405. }
  3406. descnbr += 1U;
  3407. /* Get the next Tx buffer in the list */
  3408. txbuffer = txbuffer->next;
  3409. 8001668: 2500 movs r5, #0
  3410. 800166a: e06f b.n 800174c <ETH_Prepare_Tx_Descriptors+0x284>
  3411. WRITE_REG(dmatxdesc->DESC1, 0x0);
  3412. 800166c: 2200 movs r2, #0
  3413. 800166e: 605a str r2, [r3, #4]
  3414. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U);
  3415. 8001670: 689d ldr r5, [r3, #8]
  3416. 8001672: 4a25 ldr r2, [pc, #148] @ (8001708 <ETH_Prepare_Tx_Descriptors+0x240>)
  3417. 8001674: 402a ands r2, r5
  3418. 8001676: 609a str r2, [r3, #8]
  3419. ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer;
  3420. 8001678: 4662 mov r2, ip
  3421. 800167a: e7b9 b.n 80015f0 <ETH_Prepare_Tx_Descriptors+0x128>
  3422. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length);
  3423. 800167c: 68dd ldr r5, [r3, #12]
  3424. 800167e: f8df c08c ldr.w ip, [pc, #140] @ 800170c <ETH_Prepare_Tx_Descriptors+0x244>
  3425. 8001682: ea05 0c0c and.w ip, r5, ip
  3426. 8001686: 684d ldr r5, [r1, #4]
  3427. 8001688: ea4c 0505 orr.w r5, ip, r5
  3428. 800168c: 60dd str r5, [r3, #12]
  3429. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET)
  3430. 800168e: 680d ldr r5, [r1, #0]
  3431. 8001690: f015 0f01 tst.w r5, #1
  3432. 8001694: d006 beq.n 80016a4 <ETH_Prepare_Tx_Descriptors+0x1dc>
  3433. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl);
  3434. 8001696: 68dd ldr r5, [r3, #12]
  3435. 8001698: f425 3c40 bic.w ip, r5, #196608 @ 0x30000
  3436. 800169c: 694d ldr r5, [r1, #20]
  3437. 800169e: ea4c 0505 orr.w r5, ip, r5
  3438. 80016a2: 60dd str r5, [r3, #12]
  3439. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != (uint32_t)RESET)
  3440. 80016a4: 680d ldr r5, [r1, #0]
  3441. 80016a6: f015 0f20 tst.w r5, #32
  3442. 80016aa: d0b9 beq.n 8001620 <ETH_Prepare_Tx_Descriptors+0x158>
  3443. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl);
  3444. 80016ac: 68dd ldr r5, [r3, #12]
  3445. 80016ae: f025 6c40 bic.w ip, r5, #201326592 @ 0xc000000
  3446. 80016b2: 690d ldr r5, [r1, #16]
  3447. 80016b4: ea4c 0505 orr.w r5, ip, r5
  3448. 80016b8: 60dd str r5, [r3, #12]
  3449. 80016ba: e7b1 b.n 8001620 <ETH_Prepare_Tx_Descriptors+0x158>
  3450. dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
  3451. 80016bc: eb00 0384 add.w r3, r0, r4, lsl #2
  3452. 80016c0: 6999 ldr r1, [r3, #24]
  3453. for (idx = 0; idx < descnbr; idx ++)
  3454. 80016c2: 2200 movs r2, #0
  3455. 80016c4: e004 b.n 80016d0 <ETH_Prepare_Tx_Descriptors+0x208>
  3456. dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
  3457. 80016c6: eb00 0183 add.w r1, r0, r3, lsl #2
  3458. 80016ca: 6989 ldr r1, [r1, #24]
  3459. for (idx = 0; idx < descnbr; idx ++)
  3460. 80016cc: 3201 adds r2, #1
  3461. 80016ce: 461c mov r4, r3
  3462. 80016d0: 4572 cmp r2, lr
  3463. 80016d2: d20a bcs.n 80016ea <ETH_Prepare_Tx_Descriptors+0x222>
  3464. 80016d4: f3bf 8f5f dmb sy
  3465. CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN);
  3466. 80016d8: 68cb ldr r3, [r1, #12]
  3467. 80016da: f023 4300 bic.w r3, r3, #2147483648 @ 0x80000000
  3468. 80016de: 60cb str r3, [r1, #12]
  3469. INCR_TX_DESC_INDEX(descidx, 1U);
  3470. 80016e0: 1c63 adds r3, r4, #1
  3471. 80016e2: 2b03 cmp r3, #3
  3472. 80016e4: d9ef bls.n 80016c6 <ETH_Prepare_Tx_Descriptors+0x1fe>
  3473. 80016e6: 1ee3 subs r3, r4, #3
  3474. 80016e8: e7ed b.n 80016c6 <ETH_Prepare_Tx_Descriptors+0x1fe>
  3475. return HAL_ETH_ERROR_BUSY;
  3476. 80016ea: 2002 movs r0, #2
  3477. 80016ec: e094 b.n 8001818 <ETH_Prepare_Tx_Descriptors+0x350>
  3478. /* Set buffer 2 Length */
  3479. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16));
  3480. }
  3481. else
  3482. {
  3483. WRITE_REG(dmatxdesc->DESC1, 0x0);
  3484. 80016ee: 2200 movs r2, #0
  3485. 80016f0: 605a str r2, [r3, #4]
  3486. /* Set buffer 2 Length */
  3487. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U);
  3488. 80016f2: 689e ldr r6, [r3, #8]
  3489. 80016f4: 4a04 ldr r2, [pc, #16] @ (8001708 <ETH_Prepare_Tx_Descriptors+0x240>)
  3490. 80016f6: 4032 ands r2, r6
  3491. 80016f8: 609a str r2, [r3, #8]
  3492. txbuffer = txbuffer->next;
  3493. 80016fa: 463a mov r2, r7
  3494. 80016fc: e05c b.n 80017b8 <ETH_Prepare_Tx_Descriptors+0x2f0>
  3495. 80016fe: bf00 nop
  3496. 8001700: ffff0000 .word 0xffff0000
  3497. 8001704: ffffc000 .word 0xffffc000
  3498. 8001708: c000ffff .word 0xc000ffff
  3499. 800170c: ffff8000 .word 0xffff8000
  3500. 8001710: fffc0000 .word 0xfffc0000
  3501. SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE);
  3502. }
  3503. else
  3504. {
  3505. /* Set the packet length */
  3506. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length);
  3507. 8001714: 68df ldr r7, [r3, #12]
  3508. 8001716: 4e41 ldr r6, [pc, #260] @ (800181c <ETH_Prepare_Tx_Descriptors+0x354>)
  3509. 8001718: 403e ands r6, r7
  3510. 800171a: 684f ldr r7, [r1, #4]
  3511. 800171c: 433e orrs r6, r7
  3512. 800171e: 60de str r6, [r3, #12]
  3513. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET)
  3514. 8001720: 680e ldr r6, [r1, #0]
  3515. 8001722: f016 0f01 tst.w r6, #1
  3516. 8001726: d005 beq.n 8001734 <ETH_Prepare_Tx_Descriptors+0x26c>
  3517. {
  3518. /* Checksum Insertion Control */
  3519. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl);
  3520. 8001728: 68de ldr r6, [r3, #12]
  3521. 800172a: f426 3640 bic.w r6, r6, #196608 @ 0x30000
  3522. 800172e: 694f ldr r7, [r1, #20]
  3523. 8001730: 433e orrs r6, r7
  3524. 8001732: 60de str r6, [r3, #12]
  3525. }
  3526. }
  3527. bd_count += 1U;
  3528. 8001734: 3501 adds r5, #1
  3529. 8001736: f3bf 8f5f dmb sy
  3530. /* Ensure rest of descriptor is written to RAM before the OWN bit */
  3531. __DMB();
  3532. /* Set Own bit */
  3533. SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN);
  3534. 800173a: 68de ldr r6, [r3, #12]
  3535. 800173c: f046 4600 orr.w r6, r6, #2147483648 @ 0x80000000
  3536. 8001740: 60de str r6, [r3, #12]
  3537. /* Mark it as NORMAL descriptor */
  3538. CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT);
  3539. 8001742: 68de ldr r6, [r3, #12]
  3540. 8001744: f026 4680 bic.w r6, r6, #1073741824 @ 0x40000000
  3541. 8001748: 60de str r6, [r3, #12]
  3542. 800174a: 4666 mov r6, ip
  3543. while (txbuffer->next != NULL)
  3544. 800174c: 6897 ldr r7, [r2, #8]
  3545. 800174e: 2f00 cmp r7, #0
  3546. 8001750: d041 beq.n 80017d6 <ETH_Prepare_Tx_Descriptors+0x30e>
  3547. CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD);
  3548. 8001752: 68df ldr r7, [r3, #12]
  3549. 8001754: f027 5780 bic.w r7, r7, #268435456 @ 0x10000000
  3550. 8001758: 60df str r7, [r3, #12]
  3551. INCR_TX_DESC_INDEX(descidx, 1U);
  3552. 800175a: f106 0c01 add.w ip, r6, #1
  3553. 800175e: f1bc 0f03 cmp.w ip, #3
  3554. 8001762: d901 bls.n 8001768 <ETH_Prepare_Tx_Descriptors+0x2a0>
  3555. 8001764: f1a6 0c03 sub.w ip, r6, #3
  3556. dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx];
  3557. 8001768: eb00 038c add.w r3, r0, ip, lsl #2
  3558. 800176c: 699b ldr r3, [r3, #24]
  3559. CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD);
  3560. 800176e: 68de ldr r6, [r3, #12]
  3561. 8001770: f026 5600 bic.w r6, r6, #536870912 @ 0x20000000
  3562. 8001774: 60de str r6, [r3, #12]
  3563. if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN) == ETH_DMATXNDESCRF_OWN)
  3564. 8001776: 68de ldr r6, [r3, #12]
  3565. 8001778: 2e00 cmp r6, #0
  3566. 800177a: db9f blt.n 80016bc <ETH_Prepare_Tx_Descriptors+0x1f4>
  3567. || (dmatxdesclist->PacketAddress[descidx] != NULL))
  3568. 800177c: f10c 0604 add.w r6, ip, #4
  3569. 8001780: eb00 0686 add.w r6, r0, r6, lsl #2
  3570. 8001784: 69f6 ldr r6, [r6, #28]
  3571. 8001786: 2e00 cmp r6, #0
  3572. 8001788: d198 bne.n 80016bc <ETH_Prepare_Tx_Descriptors+0x1f4>
  3573. descnbr += 1U;
  3574. 800178a: f10e 0e01 add.w lr, lr, #1
  3575. txbuffer = txbuffer->next;
  3576. 800178e: 6897 ldr r7, [r2, #8]
  3577. WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer);
  3578. 8001790: 683a ldr r2, [r7, #0]
  3579. 8001792: 601a str r2, [r3, #0]
  3580. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len);
  3581. 8001794: 689a ldr r2, [r3, #8]
  3582. 8001796: 4e22 ldr r6, [pc, #136] @ (8001820 <ETH_Prepare_Tx_Descriptors+0x358>)
  3583. 8001798: 4016 ands r6, r2
  3584. 800179a: 687a ldr r2, [r7, #4]
  3585. 800179c: 4316 orrs r6, r2
  3586. 800179e: 609e str r6, [r3, #8]
  3587. if (txbuffer->next != NULL)
  3588. 80017a0: 68ba ldr r2, [r7, #8]
  3589. 80017a2: 2a00 cmp r2, #0
  3590. 80017a4: d0a3 beq.n 80016ee <ETH_Prepare_Tx_Descriptors+0x226>
  3591. WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer);
  3592. 80017a6: 6816 ldr r6, [r2, #0]
  3593. 80017a8: 605e str r6, [r3, #4]
  3594. MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16));
  3595. 80017aa: 689f ldr r7, [r3, #8]
  3596. 80017ac: 4e1d ldr r6, [pc, #116] @ (8001824 <ETH_Prepare_Tx_Descriptors+0x35c>)
  3597. 80017ae: 403e ands r6, r7
  3598. 80017b0: 6857 ldr r7, [r2, #4]
  3599. 80017b2: ea46 4607 orr.w r6, r6, r7, lsl #16
  3600. 80017b6: 609e str r6, [r3, #8]
  3601. if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)
  3602. 80017b8: 680e ldr r6, [r1, #0]
  3603. 80017ba: f016 0f10 tst.w r6, #16
  3604. 80017be: d0a9 beq.n 8001714 <ETH_Prepare_Tx_Descriptors+0x24c>
  3605. MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen);
  3606. 80017c0: 68df ldr r7, [r3, #12]
  3607. 80017c2: 4e19 ldr r6, [pc, #100] @ (8001828 <ETH_Prepare_Tx_Descriptors+0x360>)
  3608. 80017c4: 403e ands r6, r7
  3609. 80017c6: 69cf ldr r7, [r1, #28]
  3610. 80017c8: 433e orrs r6, r7
  3611. 80017ca: 60de str r6, [r3, #12]
  3612. SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE);
  3613. 80017cc: 68de ldr r6, [r3, #12]
  3614. 80017ce: f446 2680 orr.w r6, r6, #262144 @ 0x40000
  3615. 80017d2: 60de str r6, [r3, #12]
  3616. 80017d4: e7ae b.n 8001734 <ETH_Prepare_Tx_Descriptors+0x26c>
  3617. }
  3618. if (ItMode != ((uint32_t)RESET))
  3619. 80017d6: f1b8 0f00 cmp.w r8, #0
  3620. 80017da: d015 beq.n 8001808 <ETH_Prepare_Tx_Descriptors+0x340>
  3621. {
  3622. /* Set Interrupt on completion bit */
  3623. SET_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC);
  3624. 80017dc: 689a ldr r2, [r3, #8]
  3625. 80017de: f042 4200 orr.w r2, r2, #2147483648 @ 0x80000000
  3626. 80017e2: 609a str r2, [r3, #8]
  3627. /* Clear Interrupt on completion bit */
  3628. CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC);
  3629. }
  3630. /* Mark it as LAST descriptor */
  3631. SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD);
  3632. 80017e4: 68da ldr r2, [r3, #12]
  3633. 80017e6: f042 5280 orr.w r2, r2, #268435456 @ 0x10000000
  3634. 80017ea: 60da str r2, [r3, #12]
  3635. /* Save the current packet address to expose it to the application */
  3636. dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress;
  3637. 80017ec: 6bc2 ldr r2, [r0, #60] @ 0x3c
  3638. 80017ee: 1d33 adds r3, r6, #4
  3639. 80017f0: eb00 0383 add.w r3, r0, r3, lsl #2
  3640. 80017f4: 61da str r2, [r3, #28]
  3641. dmatxdesclist->CurTxDesc = descidx;
  3642. 80017f6: 6286 str r6, [r0, #40] @ 0x28
  3643. __ASM volatile ("cpsid i" : : : "memory");
  3644. 80017f8: b672 cpsid i
  3645. /* disable the interrupt */
  3646. __disable_irq();
  3647. dmatxdesclist->BuffersInUse += bd_count + 1U;
  3648. 80017fa: 6c03 ldr r3, [r0, #64] @ 0x40
  3649. 80017fc: 442b add r3, r5
  3650. 80017fe: 3301 adds r3, #1
  3651. 8001800: 6403 str r3, [r0, #64] @ 0x40
  3652. __ASM volatile ("cpsie i" : : : "memory");
  3653. 8001802: b662 cpsie i
  3654. /* Enable interrupts back */
  3655. __enable_irq();
  3656. /* Return function status */
  3657. return HAL_ETH_ERROR_NONE;
  3658. 8001804: 2000 movs r0, #0
  3659. 8001806: e007 b.n 8001818 <ETH_Prepare_Tx_Descriptors+0x350>
  3660. CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC);
  3661. 8001808: 689a ldr r2, [r3, #8]
  3662. 800180a: f022 4200 bic.w r2, r2, #2147483648 @ 0x80000000
  3663. 800180e: 609a str r2, [r3, #8]
  3664. 8001810: e7e8 b.n 80017e4 <ETH_Prepare_Tx_Descriptors+0x31c>
  3665. return HAL_ETH_ERROR_BUSY;
  3666. 8001812: 2002 movs r0, #2
  3667. 8001814: e000 b.n 8001818 <ETH_Prepare_Tx_Descriptors+0x350>
  3668. 8001816: 2002 movs r0, #2
  3669. }
  3670. 8001818: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  3671. 800181c: ffff8000 .word 0xffff8000
  3672. 8001820: ffffc000 .word 0xffffc000
  3673. 8001824: c000ffff .word 0xc000ffff
  3674. 8001828: fffc0000 .word 0xfffc0000
  3675. 0800182c <HAL_ETH_Start_IT>:
  3676. {
  3677. 800182c: b538 push {r3, r4, r5, lr}
  3678. if (heth->gState == HAL_ETH_STATE_READY)
  3679. 800182e: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
  3680. 8001832: 2b10 cmp r3, #16
  3681. 8001834: d001 beq.n 800183a <HAL_ETH_Start_IT+0xe>
  3682. return HAL_ERROR;
  3683. 8001836: 2001 movs r0, #1
  3684. }
  3685. 8001838: bd38 pop {r3, r4, r5, pc}
  3686. 800183a: 4604 mov r4, r0
  3687. heth->gState = HAL_ETH_STATE_BUSY;
  3688. 800183c: 2523 movs r5, #35 @ 0x23
  3689. 800183e: f8c0 5084 str.w r5, [r0, #132] @ 0x84
  3690. heth->RxDescList.ItMode = 1U;
  3691. 8001842: 2301 movs r3, #1
  3692. 8001844: 6583 str r3, [r0, #88] @ 0x58
  3693. SET_BIT(heth->Instance->MMCRIMR, ETH_MMCRIMR_RXLPITRCIM | ETH_MMCRIMR_RXLPIUSCIM | \
  3694. 8001846: 6802 ldr r2, [r0, #0]
  3695. 8001848: f8d2 170c ldr.w r1, [r2, #1804] @ 0x70c
  3696. 800184c: 4b24 ldr r3, [pc, #144] @ (80018e0 <HAL_ETH_Start_IT+0xb4>)
  3697. 800184e: 430b orrs r3, r1
  3698. 8001850: f8c2 370c str.w r3, [r2, #1804] @ 0x70c
  3699. SET_BIT(heth->Instance->MMCTIMR, ETH_MMCTIMR_TXLPITRCIM | ETH_MMCTIMR_TXLPIUSCIM | \
  3700. 8001854: 6802 ldr r2, [r0, #0]
  3701. 8001856: f8d2 1710 ldr.w r1, [r2, #1808] @ 0x710
  3702. 800185a: 4b22 ldr r3, [pc, #136] @ (80018e4 <HAL_ETH_Start_IT+0xb8>)
  3703. 800185c: 430b orrs r3, r1
  3704. 800185e: f8c2 3710 str.w r3, [r2, #1808] @ 0x710
  3705. heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT;
  3706. 8001862: 2304 movs r3, #4
  3707. 8001864: 66c3 str r3, [r0, #108] @ 0x6c
  3708. ETH_UpdateDescriptor(heth);
  3709. 8001866: f7ff fbe7 bl 8001038 <ETH_UpdateDescriptor>
  3710. SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
  3711. 800186a: 6822 ldr r2, [r4, #0]
  3712. 800186c: 6813 ldr r3, [r2, #0]
  3713. 800186e: f043 0302 orr.w r3, r3, #2
  3714. 8001872: 6013 str r3, [r2, #0]
  3715. SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
  3716. 8001874: 6822 ldr r2, [r4, #0]
  3717. 8001876: 6813 ldr r3, [r2, #0]
  3718. 8001878: f043 0301 orr.w r3, r3, #1
  3719. 800187c: 6013 str r3, [r2, #0]
  3720. SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ);
  3721. 800187e: 6822 ldr r2, [r4, #0]
  3722. 8001880: f8d2 3d00 ldr.w r3, [r2, #3328] @ 0xd00
  3723. 8001884: f043 0301 orr.w r3, r3, #1
  3724. 8001888: f8c2 3d00 str.w r3, [r2, #3328] @ 0xd00
  3725. SET_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST);
  3726. 800188c: 6823 ldr r3, [r4, #0]
  3727. 800188e: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3728. 8001892: f8d3 2104 ldr.w r2, [r3, #260] @ 0x104
  3729. 8001896: f042 0201 orr.w r2, r2, #1
  3730. 800189a: f8c3 2104 str.w r2, [r3, #260] @ 0x104
  3731. SET_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR);
  3732. 800189e: 6823 ldr r3, [r4, #0]
  3733. 80018a0: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3734. 80018a4: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108
  3735. 80018a8: f042 0201 orr.w r2, r2, #1
  3736. 80018ac: f8c3 2108 str.w r2, [r3, #264] @ 0x108
  3737. heth->Instance->DMACSR |= (ETH_DMACSR_TPS | ETH_DMACSR_RPS);
  3738. 80018b0: 6823 ldr r3, [r4, #0]
  3739. 80018b2: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3740. 80018b6: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160
  3741. 80018ba: f442 7281 orr.w r2, r2, #258 @ 0x102
  3742. 80018be: f8c3 2160 str.w r2, [r3, #352] @ 0x160
  3743. __HAL_ETH_DMA_ENABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE |
  3744. 80018c2: 6823 ldr r3, [r4, #0]
  3745. 80018c4: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3746. 80018c8: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134
  3747. 80018cc: f24d 02c1 movw r2, #53441 @ 0xd0c1
  3748. 80018d0: 430a orrs r2, r1
  3749. 80018d2: f8c3 2134 str.w r2, [r3, #308] @ 0x134
  3750. heth->gState = HAL_ETH_STATE_STARTED;
  3751. 80018d6: f8c4 5084 str.w r5, [r4, #132] @ 0x84
  3752. return HAL_OK;
  3753. 80018da: 2000 movs r0, #0
  3754. 80018dc: e7ac b.n 8001838 <HAL_ETH_Start_IT+0xc>
  3755. 80018de: bf00 nop
  3756. 80018e0: 0c020060 .word 0x0c020060
  3757. 80018e4: 0c20c000 .word 0x0c20c000
  3758. 080018e8 <HAL_ETH_Stop_IT>:
  3759. if (heth->gState == HAL_ETH_STATE_STARTED)
  3760. 80018e8: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
  3761. 80018ec: 2b23 cmp r3, #35 @ 0x23
  3762. 80018ee: d001 beq.n 80018f4 <HAL_ETH_Stop_IT+0xc>
  3763. return HAL_ERROR;
  3764. 80018f0: 2001 movs r0, #1
  3765. }
  3766. 80018f2: 4770 bx lr
  3767. heth->gState = HAL_ETH_STATE_BUSY;
  3768. 80018f4: f8c0 3084 str.w r3, [r0, #132] @ 0x84
  3769. __HAL_ETH_DMA_DISABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE |
  3770. 80018f8: 6803 ldr r3, [r0, #0]
  3771. 80018fa: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3772. 80018fe: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134
  3773. 8001902: 4a1d ldr r2, [pc, #116] @ (8001978 <HAL_ETH_Stop_IT+0x90>)
  3774. 8001904: 400a ands r2, r1
  3775. 8001906: f8c3 2134 str.w r2, [r3, #308] @ 0x134
  3776. CLEAR_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST);
  3777. 800190a: 6803 ldr r3, [r0, #0]
  3778. 800190c: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3779. 8001910: f8d3 2104 ldr.w r2, [r3, #260] @ 0x104
  3780. 8001914: f022 0201 bic.w r2, r2, #1
  3781. 8001918: f8c3 2104 str.w r2, [r3, #260] @ 0x104
  3782. CLEAR_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR);
  3783. 800191c: 6803 ldr r3, [r0, #0]
  3784. 800191e: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3785. 8001922: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108
  3786. 8001926: f022 0201 bic.w r2, r2, #1
  3787. 800192a: f8c3 2108 str.w r2, [r3, #264] @ 0x108
  3788. CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE);
  3789. 800192e: 6802 ldr r2, [r0, #0]
  3790. 8001930: 6813 ldr r3, [r2, #0]
  3791. 8001932: f023 0301 bic.w r3, r3, #1
  3792. 8001936: 6013 str r3, [r2, #0]
  3793. SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ);
  3794. 8001938: 6802 ldr r2, [r0, #0]
  3795. 800193a: f8d2 3d00 ldr.w r3, [r2, #3328] @ 0xd00
  3796. 800193e: f043 0301 orr.w r3, r3, #1
  3797. 8001942: f8c2 3d00 str.w r3, [r2, #3328] @ 0xd00
  3798. CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE);
  3799. 8001946: 6802 ldr r2, [r0, #0]
  3800. 8001948: 6813 ldr r3, [r2, #0]
  3801. 800194a: f023 0302 bic.w r3, r3, #2
  3802. 800194e: 6013 str r3, [r2, #0]
  3803. for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++)
  3804. 8001950: 2300 movs r3, #0
  3805. 8001952: e008 b.n 8001966 <HAL_ETH_Stop_IT+0x7e>
  3806. dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descindex];
  3807. 8001954: f103 0212 add.w r2, r3, #18
  3808. 8001958: f850 1022 ldr.w r1, [r0, r2, lsl #2]
  3809. CLEAR_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC);
  3810. 800195c: 68ca ldr r2, [r1, #12]
  3811. 800195e: f022 4280 bic.w r2, r2, #1073741824 @ 0x40000000
  3812. 8001962: 60ca str r2, [r1, #12]
  3813. for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++)
  3814. 8001964: 3301 adds r3, #1
  3815. 8001966: 2b03 cmp r3, #3
  3816. 8001968: d9f4 bls.n 8001954 <HAL_ETH_Stop_IT+0x6c>
  3817. heth->RxDescList.ItMode = 0U;
  3818. 800196a: 2300 movs r3, #0
  3819. 800196c: 6583 str r3, [r0, #88] @ 0x58
  3820. heth->gState = HAL_ETH_STATE_READY;
  3821. 800196e: 2210 movs r2, #16
  3822. 8001970: f8c0 2084 str.w r2, [r0, #132] @ 0x84
  3823. return HAL_OK;
  3824. 8001974: 4618 mov r0, r3
  3825. 8001976: 4770 bx lr
  3826. 8001978: ffff2f3e .word 0xffff2f3e
  3827. 0800197c <HAL_ETH_Transmit_IT>:
  3828. {
  3829. 800197c: b510 push {r4, lr}
  3830. 800197e: 4604 mov r4, r0
  3831. if (pTxConfig == NULL)
  3832. 8001980: b129 cbz r1, 800198e <HAL_ETH_Transmit_IT+0x12>
  3833. if (heth->gState == HAL_ETH_STATE_STARTED)
  3834. 8001982: f8d4 3084 ldr.w r3, [r4, #132] @ 0x84
  3835. 8001986: 2b23 cmp r3, #35 @ 0x23
  3836. 8001988: d009 beq.n 800199e <HAL_ETH_Transmit_IT+0x22>
  3837. return HAL_ERROR;
  3838. 800198a: 2001 movs r0, #1
  3839. }
  3840. 800198c: bd10 pop {r4, pc}
  3841. heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
  3842. 800198e: f8d0 3088 ldr.w r3, [r0, #136] @ 0x88
  3843. 8001992: f043 0301 orr.w r3, r3, #1
  3844. 8001996: f8c0 3088 str.w r3, [r0, #136] @ 0x88
  3845. return HAL_ERROR;
  3846. 800199a: 2001 movs r0, #1
  3847. 800199c: e7f6 b.n 800198c <HAL_ETH_Transmit_IT+0x10>
  3848. heth->TxDescList.CurrentPacketAddress = (uint32_t *)pTxConfig->pData;
  3849. 800199e: 6b4b ldr r3, [r1, #52] @ 0x34
  3850. 80019a0: 63e3 str r3, [r4, #60] @ 0x3c
  3851. if (ETH_Prepare_Tx_Descriptors(heth, pTxConfig, 1) != HAL_ETH_ERROR_NONE)
  3852. 80019a2: 2201 movs r2, #1
  3853. 80019a4: 4620 mov r0, r4
  3854. 80019a6: f7ff fd8f bl 80014c8 <ETH_Prepare_Tx_Descriptors>
  3855. 80019aa: b138 cbz r0, 80019bc <HAL_ETH_Transmit_IT+0x40>
  3856. heth->ErrorCode |= HAL_ETH_ERROR_BUSY;
  3857. 80019ac: f8d4 3088 ldr.w r3, [r4, #136] @ 0x88
  3858. 80019b0: f043 0302 orr.w r3, r3, #2
  3859. 80019b4: f8c4 3088 str.w r3, [r4, #136] @ 0x88
  3860. return HAL_ERROR;
  3861. 80019b8: 2001 movs r0, #1
  3862. 80019ba: e7e7 b.n 800198c <HAL_ETH_Transmit_IT+0x10>
  3863. __ASM volatile ("dsb 0xF":::"memory");
  3864. 80019bc: f3bf 8f4f dsb sy
  3865. INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U);
  3866. 80019c0: 6aa3 ldr r3, [r4, #40] @ 0x28
  3867. 80019c2: 1c5a adds r2, r3, #1
  3868. 80019c4: 62a2 str r2, [r4, #40] @ 0x28
  3869. 80019c6: 2a03 cmp r2, #3
  3870. 80019c8: d901 bls.n 80019ce <HAL_ETH_Transmit_IT+0x52>
  3871. 80019ca: 3b03 subs r3, #3
  3872. 80019cc: 62a3 str r3, [r4, #40] @ 0x28
  3873. WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t)(heth->TxDescList.TxDesc[heth->TxDescList.CurTxDesc]));
  3874. 80019ce: 6aa2 ldr r2, [r4, #40] @ 0x28
  3875. 80019d0: 6823 ldr r3, [r4, #0]
  3876. 80019d2: 3206 adds r2, #6
  3877. 80019d4: f854 2022 ldr.w r2, [r4, r2, lsl #2]
  3878. 80019d8: f503 5380 add.w r3, r3, #4096 @ 0x1000
  3879. 80019dc: f8c3 2120 str.w r2, [r3, #288] @ 0x120
  3880. return HAL_OK;
  3881. 80019e0: 2000 movs r0, #0
  3882. 80019e2: e7d3 b.n 800198c <HAL_ETH_Transmit_IT+0x10>
  3883. 080019e4 <HAL_ETH_ReadData>:
  3884. {
  3885. 80019e4: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
  3886. 80019e8: 4604 mov r4, r0
  3887. if (pAppBuff == NULL)
  3888. 80019ea: b189 cbz r1, 8001a10 <HAL_ETH_ReadData+0x2c>
  3889. 80019ec: 468b mov fp, r1
  3890. if (heth->gState != HAL_ETH_STATE_STARTED)
  3891. 80019ee: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
  3892. 80019f2: 2b23 cmp r3, #35 @ 0x23
  3893. 80019f4: d172 bne.n 8001adc <HAL_ETH_ReadData+0xf8>
  3894. descidx = heth->RxDescList.RxDescIdx;
  3895. 80019f6: f8d0 805c ldr.w r8, [r0, #92] @ 0x5c
  3896. dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
  3897. 80019fa: f108 0312 add.w r3, r8, #18
  3898. 80019fe: f850 5023 ldr.w r5, [r0, r3, lsl #2]
  3899. desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt;
  3900. 8001a02: 6ec3 ldr r3, [r0, #108] @ 0x6c
  3901. 8001a04: f1c3 0a04 rsb sl, r3, #4
  3902. uint8_t rxdataready = 0U;
  3903. 8001a08: f04f 0900 mov.w r9, #0
  3904. uint32_t desccnt = 0U;
  3905. 8001a0c: 464f mov r7, r9
  3906. while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax)
  3907. 8001a0e: e038 b.n 8001a82 <HAL_ETH_ReadData+0x9e>
  3908. heth->ErrorCode |= HAL_ETH_ERROR_PARAM;
  3909. 8001a10: f8d0 3088 ldr.w r3, [r0, #136] @ 0x88
  3910. 8001a14: f043 0301 orr.w r3, r3, #1
  3911. 8001a18: f8c0 3088 str.w r3, [r0, #136] @ 0x88
  3912. return HAL_ERROR;
  3913. 8001a1c: 2001 movs r0, #1
  3914. 8001a1e: e05e b.n 8001ade <HAL_ETH_ReadData+0xfa>
  3915. if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET)
  3916. 8001a20: 68eb ldr r3, [r5, #12]
  3917. 8001a22: f013 5f00 tst.w r3, #536870912 @ 0x20000000
  3918. 8001a26: d002 beq.n 8001a2e <HAL_ETH_ReadData+0x4a>
  3919. heth->RxDescList.RxDescCnt = 0;
  3920. 8001a28: 2300 movs r3, #0
  3921. 8001a2a: 6623 str r3, [r4, #96] @ 0x60
  3922. heth->RxDescList.RxDataLength = 0;
  3923. 8001a2c: 6663 str r3, [r4, #100] @ 0x64
  3924. bufflength = heth->Init.RxBuffLen;
  3925. 8001a2e: 6966 ldr r6, [r4, #20]
  3926. if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_LD) != (uint32_t)RESET)
  3927. 8001a30: 68eb ldr r3, [r5, #12]
  3928. 8001a32: f013 5f80 tst.w r3, #268435456 @ 0x10000000
  3929. 8001a36: d008 beq.n 8001a4a <HAL_ETH_ReadData+0x66>
  3930. bufflength = READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_PL) - heth->RxDescList.RxDataLength;
  3931. 8001a38: 68ee ldr r6, [r5, #12]
  3932. 8001a3a: f3c6 060e ubfx r6, r6, #0, #15
  3933. 8001a3e: 6e63 ldr r3, [r4, #100] @ 0x64
  3934. 8001a40: 1af6 subs r6, r6, r3
  3935. heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC3;
  3936. 8001a42: 68eb ldr r3, [r5, #12]
  3937. 8001a44: 6723 str r3, [r4, #112] @ 0x70
  3938. rxdataready = 1;
  3939. 8001a46: f04f 0901 mov.w r9, #1
  3940. HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd,
  3941. 8001a4a: b2b3 uxth r3, r6
  3942. 8001a4c: 692a ldr r2, [r5, #16]
  3943. 8001a4e: f104 0180 add.w r1, r4, #128 @ 0x80
  3944. 8001a52: f104 007c add.w r0, r4, #124 @ 0x7c
  3945. 8001a56: f002 f80b bl 8003a70 <HAL_ETH_RxLinkCallback>
  3946. heth->RxDescList.RxDescCnt++;
  3947. 8001a5a: 6e23 ldr r3, [r4, #96] @ 0x60
  3948. 8001a5c: 3301 adds r3, #1
  3949. 8001a5e: 6623 str r3, [r4, #96] @ 0x60
  3950. heth->RxDescList.RxDataLength += bufflength;
  3951. 8001a60: 6e63 ldr r3, [r4, #100] @ 0x64
  3952. 8001a62: 4433 add r3, r6
  3953. 8001a64: 6663 str r3, [r4, #100] @ 0x64
  3954. dmarxdesc->BackupAddr0 = 0;
  3955. 8001a66: 2300 movs r3, #0
  3956. 8001a68: 612b str r3, [r5, #16]
  3957. INCR_RX_DESC_INDEX(descidx, 1U);
  3958. 8001a6a: f108 0301 add.w r3, r8, #1
  3959. 8001a6e: 2b03 cmp r3, #3
  3960. 8001a70: d901 bls.n 8001a76 <HAL_ETH_ReadData+0x92>
  3961. 8001a72: f1a8 0303 sub.w r3, r8, #3
  3962. dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx];
  3963. 8001a76: f103 0212 add.w r2, r3, #18
  3964. 8001a7a: f854 5022 ldr.w r5, [r4, r2, lsl #2]
  3965. desccnt++;
  3966. 8001a7e: 3701 adds r7, #1
  3967. 8001a80: 4698 mov r8, r3
  3968. while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax)
  3969. 8001a82: 68eb ldr r3, [r5, #12]
  3970. && (rxdataready == 0U))
  3971. 8001a84: 2b00 cmp r3, #0
  3972. 8001a86: db14 blt.n 8001ab2 <HAL_ETH_ReadData+0xce>
  3973. 8001a88: f089 0301 eor.w r3, r9, #1
  3974. 8001a8c: 4557 cmp r7, sl
  3975. 8001a8e: d210 bcs.n 8001ab2 <HAL_ETH_ReadData+0xce>
  3976. 8001a90: b17b cbz r3, 8001ab2 <HAL_ETH_ReadData+0xce>
  3977. if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_CTXT) != (uint32_t)RESET)
  3978. 8001a92: 68eb ldr r3, [r5, #12]
  3979. 8001a94: f013 4f80 tst.w r3, #1073741824 @ 0x40000000
  3980. 8001a98: d003 beq.n 8001aa2 <HAL_ETH_ReadData+0xbe>
  3981. heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC1;
  3982. 8001a9a: 686b ldr r3, [r5, #4]
  3983. 8001a9c: 67a3 str r3, [r4, #120] @ 0x78
  3984. heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC0;
  3985. 8001a9e: 682b ldr r3, [r5, #0]
  3986. 8001aa0: 6763 str r3, [r4, #116] @ 0x74
  3987. if ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL))
  3988. 8001aa2: 68eb ldr r3, [r5, #12]
  3989. 8001aa4: f013 5f00 tst.w r3, #536870912 @ 0x20000000
  3990. 8001aa8: d1ba bne.n 8001a20 <HAL_ETH_ReadData+0x3c>
  3991. 8001aaa: 6fe3 ldr r3, [r4, #124] @ 0x7c
  3992. 8001aac: 2b00 cmp r3, #0
  3993. 8001aae: d1b7 bne.n 8001a20 <HAL_ETH_ReadData+0x3c>
  3994. 8001ab0: e7db b.n 8001a6a <HAL_ETH_ReadData+0x86>
  3995. heth->RxDescList.RxBuildDescCnt += desccnt;
  3996. 8001ab2: 6ee3 ldr r3, [r4, #108] @ 0x6c
  3997. 8001ab4: 443b add r3, r7
  3998. 8001ab6: 66e3 str r3, [r4, #108] @ 0x6c
  3999. if ((heth->RxDescList.RxBuildDescCnt) != 0U)
  4000. 8001ab8: b933 cbnz r3, 8001ac8 <HAL_ETH_ReadData+0xe4>
  4001. heth->RxDescList.RxDescIdx = descidx;
  4002. 8001aba: f8c4 805c str.w r8, [r4, #92] @ 0x5c
  4003. if (rxdataready == 1U)
  4004. 8001abe: f1b9 0f00 cmp.w r9, #0
  4005. 8001ac2: d105 bne.n 8001ad0 <HAL_ETH_ReadData+0xec>
  4006. return HAL_ERROR;
  4007. 8001ac4: 2001 movs r0, #1
  4008. 8001ac6: e00a b.n 8001ade <HAL_ETH_ReadData+0xfa>
  4009. ETH_UpdateDescriptor(heth);
  4010. 8001ac8: 4620 mov r0, r4
  4011. 8001aca: f7ff fab5 bl 8001038 <ETH_UpdateDescriptor>
  4012. 8001ace: e7f4 b.n 8001aba <HAL_ETH_ReadData+0xd6>
  4013. *pAppBuff = heth->RxDescList.pRxStart;
  4014. 8001ad0: 6fe3 ldr r3, [r4, #124] @ 0x7c
  4015. 8001ad2: f8cb 3000 str.w r3, [fp]
  4016. heth->RxDescList.pRxStart = NULL;
  4017. 8001ad6: 2000 movs r0, #0
  4018. 8001ad8: 67e0 str r0, [r4, #124] @ 0x7c
  4019. return HAL_OK;
  4020. 8001ada: e000 b.n 8001ade <HAL_ETH_ReadData+0xfa>
  4021. return HAL_ERROR;
  4022. 8001adc: 2001 movs r0, #1
  4023. }
  4024. 8001ade: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
  4025. 08001ae2 <HAL_ETH_ReleaseTxPacket>:
  4026. {
  4027. 8001ae2: b5f8 push {r3, r4, r5, r6, r7, lr}
  4028. 8001ae4: 4606 mov r6, r0
  4029. uint32_t numOfBuf = dmatxdesclist->BuffersInUse;
  4030. 8001ae6: 6c05 ldr r5, [r0, #64] @ 0x40
  4031. uint32_t idx = dmatxdesclist->releaseIndex;
  4032. 8001ae8: 6c44 ldr r4, [r0, #68] @ 0x44
  4033. uint8_t pktTxStatus = 1U;
  4034. 8001aea: 2701 movs r7, #1
  4035. while ((numOfBuf != 0U) && (pktTxStatus != 0U))
  4036. 8001aec: e002 b.n 8001af4 <HAL_ETH_ReleaseTxPacket+0x12>
  4037. idx = (idx + 1U) & (ETH_TX_DESC_CNT - 1U);
  4038. 8001aee: 3401 adds r4, #1
  4039. 8001af0: f004 0403 and.w r4, r4, #3
  4040. while ((numOfBuf != 0U) && (pktTxStatus != 0U))
  4041. 8001af4: b1f5 cbz r5, 8001b34 <HAL_ETH_ReleaseTxPacket+0x52>
  4042. 8001af6: b1ef cbz r7, 8001b34 <HAL_ETH_ReleaseTxPacket+0x52>
  4043. numOfBuf--;
  4044. 8001af8: 3d01 subs r5, #1
  4045. if (dmatxdesclist->PacketAddress[idx] == NULL)
  4046. 8001afa: 1d23 adds r3, r4, #4
  4047. 8001afc: eb06 0383 add.w r3, r6, r3, lsl #2
  4048. 8001b00: 69d8 ldr r0, [r3, #28]
  4049. 8001b02: 2800 cmp r0, #0
  4050. 8001b04: d0f3 beq.n 8001aee <HAL_ETH_ReleaseTxPacket+0xc>
  4051. if ((heth->Init.TxDesc[idx].DESC3 & ETH_DMATXNDESCRF_OWN) == 0U)
  4052. 8001b06: 68f3 ldr r3, [r6, #12]
  4053. 8001b08: eb04 0244 add.w r2, r4, r4, lsl #1
  4054. 8001b0c: eb03 03c2 add.w r3, r3, r2, lsl #3
  4055. 8001b10: 68db ldr r3, [r3, #12]
  4056. 8001b12: 2b00 cmp r3, #0
  4057. 8001b14: da01 bge.n 8001b1a <HAL_ETH_ReleaseTxPacket+0x38>
  4058. pktTxStatus = 0U;
  4059. 8001b16: 2700 movs r7, #0
  4060. 8001b18: e7ec b.n 8001af4 <HAL_ETH_ReleaseTxPacket+0x12>
  4061. HAL_ETH_TxFreeCallback(dmatxdesclist->PacketAddress[idx]);
  4062. 8001b1a: f001 ffd9 bl 8003ad0 <HAL_ETH_TxFreeCallback>
  4063. dmatxdesclist->PacketAddress[idx] = NULL;
  4064. 8001b1e: 1d23 adds r3, r4, #4
  4065. 8001b20: eb06 0383 add.w r3, r6, r3, lsl #2
  4066. 8001b24: 2200 movs r2, #0
  4067. 8001b26: 61da str r2, [r3, #28]
  4068. idx = (idx + 1U) & (ETH_TX_DESC_CNT - 1U);
  4069. 8001b28: 3401 adds r4, #1
  4070. 8001b2a: f004 0403 and.w r4, r4, #3
  4071. dmatxdesclist->BuffersInUse = numOfBuf;
  4072. 8001b2e: 6435 str r5, [r6, #64] @ 0x40
  4073. dmatxdesclist->releaseIndex = idx;
  4074. 8001b30: 6474 str r4, [r6, #68] @ 0x44
  4075. 8001b32: e7df b.n 8001af4 <HAL_ETH_ReleaseTxPacket+0x12>
  4076. }
  4077. 8001b34: 2000 movs r0, #0
  4078. 8001b36: bdf8 pop {r3, r4, r5, r6, r7, pc}
  4079. 08001b38 <HAL_ETH_PMTCallback>:
  4080. }
  4081. 8001b38: 4770 bx lr
  4082. 08001b3a <HAL_ETH_EEECallback>:
  4083. }
  4084. 8001b3a: 4770 bx lr
  4085. 08001b3c <HAL_ETH_WakeUpCallback>:
  4086. }
  4087. 8001b3c: 4770 bx lr
  4088. 08001b3e <HAL_ETH_IRQHandler>:
  4089. {
  4090. 8001b3e: b510 push {r4, lr}
  4091. 8001b40: 4604 mov r4, r0
  4092. if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_RI))
  4093. 8001b42: 6803 ldr r3, [r0, #0]
  4094. 8001b44: f503 5280 add.w r2, r3, #4096 @ 0x1000
  4095. 8001b48: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160
  4096. 8001b4c: f012 0f40 tst.w r2, #64 @ 0x40
  4097. 8001b50: d006 beq.n 8001b60 <HAL_ETH_IRQHandler+0x22>
  4098. if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_RIE))
  4099. 8001b52: f503 5280 add.w r2, r3, #4096 @ 0x1000
  4100. 8001b56: f8d2 2134 ldr.w r2, [r2, #308] @ 0x134
  4101. 8001b5a: f012 0f40 tst.w r2, #64 @ 0x40
  4102. 8001b5e: d160 bne.n 8001c22 <HAL_ETH_IRQHandler+0xe4>
  4103. if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_TI))
  4104. 8001b60: 6823 ldr r3, [r4, #0]
  4105. 8001b62: f503 5280 add.w r2, r3, #4096 @ 0x1000
  4106. 8001b66: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160
  4107. 8001b6a: f012 0f01 tst.w r2, #1
  4108. 8001b6e: d006 beq.n 8001b7e <HAL_ETH_IRQHandler+0x40>
  4109. if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_TIE))
  4110. 8001b70: f503 5280 add.w r2, r3, #4096 @ 0x1000
  4111. 8001b74: f8d2 2134 ldr.w r2, [r2, #308] @ 0x134
  4112. 8001b78: f012 0f01 tst.w r2, #1
  4113. 8001b7c: d15a bne.n 8001c34 <HAL_ETH_IRQHandler+0xf6>
  4114. if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_AIS))
  4115. 8001b7e: 6823 ldr r3, [r4, #0]
  4116. 8001b80: f503 5280 add.w r2, r3, #4096 @ 0x1000
  4117. 8001b84: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160
  4118. 8001b88: f412 4f80 tst.w r2, #16384 @ 0x4000
  4119. 8001b8c: d02b beq.n 8001be6 <HAL_ETH_IRQHandler+0xa8>
  4120. if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_AIE))
  4121. 8001b8e: f503 5280 add.w r2, r3, #4096 @ 0x1000
  4122. 8001b92: f8d2 2134 ldr.w r2, [r2, #308] @ 0x134
  4123. 8001b96: f412 4f80 tst.w r2, #16384 @ 0x4000
  4124. 8001b9a: d024 beq.n 8001be6 <HAL_ETH_IRQHandler+0xa8>
  4125. heth->ErrorCode |= HAL_ETH_ERROR_DMA;
  4126. 8001b9c: f8d4 2088 ldr.w r2, [r4, #136] @ 0x88
  4127. 8001ba0: f042 0208 orr.w r2, r2, #8
  4128. 8001ba4: f8c4 2088 str.w r2, [r4, #136] @ 0x88
  4129. if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_FBE))
  4130. 8001ba8: f503 5280 add.w r2, r3, #4096 @ 0x1000
  4131. 8001bac: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160
  4132. 8001bb0: f412 5f80 tst.w r2, #4096 @ 0x1000
  4133. 8001bb4: d048 beq.n 8001c48 <HAL_ETH_IRQHandler+0x10a>
  4134. heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_FBE | ETH_DMACSR_TPS | ETH_DMACSR_RPS));
  4135. 8001bb6: f503 5380 add.w r3, r3, #4096 @ 0x1000
  4136. 8001bba: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160
  4137. 8001bbe: f422 626f bic.w r2, r2, #3824 @ 0xef0
  4138. 8001bc2: f022 020d bic.w r2, r2, #13
  4139. 8001bc6: 04d2 lsls r2, r2, #19
  4140. 8001bc8: 0cd2 lsrs r2, r2, #19
  4141. 8001bca: f8c4 208c str.w r2, [r4, #140] @ 0x8c
  4142. __HAL_ETH_DMA_DISABLE_IT(heth, ETH_DMACIER_NIE | ETH_DMACIER_AIE);
  4143. 8001bce: f8d3 2134 ldr.w r2, [r3, #308] @ 0x134
  4144. 8001bd2: f422 4240 bic.w r2, r2, #49152 @ 0xc000
  4145. 8001bd6: f8c3 2134 str.w r2, [r3, #308] @ 0x134
  4146. heth->gState = HAL_ETH_STATE_ERROR;
  4147. 8001bda: 23e0 movs r3, #224 @ 0xe0
  4148. 8001bdc: f8c4 3084 str.w r3, [r4, #132] @ 0x84
  4149. HAL_ETH_ErrorCallback(heth);
  4150. 8001be0: 4620 mov r0, r4
  4151. 8001be2: f001 fd37 bl 8003654 <HAL_ETH_ErrorCallback>
  4152. macirqenable = heth->Instance->MACIER;
  4153. 8001be6: 6823 ldr r3, [r4, #0]
  4154. 8001be8: f8d3 20b4 ldr.w r2, [r3, #180] @ 0xb4
  4155. if (((macirqenable & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \
  4156. 8001bec: f412 4fc0 tst.w r2, #24576 @ 0x6000
  4157. 8001bf0: d137 bne.n 8001c62 <HAL_ETH_IRQHandler+0x124>
  4158. if (__HAL_ETH_MAC_GET_IT(heth, ETH_MAC_PMT_IT))
  4159. 8001bf2: 6823 ldr r3, [r4, #0]
  4160. 8001bf4: f8d3 20b0 ldr.w r2, [r3, #176] @ 0xb0
  4161. 8001bf8: f012 0f10 tst.w r2, #16
  4162. 8001bfc: d145 bne.n 8001c8a <HAL_ETH_IRQHandler+0x14c>
  4163. if (__HAL_ETH_MAC_GET_IT(heth, ETH_MAC_LPI_IT))
  4164. 8001bfe: 6823 ldr r3, [r4, #0]
  4165. 8001c00: f8d3 20b0 ldr.w r2, [r3, #176] @ 0xb0
  4166. 8001c04: f012 0f20 tst.w r2, #32
  4167. 8001c08: d14c bne.n 8001ca4 <HAL_ETH_IRQHandler+0x166>
  4168. if (HAL_GetCurrentCPUID() == CM7_CPUID)
  4169. 8001c0a: f7ff fa09 bl 8001020 <HAL_GetCurrentCPUID>
  4170. 8001c0e: 2803 cmp r0, #3
  4171. 8001c10: d055 beq.n 8001cbe <HAL_ETH_IRQHandler+0x180>
  4172. if (__HAL_ETH_WAKEUP_EXTID2_GET_FLAG(ETH_WAKEUP_EXTI_LINE) != (uint32_t)RESET)
  4173. 8001c12: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000
  4174. 8001c16: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8
  4175. 8001c1a: f413 0f80 tst.w r3, #4194304 @ 0x400000
  4176. 8001c1e: d15f bne.n 8001ce0 <HAL_ETH_IRQHandler+0x1a2>
  4177. }
  4178. 8001c20: bd10 pop {r4, pc}
  4179. __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_RI | ETH_DMACSR_NIS);
  4180. 8001c22: f503 5380 add.w r3, r3, #4096 @ 0x1000
  4181. 8001c26: f248 0240 movw r2, #32832 @ 0x8040
  4182. 8001c2a: f8c3 2160 str.w r2, [r3, #352] @ 0x160
  4183. HAL_ETH_RxCpltCallback(heth);
  4184. 8001c2e: f001 fd01 bl 8003634 <HAL_ETH_RxCpltCallback>
  4185. 8001c32: e795 b.n 8001b60 <HAL_ETH_IRQHandler+0x22>
  4186. __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_TI | ETH_DMACSR_NIS);
  4187. 8001c34: f503 5380 add.w r3, r3, #4096 @ 0x1000
  4188. 8001c38: f248 0201 movw r2, #32769 @ 0x8001
  4189. 8001c3c: f8c3 2160 str.w r2, [r3, #352] @ 0x160
  4190. HAL_ETH_TxCpltCallback(heth);
  4191. 8001c40: 4620 mov r0, r4
  4192. 8001c42: f001 fcff bl 8003644 <HAL_ETH_TxCpltCallback>
  4193. 8001c46: e79a b.n 8001b7e <HAL_ETH_IRQHandler+0x40>
  4194. heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT |
  4195. 8001c48: f503 5380 add.w r3, r3, #4096 @ 0x1000
  4196. 8001c4c: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160
  4197. 8001c50: f402 42cd and.w r2, r2, #26240 @ 0x6680
  4198. 8001c54: f8c4 208c str.w r2, [r4, #140] @ 0x8c
  4199. __HAL_ETH_DMA_CLEAR_IT(heth, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT |
  4200. 8001c58: f44f 42cd mov.w r2, #26240 @ 0x6680
  4201. 8001c5c: f8c3 2160 str.w r2, [r3, #352] @ 0x160
  4202. 8001c60: e7be b.n 8001be0 <HAL_ETH_IRQHandler+0xa2>
  4203. heth->ErrorCode |= HAL_ETH_ERROR_MAC;
  4204. 8001c62: f8d4 2088 ldr.w r2, [r4, #136] @ 0x88
  4205. 8001c66: f042 0210 orr.w r2, r2, #16
  4206. 8001c6a: f8c4 2088 str.w r2, [r4, #136] @ 0x88
  4207. heth->MACErrorCode = READ_REG(heth->Instance->MACRXTXSR);
  4208. 8001c6e: f8d3 30b8 ldr.w r3, [r3, #184] @ 0xb8
  4209. 8001c72: f8c4 3090 str.w r3, [r4, #144] @ 0x90
  4210. heth->gState = HAL_ETH_STATE_ERROR;
  4211. 8001c76: 23e0 movs r3, #224 @ 0xe0
  4212. 8001c78: f8c4 3084 str.w r3, [r4, #132] @ 0x84
  4213. HAL_ETH_ErrorCallback(heth);
  4214. 8001c7c: 4620 mov r0, r4
  4215. 8001c7e: f001 fce9 bl 8003654 <HAL_ETH_ErrorCallback>
  4216. heth->MACErrorCode = (uint32_t)(0x0U);
  4217. 8001c82: 2300 movs r3, #0
  4218. 8001c84: f8c4 3090 str.w r3, [r4, #144] @ 0x90
  4219. 8001c88: e7b3 b.n 8001bf2 <HAL_ETH_IRQHandler+0xb4>
  4220. heth->MACWakeUpEvent = READ_BIT(heth->Instance->MACPCSR, (ETH_MACPCSR_RWKPRCVD | ETH_MACPCSR_MGKPRCVD));
  4221. 8001c8a: f8d3 30c0 ldr.w r3, [r3, #192] @ 0xc0
  4222. 8001c8e: f003 0360 and.w r3, r3, #96 @ 0x60
  4223. 8001c92: f8c4 3094 str.w r3, [r4, #148] @ 0x94
  4224. HAL_ETH_PMTCallback(heth);
  4225. 8001c96: 4620 mov r0, r4
  4226. 8001c98: f7ff ff4e bl 8001b38 <HAL_ETH_PMTCallback>
  4227. heth->MACWakeUpEvent = (uint32_t)(0x0U);
  4228. 8001c9c: 2300 movs r3, #0
  4229. 8001c9e: f8c4 3094 str.w r3, [r4, #148] @ 0x94
  4230. 8001ca2: e7ac b.n 8001bfe <HAL_ETH_IRQHandler+0xc0>
  4231. heth->MACLPIEvent = READ_BIT(heth->Instance->MACPCSR, 0x0000000FU);
  4232. 8001ca4: f8d3 30c0 ldr.w r3, [r3, #192] @ 0xc0
  4233. 8001ca8: f003 030f and.w r3, r3, #15
  4234. 8001cac: f8c4 3098 str.w r3, [r4, #152] @ 0x98
  4235. HAL_ETH_EEECallback(heth);
  4236. 8001cb0: 4620 mov r0, r4
  4237. 8001cb2: f7ff ff42 bl 8001b3a <HAL_ETH_EEECallback>
  4238. heth->MACLPIEvent = (uint32_t)(0x0U);
  4239. 8001cb6: 2300 movs r3, #0
  4240. 8001cb8: f8c4 3098 str.w r3, [r4, #152] @ 0x98
  4241. 8001cbc: e7a5 b.n 8001c0a <HAL_ETH_IRQHandler+0xcc>
  4242. if (__HAL_ETH_WAKEUP_EXTI_GET_FLAG(ETH_WAKEUP_EXTI_LINE) != (uint32_t)RESET)
  4243. 8001cbe: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000
  4244. 8001cc2: f8d3 30a8 ldr.w r3, [r3, #168] @ 0xa8
  4245. 8001cc6: f413 0f80 tst.w r3, #4194304 @ 0x400000
  4246. 8001cca: d0a9 beq.n 8001c20 <HAL_ETH_IRQHandler+0xe2>
  4247. __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE);
  4248. 8001ccc: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000
  4249. 8001cd0: f44f 0280 mov.w r2, #4194304 @ 0x400000
  4250. 8001cd4: f8c3 20a8 str.w r2, [r3, #168] @ 0xa8
  4251. HAL_ETH_WakeUpCallback(heth);
  4252. 8001cd8: 4620 mov r0, r4
  4253. 8001cda: f7ff ff2f bl 8001b3c <HAL_ETH_WakeUpCallback>
  4254. 8001cde: e79f b.n 8001c20 <HAL_ETH_IRQHandler+0xe2>
  4255. __HAL_ETH_WAKEUP_EXTID2_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE);
  4256. 8001ce0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000
  4257. 8001ce4: f44f 0280 mov.w r2, #4194304 @ 0x400000
  4258. 8001ce8: f8c3 20e8 str.w r2, [r3, #232] @ 0xe8
  4259. HAL_ETH_WakeUpCallback(heth);
  4260. 8001cec: 4620 mov r0, r4
  4261. 8001cee: f7ff ff25 bl 8001b3c <HAL_ETH_WakeUpCallback>
  4262. }
  4263. 8001cf2: e795 b.n 8001c20 <HAL_ETH_IRQHandler+0xe2>
  4264. 08001cf4 <HAL_ETH_ReadPHYRegister>:
  4265. {
  4266. 8001cf4: b570 push {r4, r5, r6, lr}
  4267. 8001cf6: 4604 mov r4, r0
  4268. 8001cf8: 461d mov r5, r3
  4269. if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET)
  4270. 8001cfa: 6800 ldr r0, [r0, #0]
  4271. 8001cfc: f8d0 3200 ldr.w r3, [r0, #512] @ 0x200
  4272. 8001d00: f013 0f01 tst.w r3, #1
  4273. 8001d04: d001 beq.n 8001d0a <HAL_ETH_ReadPHYRegister+0x16>
  4274. return HAL_ERROR;
  4275. 8001d06: 2001 movs r0, #1
  4276. }
  4277. 8001d08: bd70 pop {r4, r5, r6, pc}
  4278. WRITE_REG(tmpreg, heth->Instance->MACMDIOAR);
  4279. 8001d0a: f8d0 3200 ldr.w r3, [r0, #512] @ 0x200
  4280. MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21));
  4281. 8001d0e: f023 7378 bic.w r3, r3, #65011712 @ 0x3e00000
  4282. 8001d12: ea43 5141 orr.w r1, r3, r1, lsl #21
  4283. MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16));
  4284. 8001d16: f421 13f8 bic.w r3, r1, #2031616 @ 0x1f0000
  4285. 8001d1a: ea43 4202 orr.w r2, r3, r2, lsl #16
  4286. SET_BIT(tmpreg, ETH_MACMDIOAR_MB);
  4287. 8001d1e: f042 020d orr.w r2, r2, #13
  4288. WRITE_REG(heth->Instance->MACMDIOAR, tmpreg);
  4289. 8001d22: f8c0 2200 str.w r2, [r0, #512] @ 0x200
  4290. tickstart = HAL_GetTick();
  4291. 8001d26: f7ff f8b1 bl 8000e8c <HAL_GetTick>
  4292. 8001d2a: 4606 mov r6, r0
  4293. while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U)
  4294. 8001d2c: 6822 ldr r2, [r4, #0]
  4295. 8001d2e: f8d2 1200 ldr.w r1, [r2, #512] @ 0x200
  4296. 8001d32: f011 0f01 tst.w r1, #1
  4297. 8001d36: d007 beq.n 8001d48 <HAL_ETH_ReadPHYRegister+0x54>
  4298. if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT))
  4299. 8001d38: f7ff f8a8 bl 8000e8c <HAL_GetTick>
  4300. 8001d3c: 1b82 subs r2, r0, r6
  4301. 8001d3e: f5b2 7f7a cmp.w r2, #1000 @ 0x3e8
  4302. 8001d42: d9f3 bls.n 8001d2c <HAL_ETH_ReadPHYRegister+0x38>
  4303. return HAL_ERROR;
  4304. 8001d44: 2001 movs r0, #1
  4305. 8001d46: e7df b.n 8001d08 <HAL_ETH_ReadPHYRegister+0x14>
  4306. WRITE_REG(*pRegValue, (uint16_t)heth->Instance->MACMDIODR);
  4307. 8001d48: f8d2 3204 ldr.w r3, [r2, #516] @ 0x204
  4308. 8001d4c: b29b uxth r3, r3
  4309. 8001d4e: 602b str r3, [r5, #0]
  4310. return HAL_OK;
  4311. 8001d50: 2000 movs r0, #0
  4312. 8001d52: e7d9 b.n 8001d08 <HAL_ETH_ReadPHYRegister+0x14>
  4313. 08001d54 <HAL_ETH_WritePHYRegister>:
  4314. {
  4315. 8001d54: b538 push {r3, r4, r5, lr}
  4316. 8001d56: 4604 mov r4, r0
  4317. if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET)
  4318. 8001d58: 6800 ldr r0, [r0, #0]
  4319. 8001d5a: f8d0 5200 ldr.w r5, [r0, #512] @ 0x200
  4320. 8001d5e: f015 0f01 tst.w r5, #1
  4321. 8001d62: d001 beq.n 8001d68 <HAL_ETH_WritePHYRegister+0x14>
  4322. return HAL_ERROR;
  4323. 8001d64: 2001 movs r0, #1
  4324. }
  4325. 8001d66: bd38 pop {r3, r4, r5, pc}
  4326. WRITE_REG(tmpreg, heth->Instance->MACMDIOAR);
  4327. 8001d68: f8d0 0200 ldr.w r0, [r0, #512] @ 0x200
  4328. MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21));
  4329. 8001d6c: f020 7078 bic.w r0, r0, #65011712 @ 0x3e00000
  4330. 8001d70: ea40 5141 orr.w r1, r0, r1, lsl #21
  4331. MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16));
  4332. 8001d74: f421 11f8 bic.w r1, r1, #2031616 @ 0x1f0000
  4333. 8001d78: ea41 4202 orr.w r2, r1, r2, lsl #16
  4334. MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_WR);
  4335. 8001d7c: f022 020c bic.w r2, r2, #12
  4336. SET_BIT(tmpreg, ETH_MACMDIOAR_MB);
  4337. 8001d80: f042 0205 orr.w r2, r2, #5
  4338. WRITE_REG(ETH->MACMDIODR, (uint16_t)RegValue);
  4339. 8001d84: b29b uxth r3, r3
  4340. 8001d86: 490c ldr r1, [pc, #48] @ (8001db8 <HAL_ETH_WritePHYRegister+0x64>)
  4341. 8001d88: f8c1 3204 str.w r3, [r1, #516] @ 0x204
  4342. WRITE_REG(ETH->MACMDIOAR, tmpreg);
  4343. 8001d8c: f8c1 2200 str.w r2, [r1, #512] @ 0x200
  4344. tickstart = HAL_GetTick();
  4345. 8001d90: f7ff f87c bl 8000e8c <HAL_GetTick>
  4346. 8001d94: 4605 mov r5, r0
  4347. while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U)
  4348. 8001d96: 6823 ldr r3, [r4, #0]
  4349. 8001d98: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200
  4350. 8001d9c: f013 0f01 tst.w r3, #1
  4351. 8001da0: d007 beq.n 8001db2 <HAL_ETH_WritePHYRegister+0x5e>
  4352. if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT))
  4353. 8001da2: f7ff f873 bl 8000e8c <HAL_GetTick>
  4354. 8001da6: 1b43 subs r3, r0, r5
  4355. 8001da8: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8
  4356. 8001dac: d9f3 bls.n 8001d96 <HAL_ETH_WritePHYRegister+0x42>
  4357. return HAL_ERROR;
  4358. 8001dae: 2001 movs r0, #1
  4359. 8001db0: e7d9 b.n 8001d66 <HAL_ETH_WritePHYRegister+0x12>
  4360. return HAL_OK;
  4361. 8001db2: 2000 movs r0, #0
  4362. 8001db4: e7d7 b.n 8001d66 <HAL_ETH_WritePHYRegister+0x12>
  4363. 8001db6: bf00 nop
  4364. 8001db8: 40028000 .word 0x40028000
  4365. 08001dbc <HAL_ETH_GetMACConfig>:
  4366. if (macconf == NULL)
  4367. 8001dbc: 2900 cmp r1, #0
  4368. 8001dbe: f000 80ee beq.w 8001f9e <HAL_ETH_GetMACConfig+0x1e2>
  4369. macconf->PreambleLength = READ_BIT(heth->Instance->MACCR, ETH_MACCR_PRELEN);
  4370. 8001dc2: 6802 ldr r2, [r0, #0]
  4371. 8001dc4: 6812 ldr r2, [r2, #0]
  4372. 8001dc6: f002 020c and.w r2, r2, #12
  4373. 8001dca: 62ca str r2, [r1, #44] @ 0x2c
  4374. macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE;
  4375. 8001dcc: 6802 ldr r2, [r0, #0]
  4376. 8001dce: 6812 ldr r2, [r2, #0]
  4377. 8001dd0: f3c2 1200 ubfx r2, r2, #4, #1
  4378. 8001dd4: f881 2028 strb.w r2, [r1, #40] @ 0x28
  4379. macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL);
  4380. 8001dd8: 6802 ldr r2, [r0, #0]
  4381. 8001dda: 6812 ldr r2, [r2, #0]
  4382. 8001ddc: f002 0260 and.w r2, r2, #96 @ 0x60
  4383. 8001de0: 624a str r2, [r1, #36] @ 0x24
  4384. macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DR) >> 8) == 0U) ? ENABLE : DISABLE;
  4385. 8001de2: 6802 ldr r2, [r0, #0]
  4386. 8001de4: 6812 ldr r2, [r2, #0]
  4387. 8001de6: f412 7f80 tst.w r2, #256 @ 0x100
  4388. 8001dea: bf0c ite eq
  4389. 8001dec: 2201 moveq r2, #1
  4390. 8001dee: 2200 movne r2, #0
  4391. 8001df0: f881 2020 strb.w r2, [r1, #32]
  4392. macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U)
  4393. 8001df4: 6802 ldr r2, [r0, #0]
  4394. 8001df6: 6812 ldr r2, [r2, #0]
  4395. ? ENABLE : DISABLE;
  4396. 8001df8: f3c2 2240 ubfx r2, r2, #9, #1
  4397. macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U)
  4398. 8001dfc: 77ca strb r2, [r1, #31]
  4399. macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DO) >> 10) == 0U) ? ENABLE : DISABLE;
  4400. 8001dfe: 6802 ldr r2, [r0, #0]
  4401. 8001e00: 6812 ldr r2, [r2, #0]
  4402. 8001e02: f412 6f80 tst.w r2, #1024 @ 0x400
  4403. 8001e06: bf0c ite eq
  4404. 8001e08: 2201 moveq r2, #1
  4405. 8001e0a: 2200 movne r2, #0
  4406. 8001e0c: 778a strb r2, [r1, #30]
  4407. macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR,
  4408. 8001e0e: 6802 ldr r2, [r0, #0]
  4409. 8001e10: 6812 ldr r2, [r2, #0]
  4410. ETH_MACCR_ECRSFD) >> 11) > 0U) ? ENABLE : DISABLE;
  4411. 8001e12: f3c2 22c0 ubfx r2, r2, #11, #1
  4412. macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR,
  4413. 8001e16: 774a strb r2, [r1, #29]
  4414. macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE;
  4415. 8001e18: 6802 ldr r2, [r0, #0]
  4416. 8001e1a: 6812 ldr r2, [r2, #0]
  4417. 8001e1c: f3c2 3200 ubfx r2, r2, #12, #1
  4418. 8001e20: 770a strb r2, [r1, #28]
  4419. macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM);
  4420. 8001e22: 6802 ldr r2, [r0, #0]
  4421. 8001e24: 6812 ldr r2, [r2, #0]
  4422. 8001e26: f402 5200 and.w r2, r2, #8192 @ 0x2000
  4423. 8001e2a: 618a str r2, [r1, #24]
  4424. macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES);
  4425. 8001e2c: 6802 ldr r2, [r0, #0]
  4426. 8001e2e: 6812 ldr r2, [r2, #0]
  4427. 8001e30: f402 4280 and.w r2, r2, #16384 @ 0x4000
  4428. 8001e34: 614a str r2, [r1, #20]
  4429. macconf->JumboPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JE) >> 16) > 0U) ? ENABLE : DISABLE;
  4430. 8001e36: 6802 ldr r2, [r0, #0]
  4431. 8001e38: 6812 ldr r2, [r2, #0]
  4432. 8001e3a: f3c2 4200 ubfx r2, r2, #16, #1
  4433. 8001e3e: 748a strb r2, [r1, #18]
  4434. macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 17) == 0U) ? ENABLE : DISABLE;
  4435. 8001e40: 6802 ldr r2, [r0, #0]
  4436. 8001e42: 6812 ldr r2, [r2, #0]
  4437. 8001e44: f412 3f00 tst.w r2, #131072 @ 0x20000
  4438. 8001e48: bf0c ite eq
  4439. 8001e4a: 2201 moveq r2, #1
  4440. 8001e4c: 2200 movne r2, #0
  4441. 8001e4e: 744a strb r2, [r1, #17]
  4442. macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 19) == 0U) ? ENABLE : DISABLE;
  4443. 8001e50: 6802 ldr r2, [r0, #0]
  4444. 8001e52: 6812 ldr r2, [r2, #0]
  4445. 8001e54: f412 2f00 tst.w r2, #524288 @ 0x80000
  4446. 8001e58: bf0c ite eq
  4447. 8001e5a: 2201 moveq r2, #1
  4448. 8001e5c: 2200 movne r2, #0
  4449. 8001e5e: 740a strb r2, [r1, #16]
  4450. macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ACS) >> 20) > 0U) ? ENABLE : DISABLE;
  4451. 8001e60: 6802 ldr r2, [r0, #0]
  4452. 8001e62: 6812 ldr r2, [r2, #0]
  4453. 8001e64: f3c2 5200 ubfx r2, r2, #20, #1
  4454. 8001e68: 73ca strb r2, [r1, #15]
  4455. macconf->CRCStripTypePacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CST) >> 21) > 0U) ? ENABLE : DISABLE;
  4456. 8001e6a: 6802 ldr r2, [r0, #0]
  4457. 8001e6c: 6812 ldr r2, [r2, #0]
  4458. 8001e6e: f3c2 5240 ubfx r2, r2, #21, #1
  4459. 8001e72: 738a strb r2, [r1, #14]
  4460. macconf->Support2KPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_S2KP) >> 22) > 0U) ? ENABLE : DISABLE;
  4461. 8001e74: 6802 ldr r2, [r0, #0]
  4462. 8001e76: 6812 ldr r2, [r2, #0]
  4463. 8001e78: f3c2 5280 ubfx r2, r2, #22, #1
  4464. 8001e7c: 734a strb r2, [r1, #13]
  4465. macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR,
  4466. 8001e7e: 6802 ldr r2, [r0, #0]
  4467. 8001e80: 6812 ldr r2, [r2, #0]
  4468. ETH_MACCR_GPSLCE) >> 23) > 0U) ? ENABLE : DISABLE;
  4469. 8001e82: f3c2 52c0 ubfx r2, r2, #23, #1
  4470. macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR,
  4471. 8001e86: 730a strb r2, [r1, #12]
  4472. macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPG);
  4473. 8001e88: 6802 ldr r2, [r0, #0]
  4474. 8001e8a: 6812 ldr r2, [r2, #0]
  4475. 8001e8c: f002 62e0 and.w r2, r2, #117440512 @ 0x7000000
  4476. 8001e90: 608a str r2, [r1, #8]
  4477. macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPC) >> 27) > 0U) ? ENABLE : DISABLE;
  4478. 8001e92: 6802 ldr r2, [r0, #0]
  4479. 8001e94: 6812 ldr r2, [r2, #0]
  4480. 8001e96: f3c2 62c0 ubfx r2, r2, #27, #1
  4481. 8001e9a: 710a strb r2, [r1, #4]
  4482. macconf->SourceAddrControl = READ_BIT(heth->Instance->MACCR, ETH_MACCR_SARC);
  4483. 8001e9c: 6802 ldr r2, [r0, #0]
  4484. 8001e9e: 6812 ldr r2, [r2, #0]
  4485. 8001ea0: f002 42e0 and.w r2, r2, #1879048192 @ 0x70000000
  4486. 8001ea4: 600a str r2, [r1, #0]
  4487. macconf->GiantPacketSizeLimit = READ_BIT(heth->Instance->MACECR, ETH_MACECR_GPSL);
  4488. 8001ea6: 6802 ldr r2, [r0, #0]
  4489. 8001ea8: 6852 ldr r2, [r2, #4]
  4490. 8001eaa: f3c2 020d ubfx r2, r2, #0, #14
  4491. 8001eae: 634a str r2, [r1, #52] @ 0x34
  4492. macconf->CRCCheckingRxPackets = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_DCRCC) >> 16) == 0U) ? ENABLE : DISABLE;
  4493. 8001eb0: 6802 ldr r2, [r0, #0]
  4494. 8001eb2: 6852 ldr r2, [r2, #4]
  4495. 8001eb4: f412 3f80 tst.w r2, #65536 @ 0x10000
  4496. 8001eb8: bf0c ite eq
  4497. 8001eba: 2201 moveq r2, #1
  4498. 8001ebc: 2200 movne r2, #0
  4499. 8001ebe: f881 2032 strb.w r2, [r1, #50] @ 0x32
  4500. macconf->SlowProtocolDetect = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_SPEN) >> 17) > 0U) ? ENABLE : DISABLE;
  4501. 8001ec2: 6802 ldr r2, [r0, #0]
  4502. 8001ec4: 6852 ldr r2, [r2, #4]
  4503. 8001ec6: f3c2 4240 ubfx r2, r2, #17, #1
  4504. 8001eca: f881 2031 strb.w r2, [r1, #49] @ 0x31
  4505. macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR,
  4506. 8001ece: 6802 ldr r2, [r0, #0]
  4507. 8001ed0: 6852 ldr r2, [r2, #4]
  4508. ETH_MACECR_USP) >> 18) > 0U) ? ENABLE : DISABLE;
  4509. 8001ed2: f3c2 4280 ubfx r2, r2, #18, #1
  4510. macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR,
  4511. 8001ed6: f881 2030 strb.w r2, [r1, #48] @ 0x30
  4512. macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U)
  4513. 8001eda: 6802 ldr r2, [r0, #0]
  4514. 8001edc: 6852 ldr r2, [r2, #4]
  4515. ? ENABLE : DISABLE;
  4516. 8001ede: f3c2 6200 ubfx r2, r2, #24, #1
  4517. macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U)
  4518. 8001ee2: f881 2038 strb.w r2, [r1, #56] @ 0x38
  4519. macconf->ExtendedInterPacketGapVal = READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPG) >> 25;
  4520. 8001ee6: 6802 ldr r2, [r0, #0]
  4521. 8001ee8: 6852 ldr r2, [r2, #4]
  4522. 8001eea: f3c2 6244 ubfx r2, r2, #25, #5
  4523. 8001eee: 63ca str r2, [r1, #60] @ 0x3c
  4524. macconf->ProgrammableWatchdog = ((READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_PWE) >> 8) > 0U) ? ENABLE : DISABLE;
  4525. 8001ef0: 6802 ldr r2, [r0, #0]
  4526. 8001ef2: 68d2 ldr r2, [r2, #12]
  4527. 8001ef4: f3c2 2200 ubfx r2, r2, #8, #1
  4528. 8001ef8: f881 2040 strb.w r2, [r1, #64] @ 0x40
  4529. macconf->WatchdogTimeout = READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_WTO);
  4530. 8001efc: 6802 ldr r2, [r0, #0]
  4531. 8001efe: 68d2 ldr r2, [r2, #12]
  4532. 8001f00: f002 020f and.w r2, r2, #15
  4533. 8001f04: 644a str r2, [r1, #68] @ 0x44
  4534. macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_TFE) >> 1) > 0U) ? ENABLE : DISABLE;
  4535. 8001f06: 6802 ldr r2, [r0, #0]
  4536. 8001f08: 6f12 ldr r2, [r2, #112] @ 0x70
  4537. 8001f0a: f3c2 0240 ubfx r2, r2, #1, #1
  4538. 8001f0e: f881 2054 strb.w r2, [r1, #84] @ 0x54
  4539. macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_DZPQ) >> 7) == 0U) ? ENABLE : DISABLE;
  4540. 8001f12: 6802 ldr r2, [r0, #0]
  4541. 8001f14: 6f12 ldr r2, [r2, #112] @ 0x70
  4542. 8001f16: f012 0f80 tst.w r2, #128 @ 0x80
  4543. 8001f1a: bf0c ite eq
  4544. 8001f1c: 2201 moveq r2, #1
  4545. 8001f1e: 2200 movne r2, #0
  4546. 8001f20: f881 204c strb.w r2, [r1, #76] @ 0x4c
  4547. macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PLT);
  4548. 8001f24: 6802 ldr r2, [r0, #0]
  4549. 8001f26: 6f12 ldr r2, [r2, #112] @ 0x70
  4550. 8001f28: f002 0270 and.w r2, r2, #112 @ 0x70
  4551. 8001f2c: 650a str r2, [r1, #80] @ 0x50
  4552. macconf->PauseTime = (READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PT) >> 16);
  4553. 8001f2e: 6802 ldr r2, [r0, #0]
  4554. 8001f30: 6f12 ldr r2, [r2, #112] @ 0x70
  4555. 8001f32: 0c12 lsrs r2, r2, #16
  4556. 8001f34: 648a str r2, [r1, #72] @ 0x48
  4557. macconf->ReceiveFlowControl = (READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_RFE) > 0U) ? ENABLE : DISABLE;
  4558. 8001f36: 6802 ldr r2, [r0, #0]
  4559. 8001f38: f8d2 2090 ldr.w r2, [r2, #144] @ 0x90
  4560. 8001f3c: f002 0201 and.w r2, r2, #1
  4561. 8001f40: f881 2056 strb.w r2, [r1, #86] @ 0x56
  4562. macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U)
  4563. 8001f44: 6802 ldr r2, [r0, #0]
  4564. 8001f46: f8d2 2090 ldr.w r2, [r2, #144] @ 0x90
  4565. ? ENABLE : DISABLE;
  4566. 8001f4a: f3c2 0240 ubfx r2, r2, #1, #1
  4567. macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U)
  4568. 8001f4e: f881 2055 strb.w r2, [r1, #85] @ 0x55
  4569. macconf->TransmitQueueMode = READ_BIT(heth->Instance->MTLTQOMR, (ETH_MTLTQOMR_TTC | ETH_MTLTQOMR_TSF));
  4570. 8001f52: 6802 ldr r2, [r0, #0]
  4571. 8001f54: f8d2 2d00 ldr.w r2, [r2, #3328] @ 0xd00
  4572. 8001f58: f002 0272 and.w r2, r2, #114 @ 0x72
  4573. 8001f5c: 658a str r2, [r1, #88] @ 0x58
  4574. macconf->ReceiveQueueMode = READ_BIT(heth->Instance->MTLRQOMR, (ETH_MTLRQOMR_RTC | ETH_MTLRQOMR_RSF));
  4575. 8001f5e: 6802 ldr r2, [r0, #0]
  4576. 8001f60: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30
  4577. 8001f64: f002 0223 and.w r2, r2, #35 @ 0x23
  4578. 8001f68: 65ca str r2, [r1, #92] @ 0x5c
  4579. macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR,
  4580. 8001f6a: 6802 ldr r2, [r0, #0]
  4581. 8001f6c: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30
  4582. ETH_MTLRQOMR_FUP) >> 3) > 0U) ? ENABLE : DISABLE;
  4583. 8001f70: f3c2 02c0 ubfx r2, r2, #3, #1
  4584. macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR,
  4585. 8001f74: f881 2062 strb.w r2, [r1, #98] @ 0x62
  4586. macconf->ForwardRxErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_FEP) >> 4) > 0U) ? ENABLE : DISABLE;
  4587. 8001f78: 6802 ldr r2, [r0, #0]
  4588. 8001f7a: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30
  4589. 8001f7e: f3c2 1200 ubfx r2, r2, #4, #1
  4590. 8001f82: f881 2061 strb.w r2, [r1, #97] @ 0x61
  4591. macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR,
  4592. 8001f86: 6802 ldr r2, [r0, #0]
  4593. 8001f88: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30
  4594. ETH_MTLRQOMR_DISTCPEF) >> 6) == 0U) ? ENABLE : DISABLE;
  4595. 8001f8c: f012 0f40 tst.w r2, #64 @ 0x40
  4596. 8001f90: bf0c ite eq
  4597. 8001f92: 2201 moveq r2, #1
  4598. 8001f94: 2200 movne r2, #0
  4599. macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR,
  4600. 8001f96: f881 2060 strb.w r2, [r1, #96] @ 0x60
  4601. return HAL_OK;
  4602. 8001f9a: 2000 movs r0, #0
  4603. 8001f9c: 4770 bx lr
  4604. return HAL_ERROR;
  4605. 8001f9e: 2001 movs r0, #1
  4606. }
  4607. 8001fa0: 4770 bx lr
  4608. 08001fa2 <HAL_ETH_SetMACConfig>:
  4609. if (macconf == NULL)
  4610. 8001fa2: b151 cbz r1, 8001fba <HAL_ETH_SetMACConfig+0x18>
  4611. {
  4612. 8001fa4: b508 push {r3, lr}
  4613. if (heth->gState == HAL_ETH_STATE_READY)
  4614. 8001fa6: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
  4615. 8001faa: 2b10 cmp r3, #16
  4616. 8001fac: d001 beq.n 8001fb2 <HAL_ETH_SetMACConfig+0x10>
  4617. return HAL_ERROR;
  4618. 8001fae: 2001 movs r0, #1
  4619. }
  4620. 8001fb0: bd08 pop {r3, pc}
  4621. ETH_SetMACConfig(heth, macconf);
  4622. 8001fb2: f7ff f889 bl 80010c8 <ETH_SetMACConfig>
  4623. return HAL_OK;
  4624. 8001fb6: 2000 movs r0, #0
  4625. 8001fb8: e7fa b.n 8001fb0 <HAL_ETH_SetMACConfig+0xe>
  4626. return HAL_ERROR;
  4627. 8001fba: 2001 movs r0, #1
  4628. }
  4629. 8001fbc: 4770 bx lr
  4630. ...
  4631. 08001fc0 <HAL_ETH_SetMDIOClockRange>:
  4632. {
  4633. 8001fc0: b538 push {r3, r4, r5, lr}
  4634. 8001fc2: 4605 mov r5, r0
  4635. tmpreg = (heth->Instance)->MACMDIOAR;
  4636. 8001fc4: 6803 ldr r3, [r0, #0]
  4637. 8001fc6: f8d3 4200 ldr.w r4, [r3, #512] @ 0x200
  4638. tmpreg &= ~ETH_MACMDIOAR_CR;
  4639. 8001fca: f424 6470 bic.w r4, r4, #3840 @ 0xf00
  4640. hclk = HAL_RCC_GetHCLKFreq();
  4641. 8001fce: f000 ffcd bl 8002f6c <HAL_RCC_GetHCLKFreq>
  4642. if ((hclk >= 20000000U) && (hclk < 35000000U))
  4643. 8001fd2: 4b11 ldr r3, [pc, #68] @ (8002018 <HAL_ETH_SetMDIOClockRange+0x58>)
  4644. 8001fd4: 4403 add r3, r0
  4645. 8001fd6: 4a11 ldr r2, [pc, #68] @ (800201c <HAL_ETH_SetMDIOClockRange+0x5c>)
  4646. 8001fd8: 4293 cmp r3, r2
  4647. 8001fda: d205 bcs.n 8001fe8 <HAL_ETH_SetMDIOClockRange+0x28>
  4648. tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV16;
  4649. 8001fdc: f444 7400 orr.w r4, r4, #512 @ 0x200
  4650. (heth->Instance)->MACMDIOAR = (uint32_t)tmpreg;
  4651. 8001fe0: 682b ldr r3, [r5, #0]
  4652. 8001fe2: f8c3 4200 str.w r4, [r3, #512] @ 0x200
  4653. }
  4654. 8001fe6: bd38 pop {r3, r4, r5, pc}
  4655. else if ((hclk >= 35000000U) && (hclk < 60000000U))
  4656. 8001fe8: 4b0d ldr r3, [pc, #52] @ (8002020 <HAL_ETH_SetMDIOClockRange+0x60>)
  4657. 8001fea: 4403 add r3, r0
  4658. 8001fec: 4a0d ldr r2, [pc, #52] @ (8002024 <HAL_ETH_SetMDIOClockRange+0x64>)
  4659. 8001fee: 4293 cmp r3, r2
  4660. 8001ff0: d802 bhi.n 8001ff8 <HAL_ETH_SetMDIOClockRange+0x38>
  4661. tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV26;
  4662. 8001ff2: f444 7440 orr.w r4, r4, #768 @ 0x300
  4663. 8001ff6: e7f3 b.n 8001fe0 <HAL_ETH_SetMDIOClockRange+0x20>
  4664. else if ((hclk >= 60000000U) && (hclk < 100000000U))
  4665. 8001ff8: 4b0b ldr r3, [pc, #44] @ (8002028 <HAL_ETH_SetMDIOClockRange+0x68>)
  4666. 8001ffa: 4403 add r3, r0
  4667. 8001ffc: 4a0b ldr r2, [pc, #44] @ (800202c <HAL_ETH_SetMDIOClockRange+0x6c>)
  4668. 8001ffe: 4293 cmp r3, r2
  4669. 8002000: d3ee bcc.n 8001fe0 <HAL_ETH_SetMDIOClockRange+0x20>
  4670. else if ((hclk >= 100000000U) && (hclk < 150000000U))
  4671. 8002002: 4b0b ldr r3, [pc, #44] @ (8002030 <HAL_ETH_SetMDIOClockRange+0x70>)
  4672. 8002004: 4403 add r3, r0
  4673. 8002006: 4a0b ldr r2, [pc, #44] @ (8002034 <HAL_ETH_SetMDIOClockRange+0x74>)
  4674. 8002008: 4293 cmp r3, r2
  4675. 800200a: d802 bhi.n 8002012 <HAL_ETH_SetMDIOClockRange+0x52>
  4676. tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV62;
  4677. 800200c: f444 7480 orr.w r4, r4, #256 @ 0x100
  4678. 8002010: e7e6 b.n 8001fe0 <HAL_ETH_SetMDIOClockRange+0x20>
  4679. tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV102;
  4680. 8002012: f444 6480 orr.w r4, r4, #1024 @ 0x400
  4681. 8002016: e7e3 b.n 8001fe0 <HAL_ETH_SetMDIOClockRange+0x20>
  4682. 8002018: feced300 .word 0xfeced300
  4683. 800201c: 00e4e1c0 .word 0x00e4e1c0
  4684. 8002020: fde9f140 .word 0xfde9f140
  4685. 8002024: 017d783f .word 0x017d783f
  4686. 8002028: fc6c7900 .word 0xfc6c7900
  4687. 800202c: 02625a00 .word 0x02625a00
  4688. 8002030: fa0a1f00 .word 0xfa0a1f00
  4689. 8002034: 02faf07f .word 0x02faf07f
  4690. 08002038 <HAL_ETH_Init>:
  4691. if (heth == NULL)
  4692. 8002038: 2800 cmp r0, #0
  4693. 800203a: f000 8099 beq.w 8002170 <HAL_ETH_Init+0x138>
  4694. {
  4695. 800203e: b530 push {r4, r5, lr}
  4696. 8002040: b083 sub sp, #12
  4697. 8002042: 4604 mov r4, r0
  4698. if (heth->gState == HAL_ETH_STATE_RESET)
  4699. 8002044: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84
  4700. 8002048: b39b cbz r3, 80020b2 <HAL_ETH_Init+0x7a>
  4701. __HAL_RCC_SYSCFG_CLK_ENABLE();
  4702. 800204a: 4b4a ldr r3, [pc, #296] @ (8002174 <HAL_ETH_Init+0x13c>)
  4703. 800204c: f8d3 20f4 ldr.w r2, [r3, #244] @ 0xf4
  4704. 8002050: f042 0202 orr.w r2, r2, #2
  4705. 8002054: f8c3 20f4 str.w r2, [r3, #244] @ 0xf4
  4706. 8002058: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4
  4707. 800205c: f003 0302 and.w r3, r3, #2
  4708. 8002060: 9301 str r3, [sp, #4]
  4709. 8002062: 9b01 ldr r3, [sp, #4]
  4710. if (heth->Init.MediaInterface == HAL_ETH_MII_MODE)
  4711. 8002064: 7a23 ldrb r3, [r4, #8]
  4712. 8002066: bb53 cbnz r3, 80020be <HAL_ETH_Init+0x86>
  4713. HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_MII);
  4714. 8002068: 2000 movs r0, #0
  4715. 800206a: f7fe ff1b bl 8000ea4 <HAL_SYSCFG_ETHInterfaceSelect>
  4716. (void)SYSCFG->PMCR;
  4717. 800206e: 4b42 ldr r3, [pc, #264] @ (8002178 <HAL_ETH_Init+0x140>)
  4718. 8002070: 685b ldr r3, [r3, #4]
  4719. SET_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR);
  4720. 8002072: 6823 ldr r3, [r4, #0]
  4721. 8002074: f503 5380 add.w r3, r3, #4096 @ 0x1000
  4722. 8002078: 681a ldr r2, [r3, #0]
  4723. 800207a: f042 0201 orr.w r2, r2, #1
  4724. 800207e: 601a str r2, [r3, #0]
  4725. tickstart = HAL_GetTick();
  4726. 8002080: f7fe ff04 bl 8000e8c <HAL_GetTick>
  4727. 8002084: 4605 mov r5, r0
  4728. while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U)
  4729. 8002086: 6823 ldr r3, [r4, #0]
  4730. 8002088: f503 5380 add.w r3, r3, #4096 @ 0x1000
  4731. 800208c: 681b ldr r3, [r3, #0]
  4732. 800208e: f013 0f01 tst.w r3, #1
  4733. 8002092: d019 beq.n 80020c8 <HAL_ETH_Init+0x90>
  4734. if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT))
  4735. 8002094: f7fe fefa bl 8000e8c <HAL_GetTick>
  4736. 8002098: 1b40 subs r0, r0, r5
  4737. 800209a: f5b0 7ffa cmp.w r0, #500 @ 0x1f4
  4738. 800209e: d9f2 bls.n 8002086 <HAL_ETH_Init+0x4e>
  4739. heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT;
  4740. 80020a0: 2304 movs r3, #4
  4741. 80020a2: f8c4 3088 str.w r3, [r4, #136] @ 0x88
  4742. heth->gState = HAL_ETH_STATE_ERROR;
  4743. 80020a6: 23e0 movs r3, #224 @ 0xe0
  4744. 80020a8: f8c4 3084 str.w r3, [r4, #132] @ 0x84
  4745. return HAL_ERROR;
  4746. 80020ac: 2001 movs r0, #1
  4747. }
  4748. 80020ae: b003 add sp, #12
  4749. 80020b0: bd30 pop {r4, r5, pc}
  4750. heth->gState = HAL_ETH_STATE_BUSY;
  4751. 80020b2: 2323 movs r3, #35 @ 0x23
  4752. 80020b4: f8c0 3084 str.w r3, [r0, #132] @ 0x84
  4753. HAL_ETH_MspInit(heth);
  4754. 80020b8: f001 fade bl 8003678 <HAL_ETH_MspInit>
  4755. 80020bc: e7c5 b.n 800204a <HAL_ETH_Init+0x12>
  4756. HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_RMII);
  4757. 80020be: f44f 0000 mov.w r0, #8388608 @ 0x800000
  4758. 80020c2: f7fe feef bl 8000ea4 <HAL_SYSCFG_ETHInterfaceSelect>
  4759. 80020c6: e7d2 b.n 800206e <HAL_ETH_Init+0x36>
  4760. HAL_ETH_SetMDIOClockRange(heth);
  4761. 80020c8: 4620 mov r0, r4
  4762. 80020ca: f7ff ff79 bl 8001fc0 <HAL_ETH_SetMDIOClockRange>
  4763. WRITE_REG(heth->Instance->MAC1USTCR, (((uint32_t)HAL_RCC_GetHCLKFreq() / ETH_MAC_US_TICK) - 1U));
  4764. 80020ce: f000 ff4d bl 8002f6c <HAL_RCC_GetHCLKFreq>
  4765. 80020d2: 4b2a ldr r3, [pc, #168] @ (800217c <HAL_ETH_Init+0x144>)
  4766. 80020d4: fba3 2300 umull r2, r3, r3, r0
  4767. 80020d8: 0c9b lsrs r3, r3, #18
  4768. 80020da: 6822 ldr r2, [r4, #0]
  4769. 80020dc: 3b01 subs r3, #1
  4770. 80020de: f8c2 30dc str.w r3, [r2, #220] @ 0xdc
  4771. ETH_MACDMAConfig(heth);
  4772. 80020e2: 4620 mov r0, r4
  4773. 80020e4: f7ff f91e bl 8001324 <ETH_MACDMAConfig>
  4774. MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_DSL, ETH_DMACCR_DSL_64BIT);
  4775. 80020e8: 6822 ldr r2, [r4, #0]
  4776. 80020ea: f502 5280 add.w r2, r2, #4096 @ 0x1000
  4777. 80020ee: f8d2 3100 ldr.w r3, [r2, #256] @ 0x100
  4778. 80020f2: f423 13e0 bic.w r3, r3, #1835008 @ 0x1c0000
  4779. 80020f6: f443 2300 orr.w r3, r3, #524288 @ 0x80000
  4780. 80020fa: f8c2 3100 str.w r3, [r2, #256] @ 0x100
  4781. if ((heth->Init.RxBuffLen % 0x4U) != 0x0U)
  4782. 80020fe: 6962 ldr r2, [r4, #20]
  4783. 8002100: f012 0f03 tst.w r2, #3
  4784. 8002104: d006 beq.n 8002114 <HAL_ETH_Init+0xdc>
  4785. heth->ErrorCode = HAL_ETH_ERROR_PARAM;
  4786. 8002106: 2001 movs r0, #1
  4787. 8002108: f8c4 0088 str.w r0, [r4, #136] @ 0x88
  4788. heth->gState = HAL_ETH_STATE_ERROR;
  4789. 800210c: 23e0 movs r3, #224 @ 0xe0
  4790. 800210e: f8c4 3084 str.w r3, [r4, #132] @ 0x84
  4791. return HAL_ERROR;
  4792. 8002112: e7cc b.n 80020ae <HAL_ETH_Init+0x76>
  4793. MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_RBSZ, ((heth->Init.RxBuffLen) << 1));
  4794. 8002114: 6821 ldr r1, [r4, #0]
  4795. 8002116: f501 5180 add.w r1, r1, #4096 @ 0x1000
  4796. 800211a: f8d1 0108 ldr.w r0, [r1, #264] @ 0x108
  4797. 800211e: 4b18 ldr r3, [pc, #96] @ (8002180 <HAL_ETH_Init+0x148>)
  4798. 8002120: 4003 ands r3, r0
  4799. 8002122: ea43 0342 orr.w r3, r3, r2, lsl #1
  4800. 8002126: f8c1 3108 str.w r3, [r1, #264] @ 0x108
  4801. ETH_DMATxDescListInit(heth);
  4802. 800212a: 4620 mov r0, r4
  4803. 800212c: f7ff f968 bl 8001400 <ETH_DMATxDescListInit>
  4804. ETH_DMARxDescListInit(heth);
  4805. 8002130: 4620 mov r0, r4
  4806. 8002132: f7ff f992 bl 800145a <ETH_DMARxDescListInit>
  4807. heth->Instance->MACA0HR = (((uint32_t)(heth->Init.MACAddr[5]) << 8) | (uint32_t)heth->Init.MACAddr[4]);
  4808. 8002136: 6863 ldr r3, [r4, #4]
  4809. 8002138: 7959 ldrb r1, [r3, #5]
  4810. 800213a: 791b ldrb r3, [r3, #4]
  4811. 800213c: 6822 ldr r2, [r4, #0]
  4812. 800213e: ea43 2301 orr.w r3, r3, r1, lsl #8
  4813. 8002142: f8c2 3300 str.w r3, [r2, #768] @ 0x300
  4814. heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) |
  4815. 8002146: 6862 ldr r2, [r4, #4]
  4816. 8002148: 78d1 ldrb r1, [r2, #3]
  4817. 800214a: 7893 ldrb r3, [r2, #2]
  4818. 800214c: 041b lsls r3, r3, #16
  4819. 800214e: ea43 6301 orr.w r3, r3, r1, lsl #24
  4820. ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]);
  4821. 8002152: 7851 ldrb r1, [r2, #1]
  4822. heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) |
  4823. 8002154: ea43 2301 orr.w r3, r3, r1, lsl #8
  4824. ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]);
  4825. 8002158: 7811 ldrb r1, [r2, #0]
  4826. heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) |
  4827. 800215a: 6822 ldr r2, [r4, #0]
  4828. ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]);
  4829. 800215c: 430b orrs r3, r1
  4830. heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) |
  4831. 800215e: f8c2 3304 str.w r3, [r2, #772] @ 0x304
  4832. heth->ErrorCode = HAL_ETH_ERROR_NONE;
  4833. 8002162: 2000 movs r0, #0
  4834. 8002164: f8c4 0088 str.w r0, [r4, #136] @ 0x88
  4835. heth->gState = HAL_ETH_STATE_READY;
  4836. 8002168: 2310 movs r3, #16
  4837. 800216a: f8c4 3084 str.w r3, [r4, #132] @ 0x84
  4838. return HAL_OK;
  4839. 800216e: e79e b.n 80020ae <HAL_ETH_Init+0x76>
  4840. return HAL_ERROR;
  4841. 8002170: 2001 movs r0, #1
  4842. }
  4843. 8002172: 4770 bx lr
  4844. 8002174: 58024400 .word 0x58024400
  4845. 8002178: 58000400 .word 0x58000400
  4846. 800217c: 431bde83 .word 0x431bde83
  4847. 8002180: ffff8001 .word 0xffff8001
  4848. 08002184 <HAL_ETH_GetDMAError>:
  4849. return heth->DMAErrorCode;
  4850. 8002184: f8d0 008c ldr.w r0, [r0, #140] @ 0x8c
  4851. }
  4852. 8002188: 4770 bx lr
  4853. ...
  4854. 0800218c <HAL_GPIO_Init>:
  4855. * @param GPIO_Init: pointer to a GPIO_InitTypeDef structure that contains
  4856. * the configuration information for the specified GPIO peripheral.
  4857. * @retval None
  4858. */
  4859. void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
  4860. {
  4861. 800218c: b5f0 push {r4, r5, r6, r7, lr}
  4862. 800218e: b083 sub sp, #12
  4863. uint32_t position = 0x00U;
  4864. 8002190: 2300 movs r3, #0
  4865. assert_param(IS_GPIO_ALL_INSTANCE(GPIOx));
  4866. assert_param(IS_GPIO_PIN(GPIO_Init->Pin));
  4867. assert_param(IS_GPIO_MODE(GPIO_Init->Mode));
  4868. /* Configure the port pins */
  4869. while (((GPIO_Init->Pin) >> position) != 0x00U)
  4870. 8002192: e06b b.n 800226c <HAL_GPIO_Init+0xe0>
  4871. {
  4872. /* Check the Speed parameter */
  4873. assert_param(IS_GPIO_SPEED(GPIO_Init->Speed));
  4874. /* Configure the IO Speed */
  4875. temp = GPIOx->OSPEEDR;
  4876. 8002194: 6885 ldr r5, [r0, #8]
  4877. temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2U));
  4878. 8002196: 005e lsls r6, r3, #1
  4879. 8002198: 2403 movs r4, #3
  4880. 800219a: 40b4 lsls r4, r6
  4881. 800219c: ea25 0504 bic.w r5, r5, r4
  4882. temp |= (GPIO_Init->Speed << (position * 2U));
  4883. 80021a0: 68cc ldr r4, [r1, #12]
  4884. 80021a2: 40b4 lsls r4, r6
  4885. 80021a4: 432c orrs r4, r5
  4886. GPIOx->OSPEEDR = temp;
  4887. 80021a6: 6084 str r4, [r0, #8]
  4888. /* Configure the IO Output Type */
  4889. temp = GPIOx->OTYPER;
  4890. 80021a8: 6845 ldr r5, [r0, #4]
  4891. temp &= ~(GPIO_OTYPER_OT0 << position) ;
  4892. 80021aa: ea25 050c bic.w r5, r5, ip
  4893. temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position);
  4894. 80021ae: 684c ldr r4, [r1, #4]
  4895. 80021b0: f3c4 1400 ubfx r4, r4, #4, #1
  4896. 80021b4: 409c lsls r4, r3
  4897. 80021b6: 432c orrs r4, r5
  4898. GPIOx->OTYPER = temp;
  4899. 80021b8: 6044 str r4, [r0, #4]
  4900. 80021ba: e069 b.n 8002290 <HAL_GPIO_Init+0x104>
  4901. /* Check the Alternate function parameters */
  4902. assert_param(IS_GPIO_AF_INSTANCE(GPIOx));
  4903. assert_param(IS_GPIO_AF(GPIO_Init->Alternate));
  4904. /* Configure Alternate function mapped with the current IO */
  4905. temp = GPIOx->AFR[position >> 3U];
  4906. 80021bc: 08dd lsrs r5, r3, #3
  4907. 80021be: 3508 adds r5, #8
  4908. 80021c0: f850 4025 ldr.w r4, [r0, r5, lsl #2]
  4909. temp &= ~(0xFU << ((position & 0x07U) * 4U));
  4910. 80021c4: f003 0c07 and.w ip, r3, #7
  4911. 80021c8: ea4f 0c8c mov.w ip, ip, lsl #2
  4912. 80021cc: f04f 0e0f mov.w lr, #15
  4913. 80021d0: fa0e fe0c lsl.w lr, lr, ip
  4914. 80021d4: ea24 0e0e bic.w lr, r4, lr
  4915. temp |= ((GPIO_Init->Alternate) << ((position & 0x07U) * 4U));
  4916. 80021d8: 690c ldr r4, [r1, #16]
  4917. 80021da: fa04 f40c lsl.w r4, r4, ip
  4918. 80021de: ea44 040e orr.w r4, r4, lr
  4919. GPIOx->AFR[position >> 3U] = temp;
  4920. 80021e2: f840 4025 str.w r4, [r0, r5, lsl #2]
  4921. 80021e6: e06b b.n 80022c0 <HAL_GPIO_Init+0x134>
  4922. /* Enable SYSCFG Clock */
  4923. __HAL_RCC_SYSCFG_CLK_ENABLE();
  4924. temp = SYSCFG->EXTICR[position >> 2U];
  4925. temp &= ~(0x0FUL << (4U * (position & 0x03U)));
  4926. temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U)));
  4927. 80021e8: 2409 movs r4, #9
  4928. 80021ea: e000 b.n 80021ee <HAL_GPIO_Init+0x62>
  4929. 80021ec: 2400 movs r4, #0
  4930. 80021ee: fa04 f40e lsl.w r4, r4, lr
  4931. 80021f2: 432c orrs r4, r5
  4932. SYSCFG->EXTICR[position >> 2U] = temp;
  4933. 80021f4: f10c 0c02 add.w ip, ip, #2
  4934. 80021f8: 4d69 ldr r5, [pc, #420] @ (80023a0 <HAL_GPIO_Init+0x214>)
  4935. 80021fa: f845 402c str.w r4, [r5, ip, lsl #2]
  4936. /* Clear Rising Falling edge configuration */
  4937. temp = EXTI->RTSR1;
  4938. 80021fe: f04f 44b0 mov.w r4, #1476395008 @ 0x58000000
  4939. 8002202: 6825 ldr r5, [r4, #0]
  4940. temp &= ~(iocurrent);
  4941. 8002204: 43d4 mvns r4, r2
  4942. 8002206: ea25 0602 bic.w r6, r5, r2
  4943. if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U)
  4944. 800220a: 684f ldr r7, [r1, #4]
  4945. 800220c: f417 1f80 tst.w r7, #1048576 @ 0x100000
  4946. 8002210: d001 beq.n 8002216 <HAL_GPIO_Init+0x8a>
  4947. {
  4948. temp |= iocurrent;
  4949. 8002212: ea42 0605 orr.w r6, r2, r5
  4950. }
  4951. EXTI->RTSR1 = temp;
  4952. 8002216: f04f 45b0 mov.w r5, #1476395008 @ 0x58000000
  4953. 800221a: 602e str r6, [r5, #0]
  4954. temp = EXTI->FTSR1;
  4955. 800221c: 686d ldr r5, [r5, #4]
  4956. temp &= ~(iocurrent);
  4957. 800221e: ea04 0605 and.w r6, r4, r5
  4958. if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U)
  4959. 8002222: 684f ldr r7, [r1, #4]
  4960. 8002224: f417 1f00 tst.w r7, #2097152 @ 0x200000
  4961. 8002228: d001 beq.n 800222e <HAL_GPIO_Init+0xa2>
  4962. {
  4963. temp |= iocurrent;
  4964. 800222a: ea42 0605 orr.w r6, r2, r5
  4965. }
  4966. EXTI->FTSR1 = temp;
  4967. 800222e: f04f 45b0 mov.w r5, #1476395008 @ 0x58000000
  4968. 8002232: 606e str r6, [r5, #4]
  4969. temp = EXTI_CurrentCPU->EMR1;
  4970. 8002234: f8d5 5084 ldr.w r5, [r5, #132] @ 0x84
  4971. temp &= ~(iocurrent);
  4972. 8002238: ea04 0605 and.w r6, r4, r5
  4973. if ((GPIO_Init->Mode & EXTI_EVT) != 0x00U)
  4974. 800223c: 684f ldr r7, [r1, #4]
  4975. 800223e: f417 3f00 tst.w r7, #131072 @ 0x20000
  4976. 8002242: d001 beq.n 8002248 <HAL_GPIO_Init+0xbc>
  4977. {
  4978. temp |= iocurrent;
  4979. 8002244: ea42 0605 orr.w r6, r2, r5
  4980. }
  4981. EXTI_CurrentCPU->EMR1 = temp;
  4982. 8002248: f04f 45b0 mov.w r5, #1476395008 @ 0x58000000
  4983. 800224c: f8c5 6084 str.w r6, [r5, #132] @ 0x84
  4984. /* Clear EXTI line configuration */
  4985. temp = EXTI_CurrentCPU->IMR1;
  4986. 8002250: f8d5 5080 ldr.w r5, [r5, #128] @ 0x80
  4987. temp &= ~(iocurrent);
  4988. 8002254: 402c ands r4, r5
  4989. if ((GPIO_Init->Mode & EXTI_IT) != 0x00U)
  4990. 8002256: 684e ldr r6, [r1, #4]
  4991. 8002258: f416 3f80 tst.w r6, #65536 @ 0x10000
  4992. 800225c: d001 beq.n 8002262 <HAL_GPIO_Init+0xd6>
  4993. {
  4994. temp |= iocurrent;
  4995. 800225e: ea42 0405 orr.w r4, r2, r5
  4996. }
  4997. EXTI_CurrentCPU->IMR1 = temp;
  4998. 8002262: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000
  4999. 8002266: f8c2 4080 str.w r4, [r2, #128] @ 0x80
  5000. }
  5001. }
  5002. position++;
  5003. 800226a: 3301 adds r3, #1
  5004. while (((GPIO_Init->Pin) >> position) != 0x00U)
  5005. 800226c: 680a ldr r2, [r1, #0]
  5006. 800226e: fa32 f403 lsrs.w r4, r2, r3
  5007. 8002272: f000 8092 beq.w 800239a <HAL_GPIO_Init+0x20e>
  5008. iocurrent = (GPIO_Init->Pin) & (1UL << position);
  5009. 8002276: f04f 0c01 mov.w ip, #1
  5010. 800227a: fa0c fc03 lsl.w ip, ip, r3
  5011. if (iocurrent != 0x00U)
  5012. 800227e: ea1c 0202 ands.w r2, ip, r2
  5013. 8002282: d0f2 beq.n 800226a <HAL_GPIO_Init+0xde>
  5014. if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF))
  5015. 8002284: 684c ldr r4, [r1, #4]
  5016. 8002286: f004 0403 and.w r4, r4, #3
  5017. 800228a: 3c01 subs r4, #1
  5018. 800228c: 2c01 cmp r4, #1
  5019. 800228e: d981 bls.n 8002194 <HAL_GPIO_Init+0x8>
  5020. if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG)
  5021. 8002290: 684c ldr r4, [r1, #4]
  5022. 8002292: f004 0403 and.w r4, r4, #3
  5023. 8002296: 2c03 cmp r4, #3
  5024. 8002298: d00c beq.n 80022b4 <HAL_GPIO_Init+0x128>
  5025. temp = GPIOx->PUPDR;
  5026. 800229a: 68c4 ldr r4, [r0, #12]
  5027. temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U));
  5028. 800229c: 005d lsls r5, r3, #1
  5029. 800229e: f04f 0c03 mov.w ip, #3
  5030. 80022a2: fa0c fc05 lsl.w ip, ip, r5
  5031. 80022a6: ea24 0c0c bic.w ip, r4, ip
  5032. temp |= ((GPIO_Init->Pull) << (position * 2U));
  5033. 80022aa: 688c ldr r4, [r1, #8]
  5034. 80022ac: 40ac lsls r4, r5
  5035. 80022ae: ea44 040c orr.w r4, r4, ip
  5036. GPIOx->PUPDR = temp;
  5037. 80022b2: 60c4 str r4, [r0, #12]
  5038. if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)
  5039. 80022b4: 684c ldr r4, [r1, #4]
  5040. 80022b6: f004 0403 and.w r4, r4, #3
  5041. 80022ba: 2c02 cmp r4, #2
  5042. 80022bc: f43f af7e beq.w 80021bc <HAL_GPIO_Init+0x30>
  5043. temp = GPIOx->MODER;
  5044. 80022c0: 6804 ldr r4, [r0, #0]
  5045. temp &= ~(GPIO_MODER_MODE0 << (position * 2U));
  5046. 80022c2: ea4f 0e43 mov.w lr, r3, lsl #1
  5047. 80022c6: f04f 0c03 mov.w ip, #3
  5048. 80022ca: fa0c fc0e lsl.w ip, ip, lr
  5049. 80022ce: ea24 0c0c bic.w ip, r4, ip
  5050. temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U));
  5051. 80022d2: 684c ldr r4, [r1, #4]
  5052. 80022d4: f004 0403 and.w r4, r4, #3
  5053. 80022d8: fa04 f40e lsl.w r4, r4, lr
  5054. 80022dc: ea44 040c orr.w r4, r4, ip
  5055. GPIOx->MODER = temp;
  5056. 80022e0: 6004 str r4, [r0, #0]
  5057. if ((GPIO_Init->Mode & EXTI_MODE) != 0x00U)
  5058. 80022e2: 684c ldr r4, [r1, #4]
  5059. 80022e4: f414 3f40 tst.w r4, #196608 @ 0x30000
  5060. 80022e8: d0bf beq.n 800226a <HAL_GPIO_Init+0xde>
  5061. __HAL_RCC_SYSCFG_CLK_ENABLE();
  5062. 80022ea: 4c2e ldr r4, [pc, #184] @ (80023a4 <HAL_GPIO_Init+0x218>)
  5063. 80022ec: f8d4 50f4 ldr.w r5, [r4, #244] @ 0xf4
  5064. 80022f0: f045 0502 orr.w r5, r5, #2
  5065. 80022f4: f8c4 50f4 str.w r5, [r4, #244] @ 0xf4
  5066. 80022f8: f8d4 40f4 ldr.w r4, [r4, #244] @ 0xf4
  5067. 80022fc: f004 0402 and.w r4, r4, #2
  5068. 8002300: 9401 str r4, [sp, #4]
  5069. 8002302: 9c01 ldr r4, [sp, #4]
  5070. temp = SYSCFG->EXTICR[position >> 2U];
  5071. 8002304: ea4f 0c93 mov.w ip, r3, lsr #2
  5072. 8002308: f10c 0502 add.w r5, ip, #2
  5073. 800230c: 4c24 ldr r4, [pc, #144] @ (80023a0 <HAL_GPIO_Init+0x214>)
  5074. 800230e: f854 5025 ldr.w r5, [r4, r5, lsl #2]
  5075. temp &= ~(0x0FUL << (4U * (position & 0x03U)));
  5076. 8002312: f003 0e03 and.w lr, r3, #3
  5077. 8002316: ea4f 0e8e mov.w lr, lr, lsl #2
  5078. 800231a: 240f movs r4, #15
  5079. 800231c: fa04 f40e lsl.w r4, r4, lr
  5080. 8002320: ea25 0504 bic.w r5, r5, r4
  5081. temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U)));
  5082. 8002324: 4c20 ldr r4, [pc, #128] @ (80023a8 <HAL_GPIO_Init+0x21c>)
  5083. 8002326: 42a0 cmp r0, r4
  5084. 8002328: f43f af60 beq.w 80021ec <HAL_GPIO_Init+0x60>
  5085. 800232c: f504 6480 add.w r4, r4, #1024 @ 0x400
  5086. 8002330: 42a0 cmp r0, r4
  5087. 8002332: d022 beq.n 800237a <HAL_GPIO_Init+0x1ee>
  5088. 8002334: f504 6480 add.w r4, r4, #1024 @ 0x400
  5089. 8002338: 42a0 cmp r0, r4
  5090. 800233a: d020 beq.n 800237e <HAL_GPIO_Init+0x1f2>
  5091. 800233c: f504 6480 add.w r4, r4, #1024 @ 0x400
  5092. 8002340: 42a0 cmp r0, r4
  5093. 8002342: d01e beq.n 8002382 <HAL_GPIO_Init+0x1f6>
  5094. 8002344: f504 6480 add.w r4, r4, #1024 @ 0x400
  5095. 8002348: 42a0 cmp r0, r4
  5096. 800234a: d01c beq.n 8002386 <HAL_GPIO_Init+0x1fa>
  5097. 800234c: f504 6480 add.w r4, r4, #1024 @ 0x400
  5098. 8002350: 42a0 cmp r0, r4
  5099. 8002352: d01a beq.n 800238a <HAL_GPIO_Init+0x1fe>
  5100. 8002354: f504 6480 add.w r4, r4, #1024 @ 0x400
  5101. 8002358: 42a0 cmp r0, r4
  5102. 800235a: d018 beq.n 800238e <HAL_GPIO_Init+0x202>
  5103. 800235c: f504 6480 add.w r4, r4, #1024 @ 0x400
  5104. 8002360: 42a0 cmp r0, r4
  5105. 8002362: d016 beq.n 8002392 <HAL_GPIO_Init+0x206>
  5106. 8002364: f504 6480 add.w r4, r4, #1024 @ 0x400
  5107. 8002368: 42a0 cmp r0, r4
  5108. 800236a: d014 beq.n 8002396 <HAL_GPIO_Init+0x20a>
  5109. 800236c: f504 6480 add.w r4, r4, #1024 @ 0x400
  5110. 8002370: 42a0 cmp r0, r4
  5111. 8002372: f43f af39 beq.w 80021e8 <HAL_GPIO_Init+0x5c>
  5112. 8002376: 240a movs r4, #10
  5113. 8002378: e739 b.n 80021ee <HAL_GPIO_Init+0x62>
  5114. 800237a: 2401 movs r4, #1
  5115. 800237c: e737 b.n 80021ee <HAL_GPIO_Init+0x62>
  5116. 800237e: 2402 movs r4, #2
  5117. 8002380: e735 b.n 80021ee <HAL_GPIO_Init+0x62>
  5118. 8002382: 2403 movs r4, #3
  5119. 8002384: e733 b.n 80021ee <HAL_GPIO_Init+0x62>
  5120. 8002386: 2404 movs r4, #4
  5121. 8002388: e731 b.n 80021ee <HAL_GPIO_Init+0x62>
  5122. 800238a: 2405 movs r4, #5
  5123. 800238c: e72f b.n 80021ee <HAL_GPIO_Init+0x62>
  5124. 800238e: 2406 movs r4, #6
  5125. 8002390: e72d b.n 80021ee <HAL_GPIO_Init+0x62>
  5126. 8002392: 2407 movs r4, #7
  5127. 8002394: e72b b.n 80021ee <HAL_GPIO_Init+0x62>
  5128. 8002396: 2408 movs r4, #8
  5129. 8002398: e729 b.n 80021ee <HAL_GPIO_Init+0x62>
  5130. }
  5131. }
  5132. 800239a: b003 add sp, #12
  5133. 800239c: bdf0 pop {r4, r5, r6, r7, pc}
  5134. 800239e: bf00 nop
  5135. 80023a0: 58000400 .word 0x58000400
  5136. 80023a4: 58024400 .word 0x58024400
  5137. 80023a8: 58020000 .word 0x58020000
  5138. 080023ac <HAL_HSEM_FastTake>:
  5139. /*take success when MasterID match and take bit set*/
  5140. return HAL_OK;
  5141. }
  5142. #else
  5143. /* Read the RLR register to take the semaphore */
  5144. if (HSEM->RLR[SemID] == (HSEM_CR_COREID_CURRENT | HSEM_RLR_LOCK))
  5145. 80023ac: 3020 adds r0, #32
  5146. 80023ae: 4b05 ldr r3, [pc, #20] @ (80023c4 <HAL_HSEM_FastTake+0x18>)
  5147. 80023b0: f853 2020 ldr.w r2, [r3, r0, lsl #2]
  5148. 80023b4: 4b04 ldr r3, [pc, #16] @ (80023c8 <HAL_HSEM_FastTake+0x1c>)
  5149. 80023b6: 429a cmp r2, r3
  5150. 80023b8: d001 beq.n 80023be <HAL_HSEM_FastTake+0x12>
  5151. return HAL_OK;
  5152. }
  5153. #endif
  5154. /* Semaphore take fails */
  5155. return HAL_ERROR;
  5156. 80023ba: 2001 movs r0, #1
  5157. 80023bc: 4770 bx lr
  5158. return HAL_OK;
  5159. 80023be: 2000 movs r0, #0
  5160. }
  5161. 80023c0: 4770 bx lr
  5162. 80023c2: bf00 nop
  5163. 80023c4: 58026400 .word 0x58026400
  5164. 80023c8: 80000300 .word 0x80000300
  5165. 080023cc <HAL_HSEM_Release>:
  5166. /* Clear the semaphore by writing to the R register : the MasterID , the processID and take bit = 0 */
  5167. #if USE_MULTI_CORE_SHARED_CODE != 0U
  5168. HSEM->R[SemID] = (ProcessID | ((HAL_GetCurrentCPUID() << POSITION_VAL(HSEM_R_MASTERID)) & HSEM_R_MASTERID));
  5169. #else
  5170. HSEM->R[SemID] = (ProcessID | HSEM_CR_COREID_CURRENT);
  5171. 80023cc: f441 7140 orr.w r1, r1, #768 @ 0x300
  5172. 80023d0: 4b01 ldr r3, [pc, #4] @ (80023d8 <HAL_HSEM_Release+0xc>)
  5173. 80023d2: f843 1020 str.w r1, [r3, r0, lsl #2]
  5174. #endif
  5175. }
  5176. 80023d6: 4770 bx lr
  5177. 80023d8: 58026400 .word 0x58026400
  5178. 080023dc <HAL_PWREx_ConfigSupply>:
  5179. * PWR_SMPS_2V5_SUPPLIES_EXT are used only for lines that supports SMPS
  5180. * regulator.
  5181. * @retval HAL status.
  5182. */
  5183. HAL_StatusTypeDef HAL_PWREx_ConfigSupply (uint32_t SupplySource)
  5184. {
  5185. 80023dc: b538 push {r3, r4, r5, lr}
  5186. 80023de: 4604 mov r4, r0
  5187. /* Check if supply source was configured */
  5188. #if defined (PWR_FLAG_SCUEN)
  5189. if (__HAL_PWR_GET_FLAG (PWR_FLAG_SCUEN) == 0U)
  5190. #else
  5191. if ((PWR->CR3 & (PWR_CR3_SMPSEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS)) != (PWR_CR3_SMPSEN | PWR_CR3_LDOEN))
  5192. 80023e0: 4b22 ldr r3, [pc, #136] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
  5193. 80023e2: 68db ldr r3, [r3, #12]
  5194. 80023e4: f003 0307 and.w r3, r3, #7
  5195. 80023e8: 2b06 cmp r3, #6
  5196. 80023ea: d007 beq.n 80023fc <HAL_PWREx_ConfigSupply+0x20>
  5197. #endif /* defined (PWR_FLAG_SCUEN) */
  5198. {
  5199. /* Check supply configuration */
  5200. if ((PWR->CR3 & PWR_SUPPLY_CONFIG_MASK) != SupplySource)
  5201. 80023ec: 4b1f ldr r3, [pc, #124] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
  5202. 80023ee: 68db ldr r3, [r3, #12]
  5203. 80023f0: f003 033f and.w r3, r3, #63 @ 0x3f
  5204. 80023f4: 4283 cmp r3, r0
  5205. 80023f6: d036 beq.n 8002466 <HAL_PWREx_ConfigSupply+0x8a>
  5206. {
  5207. /* Supply configuration update locked, can't apply a new supply config */
  5208. return HAL_ERROR;
  5209. 80023f8: 2001 movs r0, #1
  5210. }
  5211. }
  5212. #endif /* defined (SMPS) */
  5213. return HAL_OK;
  5214. }
  5215. 80023fa: bd38 pop {r3, r4, r5, pc}
  5216. MODIFY_REG (PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource);
  5217. 80023fc: 4a1b ldr r2, [pc, #108] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
  5218. 80023fe: 68d3 ldr r3, [r2, #12]
  5219. 8002400: f023 033f bic.w r3, r3, #63 @ 0x3f
  5220. 8002404: 4303 orrs r3, r0
  5221. 8002406: 60d3 str r3, [r2, #12]
  5222. tickstart = HAL_GetTick ();
  5223. 8002408: f7fe fd40 bl 8000e8c <HAL_GetTick>
  5224. 800240c: 4605 mov r5, r0
  5225. while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U)
  5226. 800240e: 4b17 ldr r3, [pc, #92] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
  5227. 8002410: 685b ldr r3, [r3, #4]
  5228. 8002412: f413 5f00 tst.w r3, #8192 @ 0x2000
  5229. 8002416: d107 bne.n 8002428 <HAL_PWREx_ConfigSupply+0x4c>
  5230. if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY)
  5231. 8002418: f7fe fd38 bl 8000e8c <HAL_GetTick>
  5232. 800241c: 1b43 subs r3, r0, r5
  5233. 800241e: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8
  5234. 8002422: d9f4 bls.n 800240e <HAL_PWREx_ConfigSupply+0x32>
  5235. return HAL_ERROR;
  5236. 8002424: 2001 movs r0, #1
  5237. 8002426: e7e8 b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
  5238. if ((SupplySource == PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO) ||
  5239. 8002428: 2c2e cmp r4, #46 @ 0x2e
  5240. 800242a: bf18 it ne
  5241. 800242c: 2c1e cmpne r4, #30
  5242. 800242e: d008 beq.n 8002442 <HAL_PWREx_ConfigSupply+0x66>
  5243. (SupplySource == PWR_SMPS_2V5_SUPPLIES_EXT))
  5244. 8002430: 2c2d cmp r4, #45 @ 0x2d
  5245. 8002432: bf14 ite ne
  5246. 8002434: 2300 movne r3, #0
  5247. 8002436: 2301 moveq r3, #1
  5248. (SupplySource == PWR_SMPS_1V8_SUPPLIES_EXT) ||
  5249. 8002438: 2c1d cmp r4, #29
  5250. 800243a: d002 beq.n 8002442 <HAL_PWREx_ConfigSupply+0x66>
  5251. 800243c: b90b cbnz r3, 8002442 <HAL_PWREx_ConfigSupply+0x66>
  5252. return HAL_OK;
  5253. 800243e: 2000 movs r0, #0
  5254. 8002440: e7db b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
  5255. tickstart = HAL_GetTick ();
  5256. 8002442: f7fe fd23 bl 8000e8c <HAL_GetTick>
  5257. 8002446: 4604 mov r4, r0
  5258. while (__HAL_PWR_GET_FLAG (PWR_FLAG_SMPSEXTRDY) == 0U)
  5259. 8002448: 4b08 ldr r3, [pc, #32] @ (800246c <HAL_PWREx_ConfigSupply+0x90>)
  5260. 800244a: 68db ldr r3, [r3, #12]
  5261. 800244c: f413 3f80 tst.w r3, #65536 @ 0x10000
  5262. 8002450: d107 bne.n 8002462 <HAL_PWREx_ConfigSupply+0x86>
  5263. if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY)
  5264. 8002452: f7fe fd1b bl 8000e8c <HAL_GetTick>
  5265. 8002456: 1b00 subs r0, r0, r4
  5266. 8002458: f5b0 7f7a cmp.w r0, #1000 @ 0x3e8
  5267. 800245c: d9f4 bls.n 8002448 <HAL_PWREx_ConfigSupply+0x6c>
  5268. return HAL_ERROR;
  5269. 800245e: 2001 movs r0, #1
  5270. 8002460: e7cb b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
  5271. return HAL_OK;
  5272. 8002462: 2000 movs r0, #0
  5273. 8002464: e7c9 b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
  5274. return HAL_OK;
  5275. 8002466: 2000 movs r0, #0
  5276. 8002468: e7c7 b.n 80023fa <HAL_PWREx_ConfigSupply+0x1e>
  5277. 800246a: bf00 nop
  5278. 800246c: 58024800 .word 0x58024800
  5279. 08002470 <HAL_RCC_OscConfig>:
  5280. {
  5281. uint32_t tickstart;
  5282. uint32_t temp1_pllckcfg, temp2_pllckcfg;
  5283. /* Check Null pointer */
  5284. if(RCC_OscInitStruct == NULL)
  5285. 8002470: 2800 cmp r0, #0
  5286. 8002472: f000 8318 beq.w 8002aa6 <HAL_RCC_OscConfig+0x636>
  5287. {
  5288. 8002476: b538 push {r3, r4, r5, lr}
  5289. 8002478: 4604 mov r4, r0
  5290. }
  5291. /* Check the parameters */
  5292. assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType));
  5293. /*------------------------------- HSE Configuration ------------------------*/
  5294. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE)
  5295. 800247a: 6803 ldr r3, [r0, #0]
  5296. 800247c: f013 0f01 tst.w r3, #1
  5297. 8002480: d025 beq.n 80024ce <HAL_RCC_OscConfig+0x5e>
  5298. {
  5299. /* Check the parameters */
  5300. assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState));
  5301. const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE();
  5302. 8002482: 4a94 ldr r2, [pc, #592] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5303. 8002484: 6913 ldr r3, [r2, #16]
  5304. 8002486: f003 0338 and.w r3, r3, #56 @ 0x38
  5305. const uint32_t temp_pllckselr = RCC->PLLCKSELR;
  5306. 800248a: 6a92 ldr r2, [r2, #40] @ 0x28
  5307. /* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */
  5308. if((temp_sysclksrc == RCC_CFGR_SWS_HSE) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSE)))
  5309. 800248c: 2b10 cmp r3, #16
  5310. 800248e: d015 beq.n 80024bc <HAL_RCC_OscConfig+0x4c>
  5311. 8002490: 2b18 cmp r3, #24
  5312. 8002492: d00f beq.n 80024b4 <HAL_RCC_OscConfig+0x44>
  5313. }
  5314. }
  5315. else
  5316. {
  5317. /* Set the new HSE configuration ---------------------------------------*/
  5318. __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
  5319. 8002494: 6863 ldr r3, [r4, #4]
  5320. 8002496: f5b3 3f80 cmp.w r3, #65536 @ 0x10000
  5321. 800249a: d03f beq.n 800251c <HAL_RCC_OscConfig+0xac>
  5322. 800249c: 2b00 cmp r3, #0
  5323. 800249e: d153 bne.n 8002548 <HAL_RCC_OscConfig+0xd8>
  5324. 80024a0: 4b8c ldr r3, [pc, #560] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5325. 80024a2: 681a ldr r2, [r3, #0]
  5326. 80024a4: f422 3280 bic.w r2, r2, #65536 @ 0x10000
  5327. 80024a8: 601a str r2, [r3, #0]
  5328. 80024aa: 681a ldr r2, [r3, #0]
  5329. 80024ac: f422 2280 bic.w r2, r2, #262144 @ 0x40000
  5330. 80024b0: 601a str r2, [r3, #0]
  5331. 80024b2: e038 b.n 8002526 <HAL_RCC_OscConfig+0xb6>
  5332. if((temp_sysclksrc == RCC_CFGR_SWS_HSE) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSE)))
  5333. 80024b4: f002 0203 and.w r2, r2, #3
  5334. 80024b8: 2a02 cmp r2, #2
  5335. 80024ba: d1eb bne.n 8002494 <HAL_RCC_OscConfig+0x24>
  5336. if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF))
  5337. 80024bc: 4b85 ldr r3, [pc, #532] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5338. 80024be: 681b ldr r3, [r3, #0]
  5339. 80024c0: f413 3f00 tst.w r3, #131072 @ 0x20000
  5340. 80024c4: d003 beq.n 80024ce <HAL_RCC_OscConfig+0x5e>
  5341. 80024c6: 6863 ldr r3, [r4, #4]
  5342. 80024c8: 2b00 cmp r3, #0
  5343. 80024ca: f000 82ee beq.w 8002aaa <HAL_RCC_OscConfig+0x63a>
  5344. }
  5345. }
  5346. }
  5347. }
  5348. /*----------------------------- HSI Configuration --------------------------*/
  5349. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI)
  5350. 80024ce: 6823 ldr r3, [r4, #0]
  5351. 80024d0: f013 0f02 tst.w r3, #2
  5352. 80024d4: f000 80a1 beq.w 800261a <HAL_RCC_OscConfig+0x1aa>
  5353. /* Check the parameters */
  5354. assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState));
  5355. assert_param(IS_RCC_HSICALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue));
  5356. /* When the HSI is used as system clock it will not be disabled */
  5357. const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE();
  5358. 80024d8: 4a7e ldr r2, [pc, #504] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5359. 80024da: 6913 ldr r3, [r2, #16]
  5360. const uint32_t temp_pllckselr = RCC->PLLCKSELR;
  5361. 80024dc: 6a92 ldr r2, [r2, #40] @ 0x28
  5362. if((temp_sysclksrc == RCC_CFGR_SWS_HSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSI)))
  5363. 80024de: f013 0338 ands.w r3, r3, #56 @ 0x38
  5364. 80024e2: d05a beq.n 800259a <HAL_RCC_OscConfig+0x12a>
  5365. 80024e4: 2b18 cmp r3, #24
  5366. 80024e6: d055 beq.n 8002594 <HAL_RCC_OscConfig+0x124>
  5367. }
  5368. else
  5369. {
  5370. /* Check the HSI State */
  5371. if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF)
  5372. 80024e8: 68e3 ldr r3, [r4, #12]
  5373. 80024ea: 2b00 cmp r3, #0
  5374. 80024ec: f000 80de beq.w 80026ac <HAL_RCC_OscConfig+0x23c>
  5375. {
  5376. /* Enable the Internal High Speed oscillator (HSI, HSIDIV2,HSIDIV4, or HSIDIV8) */
  5377. __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState);
  5378. 80024f0: 4978 ldr r1, [pc, #480] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5379. 80024f2: 680a ldr r2, [r1, #0]
  5380. 80024f4: f022 0219 bic.w r2, r2, #25
  5381. 80024f8: 4313 orrs r3, r2
  5382. 80024fa: 600b str r3, [r1, #0]
  5383. /* Get Start Tick*/
  5384. tickstart = HAL_GetTick();
  5385. 80024fc: f7fe fcc6 bl 8000e8c <HAL_GetTick>
  5386. 8002500: 4605 mov r5, r0
  5387. /* Wait till HSI is ready */
  5388. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
  5389. 8002502: 4b74 ldr r3, [pc, #464] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5390. 8002504: 681b ldr r3, [r3, #0]
  5391. 8002506: f013 0f04 tst.w r3, #4
  5392. 800250a: f040 80ad bne.w 8002668 <HAL_RCC_OscConfig+0x1f8>
  5393. {
  5394. if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
  5395. 800250e: f7fe fcbd bl 8000e8c <HAL_GetTick>
  5396. 8002512: 1b40 subs r0, r0, r5
  5397. 8002514: 2802 cmp r0, #2
  5398. 8002516: d9f4 bls.n 8002502 <HAL_RCC_OscConfig+0x92>
  5399. {
  5400. return HAL_TIMEOUT;
  5401. 8002518: 2003 movs r0, #3
  5402. 800251a: e2cd b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5403. __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
  5404. 800251c: 4a6d ldr r2, [pc, #436] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5405. 800251e: 6813 ldr r3, [r2, #0]
  5406. 8002520: f443 3380 orr.w r3, r3, #65536 @ 0x10000
  5407. 8002524: 6013 str r3, [r2, #0]
  5408. if(RCC_OscInitStruct->HSEState != RCC_HSE_OFF)
  5409. 8002526: 6863 ldr r3, [r4, #4]
  5410. 8002528: b32b cbz r3, 8002576 <HAL_RCC_OscConfig+0x106>
  5411. tickstart = HAL_GetTick();
  5412. 800252a: f7fe fcaf bl 8000e8c <HAL_GetTick>
  5413. 800252e: 4605 mov r5, r0
  5414. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
  5415. 8002530: 4b68 ldr r3, [pc, #416] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5416. 8002532: 681b ldr r3, [r3, #0]
  5417. 8002534: f413 3f00 tst.w r3, #131072 @ 0x20000
  5418. 8002538: d1c9 bne.n 80024ce <HAL_RCC_OscConfig+0x5e>
  5419. if((uint32_t) (HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
  5420. 800253a: f7fe fca7 bl 8000e8c <HAL_GetTick>
  5421. 800253e: 1b40 subs r0, r0, r5
  5422. 8002540: 2864 cmp r0, #100 @ 0x64
  5423. 8002542: d9f5 bls.n 8002530 <HAL_RCC_OscConfig+0xc0>
  5424. return HAL_TIMEOUT;
  5425. 8002544: 2003 movs r0, #3
  5426. 8002546: e2b7 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5427. __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
  5428. 8002548: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000
  5429. 800254c: d009 beq.n 8002562 <HAL_RCC_OscConfig+0xf2>
  5430. 800254e: 4b61 ldr r3, [pc, #388] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5431. 8002550: 681a ldr r2, [r3, #0]
  5432. 8002552: f422 3280 bic.w r2, r2, #65536 @ 0x10000
  5433. 8002556: 601a str r2, [r3, #0]
  5434. 8002558: 681a ldr r2, [r3, #0]
  5435. 800255a: f422 2280 bic.w r2, r2, #262144 @ 0x40000
  5436. 800255e: 601a str r2, [r3, #0]
  5437. 8002560: e7e1 b.n 8002526 <HAL_RCC_OscConfig+0xb6>
  5438. 8002562: 4b5c ldr r3, [pc, #368] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5439. 8002564: 681a ldr r2, [r3, #0]
  5440. 8002566: f442 2280 orr.w r2, r2, #262144 @ 0x40000
  5441. 800256a: 601a str r2, [r3, #0]
  5442. 800256c: 681a ldr r2, [r3, #0]
  5443. 800256e: f442 3280 orr.w r2, r2, #65536 @ 0x10000
  5444. 8002572: 601a str r2, [r3, #0]
  5445. 8002574: e7d7 b.n 8002526 <HAL_RCC_OscConfig+0xb6>
  5446. tickstart = HAL_GetTick();
  5447. 8002576: f7fe fc89 bl 8000e8c <HAL_GetTick>
  5448. 800257a: 4605 mov r5, r0
  5449. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U)
  5450. 800257c: 4b55 ldr r3, [pc, #340] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5451. 800257e: 681b ldr r3, [r3, #0]
  5452. 8002580: f413 3f00 tst.w r3, #131072 @ 0x20000
  5453. 8002584: d0a3 beq.n 80024ce <HAL_RCC_OscConfig+0x5e>
  5454. if((uint32_t) (HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE)
  5455. 8002586: f7fe fc81 bl 8000e8c <HAL_GetTick>
  5456. 800258a: 1b40 subs r0, r0, r5
  5457. 800258c: 2864 cmp r0, #100 @ 0x64
  5458. 800258e: d9f5 bls.n 800257c <HAL_RCC_OscConfig+0x10c>
  5459. return HAL_TIMEOUT;
  5460. 8002590: 2003 movs r0, #3
  5461. 8002592: e291 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5462. if((temp_sysclksrc == RCC_CFGR_SWS_HSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSI)))
  5463. 8002594: f012 0f03 tst.w r2, #3
  5464. 8002598: d1a6 bne.n 80024e8 <HAL_RCC_OscConfig+0x78>
  5465. if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF))
  5466. 800259a: 4b4e ldr r3, [pc, #312] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5467. 800259c: 681b ldr r3, [r3, #0]
  5468. 800259e: f013 0f04 tst.w r3, #4
  5469. 80025a2: d003 beq.n 80025ac <HAL_RCC_OscConfig+0x13c>
  5470. 80025a4: 68e3 ldr r3, [r4, #12]
  5471. 80025a6: 2b00 cmp r3, #0
  5472. 80025a8: f000 8281 beq.w 8002aae <HAL_RCC_OscConfig+0x63e>
  5473. __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState);
  5474. 80025ac: 4a49 ldr r2, [pc, #292] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5475. 80025ae: 6813 ldr r3, [r2, #0]
  5476. 80025b0: f023 0319 bic.w r3, r3, #25
  5477. 80025b4: 68e1 ldr r1, [r4, #12]
  5478. 80025b6: 430b orrs r3, r1
  5479. 80025b8: 6013 str r3, [r2, #0]
  5480. tickstart = HAL_GetTick();
  5481. 80025ba: f7fe fc67 bl 8000e8c <HAL_GetTick>
  5482. 80025be: 4605 mov r5, r0
  5483. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
  5484. 80025c0: 4b44 ldr r3, [pc, #272] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5485. 80025c2: 681b ldr r3, [r3, #0]
  5486. 80025c4: f013 0f04 tst.w r3, #4
  5487. 80025c8: d106 bne.n 80025d8 <HAL_RCC_OscConfig+0x168>
  5488. if((uint32_t) (HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
  5489. 80025ca: f7fe fc5f bl 8000e8c <HAL_GetTick>
  5490. 80025ce: 1b40 subs r0, r0, r5
  5491. 80025d0: 2802 cmp r0, #2
  5492. 80025d2: d9f5 bls.n 80025c0 <HAL_RCC_OscConfig+0x150>
  5493. return HAL_TIMEOUT;
  5494. 80025d4: 2003 movs r0, #3
  5495. 80025d6: e26f b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5496. __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
  5497. 80025d8: f7fe fc5e bl 8000e98 <HAL_GetREVID>
  5498. 80025dc: f241 0303 movw r3, #4099 @ 0x1003
  5499. 80025e0: 4298 cmp r0, r3
  5500. 80025e2: d812 bhi.n 800260a <HAL_RCC_OscConfig+0x19a>
  5501. 80025e4: 6922 ldr r2, [r4, #16]
  5502. 80025e6: 2a40 cmp r2, #64 @ 0x40
  5503. 80025e8: d007 beq.n 80025fa <HAL_RCC_OscConfig+0x18a>
  5504. 80025ea: 493a ldr r1, [pc, #232] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5505. 80025ec: 684b ldr r3, [r1, #4]
  5506. 80025ee: f423 337c bic.w r3, r3, #258048 @ 0x3f000
  5507. 80025f2: ea43 3302 orr.w r3, r3, r2, lsl #12
  5508. 80025f6: 604b str r3, [r1, #4]
  5509. 80025f8: e00f b.n 800261a <HAL_RCC_OscConfig+0x1aa>
  5510. 80025fa: 4a36 ldr r2, [pc, #216] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5511. 80025fc: 6853 ldr r3, [r2, #4]
  5512. 80025fe: f423 337c bic.w r3, r3, #258048 @ 0x3f000
  5513. 8002602: f443 3300 orr.w r3, r3, #131072 @ 0x20000
  5514. 8002606: 6053 str r3, [r2, #4]
  5515. 8002608: e007 b.n 800261a <HAL_RCC_OscConfig+0x1aa>
  5516. 800260a: 4a32 ldr r2, [pc, #200] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5517. 800260c: 6853 ldr r3, [r2, #4]
  5518. 800260e: f023 43fe bic.w r3, r3, #2130706432 @ 0x7f000000
  5519. 8002612: 6921 ldr r1, [r4, #16]
  5520. 8002614: ea43 6301 orr.w r3, r3, r1, lsl #24
  5521. 8002618: 6053 str r3, [r2, #4]
  5522. }
  5523. }
  5524. }
  5525. }
  5526. /*----------------------------- CSI Configuration --------------------------*/
  5527. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_CSI) == RCC_OSCILLATORTYPE_CSI)
  5528. 800261a: 6823 ldr r3, [r4, #0]
  5529. 800261c: f013 0f10 tst.w r3, #16
  5530. 8002620: f000 8088 beq.w 8002734 <HAL_RCC_OscConfig+0x2c4>
  5531. /* Check the parameters */
  5532. assert_param(IS_RCC_CSI(RCC_OscInitStruct->CSIState));
  5533. assert_param(IS_RCC_CSICALIBRATION_VALUE(RCC_OscInitStruct->CSICalibrationValue));
  5534. /* When the CSI is used as system clock it will not disabled */
  5535. const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE();
  5536. 8002624: 4a2b ldr r2, [pc, #172] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5537. 8002626: 6913 ldr r3, [r2, #16]
  5538. 8002628: f003 0338 and.w r3, r3, #56 @ 0x38
  5539. const uint32_t temp_pllckselr = RCC->PLLCKSELR;
  5540. 800262c: 6a92 ldr r2, [r2, #40] @ 0x28
  5541. if((temp_sysclksrc == RCC_CFGR_SWS_CSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_CSI)))
  5542. 800262e: 2b08 cmp r3, #8
  5543. 8002630: d056 beq.n 80026e0 <HAL_RCC_OscConfig+0x270>
  5544. 8002632: 2b18 cmp r3, #24
  5545. 8002634: d050 beq.n 80026d8 <HAL_RCC_OscConfig+0x268>
  5546. }
  5547. }
  5548. else
  5549. {
  5550. /* Check the CSI State */
  5551. if((RCC_OscInitStruct->CSIState)!= RCC_CSI_OFF)
  5552. 8002636: 69e3 ldr r3, [r4, #28]
  5553. 8002638: 2b00 cmp r3, #0
  5554. 800263a: f000 80b8 beq.w 80027ae <HAL_RCC_OscConfig+0x33e>
  5555. {
  5556. /* Enable the Internal High Speed oscillator (CSI). */
  5557. __HAL_RCC_CSI_ENABLE();
  5558. 800263e: 4a25 ldr r2, [pc, #148] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5559. 8002640: 6813 ldr r3, [r2, #0]
  5560. 8002642: f043 0380 orr.w r3, r3, #128 @ 0x80
  5561. 8002646: 6013 str r3, [r2, #0]
  5562. /* Get Start Tick*/
  5563. tickstart = HAL_GetTick();
  5564. 8002648: f7fe fc20 bl 8000e8c <HAL_GetTick>
  5565. 800264c: 4605 mov r5, r0
  5566. /* Wait till CSI is ready */
  5567. while(__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U)
  5568. 800264e: 4b21 ldr r3, [pc, #132] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5569. 8002650: 681b ldr r3, [r3, #0]
  5570. 8002652: f413 7f80 tst.w r3, #256 @ 0x100
  5571. 8002656: f040 8088 bne.w 800276a <HAL_RCC_OscConfig+0x2fa>
  5572. {
  5573. if((HAL_GetTick() - tickstart ) > CSI_TIMEOUT_VALUE)
  5574. 800265a: f7fe fc17 bl 8000e8c <HAL_GetTick>
  5575. 800265e: 1b40 subs r0, r0, r5
  5576. 8002660: 2802 cmp r0, #2
  5577. 8002662: d9f4 bls.n 800264e <HAL_RCC_OscConfig+0x1de>
  5578. {
  5579. return HAL_TIMEOUT;
  5580. 8002664: 2003 movs r0, #3
  5581. 8002666: e227 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5582. __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue);
  5583. 8002668: f7fe fc16 bl 8000e98 <HAL_GetREVID>
  5584. 800266c: f241 0303 movw r3, #4099 @ 0x1003
  5585. 8002670: 4298 cmp r0, r3
  5586. 8002672: d812 bhi.n 800269a <HAL_RCC_OscConfig+0x22a>
  5587. 8002674: 6922 ldr r2, [r4, #16]
  5588. 8002676: 2a40 cmp r2, #64 @ 0x40
  5589. 8002678: d007 beq.n 800268a <HAL_RCC_OscConfig+0x21a>
  5590. 800267a: 4916 ldr r1, [pc, #88] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5591. 800267c: 684b ldr r3, [r1, #4]
  5592. 800267e: f423 337c bic.w r3, r3, #258048 @ 0x3f000
  5593. 8002682: ea43 3302 orr.w r3, r3, r2, lsl #12
  5594. 8002686: 604b str r3, [r1, #4]
  5595. 8002688: e7c7 b.n 800261a <HAL_RCC_OscConfig+0x1aa>
  5596. 800268a: 4a12 ldr r2, [pc, #72] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5597. 800268c: 6853 ldr r3, [r2, #4]
  5598. 800268e: f423 337c bic.w r3, r3, #258048 @ 0x3f000
  5599. 8002692: f443 3300 orr.w r3, r3, #131072 @ 0x20000
  5600. 8002696: 6053 str r3, [r2, #4]
  5601. 8002698: e7bf b.n 800261a <HAL_RCC_OscConfig+0x1aa>
  5602. 800269a: 4a0e ldr r2, [pc, #56] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5603. 800269c: 6853 ldr r3, [r2, #4]
  5604. 800269e: f023 43fe bic.w r3, r3, #2130706432 @ 0x7f000000
  5605. 80026a2: 6921 ldr r1, [r4, #16]
  5606. 80026a4: ea43 6301 orr.w r3, r3, r1, lsl #24
  5607. 80026a8: 6053 str r3, [r2, #4]
  5608. 80026aa: e7b6 b.n 800261a <HAL_RCC_OscConfig+0x1aa>
  5609. __HAL_RCC_HSI_DISABLE();
  5610. 80026ac: 4a09 ldr r2, [pc, #36] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5611. 80026ae: 6813 ldr r3, [r2, #0]
  5612. 80026b0: f023 0301 bic.w r3, r3, #1
  5613. 80026b4: 6013 str r3, [r2, #0]
  5614. tickstart = HAL_GetTick();
  5615. 80026b6: f7fe fbe9 bl 8000e8c <HAL_GetTick>
  5616. 80026ba: 4605 mov r5, r0
  5617. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U)
  5618. 80026bc: 4b05 ldr r3, [pc, #20] @ (80026d4 <HAL_RCC_OscConfig+0x264>)
  5619. 80026be: 681b ldr r3, [r3, #0]
  5620. 80026c0: f013 0f04 tst.w r3, #4
  5621. 80026c4: d0a9 beq.n 800261a <HAL_RCC_OscConfig+0x1aa>
  5622. if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE)
  5623. 80026c6: f7fe fbe1 bl 8000e8c <HAL_GetTick>
  5624. 80026ca: 1b40 subs r0, r0, r5
  5625. 80026cc: 2802 cmp r0, #2
  5626. 80026ce: d9f5 bls.n 80026bc <HAL_RCC_OscConfig+0x24c>
  5627. return HAL_TIMEOUT;
  5628. 80026d0: 2003 movs r0, #3
  5629. 80026d2: e1f1 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5630. 80026d4: 58024400 .word 0x58024400
  5631. if((temp_sysclksrc == RCC_CFGR_SWS_CSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_CSI)))
  5632. 80026d8: f002 0203 and.w r2, r2, #3
  5633. 80026dc: 2a01 cmp r2, #1
  5634. 80026de: d1aa bne.n 8002636 <HAL_RCC_OscConfig+0x1c6>
  5635. if((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON))
  5636. 80026e0: 4ba1 ldr r3, [pc, #644] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5637. 80026e2: 681b ldr r3, [r3, #0]
  5638. 80026e4: f413 7f80 tst.w r3, #256 @ 0x100
  5639. 80026e8: d003 beq.n 80026f2 <HAL_RCC_OscConfig+0x282>
  5640. 80026ea: 69e3 ldr r3, [r4, #28]
  5641. 80026ec: 2b80 cmp r3, #128 @ 0x80
  5642. 80026ee: f040 81e0 bne.w 8002ab2 <HAL_RCC_OscConfig+0x642>
  5643. __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue);
  5644. 80026f2: f7fe fbd1 bl 8000e98 <HAL_GetREVID>
  5645. 80026f6: f241 0303 movw r3, #4099 @ 0x1003
  5646. 80026fa: 4298 cmp r0, r3
  5647. 80026fc: d812 bhi.n 8002724 <HAL_RCC_OscConfig+0x2b4>
  5648. 80026fe: 6a22 ldr r2, [r4, #32]
  5649. 8002700: 2a20 cmp r2, #32
  5650. 8002702: d007 beq.n 8002714 <HAL_RCC_OscConfig+0x2a4>
  5651. 8002704: 4998 ldr r1, [pc, #608] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5652. 8002706: 684b ldr r3, [r1, #4]
  5653. 8002708: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000
  5654. 800270c: ea43 6382 orr.w r3, r3, r2, lsl #26
  5655. 8002710: 604b str r3, [r1, #4]
  5656. 8002712: e00f b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
  5657. 8002714: 4a94 ldr r2, [pc, #592] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5658. 8002716: 6853 ldr r3, [r2, #4]
  5659. 8002718: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000
  5660. 800271c: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000
  5661. 8002720: 6053 str r3, [r2, #4]
  5662. 8002722: e007 b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
  5663. 8002724: 4a90 ldr r2, [pc, #576] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5664. 8002726: 68d3 ldr r3, [r2, #12]
  5665. 8002728: f023 537c bic.w r3, r3, #1056964608 @ 0x3f000000
  5666. 800272c: 6a21 ldr r1, [r4, #32]
  5667. 800272e: ea43 6301 orr.w r3, r3, r1, lsl #24
  5668. 8002732: 60d3 str r3, [r2, #12]
  5669. }
  5670. }
  5671. }
  5672. }
  5673. /*------------------------------ LSI Configuration -------------------------*/
  5674. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI)
  5675. 8002734: 6823 ldr r3, [r4, #0]
  5676. 8002736: f013 0f08 tst.w r3, #8
  5677. 800273a: d060 beq.n 80027fe <HAL_RCC_OscConfig+0x38e>
  5678. {
  5679. /* Check the parameters */
  5680. assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState));
  5681. /* Check the LSI State */
  5682. if((RCC_OscInitStruct->LSIState)!= RCC_LSI_OFF)
  5683. 800273c: 6963 ldr r3, [r4, #20]
  5684. 800273e: 2b00 cmp r3, #0
  5685. 8002740: d049 beq.n 80027d6 <HAL_RCC_OscConfig+0x366>
  5686. {
  5687. /* Enable the Internal Low Speed oscillator (LSI). */
  5688. __HAL_RCC_LSI_ENABLE();
  5689. 8002742: 4a89 ldr r2, [pc, #548] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5690. 8002744: 6f53 ldr r3, [r2, #116] @ 0x74
  5691. 8002746: f043 0301 orr.w r3, r3, #1
  5692. 800274a: 6753 str r3, [r2, #116] @ 0x74
  5693. /* Get Start Tick*/
  5694. tickstart = HAL_GetTick();
  5695. 800274c: f7fe fb9e bl 8000e8c <HAL_GetTick>
  5696. 8002750: 4605 mov r5, r0
  5697. /* Wait till LSI is ready */
  5698. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U)
  5699. 8002752: 4b85 ldr r3, [pc, #532] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5700. 8002754: 6f5b ldr r3, [r3, #116] @ 0x74
  5701. 8002756: f013 0f02 tst.w r3, #2
  5702. 800275a: d150 bne.n 80027fe <HAL_RCC_OscConfig+0x38e>
  5703. {
  5704. if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
  5705. 800275c: f7fe fb96 bl 8000e8c <HAL_GetTick>
  5706. 8002760: 1b40 subs r0, r0, r5
  5707. 8002762: 2802 cmp r0, #2
  5708. 8002764: d9f5 bls.n 8002752 <HAL_RCC_OscConfig+0x2e2>
  5709. {
  5710. return HAL_TIMEOUT;
  5711. 8002766: 2003 movs r0, #3
  5712. 8002768: e1a6 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5713. __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue);
  5714. 800276a: f7fe fb95 bl 8000e98 <HAL_GetREVID>
  5715. 800276e: f241 0303 movw r3, #4099 @ 0x1003
  5716. 8002772: 4298 cmp r0, r3
  5717. 8002774: d812 bhi.n 800279c <HAL_RCC_OscConfig+0x32c>
  5718. 8002776: 6a22 ldr r2, [r4, #32]
  5719. 8002778: 2a20 cmp r2, #32
  5720. 800277a: d007 beq.n 800278c <HAL_RCC_OscConfig+0x31c>
  5721. 800277c: 497a ldr r1, [pc, #488] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5722. 800277e: 684b ldr r3, [r1, #4]
  5723. 8002780: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000
  5724. 8002784: ea43 6382 orr.w r3, r3, r2, lsl #26
  5725. 8002788: 604b str r3, [r1, #4]
  5726. 800278a: e7d3 b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
  5727. 800278c: 4a76 ldr r2, [pc, #472] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5728. 800278e: 6853 ldr r3, [r2, #4]
  5729. 8002790: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000
  5730. 8002794: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000
  5731. 8002798: 6053 str r3, [r2, #4]
  5732. 800279a: e7cb b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
  5733. 800279c: 4a72 ldr r2, [pc, #456] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5734. 800279e: 68d3 ldr r3, [r2, #12]
  5735. 80027a0: f023 537c bic.w r3, r3, #1056964608 @ 0x3f000000
  5736. 80027a4: 6a21 ldr r1, [r4, #32]
  5737. 80027a6: ea43 6301 orr.w r3, r3, r1, lsl #24
  5738. 80027aa: 60d3 str r3, [r2, #12]
  5739. 80027ac: e7c2 b.n 8002734 <HAL_RCC_OscConfig+0x2c4>
  5740. __HAL_RCC_CSI_DISABLE();
  5741. 80027ae: 4a6e ldr r2, [pc, #440] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5742. 80027b0: 6813 ldr r3, [r2, #0]
  5743. 80027b2: f023 0380 bic.w r3, r3, #128 @ 0x80
  5744. 80027b6: 6013 str r3, [r2, #0]
  5745. tickstart = HAL_GetTick();
  5746. 80027b8: f7fe fb68 bl 8000e8c <HAL_GetTick>
  5747. 80027bc: 4605 mov r5, r0
  5748. while(__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U)
  5749. 80027be: 4b6a ldr r3, [pc, #424] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5750. 80027c0: 681b ldr r3, [r3, #0]
  5751. 80027c2: f413 7f80 tst.w r3, #256 @ 0x100
  5752. 80027c6: d0b5 beq.n 8002734 <HAL_RCC_OscConfig+0x2c4>
  5753. if((HAL_GetTick() - tickstart ) > CSI_TIMEOUT_VALUE)
  5754. 80027c8: f7fe fb60 bl 8000e8c <HAL_GetTick>
  5755. 80027cc: 1b40 subs r0, r0, r5
  5756. 80027ce: 2802 cmp r0, #2
  5757. 80027d0: d9f5 bls.n 80027be <HAL_RCC_OscConfig+0x34e>
  5758. return HAL_TIMEOUT;
  5759. 80027d2: 2003 movs r0, #3
  5760. 80027d4: e170 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5761. }
  5762. }
  5763. else
  5764. {
  5765. /* Disable the Internal Low Speed oscillator (LSI). */
  5766. __HAL_RCC_LSI_DISABLE();
  5767. 80027d6: 4a64 ldr r2, [pc, #400] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5768. 80027d8: 6f53 ldr r3, [r2, #116] @ 0x74
  5769. 80027da: f023 0301 bic.w r3, r3, #1
  5770. 80027de: 6753 str r3, [r2, #116] @ 0x74
  5771. /* Get Start Tick*/
  5772. tickstart = HAL_GetTick();
  5773. 80027e0: f7fe fb54 bl 8000e8c <HAL_GetTick>
  5774. 80027e4: 4605 mov r5, r0
  5775. /* Wait till LSI is ready */
  5776. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U)
  5777. 80027e6: 4b60 ldr r3, [pc, #384] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5778. 80027e8: 6f5b ldr r3, [r3, #116] @ 0x74
  5779. 80027ea: f013 0f02 tst.w r3, #2
  5780. 80027ee: d006 beq.n 80027fe <HAL_RCC_OscConfig+0x38e>
  5781. {
  5782. if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE)
  5783. 80027f0: f7fe fb4c bl 8000e8c <HAL_GetTick>
  5784. 80027f4: 1b40 subs r0, r0, r5
  5785. 80027f6: 2802 cmp r0, #2
  5786. 80027f8: d9f5 bls.n 80027e6 <HAL_RCC_OscConfig+0x376>
  5787. {
  5788. return HAL_TIMEOUT;
  5789. 80027fa: 2003 movs r0, #3
  5790. 80027fc: e15c b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5791. }
  5792. }
  5793. }
  5794. /*------------------------------ HSI48 Configuration -------------------------*/
  5795. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48)
  5796. 80027fe: 6823 ldr r3, [r4, #0]
  5797. 8002800: f013 0f20 tst.w r3, #32
  5798. 8002804: d029 beq.n 800285a <HAL_RCC_OscConfig+0x3ea>
  5799. {
  5800. /* Check the parameters */
  5801. assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State));
  5802. /* Check the HSI48 State */
  5803. if((RCC_OscInitStruct->HSI48State)!= RCC_HSI48_OFF)
  5804. 8002806: 69a3 ldr r3, [r4, #24]
  5805. 8002808: b19b cbz r3, 8002832 <HAL_RCC_OscConfig+0x3c2>
  5806. {
  5807. /* Enable the Internal Low Speed oscillator (HSI48). */
  5808. __HAL_RCC_HSI48_ENABLE();
  5809. 800280a: 4a57 ldr r2, [pc, #348] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5810. 800280c: 6813 ldr r3, [r2, #0]
  5811. 800280e: f443 5380 orr.w r3, r3, #4096 @ 0x1000
  5812. 8002812: 6013 str r3, [r2, #0]
  5813. /* Get time-out */
  5814. tickstart = HAL_GetTick();
  5815. 8002814: f7fe fb3a bl 8000e8c <HAL_GetTick>
  5816. 8002818: 4605 mov r5, r0
  5817. /* Wait till HSI48 is ready */
  5818. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U)
  5819. 800281a: 4b53 ldr r3, [pc, #332] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5820. 800281c: 681b ldr r3, [r3, #0]
  5821. 800281e: f413 5f00 tst.w r3, #8192 @ 0x2000
  5822. 8002822: d11a bne.n 800285a <HAL_RCC_OscConfig+0x3ea>
  5823. {
  5824. if((HAL_GetTick() - tickstart ) > HSI48_TIMEOUT_VALUE)
  5825. 8002824: f7fe fb32 bl 8000e8c <HAL_GetTick>
  5826. 8002828: 1b40 subs r0, r0, r5
  5827. 800282a: 2802 cmp r0, #2
  5828. 800282c: d9f5 bls.n 800281a <HAL_RCC_OscConfig+0x3aa>
  5829. {
  5830. return HAL_TIMEOUT;
  5831. 800282e: 2003 movs r0, #3
  5832. 8002830: e142 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5833. }
  5834. }
  5835. else
  5836. {
  5837. /* Disable the Internal Low Speed oscillator (HSI48). */
  5838. __HAL_RCC_HSI48_DISABLE();
  5839. 8002832: 4a4d ldr r2, [pc, #308] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5840. 8002834: 6813 ldr r3, [r2, #0]
  5841. 8002836: f423 5380 bic.w r3, r3, #4096 @ 0x1000
  5842. 800283a: 6013 str r3, [r2, #0]
  5843. /* Get time-out */
  5844. tickstart = HAL_GetTick();
  5845. 800283c: f7fe fb26 bl 8000e8c <HAL_GetTick>
  5846. 8002840: 4605 mov r5, r0
  5847. /* Wait till HSI48 is ready */
  5848. while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U)
  5849. 8002842: 4b49 ldr r3, [pc, #292] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5850. 8002844: 681b ldr r3, [r3, #0]
  5851. 8002846: f413 5f00 tst.w r3, #8192 @ 0x2000
  5852. 800284a: d006 beq.n 800285a <HAL_RCC_OscConfig+0x3ea>
  5853. {
  5854. if((HAL_GetTick() - tickstart ) > HSI48_TIMEOUT_VALUE)
  5855. 800284c: f7fe fb1e bl 8000e8c <HAL_GetTick>
  5856. 8002850: 1b40 subs r0, r0, r5
  5857. 8002852: 2802 cmp r0, #2
  5858. 8002854: d9f5 bls.n 8002842 <HAL_RCC_OscConfig+0x3d2>
  5859. {
  5860. return HAL_TIMEOUT;
  5861. 8002856: 2003 movs r0, #3
  5862. 8002858: e12e b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5863. }
  5864. }
  5865. }
  5866. }
  5867. /*------------------------------ LSE Configuration -------------------------*/
  5868. if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE)
  5869. 800285a: 6823 ldr r3, [r4, #0]
  5870. 800285c: f013 0f04 tst.w r3, #4
  5871. 8002860: d121 bne.n 80028a6 <HAL_RCC_OscConfig+0x436>
  5872. }
  5873. }
  5874. /*-------------------------------- PLL Configuration -----------------------*/
  5875. /* Check the parameters */
  5876. assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));
  5877. if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE)
  5878. 8002862: 6a63 ldr r3, [r4, #36] @ 0x24
  5879. 8002864: 2b00 cmp r3, #0
  5880. 8002866: f000 8126 beq.w 8002ab6 <HAL_RCC_OscConfig+0x646>
  5881. {
  5882. /* Check if the PLL is used as system clock or not */
  5883. if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL1)
  5884. 800286a: 4a3f ldr r2, [pc, #252] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5885. 800286c: 6912 ldr r2, [r2, #16]
  5886. 800286e: f002 0238 and.w r2, r2, #56 @ 0x38
  5887. 8002872: 2a18 cmp r2, #24
  5888. 8002874: f000 80ee beq.w 8002a54 <HAL_RCC_OscConfig+0x5e4>
  5889. {
  5890. if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON)
  5891. 8002878: 2b02 cmp r3, #2
  5892. 800287a: d079 beq.n 8002970 <HAL_RCC_OscConfig+0x500>
  5893. }
  5894. }
  5895. else
  5896. {
  5897. /* Disable the main PLL. */
  5898. __HAL_RCC_PLL_DISABLE();
  5899. 800287c: 4a3a ldr r2, [pc, #232] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5900. 800287e: 6813 ldr r3, [r2, #0]
  5901. 8002880: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000
  5902. 8002884: 6013 str r3, [r2, #0]
  5903. /* Get Start Tick*/
  5904. tickstart = HAL_GetTick();
  5905. 8002886: f7fe fb01 bl 8000e8c <HAL_GetTick>
  5906. 800288a: 4604 mov r4, r0
  5907. /* Wait till PLL is disabled */
  5908. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
  5909. 800288c: 4b36 ldr r3, [pc, #216] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5910. 800288e: 681b ldr r3, [r3, #0]
  5911. 8002890: f013 7f00 tst.w r3, #33554432 @ 0x2000000
  5912. 8002894: f000 80dc beq.w 8002a50 <HAL_RCC_OscConfig+0x5e0>
  5913. {
  5914. if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
  5915. 8002898: f7fe faf8 bl 8000e8c <HAL_GetTick>
  5916. 800289c: 1b00 subs r0, r0, r4
  5917. 800289e: 2802 cmp r0, #2
  5918. 80028a0: d9f4 bls.n 800288c <HAL_RCC_OscConfig+0x41c>
  5919. {
  5920. return HAL_TIMEOUT;
  5921. 80028a2: 2003 movs r0, #3
  5922. 80028a4: e108 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5923. PWR->CR1 |= PWR_CR1_DBP;
  5924. 80028a6: 4a31 ldr r2, [pc, #196] @ (800296c <HAL_RCC_OscConfig+0x4fc>)
  5925. 80028a8: 6813 ldr r3, [r2, #0]
  5926. 80028aa: f443 7380 orr.w r3, r3, #256 @ 0x100
  5927. 80028ae: 6013 str r3, [r2, #0]
  5928. tickstart = HAL_GetTick();
  5929. 80028b0: f7fe faec bl 8000e8c <HAL_GetTick>
  5930. 80028b4: 4605 mov r5, r0
  5931. while((PWR->CR1 & PWR_CR1_DBP) == 0U)
  5932. 80028b6: 4b2d ldr r3, [pc, #180] @ (800296c <HAL_RCC_OscConfig+0x4fc>)
  5933. 80028b8: 681b ldr r3, [r3, #0]
  5934. 80028ba: f413 7f80 tst.w r3, #256 @ 0x100
  5935. 80028be: d106 bne.n 80028ce <HAL_RCC_OscConfig+0x45e>
  5936. if((HAL_GetTick() - tickstart ) > RCC_DBP_TIMEOUT_VALUE)
  5937. 80028c0: f7fe fae4 bl 8000e8c <HAL_GetTick>
  5938. 80028c4: 1b40 subs r0, r0, r5
  5939. 80028c6: 2864 cmp r0, #100 @ 0x64
  5940. 80028c8: d9f5 bls.n 80028b6 <HAL_RCC_OscConfig+0x446>
  5941. return HAL_TIMEOUT;
  5942. 80028ca: 2003 movs r0, #3
  5943. 80028cc: e0f4 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5944. __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
  5945. 80028ce: 68a3 ldr r3, [r4, #8]
  5946. 80028d0: 2b01 cmp r3, #1
  5947. 80028d2: d00a beq.n 80028ea <HAL_RCC_OscConfig+0x47a>
  5948. 80028d4: bb0b cbnz r3, 800291a <HAL_RCC_OscConfig+0x4aa>
  5949. 80028d6: 4b24 ldr r3, [pc, #144] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5950. 80028d8: 6f1a ldr r2, [r3, #112] @ 0x70
  5951. 80028da: f022 0201 bic.w r2, r2, #1
  5952. 80028de: 671a str r2, [r3, #112] @ 0x70
  5953. 80028e0: 6f1a ldr r2, [r3, #112] @ 0x70
  5954. 80028e2: f022 0204 bic.w r2, r2, #4
  5955. 80028e6: 671a str r2, [r3, #112] @ 0x70
  5956. 80028e8: e004 b.n 80028f4 <HAL_RCC_OscConfig+0x484>
  5957. 80028ea: 4a1f ldr r2, [pc, #124] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5958. 80028ec: 6f13 ldr r3, [r2, #112] @ 0x70
  5959. 80028ee: f043 0301 orr.w r3, r3, #1
  5960. 80028f2: 6713 str r3, [r2, #112] @ 0x70
  5961. if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF)
  5962. 80028f4: 68a3 ldr r3, [r4, #8]
  5963. 80028f6: b333 cbz r3, 8002946 <HAL_RCC_OscConfig+0x4d6>
  5964. tickstart = HAL_GetTick();
  5965. 80028f8: f7fe fac8 bl 8000e8c <HAL_GetTick>
  5966. 80028fc: 4605 mov r5, r0
  5967. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U)
  5968. 80028fe: 4b1a ldr r3, [pc, #104] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5969. 8002900: 6f1b ldr r3, [r3, #112] @ 0x70
  5970. 8002902: f013 0f02 tst.w r3, #2
  5971. 8002906: d1ac bne.n 8002862 <HAL_RCC_OscConfig+0x3f2>
  5972. if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
  5973. 8002908: f7fe fac0 bl 8000e8c <HAL_GetTick>
  5974. 800290c: 1b40 subs r0, r0, r5
  5975. 800290e: f241 3388 movw r3, #5000 @ 0x1388
  5976. 8002912: 4298 cmp r0, r3
  5977. 8002914: d9f3 bls.n 80028fe <HAL_RCC_OscConfig+0x48e>
  5978. return HAL_TIMEOUT;
  5979. 8002916: 2003 movs r0, #3
  5980. 8002918: e0ce b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  5981. __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState);
  5982. 800291a: 2b05 cmp r3, #5
  5983. 800291c: d009 beq.n 8002932 <HAL_RCC_OscConfig+0x4c2>
  5984. 800291e: 4b12 ldr r3, [pc, #72] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5985. 8002920: 6f1a ldr r2, [r3, #112] @ 0x70
  5986. 8002922: f022 0201 bic.w r2, r2, #1
  5987. 8002926: 671a str r2, [r3, #112] @ 0x70
  5988. 8002928: 6f1a ldr r2, [r3, #112] @ 0x70
  5989. 800292a: f022 0204 bic.w r2, r2, #4
  5990. 800292e: 671a str r2, [r3, #112] @ 0x70
  5991. 8002930: e7e0 b.n 80028f4 <HAL_RCC_OscConfig+0x484>
  5992. 8002932: 4b0d ldr r3, [pc, #52] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  5993. 8002934: 6f1a ldr r2, [r3, #112] @ 0x70
  5994. 8002936: f042 0204 orr.w r2, r2, #4
  5995. 800293a: 671a str r2, [r3, #112] @ 0x70
  5996. 800293c: 6f1a ldr r2, [r3, #112] @ 0x70
  5997. 800293e: f042 0201 orr.w r2, r2, #1
  5998. 8002942: 671a str r2, [r3, #112] @ 0x70
  5999. 8002944: e7d6 b.n 80028f4 <HAL_RCC_OscConfig+0x484>
  6000. tickstart = HAL_GetTick();
  6001. 8002946: f7fe faa1 bl 8000e8c <HAL_GetTick>
  6002. 800294a: 4605 mov r5, r0
  6003. while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U)
  6004. 800294c: 4b06 ldr r3, [pc, #24] @ (8002968 <HAL_RCC_OscConfig+0x4f8>)
  6005. 800294e: 6f1b ldr r3, [r3, #112] @ 0x70
  6006. 8002950: f013 0f02 tst.w r3, #2
  6007. 8002954: d085 beq.n 8002862 <HAL_RCC_OscConfig+0x3f2>
  6008. if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
  6009. 8002956: f7fe fa99 bl 8000e8c <HAL_GetTick>
  6010. 800295a: 1b40 subs r0, r0, r5
  6011. 800295c: f241 3388 movw r3, #5000 @ 0x1388
  6012. 8002960: 4298 cmp r0, r3
  6013. 8002962: d9f3 bls.n 800294c <HAL_RCC_OscConfig+0x4dc>
  6014. return HAL_TIMEOUT;
  6015. 8002964: 2003 movs r0, #3
  6016. 8002966: e0a7 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6017. 8002968: 58024400 .word 0x58024400
  6018. 800296c: 58024800 .word 0x58024800
  6019. __HAL_RCC_PLL_DISABLE();
  6020. 8002970: 4a59 ldr r2, [pc, #356] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
  6021. 8002972: 6813 ldr r3, [r2, #0]
  6022. 8002974: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000
  6023. 8002978: 6013 str r3, [r2, #0]
  6024. tickstart = HAL_GetTick();
  6025. 800297a: f7fe fa87 bl 8000e8c <HAL_GetTick>
  6026. 800297e: 4605 mov r5, r0
  6027. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U)
  6028. 8002980: 4b55 ldr r3, [pc, #340] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
  6029. 8002982: 681b ldr r3, [r3, #0]
  6030. 8002984: f013 7f00 tst.w r3, #33554432 @ 0x2000000
  6031. 8002988: d006 beq.n 8002998 <HAL_RCC_OscConfig+0x528>
  6032. if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
  6033. 800298a: f7fe fa7f bl 8000e8c <HAL_GetTick>
  6034. 800298e: 1b40 subs r0, r0, r5
  6035. 8002990: 2802 cmp r0, #2
  6036. 8002992: d9f5 bls.n 8002980 <HAL_RCC_OscConfig+0x510>
  6037. return HAL_TIMEOUT;
  6038. 8002994: 2003 movs r0, #3
  6039. 8002996: e08f b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6040. __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource,
  6041. 8002998: 4b4f ldr r3, [pc, #316] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
  6042. 800299a: 6a99 ldr r1, [r3, #40] @ 0x28
  6043. 800299c: 4a4f ldr r2, [pc, #316] @ (8002adc <HAL_RCC_OscConfig+0x66c>)
  6044. 800299e: 400a ands r2, r1
  6045. 80029a0: 6aa1 ldr r1, [r4, #40] @ 0x28
  6046. 80029a2: 6ae0 ldr r0, [r4, #44] @ 0x2c
  6047. 80029a4: ea41 1100 orr.w r1, r1, r0, lsl #4
  6048. 80029a8: 430a orrs r2, r1
  6049. 80029aa: 629a str r2, [r3, #40] @ 0x28
  6050. 80029ac: 6b22 ldr r2, [r4, #48] @ 0x30
  6051. 80029ae: 3a01 subs r2, #1
  6052. 80029b0: f3c2 0208 ubfx r2, r2, #0, #9
  6053. 80029b4: 6b61 ldr r1, [r4, #52] @ 0x34
  6054. 80029b6: 3901 subs r1, #1
  6055. 80029b8: 0249 lsls r1, r1, #9
  6056. 80029ba: b289 uxth r1, r1
  6057. 80029bc: 430a orrs r2, r1
  6058. 80029be: 6ba1 ldr r1, [r4, #56] @ 0x38
  6059. 80029c0: 3901 subs r1, #1
  6060. 80029c2: 0409 lsls r1, r1, #16
  6061. 80029c4: f401 01fe and.w r1, r1, #8323072 @ 0x7f0000
  6062. 80029c8: 430a orrs r2, r1
  6063. 80029ca: 6be1 ldr r1, [r4, #60] @ 0x3c
  6064. 80029cc: 3901 subs r1, #1
  6065. 80029ce: 0609 lsls r1, r1, #24
  6066. 80029d0: f001 41fe and.w r1, r1, #2130706432 @ 0x7f000000
  6067. 80029d4: 430a orrs r2, r1
  6068. 80029d6: 631a str r2, [r3, #48] @ 0x30
  6069. __HAL_RCC_PLLFRACN_DISABLE();
  6070. 80029d8: 6ada ldr r2, [r3, #44] @ 0x2c
  6071. 80029da: f022 0201 bic.w r2, r2, #1
  6072. 80029de: 62da str r2, [r3, #44] @ 0x2c
  6073. __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN);
  6074. 80029e0: 6b59 ldr r1, [r3, #52] @ 0x34
  6075. 80029e2: 4a3f ldr r2, [pc, #252] @ (8002ae0 <HAL_RCC_OscConfig+0x670>)
  6076. 80029e4: 400a ands r2, r1
  6077. 80029e6: 6ca1 ldr r1, [r4, #72] @ 0x48
  6078. 80029e8: ea42 02c1 orr.w r2, r2, r1, lsl #3
  6079. 80029ec: 635a str r2, [r3, #52] @ 0x34
  6080. __HAL_RCC_PLL_VCIRANGE(RCC_OscInitStruct->PLL.PLLRGE) ;
  6081. 80029ee: 6ada ldr r2, [r3, #44] @ 0x2c
  6082. 80029f0: f022 020c bic.w r2, r2, #12
  6083. 80029f4: 6c21 ldr r1, [r4, #64] @ 0x40
  6084. 80029f6: 430a orrs r2, r1
  6085. 80029f8: 62da str r2, [r3, #44] @ 0x2c
  6086. __HAL_RCC_PLL_VCORANGE(RCC_OscInitStruct->PLL.PLLVCOSEL) ;
  6087. 80029fa: 6ada ldr r2, [r3, #44] @ 0x2c
  6088. 80029fc: f022 0202 bic.w r2, r2, #2
  6089. 8002a00: 6c61 ldr r1, [r4, #68] @ 0x44
  6090. 8002a02: 430a orrs r2, r1
  6091. 8002a04: 62da str r2, [r3, #44] @ 0x2c
  6092. __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVP);
  6093. 8002a06: 6ada ldr r2, [r3, #44] @ 0x2c
  6094. 8002a08: f442 3280 orr.w r2, r2, #65536 @ 0x10000
  6095. 8002a0c: 62da str r2, [r3, #44] @ 0x2c
  6096. __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ);
  6097. 8002a0e: 6ada ldr r2, [r3, #44] @ 0x2c
  6098. 8002a10: f442 3200 orr.w r2, r2, #131072 @ 0x20000
  6099. 8002a14: 62da str r2, [r3, #44] @ 0x2c
  6100. __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVR);
  6101. 8002a16: 6ada ldr r2, [r3, #44] @ 0x2c
  6102. 8002a18: f442 2280 orr.w r2, r2, #262144 @ 0x40000
  6103. 8002a1c: 62da str r2, [r3, #44] @ 0x2c
  6104. __HAL_RCC_PLLFRACN_ENABLE();
  6105. 8002a1e: 6ada ldr r2, [r3, #44] @ 0x2c
  6106. 8002a20: f042 0201 orr.w r2, r2, #1
  6107. 8002a24: 62da str r2, [r3, #44] @ 0x2c
  6108. __HAL_RCC_PLL_ENABLE();
  6109. 8002a26: 681a ldr r2, [r3, #0]
  6110. 8002a28: f042 7280 orr.w r2, r2, #16777216 @ 0x1000000
  6111. 8002a2c: 601a str r2, [r3, #0]
  6112. tickstart = HAL_GetTick();
  6113. 8002a2e: f7fe fa2d bl 8000e8c <HAL_GetTick>
  6114. 8002a32: 4604 mov r4, r0
  6115. while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
  6116. 8002a34: 4b28 ldr r3, [pc, #160] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
  6117. 8002a36: 681b ldr r3, [r3, #0]
  6118. 8002a38: f013 7f00 tst.w r3, #33554432 @ 0x2000000
  6119. 8002a3c: d106 bne.n 8002a4c <HAL_RCC_OscConfig+0x5dc>
  6120. if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)
  6121. 8002a3e: f7fe fa25 bl 8000e8c <HAL_GetTick>
  6122. 8002a42: 1b00 subs r0, r0, r4
  6123. 8002a44: 2802 cmp r0, #2
  6124. 8002a46: d9f5 bls.n 8002a34 <HAL_RCC_OscConfig+0x5c4>
  6125. return HAL_TIMEOUT;
  6126. 8002a48: 2003 movs r0, #3
  6127. 8002a4a: e035 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6128. {
  6129. return HAL_ERROR;
  6130. }
  6131. }
  6132. }
  6133. return HAL_OK;
  6134. 8002a4c: 2000 movs r0, #0
  6135. 8002a4e: e033 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6136. 8002a50: 2000 movs r0, #0
  6137. 8002a52: e031 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6138. temp1_pllckcfg = RCC->PLLCKSELR;
  6139. 8002a54: 4a20 ldr r2, [pc, #128] @ (8002ad8 <HAL_RCC_OscConfig+0x668>)
  6140. 8002a56: 6a91 ldr r1, [r2, #40] @ 0x28
  6141. temp2_pllckcfg = RCC->PLL1DIVR;
  6142. 8002a58: 6b10 ldr r0, [r2, #48] @ 0x30
  6143. if(((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
  6144. 8002a5a: 2b01 cmp r3, #1
  6145. 8002a5c: d02d beq.n 8002aba <HAL_RCC_OscConfig+0x64a>
  6146. (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
  6147. 8002a5e: f001 0303 and.w r3, r1, #3
  6148. 8002a62: 6aa2 ldr r2, [r4, #40] @ 0x28
  6149. if(((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) ||
  6150. 8002a64: 4293 cmp r3, r2
  6151. 8002a66: d12a bne.n 8002abe <HAL_RCC_OscConfig+0x64e>
  6152. ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) ||
  6153. 8002a68: f3c1 1105 ubfx r1, r1, #4, #6
  6154. 8002a6c: 6ae3 ldr r3, [r4, #44] @ 0x2c
  6155. (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) ||
  6156. 8002a6e: 4299 cmp r1, r3
  6157. 8002a70: d127 bne.n 8002ac2 <HAL_RCC_OscConfig+0x652>
  6158. (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) ||
  6159. 8002a72: f3c0 0208 ubfx r2, r0, #0, #9
  6160. 8002a76: 6b23 ldr r3, [r4, #48] @ 0x30
  6161. 8002a78: 3b01 subs r3, #1
  6162. ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) ||
  6163. 8002a7a: 429a cmp r2, r3
  6164. 8002a7c: d123 bne.n 8002ac6 <HAL_RCC_OscConfig+0x656>
  6165. ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) ||
  6166. 8002a7e: f3c0 2246 ubfx r2, r0, #9, #7
  6167. 8002a82: 6b63 ldr r3, [r4, #52] @ 0x34
  6168. 8002a84: 3b01 subs r3, #1
  6169. (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) ||
  6170. 8002a86: 429a cmp r2, r3
  6171. 8002a88: d11f bne.n 8002aca <HAL_RCC_OscConfig+0x65a>
  6172. ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) ||
  6173. 8002a8a: f3c0 4206 ubfx r2, r0, #16, #7
  6174. 8002a8e: 6ba3 ldr r3, [r4, #56] @ 0x38
  6175. 8002a90: 3b01 subs r3, #1
  6176. ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) ||
  6177. 8002a92: 429a cmp r2, r3
  6178. 8002a94: d11b bne.n 8002ace <HAL_RCC_OscConfig+0x65e>
  6179. ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_R1) >> RCC_PLL1DIVR_R1_Pos) != (RCC_OscInitStruct->PLL.PLLR - 1U)))
  6180. 8002a96: f3c0 6006 ubfx r0, r0, #24, #7
  6181. 8002a9a: 6be3 ldr r3, [r4, #60] @ 0x3c
  6182. 8002a9c: 3b01 subs r3, #1
  6183. ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) ||
  6184. 8002a9e: 4298 cmp r0, r3
  6185. 8002aa0: d117 bne.n 8002ad2 <HAL_RCC_OscConfig+0x662>
  6186. return HAL_OK;
  6187. 8002aa2: 2000 movs r0, #0
  6188. 8002aa4: e008 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6189. return HAL_ERROR;
  6190. 8002aa6: 2001 movs r0, #1
  6191. }
  6192. 8002aa8: 4770 bx lr
  6193. return HAL_ERROR;
  6194. 8002aaa: 2001 movs r0, #1
  6195. 8002aac: e004 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6196. return HAL_ERROR;
  6197. 8002aae: 2001 movs r0, #1
  6198. 8002ab0: e002 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6199. return HAL_ERROR;
  6200. 8002ab2: 2001 movs r0, #1
  6201. 8002ab4: e000 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6202. return HAL_OK;
  6203. 8002ab6: 2000 movs r0, #0
  6204. }
  6205. 8002ab8: bd38 pop {r3, r4, r5, pc}
  6206. return HAL_ERROR;
  6207. 8002aba: 2001 movs r0, #1
  6208. 8002abc: e7fc b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6209. 8002abe: 2001 movs r0, #1
  6210. 8002ac0: e7fa b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6211. 8002ac2: 2001 movs r0, #1
  6212. 8002ac4: e7f8 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6213. 8002ac6: 2001 movs r0, #1
  6214. 8002ac8: e7f6 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6215. 8002aca: 2001 movs r0, #1
  6216. 8002acc: e7f4 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6217. 8002ace: 2001 movs r0, #1
  6218. 8002ad0: e7f2 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6219. 8002ad2: 2001 movs r0, #1
  6220. 8002ad4: e7f0 b.n 8002ab8 <HAL_RCC_OscConfig+0x648>
  6221. 8002ad6: bf00 nop
  6222. 8002ad8: 58024400 .word 0x58024400
  6223. 8002adc: fffffc0c .word 0xfffffc0c
  6224. 8002ae0: ffff0007 .word 0xffff0007
  6225. 08002ae4 <HAL_RCC_GetSysClockFreq>:
  6226. float_t fracn1, pllvco;
  6227. uint32_t sysclockfreq;
  6228. /* Get SYSCLK source -------------------------------------------------------*/
  6229. switch (RCC->CFGR & RCC_CFGR_SWS)
  6230. 8002ae4: 4b74 ldr r3, [pc, #464] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6231. 8002ae6: 691b ldr r3, [r3, #16]
  6232. 8002ae8: f003 0338 and.w r3, r3, #56 @ 0x38
  6233. 8002aec: 2b10 cmp r3, #16
  6234. 8002aee: f000 80de beq.w 8002cae <HAL_RCC_GetSysClockFreq+0x1ca>
  6235. 8002af2: 2b18 cmp r3, #24
  6236. 8002af4: d00f beq.n 8002b16 <HAL_RCC_GetSysClockFreq+0x32>
  6237. 8002af6: b10b cbz r3, 8002afc <HAL_RCC_GetSysClockFreq+0x18>
  6238. 8002af8: 4870 ldr r0, [pc, #448] @ (8002cbc <HAL_RCC_GetSysClockFreq+0x1d8>)
  6239. 8002afa: 4770 bx lr
  6240. {
  6241. case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */
  6242. if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U)
  6243. 8002afc: 4b6e ldr r3, [pc, #440] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6244. 8002afe: 681b ldr r3, [r3, #0]
  6245. 8002b00: f013 0f20 tst.w r3, #32
  6246. 8002b04: f000 80d5 beq.w 8002cb2 <HAL_RCC_GetSysClockFreq+0x1ce>
  6247. {
  6248. sysclockfreq = (uint32_t) (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER()>> 3));
  6249. 8002b08: 4b6b ldr r3, [pc, #428] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6250. 8002b0a: 681b ldr r3, [r3, #0]
  6251. 8002b0c: f3c3 03c1 ubfx r3, r3, #3, #2
  6252. 8002b10: 486b ldr r0, [pc, #428] @ (8002cc0 <HAL_RCC_GetSysClockFreq+0x1dc>)
  6253. 8002b12: 40d8 lsrs r0, r3
  6254. 8002b14: 4770 bx lr
  6255. {
  6256. 8002b16: b410 push {r4}
  6257. case RCC_CFGR_SWS_PLL1: /* PLL1 used as system clock source */
  6258. /* PLL_VCO = (HSE_VALUE or HSI_VALUE or CSI_VALUE/ PLLM) * PLLN
  6259. SYSCLK = PLL_VCO / PLLR
  6260. */
  6261. pllsource = (RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC);
  6262. 8002b18: 4b67 ldr r3, [pc, #412] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6263. 8002b1a: 6a9a ldr r2, [r3, #40] @ 0x28
  6264. 8002b1c: f002 0203 and.w r2, r2, #3
  6265. pllm = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM1)>> 4) ;
  6266. 8002b20: 6a9c ldr r4, [r3, #40] @ 0x28
  6267. 8002b22: f3c4 1005 ubfx r0, r4, #4, #6
  6268. pllfracen = ((RCC-> PLLCFGR & RCC_PLLCFGR_PLL1FRACEN)>>RCC_PLLCFGR_PLL1FRACEN_Pos);
  6269. 8002b26: 6ad9 ldr r1, [r3, #44] @ 0x2c
  6270. 8002b28: f001 0101 and.w r1, r1, #1
  6271. fracn1 = (float_t)(uint32_t)(pllfracen* ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1)>> 3));
  6272. 8002b2c: 6b5b ldr r3, [r3, #52] @ 0x34
  6273. 8002b2e: f3c3 03cc ubfx r3, r3, #3, #13
  6274. 8002b32: fb01 f303 mul.w r3, r1, r3
  6275. 8002b36: ee07 3a90 vmov s15, r3
  6276. 8002b3a: eef8 7a67 vcvt.f32.u32 s15, s15
  6277. if (pllm != 0U)
  6278. 8002b3e: f414 7f7c tst.w r4, #1008 @ 0x3f0
  6279. 8002b42: f000 8094 beq.w 8002c6e <HAL_RCC_GetSysClockFreq+0x18a>
  6280. {
  6281. switch (pllsource)
  6282. 8002b46: 2a01 cmp r2, #1
  6283. 8002b48: d066 beq.n 8002c18 <HAL_RCC_GetSysClockFreq+0x134>
  6284. 8002b4a: 2a02 cmp r2, #2
  6285. 8002b4c: f000 8092 beq.w 8002c74 <HAL_RCC_GetSysClockFreq+0x190>
  6286. 8002b50: b1e2 cbz r2, 8002b8c <HAL_RCC_GetSysClockFreq+0xa8>
  6287. case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */
  6288. pllvco = ((float_t)HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
  6289. break;
  6290. default:
  6291. pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
  6292. 8002b52: ee07 0a10 vmov s14, r0
  6293. 8002b56: eef8 6a47 vcvt.f32.u32 s13, s14
  6294. 8002b5a: ed9f 6a5a vldr s12, [pc, #360] @ 8002cc4 <HAL_RCC_GetSysClockFreq+0x1e0>
  6295. 8002b5e: ee86 7a26 vdiv.f32 s14, s12, s13
  6296. 8002b62: 4b55 ldr r3, [pc, #340] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6297. 8002b64: 6b1b ldr r3, [r3, #48] @ 0x30
  6298. 8002b66: f3c3 0308 ubfx r3, r3, #0, #9
  6299. 8002b6a: ee06 3a90 vmov s13, r3
  6300. 8002b6e: eef8 6a66 vcvt.f32.u32 s13, s13
  6301. 8002b72: ed9f 6a55 vldr s12, [pc, #340] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
  6302. 8002b76: ee67 7a86 vmul.f32 s15, s15, s12
  6303. 8002b7a: ee76 7aa7 vadd.f32 s15, s13, s15
  6304. 8002b7e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
  6305. 8002b82: ee77 7aa6 vadd.f32 s15, s15, s13
  6306. 8002b86: ee27 7a27 vmul.f32 s14, s14, s15
  6307. break;
  6308. 8002b8a: e061 b.n 8002c50 <HAL_RCC_GetSysClockFreq+0x16c>
  6309. if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U)
  6310. 8002b8c: 4b4a ldr r3, [pc, #296] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6311. 8002b8e: 681b ldr r3, [r3, #0]
  6312. 8002b90: f013 0f20 tst.w r3, #32
  6313. 8002b94: d023 beq.n 8002bde <HAL_RCC_GetSysClockFreq+0xfa>
  6314. hsivalue= (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER()>> 3));
  6315. 8002b96: 4948 ldr r1, [pc, #288] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6316. 8002b98: 680a ldr r2, [r1, #0]
  6317. 8002b9a: f3c2 02c1 ubfx r2, r2, #3, #2
  6318. 8002b9e: 4b48 ldr r3, [pc, #288] @ (8002cc0 <HAL_RCC_GetSysClockFreq+0x1dc>)
  6319. 8002ba0: 40d3 lsrs r3, r2
  6320. pllvco = ( (float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
  6321. 8002ba2: ee07 3a10 vmov s14, r3
  6322. 8002ba6: eef8 6a47 vcvt.f32.u32 s13, s14
  6323. 8002baa: ee07 0a10 vmov s14, r0
  6324. 8002bae: eeb8 6a47 vcvt.f32.u32 s12, s14
  6325. 8002bb2: ee86 7a86 vdiv.f32 s14, s13, s12
  6326. 8002bb6: 6b0b ldr r3, [r1, #48] @ 0x30
  6327. 8002bb8: f3c3 0308 ubfx r3, r3, #0, #9
  6328. 8002bbc: ee06 3a90 vmov s13, r3
  6329. 8002bc0: eef8 6a66 vcvt.f32.u32 s13, s13
  6330. 8002bc4: ed9f 6a40 vldr s12, [pc, #256] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
  6331. 8002bc8: ee67 7a86 vmul.f32 s15, s15, s12
  6332. 8002bcc: ee76 7aa7 vadd.f32 s15, s13, s15
  6333. 8002bd0: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
  6334. 8002bd4: ee77 7aa6 vadd.f32 s15, s15, s13
  6335. 8002bd8: ee27 7a27 vmul.f32 s14, s14, s15
  6336. 8002bdc: e038 b.n 8002c50 <HAL_RCC_GetSysClockFreq+0x16c>
  6337. pllvco = ((float_t)HSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
  6338. 8002bde: ee07 0a10 vmov s14, r0
  6339. 8002be2: eef8 6a47 vcvt.f32.u32 s13, s14
  6340. 8002be6: ed9f 6a39 vldr s12, [pc, #228] @ 8002ccc <HAL_RCC_GetSysClockFreq+0x1e8>
  6341. 8002bea: ee86 7a26 vdiv.f32 s14, s12, s13
  6342. 8002bee: 4b32 ldr r3, [pc, #200] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6343. 8002bf0: 6b1b ldr r3, [r3, #48] @ 0x30
  6344. 8002bf2: f3c3 0308 ubfx r3, r3, #0, #9
  6345. 8002bf6: ee06 3a90 vmov s13, r3
  6346. 8002bfa: eef8 6a66 vcvt.f32.u32 s13, s13
  6347. 8002bfe: ed9f 6a32 vldr s12, [pc, #200] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
  6348. 8002c02: ee67 7a86 vmul.f32 s15, s15, s12
  6349. 8002c06: ee76 7aa7 vadd.f32 s15, s13, s15
  6350. 8002c0a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
  6351. 8002c0e: ee77 7aa6 vadd.f32 s15, s15, s13
  6352. 8002c12: ee27 7a27 vmul.f32 s14, s14, s15
  6353. 8002c16: e01b b.n 8002c50 <HAL_RCC_GetSysClockFreq+0x16c>
  6354. pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
  6355. 8002c18: ee07 0a10 vmov s14, r0
  6356. 8002c1c: eef8 6a47 vcvt.f32.u32 s13, s14
  6357. 8002c20: ed9f 6a28 vldr s12, [pc, #160] @ 8002cc4 <HAL_RCC_GetSysClockFreq+0x1e0>
  6358. 8002c24: ee86 7a26 vdiv.f32 s14, s12, s13
  6359. 8002c28: 4b23 ldr r3, [pc, #140] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6360. 8002c2a: 6b1b ldr r3, [r3, #48] @ 0x30
  6361. 8002c2c: f3c3 0308 ubfx r3, r3, #0, #9
  6362. 8002c30: ee06 3a90 vmov s13, r3
  6363. 8002c34: eef8 6a66 vcvt.f32.u32 s13, s13
  6364. 8002c38: ed9f 6a23 vldr s12, [pc, #140] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
  6365. 8002c3c: ee67 7a86 vmul.f32 s15, s15, s12
  6366. 8002c40: ee76 7aa7 vadd.f32 s15, s13, s15
  6367. 8002c44: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
  6368. 8002c48: ee77 7aa6 vadd.f32 s15, s15, s13
  6369. 8002c4c: ee27 7a27 vmul.f32 s14, s14, s15
  6370. }
  6371. pllp = (((RCC->PLL1DIVR & RCC_PLL1DIVR_P1) >>9) + 1U ) ;
  6372. 8002c50: 4b19 ldr r3, [pc, #100] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6373. 8002c52: 6b1b ldr r3, [r3, #48] @ 0x30
  6374. 8002c54: f3c3 2346 ubfx r3, r3, #9, #7
  6375. 8002c58: 3301 adds r3, #1
  6376. sysclockfreq = (uint32_t)(float_t)(pllvco/(float_t)pllp);
  6377. 8002c5a: ee07 3a90 vmov s15, r3
  6378. 8002c5e: eef8 7a67 vcvt.f32.u32 s15, s15
  6379. 8002c62: eec7 6a27 vdiv.f32 s13, s14, s15
  6380. 8002c66: eefc 7ae6 vcvt.u32.f32 s15, s13
  6381. 8002c6a: ee17 0a90 vmov r0, s15
  6382. sysclockfreq = CSI_VALUE;
  6383. break;
  6384. }
  6385. return sysclockfreq;
  6386. }
  6387. 8002c6e: f85d 4b04 ldr.w r4, [sp], #4
  6388. 8002c72: 4770 bx lr
  6389. pllvco = ((float_t)HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 );
  6390. 8002c74: ee07 0a10 vmov s14, r0
  6391. 8002c78: eef8 6a47 vcvt.f32.u32 s13, s14
  6392. 8002c7c: ed9f 6a14 vldr s12, [pc, #80] @ 8002cd0 <HAL_RCC_GetSysClockFreq+0x1ec>
  6393. 8002c80: ee86 7a26 vdiv.f32 s14, s12, s13
  6394. 8002c84: 4b0c ldr r3, [pc, #48] @ (8002cb8 <HAL_RCC_GetSysClockFreq+0x1d4>)
  6395. 8002c86: 6b1b ldr r3, [r3, #48] @ 0x30
  6396. 8002c88: f3c3 0308 ubfx r3, r3, #0, #9
  6397. 8002c8c: ee06 3a90 vmov s13, r3
  6398. 8002c90: eef8 6a66 vcvt.f32.u32 s13, s13
  6399. 8002c94: ed9f 6a0c vldr s12, [pc, #48] @ 8002cc8 <HAL_RCC_GetSysClockFreq+0x1e4>
  6400. 8002c98: ee67 7a86 vmul.f32 s15, s15, s12
  6401. 8002c9c: ee76 7aa7 vadd.f32 s15, s13, s15
  6402. 8002ca0: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0
  6403. 8002ca4: ee77 7aa6 vadd.f32 s15, s15, s13
  6404. 8002ca8: ee27 7a27 vmul.f32 s14, s14, s15
  6405. break;
  6406. 8002cac: e7d0 b.n 8002c50 <HAL_RCC_GetSysClockFreq+0x16c>
  6407. sysclockfreq = HSE_VALUE;
  6408. 8002cae: 4809 ldr r0, [pc, #36] @ (8002cd4 <HAL_RCC_GetSysClockFreq+0x1f0>)
  6409. 8002cb0: 4770 bx lr
  6410. sysclockfreq = (uint32_t) HSI_VALUE;
  6411. 8002cb2: 4803 ldr r0, [pc, #12] @ (8002cc0 <HAL_RCC_GetSysClockFreq+0x1dc>)
  6412. }
  6413. 8002cb4: 4770 bx lr
  6414. 8002cb6: bf00 nop
  6415. 8002cb8: 58024400 .word 0x58024400
  6416. 8002cbc: 003d0900 .word 0x003d0900
  6417. 8002cc0: 03d09000 .word 0x03d09000
  6418. 8002cc4: 4a742400 .word 0x4a742400
  6419. 8002cc8: 39000000 .word 0x39000000
  6420. 8002ccc: 4c742400 .word 0x4c742400
  6421. 8002cd0: 4bbebc20 .word 0x4bbebc20
  6422. 8002cd4: 017d7840 .word 0x017d7840
  6423. 08002cd8 <HAL_RCC_ClockConfig>:
  6424. if(RCC_ClkInitStruct == NULL)
  6425. 8002cd8: 2800 cmp r0, #0
  6426. 8002cda: f000 8132 beq.w 8002f42 <HAL_RCC_ClockConfig+0x26a>
  6427. {
  6428. 8002cde: b570 push {r4, r5, r6, lr}
  6429. 8002ce0: 460d mov r5, r1
  6430. 8002ce2: 4604 mov r4, r0
  6431. if(FLatency > __HAL_FLASH_GET_LATENCY())
  6432. 8002ce4: 4b9b ldr r3, [pc, #620] @ (8002f54 <HAL_RCC_ClockConfig+0x27c>)
  6433. 8002ce6: 681b ldr r3, [r3, #0]
  6434. 8002ce8: f003 030f and.w r3, r3, #15
  6435. 8002cec: 428b cmp r3, r1
  6436. 8002cee: d20b bcs.n 8002d08 <HAL_RCC_ClockConfig+0x30>
  6437. __HAL_FLASH_SET_LATENCY(FLatency);
  6438. 8002cf0: 4a98 ldr r2, [pc, #608] @ (8002f54 <HAL_RCC_ClockConfig+0x27c>)
  6439. 8002cf2: 6813 ldr r3, [r2, #0]
  6440. 8002cf4: f023 030f bic.w r3, r3, #15
  6441. 8002cf8: 430b orrs r3, r1
  6442. 8002cfa: 6013 str r3, [r2, #0]
  6443. if(__HAL_FLASH_GET_LATENCY() != FLatency)
  6444. 8002cfc: 6813 ldr r3, [r2, #0]
  6445. 8002cfe: f003 030f and.w r3, r3, #15
  6446. 8002d02: 428b cmp r3, r1
  6447. 8002d04: f040 811f bne.w 8002f46 <HAL_RCC_ClockConfig+0x26e>
  6448. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1)
  6449. 8002d08: 6823 ldr r3, [r4, #0]
  6450. 8002d0a: f013 0f04 tst.w r3, #4
  6451. 8002d0e: d00c beq.n 8002d2a <HAL_RCC_ClockConfig+0x52>
  6452. if((RCC_ClkInitStruct->APB3CLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_D1PPRE))
  6453. 8002d10: 6922 ldr r2, [r4, #16]
  6454. 8002d12: 4b91 ldr r3, [pc, #580] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6455. 8002d14: 699b ldr r3, [r3, #24]
  6456. 8002d16: f003 0370 and.w r3, r3, #112 @ 0x70
  6457. 8002d1a: 429a cmp r2, r3
  6458. 8002d1c: d905 bls.n 8002d2a <HAL_RCC_ClockConfig+0x52>
  6459. MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider);
  6460. 8002d1e: 498e ldr r1, [pc, #568] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6461. 8002d20: 698b ldr r3, [r1, #24]
  6462. 8002d22: f023 0370 bic.w r3, r3, #112 @ 0x70
  6463. 8002d26: 431a orrs r2, r3
  6464. 8002d28: 618a str r2, [r1, #24]
  6465. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
  6466. 8002d2a: 6823 ldr r3, [r4, #0]
  6467. 8002d2c: f013 0f08 tst.w r3, #8
  6468. 8002d30: d00c beq.n 8002d4c <HAL_RCC_ClockConfig+0x74>
  6469. if((RCC_ClkInitStruct->APB1CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1))
  6470. 8002d32: 6962 ldr r2, [r4, #20]
  6471. 8002d34: 4b88 ldr r3, [pc, #544] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6472. 8002d36: 69db ldr r3, [r3, #28]
  6473. 8002d38: f003 0370 and.w r3, r3, #112 @ 0x70
  6474. 8002d3c: 429a cmp r2, r3
  6475. 8002d3e: d905 bls.n 8002d4c <HAL_RCC_ClockConfig+0x74>
  6476. MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider));
  6477. 8002d40: 4985 ldr r1, [pc, #532] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6478. 8002d42: 69cb ldr r3, [r1, #28]
  6479. 8002d44: f023 0370 bic.w r3, r3, #112 @ 0x70
  6480. 8002d48: 431a orrs r2, r3
  6481. 8002d4a: 61ca str r2, [r1, #28]
  6482. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
  6483. 8002d4c: 6823 ldr r3, [r4, #0]
  6484. 8002d4e: f013 0f10 tst.w r3, #16
  6485. 8002d52: d00c beq.n 8002d6e <HAL_RCC_ClockConfig+0x96>
  6486. if((RCC_ClkInitStruct->APB2CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2))
  6487. 8002d54: 69a2 ldr r2, [r4, #24]
  6488. 8002d56: 4b80 ldr r3, [pc, #512] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6489. 8002d58: 69db ldr r3, [r3, #28]
  6490. 8002d5a: f403 63e0 and.w r3, r3, #1792 @ 0x700
  6491. 8002d5e: 429a cmp r2, r3
  6492. 8002d60: d905 bls.n 8002d6e <HAL_RCC_ClockConfig+0x96>
  6493. MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider));
  6494. 8002d62: 497d ldr r1, [pc, #500] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6495. 8002d64: 69cb ldr r3, [r1, #28]
  6496. 8002d66: f423 63e0 bic.w r3, r3, #1792 @ 0x700
  6497. 8002d6a: 431a orrs r2, r3
  6498. 8002d6c: 61ca str r2, [r1, #28]
  6499. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1)
  6500. 8002d6e: 6823 ldr r3, [r4, #0]
  6501. 8002d70: f013 0f20 tst.w r3, #32
  6502. 8002d74: d00c beq.n 8002d90 <HAL_RCC_ClockConfig+0xb8>
  6503. if((RCC_ClkInitStruct->APB4CLKDivider) > (RCC->D3CFGR & RCC_D3CFGR_D3PPRE))
  6504. 8002d76: 69e2 ldr r2, [r4, #28]
  6505. 8002d78: 4b77 ldr r3, [pc, #476] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6506. 8002d7a: 6a1b ldr r3, [r3, #32]
  6507. 8002d7c: f003 0370 and.w r3, r3, #112 @ 0x70
  6508. 8002d80: 429a cmp r2, r3
  6509. 8002d82: d905 bls.n 8002d90 <HAL_RCC_ClockConfig+0xb8>
  6510. MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider) );
  6511. 8002d84: 4974 ldr r1, [pc, #464] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6512. 8002d86: 6a0b ldr r3, [r1, #32]
  6513. 8002d88: f023 0370 bic.w r3, r3, #112 @ 0x70
  6514. 8002d8c: 431a orrs r2, r3
  6515. 8002d8e: 620a str r2, [r1, #32]
  6516. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
  6517. 8002d90: 6823 ldr r3, [r4, #0]
  6518. 8002d92: f013 0f02 tst.w r3, #2
  6519. 8002d96: d00c beq.n 8002db2 <HAL_RCC_ClockConfig+0xda>
  6520. if((RCC_ClkInitStruct->AHBCLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_HPRE))
  6521. 8002d98: 68e2 ldr r2, [r4, #12]
  6522. 8002d9a: 4b6f ldr r3, [pc, #444] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6523. 8002d9c: 699b ldr r3, [r3, #24]
  6524. 8002d9e: f003 030f and.w r3, r3, #15
  6525. 8002da2: 429a cmp r2, r3
  6526. 8002da4: d905 bls.n 8002db2 <HAL_RCC_ClockConfig+0xda>
  6527. MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
  6528. 8002da6: 496c ldr r1, [pc, #432] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6529. 8002da8: 698b ldr r3, [r1, #24]
  6530. 8002daa: f023 030f bic.w r3, r3, #15
  6531. 8002dae: 431a orrs r2, r3
  6532. 8002db0: 618a str r2, [r1, #24]
  6533. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK)
  6534. 8002db2: 6823 ldr r3, [r4, #0]
  6535. 8002db4: f013 0f01 tst.w r3, #1
  6536. 8002db8: d041 beq.n 8002e3e <HAL_RCC_ClockConfig+0x166>
  6537. MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1CPRE, RCC_ClkInitStruct->SYSCLKDivider);
  6538. 8002dba: 4a67 ldr r2, [pc, #412] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6539. 8002dbc: 6993 ldr r3, [r2, #24]
  6540. 8002dbe: f423 6370 bic.w r3, r3, #3840 @ 0xf00
  6541. 8002dc2: 68a1 ldr r1, [r4, #8]
  6542. 8002dc4: 430b orrs r3, r1
  6543. 8002dc6: 6193 str r3, [r2, #24]
  6544. if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE)
  6545. 8002dc8: 6863 ldr r3, [r4, #4]
  6546. 8002dca: 2b02 cmp r3, #2
  6547. 8002dcc: d00a beq.n 8002de4 <HAL_RCC_ClockConfig+0x10c>
  6548. else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK)
  6549. 8002dce: 2b03 cmp r3, #3
  6550. 8002dd0: d027 beq.n 8002e22 <HAL_RCC_ClockConfig+0x14a>
  6551. else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_CSI)
  6552. 8002dd2: 2b01 cmp r3, #1
  6553. 8002dd4: d02c beq.n 8002e30 <HAL_RCC_ClockConfig+0x158>
  6554. if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U)
  6555. 8002dd6: 4a60 ldr r2, [pc, #384] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6556. 8002dd8: 6812 ldr r2, [r2, #0]
  6557. 8002dda: f012 0f04 tst.w r2, #4
  6558. 8002dde: d106 bne.n 8002dee <HAL_RCC_ClockConfig+0x116>
  6559. return HAL_ERROR;
  6560. 8002de0: 2001 movs r0, #1
  6561. 8002de2: e0ad b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
  6562. if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U)
  6563. 8002de4: 6812 ldr r2, [r2, #0]
  6564. 8002de6: f412 3f00 tst.w r2, #131072 @ 0x20000
  6565. 8002dea: f000 80ae beq.w 8002f4a <HAL_RCC_ClockConfig+0x272>
  6566. MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource);
  6567. 8002dee: 495a ldr r1, [pc, #360] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6568. 8002df0: 690a ldr r2, [r1, #16]
  6569. 8002df2: f022 0207 bic.w r2, r2, #7
  6570. 8002df6: 4313 orrs r3, r2
  6571. 8002df8: 610b str r3, [r1, #16]
  6572. tickstart = HAL_GetTick();
  6573. 8002dfa: f7fe f847 bl 8000e8c <HAL_GetTick>
  6574. 8002dfe: 4606 mov r6, r0
  6575. while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos))
  6576. 8002e00: 4b55 ldr r3, [pc, #340] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6577. 8002e02: 691b ldr r3, [r3, #16]
  6578. 8002e04: f003 0338 and.w r3, r3, #56 @ 0x38
  6579. 8002e08: 6862 ldr r2, [r4, #4]
  6580. 8002e0a: ebb3 0fc2 cmp.w r3, r2, lsl #3
  6581. 8002e0e: d016 beq.n 8002e3e <HAL_RCC_ClockConfig+0x166>
  6582. if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE)
  6583. 8002e10: f7fe f83c bl 8000e8c <HAL_GetTick>
  6584. 8002e14: 1b80 subs r0, r0, r6
  6585. 8002e16: f241 3388 movw r3, #5000 @ 0x1388
  6586. 8002e1a: 4298 cmp r0, r3
  6587. 8002e1c: d9f0 bls.n 8002e00 <HAL_RCC_ClockConfig+0x128>
  6588. return HAL_TIMEOUT;
  6589. 8002e1e: 2003 movs r0, #3
  6590. 8002e20: e08e b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
  6591. if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U)
  6592. 8002e22: 4a4d ldr r2, [pc, #308] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6593. 8002e24: 6812 ldr r2, [r2, #0]
  6594. 8002e26: f012 7f00 tst.w r2, #33554432 @ 0x2000000
  6595. 8002e2a: d1e0 bne.n 8002dee <HAL_RCC_ClockConfig+0x116>
  6596. return HAL_ERROR;
  6597. 8002e2c: 2001 movs r0, #1
  6598. 8002e2e: e087 b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
  6599. if(__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U)
  6600. 8002e30: 4a49 ldr r2, [pc, #292] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6601. 8002e32: 6812 ldr r2, [r2, #0]
  6602. 8002e34: f412 7f80 tst.w r2, #256 @ 0x100
  6603. 8002e38: d1d9 bne.n 8002dee <HAL_RCC_ClockConfig+0x116>
  6604. return HAL_ERROR;
  6605. 8002e3a: 2001 movs r0, #1
  6606. 8002e3c: e080 b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
  6607. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK)
  6608. 8002e3e: 6823 ldr r3, [r4, #0]
  6609. 8002e40: f013 0f02 tst.w r3, #2
  6610. 8002e44: d00c beq.n 8002e60 <HAL_RCC_ClockConfig+0x188>
  6611. if((RCC_ClkInitStruct->AHBCLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_HPRE))
  6612. 8002e46: 68e2 ldr r2, [r4, #12]
  6613. 8002e48: 4b43 ldr r3, [pc, #268] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6614. 8002e4a: 699b ldr r3, [r3, #24]
  6615. 8002e4c: f003 030f and.w r3, r3, #15
  6616. 8002e50: 429a cmp r2, r3
  6617. 8002e52: d205 bcs.n 8002e60 <HAL_RCC_ClockConfig+0x188>
  6618. MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider);
  6619. 8002e54: 4940 ldr r1, [pc, #256] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6620. 8002e56: 698b ldr r3, [r1, #24]
  6621. 8002e58: f023 030f bic.w r3, r3, #15
  6622. 8002e5c: 431a orrs r2, r3
  6623. 8002e5e: 618a str r2, [r1, #24]
  6624. if(FLatency < __HAL_FLASH_GET_LATENCY())
  6625. 8002e60: 4b3c ldr r3, [pc, #240] @ (8002f54 <HAL_RCC_ClockConfig+0x27c>)
  6626. 8002e62: 681b ldr r3, [r3, #0]
  6627. 8002e64: f003 030f and.w r3, r3, #15
  6628. 8002e68: 42ab cmp r3, r5
  6629. 8002e6a: d90a bls.n 8002e82 <HAL_RCC_ClockConfig+0x1aa>
  6630. __HAL_FLASH_SET_LATENCY(FLatency);
  6631. 8002e6c: 4a39 ldr r2, [pc, #228] @ (8002f54 <HAL_RCC_ClockConfig+0x27c>)
  6632. 8002e6e: 6813 ldr r3, [r2, #0]
  6633. 8002e70: f023 030f bic.w r3, r3, #15
  6634. 8002e74: 432b orrs r3, r5
  6635. 8002e76: 6013 str r3, [r2, #0]
  6636. if(__HAL_FLASH_GET_LATENCY() != FLatency)
  6637. 8002e78: 6813 ldr r3, [r2, #0]
  6638. 8002e7a: f003 030f and.w r3, r3, #15
  6639. 8002e7e: 42ab cmp r3, r5
  6640. 8002e80: d165 bne.n 8002f4e <HAL_RCC_ClockConfig+0x276>
  6641. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1)
  6642. 8002e82: 6823 ldr r3, [r4, #0]
  6643. 8002e84: f013 0f04 tst.w r3, #4
  6644. 8002e88: d00c beq.n 8002ea4 <HAL_RCC_ClockConfig+0x1cc>
  6645. if((RCC_ClkInitStruct->APB3CLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_D1PPRE))
  6646. 8002e8a: 6922 ldr r2, [r4, #16]
  6647. 8002e8c: 4b32 ldr r3, [pc, #200] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6648. 8002e8e: 699b ldr r3, [r3, #24]
  6649. 8002e90: f003 0370 and.w r3, r3, #112 @ 0x70
  6650. 8002e94: 429a cmp r2, r3
  6651. 8002e96: d205 bcs.n 8002ea4 <HAL_RCC_ClockConfig+0x1cc>
  6652. MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider);
  6653. 8002e98: 492f ldr r1, [pc, #188] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6654. 8002e9a: 698b ldr r3, [r1, #24]
  6655. 8002e9c: f023 0370 bic.w r3, r3, #112 @ 0x70
  6656. 8002ea0: 431a orrs r2, r3
  6657. 8002ea2: 618a str r2, [r1, #24]
  6658. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1)
  6659. 8002ea4: 6823 ldr r3, [r4, #0]
  6660. 8002ea6: f013 0f08 tst.w r3, #8
  6661. 8002eaa: d00c beq.n 8002ec6 <HAL_RCC_ClockConfig+0x1ee>
  6662. if((RCC_ClkInitStruct->APB1CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1))
  6663. 8002eac: 6962 ldr r2, [r4, #20]
  6664. 8002eae: 4b2a ldr r3, [pc, #168] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6665. 8002eb0: 69db ldr r3, [r3, #28]
  6666. 8002eb2: f003 0370 and.w r3, r3, #112 @ 0x70
  6667. 8002eb6: 429a cmp r2, r3
  6668. 8002eb8: d205 bcs.n 8002ec6 <HAL_RCC_ClockConfig+0x1ee>
  6669. MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider));
  6670. 8002eba: 4927 ldr r1, [pc, #156] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6671. 8002ebc: 69cb ldr r3, [r1, #28]
  6672. 8002ebe: f023 0370 bic.w r3, r3, #112 @ 0x70
  6673. 8002ec2: 431a orrs r2, r3
  6674. 8002ec4: 61ca str r2, [r1, #28]
  6675. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2)
  6676. 8002ec6: 6823 ldr r3, [r4, #0]
  6677. 8002ec8: f013 0f10 tst.w r3, #16
  6678. 8002ecc: d00c beq.n 8002ee8 <HAL_RCC_ClockConfig+0x210>
  6679. if((RCC_ClkInitStruct->APB2CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2))
  6680. 8002ece: 69a2 ldr r2, [r4, #24]
  6681. 8002ed0: 4b21 ldr r3, [pc, #132] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6682. 8002ed2: 69db ldr r3, [r3, #28]
  6683. 8002ed4: f403 63e0 and.w r3, r3, #1792 @ 0x700
  6684. 8002ed8: 429a cmp r2, r3
  6685. 8002eda: d205 bcs.n 8002ee8 <HAL_RCC_ClockConfig+0x210>
  6686. MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider));
  6687. 8002edc: 491e ldr r1, [pc, #120] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6688. 8002ede: 69cb ldr r3, [r1, #28]
  6689. 8002ee0: f423 63e0 bic.w r3, r3, #1792 @ 0x700
  6690. 8002ee4: 431a orrs r2, r3
  6691. 8002ee6: 61ca str r2, [r1, #28]
  6692. if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1)
  6693. 8002ee8: 6823 ldr r3, [r4, #0]
  6694. 8002eea: f013 0f20 tst.w r3, #32
  6695. 8002eee: d00c beq.n 8002f0a <HAL_RCC_ClockConfig+0x232>
  6696. if((RCC_ClkInitStruct->APB4CLKDivider) < (RCC->D3CFGR & RCC_D3CFGR_D3PPRE))
  6697. 8002ef0: 69e2 ldr r2, [r4, #28]
  6698. 8002ef2: 4b19 ldr r3, [pc, #100] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6699. 8002ef4: 6a1b ldr r3, [r3, #32]
  6700. 8002ef6: f003 0370 and.w r3, r3, #112 @ 0x70
  6701. 8002efa: 429a cmp r2, r3
  6702. 8002efc: d205 bcs.n 8002f0a <HAL_RCC_ClockConfig+0x232>
  6703. MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider) );
  6704. 8002efe: 4916 ldr r1, [pc, #88] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6705. 8002f00: 6a0b ldr r3, [r1, #32]
  6706. 8002f02: f023 0370 bic.w r3, r3, #112 @ 0x70
  6707. 8002f06: 431a orrs r2, r3
  6708. 8002f08: 620a str r2, [r1, #32]
  6709. common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU);
  6710. 8002f0a: f7ff fdeb bl 8002ae4 <HAL_RCC_GetSysClockFreq>
  6711. 8002f0e: 4912 ldr r1, [pc, #72] @ (8002f58 <HAL_RCC_ClockConfig+0x280>)
  6712. 8002f10: 698b ldr r3, [r1, #24]
  6713. 8002f12: f3c3 2303 ubfx r3, r3, #8, #4
  6714. 8002f16: 4a11 ldr r2, [pc, #68] @ (8002f5c <HAL_RCC_ClockConfig+0x284>)
  6715. 8002f18: 5cd3 ldrb r3, [r2, r3]
  6716. 8002f1a: f003 031f and.w r3, r3, #31
  6717. 8002f1e: 40d8 lsrs r0, r3
  6718. SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU));
  6719. 8002f20: 698b ldr r3, [r1, #24]
  6720. 8002f22: f003 030f and.w r3, r3, #15
  6721. 8002f26: 5cd3 ldrb r3, [r2, r3]
  6722. 8002f28: f003 031f and.w r3, r3, #31
  6723. 8002f2c: fa20 f303 lsr.w r3, r0, r3
  6724. 8002f30: 4a0b ldr r2, [pc, #44] @ (8002f60 <HAL_RCC_ClockConfig+0x288>)
  6725. 8002f32: 6013 str r3, [r2, #0]
  6726. SystemCoreClock = common_system_clock;
  6727. 8002f34: 4b0b ldr r3, [pc, #44] @ (8002f64 <HAL_RCC_ClockConfig+0x28c>)
  6728. 8002f36: 6018 str r0, [r3, #0]
  6729. halstatus = HAL_InitTick (uwTickPrio);
  6730. 8002f38: 4b0b ldr r3, [pc, #44] @ (8002f68 <HAL_RCC_ClockConfig+0x290>)
  6731. 8002f3a: 6818 ldr r0, [r3, #0]
  6732. 8002f3c: f7fd fd7c bl 8000a38 <HAL_InitTick>
  6733. }
  6734. 8002f40: bd70 pop {r4, r5, r6, pc}
  6735. return HAL_ERROR;
  6736. 8002f42: 2001 movs r0, #1
  6737. }
  6738. 8002f44: 4770 bx lr
  6739. return HAL_ERROR;
  6740. 8002f46: 2001 movs r0, #1
  6741. 8002f48: e7fa b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
  6742. return HAL_ERROR;
  6743. 8002f4a: 2001 movs r0, #1
  6744. 8002f4c: e7f8 b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
  6745. return HAL_ERROR;
  6746. 8002f4e: 2001 movs r0, #1
  6747. 8002f50: e7f6 b.n 8002f40 <HAL_RCC_ClockConfig+0x268>
  6748. 8002f52: bf00 nop
  6749. 8002f54: 52002000 .word 0x52002000
  6750. 8002f58: 58024400 .word 0x58024400
  6751. 8002f5c: 08014328 .word 0x08014328
  6752. 8002f60: 24000000 .word 0x24000000
  6753. 8002f64: 24000004 .word 0x24000004
  6754. 8002f68: 2400000c .word 0x2400000c
  6755. 08002f6c <HAL_RCC_GetHCLKFreq>:
  6756. * @note The SystemD2Clock CMSIS variable is used to store System domain2 Clock Frequency
  6757. * and updated within this function
  6758. * @retval HCLK frequency
  6759. */
  6760. uint32_t HAL_RCC_GetHCLKFreq(void)
  6761. {
  6762. 8002f6c: b508 push {r3, lr}
  6763. uint32_t common_system_clock;
  6764. #if defined(RCC_D1CFGR_D1CPRE)
  6765. common_system_clock = HAL_RCC_GetSysClockFreq() >> (D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos] & 0x1FU);
  6766. 8002f6e: f7ff fdb9 bl 8002ae4 <HAL_RCC_GetSysClockFreq>
  6767. 8002f72: 4a0b ldr r2, [pc, #44] @ (8002fa0 <HAL_RCC_GetHCLKFreq+0x34>)
  6768. 8002f74: 6993 ldr r3, [r2, #24]
  6769. 8002f76: f3c3 2303 ubfx r3, r3, #8, #4
  6770. 8002f7a: 490a ldr r1, [pc, #40] @ (8002fa4 <HAL_RCC_GetHCLKFreq+0x38>)
  6771. 8002f7c: 5ccb ldrb r3, [r1, r3]
  6772. 8002f7e: f003 031f and.w r3, r3, #31
  6773. 8002f82: fa20 f303 lsr.w r3, r0, r3
  6774. #else
  6775. common_system_clock = HAL_RCC_GetSysClockFreq() >> (D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE)>> RCC_CDCFGR1_CDCPRE_Pos] & 0x1FU);
  6776. #endif
  6777. #if defined(RCC_D1CFGR_HPRE)
  6778. SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU));
  6779. 8002f86: 6992 ldr r2, [r2, #24]
  6780. 8002f88: f002 020f and.w r2, r2, #15
  6781. 8002f8c: 5c88 ldrb r0, [r1, r2]
  6782. 8002f8e: f000 001f and.w r0, r0, #31
  6783. 8002f92: fa23 f000 lsr.w r0, r3, r0
  6784. 8002f96: 4a04 ldr r2, [pc, #16] @ (8002fa8 <HAL_RCC_GetHCLKFreq+0x3c>)
  6785. 8002f98: 6010 str r0, [r2, #0]
  6786. #endif
  6787. #if defined(DUAL_CORE) && defined(CORE_CM4)
  6788. SystemCoreClock = SystemD2Clock;
  6789. #else
  6790. SystemCoreClock = common_system_clock;
  6791. 8002f9a: 4a04 ldr r2, [pc, #16] @ (8002fac <HAL_RCC_GetHCLKFreq+0x40>)
  6792. 8002f9c: 6013 str r3, [r2, #0]
  6793. #endif /* DUAL_CORE && CORE_CM4 */
  6794. return SystemD2Clock;
  6795. }
  6796. 8002f9e: bd08 pop {r3, pc}
  6797. 8002fa0: 58024400 .word 0x58024400
  6798. 8002fa4: 08014328 .word 0x08014328
  6799. 8002fa8: 24000000 .word 0x24000000
  6800. 8002fac: 24000004 .word 0x24000004
  6801. 08002fb0 <HAL_RCC_GetPCLK1Freq>:
  6802. * @note Each time PCLK1 changes, this function must be called to update the
  6803. * right PCLK1 value. Otherwise, any configuration based on this function will be incorrect.
  6804. * @retval PCLK1 frequency
  6805. */
  6806. uint32_t HAL_RCC_GetPCLK1Freq(void)
  6807. {
  6808. 8002fb0: b508 push {r3, lr}
  6809. #if defined (RCC_D2CFGR_D2PPRE1)
  6810. /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
  6811. return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)>> RCC_D2CFGR_D2PPRE1_Pos]) & 0x1FU));
  6812. 8002fb2: f7ff ffdb bl 8002f6c <HAL_RCC_GetHCLKFreq>
  6813. 8002fb6: 4b05 ldr r3, [pc, #20] @ (8002fcc <HAL_RCC_GetPCLK1Freq+0x1c>)
  6814. 8002fb8: 69db ldr r3, [r3, #28]
  6815. 8002fba: f3c3 1302 ubfx r3, r3, #4, #3
  6816. 8002fbe: 4a04 ldr r2, [pc, #16] @ (8002fd0 <HAL_RCC_GetPCLK1Freq+0x20>)
  6817. 8002fc0: 5cd3 ldrb r3, [r2, r3]
  6818. 8002fc2: f003 031f and.w r3, r3, #31
  6819. #else
  6820. /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/
  6821. return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->CDCFGR2 & RCC_CDCFGR2_CDPPRE1)>> RCC_CDCFGR2_CDPPRE1_Pos]) & 0x1FU));
  6822. #endif
  6823. }
  6824. 8002fc6: 40d8 lsrs r0, r3
  6825. 8002fc8: bd08 pop {r3, pc}
  6826. 8002fca: bf00 nop
  6827. 8002fcc: 58024400 .word 0x58024400
  6828. 8002fd0: 08014328 .word 0x08014328
  6829. 08002fd4 <HAL_RCC_GetClockConfig>:
  6830. * @retval None
  6831. */
  6832. void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency)
  6833. {
  6834. /* Set all possible values for the Clock type parameter --------------------*/
  6835. RCC_ClkInitStruct->ClockType = RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_D1PCLK1 | RCC_CLOCKTYPE_PCLK1 |
  6836. 8002fd4: 233f movs r3, #63 @ 0x3f
  6837. 8002fd6: 6003 str r3, [r0, #0]
  6838. RCC_CLOCKTYPE_PCLK2 | RCC_CLOCKTYPE_D3PCLK1 ;
  6839. /* Get the SYSCLK configuration --------------------------------------------*/
  6840. RCC_ClkInitStruct->SYSCLKSource = (uint32_t)(RCC->CFGR & RCC_CFGR_SW);
  6841. 8002fd8: 4b11 ldr r3, [pc, #68] @ (8003020 <HAL_RCC_GetClockConfig+0x4c>)
  6842. 8002fda: 691a ldr r2, [r3, #16]
  6843. 8002fdc: f002 0207 and.w r2, r2, #7
  6844. 8002fe0: 6042 str r2, [r0, #4]
  6845. #if defined(RCC_D1CFGR_D1CPRE)
  6846. /* Get the SYSCLK configuration ----------------------------------------------*/
  6847. RCC_ClkInitStruct->SYSCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1CPRE);
  6848. 8002fe2: 699a ldr r2, [r3, #24]
  6849. 8002fe4: f402 6270 and.w r2, r2, #3840 @ 0xf00
  6850. 8002fe8: 6082 str r2, [r0, #8]
  6851. /* Get the D1HCLK configuration ----------------------------------------------*/
  6852. RCC_ClkInitStruct->AHBCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_HPRE);
  6853. 8002fea: 699a ldr r2, [r3, #24]
  6854. 8002fec: f002 020f and.w r2, r2, #15
  6855. 8002ff0: 60c2 str r2, [r0, #12]
  6856. /* Get the APB3 configuration ----------------------------------------------*/
  6857. RCC_ClkInitStruct->APB3CLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1PPRE);
  6858. 8002ff2: 699a ldr r2, [r3, #24]
  6859. 8002ff4: f002 0270 and.w r2, r2, #112 @ 0x70
  6860. 8002ff8: 6102 str r2, [r0, #16]
  6861. /* Get the APB1 configuration ----------------------------------------------*/
  6862. RCC_ClkInitStruct->APB1CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1);
  6863. 8002ffa: 69da ldr r2, [r3, #28]
  6864. 8002ffc: f002 0270 and.w r2, r2, #112 @ 0x70
  6865. 8003000: 6142 str r2, [r0, #20]
  6866. /* Get the APB2 configuration ----------------------------------------------*/
  6867. RCC_ClkInitStruct->APB2CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE2);
  6868. 8003002: 69da ldr r2, [r3, #28]
  6869. 8003004: f402 62e0 and.w r2, r2, #1792 @ 0x700
  6870. 8003008: 6182 str r2, [r0, #24]
  6871. /* Get the APB4 configuration ----------------------------------------------*/
  6872. RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->D3CFGR & RCC_D3CFGR_D3PPRE);
  6873. 800300a: 6a1b ldr r3, [r3, #32]
  6874. 800300c: f003 0370 and.w r3, r3, #112 @ 0x70
  6875. 8003010: 61c3 str r3, [r0, #28]
  6876. /* Get the APB4 configuration ----------------------------------------------*/
  6877. RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->SRDCFGR & RCC_SRDCFGR_SRDPPRE);
  6878. #endif
  6879. /* Get the Flash Wait State (Latency) configuration ------------------------*/
  6880. *pFLatency = (uint32_t)(FLASH->ACR & FLASH_ACR_LATENCY);
  6881. 8003012: 4b04 ldr r3, [pc, #16] @ (8003024 <HAL_RCC_GetClockConfig+0x50>)
  6882. 8003014: 681b ldr r3, [r3, #0]
  6883. 8003016: f003 030f and.w r3, r3, #15
  6884. 800301a: 600b str r3, [r1, #0]
  6885. }
  6886. 800301c: 4770 bx lr
  6887. 800301e: bf00 nop
  6888. 8003020: 58024400 .word 0x58024400
  6889. 8003024: 52002000 .word 0x52002000
  6890. 08003028 <HAL_TIM_Base_MspInit>:
  6891. UNUSED(htim);
  6892. /* NOTE : This function should not be modified, when the callback is needed,
  6893. the HAL_TIM_Base_MspInit could be implemented in the user file
  6894. */
  6895. }
  6896. 8003028: 4770 bx lr
  6897. ...
  6898. 0800302c <HAL_TIM_Base_Start_IT>:
  6899. /* Check the parameters */
  6900. assert_param(IS_TIM_INSTANCE(htim->Instance));
  6901. /* Check the TIM state */
  6902. if (htim->State != HAL_TIM_STATE_READY)
  6903. 800302c: f890 303d ldrb.w r3, [r0, #61] @ 0x3d
  6904. 8003030: b2db uxtb r3, r3
  6905. 8003032: 2b01 cmp r3, #1
  6906. 8003034: d13a bne.n 80030ac <HAL_TIM_Base_Start_IT+0x80>
  6907. {
  6908. return HAL_ERROR;
  6909. }
  6910. /* Set the TIM state */
  6911. htim->State = HAL_TIM_STATE_BUSY;
  6912. 8003036: 2302 movs r3, #2
  6913. 8003038: f880 303d strb.w r3, [r0, #61] @ 0x3d
  6914. /* Enable the TIM Update interrupt */
  6915. __HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE);
  6916. 800303c: 6802 ldr r2, [r0, #0]
  6917. 800303e: 68d3 ldr r3, [r2, #12]
  6918. 8003040: f043 0301 orr.w r3, r3, #1
  6919. 8003044: 60d3 str r3, [r2, #12]
  6920. /* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */
  6921. if (IS_TIM_SLAVE_INSTANCE(htim->Instance))
  6922. 8003046: 6803 ldr r3, [r0, #0]
  6923. 8003048: 4a1a ldr r2, [pc, #104] @ (80030b4 <HAL_TIM_Base_Start_IT+0x88>)
  6924. 800304a: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000
  6925. 800304e: bf18 it ne
  6926. 8003050: 4293 cmpne r3, r2
  6927. 8003052: d01d beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
  6928. 8003054: f5a2 427c sub.w r2, r2, #64512 @ 0xfc00
  6929. 8003058: 4293 cmp r3, r2
  6930. 800305a: d019 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
  6931. 800305c: f502 6280 add.w r2, r2, #1024 @ 0x400
  6932. 8003060: 4293 cmp r3, r2
  6933. 8003062: d015 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
  6934. 8003064: f502 6280 add.w r2, r2, #1024 @ 0x400
  6935. 8003068: 4293 cmp r3, r2
  6936. 800306a: d011 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
  6937. 800306c: f502 4278 add.w r2, r2, #63488 @ 0xf800
  6938. 8003070: 4293 cmp r3, r2
  6939. 8003072: d00d beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
  6940. 8003074: f5a2 426c sub.w r2, r2, #60416 @ 0xec00
  6941. 8003078: 4293 cmp r3, r2
  6942. 800307a: d009 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
  6943. 800307c: f502 3294 add.w r2, r2, #75776 @ 0x12800
  6944. 8003080: 4293 cmp r3, r2
  6945. 8003082: d005 beq.n 8003090 <HAL_TIM_Base_Start_IT+0x64>
  6946. __HAL_TIM_ENABLE(htim);
  6947. }
  6948. }
  6949. else
  6950. {
  6951. __HAL_TIM_ENABLE(htim);
  6952. 8003084: 681a ldr r2, [r3, #0]
  6953. 8003086: f042 0201 orr.w r2, r2, #1
  6954. 800308a: 601a str r2, [r3, #0]
  6955. }
  6956. /* Return function status */
  6957. return HAL_OK;
  6958. 800308c: 2000 movs r0, #0
  6959. 800308e: 4770 bx lr
  6960. tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS;
  6961. 8003090: 6899 ldr r1, [r3, #8]
  6962. 8003092: 4a09 ldr r2, [pc, #36] @ (80030b8 <HAL_TIM_Base_Start_IT+0x8c>)
  6963. 8003094: 400a ands r2, r1
  6964. if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr))
  6965. 8003096: 2a06 cmp r2, #6
  6966. 8003098: bf18 it ne
  6967. 800309a: f5b2 3f80 cmpne.w r2, #65536 @ 0x10000
  6968. 800309e: d007 beq.n 80030b0 <HAL_TIM_Base_Start_IT+0x84>
  6969. __HAL_TIM_ENABLE(htim);
  6970. 80030a0: 681a ldr r2, [r3, #0]
  6971. 80030a2: f042 0201 orr.w r2, r2, #1
  6972. 80030a6: 601a str r2, [r3, #0]
  6973. return HAL_OK;
  6974. 80030a8: 2000 movs r0, #0
  6975. 80030aa: 4770 bx lr
  6976. return HAL_ERROR;
  6977. 80030ac: 2001 movs r0, #1
  6978. 80030ae: 4770 bx lr
  6979. return HAL_OK;
  6980. 80030b0: 2000 movs r0, #0
  6981. }
  6982. 80030b2: 4770 bx lr
  6983. 80030b4: 40010000 .word 0x40010000
  6984. 80030b8: 00010007 .word 0x00010007
  6985. 080030bc <HAL_TIM_OC_DelayElapsedCallback>:
  6986. UNUSED(htim);
  6987. /* NOTE : This function should not be modified, when the callback is needed,
  6988. the HAL_TIM_OC_DelayElapsedCallback could be implemented in the user file
  6989. */
  6990. }
  6991. 80030bc: 4770 bx lr
  6992. 080030be <HAL_TIM_IC_CaptureCallback>:
  6993. UNUSED(htim);
  6994. /* NOTE : This function should not be modified, when the callback is needed,
  6995. the HAL_TIM_IC_CaptureCallback could be implemented in the user file
  6996. */
  6997. }
  6998. 80030be: 4770 bx lr
  6999. 080030c0 <HAL_TIM_PWM_PulseFinishedCallback>:
  7000. UNUSED(htim);
  7001. /* NOTE : This function should not be modified, when the callback is needed,
  7002. the HAL_TIM_PWM_PulseFinishedCallback could be implemented in the user file
  7003. */
  7004. }
  7005. 80030c0: 4770 bx lr
  7006. 080030c2 <HAL_TIM_TriggerCallback>:
  7007. UNUSED(htim);
  7008. /* NOTE : This function should not be modified, when the callback is needed,
  7009. the HAL_TIM_TriggerCallback could be implemented in the user file
  7010. */
  7011. }
  7012. 80030c2: 4770 bx lr
  7013. 080030c4 <HAL_TIM_IRQHandler>:
  7014. {
  7015. 80030c4: b510 push {r4, lr}
  7016. 80030c6: 4604 mov r4, r0
  7017. if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET)
  7018. 80030c8: 6803 ldr r3, [r0, #0]
  7019. 80030ca: 691a ldr r2, [r3, #16]
  7020. 80030cc: f012 0f02 tst.w r2, #2
  7021. 80030d0: d011 beq.n 80030f6 <HAL_TIM_IRQHandler+0x32>
  7022. if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET)
  7023. 80030d2: 68da ldr r2, [r3, #12]
  7024. 80030d4: f012 0f02 tst.w r2, #2
  7025. 80030d8: d00d beq.n 80030f6 <HAL_TIM_IRQHandler+0x32>
  7026. __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1);
  7027. 80030da: f06f 0202 mvn.w r2, #2
  7028. 80030de: 611a str r2, [r3, #16]
  7029. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1;
  7030. 80030e0: 2301 movs r3, #1
  7031. 80030e2: 7703 strb r3, [r0, #28]
  7032. if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U)
  7033. 80030e4: 6803 ldr r3, [r0, #0]
  7034. 80030e6: 699b ldr r3, [r3, #24]
  7035. 80030e8: f013 0f03 tst.w r3, #3
  7036. 80030ec: d079 beq.n 80031e2 <HAL_TIM_IRQHandler+0x11e>
  7037. HAL_TIM_IC_CaptureCallback(htim);
  7038. 80030ee: f7ff ffe6 bl 80030be <HAL_TIM_IC_CaptureCallback>
  7039. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
  7040. 80030f2: 2300 movs r3, #0
  7041. 80030f4: 7723 strb r3, [r4, #28]
  7042. if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET)
  7043. 80030f6: 6823 ldr r3, [r4, #0]
  7044. 80030f8: 691a ldr r2, [r3, #16]
  7045. 80030fa: f012 0f04 tst.w r2, #4
  7046. 80030fe: d012 beq.n 8003126 <HAL_TIM_IRQHandler+0x62>
  7047. if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET)
  7048. 8003100: 68da ldr r2, [r3, #12]
  7049. 8003102: f012 0f04 tst.w r2, #4
  7050. 8003106: d00e beq.n 8003126 <HAL_TIM_IRQHandler+0x62>
  7051. __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2);
  7052. 8003108: f06f 0204 mvn.w r2, #4
  7053. 800310c: 611a str r2, [r3, #16]
  7054. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2;
  7055. 800310e: 2302 movs r3, #2
  7056. 8003110: 7723 strb r3, [r4, #28]
  7057. if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U)
  7058. 8003112: 6823 ldr r3, [r4, #0]
  7059. 8003114: 699b ldr r3, [r3, #24]
  7060. 8003116: f413 7f40 tst.w r3, #768 @ 0x300
  7061. 800311a: d068 beq.n 80031ee <HAL_TIM_IRQHandler+0x12a>
  7062. HAL_TIM_IC_CaptureCallback(htim);
  7063. 800311c: 4620 mov r0, r4
  7064. 800311e: f7ff ffce bl 80030be <HAL_TIM_IC_CaptureCallback>
  7065. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
  7066. 8003122: 2300 movs r3, #0
  7067. 8003124: 7723 strb r3, [r4, #28]
  7068. if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET)
  7069. 8003126: 6823 ldr r3, [r4, #0]
  7070. 8003128: 691a ldr r2, [r3, #16]
  7071. 800312a: f012 0f08 tst.w r2, #8
  7072. 800312e: d012 beq.n 8003156 <HAL_TIM_IRQHandler+0x92>
  7073. if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET)
  7074. 8003130: 68da ldr r2, [r3, #12]
  7075. 8003132: f012 0f08 tst.w r2, #8
  7076. 8003136: d00e beq.n 8003156 <HAL_TIM_IRQHandler+0x92>
  7077. __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3);
  7078. 8003138: f06f 0208 mvn.w r2, #8
  7079. 800313c: 611a str r2, [r3, #16]
  7080. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3;
  7081. 800313e: 2304 movs r3, #4
  7082. 8003140: 7723 strb r3, [r4, #28]
  7083. if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U)
  7084. 8003142: 6823 ldr r3, [r4, #0]
  7085. 8003144: 69db ldr r3, [r3, #28]
  7086. 8003146: f013 0f03 tst.w r3, #3
  7087. 800314a: d057 beq.n 80031fc <HAL_TIM_IRQHandler+0x138>
  7088. HAL_TIM_IC_CaptureCallback(htim);
  7089. 800314c: 4620 mov r0, r4
  7090. 800314e: f7ff ffb6 bl 80030be <HAL_TIM_IC_CaptureCallback>
  7091. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
  7092. 8003152: 2300 movs r3, #0
  7093. 8003154: 7723 strb r3, [r4, #28]
  7094. if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET)
  7095. 8003156: 6823 ldr r3, [r4, #0]
  7096. 8003158: 691a ldr r2, [r3, #16]
  7097. 800315a: f012 0f10 tst.w r2, #16
  7098. 800315e: d012 beq.n 8003186 <HAL_TIM_IRQHandler+0xc2>
  7099. if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET)
  7100. 8003160: 68da ldr r2, [r3, #12]
  7101. 8003162: f012 0f10 tst.w r2, #16
  7102. 8003166: d00e beq.n 8003186 <HAL_TIM_IRQHandler+0xc2>
  7103. __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4);
  7104. 8003168: f06f 0210 mvn.w r2, #16
  7105. 800316c: 611a str r2, [r3, #16]
  7106. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4;
  7107. 800316e: 2308 movs r3, #8
  7108. 8003170: 7723 strb r3, [r4, #28]
  7109. if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U)
  7110. 8003172: 6823 ldr r3, [r4, #0]
  7111. 8003174: 69db ldr r3, [r3, #28]
  7112. 8003176: f413 7f40 tst.w r3, #768 @ 0x300
  7113. 800317a: d046 beq.n 800320a <HAL_TIM_IRQHandler+0x146>
  7114. HAL_TIM_IC_CaptureCallback(htim);
  7115. 800317c: 4620 mov r0, r4
  7116. 800317e: f7ff ff9e bl 80030be <HAL_TIM_IC_CaptureCallback>
  7117. htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED;
  7118. 8003182: 2300 movs r3, #0
  7119. 8003184: 7723 strb r3, [r4, #28]
  7120. if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET)
  7121. 8003186: 6823 ldr r3, [r4, #0]
  7122. 8003188: 691a ldr r2, [r3, #16]
  7123. 800318a: f012 0f01 tst.w r2, #1
  7124. 800318e: d003 beq.n 8003198 <HAL_TIM_IRQHandler+0xd4>
  7125. if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET)
  7126. 8003190: 68da ldr r2, [r3, #12]
  7127. 8003192: f012 0f01 tst.w r2, #1
  7128. 8003196: d13f bne.n 8003218 <HAL_TIM_IRQHandler+0x154>
  7129. if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET)
  7130. 8003198: 6823 ldr r3, [r4, #0]
  7131. 800319a: 691a ldr r2, [r3, #16]
  7132. 800319c: f012 0f80 tst.w r2, #128 @ 0x80
  7133. 80031a0: d003 beq.n 80031aa <HAL_TIM_IRQHandler+0xe6>
  7134. if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
  7135. 80031a2: 68da ldr r2, [r3, #12]
  7136. 80031a4: f012 0f80 tst.w r2, #128 @ 0x80
  7137. 80031a8: d13d bne.n 8003226 <HAL_TIM_IRQHandler+0x162>
  7138. if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK2) != RESET)
  7139. 80031aa: 6823 ldr r3, [r4, #0]
  7140. 80031ac: 691a ldr r2, [r3, #16]
  7141. 80031ae: f412 7f80 tst.w r2, #256 @ 0x100
  7142. 80031b2: d003 beq.n 80031bc <HAL_TIM_IRQHandler+0xf8>
  7143. if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET)
  7144. 80031b4: 68da ldr r2, [r3, #12]
  7145. 80031b6: f012 0f80 tst.w r2, #128 @ 0x80
  7146. 80031ba: d13b bne.n 8003234 <HAL_TIM_IRQHandler+0x170>
  7147. if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET)
  7148. 80031bc: 6823 ldr r3, [r4, #0]
  7149. 80031be: 691a ldr r2, [r3, #16]
  7150. 80031c0: f012 0f40 tst.w r2, #64 @ 0x40
  7151. 80031c4: d003 beq.n 80031ce <HAL_TIM_IRQHandler+0x10a>
  7152. if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET)
  7153. 80031c6: 68da ldr r2, [r3, #12]
  7154. 80031c8: f012 0f40 tst.w r2, #64 @ 0x40
  7155. 80031cc: d139 bne.n 8003242 <HAL_TIM_IRQHandler+0x17e>
  7156. if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET)
  7157. 80031ce: 6823 ldr r3, [r4, #0]
  7158. 80031d0: 691a ldr r2, [r3, #16]
  7159. 80031d2: f012 0f20 tst.w r2, #32
  7160. 80031d6: d003 beq.n 80031e0 <HAL_TIM_IRQHandler+0x11c>
  7161. if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET)
  7162. 80031d8: 68da ldr r2, [r3, #12]
  7163. 80031da: f012 0f20 tst.w r2, #32
  7164. 80031de: d137 bne.n 8003250 <HAL_TIM_IRQHandler+0x18c>
  7165. }
  7166. 80031e0: bd10 pop {r4, pc}
  7167. HAL_TIM_OC_DelayElapsedCallback(htim);
  7168. 80031e2: f7ff ff6b bl 80030bc <HAL_TIM_OC_DelayElapsedCallback>
  7169. HAL_TIM_PWM_PulseFinishedCallback(htim);
  7170. 80031e6: 4620 mov r0, r4
  7171. 80031e8: f7ff ff6a bl 80030c0 <HAL_TIM_PWM_PulseFinishedCallback>
  7172. 80031ec: e781 b.n 80030f2 <HAL_TIM_IRQHandler+0x2e>
  7173. HAL_TIM_OC_DelayElapsedCallback(htim);
  7174. 80031ee: 4620 mov r0, r4
  7175. 80031f0: f7ff ff64 bl 80030bc <HAL_TIM_OC_DelayElapsedCallback>
  7176. HAL_TIM_PWM_PulseFinishedCallback(htim);
  7177. 80031f4: 4620 mov r0, r4
  7178. 80031f6: f7ff ff63 bl 80030c0 <HAL_TIM_PWM_PulseFinishedCallback>
  7179. 80031fa: e792 b.n 8003122 <HAL_TIM_IRQHandler+0x5e>
  7180. HAL_TIM_OC_DelayElapsedCallback(htim);
  7181. 80031fc: 4620 mov r0, r4
  7182. 80031fe: f7ff ff5d bl 80030bc <HAL_TIM_OC_DelayElapsedCallback>
  7183. HAL_TIM_PWM_PulseFinishedCallback(htim);
  7184. 8003202: 4620 mov r0, r4
  7185. 8003204: f7ff ff5c bl 80030c0 <HAL_TIM_PWM_PulseFinishedCallback>
  7186. 8003208: e7a3 b.n 8003152 <HAL_TIM_IRQHandler+0x8e>
  7187. HAL_TIM_OC_DelayElapsedCallback(htim);
  7188. 800320a: 4620 mov r0, r4
  7189. 800320c: f7ff ff56 bl 80030bc <HAL_TIM_OC_DelayElapsedCallback>
  7190. HAL_TIM_PWM_PulseFinishedCallback(htim);
  7191. 8003210: 4620 mov r0, r4
  7192. 8003212: f7ff ff55 bl 80030c0 <HAL_TIM_PWM_PulseFinishedCallback>
  7193. 8003216: e7b4 b.n 8003182 <HAL_TIM_IRQHandler+0xbe>
  7194. __HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE);
  7195. 8003218: f06f 0201 mvn.w r2, #1
  7196. 800321c: 611a str r2, [r3, #16]
  7197. HAL_TIM_PeriodElapsedCallback(htim);
  7198. 800321e: 4620 mov r0, r4
  7199. 8003220: f7fd f9fa bl 8000618 <HAL_TIM_PeriodElapsedCallback>
  7200. 8003224: e7b8 b.n 8003198 <HAL_TIM_IRQHandler+0xd4>
  7201. __HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK);
  7202. 8003226: f06f 0280 mvn.w r2, #128 @ 0x80
  7203. 800322a: 611a str r2, [r3, #16]
  7204. HAL_TIMEx_BreakCallback(htim);
  7205. 800322c: 4620 mov r0, r4
  7206. 800322e: f000 f8ca bl 80033c6 <HAL_TIMEx_BreakCallback>
  7207. 8003232: e7ba b.n 80031aa <HAL_TIM_IRQHandler+0xe6>
  7208. __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2);
  7209. 8003234: f46f 7280 mvn.w r2, #256 @ 0x100
  7210. 8003238: 611a str r2, [r3, #16]
  7211. HAL_TIMEx_Break2Callback(htim);
  7212. 800323a: 4620 mov r0, r4
  7213. 800323c: f000 f8c4 bl 80033c8 <HAL_TIMEx_Break2Callback>
  7214. 8003240: e7bc b.n 80031bc <HAL_TIM_IRQHandler+0xf8>
  7215. __HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER);
  7216. 8003242: f06f 0240 mvn.w r2, #64 @ 0x40
  7217. 8003246: 611a str r2, [r3, #16]
  7218. HAL_TIM_TriggerCallback(htim);
  7219. 8003248: 4620 mov r0, r4
  7220. 800324a: f7ff ff3a bl 80030c2 <HAL_TIM_TriggerCallback>
  7221. 800324e: e7be b.n 80031ce <HAL_TIM_IRQHandler+0x10a>
  7222. __HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM);
  7223. 8003250: f06f 0220 mvn.w r2, #32
  7224. 8003254: 611a str r2, [r3, #16]
  7225. HAL_TIMEx_CommutCallback(htim);
  7226. 8003256: 4620 mov r0, r4
  7227. 8003258: f000 f8b4 bl 80033c4 <HAL_TIMEx_CommutCallback>
  7228. }
  7229. 800325c: e7c0 b.n 80031e0 <HAL_TIM_IRQHandler+0x11c>
  7230. ...
  7231. 08003260 <TIM_Base_SetConfig>:
  7232. * @param TIMx TIM peripheral
  7233. * @param Structure TIM Base configuration structure
  7234. * @retval None
  7235. */
  7236. void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure)
  7237. {
  7238. 8003260: b530 push {r4, r5, lr}
  7239. uint32_t tmpcr1;
  7240. tmpcr1 = TIMx->CR1;
  7241. 8003262: 6803 ldr r3, [r0, #0]
  7242. /* Set TIM Time Base Unit parameters ---------------------------------------*/
  7243. if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx))
  7244. 8003264: 4a39 ldr r2, [pc, #228] @ (800334c <TIM_Base_SetConfig+0xec>)
  7245. 8003266: 4290 cmp r0, r2
  7246. 8003268: bf14 ite ne
  7247. 800326a: f04f 0e00 movne.w lr, #0
  7248. 800326e: f04f 0e01 moveq.w lr, #1
  7249. 8003272: f1b0 4f80 cmp.w r0, #1073741824 @ 0x40000000
  7250. 8003276: bf14 ite ne
  7251. 8003278: 4672 movne r2, lr
  7252. 800327a: f04e 0201 orreq.w r2, lr, #1
  7253. 800327e: b9aa cbnz r2, 80032ac <TIM_Base_SetConfig+0x4c>
  7254. 8003280: 4c33 ldr r4, [pc, #204] @ (8003350 <TIM_Base_SetConfig+0xf0>)
  7255. 8003282: 42a0 cmp r0, r4
  7256. 8003284: bf14 ite ne
  7257. 8003286: 2400 movne r4, #0
  7258. 8003288: 2401 moveq r4, #1
  7259. 800328a: 4d32 ldr r5, [pc, #200] @ (8003354 <TIM_Base_SetConfig+0xf4>)
  7260. 800328c: 42a8 cmp r0, r5
  7261. 800328e: d00d beq.n 80032ac <TIM_Base_SetConfig+0x4c>
  7262. 8003290: b964 cbnz r4, 80032ac <TIM_Base_SetConfig+0x4c>
  7263. 8003292: f104 4480 add.w r4, r4, #1073741824 @ 0x40000000
  7264. 8003296: f504 3482 add.w r4, r4, #66560 @ 0x10400
  7265. 800329a: 42a0 cmp r0, r4
  7266. 800329c: bf14 ite ne
  7267. 800329e: 2400 movne r4, #0
  7268. 80032a0: 2401 moveq r4, #1
  7269. 80032a2: f505 6500 add.w r5, r5, #2048 @ 0x800
  7270. 80032a6: 42a8 cmp r0, r5
  7271. 80032a8: d000 beq.n 80032ac <TIM_Base_SetConfig+0x4c>
  7272. 80032aa: b11c cbz r4, 80032b4 <TIM_Base_SetConfig+0x54>
  7273. {
  7274. /* Select the Counter Mode */
  7275. tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS);
  7276. 80032ac: f023 0370 bic.w r3, r3, #112 @ 0x70
  7277. tmpcr1 |= Structure->CounterMode;
  7278. 80032b0: 684c ldr r4, [r1, #4]
  7279. 80032b2: 4323 orrs r3, r4
  7280. }
  7281. if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx))
  7282. 80032b4: bb12 cbnz r2, 80032fc <TIM_Base_SetConfig+0x9c>
  7283. 80032b6: 4a26 ldr r2, [pc, #152] @ (8003350 <TIM_Base_SetConfig+0xf0>)
  7284. 80032b8: 4290 cmp r0, r2
  7285. 80032ba: bf14 ite ne
  7286. 80032bc: 2200 movne r2, #0
  7287. 80032be: 2201 moveq r2, #1
  7288. 80032c0: 4c24 ldr r4, [pc, #144] @ (8003354 <TIM_Base_SetConfig+0xf4>)
  7289. 80032c2: 42a0 cmp r0, r4
  7290. 80032c4: d01a beq.n 80032fc <TIM_Base_SetConfig+0x9c>
  7291. 80032c6: b9ca cbnz r2, 80032fc <TIM_Base_SetConfig+0x9c>
  7292. 80032c8: f102 4280 add.w r2, r2, #1073741824 @ 0x40000000
  7293. 80032cc: f502 3282 add.w r2, r2, #66560 @ 0x10400
  7294. 80032d0: 4290 cmp r0, r2
  7295. 80032d2: bf14 ite ne
  7296. 80032d4: 2200 movne r2, #0
  7297. 80032d6: 2201 moveq r2, #1
  7298. 80032d8: f504 6400 add.w r4, r4, #2048 @ 0x800
  7299. 80032dc: 42a0 cmp r0, r4
  7300. 80032de: d00d beq.n 80032fc <TIM_Base_SetConfig+0x9c>
  7301. 80032e0: b962 cbnz r2, 80032fc <TIM_Base_SetConfig+0x9c>
  7302. 80032e2: 4a1d ldr r2, [pc, #116] @ (8003358 <TIM_Base_SetConfig+0xf8>)
  7303. 80032e4: 4290 cmp r0, r2
  7304. 80032e6: bf14 ite ne
  7305. 80032e8: 2200 movne r2, #0
  7306. 80032ea: 2201 moveq r2, #1
  7307. 80032ec: f504 349a add.w r4, r4, #78848 @ 0x13400
  7308. 80032f0: 42a0 cmp r0, r4
  7309. 80032f2: d003 beq.n 80032fc <TIM_Base_SetConfig+0x9c>
  7310. 80032f4: b912 cbnz r2, 80032fc <TIM_Base_SetConfig+0x9c>
  7311. 80032f6: 4a19 ldr r2, [pc, #100] @ (800335c <TIM_Base_SetConfig+0xfc>)
  7312. 80032f8: 4290 cmp r0, r2
  7313. 80032fa: d104 bne.n 8003306 <TIM_Base_SetConfig+0xa6>
  7314. {
  7315. /* Set the clock division */
  7316. tmpcr1 &= ~TIM_CR1_CKD;
  7317. 80032fc: f423 7c40 bic.w ip, r3, #768 @ 0x300
  7318. tmpcr1 |= (uint32_t)Structure->ClockDivision;
  7319. 8003300: 68cb ldr r3, [r1, #12]
  7320. 8003302: ea43 030c orr.w r3, r3, ip
  7321. }
  7322. /* Set the auto-reload preload */
  7323. MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload);
  7324. 8003306: f023 0380 bic.w r3, r3, #128 @ 0x80
  7325. 800330a: 694a ldr r2, [r1, #20]
  7326. 800330c: 4313 orrs r3, r2
  7327. TIMx->CR1 = tmpcr1;
  7328. 800330e: 6003 str r3, [r0, #0]
  7329. /* Set the Autoreload value */
  7330. TIMx->ARR = (uint32_t)Structure->Period ;
  7331. 8003310: 688a ldr r2, [r1, #8]
  7332. 8003312: 62c2 str r2, [r0, #44] @ 0x2c
  7333. /* Set the Prescaler value */
  7334. TIMx->PSC = Structure->Prescaler;
  7335. 8003314: 680a ldr r2, [r1, #0]
  7336. 8003316: 6282 str r2, [r0, #40] @ 0x28
  7337. if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx))
  7338. 8003318: 4a11 ldr r2, [pc, #68] @ (8003360 <TIM_Base_SetConfig+0x100>)
  7339. 800331a: 4290 cmp r0, r2
  7340. 800331c: bf14 ite ne
  7341. 800331e: 4673 movne r3, lr
  7342. 8003320: f04e 0301 orreq.w r3, lr, #1
  7343. 8003324: b963 cbnz r3, 8003340 <TIM_Base_SetConfig+0xe0>
  7344. 8003326: 4b0c ldr r3, [pc, #48] @ (8003358 <TIM_Base_SetConfig+0xf8>)
  7345. 8003328: 4298 cmp r0, r3
  7346. 800332a: bf14 ite ne
  7347. 800332c: 2300 movne r3, #0
  7348. 800332e: 2301 moveq r3, #1
  7349. 8003330: f502 5270 add.w r2, r2, #15360 @ 0x3c00
  7350. 8003334: 4290 cmp r0, r2
  7351. 8003336: d003 beq.n 8003340 <TIM_Base_SetConfig+0xe0>
  7352. 8003338: b913 cbnz r3, 8003340 <TIM_Base_SetConfig+0xe0>
  7353. 800333a: 4b08 ldr r3, [pc, #32] @ (800335c <TIM_Base_SetConfig+0xfc>)
  7354. 800333c: 4298 cmp r0, r3
  7355. 800333e: d101 bne.n 8003344 <TIM_Base_SetConfig+0xe4>
  7356. {
  7357. /* Set the Repetition Counter value */
  7358. TIMx->RCR = Structure->RepetitionCounter;
  7359. 8003340: 690b ldr r3, [r1, #16]
  7360. 8003342: 6303 str r3, [r0, #48] @ 0x30
  7361. }
  7362. /* Generate an update event to reload the Prescaler
  7363. and the repetition counter (only for advanced timer) value immediately */
  7364. TIMx->EGR = TIM_EGR_UG;
  7365. 8003344: 2301 movs r3, #1
  7366. 8003346: 6143 str r3, [r0, #20]
  7367. }
  7368. 8003348: bd30 pop {r4, r5, pc}
  7369. 800334a: bf00 nop
  7370. 800334c: 40010000 .word 0x40010000
  7371. 8003350: 40000800 .word 0x40000800
  7372. 8003354: 40000400 .word 0x40000400
  7373. 8003358: 40014400 .word 0x40014400
  7374. 800335c: 40014800 .word 0x40014800
  7375. 8003360: 40010400 .word 0x40010400
  7376. 08003364 <HAL_TIM_Base_Init>:
  7377. if (htim == NULL)
  7378. 8003364: b360 cbz r0, 80033c0 <HAL_TIM_Base_Init+0x5c>
  7379. {
  7380. 8003366: b510 push {r4, lr}
  7381. 8003368: 4604 mov r4, r0
  7382. if (htim->State == HAL_TIM_STATE_RESET)
  7383. 800336a: f890 303d ldrb.w r3, [r0, #61] @ 0x3d
  7384. 800336e: b313 cbz r3, 80033b6 <HAL_TIM_Base_Init+0x52>
  7385. htim->State = HAL_TIM_STATE_BUSY;
  7386. 8003370: 2302 movs r3, #2
  7387. 8003372: f884 303d strb.w r3, [r4, #61] @ 0x3d
  7388. TIM_Base_SetConfig(htim->Instance, &htim->Init);
  7389. 8003376: 4621 mov r1, r4
  7390. 8003378: f851 0b04 ldr.w r0, [r1], #4
  7391. 800337c: f7ff ff70 bl 8003260 <TIM_Base_SetConfig>
  7392. htim->DMABurstState = HAL_DMA_BURST_STATE_READY;
  7393. 8003380: 2301 movs r3, #1
  7394. 8003382: f884 3048 strb.w r3, [r4, #72] @ 0x48
  7395. TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
  7396. 8003386: f884 303e strb.w r3, [r4, #62] @ 0x3e
  7397. 800338a: f884 303f strb.w r3, [r4, #63] @ 0x3f
  7398. 800338e: f884 3040 strb.w r3, [r4, #64] @ 0x40
  7399. 8003392: f884 3041 strb.w r3, [r4, #65] @ 0x41
  7400. 8003396: f884 3042 strb.w r3, [r4, #66] @ 0x42
  7401. 800339a: f884 3043 strb.w r3, [r4, #67] @ 0x43
  7402. TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY);
  7403. 800339e: f884 3044 strb.w r3, [r4, #68] @ 0x44
  7404. 80033a2: f884 3045 strb.w r3, [r4, #69] @ 0x45
  7405. 80033a6: f884 3046 strb.w r3, [r4, #70] @ 0x46
  7406. 80033aa: f884 3047 strb.w r3, [r4, #71] @ 0x47
  7407. htim->State = HAL_TIM_STATE_READY;
  7408. 80033ae: f884 303d strb.w r3, [r4, #61] @ 0x3d
  7409. return HAL_OK;
  7410. 80033b2: 2000 movs r0, #0
  7411. }
  7412. 80033b4: bd10 pop {r4, pc}
  7413. htim->Lock = HAL_UNLOCKED;
  7414. 80033b6: f880 303c strb.w r3, [r0, #60] @ 0x3c
  7415. HAL_TIM_Base_MspInit(htim);
  7416. 80033ba: f7ff fe35 bl 8003028 <HAL_TIM_Base_MspInit>
  7417. 80033be: e7d7 b.n 8003370 <HAL_TIM_Base_Init+0xc>
  7418. return HAL_ERROR;
  7419. 80033c0: 2001 movs r0, #1
  7420. }
  7421. 80033c2: 4770 bx lr
  7422. 080033c4 <HAL_TIMEx_CommutCallback>:
  7423. UNUSED(htim);
  7424. /* NOTE : This function should not be modified, when the callback is needed,
  7425. the HAL_TIMEx_CommutCallback could be implemented in the user file
  7426. */
  7427. }
  7428. 80033c4: 4770 bx lr
  7429. 080033c6 <HAL_TIMEx_BreakCallback>:
  7430. UNUSED(htim);
  7431. /* NOTE : This function should not be modified, when the callback is needed,
  7432. the HAL_TIMEx_BreakCallback could be implemented in the user file
  7433. */
  7434. }
  7435. 80033c6: 4770 bx lr
  7436. 080033c8 <HAL_TIMEx_Break2Callback>:
  7437. UNUSED(htim);
  7438. /* NOTE : This function Should not be modified, when the callback is needed,
  7439. the HAL_TIMEx_Break2Callback could be implemented in the user file
  7440. */
  7441. }
  7442. 80033c8: 4770 bx lr
  7443. 080033ca <ethernet_link_status_updated>:
  7444. else /* netif is down */
  7445. {
  7446. /* USER CODE BEGIN 6 */
  7447. /* USER CODE END 6 */
  7448. }
  7449. }
  7450. 80033ca: 4770 bx lr
  7451. 080033cc <is_link_up>:
  7452. return netif_is_up(&gnetif);
  7453. 80033cc: 4b02 ldr r3, [pc, #8] @ (80033d8 <is_link_up+0xc>)
  7454. 80033ce: f893 0031 ldrb.w r0, [r3, #49] @ 0x31
  7455. }
  7456. 80033d2: f000 0001 and.w r0, r0, #1
  7457. 80033d6: 4770 bx lr
  7458. 80033d8: 24000db4 .word 0x24000db4
  7459. 080033dc <MX_LWIP_Init>:
  7460. {
  7461. 80033dc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  7462. 80033e0: b084 sub sp, #16
  7463. ip_addr_set_zero_ip4(&ipaddr);
  7464. 80033e2: 4e24 ldr r6, [pc, #144] @ (8003474 <MX_LWIP_Init+0x98>)
  7465. 80033e4: 2400 movs r4, #0
  7466. 80033e6: 6034 str r4, [r6, #0]
  7467. ip_addr_set_zero_ip4(&netmask);
  7468. 80033e8: 4f23 ldr r7, [pc, #140] @ (8003478 <MX_LWIP_Init+0x9c>)
  7469. 80033ea: 603c str r4, [r7, #0]
  7470. ip_addr_set_zero_ip4(&gw);
  7471. 80033ec: f8df 80a8 ldr.w r8, [pc, #168] @ 8003498 <MX_LWIP_Init+0xbc>
  7472. 80033f0: f8c8 4000 str.w r4, [r8]
  7473. tcpip_init(tcpip_init_done, arg);
  7474. 80033f4: 4621 mov r1, r4
  7475. 80033f6: 4620 mov r0, r4
  7476. 80033f8: f00e f860 bl 80114bc <tcpip_init>
  7477. LOCK_TCPIP_CORE();
  7478. 80033fc: f000 fb6c bl 8003ad8 <sys_lock_tcpip_core>
  7479. netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &tcpip_input);
  7480. 8003400: 4d1e ldr r5, [pc, #120] @ (800347c <MX_LWIP_Init+0xa0>)
  7481. 8003402: 4b1f ldr r3, [pc, #124] @ (8003480 <MX_LWIP_Init+0xa4>)
  7482. 8003404: 9302 str r3, [sp, #8]
  7483. 8003406: 4b1f ldr r3, [pc, #124] @ (8003484 <MX_LWIP_Init+0xa8>)
  7484. 8003408: 9301 str r3, [sp, #4]
  7485. 800340a: 9400 str r4, [sp, #0]
  7486. 800340c: 4643 mov r3, r8
  7487. 800340e: 463a mov r2, r7
  7488. 8003410: 4631 mov r1, r6
  7489. 8003412: 4628 mov r0, r5
  7490. 8003414: f008 fa52 bl 800b8bc <netif_add>
  7491. netif_set_default(&gnetif);
  7492. 8003418: 4628 mov r0, r5
  7493. 800341a: f008 faed bl 800b9f8 <netif_set_default>
  7494. if (netif_is_link_up(&gnetif))
  7495. 800341e: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
  7496. 8003422: f013 0f04 tst.w r3, #4
  7497. 8003426: d021 beq.n 800346c <MX_LWIP_Init+0x90>
  7498. netif_set_up(&gnetif);
  7499. 8003428: 4628 mov r0, r5
  7500. 800342a: f008 faef bl 800ba0c <netif_set_up>
  7501. netif_set_link_callback(&gnetif, ethernet_link_status_updated);
  7502. 800342e: 4d13 ldr r5, [pc, #76] @ (800347c <MX_LWIP_Init+0xa0>)
  7503. 8003430: 4915 ldr r1, [pc, #84] @ (8003488 <MX_LWIP_Init+0xac>)
  7504. 8003432: 4628 mov r0, r5
  7505. 8003434: f008 fb7c bl 800bb30 <netif_set_link_callback>
  7506. memset(&attributes, 0x0, sizeof(osThreadAttr_t));
  7507. 8003438: 4c14 ldr r4, [pc, #80] @ (800348c <MX_LWIP_Init+0xb0>)
  7508. 800343a: 2224 movs r2, #36 @ 0x24
  7509. 800343c: 2100 movs r1, #0
  7510. 800343e: 4620 mov r0, r4
  7511. 8003440: f010 f93a bl 80136b8 <memset>
  7512. attributes.name = "EthLink";
  7513. 8003444: 4b12 ldr r3, [pc, #72] @ (8003490 <MX_LWIP_Init+0xb4>)
  7514. 8003446: 6023 str r3, [r4, #0]
  7515. attributes.stack_size = INTERFACE_THREAD_STACK_SIZE * 2;
  7516. 8003448: f44f 6300 mov.w r3, #2048 @ 0x800
  7517. 800344c: 6163 str r3, [r4, #20]
  7518. attributes.priority = osPriorityBelowNormal;
  7519. 800344e: 2310 movs r3, #16
  7520. 8003450: 61a3 str r3, [r4, #24]
  7521. osThreadNew(ethernet_link_thread, &gnetif, &attributes);
  7522. 8003452: 4622 mov r2, r4
  7523. 8003454: 4629 mov r1, r5
  7524. 8003456: 480f ldr r0, [pc, #60] @ (8003494 <MX_LWIP_Init+0xb8>)
  7525. 8003458: f000 fcbe bl 8003dd8 <osThreadNew>
  7526. dhcp_start(&gnetif);
  7527. 800345c: 4628 mov r0, r5
  7528. 800345e: f005 fe87 bl 8009170 <dhcp_start>
  7529. UNLOCK_TCPIP_CORE();
  7530. 8003462: f000 fb47 bl 8003af4 <sys_unlock_tcpip_core>
  7531. }
  7532. 8003466: b004 add sp, #16
  7533. 8003468: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  7534. netif_set_down(&gnetif);
  7535. 800346c: 4803 ldr r0, [pc, #12] @ (800347c <MX_LWIP_Init+0xa0>)
  7536. 800346e: f008 faef bl 800ba50 <netif_set_down>
  7537. 8003472: e7dc b.n 800342e <MX_LWIP_Init+0x52>
  7538. 8003474: 24000db0 .word 0x24000db0
  7539. 8003478: 24000dac .word 0x24000dac
  7540. 800347c: 24000db4 .word 0x24000db4
  7541. 8003480: 08011421 .word 0x08011421
  7542. 8003484: 080039dd .word 0x080039dd
  7543. 8003488: 080033cb .word 0x080033cb
  7544. 800348c: 24000d84 .word 0x24000d84
  7545. 8003490: 080144ac .word 0x080144ac
  7546. 8003494: 08003c5d .word 0x08003c5d
  7547. 8003498: 24000da8 .word 0x24000da8
  7548. 0800349c <ETH_PHY_IO_DeInit>:
  7549. * @retval 0 if OK, -1 if ERROR
  7550. */
  7551. int32_t ETH_PHY_IO_DeInit (void)
  7552. {
  7553. return 0;
  7554. }
  7555. 800349c: 2000 movs r0, #0
  7556. 800349e: 4770 bx lr
  7557. 080034a0 <low_level_input>:
  7558. {
  7559. 80034a0: b500 push {lr}
  7560. 80034a2: b083 sub sp, #12
  7561. struct pbuf *p = NULL;
  7562. 80034a4: 2300 movs r3, #0
  7563. 80034a6: 9301 str r3, [sp, #4]
  7564. if(RxAllocStatus == RX_ALLOC_OK)
  7565. 80034a8: 4b05 ldr r3, [pc, #20] @ (80034c0 <low_level_input+0x20>)
  7566. 80034aa: 781b ldrb r3, [r3, #0]
  7567. 80034ac: b11b cbz r3, 80034b6 <low_level_input+0x16>
  7568. }
  7569. 80034ae: 9801 ldr r0, [sp, #4]
  7570. 80034b0: b003 add sp, #12
  7571. 80034b2: f85d fb04 ldr.w pc, [sp], #4
  7572. HAL_ETH_ReadData(&heth, (void **)&p);
  7573. 80034b6: a901 add r1, sp, #4
  7574. 80034b8: 4802 ldr r0, [pc, #8] @ (80034c4 <low_level_input+0x24>)
  7575. 80034ba: f7fe fa93 bl 80019e4 <HAL_ETH_ReadData>
  7576. 80034be: e7f6 b.n 80034ae <low_level_input+0xe>
  7577. 80034c0: 24000f04 .word 0x24000f04
  7578. 80034c4: 24000e4c .word 0x24000e4c
  7579. 080034c8 <ethernetif_input>:
  7580. {
  7581. 80034c8: b538 push {r3, r4, r5, lr}
  7582. 80034ca: 4605 mov r5, r0
  7583. if (osSemaphoreAcquire(RxPktSemaphore, TIME_WAITING_FOR_INPUT) == osOK)
  7584. 80034cc: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
  7585. 80034d0: 4b0b ldr r3, [pc, #44] @ (8003500 <ethernetif_input+0x38>)
  7586. 80034d2: 6818 ldr r0, [r3, #0]
  7587. 80034d4: f000 fdf0 bl 80040b8 <osSemaphoreAcquire>
  7588. 80034d8: 2800 cmp r0, #0
  7589. 80034da: d1f7 bne.n 80034cc <ethernetif_input+0x4>
  7590. 80034dc: e001 b.n 80034e2 <ethernetif_input+0x1a>
  7591. } while(p!=NULL);
  7592. 80034de: 2c00 cmp r4, #0
  7593. 80034e0: d0f4 beq.n 80034cc <ethernetif_input+0x4>
  7594. p = low_level_input( netif );
  7595. 80034e2: 4628 mov r0, r5
  7596. 80034e4: f7ff ffdc bl 80034a0 <low_level_input>
  7597. if (p != NULL)
  7598. 80034e8: 4604 mov r4, r0
  7599. 80034ea: 2800 cmp r0, #0
  7600. 80034ec: d0f7 beq.n 80034de <ethernetif_input+0x16>
  7601. if (netif->input( p, netif) != ERR_OK )
  7602. 80034ee: 692b ldr r3, [r5, #16]
  7603. 80034f0: 4629 mov r1, r5
  7604. 80034f2: 4798 blx r3
  7605. 80034f4: 2800 cmp r0, #0
  7606. 80034f6: d0f2 beq.n 80034de <ethernetif_input+0x16>
  7607. pbuf_free(p);
  7608. 80034f8: 4620 mov r0, r4
  7609. 80034fa: f008 fc51 bl 800bda0 <pbuf_free>
  7610. 80034fe: e7ee b.n 80034de <ethernetif_input+0x16>
  7611. 8003500: 24000f00 .word 0x24000f00
  7612. 08003504 <low_level_output>:
  7613. {
  7614. 8003504: b530 push {r4, r5, lr}
  7615. 8003506: b08d sub sp, #52 @ 0x34
  7616. 8003508: 460c mov r4, r1
  7617. memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef));
  7618. 800350a: 2230 movs r2, #48 @ 0x30
  7619. 800350c: 2100 movs r1, #0
  7620. 800350e: 4668 mov r0, sp
  7621. 8003510: f010 f8d2 bl 80136b8 <memset>
  7622. for(q = p; q != NULL; q = q->next)
  7623. 8003514: 4622 mov r2, r4
  7624. uint32_t i = 0U;
  7625. 8003516: 2300 movs r3, #0
  7626. for(q = p; q != NULL; q = q->next)
  7627. 8003518: e003 b.n 8003522 <low_level_output+0x1e>
  7628. if(q->next == NULL)
  7629. 800351a: 6811 ldr r1, [r2, #0]
  7630. 800351c: b1f1 cbz r1, 800355c <low_level_output+0x58>
  7631. i++;
  7632. 800351e: 3301 adds r3, #1
  7633. for(q = p; q != NULL; q = q->next)
  7634. 8003520: 6812 ldr r2, [r2, #0]
  7635. 8003522: b322 cbz r2, 800356e <low_level_output+0x6a>
  7636. if(i >= ETH_TX_DESC_CNT)
  7637. 8003524: 2b03 cmp r3, #3
  7638. 8003526: d83b bhi.n 80035a0 <low_level_output+0x9c>
  7639. Txbuffer[i].buffer = q->payload;
  7640. 8003528: 6851 ldr r1, [r2, #4]
  7641. 800352a: eb03 0c43 add.w ip, r3, r3, lsl #1
  7642. 800352e: a80c add r0, sp, #48 @ 0x30
  7643. 8003530: eb00 0c8c add.w ip, r0, ip, lsl #2
  7644. 8003534: f84c 1c30 str.w r1, [ip, #-48]
  7645. Txbuffer[i].len = q->len;
  7646. 8003538: 8951 ldrh r1, [r2, #10]
  7647. 800353a: f84c 1c2c str.w r1, [ip, #-44]
  7648. if(i>0)
  7649. 800353e: 2b00 cmp r3, #0
  7650. 8003540: d0eb beq.n 800351a <low_level_output+0x16>
  7651. Txbuffer[i-1].next = &Txbuffer[i];
  7652. 8003542: f103 3cff add.w ip, r3, #4294967295 @ 0xffffffff
  7653. 8003546: eb03 0143 add.w r1, r3, r3, lsl #1
  7654. 800354a: eb0d 0181 add.w r1, sp, r1, lsl #2
  7655. 800354e: eb0c 0c4c add.w ip, ip, ip, lsl #1
  7656. 8003552: eb00 0c8c add.w ip, r0, ip, lsl #2
  7657. 8003556: f84c 1c28 str.w r1, [ip, #-40]
  7658. 800355a: e7de b.n 800351a <low_level_output+0x16>
  7659. Txbuffer[i].next = NULL;
  7660. 800355c: eb03 0143 add.w r1, r3, r3, lsl #1
  7661. 8003560: a80c add r0, sp, #48 @ 0x30
  7662. 8003562: eb00 0181 add.w r1, r0, r1, lsl #2
  7663. 8003566: 2000 movs r0, #0
  7664. 8003568: f841 0c28 str.w r0, [r1, #-40]
  7665. 800356c: e7d7 b.n 800351e <low_level_output+0x1a>
  7666. TxConfig.Length = p->tot_len;
  7667. 800356e: 8923 ldrh r3, [r4, #8]
  7668. 8003570: 4d0d ldr r5, [pc, #52] @ (80035a8 <low_level_output+0xa4>)
  7669. 8003572: 606b str r3, [r5, #4]
  7670. TxConfig.TxBuffer = Txbuffer;
  7671. 8003574: f8c5 d008 str.w sp, [r5, #8]
  7672. TxConfig.pData = p;
  7673. 8003578: 636c str r4, [r5, #52] @ 0x34
  7674. pbuf_ref(p);
  7675. 800357a: 4620 mov r0, r4
  7676. 800357c: f008 fd9e bl 800c0bc <pbuf_ref>
  7677. HAL_ETH_Transmit_IT(&heth, &TxConfig);
  7678. 8003580: 4c0a ldr r4, [pc, #40] @ (80035ac <low_level_output+0xa8>)
  7679. 8003582: 4629 mov r1, r5
  7680. 8003584: 4620 mov r0, r4
  7681. 8003586: f7fe f9f9 bl 800197c <HAL_ETH_Transmit_IT>
  7682. osSemaphoreAcquire(TxPktSemaphore, pdMS_TO_TICKS(1000));
  7683. 800358a: f44f 717a mov.w r1, #1000 @ 0x3e8
  7684. 800358e: 4b08 ldr r3, [pc, #32] @ (80035b0 <low_level_output+0xac>)
  7685. 8003590: 6818 ldr r0, [r3, #0]
  7686. 8003592: f000 fd91 bl 80040b8 <osSemaphoreAcquire>
  7687. HAL_ETH_ReleaseTxPacket(&heth);
  7688. 8003596: 4620 mov r0, r4
  7689. 8003598: f7fe faa3 bl 8001ae2 <HAL_ETH_ReleaseTxPacket>
  7690. return errval;
  7691. 800359c: 2000 movs r0, #0
  7692. 800359e: e001 b.n 80035a4 <low_level_output+0xa0>
  7693. return ERR_IF;
  7694. 80035a0: f06f 000b mvn.w r0, #11
  7695. }
  7696. 80035a4: b00d add sp, #52 @ 0x34
  7697. 80035a6: bd30 pop {r4, r5, pc}
  7698. 80035a8: 24000e14 .word 0x24000e14
  7699. 80035ac: 24000e4c .word 0x24000e4c
  7700. 80035b0: 24000efc .word 0x24000efc
  7701. 080035b4 <pbuf_free_custom>:
  7702. {
  7703. 80035b4: b508 push {r3, lr}
  7704. 80035b6: 4601 mov r1, r0
  7705. LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf);
  7706. 80035b8: 4807 ldr r0, [pc, #28] @ (80035d8 <pbuf_free_custom+0x24>)
  7707. 80035ba: f008 f83d bl 800b638 <memp_free_pool>
  7708. if (RxAllocStatus == RX_ALLOC_ERROR)
  7709. 80035be: 4b07 ldr r3, [pc, #28] @ (80035dc <pbuf_free_custom+0x28>)
  7710. 80035c0: 781b ldrb r3, [r3, #0]
  7711. 80035c2: 2b01 cmp r3, #1
  7712. 80035c4: d000 beq.n 80035c8 <pbuf_free_custom+0x14>
  7713. }
  7714. 80035c6: bd08 pop {r3, pc}
  7715. RxAllocStatus = RX_ALLOC_OK;
  7716. 80035c8: 4b04 ldr r3, [pc, #16] @ (80035dc <pbuf_free_custom+0x28>)
  7717. 80035ca: 2200 movs r2, #0
  7718. 80035cc: 701a strb r2, [r3, #0]
  7719. osSemaphoreRelease(RxPktSemaphore);
  7720. 80035ce: 4b04 ldr r3, [pc, #16] @ (80035e0 <pbuf_free_custom+0x2c>)
  7721. 80035d0: 6818 ldr r0, [r3, #0]
  7722. 80035d2: f000 fda5 bl 8004120 <osSemaphoreRelease>
  7723. }
  7724. 80035d6: e7f6 b.n 80035c6 <pbuf_free_custom+0x12>
  7725. 80035d8: 0801463c .word 0x0801463c
  7726. 80035dc: 24000f04 .word 0x24000f04
  7727. 80035e0: 24000f00 .word 0x24000f00
  7728. 080035e4 <ETH_PHY_IO_GetTick>:
  7729. /**
  7730. * @brief Get the time in millisecons used for internal PHY driver process.
  7731. * @retval Time value
  7732. */
  7733. int32_t ETH_PHY_IO_GetTick(void)
  7734. {
  7735. 80035e4: b508 push {r3, lr}
  7736. return HAL_GetTick();
  7737. 80035e6: f7fd fc51 bl 8000e8c <HAL_GetTick>
  7738. }
  7739. 80035ea: bd08 pop {r3, pc}
  7740. 080035ec <ETH_PHY_IO_Init>:
  7741. {
  7742. 80035ec: b508 push {r3, lr}
  7743. HAL_ETH_SetMDIOClockRange(&heth);
  7744. 80035ee: 4802 ldr r0, [pc, #8] @ (80035f8 <ETH_PHY_IO_Init+0xc>)
  7745. 80035f0: f7fe fce6 bl 8001fc0 <HAL_ETH_SetMDIOClockRange>
  7746. }
  7747. 80035f4: 2000 movs r0, #0
  7748. 80035f6: bd08 pop {r3, pc}
  7749. 80035f8: 24000e4c .word 0x24000e4c
  7750. 080035fc <ETH_PHY_IO_ReadReg>:
  7751. {
  7752. 80035fc: b508 push {r3, lr}
  7753. 80035fe: 4613 mov r3, r2
  7754. if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK)
  7755. 8003600: 460a mov r2, r1
  7756. 8003602: 4601 mov r1, r0
  7757. 8003604: 4803 ldr r0, [pc, #12] @ (8003614 <ETH_PHY_IO_ReadReg+0x18>)
  7758. 8003606: f7fe fb75 bl 8001cf4 <HAL_ETH_ReadPHYRegister>
  7759. 800360a: b900 cbnz r0, 800360e <ETH_PHY_IO_ReadReg+0x12>
  7760. }
  7761. 800360c: bd08 pop {r3, pc}
  7762. return -1;
  7763. 800360e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  7764. 8003612: e7fb b.n 800360c <ETH_PHY_IO_ReadReg+0x10>
  7765. 8003614: 24000e4c .word 0x24000e4c
  7766. 08003618 <ETH_PHY_IO_WriteReg>:
  7767. {
  7768. 8003618: b508 push {r3, lr}
  7769. 800361a: 4613 mov r3, r2
  7770. if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK)
  7771. 800361c: 460a mov r2, r1
  7772. 800361e: 4601 mov r1, r0
  7773. 8003620: 4803 ldr r0, [pc, #12] @ (8003630 <ETH_PHY_IO_WriteReg+0x18>)
  7774. 8003622: f7fe fb97 bl 8001d54 <HAL_ETH_WritePHYRegister>
  7775. 8003626: b900 cbnz r0, 800362a <ETH_PHY_IO_WriteReg+0x12>
  7776. }
  7777. 8003628: bd08 pop {r3, pc}
  7778. return -1;
  7779. 800362a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  7780. 800362e: e7fb b.n 8003628 <ETH_PHY_IO_WriteReg+0x10>
  7781. 8003630: 24000e4c .word 0x24000e4c
  7782. 08003634 <HAL_ETH_RxCpltCallback>:
  7783. {
  7784. 8003634: b508 push {r3, lr}
  7785. osSemaphoreRelease(RxPktSemaphore);
  7786. 8003636: 4b02 ldr r3, [pc, #8] @ (8003640 <HAL_ETH_RxCpltCallback+0xc>)
  7787. 8003638: 6818 ldr r0, [r3, #0]
  7788. 800363a: f000 fd71 bl 8004120 <osSemaphoreRelease>
  7789. }
  7790. 800363e: bd08 pop {r3, pc}
  7791. 8003640: 24000f00 .word 0x24000f00
  7792. 08003644 <HAL_ETH_TxCpltCallback>:
  7793. {
  7794. 8003644: b508 push {r3, lr}
  7795. osSemaphoreRelease(TxPktSemaphore);
  7796. 8003646: 4b02 ldr r3, [pc, #8] @ (8003650 <HAL_ETH_TxCpltCallback+0xc>)
  7797. 8003648: 6818 ldr r0, [r3, #0]
  7798. 800364a: f000 fd69 bl 8004120 <osSemaphoreRelease>
  7799. }
  7800. 800364e: bd08 pop {r3, pc}
  7801. 8003650: 24000efc .word 0x24000efc
  7802. 08003654 <HAL_ETH_ErrorCallback>:
  7803. {
  7804. 8003654: b508 push {r3, lr}
  7805. if((HAL_ETH_GetDMAError(handlerEth) & ETH_DMACSR_RBU) == ETH_DMACSR_RBU)
  7806. 8003656: f7fe fd95 bl 8002184 <HAL_ETH_GetDMAError>
  7807. 800365a: f010 0f80 tst.w r0, #128 @ 0x80
  7808. 800365e: d100 bne.n 8003662 <HAL_ETH_ErrorCallback+0xe>
  7809. }
  7810. 8003660: bd08 pop {r3, pc}
  7811. osSemaphoreRelease(RxPktSemaphore);
  7812. 8003662: 4b02 ldr r3, [pc, #8] @ (800366c <HAL_ETH_ErrorCallback+0x18>)
  7813. 8003664: 6818 ldr r0, [r3, #0]
  7814. 8003666: f000 fd5b bl 8004120 <osSemaphoreRelease>
  7815. }
  7816. 800366a: e7f9 b.n 8003660 <HAL_ETH_ErrorCallback+0xc>
  7817. 800366c: 24000f00 .word 0x24000f00
  7818. 08003670 <sys_now>:
  7819. {
  7820. 8003670: b508 push {r3, lr}
  7821. return HAL_GetTick();
  7822. 8003672: f7fd fc0b bl 8000e8c <HAL_GetTick>
  7823. }
  7824. 8003676: bd08 pop {r3, pc}
  7825. 08003678 <HAL_ETH_MspInit>:
  7826. {
  7827. 8003678: b5f0 push {r4, r5, r6, r7, lr}
  7828. 800367a: b08f sub sp, #60 @ 0x3c
  7829. GPIO_InitTypeDef GPIO_InitStruct = {0};
  7830. 800367c: 2300 movs r3, #0
  7831. 800367e: 9309 str r3, [sp, #36] @ 0x24
  7832. 8003680: 930a str r3, [sp, #40] @ 0x28
  7833. 8003682: 930b str r3, [sp, #44] @ 0x2c
  7834. 8003684: 930c str r3, [sp, #48] @ 0x30
  7835. 8003686: 930d str r3, [sp, #52] @ 0x34
  7836. if(ethHandle->Instance==ETH)
  7837. 8003688: 6802 ldr r2, [r0, #0]
  7838. 800368a: 4b5d ldr r3, [pc, #372] @ (8003800 <HAL_ETH_MspInit+0x188>)
  7839. 800368c: 429a cmp r2, r3
  7840. 800368e: d001 beq.n 8003694 <HAL_ETH_MspInit+0x1c>
  7841. }
  7842. 8003690: b00f add sp, #60 @ 0x3c
  7843. 8003692: bdf0 pop {r4, r5, r6, r7, pc}
  7844. __HAL_RCC_ETH1MAC_CLK_ENABLE();
  7845. 8003694: 4b5b ldr r3, [pc, #364] @ (8003804 <HAL_ETH_MspInit+0x18c>)
  7846. 8003696: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
  7847. 800369a: f442 4200 orr.w r2, r2, #32768 @ 0x8000
  7848. 800369e: f8c3 20d8 str.w r2, [r3, #216] @ 0xd8
  7849. 80036a2: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
  7850. 80036a6: f402 4200 and.w r2, r2, #32768 @ 0x8000
  7851. 80036aa: 9200 str r2, [sp, #0]
  7852. 80036ac: 9a00 ldr r2, [sp, #0]
  7853. __HAL_RCC_ETH1TX_CLK_ENABLE();
  7854. 80036ae: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
  7855. 80036b2: f442 3280 orr.w r2, r2, #65536 @ 0x10000
  7856. 80036b6: f8c3 20d8 str.w r2, [r3, #216] @ 0xd8
  7857. 80036ba: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
  7858. 80036be: f402 3280 and.w r2, r2, #65536 @ 0x10000
  7859. 80036c2: 9201 str r2, [sp, #4]
  7860. 80036c4: 9a01 ldr r2, [sp, #4]
  7861. __HAL_RCC_ETH1RX_CLK_ENABLE();
  7862. 80036c6: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
  7863. 80036ca: f442 3200 orr.w r2, r2, #131072 @ 0x20000
  7864. 80036ce: f8c3 20d8 str.w r2, [r3, #216] @ 0xd8
  7865. 80036d2: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8
  7866. 80036d6: f402 3200 and.w r2, r2, #131072 @ 0x20000
  7867. 80036da: 9202 str r2, [sp, #8]
  7868. 80036dc: 9a02 ldr r2, [sp, #8]
  7869. __HAL_RCC_GPIOG_CLK_ENABLE();
  7870. 80036de: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7871. 80036e2: f042 0240 orr.w r2, r2, #64 @ 0x40
  7872. 80036e6: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  7873. 80036ea: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7874. 80036ee: f002 0240 and.w r2, r2, #64 @ 0x40
  7875. 80036f2: 9203 str r2, [sp, #12]
  7876. 80036f4: 9a03 ldr r2, [sp, #12]
  7877. __HAL_RCC_GPIOE_CLK_ENABLE();
  7878. 80036f6: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7879. 80036fa: f042 0210 orr.w r2, r2, #16
  7880. 80036fe: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  7881. 8003702: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7882. 8003706: f002 0210 and.w r2, r2, #16
  7883. 800370a: 9204 str r2, [sp, #16]
  7884. 800370c: 9a04 ldr r2, [sp, #16]
  7885. __HAL_RCC_GPIOI_CLK_ENABLE();
  7886. 800370e: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7887. 8003712: f442 7280 orr.w r2, r2, #256 @ 0x100
  7888. 8003716: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  7889. 800371a: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7890. 800371e: f402 7280 and.w r2, r2, #256 @ 0x100
  7891. 8003722: 9205 str r2, [sp, #20]
  7892. 8003724: 9a05 ldr r2, [sp, #20]
  7893. __HAL_RCC_GPIOC_CLK_ENABLE();
  7894. 8003726: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7895. 800372a: f042 0204 orr.w r2, r2, #4
  7896. 800372e: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  7897. 8003732: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7898. 8003736: f002 0204 and.w r2, r2, #4
  7899. 800373a: 9206 str r2, [sp, #24]
  7900. 800373c: 9a06 ldr r2, [sp, #24]
  7901. __HAL_RCC_GPIOA_CLK_ENABLE();
  7902. 800373e: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7903. 8003742: f042 0201 orr.w r2, r2, #1
  7904. 8003746: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  7905. 800374a: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7906. 800374e: f002 0201 and.w r2, r2, #1
  7907. 8003752: 9207 str r2, [sp, #28]
  7908. 8003754: 9a07 ldr r2, [sp, #28]
  7909. __HAL_RCC_GPIOB_CLK_ENABLE();
  7910. 8003756: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0
  7911. 800375a: f042 0202 orr.w r2, r2, #2
  7912. 800375e: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0
  7913. 8003762: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0
  7914. 8003766: f003 0302 and.w r3, r3, #2
  7915. 800376a: 9308 str r3, [sp, #32]
  7916. 800376c: 9b08 ldr r3, [sp, #32]
  7917. GPIO_InitStruct.Pin = MII_TX_EN_Pin|MII_TXD1_Pin|MII_TXD0_Pin;
  7918. 800376e: f44f 5360 mov.w r3, #14336 @ 0x3800
  7919. 8003772: 9309 str r3, [sp, #36] @ 0x24
  7920. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  7921. 8003774: 2702 movs r7, #2
  7922. 8003776: 970a str r7, [sp, #40] @ 0x28
  7923. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  7924. 8003778: 2403 movs r4, #3
  7925. 800377a: 940c str r4, [sp, #48] @ 0x30
  7926. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  7927. 800377c: 260b movs r6, #11
  7928. 800377e: 960d str r6, [sp, #52] @ 0x34
  7929. HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
  7930. 8003780: a909 add r1, sp, #36 @ 0x24
  7931. 8003782: 4821 ldr r0, [pc, #132] @ (8003808 <HAL_ETH_MspInit+0x190>)
  7932. 8003784: f7fe fd02 bl 800218c <HAL_GPIO_Init>
  7933. GPIO_InitStruct.Pin = MII_TXD3_Pin;
  7934. 8003788: 2304 movs r3, #4
  7935. 800378a: 9309 str r3, [sp, #36] @ 0x24
  7936. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  7937. 800378c: 970a str r7, [sp, #40] @ 0x28
  7938. GPIO_InitStruct.Pull = GPIO_NOPULL;
  7939. 800378e: 2500 movs r5, #0
  7940. 8003790: 950b str r5, [sp, #44] @ 0x2c
  7941. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  7942. 8003792: 940c str r4, [sp, #48] @ 0x30
  7943. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  7944. 8003794: 960d str r6, [sp, #52] @ 0x34
  7945. HAL_GPIO_Init(MII_TXD3_GPIO_Port, &GPIO_InitStruct);
  7946. 8003796: a909 add r1, sp, #36 @ 0x24
  7947. 8003798: 481c ldr r0, [pc, #112] @ (800380c <HAL_ETH_MspInit+0x194>)
  7948. 800379a: f7fe fcf7 bl 800218c <HAL_GPIO_Init>
  7949. GPIO_InitStruct.Pin = MII_RX_ER_Pin;
  7950. 800379e: f44f 6380 mov.w r3, #1024 @ 0x400
  7951. 80037a2: 9309 str r3, [sp, #36] @ 0x24
  7952. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  7953. 80037a4: 970a str r7, [sp, #40] @ 0x28
  7954. GPIO_InitStruct.Pull = GPIO_NOPULL;
  7955. 80037a6: 950b str r5, [sp, #44] @ 0x2c
  7956. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  7957. 80037a8: 940c str r4, [sp, #48] @ 0x30
  7958. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  7959. 80037aa: 960d str r6, [sp, #52] @ 0x34
  7960. HAL_GPIO_Init(MII_RX_ER_GPIO_Port, &GPIO_InitStruct);
  7961. 80037ac: a909 add r1, sp, #36 @ 0x24
  7962. 80037ae: 4818 ldr r0, [pc, #96] @ (8003810 <HAL_ETH_MspInit+0x198>)
  7963. 80037b0: f7fe fcec bl 800218c <HAL_GPIO_Init>
  7964. GPIO_InitStruct.Pin = MII_MDC_Pin|MII_TXD2_Pin|MII_TX_CLK_Pin|MII_RXD0_Pin
  7965. 80037b4: 233e movs r3, #62 @ 0x3e
  7966. 80037b6: 9309 str r3, [sp, #36] @ 0x24
  7967. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  7968. 80037b8: 970a str r7, [sp, #40] @ 0x28
  7969. GPIO_InitStruct.Pull = GPIO_NOPULL;
  7970. 80037ba: 950b str r5, [sp, #44] @ 0x2c
  7971. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  7972. 80037bc: 940c str r4, [sp, #48] @ 0x30
  7973. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  7974. 80037be: 960d str r6, [sp, #52] @ 0x34
  7975. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  7976. 80037c0: a909 add r1, sp, #36 @ 0x24
  7977. 80037c2: 4814 ldr r0, [pc, #80] @ (8003814 <HAL_ETH_MspInit+0x19c>)
  7978. 80037c4: f7fe fce2 bl 800218c <HAL_GPIO_Init>
  7979. GPIO_InitStruct.Pin = MII_MDIO_Pin|GPIO_PIN_1|MII_CRS_Pin|GPIO_PIN_7
  7980. 80037c8: 238f movs r3, #143 @ 0x8f
  7981. 80037ca: 9309 str r3, [sp, #36] @ 0x24
  7982. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  7983. 80037cc: 970a str r7, [sp, #40] @ 0x28
  7984. GPIO_InitStruct.Pull = GPIO_NOPULL;
  7985. 80037ce: 950b str r5, [sp, #44] @ 0x2c
  7986. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  7987. 80037d0: 940c str r4, [sp, #48] @ 0x30
  7988. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  7989. 80037d2: 960d str r6, [sp, #52] @ 0x34
  7990. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  7991. 80037d4: a909 add r1, sp, #36 @ 0x24
  7992. 80037d6: 4810 ldr r0, [pc, #64] @ (8003818 <HAL_ETH_MspInit+0x1a0>)
  7993. 80037d8: f7fe fcd8 bl 800218c <HAL_GPIO_Init>
  7994. GPIO_InitStruct.Pin = MII_RXD3_Pin|MII_RXD2_Pin;
  7995. 80037dc: 9409 str r4, [sp, #36] @ 0x24
  7996. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  7997. 80037de: 970a str r7, [sp, #40] @ 0x28
  7998. GPIO_InitStruct.Pull = GPIO_NOPULL;
  7999. 80037e0: 950b str r5, [sp, #44] @ 0x2c
  8000. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  8001. 80037e2: 940c str r4, [sp, #48] @ 0x30
  8002. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  8003. 80037e4: 960d str r6, [sp, #52] @ 0x34
  8004. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  8005. 80037e6: a909 add r1, sp, #36 @ 0x24
  8006. 80037e8: 480c ldr r0, [pc, #48] @ (800381c <HAL_ETH_MspInit+0x1a4>)
  8007. 80037ea: f7fe fccf bl 800218c <HAL_GPIO_Init>
  8008. HAL_NVIC_SetPriority(ETH_IRQn, 5, 0);
  8009. 80037ee: 462a mov r2, r5
  8010. 80037f0: 2105 movs r1, #5
  8011. 80037f2: 203d movs r0, #61 @ 0x3d
  8012. 80037f4: f7fd fbb2 bl 8000f5c <HAL_NVIC_SetPriority>
  8013. HAL_NVIC_EnableIRQ(ETH_IRQn);
  8014. 80037f8: 203d movs r0, #61 @ 0x3d
  8015. 80037fa: f7fd fbbf bl 8000f7c <HAL_NVIC_EnableIRQ>
  8016. }
  8017. 80037fe: e747 b.n 8003690 <HAL_ETH_MspInit+0x18>
  8018. 8003800: 40028000 .word 0x40028000
  8019. 8003804: 58024400 .word 0x58024400
  8020. 8003808: 58021800 .word 0x58021800
  8021. 800380c: 58021000 .word 0x58021000
  8022. 8003810: 58022000 .word 0x58022000
  8023. 8003814: 58020800 .word 0x58020800
  8024. 8003818: 58020000 .word 0x58020000
  8025. 800381c: 58020400 .word 0x58020400
  8026. 08003820 <ethernetif_notify_conn_changed>:
  8027. __weak void ethernetif_notify_conn_changed(struct netif *netif)
  8028. {
  8029. /* NOTE : This is function could be implemented in user file
  8030. when the callback is needed,
  8031. */
  8032. }
  8033. 8003820: 4770 bx lr
  8034. ...
  8035. 08003824 <low_level_init>:
  8036. {
  8037. 8003824: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  8038. 8003828: b0a4 sub sp, #144 @ 0x90
  8039. 800382a: 4604 mov r4, r0
  8040. ETH_MACConfigTypeDef MACConf = {0};
  8041. 800382c: 2264 movs r2, #100 @ 0x64
  8042. 800382e: 2100 movs r1, #0
  8043. 8003830: a802 add r0, sp, #8
  8044. 8003832: f00f ff41 bl 80136b8 <memset>
  8045. heth.Instance = ETH;
  8046. 8003836: 4d5d ldr r5, [pc, #372] @ (80039ac <low_level_init+0x188>)
  8047. 8003838: 4b5d ldr r3, [pc, #372] @ (80039b0 <low_level_init+0x18c>)
  8048. 800383a: 602b str r3, [r5, #0]
  8049. MACAddr[0] = 0x7C;
  8050. 800383c: 237c movs r3, #124 @ 0x7c
  8051. 800383e: f88d 3000 strb.w r3, [sp]
  8052. MACAddr[1] = 0xF6;
  8053. 8003842: 23f6 movs r3, #246 @ 0xf6
  8054. 8003844: f88d 3001 strb.w r3, [sp, #1]
  8055. MACAddr[2] = 0x66;
  8056. 8003848: 2366 movs r3, #102 @ 0x66
  8057. 800384a: f88d 3002 strb.w r3, [sp, #2]
  8058. MACAddr[3] = 0xE4;
  8059. 800384e: 23e4 movs r3, #228 @ 0xe4
  8060. 8003850: f88d 3003 strb.w r3, [sp, #3]
  8061. MACAddr[4] = 0xB5;
  8062. 8003854: 23b5 movs r3, #181 @ 0xb5
  8063. 8003856: f88d 3004 strb.w r3, [sp, #4]
  8064. MACAddr[5] = 0x41;
  8065. 800385a: 2341 movs r3, #65 @ 0x41
  8066. 800385c: f88d 3005 strb.w r3, [sp, #5]
  8067. heth.Init.MACAddr = &MACAddr[0];
  8068. 8003860: f8c5 d004 str.w sp, [r5, #4]
  8069. heth.Init.MediaInterface = HAL_ETH_MII_MODE;
  8070. 8003864: 2600 movs r6, #0
  8071. 8003866: 722e strb r6, [r5, #8]
  8072. heth.Init.TxDesc = DMATxDscrTab;
  8073. 8003868: 4b52 ldr r3, [pc, #328] @ (80039b4 <low_level_init+0x190>)
  8074. 800386a: 60eb str r3, [r5, #12]
  8075. heth.Init.RxDesc = DMARxDscrTab;
  8076. 800386c: 4b52 ldr r3, [pc, #328] @ (80039b8 <low_level_init+0x194>)
  8077. 800386e: 612b str r3, [r5, #16]
  8078. heth.Init.RxBuffLen = 1536;
  8079. 8003870: f44f 63c0 mov.w r3, #1536 @ 0x600
  8080. 8003874: 616b str r3, [r5, #20]
  8081. hal_eth_init_status = HAL_ETH_Init(&heth);
  8082. 8003876: 4628 mov r0, r5
  8083. 8003878: f7fe fbde bl 8002038 <HAL_ETH_Init>
  8084. 800387c: 4607 mov r7, r0
  8085. memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig));
  8086. 800387e: f8df 8158 ldr.w r8, [pc, #344] @ 80039d8 <low_level_init+0x1b4>
  8087. 8003882: 2238 movs r2, #56 @ 0x38
  8088. 8003884: 4631 mov r1, r6
  8089. 8003886: 4640 mov r0, r8
  8090. 8003888: f00f ff16 bl 80136b8 <memset>
  8091. TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD;
  8092. 800388c: 2321 movs r3, #33 @ 0x21
  8093. 800388e: f8c8 3000 str.w r3, [r8]
  8094. TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC;
  8095. 8003892: f44f 3340 mov.w r3, #196608 @ 0x30000
  8096. 8003896: f8c8 3014 str.w r3, [r8, #20]
  8097. LWIP_MEMPOOL_INIT(RX_POOL);
  8098. 800389a: 4848 ldr r0, [pc, #288] @ (80039bc <low_level_init+0x198>)
  8099. 800389c: f007 fe78 bl 800b590 <memp_init_pool>
  8100. netif->hwaddr_len = ETH_HWADDR_LEN;
  8101. 80038a0: 2306 movs r3, #6
  8102. 80038a2: f884 3030 strb.w r3, [r4, #48] @ 0x30
  8103. netif->hwaddr[0] = heth.Init.MACAddr[0];
  8104. 80038a6: 686b ldr r3, [r5, #4]
  8105. 80038a8: 781a ldrb r2, [r3, #0]
  8106. 80038aa: f884 202a strb.w r2, [r4, #42] @ 0x2a
  8107. netif->hwaddr[1] = heth.Init.MACAddr[1];
  8108. 80038ae: 785a ldrb r2, [r3, #1]
  8109. 80038b0: f884 202b strb.w r2, [r4, #43] @ 0x2b
  8110. netif->hwaddr[2] = heth.Init.MACAddr[2];
  8111. 80038b4: 789a ldrb r2, [r3, #2]
  8112. 80038b6: f884 202c strb.w r2, [r4, #44] @ 0x2c
  8113. netif->hwaddr[3] = heth.Init.MACAddr[3];
  8114. 80038ba: 78da ldrb r2, [r3, #3]
  8115. 80038bc: f884 202d strb.w r2, [r4, #45] @ 0x2d
  8116. netif->hwaddr[4] = heth.Init.MACAddr[4];
  8117. 80038c0: 791a ldrb r2, [r3, #4]
  8118. 80038c2: f884 202e strb.w r2, [r4, #46] @ 0x2e
  8119. netif->hwaddr[5] = heth.Init.MACAddr[5];
  8120. 80038c6: 795b ldrb r3, [r3, #5]
  8121. 80038c8: f884 302f strb.w r3, [r4, #47] @ 0x2f
  8122. netif->mtu = ETH_MAX_PAYLOAD;
  8123. 80038cc: f240 53dc movw r3, #1500 @ 0x5dc
  8124. 80038d0: 8523 strh r3, [r4, #40] @ 0x28
  8125. netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP;
  8126. 80038d2: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
  8127. 80038d6: f043 030a orr.w r3, r3, #10
  8128. 80038da: f884 3031 strb.w r3, [r4, #49] @ 0x31
  8129. RxPktSemaphore = osSemaphoreNew(1, 1, NULL);
  8130. 80038de: 4632 mov r2, r6
  8131. 80038e0: 2101 movs r1, #1
  8132. 80038e2: 4608 mov r0, r1
  8133. 80038e4: f000 fb8c bl 8004000 <osSemaphoreNew>
  8134. 80038e8: 4b35 ldr r3, [pc, #212] @ (80039c0 <low_level_init+0x19c>)
  8135. 80038ea: 6018 str r0, [r3, #0]
  8136. TxPktSemaphore = osSemaphoreNew(1, 1, NULL);
  8137. 80038ec: 4632 mov r2, r6
  8138. 80038ee: 2101 movs r1, #1
  8139. 80038f0: 4608 mov r0, r1
  8140. 80038f2: f000 fb85 bl 8004000 <osSemaphoreNew>
  8141. 80038f6: 4b33 ldr r3, [pc, #204] @ (80039c4 <low_level_init+0x1a0>)
  8142. 80038f8: 6018 str r0, [r3, #0]
  8143. memset(&attributes, 0x0, sizeof(osThreadAttr_t));
  8144. 80038fa: 2224 movs r2, #36 @ 0x24
  8145. 80038fc: 4631 mov r1, r6
  8146. 80038fe: a81b add r0, sp, #108 @ 0x6c
  8147. 8003900: f00f feda bl 80136b8 <memset>
  8148. attributes.name = "EthIf";
  8149. 8003904: 4b30 ldr r3, [pc, #192] @ (80039c8 <low_level_init+0x1a4>)
  8150. 8003906: 931b str r3, [sp, #108] @ 0x6c
  8151. attributes.stack_size = INTERFACE_THREAD_STACK_SIZE;
  8152. 8003908: f44f 6380 mov.w r3, #1024 @ 0x400
  8153. 800390c: 9320 str r3, [sp, #128] @ 0x80
  8154. attributes.priority = osPriorityRealtime;
  8155. 800390e: 2330 movs r3, #48 @ 0x30
  8156. 8003910: 9321 str r3, [sp, #132] @ 0x84
  8157. osThreadNew(ethernetif_input, netif, &attributes);
  8158. 8003912: aa1b add r2, sp, #108 @ 0x6c
  8159. 8003914: 4621 mov r1, r4
  8160. 8003916: 482d ldr r0, [pc, #180] @ (80039cc <low_level_init+0x1a8>)
  8161. 8003918: f000 fa5e bl 8003dd8 <osThreadNew>
  8162. LAN8742_RegisterBusIO(&LAN8742, &LAN8742_IOCtx);
  8163. 800391c: 4d2c ldr r5, [pc, #176] @ (80039d0 <low_level_init+0x1ac>)
  8164. 800391e: 492d ldr r1, [pc, #180] @ (80039d4 <low_level_init+0x1b0>)
  8165. 8003920: 4628 mov r0, r5
  8166. 8003922: f7fd f990 bl 8000c46 <LAN8742_RegisterBusIO>
  8167. LAN8742_Init(&LAN8742);
  8168. 8003926: 4628 mov r0, r5
  8169. 8003928: f7fd f9ac bl 8000c84 <LAN8742_Init>
  8170. if (hal_eth_init_status == HAL_OK)
  8171. 800392c: bbc7 cbnz r7, 80039a0 <low_level_init+0x17c>
  8172. PHYLinkState = LAN8742_GetLinkState(&LAN8742);
  8173. 800392e: 4628 mov r0, r5
  8174. 8003930: f7fd fa10 bl 8000d54 <LAN8742_GetLinkState>
  8175. if(PHYLinkState <= LAN8742_STATUS_LINK_DOWN)
  8176. 8003934: 2801 cmp r0, #1
  8177. 8003936: dd21 ble.n 800397c <low_level_init+0x158>
  8178. switch (PHYLinkState)
  8179. 8003938: 2804 cmp r0, #4
  8180. 800393a: d02a beq.n 8003992 <low_level_init+0x16e>
  8181. 800393c: 2805 cmp r0, #5
  8182. 800393e: d02c beq.n 800399a <low_level_init+0x176>
  8183. 8003940: 2803 cmp r0, #3
  8184. 8003942: d022 beq.n 800398a <low_level_init+0x166>
  8185. 8003944: f44f 4680 mov.w r6, #16384 @ 0x4000
  8186. 8003948: f44f 5700 mov.w r7, #8192 @ 0x2000
  8187. HAL_ETH_GetMACConfig(&heth, &MACConf);
  8188. 800394c: 4d17 ldr r5, [pc, #92] @ (80039ac <low_level_init+0x188>)
  8189. 800394e: a902 add r1, sp, #8
  8190. 8003950: 4628 mov r0, r5
  8191. 8003952: f7fe fa33 bl 8001dbc <HAL_ETH_GetMACConfig>
  8192. MACConf.DuplexMode = duplex;
  8193. 8003956: 9708 str r7, [sp, #32]
  8194. MACConf.Speed = speed;
  8195. 8003958: 9607 str r6, [sp, #28]
  8196. HAL_ETH_SetMACConfig(&heth, &MACConf);
  8197. 800395a: a902 add r1, sp, #8
  8198. 800395c: 4628 mov r0, r5
  8199. 800395e: f7fe fb20 bl 8001fa2 <HAL_ETH_SetMACConfig>
  8200. HAL_ETH_Start_IT(&heth);
  8201. 8003962: 4628 mov r0, r5
  8202. 8003964: f7fd ff62 bl 800182c <HAL_ETH_Start_IT>
  8203. netif_set_up(netif);
  8204. 8003968: 4620 mov r0, r4
  8205. 800396a: f008 f84f bl 800ba0c <netif_set_up>
  8206. netif_set_link_up(netif);
  8207. 800396e: 4620 mov r0, r4
  8208. 8003970: f008 f892 bl 800ba98 <netif_set_link_up>
  8209. ethernetif_notify_conn_changed(netif);
  8210. 8003974: 4620 mov r0, r4
  8211. 8003976: f7ff ff53 bl 8003820 <ethernetif_notify_conn_changed>
  8212. 800397a: e013 b.n 80039a4 <low_level_init+0x180>
  8213. netif_set_link_down(netif);
  8214. 800397c: 4620 mov r0, r4
  8215. 800397e: f008 f8b5 bl 800baec <netif_set_link_down>
  8216. netif_set_down(netif);
  8217. 8003982: 4620 mov r0, r4
  8218. 8003984: f008 f864 bl 800ba50 <netif_set_down>
  8219. 8003988: e00c b.n 80039a4 <low_level_init+0x180>
  8220. speed = ETH_SPEED_100M;
  8221. 800398a: f44f 4680 mov.w r6, #16384 @ 0x4000
  8222. duplex = ETH_HALFDUPLEX_MODE;
  8223. 800398e: 2700 movs r7, #0
  8224. 8003990: e7dc b.n 800394c <low_level_init+0x128>
  8225. speed = ETH_SPEED_10M;
  8226. 8003992: 2600 movs r6, #0
  8227. duplex = ETH_FULLDUPLEX_MODE;
  8228. 8003994: f44f 5700 mov.w r7, #8192 @ 0x2000
  8229. 8003998: e7d8 b.n 800394c <low_level_init+0x128>
  8230. speed = ETH_SPEED_10M;
  8231. 800399a: 2600 movs r6, #0
  8232. duplex = ETH_HALFDUPLEX_MODE;
  8233. 800399c: 4637 mov r7, r6
  8234. 800399e: e7d5 b.n 800394c <low_level_init+0x128>
  8235. Error_Handler();
  8236. 80039a0: f7fc fe4c bl 800063c <Error_Handler>
  8237. }
  8238. 80039a4: b024 add sp, #144 @ 0x90
  8239. 80039a6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  8240. 80039aa: bf00 nop
  8241. 80039ac: 24000e4c .word 0x24000e4c
  8242. 80039b0: 40028000 .word 0x40028000
  8243. 80039b4: 30040100 .word 0x30040100
  8244. 80039b8: 30040000 .word 0x30040000
  8245. 80039bc: 0801463c .word 0x0801463c
  8246. 80039c0: 24000f00 .word 0x24000f00
  8247. 80039c4: 24000efc .word 0x24000efc
  8248. 80039c8: 080144b4 .word 0x080144b4
  8249. 80039cc: 080034c9 .word 0x080034c9
  8250. 80039d0: 24000df4 .word 0x24000df4
  8251. 80039d4: 24000010 .word 0x24000010
  8252. 80039d8: 24000e14 .word 0x24000e14
  8253. 080039dc <ethernetif_init>:
  8254. {
  8255. 80039dc: b510 push {r4, lr}
  8256. LWIP_ASSERT("netif != NULL", (netif != NULL));
  8257. 80039de: 4604 mov r4, r0
  8258. 80039e0: b170 cbz r0, 8003a00 <ethernetif_init+0x24>
  8259. netif->name[0] = IFNAME0;
  8260. 80039e2: 2373 movs r3, #115 @ 0x73
  8261. 80039e4: f884 3032 strb.w r3, [r4, #50] @ 0x32
  8262. netif->name[1] = IFNAME1;
  8263. 80039e8: 2374 movs r3, #116 @ 0x74
  8264. 80039ea: f884 3033 strb.w r3, [r4, #51] @ 0x33
  8265. netif->output = etharp_output;
  8266. 80039ee: 4b08 ldr r3, [pc, #32] @ (8003a10 <ethernetif_init+0x34>)
  8267. 80039f0: 6163 str r3, [r4, #20]
  8268. netif->linkoutput = low_level_output;
  8269. 80039f2: 4b08 ldr r3, [pc, #32] @ (8003a14 <ethernetif_init+0x38>)
  8270. 80039f4: 61a3 str r3, [r4, #24]
  8271. low_level_init(netif);
  8272. 80039f6: 4620 mov r0, r4
  8273. 80039f8: f7ff ff14 bl 8003824 <low_level_init>
  8274. }
  8275. 80039fc: 2000 movs r0, #0
  8276. 80039fe: bd10 pop {r4, pc}
  8277. LWIP_ASSERT("netif != NULL", (netif != NULL));
  8278. 8003a00: 4b05 ldr r3, [pc, #20] @ (8003a18 <ethernetif_init+0x3c>)
  8279. 8003a02: f240 222b movw r2, #555 @ 0x22b
  8280. 8003a06: 4905 ldr r1, [pc, #20] @ (8003a1c <ethernetif_init+0x40>)
  8281. 8003a08: 4805 ldr r0, [pc, #20] @ (8003a20 <ethernetif_init+0x44>)
  8282. 8003a0a: f00f fcfd bl 8013408 <iprintf>
  8283. 8003a0e: e7e8 b.n 80039e2 <ethernetif_init+0x6>
  8284. 8003a10: 08009b29 .word 0x08009b29
  8285. 8003a14: 08003505 .word 0x08003505
  8286. 8003a18: 080144bc .word 0x080144bc
  8287. 8003a1c: 080144d8 .word 0x080144d8
  8288. 8003a20: 080144e8 .word 0x080144e8
  8289. 08003a24 <HAL_ETH_RxAllocateCallback>:
  8290. void HAL_ETH_RxAllocateCallback(uint8_t **buff)
  8291. {
  8292. 8003a24: b510 push {r4, lr}
  8293. 8003a26: b082 sub sp, #8
  8294. 8003a28: 4604 mov r4, r0
  8295. /* USER CODE BEGIN HAL ETH RxAllocateCallback */
  8296. struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL);
  8297. 8003a2a: 480e ldr r0, [pc, #56] @ (8003a64 <HAL_ETH_RxAllocateCallback+0x40>)
  8298. 8003a2c: f007 fdd4 bl 800b5d8 <memp_malloc_pool>
  8299. if (p)
  8300. 8003a30: b188 cbz r0, 8003a56 <HAL_ETH_RxAllocateCallback+0x32>
  8301. 8003a32: 4603 mov r3, r0
  8302. {
  8303. /* Get the buff from the struct pbuf address. */
  8304. *buff = (uint8_t *)p + offsetof(RxBuff_t, buff);
  8305. 8003a34: f100 0220 add.w r2, r0, #32
  8306. 8003a38: 6022 str r2, [r4, #0]
  8307. p->custom_free_function = pbuf_free_custom;
  8308. 8003a3a: 4a0b ldr r2, [pc, #44] @ (8003a68 <HAL_ETH_RxAllocateCallback+0x44>)
  8309. 8003a3c: 6102 str r2, [r0, #16]
  8310. /* Initialize the struct pbuf.
  8311. * This must be performed whenever a buffer's allocated because it may be
  8312. * changed by lwIP or the app, e.g., pbuf_free decrements ref. */
  8313. pbuf_alloced_custom(PBUF_RAW, 0, PBUF_REF, p, *buff, ETH_RX_BUFFER_SIZE);
  8314. 8003a3e: f44f 62c0 mov.w r2, #1536 @ 0x600
  8315. 8003a42: 9201 str r2, [sp, #4]
  8316. 8003a44: 6822 ldr r2, [r4, #0]
  8317. 8003a46: 9200 str r2, [sp, #0]
  8318. 8003a48: 2241 movs r2, #65 @ 0x41
  8319. 8003a4a: 2100 movs r1, #0
  8320. 8003a4c: 4608 mov r0, r1
  8321. 8003a4e: f008 f93d bl 800bccc <pbuf_alloced_custom>
  8322. {
  8323. RxAllocStatus = RX_ALLOC_ERROR;
  8324. *buff = NULL;
  8325. }
  8326. /* USER CODE END HAL ETH RxAllocateCallback */
  8327. }
  8328. 8003a52: b002 add sp, #8
  8329. 8003a54: bd10 pop {r4, pc}
  8330. RxAllocStatus = RX_ALLOC_ERROR;
  8331. 8003a56: 4b05 ldr r3, [pc, #20] @ (8003a6c <HAL_ETH_RxAllocateCallback+0x48>)
  8332. 8003a58: 2201 movs r2, #1
  8333. 8003a5a: 701a strb r2, [r3, #0]
  8334. *buff = NULL;
  8335. 8003a5c: 2300 movs r3, #0
  8336. 8003a5e: 6023 str r3, [r4, #0]
  8337. }
  8338. 8003a60: e7f7 b.n 8003a52 <HAL_ETH_RxAllocateCallback+0x2e>
  8339. 8003a62: bf00 nop
  8340. 8003a64: 0801463c .word 0x0801463c
  8341. 8003a68: 080035b5 .word 0x080035b5
  8342. 8003a6c: 24000f04 .word 0x24000f04
  8343. 08003a70 <HAL_ETH_RxLinkCallback>:
  8344. void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length)
  8345. {
  8346. 8003a70: b430 push {r4, r5}
  8347. struct pbuf **ppStart = (struct pbuf **)pStart;
  8348. struct pbuf **ppEnd = (struct pbuf **)pEnd;
  8349. struct pbuf *p = NULL;
  8350. /* Get the struct pbuf from the buff address. */
  8351. p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff));
  8352. 8003a72: f1a2 0420 sub.w r4, r2, #32
  8353. p->next = NULL;
  8354. 8003a76: 2500 movs r5, #0
  8355. 8003a78: f842 5c20 str.w r5, [r2, #-32]
  8356. p->tot_len = 0;
  8357. 8003a7c: f822 5c18 strh.w r5, [r2, #-24]
  8358. p->len = Length;
  8359. 8003a80: f822 3c16 strh.w r3, [r2, #-22]
  8360. /* Chain the buffer. */
  8361. if (!*ppStart)
  8362. 8003a84: 6805 ldr r5, [r0, #0]
  8363. 8003a86: b125 cbz r5, 8003a92 <HAL_ETH_RxLinkCallback+0x22>
  8364. *ppStart = p;
  8365. }
  8366. else
  8367. {
  8368. /* Chain the buffer to the end of the packet. */
  8369. (*ppEnd)->next = p;
  8370. 8003a88: 680d ldr r5, [r1, #0]
  8371. 8003a8a: 602c str r4, [r5, #0]
  8372. }
  8373. *ppEnd = p;
  8374. 8003a8c: 600c str r4, [r1, #0]
  8375. /* Update the total length of all the buffers of the chain. Each pbuf in the chain should have its tot_len
  8376. * set to its own length, plus the length of all the following pbufs in the chain. */
  8377. for (p = *ppStart; p != NULL; p = p->next)
  8378. 8003a8e: 6801 ldr r1, [r0, #0]
  8379. 8003a90: e005 b.n 8003a9e <HAL_ETH_RxLinkCallback+0x2e>
  8380. *ppStart = p;
  8381. 8003a92: 6004 str r4, [r0, #0]
  8382. 8003a94: e7fa b.n 8003a8c <HAL_ETH_RxLinkCallback+0x1c>
  8383. {
  8384. p->tot_len += Length;
  8385. 8003a96: 8908 ldrh r0, [r1, #8]
  8386. 8003a98: 4418 add r0, r3
  8387. 8003a9a: 8108 strh r0, [r1, #8]
  8388. for (p = *ppStart; p != NULL; p = p->next)
  8389. 8003a9c: 6809 ldr r1, [r1, #0]
  8390. 8003a9e: 2900 cmp r1, #0
  8391. 8003aa0: d1f9 bne.n 8003a96 <HAL_ETH_RxLinkCallback+0x26>
  8392. if ( dsize > 0 ) {
  8393. 8003aa2: b183 cbz r3, 8003ac6 <HAL_ETH_RxLinkCallback+0x56>
  8394. int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
  8395. 8003aa4: 4611 mov r1, r2
  8396. 8003aa6: f002 021f and.w r2, r2, #31
  8397. 8003aaa: 4413 add r3, r2
  8398. 8003aac: f3bf 8f4f dsb sy
  8399. SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
  8400. 8003ab0: 4a06 ldr r2, [pc, #24] @ (8003acc <HAL_ETH_RxLinkCallback+0x5c>)
  8401. 8003ab2: f8c2 125c str.w r1, [r2, #604] @ 0x25c
  8402. op_addr += __SCB_DCACHE_LINE_SIZE;
  8403. 8003ab6: 3120 adds r1, #32
  8404. op_size -= __SCB_DCACHE_LINE_SIZE;
  8405. 8003ab8: 3b20 subs r3, #32
  8406. } while ( op_size > 0 );
  8407. 8003aba: 2b00 cmp r3, #0
  8408. 8003abc: dcf8 bgt.n 8003ab0 <HAL_ETH_RxLinkCallback+0x40>
  8409. 8003abe: f3bf 8f4f dsb sy
  8410. __ASM volatile ("isb 0xF":::"memory");
  8411. 8003ac2: f3bf 8f6f isb sy
  8412. /* Invalidate data cache because Rx DMA's writing to physical memory makes it stale. */
  8413. SCB_InvalidateDCache_by_Addr((uint32_t *)buff, Length);
  8414. /* USER CODE END HAL ETH RxLinkCallback */
  8415. }
  8416. 8003ac6: bc30 pop {r4, r5}
  8417. 8003ac8: 4770 bx lr
  8418. 8003aca: bf00 nop
  8419. 8003acc: e000ed00 .word 0xe000ed00
  8420. 08003ad0 <HAL_ETH_TxFreeCallback>:
  8421. void HAL_ETH_TxFreeCallback(uint32_t * buff)
  8422. {
  8423. 8003ad0: b508 push {r3, lr}
  8424. /* USER CODE BEGIN HAL ETH TxFreeCallback */
  8425. pbuf_free((struct pbuf *)buff);
  8426. 8003ad2: f008 f965 bl 800bda0 <pbuf_free>
  8427. /* USER CODE END HAL ETH TxFreeCallback */
  8428. }
  8429. 8003ad6: bd08 pop {r3, pc}
  8430. 08003ad8 <sys_lock_tcpip_core>:
  8431. /* ETH_CODE: add functions needed for proper multithreading support and check */
  8432. static osThreadId_t lwip_core_lock_holder_thread_id;
  8433. static osThreadId_t lwip_tcpip_thread_id;
  8434. void sys_lock_tcpip_core(void){
  8435. 8003ad8: b508 push {r3, lr}
  8436. sys_mutex_lock(&lock_tcpip_core);
  8437. 8003ada: 4804 ldr r0, [pc, #16] @ (8003aec <sys_lock_tcpip_core+0x14>)
  8438. 8003adc: f009 faa6 bl 800d02c <sys_mutex_lock>
  8439. lwip_core_lock_holder_thread_id = osThreadGetId();
  8440. 8003ae0: f000 f9d8 bl 8003e94 <osThreadGetId>
  8441. 8003ae4: 4b02 ldr r3, [pc, #8] @ (8003af0 <sys_lock_tcpip_core+0x18>)
  8442. 8003ae6: 6018 str r0, [r3, #0]
  8443. }
  8444. 8003ae8: bd08 pop {r3, pc}
  8445. 8003aea: bf00 nop
  8446. 8003aec: 24019c24 .word 0x24019c24
  8447. 8003af0: 24000df0 .word 0x24000df0
  8448. 08003af4 <sys_unlock_tcpip_core>:
  8449. void sys_unlock_tcpip_core(void){
  8450. 8003af4: b508 push {r3, lr}
  8451. lwip_core_lock_holder_thread_id = 0;
  8452. 8003af6: 4b03 ldr r3, [pc, #12] @ (8003b04 <sys_unlock_tcpip_core+0x10>)
  8453. 8003af8: 2200 movs r2, #0
  8454. 8003afa: 601a str r2, [r3, #0]
  8455. sys_mutex_unlock(&lock_tcpip_core);
  8456. 8003afc: 4802 ldr r0, [pc, #8] @ (8003b08 <sys_unlock_tcpip_core+0x14>)
  8457. 8003afe: f009 fa9c bl 800d03a <sys_mutex_unlock>
  8458. }
  8459. 8003b02: bd08 pop {r3, pc}
  8460. 8003b04: 24000df0 .word 0x24000df0
  8461. 8003b08: 24019c24 .word 0x24019c24
  8462. 08003b0c <sys_check_core_locking>:
  8463. void sys_check_core_locking(void){
  8464. 8003b0c: b510 push {r4, lr}
  8465. /* Embedded systems should check we are NOT in an interrupt context here */
  8466. LWIP_ASSERT("Function called from interrupt context", (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0);
  8467. 8003b0e: 4b12 ldr r3, [pc, #72] @ (8003b58 <sys_check_core_locking+0x4c>)
  8468. 8003b10: 685b ldr r3, [r3, #4]
  8469. 8003b12: f3c3 0308 ubfx r3, r3, #0, #9
  8470. 8003b16: b9b3 cbnz r3, 8003b46 <sys_check_core_locking+0x3a>
  8471. if (lwip_tcpip_thread_id != 0) {
  8472. 8003b18: 4b10 ldr r3, [pc, #64] @ (8003b5c <sys_check_core_locking+0x50>)
  8473. 8003b1a: 681b ldr r3, [r3, #0]
  8474. 8003b1c: b193 cbz r3, 8003b44 <sys_check_core_locking+0x38>
  8475. osThreadId_t current_thread_id = osThreadGetId();
  8476. 8003b1e: f000 f9b9 bl 8003e94 <osThreadGetId>
  8477. 8003b22: 4604 mov r4, r0
  8478. #if LWIP_TCPIP_CORE_LOCKING
  8479. LWIP_ASSERT("Function called without core lock", current_thread_id == lwip_core_lock_holder_thread_id);
  8480. 8003b24: 4b0e ldr r3, [pc, #56] @ (8003b60 <sys_check_core_locking+0x54>)
  8481. 8003b26: 681b ldr r3, [r3, #0]
  8482. 8003b28: 4283 cmp r3, r0
  8483. 8003b2a: d006 beq.n 8003b3a <sys_check_core_locking+0x2e>
  8484. 8003b2c: 4b0d ldr r3, [pc, #52] @ (8003b64 <sys_check_core_locking+0x58>)
  8485. 8003b2e: f240 4224 movw r2, #1060 @ 0x424
  8486. 8003b32: 490d ldr r1, [pc, #52] @ (8003b68 <sys_check_core_locking+0x5c>)
  8487. 8003b34: 480d ldr r0, [pc, #52] @ (8003b6c <sys_check_core_locking+0x60>)
  8488. 8003b36: f00f fc67 bl 8013408 <iprintf>
  8489. /* ETH_CODE: to easily check that example has correct handling of core lock
  8490. * This will trigger breakpoint (__BKPT)
  8491. */
  8492. #warning Below check should be removed in production code
  8493. if(current_thread_id != lwip_core_lock_holder_thread_id) __BKPT(0);
  8494. 8003b3a: 4b09 ldr r3, [pc, #36] @ (8003b60 <sys_check_core_locking+0x54>)
  8495. 8003b3c: 681b ldr r3, [r3, #0]
  8496. 8003b3e: 42a3 cmp r3, r4
  8497. 8003b40: d000 beq.n 8003b44 <sys_check_core_locking+0x38>
  8498. 8003b42: be00 bkpt 0x0000
  8499. #else /* LWIP_TCPIP_CORE_LOCKING */
  8500. LWIP_ASSERT("Function called from wrong thread", current_thread_id == lwip_tcpip_thread_id);
  8501. #endif /* LWIP_TCPIP_CORE_LOCKING */
  8502. LWIP_UNUSED_ARG(current_thread_id); /* for LWIP_NOASSERT */
  8503. }
  8504. }
  8505. 8003b44: bd10 pop {r4, pc}
  8506. LWIP_ASSERT("Function called from interrupt context", (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0);
  8507. 8003b46: 4b07 ldr r3, [pc, #28] @ (8003b64 <sys_check_core_locking+0x58>)
  8508. 8003b48: f240 421e movw r2, #1054 @ 0x41e
  8509. 8003b4c: 4908 ldr r1, [pc, #32] @ (8003b70 <sys_check_core_locking+0x64>)
  8510. 8003b4e: 4807 ldr r0, [pc, #28] @ (8003b6c <sys_check_core_locking+0x60>)
  8511. 8003b50: f00f fc5a bl 8013408 <iprintf>
  8512. 8003b54: e7e0 b.n 8003b18 <sys_check_core_locking+0xc>
  8513. 8003b56: bf00 nop
  8514. 8003b58: e000ed00 .word 0xe000ed00
  8515. 8003b5c: 24000dec .word 0x24000dec
  8516. 8003b60: 24000df0 .word 0x24000df0
  8517. 8003b64: 080144bc .word 0x080144bc
  8518. 8003b68: 08014538 .word 0x08014538
  8519. 8003b6c: 080144e8 .word 0x080144e8
  8520. 8003b70: 08014510 .word 0x08014510
  8521. 08003b74 <sys_mark_tcpip_thread>:
  8522. void sys_mark_tcpip_thread(void){
  8523. 8003b74: b508 push {r3, lr}
  8524. lwip_tcpip_thread_id = osThreadGetId();
  8525. 8003b76: f000 f98d bl 8003e94 <osThreadGetId>
  8526. 8003b7a: 4b01 ldr r3, [pc, #4] @ (8003b80 <sys_mark_tcpip_thread+0xc>)
  8527. 8003b7c: 6018 str r0, [r3, #0]
  8528. }
  8529. 8003b7e: bd08 pop {r3, pc}
  8530. 8003b80: 24000dec .word 0x24000dec
  8531. 08003b84 <dhcp_sm>:
  8532. void dhcp_sm(struct netif *netif, enum dhcp_states *state)
  8533. {
  8534. 8003b84: b530 push {r4, r5, lr}
  8535. 8003b86: b089 sub sp, #36 @ 0x24
  8536. 8003b88: 4605 mov r5, r0
  8537. 8003b8a: 460c mov r4, r1
  8538. ip_addr_t gw;
  8539. #ifdef DHCP_USER_LOGS
  8540. uint8_t iptxt[20];
  8541. #endif
  8542. switch(*state)
  8543. 8003b8c: 780b ldrb r3, [r1, #0]
  8544. 8003b8e: 2b02 cmp r3, #2
  8545. 8003b90: d00b beq.n 8003baa <dhcp_sm+0x26>
  8546. 8003b92: 2b03 cmp r3, #3
  8547. 8003b94: d04c beq.n 8003c30 <dhcp_sm+0xac>
  8548. 8003b96: 2b01 cmp r3, #1
  8549. 8003b98: d001 beq.n 8003b9e <dhcp_sm+0x1a>
  8550. }
  8551. break;
  8552. default:
  8553. break;
  8554. }
  8555. }
  8556. 8003b9a: b009 add sp, #36 @ 0x24
  8557. 8003b9c: bd30 pop {r4, r5, pc}
  8558. *state = DHCP_WAIT_ADDRESS;
  8559. 8003b9e: 2302 movs r3, #2
  8560. 8003ba0: 700b strb r3, [r1, #0]
  8561. printf(" State: Looking for DHCP server ...\n");
  8562. 8003ba2: 4827 ldr r0, [pc, #156] @ (8003c40 <dhcp_sm+0xbc>)
  8563. 8003ba4: f00f fc98 bl 80134d8 <puts>
  8564. break;
  8565. 8003ba8: e7f7 b.n 8003b9a <dhcp_sm+0x16>
  8566. if (dhcp_supplied_address(netif))
  8567. 8003baa: f005 fa67 bl 800907c <dhcp_supplied_address>
  8568. 8003bae: bb88 cbnz r0, 8003c14 <dhcp_sm+0x90>
  8569. dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP);
  8570. 8003bb0: 6a6b ldr r3, [r5, #36] @ 0x24
  8571. if (dhcp->tries > MAX_DHCP_TRIES)
  8572. 8003bb2: 799b ldrb r3, [r3, #6]
  8573. 8003bb4: 2b04 cmp r3, #4
  8574. 8003bb6: d9f0 bls.n 8003b9a <dhcp_sm+0x16>
  8575. *state = DHCP_TIMEOUT;
  8576. 8003bb8: 2304 movs r3, #4
  8577. 8003bba: 7023 strb r3, [r4, #0]
  8578. LOCK_TCPIP_CORE();
  8579. 8003bbc: f7ff ff8c bl 8003ad8 <sys_lock_tcpip_core>
  8580. dhcp_stop(netif);
  8581. 8003bc0: 4628 mov r0, r5
  8582. 8003bc2: f005 fbb5 bl 8009330 <dhcp_stop>
  8583. UNLOCK_TCPIP_CORE();
  8584. 8003bc6: f7ff ff95 bl 8003af4 <sys_unlock_tcpip_core>
  8585. ipaddr_aton(STATIC_IP, &ipaddr);
  8586. 8003bca: a907 add r1, sp, #28
  8587. 8003bcc: 481d ldr r0, [pc, #116] @ (8003c44 <dhcp_sm+0xc0>)
  8588. 8003bce: f006 fc61 bl 800a494 <ip4addr_aton>
  8589. ipaddr_aton(STATIC_MASK, &netmask);
  8590. 8003bd2: a906 add r1, sp, #24
  8591. 8003bd4: 481c ldr r0, [pc, #112] @ (8003c48 <dhcp_sm+0xc4>)
  8592. 8003bd6: f006 fc5d bl 800a494 <ip4addr_aton>
  8593. ipaddr_aton(STATIC_GW, &gw);
  8594. 8003bda: a905 add r1, sp, #20
  8595. 8003bdc: 481b ldr r0, [pc, #108] @ (8003c4c <dhcp_sm+0xc8>)
  8596. 8003bde: f006 fc59 bl 800a494 <ip4addr_aton>
  8597. LOCK_TCPIP_CORE();
  8598. 8003be2: f7ff ff79 bl 8003ad8 <sys_lock_tcpip_core>
  8599. netif_set_addr(netif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw));
  8600. 8003be6: ab05 add r3, sp, #20
  8601. 8003be8: aa06 add r2, sp, #24
  8602. 8003bea: a907 add r1, sp, #28
  8603. 8003bec: 4628 mov r0, r5
  8604. 8003bee: f007 fe2d bl 800b84c <netif_set_addr>
  8605. UNLOCK_TCPIP_CORE();
  8606. 8003bf2: f7ff ff7f bl 8003af4 <sys_unlock_tcpip_core>
  8607. sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr));
  8608. 8003bf6: 1d28 adds r0, r5, #4
  8609. 8003bf8: f006 fd5c bl 800a6b4 <ip4addr_ntoa>
  8610. 8003bfc: 4601 mov r1, r0
  8611. 8003bfe: 4668 mov r0, sp
  8612. 8003c00: f00f fe37 bl 8013872 <strcpy>
  8613. printf("DHCP Timeout !! \n");
  8614. 8003c04: 4812 ldr r0, [pc, #72] @ (8003c50 <dhcp_sm+0xcc>)
  8615. 8003c06: f00f fc67 bl 80134d8 <puts>
  8616. printf("Static IP address: %s\n", iptxt);
  8617. 8003c0a: 4669 mov r1, sp
  8618. 8003c0c: 4811 ldr r0, [pc, #68] @ (8003c54 <dhcp_sm+0xd0>)
  8619. 8003c0e: f00f fbfb bl 8013408 <iprintf>
  8620. 8003c12: e7c2 b.n 8003b9a <dhcp_sm+0x16>
  8621. *state = DHCP_ADDRESS_ASSIGNED;
  8622. 8003c14: 2303 movs r3, #3
  8623. 8003c16: 7023 strb r3, [r4, #0]
  8624. sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr));
  8625. 8003c18: 1d28 adds r0, r5, #4
  8626. 8003c1a: f006 fd4b bl 800a6b4 <ip4addr_ntoa>
  8627. 8003c1e: 4601 mov r1, r0
  8628. 8003c20: 4668 mov r0, sp
  8629. 8003c22: f00f fe26 bl 8013872 <strcpy>
  8630. printf("IP address assigned by a DHCP server: %s\n", iptxt);
  8631. 8003c26: 4669 mov r1, sp
  8632. 8003c28: 480b ldr r0, [pc, #44] @ (8003c58 <dhcp_sm+0xd4>)
  8633. 8003c2a: f00f fbed bl 8013408 <iprintf>
  8634. 8003c2e: e7b4 b.n 8003b9a <dhcp_sm+0x16>
  8635. dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP);
  8636. 8003c30: 6a43 ldr r3, [r0, #36] @ 0x24
  8637. if(dhcp->state == 3)
  8638. 8003c32: 795b ldrb r3, [r3, #5]
  8639. 8003c34: 2b03 cmp r3, #3
  8640. 8003c36: d1b0 bne.n 8003b9a <dhcp_sm+0x16>
  8641. *state = DHCP_START;
  8642. 8003c38: 2301 movs r3, #1
  8643. 8003c3a: 700b strb r3, [r1, #0]
  8644. }
  8645. 8003c3c: e7ad b.n 8003b9a <dhcp_sm+0x16>
  8646. 8003c3e: bf00 nop
  8647. 8003c40: 0801455c .word 0x0801455c
  8648. 8003c44: 080145b0 .word 0x080145b0
  8649. 8003c48: 080145c0 .word 0x080145c0
  8650. 8003c4c: 080145d0 .word 0x080145d0
  8651. 8003c50: 080145dc .word 0x080145dc
  8652. 8003c54: 080145f0 .word 0x080145f0
  8653. 8003c58: 08014584 .word 0x08014584
  8654. 08003c5c <ethernet_link_thread>:
  8655. {
  8656. 8003c5c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  8657. 8003c60: b09a sub sp, #104 @ 0x68
  8658. 8003c62: 4604 mov r4, r0
  8659. ETH_MACConfigTypeDef MACConf = {0};
  8660. 8003c64: 2264 movs r2, #100 @ 0x64
  8661. 8003c66: 2100 movs r1, #0
  8662. 8003c68: a801 add r0, sp, #4
  8663. 8003c6a: f00f fd25 bl 80136b8 <memset>
  8664. enum dhcp_states DHCP_state = DHCP_START;
  8665. 8003c6e: 2301 movs r3, #1
  8666. 8003c70: f88d 3003 strb.w r3, [sp, #3]
  8667. uint32_t linkchanged = 0U, speed = 0U, duplex = 0U;
  8668. 8003c74: 2600 movs r6, #0
  8669. 8003c76: 4637 mov r7, r6
  8670. 8003c78: 4635 mov r5, r6
  8671. 8003c7a: e028 b.n 8003cce <ethernet_link_thread+0x72>
  8672. else if(!netif_is_link_up(netif) && (PHYLinkState > LAN8742_STATUS_LINK_DOWN))
  8673. 8003c7c: f013 0f04 tst.w r3, #4
  8674. 8003c80: d11c bne.n 8003cbc <ethernet_link_thread+0x60>
  8675. 8003c82: 2801 cmp r0, #1
  8676. 8003c84: dd1a ble.n 8003cbc <ethernet_link_thread+0x60>
  8677. switch (PHYLinkState)
  8678. 8003c86: 3802 subs r0, #2
  8679. 8003c88: 2803 cmp r0, #3
  8680. 8003c8a: d816 bhi.n 8003cba <ethernet_link_thread+0x5e>
  8681. 8003c8c: e8df f000 tbb [pc, r0]
  8682. 8003c90: 0c070210 .word 0x0c070210
  8683. duplex = ETH_HALFDUPLEX_MODE;
  8684. 8003c94: 2600 movs r6, #0
  8685. speed = ETH_SPEED_100M;
  8686. 8003c96: f44f 4780 mov.w r7, #16384 @ 0x4000
  8687. linkchanged = 1;
  8688. 8003c9a: 2501 movs r5, #1
  8689. break;
  8690. 8003c9c: e00d b.n 8003cba <ethernet_link_thread+0x5e>
  8691. duplex = ETH_FULLDUPLEX_MODE;
  8692. 8003c9e: f44f 5600 mov.w r6, #8192 @ 0x2000
  8693. speed = ETH_SPEED_10M;
  8694. 8003ca2: 2700 movs r7, #0
  8695. linkchanged = 1;
  8696. 8003ca4: 2501 movs r5, #1
  8697. break;
  8698. 8003ca6: e008 b.n 8003cba <ethernet_link_thread+0x5e>
  8699. duplex = ETH_HALFDUPLEX_MODE;
  8700. 8003ca8: 2600 movs r6, #0
  8701. speed = ETH_SPEED_10M;
  8702. 8003caa: 4637 mov r7, r6
  8703. linkchanged = 1;
  8704. 8003cac: 2501 movs r5, #1
  8705. break;
  8706. 8003cae: e004 b.n 8003cba <ethernet_link_thread+0x5e>
  8707. duplex = ETH_FULLDUPLEX_MODE;
  8708. 8003cb0: f44f 5600 mov.w r6, #8192 @ 0x2000
  8709. speed = ETH_SPEED_100M;
  8710. 8003cb4: f44f 4780 mov.w r7, #16384 @ 0x4000
  8711. linkchanged = 1;
  8712. 8003cb8: 2501 movs r5, #1
  8713. if(linkchanged)
  8714. 8003cba: bb1d cbnz r5, 8003d04 <ethernet_link_thread+0xa8>
  8715. dhcp_sm(netif, &DHCP_state);
  8716. 8003cbc: f10d 0103 add.w r1, sp, #3
  8717. 8003cc0: 4620 mov r0, r4
  8718. 8003cc2: f7ff ff5f bl 8003b84 <dhcp_sm>
  8719. osDelay(pdMS_TO_TICKS(500));
  8720. 8003cc6: f44f 70fa mov.w r0, #500 @ 0x1f4
  8721. 8003cca: f000 f8e7 bl 8003e9c <osDelay>
  8722. PHYLinkState = LAN8742_GetLinkState(&LAN8742);
  8723. 8003cce: 481c ldr r0, [pc, #112] @ (8003d40 <ethernet_link_thread+0xe4>)
  8724. 8003cd0: f7fd f840 bl 8000d54 <LAN8742_GetLinkState>
  8725. if(netif_is_link_up(netif) && (PHYLinkState <= LAN8742_STATUS_LINK_DOWN))
  8726. 8003cd4: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
  8727. 8003cd8: f013 0f04 tst.w r3, #4
  8728. 8003cdc: d0ce beq.n 8003c7c <ethernet_link_thread+0x20>
  8729. 8003cde: 2801 cmp r0, #1
  8730. 8003ce0: dccc bgt.n 8003c7c <ethernet_link_thread+0x20>
  8731. HAL_ETH_Stop_IT(&heth);
  8732. 8003ce2: 4818 ldr r0, [pc, #96] @ (8003d44 <ethernet_link_thread+0xe8>)
  8733. 8003ce4: f7fd fe00 bl 80018e8 <HAL_ETH_Stop_IT>
  8734. LOCK_TCPIP_CORE();
  8735. 8003ce8: f7ff fef6 bl 8003ad8 <sys_lock_tcpip_core>
  8736. netif_set_down(netif);
  8737. 8003cec: 4620 mov r0, r4
  8738. 8003cee: f007 feaf bl 800ba50 <netif_set_down>
  8739. netif_set_link_down(netif);
  8740. 8003cf2: 4620 mov r0, r4
  8741. 8003cf4: f007 fefa bl 800baec <netif_set_link_down>
  8742. UNLOCK_TCPIP_CORE();
  8743. 8003cf8: f7ff fefc bl 8003af4 <sys_unlock_tcpip_core>
  8744. printf("Link down...\r\n");
  8745. 8003cfc: 4812 ldr r0, [pc, #72] @ (8003d48 <ethernet_link_thread+0xec>)
  8746. 8003cfe: f00f fbeb bl 80134d8 <puts>
  8747. 8003d02: e7db b.n 8003cbc <ethernet_link_thread+0x60>
  8748. HAL_ETH_GetMACConfig(&heth, &MACConf);
  8749. 8003d04: f8df 803c ldr.w r8, [pc, #60] @ 8003d44 <ethernet_link_thread+0xe8>
  8750. 8003d08: a901 add r1, sp, #4
  8751. 8003d0a: 4640 mov r0, r8
  8752. 8003d0c: f7fe f856 bl 8001dbc <HAL_ETH_GetMACConfig>
  8753. MACConf.DuplexMode = duplex;
  8754. 8003d10: 9607 str r6, [sp, #28]
  8755. MACConf.Speed = speed;
  8756. 8003d12: 9706 str r7, [sp, #24]
  8757. HAL_ETH_SetMACConfig(&heth, &MACConf);
  8758. 8003d14: a901 add r1, sp, #4
  8759. 8003d16: 4640 mov r0, r8
  8760. 8003d18: f7fe f943 bl 8001fa2 <HAL_ETH_SetMACConfig>
  8761. HAL_ETH_Start(&heth);
  8762. 8003d1c: 4640 mov r0, r8
  8763. 8003d1e: f7fd fd85 bl 800182c <HAL_ETH_Start_IT>
  8764. LOCK_TCPIP_CORE();
  8765. 8003d22: f7ff fed9 bl 8003ad8 <sys_lock_tcpip_core>
  8766. netif_set_up(netif);
  8767. 8003d26: 4620 mov r0, r4
  8768. 8003d28: f007 fe70 bl 800ba0c <netif_set_up>
  8769. netif_set_link_up(netif);
  8770. 8003d2c: 4620 mov r0, r4
  8771. 8003d2e: f007 feb3 bl 800ba98 <netif_set_link_up>
  8772. UNLOCK_TCPIP_CORE();
  8773. 8003d32: f7ff fedf bl 8003af4 <sys_unlock_tcpip_core>
  8774. printf("Link up...\r\n");
  8775. 8003d36: 4805 ldr r0, [pc, #20] @ (8003d4c <ethernet_link_thread+0xf0>)
  8776. 8003d38: f00f fbce bl 80134d8 <puts>
  8777. 8003d3c: e7be b.n 8003cbc <ethernet_link_thread+0x60>
  8778. 8003d3e: bf00 nop
  8779. 8003d40: 24000df4 .word 0x24000df4
  8780. 8003d44: 24000e4c .word 0x24000e4c
  8781. 8003d48: 08014608 .word 0x08014608
  8782. 8003d4c: 08014618 .word 0x08014618
  8783. 08003d50 <SysTick_Handler>:
  8784. /*
  8785. SysTick handler implementation that also clears overflow flag.
  8786. */
  8787. #if (USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0)
  8788. void SysTick_Handler (void) {
  8789. 8003d50: b508 push {r3, lr}
  8790. /* Clear overflow flag */
  8791. SysTick->CTRL;
  8792. 8003d52: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  8793. 8003d56: 691b ldr r3, [r3, #16]
  8794. if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
  8795. 8003d58: f002 f92a bl 8005fb0 <xTaskGetSchedulerState>
  8796. 8003d5c: 2801 cmp r0, #1
  8797. 8003d5e: d100 bne.n 8003d62 <SysTick_Handler+0x12>
  8798. /* Call tick handler */
  8799. xPortSysTickHandler();
  8800. }
  8801. }
  8802. 8003d60: bd08 pop {r3, pc}
  8803. xPortSysTickHandler();
  8804. 8003d62: f000 fd67 bl 8004834 <xPortSysTickHandler>
  8805. }
  8806. 8003d66: e7fb b.n 8003d60 <SysTick_Handler+0x10>
  8807. 08003d68 <osKernelInitialize>:
  8808. __ASM volatile ("MRS %0, ipsr" : "=r" (result) );
  8809. 8003d68: f3ef 8305 mrs r3, IPSR
  8810. /*---------------------------------------------------------------------------*/
  8811. osStatus_t osKernelInitialize (void) {
  8812. osStatus_t stat;
  8813. if (IS_IRQ()) {
  8814. 8003d6c: b92b cbnz r3, 8003d7a <osKernelInitialize+0x12>
  8815. stat = osErrorISR;
  8816. }
  8817. else {
  8818. if (KernelState == osKernelInactive) {
  8819. 8003d6e: 4b06 ldr r3, [pc, #24] @ (8003d88 <osKernelInitialize+0x20>)
  8820. 8003d70: 6818 ldr r0, [r3, #0]
  8821. 8003d72: b928 cbnz r0, 8003d80 <osKernelInitialize+0x18>
  8822. EvrFreeRTOSSetup(0U);
  8823. #endif
  8824. #if defined(USE_FreeRTOS_HEAP_5) && (HEAP_5_REGION_SETUP == 1)
  8825. vPortDefineHeapRegions (configHEAP_5_REGIONS);
  8826. #endif
  8827. KernelState = osKernelReady;
  8828. 8003d74: 2201 movs r2, #1
  8829. 8003d76: 601a str r2, [r3, #0]
  8830. stat = osOK;
  8831. 8003d78: 4770 bx lr
  8832. stat = osErrorISR;
  8833. 8003d7a: f06f 0005 mvn.w r0, #5
  8834. 8003d7e: 4770 bx lr
  8835. } else {
  8836. stat = osError;
  8837. 8003d80: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  8838. }
  8839. }
  8840. return (stat);
  8841. }
  8842. 8003d84: 4770 bx lr
  8843. 8003d86: bf00 nop
  8844. 8003d88: 2400285c .word 0x2400285c
  8845. 08003d8c <osKernelStart>:
  8846. 8003d8c: f3ef 8305 mrs r3, IPSR
  8847. }
  8848. osStatus_t osKernelStart (void) {
  8849. osStatus_t stat;
  8850. if (IS_IRQ()) {
  8851. 8003d90: b973 cbnz r3, 8003db0 <osKernelStart+0x24>
  8852. stat = osErrorISR;
  8853. }
  8854. else {
  8855. if (KernelState == osKernelReady) {
  8856. 8003d92: 4b0a ldr r3, [pc, #40] @ (8003dbc <osKernelStart+0x30>)
  8857. 8003d94: 681b ldr r3, [r3, #0]
  8858. 8003d96: 2b01 cmp r3, #1
  8859. 8003d98: d10d bne.n 8003db6 <osKernelStart+0x2a>
  8860. osStatus_t osKernelStart (void) {
  8861. 8003d9a: b510 push {r4, lr}
  8862. SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
  8863. 8003d9c: 2400 movs r4, #0
  8864. 8003d9e: 4b08 ldr r3, [pc, #32] @ (8003dc0 <osKernelStart+0x34>)
  8865. 8003da0: 77dc strb r4, [r3, #31]
  8866. /* Ensure SVC priority is at the reset value */
  8867. SVC_Setup();
  8868. /* Change state to enable IRQ masking check */
  8869. KernelState = osKernelRunning;
  8870. 8003da2: 4b06 ldr r3, [pc, #24] @ (8003dbc <osKernelStart+0x30>)
  8871. 8003da4: 2202 movs r2, #2
  8872. 8003da6: 601a str r2, [r3, #0]
  8873. /* Start the kernel scheduler */
  8874. vTaskStartScheduler();
  8875. 8003da8: f001 fe34 bl 8005a14 <vTaskStartScheduler>
  8876. stat = osOK;
  8877. 8003dac: 4620 mov r0, r4
  8878. stat = osError;
  8879. }
  8880. }
  8881. return (stat);
  8882. }
  8883. 8003dae: bd10 pop {r4, pc}
  8884. stat = osErrorISR;
  8885. 8003db0: f06f 0005 mvn.w r0, #5
  8886. 8003db4: 4770 bx lr
  8887. stat = osError;
  8888. 8003db6: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  8889. }
  8890. 8003dba: 4770 bx lr
  8891. 8003dbc: 2400285c .word 0x2400285c
  8892. 8003dc0: e000ed00 .word 0xe000ed00
  8893. 08003dc4 <osKernelGetTickCount>:
  8894. }
  8895. return (lock);
  8896. }
  8897. uint32_t osKernelGetTickCount (void) {
  8898. 8003dc4: b508 push {r3, lr}
  8899. 8003dc6: f3ef 8305 mrs r3, IPSR
  8900. TickType_t ticks;
  8901. if (IS_IRQ()) {
  8902. 8003dca: b113 cbz r3, 8003dd2 <osKernelGetTickCount+0xe>
  8903. ticks = xTaskGetTickCountFromISR();
  8904. 8003dcc: f001 fe86 bl 8005adc <xTaskGetTickCountFromISR>
  8905. } else {
  8906. ticks = xTaskGetTickCount();
  8907. }
  8908. return (ticks);
  8909. }
  8910. 8003dd0: bd08 pop {r3, pc}
  8911. ticks = xTaskGetTickCount();
  8912. 8003dd2: f001 fe7d bl 8005ad0 <xTaskGetTickCount>
  8913. return (ticks);
  8914. 8003dd6: e7fb b.n 8003dd0 <osKernelGetTickCount+0xc>
  8915. 08003dd8 <osThreadNew>:
  8916. return (configCPU_CLOCK_HZ);
  8917. }
  8918. /*---------------------------------------------------------------------------*/
  8919. osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr) {
  8920. 8003dd8: b5f0 push {r4, r5, r6, r7, lr}
  8921. 8003dda: b087 sub sp, #28
  8922. uint32_t stack;
  8923. TaskHandle_t hTask;
  8924. UBaseType_t prio;
  8925. int32_t mem;
  8926. hTask = NULL;
  8927. 8003ddc: 2400 movs r4, #0
  8928. 8003dde: 9405 str r4, [sp, #20]
  8929. 8003de0: f3ef 8405 mrs r4, IPSR
  8930. if (!IS_IRQ() && (func != NULL)) {
  8931. 8003de4: bb74 cbnz r4, 8003e44 <osThreadNew+0x6c>
  8932. 8003de6: b368 cbz r0, 8003e44 <osThreadNew+0x6c>
  8933. prio = (UBaseType_t)osPriorityNormal;
  8934. name = NULL;
  8935. mem = -1;
  8936. if (attr != NULL) {
  8937. 8003de8: b322 cbz r2, 8003e34 <osThreadNew+0x5c>
  8938. if (attr->name != NULL) {
  8939. 8003dea: 6815 ldr r5, [r2, #0]
  8940. name = attr->name;
  8941. }
  8942. if (attr->priority != osPriorityNone) {
  8943. 8003dec: 6993 ldr r3, [r2, #24]
  8944. 8003dee: b903 cbnz r3, 8003df2 <osThreadNew+0x1a>
  8945. prio = (UBaseType_t)osPriorityNormal;
  8946. 8003df0: 2318 movs r3, #24
  8947. prio = (UBaseType_t)attr->priority;
  8948. }
  8949. if ((prio < osPriorityIdle) || (prio > osPriorityISR) || ((attr->attr_bits & osThreadJoinable) == osThreadJoinable)) {
  8950. 8003df2: 1e5c subs r4, r3, #1
  8951. 8003df4: 2c37 cmp r4, #55 @ 0x37
  8952. 8003df6: d849 bhi.n 8003e8c <osThreadNew+0xb4>
  8953. 8003df8: 6854 ldr r4, [r2, #4]
  8954. 8003dfa: f014 0f01 tst.w r4, #1
  8955. 8003dfe: d147 bne.n 8003e90 <osThreadNew+0xb8>
  8956. return (NULL);
  8957. }
  8958. if (attr->stack_size > 0U) {
  8959. 8003e00: 6956 ldr r6, [r2, #20]
  8960. 8003e02: b16e cbz r6, 8003e20 <osThreadNew+0x48>
  8961. /* In FreeRTOS stack is not in bytes, but in sizeof(StackType_t) which is 4 on ARM ports. */
  8962. /* Stack size should be therefore 4 byte aligned in order to avoid division caused side effects */
  8963. stack = attr->stack_size / sizeof(StackType_t);
  8964. 8003e04: ea4f 0c96 mov.w ip, r6, lsr #2
  8965. }
  8966. if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) &&
  8967. 8003e08: 6894 ldr r4, [r2, #8]
  8968. 8003e0a: b12c cbz r4, 8003e18 <osThreadNew+0x40>
  8969. 8003e0c: 68d7 ldr r7, [r2, #12]
  8970. 8003e0e: 2fa7 cmp r7, #167 @ 0xa7
  8971. 8003e10: d902 bls.n 8003e18 <osThreadNew+0x40>
  8972. 8003e12: 6917 ldr r7, [r2, #16]
  8973. 8003e14: b107 cbz r7, 8003e18 <osThreadNew+0x40>
  8974. (attr->stack_mem != NULL) && (attr->stack_size > 0U)) {
  8975. 8003e16: b9c6 cbnz r6, 8003e4a <osThreadNew+0x72>
  8976. mem = 1;
  8977. }
  8978. else {
  8979. if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) {
  8980. 8003e18: b12c cbz r4, 8003e26 <osThreadNew+0x4e>
  8981. mem = -1;
  8982. 8003e1a: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  8983. 8003e1e: e00e b.n 8003e3e <osThreadNew+0x66>
  8984. stack = configMINIMAL_STACK_SIZE;
  8985. 8003e20: f44f 7c00 mov.w ip, #512 @ 0x200
  8986. 8003e24: e7f0 b.n 8003e08 <osThreadNew+0x30>
  8987. if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) {
  8988. 8003e26: 68d4 ldr r4, [r2, #12]
  8989. 8003e28: b98c cbnz r4, 8003e4e <osThreadNew+0x76>
  8990. 8003e2a: 6914 ldr r4, [r2, #16]
  8991. 8003e2c: b194 cbz r4, 8003e54 <osThreadNew+0x7c>
  8992. mem = -1;
  8993. 8003e2e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  8994. 8003e32: e004 b.n 8003e3e <osThreadNew+0x66>
  8995. name = NULL;
  8996. 8003e34: 4615 mov r5, r2
  8997. mem = 0;
  8998. }
  8999. }
  9000. }
  9001. else {
  9002. mem = 0;
  9003. 8003e36: 2400 movs r4, #0
  9004. prio = (UBaseType_t)osPriorityNormal;
  9005. 8003e38: 2318 movs r3, #24
  9006. stack = configMINIMAL_STACK_SIZE;
  9007. 8003e3a: f44f 7c00 mov.w ip, #512 @ 0x200
  9008. }
  9009. if (mem == 1) {
  9010. 8003e3e: 2c01 cmp r4, #1
  9011. 8003e40: d00a beq.n 8003e58 <osThreadNew+0x80>
  9012. hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem,
  9013. (StaticTask_t *)attr->cb_mem);
  9014. #endif
  9015. }
  9016. else {
  9017. if (mem == 0) {
  9018. 8003e42: b1ac cbz r4, 8003e70 <osThreadNew+0x98>
  9019. #endif
  9020. }
  9021. }
  9022. }
  9023. return ((osThreadId_t)hTask);
  9024. 8003e44: 9805 ldr r0, [sp, #20]
  9025. }
  9026. 8003e46: b007 add sp, #28
  9027. 8003e48: bdf0 pop {r4, r5, r6, r7, pc}
  9028. mem = 1;
  9029. 8003e4a: 2401 movs r4, #1
  9030. 8003e4c: e7f7 b.n 8003e3e <osThreadNew+0x66>
  9031. mem = -1;
  9032. 8003e4e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  9033. 8003e52: e7f4 b.n 8003e3e <osThreadNew+0x66>
  9034. mem = 0;
  9035. 8003e54: 2400 movs r4, #0
  9036. 8003e56: e7f2 b.n 8003e3e <osThreadNew+0x66>
  9037. hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem,
  9038. 8003e58: 6914 ldr r4, [r2, #16]
  9039. (StaticTask_t *)attr->cb_mem);
  9040. 8003e5a: 6892 ldr r2, [r2, #8]
  9041. hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem,
  9042. 8003e5c: 9202 str r2, [sp, #8]
  9043. 8003e5e: 9401 str r4, [sp, #4]
  9044. 8003e60: 9300 str r3, [sp, #0]
  9045. 8003e62: 460b mov r3, r1
  9046. 8003e64: 4662 mov r2, ip
  9047. 8003e66: 4629 mov r1, r5
  9048. 8003e68: f001 fd66 bl 8005938 <xTaskCreateStatic>
  9049. 8003e6c: 9005 str r0, [sp, #20]
  9050. 8003e6e: e7e9 b.n 8003e44 <osThreadNew+0x6c>
  9051. if (xTaskCreate ((TaskFunction_t)func, name, (uint16_t)stack, argument, prio, &hTask) != pdPASS) {
  9052. 8003e70: aa05 add r2, sp, #20
  9053. 8003e72: 9201 str r2, [sp, #4]
  9054. 8003e74: 9300 str r3, [sp, #0]
  9055. 8003e76: 460b mov r3, r1
  9056. 8003e78: fa1f f28c uxth.w r2, ip
  9057. 8003e7c: 4629 mov r1, r5
  9058. 8003e7e: f001 fd96 bl 80059ae <xTaskCreate>
  9059. 8003e82: 2801 cmp r0, #1
  9060. 8003e84: d0de beq.n 8003e44 <osThreadNew+0x6c>
  9061. hTask = NULL;
  9062. 8003e86: 2300 movs r3, #0
  9063. 8003e88: 9305 str r3, [sp, #20]
  9064. 8003e8a: e7db b.n 8003e44 <osThreadNew+0x6c>
  9065. return (NULL);
  9066. 8003e8c: 2000 movs r0, #0
  9067. 8003e8e: e7da b.n 8003e46 <osThreadNew+0x6e>
  9068. 8003e90: 2000 movs r0, #0
  9069. 8003e92: e7d8 b.n 8003e46 <osThreadNew+0x6e>
  9070. 08003e94 <osThreadGetId>:
  9071. }
  9072. return (name);
  9073. }
  9074. osThreadId_t osThreadGetId (void) {
  9075. 8003e94: b508 push {r3, lr}
  9076. osThreadId_t id;
  9077. id = (osThreadId_t)xTaskGetCurrentTaskHandle();
  9078. 8003e96: f002 f885 bl 8005fa4 <xTaskGetCurrentTaskHandle>
  9079. return (id);
  9080. }
  9081. 8003e9a: bd08 pop {r3, pc}
  9082. 08003e9c <osDelay>:
  9083. /* Return flags before clearing */
  9084. return (rflags);
  9085. }
  9086. #endif /* (configUSE_OS2_THREAD_FLAGS == 1) */
  9087. osStatus_t osDelay (uint32_t ticks) {
  9088. 8003e9c: b508 push {r3, lr}
  9089. 8003e9e: f3ef 8305 mrs r3, IPSR
  9090. osStatus_t stat;
  9091. if (IS_IRQ()) {
  9092. 8003ea2: b933 cbnz r3, 8003eb2 <osDelay+0x16>
  9093. stat = osErrorISR;
  9094. }
  9095. else {
  9096. stat = osOK;
  9097. if (ticks != 0U) {
  9098. 8003ea4: b908 cbnz r0, 8003eaa <osDelay+0xe>
  9099. stat = osOK;
  9100. 8003ea6: 2000 movs r0, #0
  9101. vTaskDelay(ticks);
  9102. }
  9103. }
  9104. return (stat);
  9105. }
  9106. 8003ea8: bd08 pop {r3, pc}
  9107. vTaskDelay(ticks);
  9108. 8003eaa: f001 ff27 bl 8005cfc <vTaskDelay>
  9109. stat = osOK;
  9110. 8003eae: 2000 movs r0, #0
  9111. 8003eb0: e7fa b.n 8003ea8 <osDelay+0xc>
  9112. stat = osErrorISR;
  9113. 8003eb2: f06f 0005 mvn.w r0, #5
  9114. 8003eb6: e7f7 b.n 8003ea8 <osDelay+0xc>
  9115. 08003eb8 <osMutexNew>:
  9116. }
  9117. /*---------------------------------------------------------------------------*/
  9118. #if (configUSE_OS2_MUTEX == 1)
  9119. osMutexId_t osMutexNew (const osMutexAttr_t *attr) {
  9120. 8003eb8: b570 push {r4, r5, r6, lr}
  9121. 8003eba: f3ef 8305 mrs r3, IPSR
  9122. const char *name;
  9123. #endif
  9124. hMutex = NULL;
  9125. if (!IS_IRQ()) {
  9126. 8003ebe: 2b00 cmp r3, #0
  9127. 8003ec0: d143 bne.n 8003f4a <osMutexNew+0x92>
  9128. 8003ec2: 4604 mov r4, r0
  9129. if (attr != NULL) {
  9130. 8003ec4: b100 cbz r0, 8003ec8 <osMutexNew+0x10>
  9131. type = attr->attr_bits;
  9132. 8003ec6: 6843 ldr r3, [r0, #4]
  9133. } else {
  9134. type = 0U;
  9135. }
  9136. if ((type & osMutexRecursive) == osMutexRecursive) {
  9137. 8003ec8: f013 0601 ands.w r6, r3, #1
  9138. 8003ecc: d000 beq.n 8003ed0 <osMutexNew+0x18>
  9139. rmtx = 1U;
  9140. 8003ece: 2601 movs r6, #1
  9141. } else {
  9142. rmtx = 0U;
  9143. }
  9144. if ((type & osMutexRobust) != osMutexRobust) {
  9145. 8003ed0: f013 0f08 tst.w r3, #8
  9146. 8003ed4: d13c bne.n 8003f50 <osMutexNew+0x98>
  9147. mem = -1;
  9148. if (attr != NULL) {
  9149. 8003ed6: b36c cbz r4, 8003f34 <osMutexNew+0x7c>
  9150. if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) {
  9151. 8003ed8: 68a1 ldr r1, [r4, #8]
  9152. 8003eda: b111 cbz r1, 8003ee2 <osMutexNew+0x2a>
  9153. 8003edc: 68e3 ldr r3, [r4, #12]
  9154. 8003ede: 2b4f cmp r3, #79 @ 0x4f
  9155. 8003ee0: d81d bhi.n 8003f1e <osMutexNew+0x66>
  9156. mem = 1;
  9157. }
  9158. else {
  9159. if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) {
  9160. 8003ee2: b1b9 cbz r1, 8003f14 <osMutexNew+0x5c>
  9161. mem = -1;
  9162. 8003ee4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
  9163. hMutex = xSemaphoreCreateMutexStatic (attr->cb_mem);
  9164. }
  9165. #endif
  9166. }
  9167. else {
  9168. if (mem == 0) {
  9169. 8003ee8: bb6b cbnz r3, 8003f46 <osMutexNew+0x8e>
  9170. #if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
  9171. if (rmtx != 0U) {
  9172. 8003eea: b33e cbz r6, 8003f3c <osMutexNew+0x84>
  9173. #if (configUSE_RECURSIVE_MUTEXES == 1)
  9174. hMutex = xSemaphoreCreateRecursiveMutex ();
  9175. 8003eec: 2004 movs r0, #4
  9176. 8003eee: f001 f808 bl 8004f02 <xQueueCreateMutex>
  9177. 8003ef2: 4605 mov r5, r0
  9178. #endif
  9179. }
  9180. }
  9181. #if (configQUEUE_REGISTRY_SIZE > 0)
  9182. if (hMutex != NULL) {
  9183. 8003ef4: b12d cbz r5, 8003f02 <osMutexNew+0x4a>
  9184. if (attr != NULL) {
  9185. 8003ef6: b104 cbz r4, 8003efa <osMutexNew+0x42>
  9186. name = attr->name;
  9187. 8003ef8: 6824 ldr r4, [r4, #0]
  9188. } else {
  9189. name = NULL;
  9190. }
  9191. vQueueAddToRegistry (hMutex, name);
  9192. 8003efa: 4621 mov r1, r4
  9193. 8003efc: 4628 mov r0, r5
  9194. 8003efe: f001 fb13 bl 8005528 <vQueueAddToRegistry>
  9195. }
  9196. #endif
  9197. if ((hMutex != NULL) && (rmtx != 0U)) {
  9198. 8003f02: 2d00 cmp r5, #0
  9199. 8003f04: bf0c ite eq
  9200. 8003f06: 2600 moveq r6, #0
  9201. 8003f08: f006 0601 andne.w r6, r6, #1
  9202. 8003f0c: b1f6 cbz r6, 8003f4c <osMutexNew+0x94>
  9203. hMutex = (SemaphoreHandle_t)((uint32_t)hMutex | 1U);
  9204. 8003f0e: f045 0501 orr.w r5, r5, #1
  9205. 8003f12: e01b b.n 8003f4c <osMutexNew+0x94>
  9206. if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) {
  9207. 8003f14: 68e3 ldr r3, [r4, #12]
  9208. 8003f16: b17b cbz r3, 8003f38 <osMutexNew+0x80>
  9209. mem = -1;
  9210. 8003f18: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
  9211. 8003f1c: e7e4 b.n 8003ee8 <osMutexNew+0x30>
  9212. if (rmtx != 0U) {
  9213. 8003f1e: b126 cbz r6, 8003f2a <osMutexNew+0x72>
  9214. hMutex = xSemaphoreCreateRecursiveMutexStatic (attr->cb_mem);
  9215. 8003f20: 2004 movs r0, #4
  9216. 8003f22: f000 fff9 bl 8004f18 <xQueueCreateMutexStatic>
  9217. 8003f26: 4605 mov r5, r0
  9218. 8003f28: e7e4 b.n 8003ef4 <osMutexNew+0x3c>
  9219. hMutex = xSemaphoreCreateMutexStatic (attr->cb_mem);
  9220. 8003f2a: 2001 movs r0, #1
  9221. 8003f2c: f000 fff4 bl 8004f18 <xQueueCreateMutexStatic>
  9222. 8003f30: 4605 mov r5, r0
  9223. 8003f32: e7df b.n 8003ef4 <osMutexNew+0x3c>
  9224. mem = 0;
  9225. 8003f34: 2300 movs r3, #0
  9226. 8003f36: e7d7 b.n 8003ee8 <osMutexNew+0x30>
  9227. mem = 0;
  9228. 8003f38: 2300 movs r3, #0
  9229. 8003f3a: e7d5 b.n 8003ee8 <osMutexNew+0x30>
  9230. hMutex = xSemaphoreCreateMutex ();
  9231. 8003f3c: 2001 movs r0, #1
  9232. 8003f3e: f000 ffe0 bl 8004f02 <xQueueCreateMutex>
  9233. 8003f42: 4605 mov r5, r0
  9234. 8003f44: e7d6 b.n 8003ef4 <osMutexNew+0x3c>
  9235. hMutex = NULL;
  9236. 8003f46: 2500 movs r5, #0
  9237. 8003f48: e7db b.n 8003f02 <osMutexNew+0x4a>
  9238. 8003f4a: 2500 movs r5, #0
  9239. }
  9240. }
  9241. }
  9242. return ((osMutexId_t)hMutex);
  9243. }
  9244. 8003f4c: 4628 mov r0, r5
  9245. 8003f4e: bd70 pop {r4, r5, r6, pc}
  9246. hMutex = NULL;
  9247. 8003f50: 2500 movs r5, #0
  9248. return ((osMutexId_t)hMutex);
  9249. 8003f52: e7fb b.n 8003f4c <osMutexNew+0x94>
  9250. 08003f54 <osMutexAcquire>:
  9251. 8003f54: f3ef 8205 mrs r2, IPSR
  9252. rmtx = (uint32_t)mutex_id & 1U;
  9253. stat = osOK;
  9254. if (IS_IRQ()) {
  9255. 8003f58: b9da cbnz r2, 8003f92 <osMutexAcquire+0x3e>
  9256. osStatus_t osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout) {
  9257. 8003f5a: b510 push {r4, lr}
  9258. 8003f5c: 4603 mov r3, r0
  9259. 8003f5e: 460c mov r4, r1
  9260. 8003f60: f020 0001 bic.w r0, r0, #1
  9261. 8003f64: f003 0101 and.w r1, r3, #1
  9262. stat = osErrorISR;
  9263. }
  9264. else if (hMutex == NULL) {
  9265. 8003f68: 2b01 cmp r3, #1
  9266. 8003f6a: d915 bls.n 8003f98 <osMutexAcquire+0x44>
  9267. stat = osErrorParameter;
  9268. }
  9269. else {
  9270. if (rmtx != 0U) {
  9271. 8003f6c: b141 cbz r1, 8003f80 <osMutexAcquire+0x2c>
  9272. #if (configUSE_RECURSIVE_MUTEXES == 1)
  9273. if (xSemaphoreTakeRecursive (hMutex, timeout) != pdPASS) {
  9274. 8003f6e: 4621 mov r1, r4
  9275. 8003f70: f001 fa43 bl 80053fa <xQueueTakeMutexRecursive>
  9276. 8003f74: 2801 cmp r0, #1
  9277. 8003f76: d012 beq.n 8003f9e <osMutexAcquire+0x4a>
  9278. if (timeout != 0U) {
  9279. 8003f78: b19c cbz r4, 8003fa2 <osMutexAcquire+0x4e>
  9280. stat = osErrorTimeout;
  9281. 8003f7a: f06f 0001 mvn.w r0, #1
  9282. 8003f7e: e00f b.n 8003fa0 <osMutexAcquire+0x4c>
  9283. }
  9284. }
  9285. #endif
  9286. }
  9287. else {
  9288. if (xSemaphoreTake (hMutex, timeout) != pdPASS) {
  9289. 8003f80: 4621 mov r1, r4
  9290. 8003f82: f001 f967 bl 8005254 <xQueueSemaphoreTake>
  9291. 8003f86: 2801 cmp r0, #1
  9292. 8003f88: d00e beq.n 8003fa8 <osMutexAcquire+0x54>
  9293. if (timeout != 0U) {
  9294. 8003f8a: b17c cbz r4, 8003fac <osMutexAcquire+0x58>
  9295. stat = osErrorTimeout;
  9296. 8003f8c: f06f 0001 mvn.w r0, #1
  9297. 8003f90: e006 b.n 8003fa0 <osMutexAcquire+0x4c>
  9298. stat = osErrorISR;
  9299. 8003f92: f06f 0005 mvn.w r0, #5
  9300. }
  9301. }
  9302. }
  9303. return (stat);
  9304. }
  9305. 8003f96: 4770 bx lr
  9306. stat = osErrorParameter;
  9307. 8003f98: f06f 0003 mvn.w r0, #3
  9308. 8003f9c: e000 b.n 8003fa0 <osMutexAcquire+0x4c>
  9309. stat = osOK;
  9310. 8003f9e: 2000 movs r0, #0
  9311. }
  9312. 8003fa0: bd10 pop {r4, pc}
  9313. stat = osErrorResource;
  9314. 8003fa2: f06f 0002 mvn.w r0, #2
  9315. 8003fa6: e7fb b.n 8003fa0 <osMutexAcquire+0x4c>
  9316. stat = osOK;
  9317. 8003fa8: 2000 movs r0, #0
  9318. 8003faa: e7f9 b.n 8003fa0 <osMutexAcquire+0x4c>
  9319. stat = osErrorResource;
  9320. 8003fac: f06f 0002 mvn.w r0, #2
  9321. return (stat);
  9322. 8003fb0: e7f6 b.n 8003fa0 <osMutexAcquire+0x4c>
  9323. 08003fb2 <osMutexRelease>:
  9324. 8003fb2: f3ef 8205 mrs r2, IPSR
  9325. rmtx = (uint32_t)mutex_id & 1U;
  9326. stat = osOK;
  9327. if (IS_IRQ()) {
  9328. 8003fb6: b9ba cbnz r2, 8003fe8 <osMutexRelease+0x36>
  9329. osStatus_t osMutexRelease (osMutexId_t mutex_id) {
  9330. 8003fb8: b508 push {r3, lr}
  9331. 8003fba: 4603 mov r3, r0
  9332. 8003fbc: f020 0001 bic.w r0, r0, #1
  9333. 8003fc0: f003 0101 and.w r1, r3, #1
  9334. stat = osErrorISR;
  9335. }
  9336. else if (hMutex == NULL) {
  9337. 8003fc4: 2b01 cmp r3, #1
  9338. 8003fc6: d912 bls.n 8003fee <osMutexRelease+0x3c>
  9339. stat = osErrorParameter;
  9340. }
  9341. else {
  9342. if (rmtx != 0U) {
  9343. 8003fc8: b129 cbz r1, 8003fd6 <osMutexRelease+0x24>
  9344. #if (configUSE_RECURSIVE_MUTEXES == 1)
  9345. if (xSemaphoreGiveRecursive (hMutex) != pdPASS) {
  9346. 8003fca: f000 ffb4 bl 8004f36 <xQueueGiveMutexRecursive>
  9347. 8003fce: 2801 cmp r0, #1
  9348. 8003fd0: d110 bne.n 8003ff4 <osMutexRelease+0x42>
  9349. stat = osOK;
  9350. 8003fd2: 2000 movs r0, #0
  9351. }
  9352. }
  9353. }
  9354. return (stat);
  9355. }
  9356. 8003fd4: bd08 pop {r3, pc}
  9357. if (xSemaphoreGive (hMutex) != pdPASS) {
  9358. 8003fd6: 2300 movs r3, #0
  9359. 8003fd8: 461a mov r2, r3
  9360. 8003fda: 4619 mov r1, r3
  9361. 8003fdc: f000 fec1 bl 8004d62 <xQueueGenericSend>
  9362. 8003fe0: 2801 cmp r0, #1
  9363. 8003fe2: d10a bne.n 8003ffa <osMutexRelease+0x48>
  9364. stat = osOK;
  9365. 8003fe4: 2000 movs r0, #0
  9366. 8003fe6: e7f5 b.n 8003fd4 <osMutexRelease+0x22>
  9367. stat = osErrorISR;
  9368. 8003fe8: f06f 0005 mvn.w r0, #5
  9369. }
  9370. 8003fec: 4770 bx lr
  9371. stat = osErrorParameter;
  9372. 8003fee: f06f 0003 mvn.w r0, #3
  9373. 8003ff2: e7ef b.n 8003fd4 <osMutexRelease+0x22>
  9374. stat = osErrorResource;
  9375. 8003ff4: f06f 0002 mvn.w r0, #2
  9376. 8003ff8: e7ec b.n 8003fd4 <osMutexRelease+0x22>
  9377. stat = osErrorResource;
  9378. 8003ffa: f06f 0002 mvn.w r0, #2
  9379. return (stat);
  9380. 8003ffe: e7e9 b.n 8003fd4 <osMutexRelease+0x22>
  9381. 08004000 <osSemaphoreNew>:
  9382. }
  9383. #endif /* (configUSE_OS2_MUTEX == 1) */
  9384. /*---------------------------------------------------------------------------*/
  9385. osSemaphoreId_t osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) {
  9386. 8004000: b570 push {r4, r5, r6, lr}
  9387. 8004002: b082 sub sp, #8
  9388. 8004004: f3ef 8305 mrs r3, IPSR
  9389. const char *name;
  9390. #endif
  9391. hSemaphore = NULL;
  9392. if (!IS_IRQ() && (max_count > 0U) && (initial_count <= max_count)) {
  9393. 8004008: 2b00 cmp r3, #0
  9394. 800400a: d14d bne.n 80040a8 <osSemaphoreNew+0xa8>
  9395. 800400c: 460e mov r6, r1
  9396. 800400e: 4614 mov r4, r2
  9397. 8004010: 4288 cmp r0, r1
  9398. 8004012: bf34 ite cc
  9399. 8004014: 2300 movcc r3, #0
  9400. 8004016: 2301 movcs r3, #1
  9401. 8004018: 2800 cmp r0, #0
  9402. 800401a: d049 beq.n 80040b0 <osSemaphoreNew+0xb0>
  9403. 800401c: 2b00 cmp r3, #0
  9404. 800401e: d047 beq.n 80040b0 <osSemaphoreNew+0xb0>
  9405. mem = -1;
  9406. if (attr != NULL) {
  9407. 8004020: b14a cbz r2, 8004036 <osSemaphoreNew+0x36>
  9408. if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) {
  9409. 8004022: 6895 ldr r5, [r2, #8]
  9410. 8004024: b115 cbz r5, 800402c <osSemaphoreNew+0x2c>
  9411. 8004026: 68d3 ldr r3, [r2, #12]
  9412. 8004028: 2b4f cmp r3, #79 @ 0x4f
  9413. 800402a: d814 bhi.n 8004056 <osSemaphoreNew+0x56>
  9414. mem = 1;
  9415. }
  9416. else {
  9417. if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) {
  9418. 800402c: 2d00 cmp r5, #0
  9419. 800402e: d141 bne.n 80040b4 <osSemaphoreNew+0xb4>
  9420. 8004030: 68e3 ldr r3, [r4, #12]
  9421. 8004032: b10b cbz r3, 8004038 <osSemaphoreNew+0x38>
  9422. 8004034: e039 b.n 80040aa <osSemaphoreNew+0xaa>
  9423. mem = 0;
  9424. }
  9425. }
  9426. }
  9427. else {
  9428. mem = 0;
  9429. 8004036: 2300 movs r3, #0
  9430. }
  9431. if (mem != -1) {
  9432. if (max_count == 1U) {
  9433. 8004038: 2801 cmp r0, #1
  9434. 800403a: d00e beq.n 800405a <osSemaphoreNew+0x5a>
  9435. hSemaphore = NULL;
  9436. }
  9437. }
  9438. }
  9439. else {
  9440. if (mem == 1) {
  9441. 800403c: bb73 cbnz r3, 800409c <osSemaphoreNew+0x9c>
  9442. hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem);
  9443. #endif
  9444. }
  9445. else {
  9446. #if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
  9447. hSemaphore = xSemaphoreCreateCounting (max_count, initial_count);
  9448. 800403e: 4631 mov r1, r6
  9449. 8004040: f000 fe71 bl 8004d26 <xQueueCreateCountingSemaphore>
  9450. 8004044: 4605 mov r5, r0
  9451. #endif
  9452. }
  9453. }
  9454. #if (configQUEUE_REGISTRY_SIZE > 0)
  9455. if (hSemaphore != NULL) {
  9456. 8004046: b385 cbz r5, 80040aa <osSemaphoreNew+0xaa>
  9457. if (attr != NULL) {
  9458. 8004048: b104 cbz r4, 800404c <osSemaphoreNew+0x4c>
  9459. name = attr->name;
  9460. 800404a: 6824 ldr r4, [r4, #0]
  9461. } else {
  9462. name = NULL;
  9463. }
  9464. vQueueAddToRegistry (hSemaphore, name);
  9465. 800404c: 4621 mov r1, r4
  9466. 800404e: 4628 mov r0, r5
  9467. 8004050: f001 fa6a bl 8005528 <vQueueAddToRegistry>
  9468. 8004054: e029 b.n 80040aa <osSemaphoreNew+0xaa>
  9469. mem = 1;
  9470. 8004056: 2301 movs r3, #1
  9471. 8004058: e7ee b.n 8004038 <osSemaphoreNew+0x38>
  9472. if (mem == 1) {
  9473. 800405a: b9b3 cbnz r3, 800408a <osSemaphoreNew+0x8a>
  9474. hSemaphore = xSemaphoreCreateBinary();
  9475. 800405c: 2203 movs r2, #3
  9476. 800405e: 2100 movs r1, #0
  9477. 8004060: 2001 movs r0, #1
  9478. 8004062: f000 fe19 bl 8004c98 <xQueueGenericCreate>
  9479. 8004066: 4605 mov r5, r0
  9480. if ((hSemaphore != NULL) && (initial_count != 0U)) {
  9481. 8004068: 2d00 cmp r5, #0
  9482. 800406a: bf18 it ne
  9483. 800406c: 2e00 cmpne r6, #0
  9484. 800406e: d0ea beq.n 8004046 <osSemaphoreNew+0x46>
  9485. if (xSemaphoreGive (hSemaphore) != pdPASS) {
  9486. 8004070: 2300 movs r3, #0
  9487. 8004072: 461a mov r2, r3
  9488. 8004074: 4619 mov r1, r3
  9489. 8004076: 4628 mov r0, r5
  9490. 8004078: f000 fe73 bl 8004d62 <xQueueGenericSend>
  9491. 800407c: 2801 cmp r0, #1
  9492. 800407e: d0e2 beq.n 8004046 <osSemaphoreNew+0x46>
  9493. vSemaphoreDelete (hSemaphore);
  9494. 8004080: 4628 mov r0, r5
  9495. 8004082: f001 fa7b bl 800557c <vQueueDelete>
  9496. hSemaphore = NULL;
  9497. 8004086: 2500 movs r5, #0
  9498. 8004088: e00f b.n 80040aa <osSemaphoreNew+0xaa>
  9499. hSemaphore = xSemaphoreCreateBinaryStatic ((StaticSemaphore_t *)attr->cb_mem);
  9500. 800408a: 68a3 ldr r3, [r4, #8]
  9501. 800408c: 2203 movs r2, #3
  9502. 800408e: 9200 str r2, [sp, #0]
  9503. 8004090: 2200 movs r2, #0
  9504. 8004092: 4611 mov r1, r2
  9505. 8004094: f000 fdad bl 8004bf2 <xQueueGenericCreateStatic>
  9506. 8004098: 4605 mov r5, r0
  9507. 800409a: e7e5 b.n 8004068 <osSemaphoreNew+0x68>
  9508. hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem);
  9509. 800409c: 68a2 ldr r2, [r4, #8]
  9510. 800409e: 4631 mov r1, r6
  9511. 80040a0: f000 fe1e bl 8004ce0 <xQueueCreateCountingSemaphoreStatic>
  9512. 80040a4: 4605 mov r5, r0
  9513. 80040a6: e7ce b.n 8004046 <osSemaphoreNew+0x46>
  9514. hSemaphore = NULL;
  9515. 80040a8: 2500 movs r5, #0
  9516. #endif
  9517. }
  9518. }
  9519. return ((osSemaphoreId_t)hSemaphore);
  9520. }
  9521. 80040aa: 4628 mov r0, r5
  9522. 80040ac: b002 add sp, #8
  9523. 80040ae: bd70 pop {r4, r5, r6, pc}
  9524. hSemaphore = NULL;
  9525. 80040b0: 2500 movs r5, #0
  9526. 80040b2: e7fa b.n 80040aa <osSemaphoreNew+0xaa>
  9527. 80040b4: 2500 movs r5, #0
  9528. return ((osSemaphoreId_t)hSemaphore);
  9529. 80040b6: e7f8 b.n 80040aa <osSemaphoreNew+0xaa>
  9530. 080040b8 <osSemaphoreAcquire>:
  9531. osStatus_t stat;
  9532. BaseType_t yield;
  9533. stat = osOK;
  9534. if (hSemaphore == NULL) {
  9535. 80040b8: b320 cbz r0, 8004104 <osSemaphoreAcquire+0x4c>
  9536. osStatus_t osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout) {
  9537. 80040ba: b510 push {r4, lr}
  9538. 80040bc: b082 sub sp, #8
  9539. 80040be: 460c mov r4, r1
  9540. 80040c0: f3ef 8305 mrs r3, IPSR
  9541. stat = osErrorParameter;
  9542. }
  9543. else if (IS_IRQ()) {
  9544. 80040c4: b1b3 cbz r3, 80040f4 <osSemaphoreAcquire+0x3c>
  9545. if (timeout != 0U) {
  9546. 80040c6: bb01 cbnz r1, 800410a <osSemaphoreAcquire+0x52>
  9547. stat = osErrorParameter;
  9548. }
  9549. else {
  9550. yield = pdFALSE;
  9551. 80040c8: 2100 movs r1, #0
  9552. 80040ca: 9101 str r1, [sp, #4]
  9553. if (xSemaphoreTakeFromISR (hSemaphore, &yield) != pdPASS) {
  9554. 80040cc: aa01 add r2, sp, #4
  9555. 80040ce: f001 f9b4 bl 800543a <xQueueReceiveFromISR>
  9556. 80040d2: 2801 cmp r0, #1
  9557. 80040d4: d11c bne.n 8004110 <osSemaphoreAcquire+0x58>
  9558. stat = osErrorResource;
  9559. } else {
  9560. portYIELD_FROM_ISR (yield);
  9561. 80040d6: 9801 ldr r0, [sp, #4]
  9562. 80040d8: b150 cbz r0, 80040f0 <osSemaphoreAcquire+0x38>
  9563. 80040da: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  9564. 80040de: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  9565. 80040e2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  9566. 80040e6: f3bf 8f4f dsb sy
  9567. 80040ea: f3bf 8f6f isb sy
  9568. stat = osOK;
  9569. 80040ee: 2000 movs r0, #0
  9570. }
  9571. }
  9572. }
  9573. return (stat);
  9574. }
  9575. 80040f0: b002 add sp, #8
  9576. 80040f2: bd10 pop {r4, pc}
  9577. if (xSemaphoreTake (hSemaphore, (TickType_t)timeout) != pdPASS) {
  9578. 80040f4: f001 f8ae bl 8005254 <xQueueSemaphoreTake>
  9579. 80040f8: 2801 cmp r0, #1
  9580. 80040fa: d00c beq.n 8004116 <osSemaphoreAcquire+0x5e>
  9581. if (timeout != 0U) {
  9582. 80040fc: b16c cbz r4, 800411a <osSemaphoreAcquire+0x62>
  9583. stat = osErrorTimeout;
  9584. 80040fe: f06f 0001 mvn.w r0, #1
  9585. 8004102: e7f5 b.n 80040f0 <osSemaphoreAcquire+0x38>
  9586. stat = osErrorParameter;
  9587. 8004104: f06f 0003 mvn.w r0, #3
  9588. }
  9589. 8004108: 4770 bx lr
  9590. stat = osErrorParameter;
  9591. 800410a: f06f 0003 mvn.w r0, #3
  9592. 800410e: e7ef b.n 80040f0 <osSemaphoreAcquire+0x38>
  9593. stat = osErrorResource;
  9594. 8004110: f06f 0002 mvn.w r0, #2
  9595. 8004114: e7ec b.n 80040f0 <osSemaphoreAcquire+0x38>
  9596. stat = osOK;
  9597. 8004116: 2000 movs r0, #0
  9598. 8004118: e7ea b.n 80040f0 <osSemaphoreAcquire+0x38>
  9599. stat = osErrorResource;
  9600. 800411a: f06f 0002 mvn.w r0, #2
  9601. return (stat);
  9602. 800411e: e7e7 b.n 80040f0 <osSemaphoreAcquire+0x38>
  9603. 08004120 <osSemaphoreRelease>:
  9604. osStatus_t stat;
  9605. BaseType_t yield;
  9606. stat = osOK;
  9607. if (hSemaphore == NULL) {
  9608. 8004120: b320 cbz r0, 800416c <osSemaphoreRelease+0x4c>
  9609. osStatus_t osSemaphoreRelease (osSemaphoreId_t semaphore_id) {
  9610. 8004122: b500 push {lr}
  9611. 8004124: b083 sub sp, #12
  9612. 8004126: f3ef 8305 mrs r3, IPSR
  9613. stat = osErrorParameter;
  9614. }
  9615. else if (IS_IRQ()) {
  9616. 800412a: b1a3 cbz r3, 8004156 <osSemaphoreRelease+0x36>
  9617. yield = pdFALSE;
  9618. 800412c: 2300 movs r3, #0
  9619. 800412e: 9301 str r3, [sp, #4]
  9620. if (xSemaphoreGiveFromISR (hSemaphore, &yield) != pdTRUE) {
  9621. 8004130: a901 add r1, sp, #4
  9622. 8004132: f000 ff87 bl 8005044 <xQueueGiveFromISR>
  9623. 8004136: 2801 cmp r0, #1
  9624. 8004138: d11b bne.n 8004172 <osSemaphoreRelease+0x52>
  9625. stat = osErrorResource;
  9626. } else {
  9627. portYIELD_FROM_ISR (yield);
  9628. 800413a: 9801 ldr r0, [sp, #4]
  9629. 800413c: b198 cbz r0, 8004166 <osSemaphoreRelease+0x46>
  9630. 800413e: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  9631. 8004142: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  9632. 8004146: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  9633. 800414a: f3bf 8f4f dsb sy
  9634. 800414e: f3bf 8f6f isb sy
  9635. stat = osOK;
  9636. 8004152: 2000 movs r0, #0
  9637. 8004154: e007 b.n 8004166 <osSemaphoreRelease+0x46>
  9638. }
  9639. }
  9640. else {
  9641. if (xSemaphoreGive (hSemaphore) != pdPASS) {
  9642. 8004156: 2300 movs r3, #0
  9643. 8004158: 461a mov r2, r3
  9644. 800415a: 4619 mov r1, r3
  9645. 800415c: f000 fe01 bl 8004d62 <xQueueGenericSend>
  9646. 8004160: 2801 cmp r0, #1
  9647. 8004162: d109 bne.n 8004178 <osSemaphoreRelease+0x58>
  9648. stat = osOK;
  9649. 8004164: 2000 movs r0, #0
  9650. stat = osErrorResource;
  9651. }
  9652. }
  9653. return (stat);
  9654. }
  9655. 8004166: b003 add sp, #12
  9656. 8004168: f85d fb04 ldr.w pc, [sp], #4
  9657. stat = osErrorParameter;
  9658. 800416c: f06f 0003 mvn.w r0, #3
  9659. }
  9660. 8004170: 4770 bx lr
  9661. stat = osErrorResource;
  9662. 8004172: f06f 0002 mvn.w r0, #2
  9663. 8004176: e7f6 b.n 8004166 <osSemaphoreRelease+0x46>
  9664. stat = osErrorResource;
  9665. 8004178: f06f 0002 mvn.w r0, #2
  9666. return (stat);
  9667. 800417c: e7f3 b.n 8004166 <osSemaphoreRelease+0x46>
  9668. 0800417e <osSemaphoreDelete>:
  9669. 800417e: f3ef 8305 mrs r3, IPSR
  9670. osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id) {
  9671. SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id;
  9672. osStatus_t stat;
  9673. #ifndef USE_FreeRTOS_HEAP_1
  9674. if (IS_IRQ()) {
  9675. 8004182: b94b cbnz r3, 8004198 <osSemaphoreDelete+0x1a>
  9676. osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id) {
  9677. 8004184: b510 push {r4, lr}
  9678. 8004186: 4604 mov r4, r0
  9679. stat = osErrorISR;
  9680. }
  9681. else if (hSemaphore == NULL) {
  9682. 8004188: b148 cbz r0, 800419e <osSemaphoreDelete+0x20>
  9683. stat = osErrorParameter;
  9684. }
  9685. else {
  9686. #if (configQUEUE_REGISTRY_SIZE > 0)
  9687. vQueueUnregisterQueue (hSemaphore);
  9688. 800418a: f001 f9e1 bl 8005550 <vQueueUnregisterQueue>
  9689. #endif
  9690. stat = osOK;
  9691. vSemaphoreDelete (hSemaphore);
  9692. 800418e: 4620 mov r0, r4
  9693. 8004190: f001 f9f4 bl 800557c <vQueueDelete>
  9694. stat = osOK;
  9695. 8004194: 2000 movs r0, #0
  9696. #else
  9697. stat = osError;
  9698. #endif
  9699. return (stat);
  9700. }
  9701. 8004196: bd10 pop {r4, pc}
  9702. stat = osErrorISR;
  9703. 8004198: f06f 0005 mvn.w r0, #5
  9704. }
  9705. 800419c: 4770 bx lr
  9706. stat = osErrorParameter;
  9707. 800419e: f06f 0003 mvn.w r0, #3
  9708. return (stat);
  9709. 80041a2: e7f8 b.n 8004196 <osSemaphoreDelete+0x18>
  9710. 080041a4 <osMessageQueueNew>:
  9711. /*---------------------------------------------------------------------------*/
  9712. osMessageQueueId_t osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) {
  9713. 80041a4: b570 push {r4, r5, r6, lr}
  9714. 80041a6: b082 sub sp, #8
  9715. 80041a8: f3ef 8305 mrs r3, IPSR
  9716. const char *name;
  9717. #endif
  9718. hQueue = NULL;
  9719. if (!IS_IRQ() && (msg_count > 0U) && (msg_size > 0U)) {
  9720. 80041ac: 2b00 cmp r3, #0
  9721. 80041ae: d13d bne.n 800422c <osMessageQueueNew+0x88>
  9722. 80041b0: 4614 mov r4, r2
  9723. 80041b2: 1e0b subs r3, r1, #0
  9724. 80041b4: bf18 it ne
  9725. 80041b6: 2301 movne r3, #1
  9726. 80041b8: 2800 cmp r0, #0
  9727. 80041ba: d03b beq.n 8004234 <osMessageQueueNew+0x90>
  9728. 80041bc: 2b00 cmp r3, #0
  9729. 80041be: d039 beq.n 8004234 <osMessageQueueNew+0x90>
  9730. mem = -1;
  9731. if (attr != NULL) {
  9732. 80041c0: b36a cbz r2, 800421e <osMessageQueueNew+0x7a>
  9733. if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) &&
  9734. 80041c2: 6893 ldr r3, [r2, #8]
  9735. 80041c4: b14b cbz r3, 80041da <osMessageQueueNew+0x36>
  9736. 80041c6: 68d2 ldr r2, [r2, #12]
  9737. 80041c8: 2a4f cmp r2, #79 @ 0x4f
  9738. 80041ca: d906 bls.n 80041da <osMessageQueueNew+0x36>
  9739. (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) {
  9740. 80041cc: 6922 ldr r2, [r4, #16]
  9741. if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) &&
  9742. 80041ce: b122 cbz r2, 80041da <osMessageQueueNew+0x36>
  9743. (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) {
  9744. 80041d0: fb01 f500 mul.w r5, r1, r0
  9745. 80041d4: 6966 ldr r6, [r4, #20]
  9746. 80041d6: 42ae cmp r6, r5
  9747. 80041d8: d21b bcs.n 8004212 <osMessageQueueNew+0x6e>
  9748. mem = 1;
  9749. }
  9750. else {
  9751. if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) &&
  9752. 80041da: b173 cbz r3, 80041fa <osMessageQueueNew+0x56>
  9753. mem = -1;
  9754. 80041dc: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
  9755. #if (configSUPPORT_STATIC_ALLOCATION == 1)
  9756. hQueue = xQueueCreateStatic (msg_count, msg_size, attr->mq_mem, attr->cb_mem);
  9757. #endif
  9758. }
  9759. else {
  9760. if (mem == 0) {
  9761. 80041e0: bb53 cbnz r3, 8004238 <osMessageQueueNew+0x94>
  9762. #if (configSUPPORT_DYNAMIC_ALLOCATION == 1)
  9763. hQueue = xQueueCreate (msg_count, msg_size);
  9764. 80041e2: 2200 movs r2, #0
  9765. 80041e4: f000 fd58 bl 8004c98 <xQueueGenericCreate>
  9766. 80041e8: 4605 mov r5, r0
  9767. #endif
  9768. }
  9769. }
  9770. #if (configQUEUE_REGISTRY_SIZE > 0)
  9771. if (hQueue != NULL) {
  9772. 80041ea: b305 cbz r5, 800422e <osMessageQueueNew+0x8a>
  9773. if (attr != NULL) {
  9774. 80041ec: b104 cbz r4, 80041f0 <osMessageQueueNew+0x4c>
  9775. name = attr->name;
  9776. 80041ee: 6824 ldr r4, [r4, #0]
  9777. } else {
  9778. name = NULL;
  9779. }
  9780. vQueueAddToRegistry (hQueue, name);
  9781. 80041f0: 4621 mov r1, r4
  9782. 80041f2: 4628 mov r0, r5
  9783. 80041f4: f001 f998 bl 8005528 <vQueueAddToRegistry>
  9784. 80041f8: e019 b.n 800422e <osMessageQueueNew+0x8a>
  9785. if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) &&
  9786. 80041fa: 68e3 ldr r3, [r4, #12]
  9787. 80041fc: b98b cbnz r3, 8004222 <osMessageQueueNew+0x7e>
  9788. (attr->mq_mem == NULL) && (attr->mq_size == 0U)) {
  9789. 80041fe: 6923 ldr r3, [r4, #16]
  9790. if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) &&
  9791. 8004200: b113 cbz r3, 8004208 <osMessageQueueNew+0x64>
  9792. mem = -1;
  9793. 8004202: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
  9794. 8004206: e7eb b.n 80041e0 <osMessageQueueNew+0x3c>
  9795. (attr->mq_mem == NULL) && (attr->mq_size == 0U)) {
  9796. 8004208: 6963 ldr r3, [r4, #20]
  9797. 800420a: b16b cbz r3, 8004228 <osMessageQueueNew+0x84>
  9798. mem = -1;
  9799. 800420c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
  9800. 8004210: e7e6 b.n 80041e0 <osMessageQueueNew+0x3c>
  9801. hQueue = xQueueCreateStatic (msg_count, msg_size, attr->mq_mem, attr->cb_mem);
  9802. 8004212: 2500 movs r5, #0
  9803. 8004214: 9500 str r5, [sp, #0]
  9804. 8004216: f000 fcec bl 8004bf2 <xQueueGenericCreateStatic>
  9805. 800421a: 4605 mov r5, r0
  9806. 800421c: e7e5 b.n 80041ea <osMessageQueueNew+0x46>
  9807. mem = 0;
  9808. 800421e: 2300 movs r3, #0
  9809. 8004220: e7de b.n 80041e0 <osMessageQueueNew+0x3c>
  9810. mem = -1;
  9811. 8004222: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
  9812. 8004226: e7db b.n 80041e0 <osMessageQueueNew+0x3c>
  9813. mem = 0;
  9814. 8004228: 2300 movs r3, #0
  9815. 800422a: e7d9 b.n 80041e0 <osMessageQueueNew+0x3c>
  9816. hQueue = NULL;
  9817. 800422c: 2500 movs r5, #0
  9818. #endif
  9819. }
  9820. return ((osMessageQueueId_t)hQueue);
  9821. }
  9822. 800422e: 4628 mov r0, r5
  9823. 8004230: b002 add sp, #8
  9824. 8004232: bd70 pop {r4, r5, r6, pc}
  9825. hQueue = NULL;
  9826. 8004234: 2500 movs r5, #0
  9827. 8004236: e7fa b.n 800422e <osMessageQueueNew+0x8a>
  9828. 8004238: 2500 movs r5, #0
  9829. return ((osMessageQueueId_t)hQueue);
  9830. 800423a: e7f8 b.n 800422e <osMessageQueueNew+0x8a>
  9831. 0800423c <osMessageQueuePut>:
  9832. osStatus_t osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout) {
  9833. 800423c: b510 push {r4, lr}
  9834. 800423e: b082 sub sp, #8
  9835. 8004240: 461c mov r4, r3
  9836. 8004242: f3ef 8305 mrs r3, IPSR
  9837. (void)msg_prio; /* Message priority is ignored */
  9838. stat = osOK;
  9839. if (IS_IRQ()) {
  9840. 8004246: b1d3 cbz r3, 800427e <osMessageQueuePut+0x42>
  9841. if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) {
  9842. 8004248: 2900 cmp r1, #0
  9843. 800424a: bf18 it ne
  9844. 800424c: 2800 cmpne r0, #0
  9845. 800424e: d024 beq.n 800429a <osMessageQueuePut+0x5e>
  9846. 8004250: bb34 cbnz r4, 80042a0 <osMessageQueuePut+0x64>
  9847. stat = osErrorParameter;
  9848. }
  9849. else {
  9850. yield = pdFALSE;
  9851. 8004252: 2300 movs r3, #0
  9852. 8004254: 9301 str r3, [sp, #4]
  9853. if (xQueueSendToBackFromISR (hQueue, msg_ptr, &yield) != pdTRUE) {
  9854. 8004256: aa01 add r2, sp, #4
  9855. 8004258: f000 fe8d bl 8004f76 <xQueueGenericSendFromISR>
  9856. 800425c: 2801 cmp r0, #1
  9857. 800425e: d122 bne.n 80042a6 <osMessageQueuePut+0x6a>
  9858. stat = osErrorResource;
  9859. } else {
  9860. portYIELD_FROM_ISR (yield);
  9861. 8004260: 9801 ldr r0, [sp, #4]
  9862. 8004262: b150 cbz r0, 800427a <osMessageQueuePut+0x3e>
  9863. 8004264: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  9864. 8004268: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  9865. 800426c: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  9866. 8004270: f3bf 8f4f dsb sy
  9867. 8004274: f3bf 8f6f isb sy
  9868. stat = osOK;
  9869. 8004278: 2000 movs r0, #0
  9870. }
  9871. }
  9872. }
  9873. return (stat);
  9874. }
  9875. 800427a: b002 add sp, #8
  9876. 800427c: bd10 pop {r4, pc}
  9877. if ((hQueue == NULL) || (msg_ptr == NULL)) {
  9878. 800427e: 2900 cmp r1, #0
  9879. 8004280: bf18 it ne
  9880. 8004282: 2800 cmpne r0, #0
  9881. 8004284: d012 beq.n 80042ac <osMessageQueuePut+0x70>
  9882. if (xQueueSendToBack (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) {
  9883. 8004286: 2300 movs r3, #0
  9884. 8004288: 4622 mov r2, r4
  9885. 800428a: f000 fd6a bl 8004d62 <xQueueGenericSend>
  9886. 800428e: 2801 cmp r0, #1
  9887. 8004290: d00f beq.n 80042b2 <osMessageQueuePut+0x76>
  9888. if (timeout != 0U) {
  9889. 8004292: b184 cbz r4, 80042b6 <osMessageQueuePut+0x7a>
  9890. stat = osErrorTimeout;
  9891. 8004294: f06f 0001 mvn.w r0, #1
  9892. 8004298: e7ef b.n 800427a <osMessageQueuePut+0x3e>
  9893. stat = osErrorParameter;
  9894. 800429a: f06f 0003 mvn.w r0, #3
  9895. 800429e: e7ec b.n 800427a <osMessageQueuePut+0x3e>
  9896. 80042a0: f06f 0003 mvn.w r0, #3
  9897. 80042a4: e7e9 b.n 800427a <osMessageQueuePut+0x3e>
  9898. stat = osErrorResource;
  9899. 80042a6: f06f 0002 mvn.w r0, #2
  9900. 80042aa: e7e6 b.n 800427a <osMessageQueuePut+0x3e>
  9901. stat = osErrorParameter;
  9902. 80042ac: f06f 0003 mvn.w r0, #3
  9903. 80042b0: e7e3 b.n 800427a <osMessageQueuePut+0x3e>
  9904. stat = osOK;
  9905. 80042b2: 2000 movs r0, #0
  9906. 80042b4: e7e1 b.n 800427a <osMessageQueuePut+0x3e>
  9907. stat = osErrorResource;
  9908. 80042b6: f06f 0002 mvn.w r0, #2
  9909. return (stat);
  9910. 80042ba: e7de b.n 800427a <osMessageQueuePut+0x3e>
  9911. 080042bc <osMessageQueueGet>:
  9912. osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout) {
  9913. 80042bc: b510 push {r4, lr}
  9914. 80042be: b082 sub sp, #8
  9915. 80042c0: 461c mov r4, r3
  9916. 80042c2: f3ef 8305 mrs r3, IPSR
  9917. (void)msg_prio; /* Message priority is ignored */
  9918. stat = osOK;
  9919. if (IS_IRQ()) {
  9920. 80042c6: b1d3 cbz r3, 80042fe <osMessageQueueGet+0x42>
  9921. if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) {
  9922. 80042c8: 2900 cmp r1, #0
  9923. 80042ca: bf18 it ne
  9924. 80042cc: 2800 cmpne r0, #0
  9925. 80042ce: d023 beq.n 8004318 <osMessageQueueGet+0x5c>
  9926. 80042d0: bb2c cbnz r4, 800431e <osMessageQueueGet+0x62>
  9927. stat = osErrorParameter;
  9928. }
  9929. else {
  9930. yield = pdFALSE;
  9931. 80042d2: 2300 movs r3, #0
  9932. 80042d4: 9301 str r3, [sp, #4]
  9933. if (xQueueReceiveFromISR (hQueue, msg_ptr, &yield) != pdPASS) {
  9934. 80042d6: aa01 add r2, sp, #4
  9935. 80042d8: f001 f8af bl 800543a <xQueueReceiveFromISR>
  9936. 80042dc: 2801 cmp r0, #1
  9937. 80042de: d121 bne.n 8004324 <osMessageQueueGet+0x68>
  9938. stat = osErrorResource;
  9939. } else {
  9940. portYIELD_FROM_ISR (yield);
  9941. 80042e0: 9801 ldr r0, [sp, #4]
  9942. 80042e2: b150 cbz r0, 80042fa <osMessageQueueGet+0x3e>
  9943. 80042e4: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  9944. 80042e8: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  9945. 80042ec: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  9946. 80042f0: f3bf 8f4f dsb sy
  9947. 80042f4: f3bf 8f6f isb sy
  9948. stat = osOK;
  9949. 80042f8: 2000 movs r0, #0
  9950. }
  9951. }
  9952. }
  9953. return (stat);
  9954. }
  9955. 80042fa: b002 add sp, #8
  9956. 80042fc: bd10 pop {r4, pc}
  9957. if ((hQueue == NULL) || (msg_ptr == NULL)) {
  9958. 80042fe: 2900 cmp r1, #0
  9959. 8004300: bf18 it ne
  9960. 8004302: 2800 cmpne r0, #0
  9961. 8004304: d011 beq.n 800432a <osMessageQueueGet+0x6e>
  9962. if (xQueueReceive (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) {
  9963. 8004306: 4622 mov r2, r4
  9964. 8004308: f000 fef5 bl 80050f6 <xQueueReceive>
  9965. 800430c: 2801 cmp r0, #1
  9966. 800430e: d00f beq.n 8004330 <osMessageQueueGet+0x74>
  9967. if (timeout != 0U) {
  9968. 8004310: b184 cbz r4, 8004334 <osMessageQueueGet+0x78>
  9969. stat = osErrorTimeout;
  9970. 8004312: f06f 0001 mvn.w r0, #1
  9971. 8004316: e7f0 b.n 80042fa <osMessageQueueGet+0x3e>
  9972. stat = osErrorParameter;
  9973. 8004318: f06f 0003 mvn.w r0, #3
  9974. 800431c: e7ed b.n 80042fa <osMessageQueueGet+0x3e>
  9975. 800431e: f06f 0003 mvn.w r0, #3
  9976. 8004322: e7ea b.n 80042fa <osMessageQueueGet+0x3e>
  9977. stat = osErrorResource;
  9978. 8004324: f06f 0002 mvn.w r0, #2
  9979. 8004328: e7e7 b.n 80042fa <osMessageQueueGet+0x3e>
  9980. stat = osErrorParameter;
  9981. 800432a: f06f 0003 mvn.w r0, #3
  9982. 800432e: e7e4 b.n 80042fa <osMessageQueueGet+0x3e>
  9983. stat = osOK;
  9984. 8004330: 2000 movs r0, #0
  9985. 8004332: e7e2 b.n 80042fa <osMessageQueueGet+0x3e>
  9986. stat = osErrorResource;
  9987. 8004334: f06f 0002 mvn.w r0, #2
  9988. return (stat);
  9989. 8004338: e7df b.n 80042fa <osMessageQueueGet+0x3e>
  9990. 0800433a <osMessageQueueGetCount>:
  9991. uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id) {
  9992. QueueHandle_t hQueue = (QueueHandle_t)mq_id;
  9993. UBaseType_t count;
  9994. if (hQueue == NULL) {
  9995. 800433a: b148 cbz r0, 8004350 <osMessageQueueGetCount+0x16>
  9996. uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id) {
  9997. 800433c: b508 push {r3, lr}
  9998. 800433e: f3ef 8205 mrs r2, IPSR
  9999. count = 0U;
  10000. }
  10001. else if (IS_IRQ()) {
  10002. 8004342: b112 cbz r2, 800434a <osMessageQueueGetCount+0x10>
  10003. count = uxQueueMessagesWaitingFromISR (hQueue);
  10004. 8004344: f001 f8e3 bl 800550e <uxQueueMessagesWaitingFromISR>
  10005. else {
  10006. count = uxQueueMessagesWaiting (hQueue);
  10007. }
  10008. return ((uint32_t)count);
  10009. }
  10010. 8004348: bd08 pop {r3, pc}
  10011. count = uxQueueMessagesWaiting (hQueue);
  10012. 800434a: f001 f8cd bl 80054e8 <uxQueueMessagesWaiting>
  10013. 800434e: e7fb b.n 8004348 <osMessageQueueGetCount+0xe>
  10014. count = 0U;
  10015. 8004350: 2000 movs r0, #0
  10016. }
  10017. 8004352: 4770 bx lr
  10018. 08004354 <osMessageQueueDelete>:
  10019. 8004354: f3ef 8305 mrs r3, IPSR
  10020. osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id) {
  10021. QueueHandle_t hQueue = (QueueHandle_t)mq_id;
  10022. osStatus_t stat;
  10023. #ifndef USE_FreeRTOS_HEAP_1
  10024. if (IS_IRQ()) {
  10025. 8004358: b94b cbnz r3, 800436e <osMessageQueueDelete+0x1a>
  10026. osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id) {
  10027. 800435a: b510 push {r4, lr}
  10028. 800435c: 4604 mov r4, r0
  10029. stat = osErrorISR;
  10030. }
  10031. else if (hQueue == NULL) {
  10032. 800435e: b148 cbz r0, 8004374 <osMessageQueueDelete+0x20>
  10033. stat = osErrorParameter;
  10034. }
  10035. else {
  10036. #if (configQUEUE_REGISTRY_SIZE > 0)
  10037. vQueueUnregisterQueue (hQueue);
  10038. 8004360: f001 f8f6 bl 8005550 <vQueueUnregisterQueue>
  10039. #endif
  10040. stat = osOK;
  10041. vQueueDelete (hQueue);
  10042. 8004364: 4620 mov r0, r4
  10043. 8004366: f001 f909 bl 800557c <vQueueDelete>
  10044. stat = osOK;
  10045. 800436a: 2000 movs r0, #0
  10046. #else
  10047. stat = osError;
  10048. #endif
  10049. return (stat);
  10050. }
  10051. 800436c: bd10 pop {r4, pc}
  10052. stat = osErrorISR;
  10053. 800436e: f06f 0005 mvn.w r0, #5
  10054. }
  10055. 8004372: 4770 bx lr
  10056. stat = osErrorParameter;
  10057. 8004374: f06f 0003 mvn.w r0, #3
  10058. return (stat);
  10059. 8004378: e7f8 b.n 800436c <osMessageQueueDelete+0x18>
  10060. ...
  10061. 0800437c <vApplicationGetIdleTaskMemory>:
  10062. __WEAK void vApplicationGetIdleTaskMemory (StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize) {
  10063. /* Idle task control block and stack */
  10064. static StaticTask_t Idle_TCB;
  10065. static StackType_t Idle_Stack[configMINIMAL_STACK_SIZE];
  10066. *ppxIdleTaskTCBBuffer = &Idle_TCB;
  10067. 800437c: 4b03 ldr r3, [pc, #12] @ (800438c <vApplicationGetIdleTaskMemory+0x10>)
  10068. 800437e: 6003 str r3, [r0, #0]
  10069. *ppxIdleTaskStackBuffer = &Idle_Stack[0];
  10070. 8004380: 4b03 ldr r3, [pc, #12] @ (8004390 <vApplicationGetIdleTaskMemory+0x14>)
  10071. 8004382: 600b str r3, [r1, #0]
  10072. *pulIdleTaskStackSize = (uint32_t)configMINIMAL_STACK_SIZE;
  10073. 8004384: f44f 7300 mov.w r3, #512 @ 0x200
  10074. 8004388: 6013 str r3, [r2, #0]
  10075. }
  10076. 800438a: 4770 bx lr
  10077. 800438c: 240027b4 .word 0x240027b4
  10078. 8004390: 24001fb4 .word 0x24001fb4
  10079. 08004394 <vApplicationGetTimerTaskMemory>:
  10080. __WEAK void vApplicationGetTimerTaskMemory (StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize) {
  10081. /* Timer task control block and stack */
  10082. static StaticTask_t Timer_TCB;
  10083. static StackType_t Timer_Stack[configTIMER_TASK_STACK_DEPTH];
  10084. *ppxTimerTaskTCBBuffer = &Timer_TCB;
  10085. 8004394: 4b03 ldr r3, [pc, #12] @ (80043a4 <vApplicationGetTimerTaskMemory+0x10>)
  10086. 8004396: 6003 str r3, [r0, #0]
  10087. *ppxTimerTaskStackBuffer = &Timer_Stack[0];
  10088. 8004398: 4b03 ldr r3, [pc, #12] @ (80043a8 <vApplicationGetTimerTaskMemory+0x14>)
  10089. 800439a: 600b str r3, [r1, #0]
  10090. *pulTimerTaskStackSize = (uint32_t)configTIMER_TASK_STACK_DEPTH;
  10091. 800439c: f44f 6380 mov.w r3, #1024 @ 0x400
  10092. 80043a0: 6013 str r3, [r2, #0]
  10093. }
  10094. 80043a2: 4770 bx lr
  10095. 80043a4: 24001f0c .word 0x24001f0c
  10096. 80043a8: 24000f0c .word 0x24000f0c
  10097. 080043ac <prvHeapInit>:
  10098. uint8_t *pucAlignedHeap;
  10099. size_t uxAddress;
  10100. size_t xTotalHeapSize = configTOTAL_HEAP_SIZE;
  10101. /* Ensure the heap starts on a correctly aligned boundary. */
  10102. uxAddress = ( size_t ) ucHeap;
  10103. 80043ac: 4a12 ldr r2, [pc, #72] @ (80043f8 <prvHeapInit+0x4c>)
  10104. if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 )
  10105. 80043ae: f012 0f07 tst.w r2, #7
  10106. 80043b2: d01e beq.n 80043f2 <prvHeapInit+0x46>
  10107. {
  10108. uxAddress += ( portBYTE_ALIGNMENT - 1 );
  10109. 80043b4: 1dd1 adds r1, r2, #7
  10110. uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
  10111. 80043b6: f021 0107 bic.w r1, r1, #7
  10112. xTotalHeapSize -= uxAddress - ( size_t ) ucHeap;
  10113. 80043ba: f5c1 3380 rsb r3, r1, #65536 @ 0x10000
  10114. 80043be: 4413 add r3, r2
  10115. uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
  10116. 80043c0: 460a mov r2, r1
  10117. pucAlignedHeap = ( uint8_t * ) uxAddress;
  10118. /* xStart is used to hold a pointer to the first item in the list of free
  10119. blocks. The void cast is used to prevent compiler warnings. */
  10120. xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap;
  10121. 80043c2: 480e ldr r0, [pc, #56] @ (80043fc <prvHeapInit+0x50>)
  10122. 80043c4: 6002 str r2, [r0, #0]
  10123. xStart.xBlockSize = ( size_t ) 0;
  10124. 80043c6: 2100 movs r1, #0
  10125. 80043c8: 6041 str r1, [r0, #4]
  10126. /* pxEnd is used to mark the end of the list of free blocks and is inserted
  10127. at the end of the heap space. */
  10128. uxAddress = ( ( size_t ) pucAlignedHeap ) + xTotalHeapSize;
  10129. 80043ca: 4413 add r3, r2
  10130. uxAddress -= xHeapStructSize;
  10131. 80043cc: 3b08 subs r3, #8
  10132. uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
  10133. 80043ce: f023 0307 bic.w r3, r3, #7
  10134. pxEnd = ( void * ) uxAddress;
  10135. 80043d2: 480b ldr r0, [pc, #44] @ (8004400 <prvHeapInit+0x54>)
  10136. 80043d4: 6003 str r3, [r0, #0]
  10137. pxEnd->xBlockSize = 0;
  10138. 80043d6: 6059 str r1, [r3, #4]
  10139. pxEnd->pxNextFreeBlock = NULL;
  10140. 80043d8: 6019 str r1, [r3, #0]
  10141. /* To start with there is a single free block that is sized to take up the
  10142. entire heap space, minus the space taken by pxEnd. */
  10143. pxFirstFreeBlock = ( void * ) pucAlignedHeap;
  10144. pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock;
  10145. 80043da: 1a99 subs r1, r3, r2
  10146. 80043dc: 6051 str r1, [r2, #4]
  10147. pxFirstFreeBlock->pxNextFreeBlock = pxEnd;
  10148. 80043de: 6013 str r3, [r2, #0]
  10149. /* Only one block exists - and it covers the entire usable heap space. */
  10150. xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
  10151. 80043e0: 4b08 ldr r3, [pc, #32] @ (8004404 <prvHeapInit+0x58>)
  10152. 80043e2: 6019 str r1, [r3, #0]
  10153. xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize;
  10154. 80043e4: 4b08 ldr r3, [pc, #32] @ (8004408 <prvHeapInit+0x5c>)
  10155. 80043e6: 6019 str r1, [r3, #0]
  10156. /* Work out the position of the top bit in a size_t variable. */
  10157. xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 );
  10158. 80043e8: 4b08 ldr r3, [pc, #32] @ (800440c <prvHeapInit+0x60>)
  10159. 80043ea: f04f 4200 mov.w r2, #2147483648 @ 0x80000000
  10160. 80043ee: 601a str r2, [r3, #0]
  10161. }
  10162. 80043f0: 4770 bx lr
  10163. size_t xTotalHeapSize = configTOTAL_HEAP_SIZE;
  10164. 80043f2: f44f 3380 mov.w r3, #65536 @ 0x10000
  10165. 80043f6: e7e4 b.n 80043c2 <prvHeapInit+0x16>
  10166. 80043f8: 24002880 .word 0x24002880
  10167. 80043fc: 24002878 .word 0x24002878
  10168. 8004400: 24002874 .word 0x24002874
  10169. 8004404: 2400286c .word 0x2400286c
  10170. 8004408: 24002870 .word 0x24002870
  10171. 800440c: 24002860 .word 0x24002860
  10172. 08004410 <prvInsertBlockIntoFreeList>:
  10173. BlockLink_t *pxIterator;
  10174. uint8_t *puc;
  10175. /* Iterate through the list until a block is found that has a higher address
  10176. than the block being inserted. */
  10177. for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock )
  10178. 8004410: 4b16 ldr r3, [pc, #88] @ (800446c <prvInsertBlockIntoFreeList+0x5c>)
  10179. 8004412: 461a mov r2, r3
  10180. 8004414: 681b ldr r3, [r3, #0]
  10181. 8004416: 4283 cmp r3, r0
  10182. 8004418: d3fb bcc.n 8004412 <prvInsertBlockIntoFreeList+0x2>
  10183. }
  10184. /* Do the block being inserted, and the block it is being inserted after
  10185. make a contiguous block of memory? */
  10186. puc = ( uint8_t * ) pxIterator;
  10187. if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert )
  10188. 800441a: 6851 ldr r1, [r2, #4]
  10189. 800441c: eb02 0c01 add.w ip, r2, r1
  10190. 8004420: 4584 cmp ip, r0
  10191. 8004422: d009 beq.n 8004438 <prvInsertBlockIntoFreeList+0x28>
  10192. }
  10193. /* Do the block being inserted, and the block it is being inserted before
  10194. make a contiguous block of memory? */
  10195. puc = ( uint8_t * ) pxBlockToInsert;
  10196. if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock )
  10197. 8004424: 6841 ldr r1, [r0, #4]
  10198. 8004426: eb00 0c01 add.w ip, r0, r1
  10199. 800442a: 4563 cmp r3, ip
  10200. 800442c: d009 beq.n 8004442 <prvInsertBlockIntoFreeList+0x32>
  10201. pxBlockToInsert->pxNextFreeBlock = pxEnd;
  10202. }
  10203. }
  10204. else
  10205. {
  10206. pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;
  10207. 800442e: 6003 str r3, [r0, #0]
  10208. /* If the block being inserted plugged a gab, so was merged with the block
  10209. before and the block after, then it's pxNextFreeBlock pointer will have
  10210. already been set, and should not be set here as that would make it point
  10211. to itself. */
  10212. if( pxIterator != pxBlockToInsert )
  10213. 8004430: 4290 cmp r0, r2
  10214. 8004432: d019 beq.n 8004468 <prvInsertBlockIntoFreeList+0x58>
  10215. {
  10216. pxIterator->pxNextFreeBlock = pxBlockToInsert;
  10217. 8004434: 6010 str r0, [r2, #0]
  10218. }
  10219. else
  10220. {
  10221. mtCOVERAGE_TEST_MARKER();
  10222. 8004436: 4770 bx lr
  10223. pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;
  10224. 8004438: 6840 ldr r0, [r0, #4]
  10225. 800443a: 4401 add r1, r0
  10226. 800443c: 6051 str r1, [r2, #4]
  10227. pxBlockToInsert = pxIterator;
  10228. 800443e: 4610 mov r0, r2
  10229. 8004440: e7f0 b.n 8004424 <prvInsertBlockIntoFreeList+0x14>
  10230. {
  10231. 8004442: b410 push {r4}
  10232. if( pxIterator->pxNextFreeBlock != pxEnd )
  10233. 8004444: 4c0a ldr r4, [pc, #40] @ (8004470 <prvInsertBlockIntoFreeList+0x60>)
  10234. 8004446: 6824 ldr r4, [r4, #0]
  10235. 8004448: 42a3 cmp r3, r4
  10236. 800444a: d00b beq.n 8004464 <prvInsertBlockIntoFreeList+0x54>
  10237. pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize;
  10238. 800444c: 685b ldr r3, [r3, #4]
  10239. 800444e: 4419 add r1, r3
  10240. 8004450: 6041 str r1, [r0, #4]
  10241. pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock;
  10242. 8004452: 6813 ldr r3, [r2, #0]
  10243. 8004454: 681b ldr r3, [r3, #0]
  10244. 8004456: 6003 str r3, [r0, #0]
  10245. if( pxIterator != pxBlockToInsert )
  10246. 8004458: 4290 cmp r0, r2
  10247. 800445a: d000 beq.n 800445e <prvInsertBlockIntoFreeList+0x4e>
  10248. pxIterator->pxNextFreeBlock = pxBlockToInsert;
  10249. 800445c: 6010 str r0, [r2, #0]
  10250. }
  10251. }
  10252. 800445e: f85d 4b04 ldr.w r4, [sp], #4
  10253. 8004462: 4770 bx lr
  10254. pxBlockToInsert->pxNextFreeBlock = pxEnd;
  10255. 8004464: 6004 str r4, [r0, #0]
  10256. 8004466: e7f7 b.n 8004458 <prvInsertBlockIntoFreeList+0x48>
  10257. 8004468: 4770 bx lr
  10258. 800446a: bf00 nop
  10259. 800446c: 24002878 .word 0x24002878
  10260. 8004470: 24002874 .word 0x24002874
  10261. 08004474 <pvPortMalloc>:
  10262. {
  10263. 8004474: b538 push {r3, r4, r5, lr}
  10264. 8004476: 4604 mov r4, r0
  10265. vTaskSuspendAll();
  10266. 8004478: f001 fb22 bl 8005ac0 <vTaskSuspendAll>
  10267. if( pxEnd == NULL )
  10268. 800447c: 4b38 ldr r3, [pc, #224] @ (8004560 <pvPortMalloc+0xec>)
  10269. 800447e: 681b ldr r3, [r3, #0]
  10270. 8004480: b1b3 cbz r3, 80044b0 <pvPortMalloc+0x3c>
  10271. if( ( xWantedSize & xBlockAllocatedBit ) == 0 )
  10272. 8004482: 4b38 ldr r3, [pc, #224] @ (8004564 <pvPortMalloc+0xf0>)
  10273. 8004484: 681b ldr r3, [r3, #0]
  10274. 8004486: 421c tst r4, r3
  10275. 8004488: d150 bne.n 800452c <pvPortMalloc+0xb8>
  10276. if( xWantedSize > 0 )
  10277. 800448a: 2c00 cmp r4, #0
  10278. 800448c: d050 beq.n 8004530 <pvPortMalloc+0xbc>
  10279. xWantedSize += xHeapStructSize;
  10280. 800448e: f104 0208 add.w r2, r4, #8
  10281. if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 )
  10282. 8004492: f014 0f07 tst.w r4, #7
  10283. 8004496: d002 beq.n 800449e <pvPortMalloc+0x2a>
  10284. xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
  10285. 8004498: f022 0207 bic.w r2, r2, #7
  10286. 800449c: 3208 adds r2, #8
  10287. if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) )
  10288. 800449e: 2a00 cmp r2, #0
  10289. 80044a0: d055 beq.n 800454e <pvPortMalloc+0xda>
  10290. 80044a2: 4b31 ldr r3, [pc, #196] @ (8004568 <pvPortMalloc+0xf4>)
  10291. 80044a4: 681b ldr r3, [r3, #0]
  10292. 80044a6: 4293 cmp r3, r2
  10293. 80044a8: d353 bcc.n 8004552 <pvPortMalloc+0xde>
  10294. pxBlock = xStart.pxNextFreeBlock;
  10295. 80044aa: 4930 ldr r1, [pc, #192] @ (800456c <pvPortMalloc+0xf8>)
  10296. 80044ac: 680c ldr r4, [r1, #0]
  10297. while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
  10298. 80044ae: e004 b.n 80044ba <pvPortMalloc+0x46>
  10299. prvHeapInit();
  10300. 80044b0: f7ff ff7c bl 80043ac <prvHeapInit>
  10301. 80044b4: e7e5 b.n 8004482 <pvPortMalloc+0xe>
  10302. pxPreviousBlock = pxBlock;
  10303. 80044b6: 4621 mov r1, r4
  10304. pxBlock = pxBlock->pxNextFreeBlock;
  10305. 80044b8: 461c mov r4, r3
  10306. while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
  10307. 80044ba: 6863 ldr r3, [r4, #4]
  10308. 80044bc: 4293 cmp r3, r2
  10309. 80044be: d202 bcs.n 80044c6 <pvPortMalloc+0x52>
  10310. 80044c0: 6823 ldr r3, [r4, #0]
  10311. 80044c2: 2b00 cmp r3, #0
  10312. 80044c4: d1f7 bne.n 80044b6 <pvPortMalloc+0x42>
  10313. if( pxBlock != pxEnd )
  10314. 80044c6: 4b26 ldr r3, [pc, #152] @ (8004560 <pvPortMalloc+0xec>)
  10315. 80044c8: 681b ldr r3, [r3, #0]
  10316. 80044ca: 42a3 cmp r3, r4
  10317. 80044cc: d043 beq.n 8004556 <pvPortMalloc+0xe2>
  10318. pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize );
  10319. 80044ce: 680d ldr r5, [r1, #0]
  10320. 80044d0: 3508 adds r5, #8
  10321. pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
  10322. 80044d2: 6823 ldr r3, [r4, #0]
  10323. 80044d4: 600b str r3, [r1, #0]
  10324. if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )
  10325. 80044d6: 6863 ldr r3, [r4, #4]
  10326. 80044d8: 1a9b subs r3, r3, r2
  10327. 80044da: 2b10 cmp r3, #16
  10328. 80044dc: d910 bls.n 8004500 <pvPortMalloc+0x8c>
  10329. pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize );
  10330. 80044de: 18a0 adds r0, r4, r2
  10331. configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 );
  10332. 80044e0: f010 0f07 tst.w r0, #7
  10333. 80044e4: d008 beq.n 80044f8 <pvPortMalloc+0x84>
  10334. portFORCE_INLINE static void vPortRaiseBASEPRI( void )
  10335. {
  10336. uint32_t ulNewBASEPRI;
  10337. __asm volatile
  10338. 80044e6: f04f 0350 mov.w r3, #80 @ 0x50
  10339. 80044ea: f383 8811 msr BASEPRI, r3
  10340. 80044ee: f3bf 8f6f isb sy
  10341. 80044f2: f3bf 8f4f dsb sy
  10342. 80044f6: e7fe b.n 80044f6 <pvPortMalloc+0x82>
  10343. pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
  10344. 80044f8: 6043 str r3, [r0, #4]
  10345. pxBlock->xBlockSize = xWantedSize;
  10346. 80044fa: 6062 str r2, [r4, #4]
  10347. prvInsertBlockIntoFreeList( pxNewBlockLink );
  10348. 80044fc: f7ff ff88 bl 8004410 <prvInsertBlockIntoFreeList>
  10349. xFreeBytesRemaining -= pxBlock->xBlockSize;
  10350. 8004500: 6862 ldr r2, [r4, #4]
  10351. 8004502: 4919 ldr r1, [pc, #100] @ (8004568 <pvPortMalloc+0xf4>)
  10352. 8004504: 680b ldr r3, [r1, #0]
  10353. 8004506: 1a9b subs r3, r3, r2
  10354. 8004508: 600b str r3, [r1, #0]
  10355. if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining )
  10356. 800450a: 4919 ldr r1, [pc, #100] @ (8004570 <pvPortMalloc+0xfc>)
  10357. 800450c: 6809 ldr r1, [r1, #0]
  10358. 800450e: 428b cmp r3, r1
  10359. 8004510: d201 bcs.n 8004516 <pvPortMalloc+0xa2>
  10360. xMinimumEverFreeBytesRemaining = xFreeBytesRemaining;
  10361. 8004512: 4917 ldr r1, [pc, #92] @ (8004570 <pvPortMalloc+0xfc>)
  10362. 8004514: 600b str r3, [r1, #0]
  10363. pxBlock->xBlockSize |= xBlockAllocatedBit;
  10364. 8004516: 4b13 ldr r3, [pc, #76] @ (8004564 <pvPortMalloc+0xf0>)
  10365. 8004518: 681b ldr r3, [r3, #0]
  10366. 800451a: 4313 orrs r3, r2
  10367. 800451c: 6063 str r3, [r4, #4]
  10368. pxBlock->pxNextFreeBlock = NULL;
  10369. 800451e: 2300 movs r3, #0
  10370. 8004520: 6023 str r3, [r4, #0]
  10371. xNumberOfSuccessfulAllocations++;
  10372. 8004522: 4a14 ldr r2, [pc, #80] @ (8004574 <pvPortMalloc+0x100>)
  10373. 8004524: 6813 ldr r3, [r2, #0]
  10374. 8004526: 3301 adds r3, #1
  10375. 8004528: 6013 str r3, [r2, #0]
  10376. 800452a: e002 b.n 8004532 <pvPortMalloc+0xbe>
  10377. void *pvReturn = NULL;
  10378. 800452c: 2500 movs r5, #0
  10379. 800452e: e000 b.n 8004532 <pvPortMalloc+0xbe>
  10380. 8004530: 2500 movs r5, #0
  10381. ( void ) xTaskResumeAll();
  10382. 8004532: f001 fb67 bl 8005c04 <xTaskResumeAll>
  10383. configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 );
  10384. 8004536: f015 0f07 tst.w r5, #7
  10385. 800453a: d00e beq.n 800455a <pvPortMalloc+0xe6>
  10386. 800453c: f04f 0350 mov.w r3, #80 @ 0x50
  10387. 8004540: f383 8811 msr BASEPRI, r3
  10388. 8004544: f3bf 8f6f isb sy
  10389. 8004548: f3bf 8f4f dsb sy
  10390. 800454c: e7fe b.n 800454c <pvPortMalloc+0xd8>
  10391. void *pvReturn = NULL;
  10392. 800454e: 2500 movs r5, #0
  10393. 8004550: e7ef b.n 8004532 <pvPortMalloc+0xbe>
  10394. 8004552: 2500 movs r5, #0
  10395. 8004554: e7ed b.n 8004532 <pvPortMalloc+0xbe>
  10396. 8004556: 2500 movs r5, #0
  10397. 8004558: e7eb b.n 8004532 <pvPortMalloc+0xbe>
  10398. }
  10399. 800455a: 4628 mov r0, r5
  10400. 800455c: bd38 pop {r3, r4, r5, pc}
  10401. 800455e: bf00 nop
  10402. 8004560: 24002874 .word 0x24002874
  10403. 8004564: 24002860 .word 0x24002860
  10404. 8004568: 24002870 .word 0x24002870
  10405. 800456c: 24002878 .word 0x24002878
  10406. 8004570: 2400286c .word 0x2400286c
  10407. 8004574: 24002868 .word 0x24002868
  10408. 08004578 <vPortFree>:
  10409. if( pv != NULL )
  10410. 8004578: 2800 cmp r0, #0
  10411. 800457a: d034 beq.n 80045e6 <vPortFree+0x6e>
  10412. {
  10413. 800457c: b538 push {r3, r4, r5, lr}
  10414. 800457e: 4604 mov r4, r0
  10415. puc -= xHeapStructSize;
  10416. 8004580: f1a0 0508 sub.w r5, r0, #8
  10417. configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );
  10418. 8004584: f850 3c04 ldr.w r3, [r0, #-4]
  10419. 8004588: 4a17 ldr r2, [pc, #92] @ (80045e8 <vPortFree+0x70>)
  10420. 800458a: 6812 ldr r2, [r2, #0]
  10421. 800458c: 4213 tst r3, r2
  10422. 800458e: d108 bne.n 80045a2 <vPortFree+0x2a>
  10423. 8004590: f04f 0350 mov.w r3, #80 @ 0x50
  10424. 8004594: f383 8811 msr BASEPRI, r3
  10425. 8004598: f3bf 8f6f isb sy
  10426. 800459c: f3bf 8f4f dsb sy
  10427. 80045a0: e7fe b.n 80045a0 <vPortFree+0x28>
  10428. configASSERT( pxLink->pxNextFreeBlock == NULL );
  10429. 80045a2: f850 1c08 ldr.w r1, [r0, #-8]
  10430. 80045a6: b141 cbz r1, 80045ba <vPortFree+0x42>
  10431. 80045a8: f04f 0350 mov.w r3, #80 @ 0x50
  10432. 80045ac: f383 8811 msr BASEPRI, r3
  10433. 80045b0: f3bf 8f6f isb sy
  10434. 80045b4: f3bf 8f4f dsb sy
  10435. 80045b8: e7fe b.n 80045b8 <vPortFree+0x40>
  10436. pxLink->xBlockSize &= ~xBlockAllocatedBit;
  10437. 80045ba: ea23 0302 bic.w r3, r3, r2
  10438. 80045be: f840 3c04 str.w r3, [r0, #-4]
  10439. vTaskSuspendAll();
  10440. 80045c2: f001 fa7d bl 8005ac0 <vTaskSuspendAll>
  10441. xFreeBytesRemaining += pxLink->xBlockSize;
  10442. 80045c6: f854 1c04 ldr.w r1, [r4, #-4]
  10443. 80045ca: 4a08 ldr r2, [pc, #32] @ (80045ec <vPortFree+0x74>)
  10444. 80045cc: 6813 ldr r3, [r2, #0]
  10445. 80045ce: 440b add r3, r1
  10446. 80045d0: 6013 str r3, [r2, #0]
  10447. prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
  10448. 80045d2: 4628 mov r0, r5
  10449. 80045d4: f7ff ff1c bl 8004410 <prvInsertBlockIntoFreeList>
  10450. xNumberOfSuccessfulFrees++;
  10451. 80045d8: 4a05 ldr r2, [pc, #20] @ (80045f0 <vPortFree+0x78>)
  10452. 80045da: 6813 ldr r3, [r2, #0]
  10453. 80045dc: 3301 adds r3, #1
  10454. 80045de: 6013 str r3, [r2, #0]
  10455. ( void ) xTaskResumeAll();
  10456. 80045e0: f001 fb10 bl 8005c04 <xTaskResumeAll>
  10457. }
  10458. 80045e4: bd38 pop {r3, r4, r5, pc}
  10459. 80045e6: 4770 bx lr
  10460. 80045e8: 24002860 .word 0x24002860
  10461. 80045ec: 24002870 .word 0x24002870
  10462. 80045f0: 24002864 .word 0x24002864
  10463. 080045f4 <vListInitialise>:
  10464. void vListInitialise( List_t * const pxList )
  10465. {
  10466. /* The list structure contains a list item which is used to mark the
  10467. end of the list. To initialise the list the list end is inserted
  10468. as the only list entry. */
  10469. pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
  10470. 80045f4: f100 0308 add.w r3, r0, #8
  10471. 80045f8: 6043 str r3, [r0, #4]
  10472. /* The list end value is the highest possible value in the list to
  10473. ensure it remains at the end of the list. */
  10474. pxList->xListEnd.xItemValue = portMAX_DELAY;
  10475. 80045fa: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
  10476. 80045fe: 6082 str r2, [r0, #8]
  10477. /* The list end next and previous pointers point to itself so we know
  10478. when the list is empty. */
  10479. pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
  10480. 8004600: 60c3 str r3, [r0, #12]
  10481. pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd );/*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
  10482. 8004602: 6103 str r3, [r0, #16]
  10483. pxList->uxNumberOfItems = ( UBaseType_t ) 0U;
  10484. 8004604: 2300 movs r3, #0
  10485. 8004606: 6003 str r3, [r0, #0]
  10486. /* Write known values into the list if
  10487. configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
  10488. listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList );
  10489. listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList );
  10490. }
  10491. 8004608: 4770 bx lr
  10492. 0800460a <vListInitialiseItem>:
  10493. /*-----------------------------------------------------------*/
  10494. void vListInitialiseItem( ListItem_t * const pxItem )
  10495. {
  10496. /* Make sure the list item is not recorded as being on a list. */
  10497. pxItem->pxContainer = NULL;
  10498. 800460a: 2300 movs r3, #0
  10499. 800460c: 6103 str r3, [r0, #16]
  10500. /* Write known values into the list item if
  10501. configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
  10502. listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
  10503. listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
  10504. }
  10505. 800460e: 4770 bx lr
  10506. 08004610 <vListInsertEnd>:
  10507. /*-----------------------------------------------------------*/
  10508. void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem )
  10509. {
  10510. ListItem_t * const pxIndex = pxList->pxIndex;
  10511. 8004610: 6843 ldr r3, [r0, #4]
  10512. listTEST_LIST_ITEM_INTEGRITY( pxNewListItem );
  10513. /* Insert a new list item into pxList, but rather than sort the list,
  10514. makes the new list item the last item to be removed by a call to
  10515. listGET_OWNER_OF_NEXT_ENTRY(). */
  10516. pxNewListItem->pxNext = pxIndex;
  10517. 8004612: 604b str r3, [r1, #4]
  10518. pxNewListItem->pxPrevious = pxIndex->pxPrevious;
  10519. 8004614: 689a ldr r2, [r3, #8]
  10520. 8004616: 608a str r2, [r1, #8]
  10521. /* Only used during decision coverage testing. */
  10522. mtCOVERAGE_TEST_DELAY();
  10523. pxIndex->pxPrevious->pxNext = pxNewListItem;
  10524. 8004618: 6051 str r1, [r2, #4]
  10525. pxIndex->pxPrevious = pxNewListItem;
  10526. 800461a: 6099 str r1, [r3, #8]
  10527. /* Remember which list the item is in. */
  10528. pxNewListItem->pxContainer = pxList;
  10529. 800461c: 6108 str r0, [r1, #16]
  10530. ( pxList->uxNumberOfItems )++;
  10531. 800461e: 6803 ldr r3, [r0, #0]
  10532. 8004620: 3301 adds r3, #1
  10533. 8004622: 6003 str r3, [r0, #0]
  10534. }
  10535. 8004624: 4770 bx lr
  10536. 08004626 <vListInsert>:
  10537. /*-----------------------------------------------------------*/
  10538. void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem )
  10539. {
  10540. 8004626: b430 push {r4, r5}
  10541. ListItem_t *pxIterator;
  10542. const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
  10543. 8004628: 680d ldr r5, [r1, #0]
  10544. new list item should be placed after it. This ensures that TCBs which are
  10545. stored in ready lists (all of which have the same xItemValue value) get a
  10546. share of the CPU. However, if the xItemValue is the same as the back marker
  10547. the iteration loop below will not end. Therefore the value is checked
  10548. first, and the algorithm slightly modified if necessary. */
  10549. if( xValueOfInsertion == portMAX_DELAY )
  10550. 800462a: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff
  10551. 800462e: d011 beq.n 8004654 <vListInsert+0x2e>
  10552. 4) Using a queue or semaphore before it has been initialised or
  10553. before the scheduler has been started (are interrupts firing
  10554. before vTaskStartScheduler() has been called?).
  10555. **********************************************************************/
  10556. for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */
  10557. 8004630: f100 0308 add.w r3, r0, #8
  10558. 8004634: 461c mov r4, r3
  10559. 8004636: 685b ldr r3, [r3, #4]
  10560. 8004638: 681a ldr r2, [r3, #0]
  10561. 800463a: 42aa cmp r2, r5
  10562. 800463c: d9fa bls.n 8004634 <vListInsert+0xe>
  10563. /* There is nothing to do here, just iterating to the wanted
  10564. insertion position. */
  10565. }
  10566. }
  10567. pxNewListItem->pxNext = pxIterator->pxNext;
  10568. 800463e: 6863 ldr r3, [r4, #4]
  10569. 8004640: 604b str r3, [r1, #4]
  10570. pxNewListItem->pxNext->pxPrevious = pxNewListItem;
  10571. 8004642: 6099 str r1, [r3, #8]
  10572. pxNewListItem->pxPrevious = pxIterator;
  10573. 8004644: 608c str r4, [r1, #8]
  10574. pxIterator->pxNext = pxNewListItem;
  10575. 8004646: 6061 str r1, [r4, #4]
  10576. /* Remember which list the item is in. This allows fast removal of the
  10577. item later. */
  10578. pxNewListItem->pxContainer = pxList;
  10579. 8004648: 6108 str r0, [r1, #16]
  10580. ( pxList->uxNumberOfItems )++;
  10581. 800464a: 6803 ldr r3, [r0, #0]
  10582. 800464c: 3301 adds r3, #1
  10583. 800464e: 6003 str r3, [r0, #0]
  10584. }
  10585. 8004650: bc30 pop {r4, r5}
  10586. 8004652: 4770 bx lr
  10587. pxIterator = pxList->xListEnd.pxPrevious;
  10588. 8004654: 6904 ldr r4, [r0, #16]
  10589. 8004656: e7f2 b.n 800463e <vListInsert+0x18>
  10590. 08004658 <uxListRemove>:
  10591. UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
  10592. {
  10593. /* The list item knows which list it is in. Obtain the list from the list
  10594. item. */
  10595. List_t * const pxList = pxItemToRemove->pxContainer;
  10596. 8004658: 6903 ldr r3, [r0, #16]
  10597. pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
  10598. 800465a: 6841 ldr r1, [r0, #4]
  10599. 800465c: 6882 ldr r2, [r0, #8]
  10600. 800465e: 608a str r2, [r1, #8]
  10601. pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
  10602. 8004660: 6841 ldr r1, [r0, #4]
  10603. 8004662: 6051 str r1, [r2, #4]
  10604. /* Only used during decision coverage testing. */
  10605. mtCOVERAGE_TEST_DELAY();
  10606. /* Make sure the index is left pointing to a valid item. */
  10607. if( pxList->pxIndex == pxItemToRemove )
  10608. 8004664: 685a ldr r2, [r3, #4]
  10609. 8004666: 4282 cmp r2, r0
  10610. 8004668: d006 beq.n 8004678 <uxListRemove+0x20>
  10611. else
  10612. {
  10613. mtCOVERAGE_TEST_MARKER();
  10614. }
  10615. pxItemToRemove->pxContainer = NULL;
  10616. 800466a: 2200 movs r2, #0
  10617. 800466c: 6102 str r2, [r0, #16]
  10618. ( pxList->uxNumberOfItems )--;
  10619. 800466e: 681a ldr r2, [r3, #0]
  10620. 8004670: 3a01 subs r2, #1
  10621. 8004672: 601a str r2, [r3, #0]
  10622. return pxList->uxNumberOfItems;
  10623. 8004674: 6818 ldr r0, [r3, #0]
  10624. }
  10625. 8004676: 4770 bx lr
  10626. pxList->pxIndex = pxItemToRemove->pxPrevious;
  10627. 8004678: 6882 ldr r2, [r0, #8]
  10628. 800467a: 605a str r2, [r3, #4]
  10629. 800467c: e7f5 b.n 800466a <uxListRemove+0x12>
  10630. ...
  10631. 08004680 <prvTaskExitError>:
  10632. return pxTopOfStack;
  10633. }
  10634. /*-----------------------------------------------------------*/
  10635. static void prvTaskExitError( void )
  10636. {
  10637. 8004680: b082 sub sp, #8
  10638. volatile uint32_t ulDummy = 0;
  10639. 8004682: 2300 movs r3, #0
  10640. 8004684: 9301 str r3, [sp, #4]
  10641. its caller as there is nothing to return to. If a task wants to exit it
  10642. should instead call vTaskDelete( NULL ).
  10643. Artificially force an assert() to be triggered if configASSERT() is
  10644. defined, then stop here so application writers can catch the error. */
  10645. configASSERT( uxCriticalNesting == ~0UL );
  10646. 8004686: 4b0d ldr r3, [pc, #52] @ (80046bc <prvTaskExitError+0x3c>)
  10647. 8004688: 681b ldr r3, [r3, #0]
  10648. 800468a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  10649. 800468e: d008 beq.n 80046a2 <prvTaskExitError+0x22>
  10650. 8004690: f04f 0350 mov.w r3, #80 @ 0x50
  10651. 8004694: f383 8811 msr BASEPRI, r3
  10652. 8004698: f3bf 8f6f isb sy
  10653. 800469c: f3bf 8f4f dsb sy
  10654. 80046a0: e7fe b.n 80046a0 <prvTaskExitError+0x20>
  10655. 80046a2: f04f 0350 mov.w r3, #80 @ 0x50
  10656. 80046a6: f383 8811 msr BASEPRI, r3
  10657. 80046aa: f3bf 8f6f isb sy
  10658. 80046ae: f3bf 8f4f dsb sy
  10659. portDISABLE_INTERRUPTS();
  10660. while( ulDummy == 0 )
  10661. 80046b2: 9b01 ldr r3, [sp, #4]
  10662. 80046b4: 2b00 cmp r3, #0
  10663. 80046b6: d0fc beq.n 80046b2 <prvTaskExitError+0x32>
  10664. about code appearing after this function is called - making ulDummy
  10665. volatile makes the compiler think the function could return and
  10666. therefore not output an 'unreachable code' warning for code that appears
  10667. after it. */
  10668. }
  10669. }
  10670. 80046b8: b002 add sp, #8
  10671. 80046ba: 4770 bx lr
  10672. 80046bc: 24000024 .word 0x24000024
  10673. 080046c0 <prvPortStartFirstTask>:
  10674. {
  10675. /* Start the first task. This also clears the bit that indicates the FPU is
  10676. in use in case the FPU was used before the scheduler was started - which
  10677. would otherwise result in the unnecessary leaving of space in the SVC stack
  10678. for lazy saving of FPU registers. */
  10679. __asm volatile(
  10680. 80046c0: 4808 ldr r0, [pc, #32] @ (80046e4 <prvPortStartFirstTask+0x24>)
  10681. 80046c2: 6800 ldr r0, [r0, #0]
  10682. 80046c4: 6800 ldr r0, [r0, #0]
  10683. 80046c6: f380 8808 msr MSP, r0
  10684. 80046ca: f04f 0000 mov.w r0, #0
  10685. 80046ce: f380 8814 msr CONTROL, r0
  10686. 80046d2: b662 cpsie i
  10687. 80046d4: b661 cpsie f
  10688. 80046d6: f3bf 8f4f dsb sy
  10689. 80046da: f3bf 8f6f isb sy
  10690. 80046de: df00 svc 0
  10691. 80046e0: bf00 nop
  10692. " dsb \n"
  10693. " isb \n"
  10694. " svc 0 \n" /* System call to start first task. */
  10695. " nop \n"
  10696. );
  10697. }
  10698. 80046e2: 0000 .short 0x0000
  10699. 80046e4: e000ed08 .word 0xe000ed08
  10700. 080046e8 <vPortEnableVFP>:
  10701. /*-----------------------------------------------------------*/
  10702. /* This is a naked function. */
  10703. static void vPortEnableVFP( void )
  10704. {
  10705. __asm volatile
  10706. 80046e8: f8df 000c ldr.w r0, [pc, #12] @ 80046f8 <vPortEnableVFP+0x10>
  10707. 80046ec: 6801 ldr r1, [r0, #0]
  10708. 80046ee: f441 0170 orr.w r1, r1, #15728640 @ 0xf00000
  10709. 80046f2: 6001 str r1, [r0, #0]
  10710. 80046f4: 4770 bx lr
  10711. " \n"
  10712. " orr r1, r1, #( 0xf << 20 ) \n" /* Enable CP10 and CP11 coprocessors, then save back. */
  10713. " str r1, [r0] \n"
  10714. " bx r14 "
  10715. );
  10716. }
  10717. 80046f6: 0000 .short 0x0000
  10718. 80046f8: e000ed88 .word 0xe000ed88
  10719. 080046fc <pxPortInitialiseStack>:
  10720. *pxTopOfStack = portINITIAL_XPSR; /* xPSR */
  10721. 80046fc: f04f 7380 mov.w r3, #16777216 @ 0x1000000
  10722. 8004700: f840 3c04 str.w r3, [r0, #-4]
  10723. *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */
  10724. 8004704: f021 0101 bic.w r1, r1, #1
  10725. 8004708: f840 1c08 str.w r1, [r0, #-8]
  10726. *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */
  10727. 800470c: 4b05 ldr r3, [pc, #20] @ (8004724 <pxPortInitialiseStack+0x28>)
  10728. 800470e: f840 3c0c str.w r3, [r0, #-12]
  10729. *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */
  10730. 8004712: f840 2c20 str.w r2, [r0, #-32]
  10731. *pxTopOfStack = portINITIAL_EXC_RETURN;
  10732. 8004716: f06f 0302 mvn.w r3, #2
  10733. 800471a: f840 3c24 str.w r3, [r0, #-36]
  10734. }
  10735. 800471e: 3844 subs r0, #68 @ 0x44
  10736. 8004720: 4770 bx lr
  10737. 8004722: bf00 nop
  10738. 8004724: 08004681 .word 0x08004681
  10739. ...
  10740. 08004730 <SVC_Handler>:
  10741. __asm volatile (
  10742. 8004730: 4b07 ldr r3, [pc, #28] @ (8004750 <pxCurrentTCBConst2>)
  10743. 8004732: 6819 ldr r1, [r3, #0]
  10744. 8004734: 6808 ldr r0, [r1, #0]
  10745. 8004736: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  10746. 800473a: f380 8809 msr PSP, r0
  10747. 800473e: f3bf 8f6f isb sy
  10748. 8004742: f04f 0000 mov.w r0, #0
  10749. 8004746: f380 8811 msr BASEPRI, r0
  10750. 800474a: 4770 bx lr
  10751. 800474c: f3af 8000 nop.w
  10752. 08004750 <pxCurrentTCBConst2>:
  10753. 8004750: 24012dc4 .word 0x24012dc4
  10754. 08004754 <vPortEnterCritical>:
  10755. 8004754: f04f 0350 mov.w r3, #80 @ 0x50
  10756. 8004758: f383 8811 msr BASEPRI, r3
  10757. 800475c: f3bf 8f6f isb sy
  10758. 8004760: f3bf 8f4f dsb sy
  10759. uxCriticalNesting++;
  10760. 8004764: 4a0b ldr r2, [pc, #44] @ (8004794 <vPortEnterCritical+0x40>)
  10761. 8004766: 6813 ldr r3, [r2, #0]
  10762. 8004768: 3301 adds r3, #1
  10763. 800476a: 6013 str r3, [r2, #0]
  10764. if( uxCriticalNesting == 1 )
  10765. 800476c: 2b01 cmp r3, #1
  10766. 800476e: d000 beq.n 8004772 <vPortEnterCritical+0x1e>
  10767. }
  10768. 8004770: 4770 bx lr
  10769. configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 );
  10770. 8004772: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  10771. 8004776: f8d3 3d04 ldr.w r3, [r3, #3332] @ 0xd04
  10772. 800477a: f013 0fff tst.w r3, #255 @ 0xff
  10773. 800477e: d0f7 beq.n 8004770 <vPortEnterCritical+0x1c>
  10774. 8004780: f04f 0350 mov.w r3, #80 @ 0x50
  10775. 8004784: f383 8811 msr BASEPRI, r3
  10776. 8004788: f3bf 8f6f isb sy
  10777. 800478c: f3bf 8f4f dsb sy
  10778. 8004790: e7fe b.n 8004790 <vPortEnterCritical+0x3c>
  10779. 8004792: bf00 nop
  10780. 8004794: 24000024 .word 0x24000024
  10781. 08004798 <vPortExitCritical>:
  10782. configASSERT( uxCriticalNesting );
  10783. 8004798: 4b09 ldr r3, [pc, #36] @ (80047c0 <vPortExitCritical+0x28>)
  10784. 800479a: 681b ldr r3, [r3, #0]
  10785. 800479c: b943 cbnz r3, 80047b0 <vPortExitCritical+0x18>
  10786. 800479e: f04f 0350 mov.w r3, #80 @ 0x50
  10787. 80047a2: f383 8811 msr BASEPRI, r3
  10788. 80047a6: f3bf 8f6f isb sy
  10789. 80047aa: f3bf 8f4f dsb sy
  10790. 80047ae: e7fe b.n 80047ae <vPortExitCritical+0x16>
  10791. uxCriticalNesting--;
  10792. 80047b0: 3b01 subs r3, #1
  10793. 80047b2: 4a03 ldr r2, [pc, #12] @ (80047c0 <vPortExitCritical+0x28>)
  10794. 80047b4: 6013 str r3, [r2, #0]
  10795. if( uxCriticalNesting == 0 )
  10796. 80047b6: b90b cbnz r3, 80047bc <vPortExitCritical+0x24>
  10797. }
  10798. /*-----------------------------------------------------------*/
  10799. portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue )
  10800. {
  10801. __asm volatile
  10802. 80047b8: f383 8811 msr BASEPRI, r3
  10803. }
  10804. 80047bc: 4770 bx lr
  10805. 80047be: bf00 nop
  10806. 80047c0: 24000024 .word 0x24000024
  10807. ...
  10808. 080047d0 <PendSV_Handler>:
  10809. __asm volatile
  10810. 80047d0: f3ef 8009 mrs r0, PSP
  10811. 80047d4: f3bf 8f6f isb sy
  10812. 80047d8: 4b15 ldr r3, [pc, #84] @ (8004830 <pxCurrentTCBConst>)
  10813. 80047da: 681a ldr r2, [r3, #0]
  10814. 80047dc: f01e 0f10 tst.w lr, #16
  10815. 80047e0: bf08 it eq
  10816. 80047e2: ed20 8a10 vstmdbeq r0!, {s16-s31}
  10817. 80047e6: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  10818. 80047ea: 6010 str r0, [r2, #0]
  10819. 80047ec: e92d 0009 stmdb sp!, {r0, r3}
  10820. 80047f0: f04f 0050 mov.w r0, #80 @ 0x50
  10821. 80047f4: f380 8811 msr BASEPRI, r0
  10822. 80047f8: f3bf 8f4f dsb sy
  10823. 80047fc: f3bf 8f6f isb sy
  10824. 8004800: f001 faa2 bl 8005d48 <vTaskSwitchContext>
  10825. 8004804: f04f 0000 mov.w r0, #0
  10826. 8004808: f380 8811 msr BASEPRI, r0
  10827. 800480c: bc09 pop {r0, r3}
  10828. 800480e: 6819 ldr r1, [r3, #0]
  10829. 8004810: 6808 ldr r0, [r1, #0]
  10830. 8004812: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  10831. 8004816: f01e 0f10 tst.w lr, #16
  10832. 800481a: bf08 it eq
  10833. 800481c: ecb0 8a10 vldmiaeq r0!, {s16-s31}
  10834. 8004820: f380 8809 msr PSP, r0
  10835. 8004824: f3bf 8f6f isb sy
  10836. 8004828: 4770 bx lr
  10837. 800482a: bf00 nop
  10838. 800482c: f3af 8000 nop.w
  10839. 08004830 <pxCurrentTCBConst>:
  10840. 8004830: 24012dc4 .word 0x24012dc4
  10841. 08004834 <xPortSysTickHandler>:
  10842. {
  10843. 8004834: b508 push {r3, lr}
  10844. __asm volatile
  10845. 8004836: f04f 0350 mov.w r3, #80 @ 0x50
  10846. 800483a: f383 8811 msr BASEPRI, r3
  10847. 800483e: f3bf 8f6f isb sy
  10848. 8004842: f3bf 8f4f dsb sy
  10849. if( xTaskIncrementTick() != pdFALSE )
  10850. 8004846: f001 f951 bl 8005aec <xTaskIncrementTick>
  10851. 800484a: b128 cbz r0, 8004858 <xPortSysTickHandler+0x24>
  10852. portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
  10853. 800484c: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  10854. 8004850: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  10855. 8004854: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  10856. __asm volatile
  10857. 8004858: 2300 movs r3, #0
  10858. 800485a: f383 8811 msr BASEPRI, r3
  10859. }
  10860. 800485e: bd08 pop {r3, pc}
  10861. 08004860 <vPortSetupTimerInterrupt>:
  10862. portNVIC_SYSTICK_CTRL_REG = 0UL;
  10863. 8004860: f04f 22e0 mov.w r2, #3758153728 @ 0xe000e000
  10864. 8004864: 2300 movs r3, #0
  10865. 8004866: 6113 str r3, [r2, #16]
  10866. portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL;
  10867. 8004868: 6193 str r3, [r2, #24]
  10868. portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;
  10869. 800486a: 4b05 ldr r3, [pc, #20] @ (8004880 <vPortSetupTimerInterrupt+0x20>)
  10870. 800486c: 681b ldr r3, [r3, #0]
  10871. 800486e: 4905 ldr r1, [pc, #20] @ (8004884 <vPortSetupTimerInterrupt+0x24>)
  10872. 8004870: fba1 1303 umull r1, r3, r1, r3
  10873. 8004874: 099b lsrs r3, r3, #6
  10874. 8004876: 3b01 subs r3, #1
  10875. 8004878: 6153 str r3, [r2, #20]
  10876. portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT );
  10877. 800487a: 2307 movs r3, #7
  10878. 800487c: 6113 str r3, [r2, #16]
  10879. }
  10880. 800487e: 4770 bx lr
  10881. 8004880: 24000004 .word 0x24000004
  10882. 8004884: 10624dd3 .word 0x10624dd3
  10883. 08004888 <xPortStartScheduler>:
  10884. configASSERT( portCPUID != portCORTEX_M7_r0p1_ID );
  10885. 8004888: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  10886. 800488c: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00
  10887. 8004890: 4b3d ldr r3, [pc, #244] @ (8004988 <xPortStartScheduler+0x100>)
  10888. 8004892: 429a cmp r2, r3
  10889. 8004894: d01c beq.n 80048d0 <xPortStartScheduler+0x48>
  10890. configASSERT( portCPUID != portCORTEX_M7_r0p0_ID );
  10891. 8004896: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  10892. 800489a: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00
  10893. 800489e: 4b3b ldr r3, [pc, #236] @ (800498c <xPortStartScheduler+0x104>)
  10894. 80048a0: 429a cmp r2, r3
  10895. 80048a2: d01e beq.n 80048e2 <xPortStartScheduler+0x5a>
  10896. {
  10897. 80048a4: b530 push {r4, r5, lr}
  10898. 80048a6: b083 sub sp, #12
  10899. ulOriginalPriority = *pucFirstUserPriorityRegister;
  10900. 80048a8: 4b39 ldr r3, [pc, #228] @ (8004990 <xPortStartScheduler+0x108>)
  10901. 80048aa: 781a ldrb r2, [r3, #0]
  10902. 80048ac: b2d2 uxtb r2, r2
  10903. 80048ae: 9201 str r2, [sp, #4]
  10904. *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE;
  10905. 80048b0: 22ff movs r2, #255 @ 0xff
  10906. 80048b2: 701a strb r2, [r3, #0]
  10907. ucMaxPriorityValue = *pucFirstUserPriorityRegister;
  10908. 80048b4: 781b ldrb r3, [r3, #0]
  10909. 80048b6: b2db uxtb r3, r3
  10910. 80048b8: f88d 3003 strb.w r3, [sp, #3]
  10911. ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue;
  10912. 80048bc: f89d 3003 ldrb.w r3, [sp, #3]
  10913. 80048c0: f003 0350 and.w r3, r3, #80 @ 0x50
  10914. 80048c4: 4a33 ldr r2, [pc, #204] @ (8004994 <xPortStartScheduler+0x10c>)
  10915. 80048c6: 7013 strb r3, [r2, #0]
  10916. ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS;
  10917. 80048c8: 4b33 ldr r3, [pc, #204] @ (8004998 <xPortStartScheduler+0x110>)
  10918. 80048ca: 2207 movs r2, #7
  10919. 80048cc: 601a str r2, [r3, #0]
  10920. while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
  10921. 80048ce: e01b b.n 8004908 <xPortStartScheduler+0x80>
  10922. __asm volatile
  10923. 80048d0: f04f 0350 mov.w r3, #80 @ 0x50
  10924. 80048d4: f383 8811 msr BASEPRI, r3
  10925. 80048d8: f3bf 8f6f isb sy
  10926. 80048dc: f3bf 8f4f dsb sy
  10927. configASSERT( portCPUID != portCORTEX_M7_r0p1_ID );
  10928. 80048e0: e7fe b.n 80048e0 <xPortStartScheduler+0x58>
  10929. 80048e2: f04f 0350 mov.w r3, #80 @ 0x50
  10930. 80048e6: f383 8811 msr BASEPRI, r3
  10931. 80048ea: f3bf 8f6f isb sy
  10932. 80048ee: f3bf 8f4f dsb sy
  10933. configASSERT( portCPUID != portCORTEX_M7_r0p0_ID );
  10934. 80048f2: e7fe b.n 80048f2 <xPortStartScheduler+0x6a>
  10935. ulMaxPRIGROUPValue--;
  10936. 80048f4: 4a28 ldr r2, [pc, #160] @ (8004998 <xPortStartScheduler+0x110>)
  10937. 80048f6: 6813 ldr r3, [r2, #0]
  10938. 80048f8: 3b01 subs r3, #1
  10939. 80048fa: 6013 str r3, [r2, #0]
  10940. ucMaxPriorityValue <<= ( uint8_t ) 0x01;
  10941. 80048fc: f89d 3003 ldrb.w r3, [sp, #3]
  10942. 8004900: 005b lsls r3, r3, #1
  10943. 8004902: b2db uxtb r3, r3
  10944. 8004904: f88d 3003 strb.w r3, [sp, #3]
  10945. while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE )
  10946. 8004908: f89d 3003 ldrb.w r3, [sp, #3]
  10947. 800490c: f013 0f80 tst.w r3, #128 @ 0x80
  10948. 8004910: d1f0 bne.n 80048f4 <xPortStartScheduler+0x6c>
  10949. configASSERT( ( portMAX_PRIGROUP_BITS - ulMaxPRIGROUPValue ) == configPRIO_BITS );
  10950. 8004912: 4b21 ldr r3, [pc, #132] @ (8004998 <xPortStartScheduler+0x110>)
  10951. 8004914: 681b ldr r3, [r3, #0]
  10952. 8004916: 2b03 cmp r3, #3
  10953. 8004918: d008 beq.n 800492c <xPortStartScheduler+0xa4>
  10954. 800491a: f04f 0350 mov.w r3, #80 @ 0x50
  10955. 800491e: f383 8811 msr BASEPRI, r3
  10956. 8004922: f3bf 8f6f isb sy
  10957. 8004926: f3bf 8f4f dsb sy
  10958. 800492a: e7fe b.n 800492a <xPortStartScheduler+0xa2>
  10959. ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT;
  10960. 800492c: 021b lsls r3, r3, #8
  10961. 800492e: 4a1a ldr r2, [pc, #104] @ (8004998 <xPortStartScheduler+0x110>)
  10962. 8004930: 6013 str r3, [r2, #0]
  10963. ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK;
  10964. 8004932: f403 63e0 and.w r3, r3, #1792 @ 0x700
  10965. 8004936: 6013 str r3, [r2, #0]
  10966. *pucFirstUserPriorityRegister = ulOriginalPriority;
  10967. 8004938: 9b01 ldr r3, [sp, #4]
  10968. 800493a: b2db uxtb r3, r3
  10969. 800493c: 4a14 ldr r2, [pc, #80] @ (8004990 <xPortStartScheduler+0x108>)
  10970. 800493e: 7013 strb r3, [r2, #0]
  10971. portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI;
  10972. 8004940: f04f 24e0 mov.w r4, #3758153728 @ 0xe000e000
  10973. 8004944: f8d4 3d20 ldr.w r3, [r4, #3360] @ 0xd20
  10974. 8004948: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000
  10975. 800494c: f8c4 3d20 str.w r3, [r4, #3360] @ 0xd20
  10976. portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI;
  10977. 8004950: f8d4 3d20 ldr.w r3, [r4, #3360] @ 0xd20
  10978. 8004954: f043 4370 orr.w r3, r3, #4026531840 @ 0xf0000000
  10979. 8004958: f8c4 3d20 str.w r3, [r4, #3360] @ 0xd20
  10980. vPortSetupTimerInterrupt();
  10981. 800495c: f7ff ff80 bl 8004860 <vPortSetupTimerInterrupt>
  10982. uxCriticalNesting = 0;
  10983. 8004960: 2500 movs r5, #0
  10984. 8004962: 4b0e ldr r3, [pc, #56] @ (800499c <xPortStartScheduler+0x114>)
  10985. 8004964: 601d str r5, [r3, #0]
  10986. vPortEnableVFP();
  10987. 8004966: f7ff febf bl 80046e8 <vPortEnableVFP>
  10988. *( portFPCCR ) |= portASPEN_AND_LSPEN_BITS;
  10989. 800496a: f8d4 3f34 ldr.w r3, [r4, #3892] @ 0xf34
  10990. 800496e: f043 4340 orr.w r3, r3, #3221225472 @ 0xc0000000
  10991. 8004972: f8c4 3f34 str.w r3, [r4, #3892] @ 0xf34
  10992. prvPortStartFirstTask();
  10993. 8004976: f7ff fea3 bl 80046c0 <prvPortStartFirstTask>
  10994. vTaskSwitchContext();
  10995. 800497a: f001 f9e5 bl 8005d48 <vTaskSwitchContext>
  10996. prvTaskExitError();
  10997. 800497e: f7ff fe7f bl 8004680 <prvTaskExitError>
  10998. }
  10999. 8004982: 4628 mov r0, r5
  11000. 8004984: b003 add sp, #12
  11001. 8004986: bd30 pop {r4, r5, pc}
  11002. 8004988: 410fc271 .word 0x410fc271
  11003. 800498c: 410fc270 .word 0x410fc270
  11004. 8004990: e000e400 .word 0xe000e400
  11005. 8004994: 24012884 .word 0x24012884
  11006. 8004998: 24012880 .word 0x24012880
  11007. 800499c: 24000024 .word 0x24000024
  11008. 080049a0 <vPortValidateInterruptPriority>:
  11009. {
  11010. uint32_t ulCurrentInterrupt;
  11011. uint8_t ucCurrentPriority;
  11012. /* Obtain the number of the currently executing interrupt. */
  11013. __asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) :: "memory" );
  11014. 80049a0: f3ef 8305 mrs r3, IPSR
  11015. /* Is the interrupt number a user defined interrupt? */
  11016. if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER )
  11017. 80049a4: 2b0f cmp r3, #15
  11018. 80049a6: d90f bls.n 80049c8 <vPortValidateInterruptPriority+0x28>
  11019. {
  11020. /* Look up the interrupt's priority. */
  11021. ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ];
  11022. 80049a8: 4a11 ldr r2, [pc, #68] @ (80049f0 <vPortValidateInterruptPriority+0x50>)
  11023. 80049aa: 5c9b ldrb r3, [r3, r2]
  11024. 80049ac: b2db uxtb r3, r3
  11025. interrupt entry is as fast and simple as possible.
  11026. The following links provide detailed information:
  11027. http://www.freertos.org/RTOS-Cortex-M3-M4.html
  11028. http://www.freertos.org/FAQHelp.html */
  11029. configASSERT( ucCurrentPriority >= ucMaxSysCallPriority );
  11030. 80049ae: 4a11 ldr r2, [pc, #68] @ (80049f4 <vPortValidateInterruptPriority+0x54>)
  11031. 80049b0: 7812 ldrb r2, [r2, #0]
  11032. 80049b2: 429a cmp r2, r3
  11033. 80049b4: d908 bls.n 80049c8 <vPortValidateInterruptPriority+0x28>
  11034. 80049b6: f04f 0350 mov.w r3, #80 @ 0x50
  11035. 80049ba: f383 8811 msr BASEPRI, r3
  11036. 80049be: f3bf 8f6f isb sy
  11037. 80049c2: f3bf 8f4f dsb sy
  11038. 80049c6: e7fe b.n 80049c6 <vPortValidateInterruptPriority+0x26>
  11039. configuration then the correct setting can be achieved on all Cortex-M
  11040. devices by calling NVIC_SetPriorityGrouping( 0 ); before starting the
  11041. scheduler. Note however that some vendor specific peripheral libraries
  11042. assume a non-zero priority group setting, in which cases using a value
  11043. of zero will result in unpredictable behaviour. */
  11044. configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) <= ulMaxPRIGROUPValue );
  11045. 80049c8: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  11046. 80049cc: f8d3 3d0c ldr.w r3, [r3, #3340] @ 0xd0c
  11047. 80049d0: f403 63e0 and.w r3, r3, #1792 @ 0x700
  11048. 80049d4: 4a08 ldr r2, [pc, #32] @ (80049f8 <vPortValidateInterruptPriority+0x58>)
  11049. 80049d6: 6812 ldr r2, [r2, #0]
  11050. 80049d8: 4293 cmp r3, r2
  11051. 80049da: d908 bls.n 80049ee <vPortValidateInterruptPriority+0x4e>
  11052. 80049dc: f04f 0350 mov.w r3, #80 @ 0x50
  11053. 80049e0: f383 8811 msr BASEPRI, r3
  11054. 80049e4: f3bf 8f6f isb sy
  11055. 80049e8: f3bf 8f4f dsb sy
  11056. 80049ec: e7fe b.n 80049ec <vPortValidateInterruptPriority+0x4c>
  11057. }
  11058. 80049ee: 4770 bx lr
  11059. 80049f0: e000e3f0 .word 0xe000e3f0
  11060. 80049f4: 24012884 .word 0x24012884
  11061. 80049f8: 24012880 .word 0x24012880
  11062. 080049fc <prvGetDisinheritPriorityAfterTimeout>:
  11063. /*-----------------------------------------------------------*/
  11064. #if( configUSE_MUTEXES == 1 )
  11065. static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue )
  11066. {
  11067. 80049fc: 4603 mov r3, r0
  11068. priority, but the waiting task times out, then the holder should
  11069. disinherit the priority - but only down to the highest priority of any
  11070. other tasks that are waiting for the same mutex. For this purpose,
  11071. return the priority of the highest priority task that is waiting for the
  11072. mutex. */
  11073. if( listCURRENT_LIST_LENGTH( &( pxQueue->xTasksWaitingToReceive ) ) > 0U )
  11074. 80049fe: 6a40 ldr r0, [r0, #36] @ 0x24
  11075. 8004a00: b118 cbz r0, 8004a0a <prvGetDisinheritPriorityAfterTimeout+0xe>
  11076. {
  11077. uxHighestPriorityOfWaitingTasks = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToReceive ) );
  11078. 8004a02: 6b1b ldr r3, [r3, #48] @ 0x30
  11079. 8004a04: 6818 ldr r0, [r3, #0]
  11080. 8004a06: f1c0 0038 rsb r0, r0, #56 @ 0x38
  11081. {
  11082. uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY;
  11083. }
  11084. return uxHighestPriorityOfWaitingTasks;
  11085. }
  11086. 8004a0a: 4770 bx lr
  11087. 08004a0c <prvIsQueueFull>:
  11088. return xReturn;
  11089. } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
  11090. /*-----------------------------------------------------------*/
  11091. static BaseType_t prvIsQueueFull( const Queue_t *pxQueue )
  11092. {
  11093. 8004a0c: b510 push {r4, lr}
  11094. 8004a0e: 4604 mov r4, r0
  11095. BaseType_t xReturn;
  11096. taskENTER_CRITICAL();
  11097. 8004a10: f7ff fea0 bl 8004754 <vPortEnterCritical>
  11098. {
  11099. if( pxQueue->uxMessagesWaiting == pxQueue->uxLength )
  11100. 8004a14: 6ba2 ldr r2, [r4, #56] @ 0x38
  11101. 8004a16: 6be3 ldr r3, [r4, #60] @ 0x3c
  11102. 8004a18: 429a cmp r2, r3
  11103. 8004a1a: d004 beq.n 8004a26 <prvIsQueueFull+0x1a>
  11104. {
  11105. xReturn = pdTRUE;
  11106. }
  11107. else
  11108. {
  11109. xReturn = pdFALSE;
  11110. 8004a1c: 2400 movs r4, #0
  11111. }
  11112. }
  11113. taskEXIT_CRITICAL();
  11114. 8004a1e: f7ff febb bl 8004798 <vPortExitCritical>
  11115. return xReturn;
  11116. }
  11117. 8004a22: 4620 mov r0, r4
  11118. 8004a24: bd10 pop {r4, pc}
  11119. xReturn = pdTRUE;
  11120. 8004a26: 2401 movs r4, #1
  11121. 8004a28: e7f9 b.n 8004a1e <prvIsQueueFull+0x12>
  11122. 08004a2a <prvIsQueueEmpty>:
  11123. {
  11124. 8004a2a: b510 push {r4, lr}
  11125. 8004a2c: 4604 mov r4, r0
  11126. taskENTER_CRITICAL();
  11127. 8004a2e: f7ff fe91 bl 8004754 <vPortEnterCritical>
  11128. if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 )
  11129. 8004a32: 6ba3 ldr r3, [r4, #56] @ 0x38
  11130. 8004a34: b923 cbnz r3, 8004a40 <prvIsQueueEmpty+0x16>
  11131. xReturn = pdTRUE;
  11132. 8004a36: 2401 movs r4, #1
  11133. taskEXIT_CRITICAL();
  11134. 8004a38: f7ff feae bl 8004798 <vPortExitCritical>
  11135. }
  11136. 8004a3c: 4620 mov r0, r4
  11137. 8004a3e: bd10 pop {r4, pc}
  11138. xReturn = pdFALSE;
  11139. 8004a40: 2400 movs r4, #0
  11140. 8004a42: e7f9 b.n 8004a38 <prvIsQueueEmpty+0xe>
  11141. 08004a44 <prvCopyDataToQueue>:
  11142. {
  11143. 8004a44: b570 push {r4, r5, r6, lr}
  11144. 8004a46: 4604 mov r4, r0
  11145. 8004a48: 4615 mov r5, r2
  11146. uxMessagesWaiting = pxQueue->uxMessagesWaiting;
  11147. 8004a4a: 6b86 ldr r6, [r0, #56] @ 0x38
  11148. if( pxQueue->uxItemSize == ( UBaseType_t ) 0 )
  11149. 8004a4c: 6c02 ldr r2, [r0, #64] @ 0x40
  11150. 8004a4e: b95a cbnz r2, 8004a68 <prvCopyDataToQueue+0x24>
  11151. if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
  11152. 8004a50: 6803 ldr r3, [r0, #0]
  11153. 8004a52: b11b cbz r3, 8004a5c <prvCopyDataToQueue+0x18>
  11154. BaseType_t xReturn = pdFALSE;
  11155. 8004a54: 2000 movs r0, #0
  11156. pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;
  11157. 8004a56: 3601 adds r6, #1
  11158. 8004a58: 63a6 str r6, [r4, #56] @ 0x38
  11159. }
  11160. 8004a5a: bd70 pop {r4, r5, r6, pc}
  11161. xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder );
  11162. 8004a5c: 6880 ldr r0, [r0, #8]
  11163. 8004a5e: f001 fb03 bl 8006068 <xTaskPriorityDisinherit>
  11164. pxQueue->u.xSemaphore.xMutexHolder = NULL;
  11165. 8004a62: 2300 movs r3, #0
  11166. 8004a64: 60a3 str r3, [r4, #8]
  11167. 8004a66: e7f6 b.n 8004a56 <prvCopyDataToQueue+0x12>
  11168. else if( xPosition == queueSEND_TO_BACK )
  11169. 8004a68: b96d cbnz r5, 8004a86 <prvCopyDataToQueue+0x42>
  11170. ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */
  11171. 8004a6a: 6840 ldr r0, [r0, #4]
  11172. 8004a6c: f00e ff09 bl 8013882 <memcpy>
  11173. pxQueue->pcWriteTo += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */
  11174. 8004a70: 6863 ldr r3, [r4, #4]
  11175. 8004a72: 6c22 ldr r2, [r4, #64] @ 0x40
  11176. 8004a74: 4413 add r3, r2
  11177. 8004a76: 6063 str r3, [r4, #4]
  11178. if( pxQueue->pcWriteTo >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */
  11179. 8004a78: 68a2 ldr r2, [r4, #8]
  11180. 8004a7a: 4293 cmp r3, r2
  11181. 8004a7c: d319 bcc.n 8004ab2 <prvCopyDataToQueue+0x6e>
  11182. pxQueue->pcWriteTo = pxQueue->pcHead;
  11183. 8004a7e: 6823 ldr r3, [r4, #0]
  11184. 8004a80: 6063 str r3, [r4, #4]
  11185. BaseType_t xReturn = pdFALSE;
  11186. 8004a82: 4628 mov r0, r5
  11187. 8004a84: e7e7 b.n 8004a56 <prvCopyDataToQueue+0x12>
  11188. ( void ) memcpy( ( void * ) pxQueue->u.xQueue.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e9087 !e418 MISRA exception as the casts are only redundant for some ports. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. Assert checks null pointer only used when length is 0. */
  11189. 8004a86: 68c0 ldr r0, [r0, #12]
  11190. 8004a88: f00e fefb bl 8013882 <memcpy>
  11191. pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize;
  11192. 8004a8c: 68e3 ldr r3, [r4, #12]
  11193. 8004a8e: 6c22 ldr r2, [r4, #64] @ 0x40
  11194. 8004a90: 4251 negs r1, r2
  11195. 8004a92: 1a9b subs r3, r3, r2
  11196. 8004a94: 60e3 str r3, [r4, #12]
  11197. if( pxQueue->u.xQueue.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */
  11198. 8004a96: 6822 ldr r2, [r4, #0]
  11199. 8004a98: 4293 cmp r3, r2
  11200. 8004a9a: d202 bcs.n 8004aa2 <prvCopyDataToQueue+0x5e>
  11201. pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize );
  11202. 8004a9c: 68a3 ldr r3, [r4, #8]
  11203. 8004a9e: 440b add r3, r1
  11204. 8004aa0: 60e3 str r3, [r4, #12]
  11205. if( xPosition == queueOVERWRITE )
  11206. 8004aa2: 2d02 cmp r5, #2
  11207. 8004aa4: d001 beq.n 8004aaa <prvCopyDataToQueue+0x66>
  11208. BaseType_t xReturn = pdFALSE;
  11209. 8004aa6: 2000 movs r0, #0
  11210. 8004aa8: e7d5 b.n 8004a56 <prvCopyDataToQueue+0x12>
  11211. if( uxMessagesWaiting > ( UBaseType_t ) 0 )
  11212. 8004aaa: b126 cbz r6, 8004ab6 <prvCopyDataToQueue+0x72>
  11213. --uxMessagesWaiting;
  11214. 8004aac: 3e01 subs r6, #1
  11215. BaseType_t xReturn = pdFALSE;
  11216. 8004aae: 2000 movs r0, #0
  11217. 8004ab0: e7d1 b.n 8004a56 <prvCopyDataToQueue+0x12>
  11218. 8004ab2: 4628 mov r0, r5
  11219. 8004ab4: e7cf b.n 8004a56 <prvCopyDataToQueue+0x12>
  11220. 8004ab6: 2000 movs r0, #0
  11221. 8004ab8: e7cd b.n 8004a56 <prvCopyDataToQueue+0x12>
  11222. 08004aba <prvCopyDataFromQueue>:
  11223. {
  11224. 8004aba: 4603 mov r3, r0
  11225. if( pxQueue->uxItemSize != ( UBaseType_t ) 0 )
  11226. 8004abc: 6c02 ldr r2, [r0, #64] @ 0x40
  11227. 8004abe: b16a cbz r2, 8004adc <prvCopyDataFromQueue+0x22>
  11228. {
  11229. 8004ac0: b510 push {r4, lr}
  11230. 8004ac2: 4608 mov r0, r1
  11231. pxQueue->u.xQueue.pcReadFrom += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */
  11232. 8004ac4: 68d9 ldr r1, [r3, #12]
  11233. 8004ac6: 4411 add r1, r2
  11234. 8004ac8: 60d9 str r1, [r3, #12]
  11235. if( pxQueue->u.xQueue.pcReadFrom >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */
  11236. 8004aca: 689c ldr r4, [r3, #8]
  11237. 8004acc: 42a1 cmp r1, r4
  11238. 8004ace: d301 bcc.n 8004ad4 <prvCopyDataFromQueue+0x1a>
  11239. pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead;
  11240. 8004ad0: 6819 ldr r1, [r3, #0]
  11241. 8004ad2: 60d9 str r1, [r3, #12]
  11242. ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */
  11243. 8004ad4: 68d9 ldr r1, [r3, #12]
  11244. 8004ad6: f00e fed4 bl 8013882 <memcpy>
  11245. }
  11246. 8004ada: bd10 pop {r4, pc}
  11247. 8004adc: 4770 bx lr
  11248. 08004ade <prvUnlockQueue>:
  11249. {
  11250. 8004ade: b538 push {r3, r4, r5, lr}
  11251. 8004ae0: 4605 mov r5, r0
  11252. taskENTER_CRITICAL();
  11253. 8004ae2: f7ff fe37 bl 8004754 <vPortEnterCritical>
  11254. int8_t cTxLock = pxQueue->cTxLock;
  11255. 8004ae6: f895 4045 ldrb.w r4, [r5, #69] @ 0x45
  11256. 8004aea: b264 sxtb r4, r4
  11257. while( cTxLock > queueLOCKED_UNMODIFIED )
  11258. 8004aec: e001 b.n 8004af2 <prvUnlockQueue+0x14>
  11259. --cTxLock;
  11260. 8004aee: 3c01 subs r4, #1
  11261. 8004af0: b264 sxtb r4, r4
  11262. while( cTxLock > queueLOCKED_UNMODIFIED )
  11263. 8004af2: 2c00 cmp r4, #0
  11264. 8004af4: dd0a ble.n 8004b0c <prvUnlockQueue+0x2e>
  11265. if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
  11266. 8004af6: 6a6b ldr r3, [r5, #36] @ 0x24
  11267. 8004af8: b143 cbz r3, 8004b0c <prvUnlockQueue+0x2e>
  11268. if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
  11269. 8004afa: f105 0024 add.w r0, r5, #36 @ 0x24
  11270. 8004afe: f001 f9b7 bl 8005e70 <xTaskRemoveFromEventList>
  11271. 8004b02: 2800 cmp r0, #0
  11272. 8004b04: d0f3 beq.n 8004aee <prvUnlockQueue+0x10>
  11273. vTaskMissedYield();
  11274. 8004b06: f001 fa47 bl 8005f98 <vTaskMissedYield>
  11275. 8004b0a: e7f0 b.n 8004aee <prvUnlockQueue+0x10>
  11276. pxQueue->cTxLock = queueUNLOCKED;
  11277. 8004b0c: 23ff movs r3, #255 @ 0xff
  11278. 8004b0e: f885 3045 strb.w r3, [r5, #69] @ 0x45
  11279. taskEXIT_CRITICAL();
  11280. 8004b12: f7ff fe41 bl 8004798 <vPortExitCritical>
  11281. taskENTER_CRITICAL();
  11282. 8004b16: f7ff fe1d bl 8004754 <vPortEnterCritical>
  11283. int8_t cRxLock = pxQueue->cRxLock;
  11284. 8004b1a: f895 4044 ldrb.w r4, [r5, #68] @ 0x44
  11285. 8004b1e: b264 sxtb r4, r4
  11286. while( cRxLock > queueLOCKED_UNMODIFIED )
  11287. 8004b20: e001 b.n 8004b26 <prvUnlockQueue+0x48>
  11288. --cRxLock;
  11289. 8004b22: 3c01 subs r4, #1
  11290. 8004b24: b264 sxtb r4, r4
  11291. while( cRxLock > queueLOCKED_UNMODIFIED )
  11292. 8004b26: 2c00 cmp r4, #0
  11293. 8004b28: dd0a ble.n 8004b40 <prvUnlockQueue+0x62>
  11294. if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
  11295. 8004b2a: 692b ldr r3, [r5, #16]
  11296. 8004b2c: b143 cbz r3, 8004b40 <prvUnlockQueue+0x62>
  11297. if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
  11298. 8004b2e: f105 0010 add.w r0, r5, #16
  11299. 8004b32: f001 f99d bl 8005e70 <xTaskRemoveFromEventList>
  11300. 8004b36: 2800 cmp r0, #0
  11301. 8004b38: d0f3 beq.n 8004b22 <prvUnlockQueue+0x44>
  11302. vTaskMissedYield();
  11303. 8004b3a: f001 fa2d bl 8005f98 <vTaskMissedYield>
  11304. 8004b3e: e7f0 b.n 8004b22 <prvUnlockQueue+0x44>
  11305. pxQueue->cRxLock = queueUNLOCKED;
  11306. 8004b40: 23ff movs r3, #255 @ 0xff
  11307. 8004b42: f885 3044 strb.w r3, [r5, #68] @ 0x44
  11308. taskEXIT_CRITICAL();
  11309. 8004b46: f7ff fe27 bl 8004798 <vPortExitCritical>
  11310. }
  11311. 8004b4a: bd38 pop {r3, r4, r5, pc}
  11312. 08004b4c <xQueueGenericReset>:
  11313. {
  11314. 8004b4c: b538 push {r3, r4, r5, lr}
  11315. configASSERT( pxQueue );
  11316. 8004b4e: b1e0 cbz r0, 8004b8a <xQueueGenericReset+0x3e>
  11317. 8004b50: 460d mov r5, r1
  11318. 8004b52: 4604 mov r4, r0
  11319. taskENTER_CRITICAL();
  11320. 8004b54: f7ff fdfe bl 8004754 <vPortEnterCritical>
  11321. pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
  11322. 8004b58: 6823 ldr r3, [r4, #0]
  11323. 8004b5a: 6be2 ldr r2, [r4, #60] @ 0x3c
  11324. 8004b5c: 6c21 ldr r1, [r4, #64] @ 0x40
  11325. 8004b5e: fb01 3002 mla r0, r1, r2, r3
  11326. 8004b62: 60a0 str r0, [r4, #8]
  11327. pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U;
  11328. 8004b64: 2000 movs r0, #0
  11329. 8004b66: 63a0 str r0, [r4, #56] @ 0x38
  11330. pxQueue->pcWriteTo = pxQueue->pcHead;
  11331. 8004b68: 6063 str r3, [r4, #4]
  11332. pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - 1U ) * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */
  11333. 8004b6a: 3a01 subs r2, #1
  11334. 8004b6c: fb02 3301 mla r3, r2, r1, r3
  11335. 8004b70: 60e3 str r3, [r4, #12]
  11336. pxQueue->cRxLock = queueUNLOCKED;
  11337. 8004b72: 23ff movs r3, #255 @ 0xff
  11338. 8004b74: f884 3044 strb.w r3, [r4, #68] @ 0x44
  11339. pxQueue->cTxLock = queueUNLOCKED;
  11340. 8004b78: f884 3045 strb.w r3, [r4, #69] @ 0x45
  11341. if( xNewQueue == pdFALSE )
  11342. 8004b7c: b9fd cbnz r5, 8004bbe <xQueueGenericReset+0x72>
  11343. if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
  11344. 8004b7e: 6923 ldr r3, [r4, #16]
  11345. 8004b80: b963 cbnz r3, 8004b9c <xQueueGenericReset+0x50>
  11346. taskEXIT_CRITICAL();
  11347. 8004b82: f7ff fe09 bl 8004798 <vPortExitCritical>
  11348. }
  11349. 8004b86: 2001 movs r0, #1
  11350. 8004b88: bd38 pop {r3, r4, r5, pc}
  11351. 8004b8a: f04f 0350 mov.w r3, #80 @ 0x50
  11352. 8004b8e: f383 8811 msr BASEPRI, r3
  11353. 8004b92: f3bf 8f6f isb sy
  11354. 8004b96: f3bf 8f4f dsb sy
  11355. configASSERT( pxQueue );
  11356. 8004b9a: e7fe b.n 8004b9a <xQueueGenericReset+0x4e>
  11357. if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
  11358. 8004b9c: f104 0010 add.w r0, r4, #16
  11359. 8004ba0: f001 f966 bl 8005e70 <xTaskRemoveFromEventList>
  11360. 8004ba4: 2800 cmp r0, #0
  11361. 8004ba6: d0ec beq.n 8004b82 <xQueueGenericReset+0x36>
  11362. queueYIELD_IF_USING_PREEMPTION();
  11363. 8004ba8: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  11364. 8004bac: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  11365. 8004bb0: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  11366. 8004bb4: f3bf 8f4f dsb sy
  11367. 8004bb8: f3bf 8f6f isb sy
  11368. 8004bbc: e7e1 b.n 8004b82 <xQueueGenericReset+0x36>
  11369. vListInitialise( &( pxQueue->xTasksWaitingToSend ) );
  11370. 8004bbe: f104 0010 add.w r0, r4, #16
  11371. 8004bc2: f7ff fd17 bl 80045f4 <vListInitialise>
  11372. vListInitialise( &( pxQueue->xTasksWaitingToReceive ) );
  11373. 8004bc6: f104 0024 add.w r0, r4, #36 @ 0x24
  11374. 8004bca: f7ff fd13 bl 80045f4 <vListInitialise>
  11375. 8004bce: e7d8 b.n 8004b82 <xQueueGenericReset+0x36>
  11376. 08004bd0 <prvInitialiseNewQueue>:
  11377. {
  11378. 8004bd0: b538 push {r3, r4, r5, lr}
  11379. 8004bd2: 461d mov r5, r3
  11380. 8004bd4: 9c04 ldr r4, [sp, #16]
  11381. if( uxItemSize == ( UBaseType_t ) 0 )
  11382. 8004bd6: 460b mov r3, r1
  11383. 8004bd8: b949 cbnz r1, 8004bee <prvInitialiseNewQueue+0x1e>
  11384. pxNewQueue->pcHead = ( int8_t * ) pxNewQueue;
  11385. 8004bda: 6024 str r4, [r4, #0]
  11386. pxNewQueue->uxLength = uxQueueLength;
  11387. 8004bdc: 63e0 str r0, [r4, #60] @ 0x3c
  11388. pxNewQueue->uxItemSize = uxItemSize;
  11389. 8004bde: 6423 str r3, [r4, #64] @ 0x40
  11390. ( void ) xQueueGenericReset( pxNewQueue, pdTRUE );
  11391. 8004be0: 2101 movs r1, #1
  11392. 8004be2: 4620 mov r0, r4
  11393. 8004be4: f7ff ffb2 bl 8004b4c <xQueueGenericReset>
  11394. pxNewQueue->ucQueueType = ucQueueType;
  11395. 8004be8: f884 504c strb.w r5, [r4, #76] @ 0x4c
  11396. }
  11397. 8004bec: bd38 pop {r3, r4, r5, pc}
  11398. pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage;
  11399. 8004bee: 6022 str r2, [r4, #0]
  11400. 8004bf0: e7f4 b.n 8004bdc <prvInitialiseNewQueue+0xc>
  11401. 08004bf2 <xQueueGenericCreateStatic>:
  11402. configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
  11403. 8004bf2: b940 cbnz r0, 8004c06 <xQueueGenericCreateStatic+0x14>
  11404. 8004bf4: f04f 0350 mov.w r3, #80 @ 0x50
  11405. 8004bf8: f383 8811 msr BASEPRI, r3
  11406. 8004bfc: f3bf 8f6f isb sy
  11407. 8004c00: f3bf 8f4f dsb sy
  11408. 8004c04: e7fe b.n 8004c04 <xQueueGenericCreateStatic+0x12>
  11409. {
  11410. 8004c06: b510 push {r4, lr}
  11411. 8004c08: b084 sub sp, #16
  11412. 8004c0a: 461c mov r4, r3
  11413. configASSERT( pxStaticQueue != NULL );
  11414. 8004c0c: b183 cbz r3, 8004c30 <xQueueGenericCreateStatic+0x3e>
  11415. configASSERT( !( ( pucQueueStorage != NULL ) && ( uxItemSize == 0 ) ) );
  11416. 8004c0e: 1e0b subs r3, r1, #0
  11417. 8004c10: bf18 it ne
  11418. 8004c12: 2301 movne r3, #1
  11419. 8004c14: 2a00 cmp r2, #0
  11420. 8004c16: bf08 it eq
  11421. 8004c18: f043 0301 orreq.w r3, r3, #1
  11422. 8004c1c: b98b cbnz r3, 8004c42 <xQueueGenericCreateStatic+0x50>
  11423. 8004c1e: f04f 0350 mov.w r3, #80 @ 0x50
  11424. 8004c22: f383 8811 msr BASEPRI, r3
  11425. 8004c26: f3bf 8f6f isb sy
  11426. 8004c2a: f3bf 8f4f dsb sy
  11427. 8004c2e: e7fe b.n 8004c2e <xQueueGenericCreateStatic+0x3c>
  11428. 8004c30: f04f 0350 mov.w r3, #80 @ 0x50
  11429. 8004c34: f383 8811 msr BASEPRI, r3
  11430. 8004c38: f3bf 8f6f isb sy
  11431. 8004c3c: f3bf 8f4f dsb sy
  11432. configASSERT( pxStaticQueue != NULL );
  11433. 8004c40: e7fe b.n 8004c40 <xQueueGenericCreateStatic+0x4e>
  11434. configASSERT( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) );
  11435. 8004c42: fab1 f381 clz r3, r1
  11436. 8004c46: 095b lsrs r3, r3, #5
  11437. 8004c48: 2a00 cmp r2, #0
  11438. 8004c4a: bf18 it ne
  11439. 8004c4c: f043 0301 orrne.w r3, r3, #1
  11440. 8004c50: b943 cbnz r3, 8004c64 <xQueueGenericCreateStatic+0x72>
  11441. 8004c52: f04f 0350 mov.w r3, #80 @ 0x50
  11442. 8004c56: f383 8811 msr BASEPRI, r3
  11443. 8004c5a: f3bf 8f6f isb sy
  11444. 8004c5e: f3bf 8f4f dsb sy
  11445. 8004c62: e7fe b.n 8004c62 <xQueueGenericCreateStatic+0x70>
  11446. volatile size_t xSize = sizeof( StaticQueue_t );
  11447. 8004c64: 2350 movs r3, #80 @ 0x50
  11448. 8004c66: 9303 str r3, [sp, #12]
  11449. configASSERT( xSize == sizeof( Queue_t ) );
  11450. 8004c68: 9b03 ldr r3, [sp, #12]
  11451. 8004c6a: 2b50 cmp r3, #80 @ 0x50
  11452. 8004c6c: d008 beq.n 8004c80 <xQueueGenericCreateStatic+0x8e>
  11453. 8004c6e: f04f 0350 mov.w r3, #80 @ 0x50
  11454. 8004c72: f383 8811 msr BASEPRI, r3
  11455. 8004c76: f3bf 8f6f isb sy
  11456. 8004c7a: f3bf 8f4f dsb sy
  11457. 8004c7e: e7fe b.n 8004c7e <xQueueGenericCreateStatic+0x8c>
  11458. ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */
  11459. 8004c80: 9b03 ldr r3, [sp, #12]
  11460. pxNewQueue->ucStaticallyAllocated = pdTRUE;
  11461. 8004c82: 2301 movs r3, #1
  11462. 8004c84: f884 3046 strb.w r3, [r4, #70] @ 0x46
  11463. prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
  11464. 8004c88: 9400 str r4, [sp, #0]
  11465. 8004c8a: f89d 3018 ldrb.w r3, [sp, #24]
  11466. 8004c8e: f7ff ff9f bl 8004bd0 <prvInitialiseNewQueue>
  11467. }
  11468. 8004c92: 4620 mov r0, r4
  11469. 8004c94: b004 add sp, #16
  11470. 8004c96: bd10 pop {r4, pc}
  11471. 08004c98 <xQueueGenericCreate>:
  11472. configASSERT( uxQueueLength > ( UBaseType_t ) 0 );
  11473. 8004c98: b940 cbnz r0, 8004cac <xQueueGenericCreate+0x14>
  11474. 8004c9a: f04f 0350 mov.w r3, #80 @ 0x50
  11475. 8004c9e: f383 8811 msr BASEPRI, r3
  11476. 8004ca2: f3bf 8f6f isb sy
  11477. 8004ca6: f3bf 8f4f dsb sy
  11478. 8004caa: e7fe b.n 8004caa <xQueueGenericCreate+0x12>
  11479. {
  11480. 8004cac: b5f0 push {r4, r5, r6, r7, lr}
  11481. 8004cae: b083 sub sp, #12
  11482. 8004cb0: 460d mov r5, r1
  11483. 8004cb2: 4614 mov r4, r2
  11484. 8004cb4: 4606 mov r6, r0
  11485. xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
  11486. 8004cb6: fb01 f000 mul.w r0, r1, r0
  11487. pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) + xQueueSizeInBytes ); /*lint !e9087 !e9079 see comment above. */
  11488. 8004cba: 3050 adds r0, #80 @ 0x50
  11489. 8004cbc: f7ff fbda bl 8004474 <pvPortMalloc>
  11490. if( pxNewQueue != NULL )
  11491. 8004cc0: 4607 mov r7, r0
  11492. 8004cc2: b150 cbz r0, 8004cda <xQueueGenericCreate+0x42>
  11493. pxNewQueue->ucStaticallyAllocated = pdFALSE;
  11494. 8004cc4: 2300 movs r3, #0
  11495. 8004cc6: f880 3046 strb.w r3, [r0, #70] @ 0x46
  11496. prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue );
  11497. 8004cca: 9000 str r0, [sp, #0]
  11498. 8004ccc: 4623 mov r3, r4
  11499. 8004cce: f100 0250 add.w r2, r0, #80 @ 0x50
  11500. 8004cd2: 4629 mov r1, r5
  11501. 8004cd4: 4630 mov r0, r6
  11502. 8004cd6: f7ff ff7b bl 8004bd0 <prvInitialiseNewQueue>
  11503. }
  11504. 8004cda: 4638 mov r0, r7
  11505. 8004cdc: b003 add sp, #12
  11506. 8004cde: bdf0 pop {r4, r5, r6, r7, pc}
  11507. 08004ce0 <xQueueCreateCountingSemaphoreStatic>:
  11508. configASSERT( uxMaxCount != 0 );
  11509. 8004ce0: b940 cbnz r0, 8004cf4 <xQueueCreateCountingSemaphoreStatic+0x14>
  11510. 8004ce2: f04f 0350 mov.w r3, #80 @ 0x50
  11511. 8004ce6: f383 8811 msr BASEPRI, r3
  11512. 8004cea: f3bf 8f6f isb sy
  11513. 8004cee: f3bf 8f4f dsb sy
  11514. 8004cf2: e7fe b.n 8004cf2 <xQueueCreateCountingSemaphoreStatic+0x12>
  11515. {
  11516. 8004cf4: b510 push {r4, lr}
  11517. 8004cf6: b082 sub sp, #8
  11518. 8004cf8: 460c mov r4, r1
  11519. configASSERT( uxInitialCount <= uxMaxCount );
  11520. 8004cfa: 4288 cmp r0, r1
  11521. 8004cfc: d208 bcs.n 8004d10 <xQueueCreateCountingSemaphoreStatic+0x30>
  11522. 8004cfe: f04f 0350 mov.w r3, #80 @ 0x50
  11523. 8004d02: f383 8811 msr BASEPRI, r3
  11524. 8004d06: f3bf 8f6f isb sy
  11525. 8004d0a: f3bf 8f4f dsb sy
  11526. 8004d0e: e7fe b.n 8004d0e <xQueueCreateCountingSemaphoreStatic+0x2e>
  11527. xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
  11528. 8004d10: 2302 movs r3, #2
  11529. 8004d12: 9300 str r3, [sp, #0]
  11530. 8004d14: 4613 mov r3, r2
  11531. 8004d16: 2200 movs r2, #0
  11532. 8004d18: 4611 mov r1, r2
  11533. 8004d1a: f7ff ff6a bl 8004bf2 <xQueueGenericCreateStatic>
  11534. if( xHandle != NULL )
  11535. 8004d1e: b100 cbz r0, 8004d22 <xQueueCreateCountingSemaphoreStatic+0x42>
  11536. ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
  11537. 8004d20: 6384 str r4, [r0, #56] @ 0x38
  11538. }
  11539. 8004d22: b002 add sp, #8
  11540. 8004d24: bd10 pop {r4, pc}
  11541. 08004d26 <xQueueCreateCountingSemaphore>:
  11542. configASSERT( uxMaxCount != 0 );
  11543. 8004d26: b940 cbnz r0, 8004d3a <xQueueCreateCountingSemaphore+0x14>
  11544. 8004d28: f04f 0350 mov.w r3, #80 @ 0x50
  11545. 8004d2c: f383 8811 msr BASEPRI, r3
  11546. 8004d30: f3bf 8f6f isb sy
  11547. 8004d34: f3bf 8f4f dsb sy
  11548. 8004d38: e7fe b.n 8004d38 <xQueueCreateCountingSemaphore+0x12>
  11549. {
  11550. 8004d3a: b510 push {r4, lr}
  11551. 8004d3c: 460c mov r4, r1
  11552. configASSERT( uxInitialCount <= uxMaxCount );
  11553. 8004d3e: 4288 cmp r0, r1
  11554. 8004d40: d208 bcs.n 8004d54 <xQueueCreateCountingSemaphore+0x2e>
  11555. 8004d42: f04f 0350 mov.w r3, #80 @ 0x50
  11556. 8004d46: f383 8811 msr BASEPRI, r3
  11557. 8004d4a: f3bf 8f6f isb sy
  11558. 8004d4e: f3bf 8f4f dsb sy
  11559. 8004d52: e7fe b.n 8004d52 <xQueueCreateCountingSemaphore+0x2c>
  11560. xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE );
  11561. 8004d54: 2202 movs r2, #2
  11562. 8004d56: 2100 movs r1, #0
  11563. 8004d58: f7ff ff9e bl 8004c98 <xQueueGenericCreate>
  11564. if( xHandle != NULL )
  11565. 8004d5c: b100 cbz r0, 8004d60 <xQueueCreateCountingSemaphore+0x3a>
  11566. ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount;
  11567. 8004d5e: 6384 str r4, [r0, #56] @ 0x38
  11568. }
  11569. 8004d60: bd10 pop {r4, pc}
  11570. 08004d62 <xQueueGenericSend>:
  11571. {
  11572. 8004d62: b5f0 push {r4, r5, r6, r7, lr}
  11573. 8004d64: b085 sub sp, #20
  11574. 8004d66: 9201 str r2, [sp, #4]
  11575. configASSERT( pxQueue );
  11576. 8004d68: b188 cbz r0, 8004d8e <xQueueGenericSend+0x2c>
  11577. 8004d6a: 460f mov r7, r1
  11578. 8004d6c: 461d mov r5, r3
  11579. 8004d6e: 4604 mov r4, r0
  11580. configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
  11581. 8004d70: b1b1 cbz r1, 8004da0 <xQueueGenericSend+0x3e>
  11582. configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
  11583. 8004d72: 2d02 cmp r5, #2
  11584. 8004d74: d120 bne.n 8004db8 <xQueueGenericSend+0x56>
  11585. 8004d76: 6be3 ldr r3, [r4, #60] @ 0x3c
  11586. 8004d78: 2b01 cmp r3, #1
  11587. 8004d7a: d01d beq.n 8004db8 <xQueueGenericSend+0x56>
  11588. 8004d7c: f04f 0350 mov.w r3, #80 @ 0x50
  11589. 8004d80: f383 8811 msr BASEPRI, r3
  11590. 8004d84: f3bf 8f6f isb sy
  11591. 8004d88: f3bf 8f4f dsb sy
  11592. 8004d8c: e7fe b.n 8004d8c <xQueueGenericSend+0x2a>
  11593. 8004d8e: f04f 0350 mov.w r3, #80 @ 0x50
  11594. 8004d92: f383 8811 msr BASEPRI, r3
  11595. 8004d96: f3bf 8f6f isb sy
  11596. 8004d9a: f3bf 8f4f dsb sy
  11597. configASSERT( pxQueue );
  11598. 8004d9e: e7fe b.n 8004d9e <xQueueGenericSend+0x3c>
  11599. configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
  11600. 8004da0: 6c03 ldr r3, [r0, #64] @ 0x40
  11601. 8004da2: 2b00 cmp r3, #0
  11602. 8004da4: d0e5 beq.n 8004d72 <xQueueGenericSend+0x10>
  11603. 8004da6: f04f 0350 mov.w r3, #80 @ 0x50
  11604. 8004daa: f383 8811 msr BASEPRI, r3
  11605. 8004dae: f3bf 8f6f isb sy
  11606. 8004db2: f3bf 8f4f dsb sy
  11607. 8004db6: e7fe b.n 8004db6 <xQueueGenericSend+0x54>
  11608. configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
  11609. 8004db8: f001 f8fa bl 8005fb0 <xTaskGetSchedulerState>
  11610. 8004dbc: 4606 mov r6, r0
  11611. 8004dbe: b958 cbnz r0, 8004dd8 <xQueueGenericSend+0x76>
  11612. 8004dc0: 9b01 ldr r3, [sp, #4]
  11613. 8004dc2: 2b00 cmp r3, #0
  11614. 8004dc4: d048 beq.n 8004e58 <xQueueGenericSend+0xf6>
  11615. 8004dc6: f04f 0350 mov.w r3, #80 @ 0x50
  11616. 8004dca: f383 8811 msr BASEPRI, r3
  11617. 8004dce: f3bf 8f6f isb sy
  11618. 8004dd2: f3bf 8f4f dsb sy
  11619. 8004dd6: e7fe b.n 8004dd6 <xQueueGenericSend+0x74>
  11620. 8004dd8: 2600 movs r6, #0
  11621. 8004dda: e03d b.n 8004e58 <xQueueGenericSend+0xf6>
  11622. xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
  11623. 8004ddc: 462a mov r2, r5
  11624. 8004dde: 4639 mov r1, r7
  11625. 8004de0: 4620 mov r0, r4
  11626. 8004de2: f7ff fe2f bl 8004a44 <prvCopyDataToQueue>
  11627. if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
  11628. 8004de6: 6a63 ldr r3, [r4, #36] @ 0x24
  11629. 8004de8: b97b cbnz r3, 8004e0a <xQueueGenericSend+0xa8>
  11630. else if( xYieldRequired != pdFALSE )
  11631. 8004dea: b148 cbz r0, 8004e00 <xQueueGenericSend+0x9e>
  11632. queueYIELD_IF_USING_PREEMPTION();
  11633. 8004dec: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  11634. 8004df0: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  11635. 8004df4: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  11636. 8004df8: f3bf 8f4f dsb sy
  11637. 8004dfc: f3bf 8f6f isb sy
  11638. taskEXIT_CRITICAL();
  11639. 8004e00: f7ff fcca bl 8004798 <vPortExitCritical>
  11640. return pdPASS;
  11641. 8004e04: 2001 movs r0, #1
  11642. }
  11643. 8004e06: b005 add sp, #20
  11644. 8004e08: bdf0 pop {r4, r5, r6, r7, pc}
  11645. if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
  11646. 8004e0a: f104 0024 add.w r0, r4, #36 @ 0x24
  11647. 8004e0e: f001 f82f bl 8005e70 <xTaskRemoveFromEventList>
  11648. 8004e12: 2800 cmp r0, #0
  11649. 8004e14: d0f4 beq.n 8004e00 <xQueueGenericSend+0x9e>
  11650. queueYIELD_IF_USING_PREEMPTION();
  11651. 8004e16: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  11652. 8004e1a: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  11653. 8004e1e: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  11654. 8004e22: f3bf 8f4f dsb sy
  11655. 8004e26: f3bf 8f6f isb sy
  11656. 8004e2a: e7e9 b.n 8004e00 <xQueueGenericSend+0x9e>
  11657. taskEXIT_CRITICAL();
  11658. 8004e2c: f7ff fcb4 bl 8004798 <vPortExitCritical>
  11659. return errQUEUE_FULL;
  11660. 8004e30: 2000 movs r0, #0
  11661. 8004e32: e7e8 b.n 8004e06 <xQueueGenericSend+0xa4>
  11662. vTaskInternalSetTimeOutState( &xTimeOut );
  11663. 8004e34: a802 add r0, sp, #8
  11664. 8004e36: f001 f861 bl 8005efc <vTaskInternalSetTimeOutState>
  11665. xEntryTimeSet = pdTRUE;
  11666. 8004e3a: 2601 movs r6, #1
  11667. 8004e3c: e019 b.n 8004e72 <xQueueGenericSend+0x110>
  11668. prvLockQueue( pxQueue );
  11669. 8004e3e: 2300 movs r3, #0
  11670. 8004e40: f884 3044 strb.w r3, [r4, #68] @ 0x44
  11671. 8004e44: e021 b.n 8004e8a <xQueueGenericSend+0x128>
  11672. 8004e46: 2300 movs r3, #0
  11673. 8004e48: f884 3045 strb.w r3, [r4, #69] @ 0x45
  11674. 8004e4c: e023 b.n 8004e96 <xQueueGenericSend+0x134>
  11675. prvUnlockQueue( pxQueue );
  11676. 8004e4e: 4620 mov r0, r4
  11677. 8004e50: f7ff fe45 bl 8004ade <prvUnlockQueue>
  11678. ( void ) xTaskResumeAll();
  11679. 8004e54: f000 fed6 bl 8005c04 <xTaskResumeAll>
  11680. taskENTER_CRITICAL();
  11681. 8004e58: f7ff fc7c bl 8004754 <vPortEnterCritical>
  11682. if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
  11683. 8004e5c: 6ba2 ldr r2, [r4, #56] @ 0x38
  11684. 8004e5e: 6be3 ldr r3, [r4, #60] @ 0x3c
  11685. 8004e60: 429a cmp r2, r3
  11686. 8004e62: d3bb bcc.n 8004ddc <xQueueGenericSend+0x7a>
  11687. 8004e64: 2d02 cmp r5, #2
  11688. 8004e66: d0b9 beq.n 8004ddc <xQueueGenericSend+0x7a>
  11689. if( xTicksToWait == ( TickType_t ) 0 )
  11690. 8004e68: 9b01 ldr r3, [sp, #4]
  11691. 8004e6a: 2b00 cmp r3, #0
  11692. 8004e6c: d0de beq.n 8004e2c <xQueueGenericSend+0xca>
  11693. else if( xEntryTimeSet == pdFALSE )
  11694. 8004e6e: 2e00 cmp r6, #0
  11695. 8004e70: d0e0 beq.n 8004e34 <xQueueGenericSend+0xd2>
  11696. taskEXIT_CRITICAL();
  11697. 8004e72: f7ff fc91 bl 8004798 <vPortExitCritical>
  11698. vTaskSuspendAll();
  11699. 8004e76: f000 fe23 bl 8005ac0 <vTaskSuspendAll>
  11700. prvLockQueue( pxQueue );
  11701. 8004e7a: f7ff fc6b bl 8004754 <vPortEnterCritical>
  11702. 8004e7e: f894 2044 ldrb.w r2, [r4, #68] @ 0x44
  11703. 8004e82: b252 sxtb r2, r2
  11704. 8004e84: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
  11705. 8004e88: d0d9 beq.n 8004e3e <xQueueGenericSend+0xdc>
  11706. 8004e8a: f894 2045 ldrb.w r2, [r4, #69] @ 0x45
  11707. 8004e8e: b252 sxtb r2, r2
  11708. 8004e90: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
  11709. 8004e94: d0d7 beq.n 8004e46 <xQueueGenericSend+0xe4>
  11710. 8004e96: f7ff fc7f bl 8004798 <vPortExitCritical>
  11711. if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
  11712. 8004e9a: a901 add r1, sp, #4
  11713. 8004e9c: a802 add r0, sp, #8
  11714. 8004e9e: f001 f839 bl 8005f14 <xTaskCheckForTimeOut>
  11715. 8004ea2: b9d8 cbnz r0, 8004edc <xQueueGenericSend+0x17a>
  11716. if( prvIsQueueFull( pxQueue ) != pdFALSE )
  11717. 8004ea4: 4620 mov r0, r4
  11718. 8004ea6: f7ff fdb1 bl 8004a0c <prvIsQueueFull>
  11719. 8004eaa: 2800 cmp r0, #0
  11720. 8004eac: d0cf beq.n 8004e4e <xQueueGenericSend+0xec>
  11721. vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait );
  11722. 8004eae: 9901 ldr r1, [sp, #4]
  11723. 8004eb0: f104 0010 add.w r0, r4, #16
  11724. 8004eb4: f000 ffa8 bl 8005e08 <vTaskPlaceOnEventList>
  11725. prvUnlockQueue( pxQueue );
  11726. 8004eb8: 4620 mov r0, r4
  11727. 8004eba: f7ff fe10 bl 8004ade <prvUnlockQueue>
  11728. if( xTaskResumeAll() == pdFALSE )
  11729. 8004ebe: f000 fea1 bl 8005c04 <xTaskResumeAll>
  11730. 8004ec2: 2800 cmp r0, #0
  11731. 8004ec4: d1c8 bne.n 8004e58 <xQueueGenericSend+0xf6>
  11732. portYIELD_WITHIN_API();
  11733. 8004ec6: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  11734. 8004eca: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  11735. 8004ece: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  11736. 8004ed2: f3bf 8f4f dsb sy
  11737. 8004ed6: f3bf 8f6f isb sy
  11738. 8004eda: e7bd b.n 8004e58 <xQueueGenericSend+0xf6>
  11739. prvUnlockQueue( pxQueue );
  11740. 8004edc: 4620 mov r0, r4
  11741. 8004ede: f7ff fdfe bl 8004ade <prvUnlockQueue>
  11742. ( void ) xTaskResumeAll();
  11743. 8004ee2: f000 fe8f bl 8005c04 <xTaskResumeAll>
  11744. return errQUEUE_FULL;
  11745. 8004ee6: 2000 movs r0, #0
  11746. 8004ee8: e78d b.n 8004e06 <xQueueGenericSend+0xa4>
  11747. 08004eea <prvInitialiseMutex>:
  11748. if( pxNewQueue != NULL )
  11749. 8004eea: b148 cbz r0, 8004f00 <prvInitialiseMutex+0x16>
  11750. {
  11751. 8004eec: b508 push {r3, lr}
  11752. pxNewQueue->u.xSemaphore.xMutexHolder = NULL;
  11753. 8004eee: 2100 movs r1, #0
  11754. 8004ef0: 6081 str r1, [r0, #8]
  11755. pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX;
  11756. 8004ef2: 6001 str r1, [r0, #0]
  11757. pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0;
  11758. 8004ef4: 60c1 str r1, [r0, #12]
  11759. ( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK );
  11760. 8004ef6: 460b mov r3, r1
  11761. 8004ef8: 460a mov r2, r1
  11762. 8004efa: f7ff ff32 bl 8004d62 <xQueueGenericSend>
  11763. }
  11764. 8004efe: bd08 pop {r3, pc}
  11765. 8004f00: 4770 bx lr
  11766. 08004f02 <xQueueCreateMutex>:
  11767. {
  11768. 8004f02: b510 push {r4, lr}
  11769. 8004f04: 4602 mov r2, r0
  11770. xNewQueue = xQueueGenericCreate( uxMutexLength, uxMutexSize, ucQueueType );
  11771. 8004f06: 2100 movs r1, #0
  11772. 8004f08: 2001 movs r0, #1
  11773. 8004f0a: f7ff fec5 bl 8004c98 <xQueueGenericCreate>
  11774. 8004f0e: 4604 mov r4, r0
  11775. prvInitialiseMutex( ( Queue_t * ) xNewQueue );
  11776. 8004f10: f7ff ffeb bl 8004eea <prvInitialiseMutex>
  11777. }
  11778. 8004f14: 4620 mov r0, r4
  11779. 8004f16: bd10 pop {r4, pc}
  11780. 08004f18 <xQueueCreateMutexStatic>:
  11781. {
  11782. 8004f18: b510 push {r4, lr}
  11783. 8004f1a: b082 sub sp, #8
  11784. 8004f1c: 460b mov r3, r1
  11785. xNewQueue = xQueueGenericCreateStatic( uxMutexLength, uxMutexSize, NULL, pxStaticQueue, ucQueueType );
  11786. 8004f1e: 9000 str r0, [sp, #0]
  11787. 8004f20: 2200 movs r2, #0
  11788. 8004f22: 4611 mov r1, r2
  11789. 8004f24: 2001 movs r0, #1
  11790. 8004f26: f7ff fe64 bl 8004bf2 <xQueueGenericCreateStatic>
  11791. 8004f2a: 4604 mov r4, r0
  11792. prvInitialiseMutex( ( Queue_t * ) xNewQueue );
  11793. 8004f2c: f7ff ffdd bl 8004eea <prvInitialiseMutex>
  11794. }
  11795. 8004f30: 4620 mov r0, r4
  11796. 8004f32: b002 add sp, #8
  11797. 8004f34: bd10 pop {r4, pc}
  11798. 08004f36 <xQueueGiveMutexRecursive>:
  11799. {
  11800. 8004f36: b538 push {r3, r4, r5, lr}
  11801. configASSERT( pxMutex );
  11802. 8004f38: b138 cbz r0, 8004f4a <xQueueGiveMutexRecursive+0x14>
  11803. 8004f3a: 4604 mov r4, r0
  11804. if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() )
  11805. 8004f3c: 6885 ldr r5, [r0, #8]
  11806. 8004f3e: f001 f831 bl 8005fa4 <xTaskGetCurrentTaskHandle>
  11807. 8004f42: 4285 cmp r5, r0
  11808. 8004f44: d00a beq.n 8004f5c <xQueueGiveMutexRecursive+0x26>
  11809. xReturn = pdFAIL;
  11810. 8004f46: 2000 movs r0, #0
  11811. }
  11812. 8004f48: bd38 pop {r3, r4, r5, pc}
  11813. 8004f4a: f04f 0350 mov.w r3, #80 @ 0x50
  11814. 8004f4e: f383 8811 msr BASEPRI, r3
  11815. 8004f52: f3bf 8f6f isb sy
  11816. 8004f56: f3bf 8f4f dsb sy
  11817. configASSERT( pxMutex );
  11818. 8004f5a: e7fe b.n 8004f5a <xQueueGiveMutexRecursive+0x24>
  11819. ( pxMutex->u.xSemaphore.uxRecursiveCallCount )--;
  11820. 8004f5c: 68e3 ldr r3, [r4, #12]
  11821. 8004f5e: 3b01 subs r3, #1
  11822. 8004f60: 60e3 str r3, [r4, #12]
  11823. if( pxMutex->u.xSemaphore.uxRecursiveCallCount == ( UBaseType_t ) 0 )
  11824. 8004f62: b10b cbz r3, 8004f68 <xQueueGiveMutexRecursive+0x32>
  11825. xReturn = pdPASS;
  11826. 8004f64: 2001 movs r0, #1
  11827. return xReturn;
  11828. 8004f66: e7ef b.n 8004f48 <xQueueGiveMutexRecursive+0x12>
  11829. ( void ) xQueueGenericSend( pxMutex, NULL, queueMUTEX_GIVE_BLOCK_TIME, queueSEND_TO_BACK );
  11830. 8004f68: 461a mov r2, r3
  11831. 8004f6a: 4619 mov r1, r3
  11832. 8004f6c: 4620 mov r0, r4
  11833. 8004f6e: f7ff fef8 bl 8004d62 <xQueueGenericSend>
  11834. xReturn = pdPASS;
  11835. 8004f72: 2001 movs r0, #1
  11836. 8004f74: e7e8 b.n 8004f48 <xQueueGiveMutexRecursive+0x12>
  11837. 08004f76 <xQueueGenericSendFromISR>:
  11838. {
  11839. 8004f76: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  11840. configASSERT( pxQueue );
  11841. 8004f7a: b190 cbz r0, 8004fa2 <xQueueGenericSendFromISR+0x2c>
  11842. 8004f7c: 460f mov r7, r1
  11843. 8004f7e: 4616 mov r6, r2
  11844. 8004f80: 461c mov r4, r3
  11845. 8004f82: 4605 mov r5, r0
  11846. configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
  11847. 8004f84: b1b1 cbz r1, 8004fb4 <xQueueGenericSendFromISR+0x3e>
  11848. configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) );
  11849. 8004f86: 2c02 cmp r4, #2
  11850. 8004f88: d120 bne.n 8004fcc <xQueueGenericSendFromISR+0x56>
  11851. 8004f8a: 6beb ldr r3, [r5, #60] @ 0x3c
  11852. 8004f8c: 2b01 cmp r3, #1
  11853. 8004f8e: d01d beq.n 8004fcc <xQueueGenericSendFromISR+0x56>
  11854. 8004f90: f04f 0350 mov.w r3, #80 @ 0x50
  11855. 8004f94: f383 8811 msr BASEPRI, r3
  11856. 8004f98: f3bf 8f6f isb sy
  11857. 8004f9c: f3bf 8f4f dsb sy
  11858. 8004fa0: e7fe b.n 8004fa0 <xQueueGenericSendFromISR+0x2a>
  11859. 8004fa2: f04f 0350 mov.w r3, #80 @ 0x50
  11860. 8004fa6: f383 8811 msr BASEPRI, r3
  11861. 8004faa: f3bf 8f6f isb sy
  11862. 8004fae: f3bf 8f4f dsb sy
  11863. configASSERT( pxQueue );
  11864. 8004fb2: e7fe b.n 8004fb2 <xQueueGenericSendFromISR+0x3c>
  11865. configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
  11866. 8004fb4: 6c03 ldr r3, [r0, #64] @ 0x40
  11867. 8004fb6: 2b00 cmp r3, #0
  11868. 8004fb8: d0e5 beq.n 8004f86 <xQueueGenericSendFromISR+0x10>
  11869. 8004fba: f04f 0350 mov.w r3, #80 @ 0x50
  11870. 8004fbe: f383 8811 msr BASEPRI, r3
  11871. 8004fc2: f3bf 8f6f isb sy
  11872. 8004fc6: f3bf 8f4f dsb sy
  11873. 8004fca: e7fe b.n 8004fca <xQueueGenericSendFromISR+0x54>
  11874. portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
  11875. 8004fcc: f7ff fce8 bl 80049a0 <vPortValidateInterruptPriority>
  11876. __asm volatile
  11877. 8004fd0: f3ef 8811 mrs r8, BASEPRI
  11878. 8004fd4: f04f 0350 mov.w r3, #80 @ 0x50
  11879. 8004fd8: f383 8811 msr BASEPRI, r3
  11880. 8004fdc: f3bf 8f6f isb sy
  11881. 8004fe0: f3bf 8f4f dsb sy
  11882. if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) )
  11883. 8004fe4: 6baa ldr r2, [r5, #56] @ 0x38
  11884. 8004fe6: 6beb ldr r3, [r5, #60] @ 0x3c
  11885. 8004fe8: 429a cmp r2, r3
  11886. 8004fea: d306 bcc.n 8004ffa <xQueueGenericSendFromISR+0x84>
  11887. 8004fec: 2c02 cmp r4, #2
  11888. 8004fee: d004 beq.n 8004ffa <xQueueGenericSendFromISR+0x84>
  11889. xReturn = errQUEUE_FULL;
  11890. 8004ff0: 2000 movs r0, #0
  11891. __asm volatile
  11892. 8004ff2: f388 8811 msr BASEPRI, r8
  11893. }
  11894. 8004ff6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  11895. const int8_t cTxLock = pxQueue->cTxLock;
  11896. 8004ffa: f895 9045 ldrb.w r9, [r5, #69] @ 0x45
  11897. 8004ffe: fa4f f989 sxtb.w r9, r9
  11898. const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting;
  11899. 8005002: 6bab ldr r3, [r5, #56] @ 0x38
  11900. ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition );
  11901. 8005004: 4622 mov r2, r4
  11902. 8005006: 4639 mov r1, r7
  11903. 8005008: 4628 mov r0, r5
  11904. 800500a: f7ff fd1b bl 8004a44 <prvCopyDataToQueue>
  11905. if( cTxLock == queueUNLOCKED )
  11906. 800500e: f1b9 3fff cmp.w r9, #4294967295 @ 0xffffffff
  11907. 8005012: d006 beq.n 8005022 <xQueueGenericSendFromISR+0xac>
  11908. pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 );
  11909. 8005014: f109 0301 add.w r3, r9, #1
  11910. 8005018: b25b sxtb r3, r3
  11911. 800501a: f885 3045 strb.w r3, [r5, #69] @ 0x45
  11912. xReturn = pdPASS;
  11913. 800501e: 2001 movs r0, #1
  11914. 8005020: e7e7 b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
  11915. if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
  11916. 8005022: 6a6b ldr r3, [r5, #36] @ 0x24
  11917. 8005024: b90b cbnz r3, 800502a <xQueueGenericSendFromISR+0xb4>
  11918. xReturn = pdPASS;
  11919. 8005026: 2001 movs r0, #1
  11920. 8005028: e7e3 b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
  11921. if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
  11922. 800502a: f105 0024 add.w r0, r5, #36 @ 0x24
  11923. 800502e: f000 ff1f bl 8005e70 <xTaskRemoveFromEventList>
  11924. 8005032: b118 cbz r0, 800503c <xQueueGenericSendFromISR+0xc6>
  11925. if( pxHigherPriorityTaskWoken != NULL )
  11926. 8005034: b126 cbz r6, 8005040 <xQueueGenericSendFromISR+0xca>
  11927. *pxHigherPriorityTaskWoken = pdTRUE;
  11928. 8005036: 2001 movs r0, #1
  11929. 8005038: 6030 str r0, [r6, #0]
  11930. 800503a: e7da b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
  11931. xReturn = pdPASS;
  11932. 800503c: 2001 movs r0, #1
  11933. 800503e: e7d8 b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
  11934. 8005040: 2001 movs r0, #1
  11935. 8005042: e7d6 b.n 8004ff2 <xQueueGenericSendFromISR+0x7c>
  11936. 08005044 <xQueueGiveFromISR>:
  11937. configASSERT( pxQueue );
  11938. 8005044: b168 cbz r0, 8005062 <xQueueGiveFromISR+0x1e>
  11939. {
  11940. 8005046: b570 push {r4, r5, r6, lr}
  11941. 8005048: 460c mov r4, r1
  11942. 800504a: 4605 mov r5, r0
  11943. configASSERT( pxQueue->uxItemSize == 0 );
  11944. 800504c: 6c03 ldr r3, [r0, #64] @ 0x40
  11945. 800504e: b18b cbz r3, 8005074 <xQueueGiveFromISR+0x30>
  11946. __asm volatile
  11947. 8005050: f04f 0350 mov.w r3, #80 @ 0x50
  11948. 8005054: f383 8811 msr BASEPRI, r3
  11949. 8005058: f3bf 8f6f isb sy
  11950. 800505c: f3bf 8f4f dsb sy
  11951. 8005060: e7fe b.n 8005060 <xQueueGiveFromISR+0x1c>
  11952. 8005062: f04f 0350 mov.w r3, #80 @ 0x50
  11953. 8005066: f383 8811 msr BASEPRI, r3
  11954. 800506a: f3bf 8f6f isb sy
  11955. 800506e: f3bf 8f4f dsb sy
  11956. configASSERT( pxQueue );
  11957. 8005072: e7fe b.n 8005072 <xQueueGiveFromISR+0x2e>
  11958. configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutexHolder != NULL ) ) );
  11959. 8005074: 6803 ldr r3, [r0, #0]
  11960. 8005076: b1eb cbz r3, 80050b4 <xQueueGiveFromISR+0x70>
  11961. portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
  11962. 8005078: f7ff fc92 bl 80049a0 <vPortValidateInterruptPriority>
  11963. __asm volatile
  11964. 800507c: f3ef 8611 mrs r6, BASEPRI
  11965. 8005080: f04f 0350 mov.w r3, #80 @ 0x50
  11966. 8005084: f383 8811 msr BASEPRI, r3
  11967. 8005088: f3bf 8f6f isb sy
  11968. 800508c: f3bf 8f4f dsb sy
  11969. const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
  11970. 8005090: 6baa ldr r2, [r5, #56] @ 0x38
  11971. if( uxMessagesWaiting < pxQueue->uxLength )
  11972. 8005092: 6beb ldr r3, [r5, #60] @ 0x3c
  11973. 8005094: 4293 cmp r3, r2
  11974. 8005096: d926 bls.n 80050e6 <xQueueGiveFromISR+0xa2>
  11975. const int8_t cTxLock = pxQueue->cTxLock;
  11976. 8005098: f895 3045 ldrb.w r3, [r5, #69] @ 0x45
  11977. 800509c: b25b sxtb r3, r3
  11978. pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1;
  11979. 800509e: 3201 adds r2, #1
  11980. 80050a0: 63aa str r2, [r5, #56] @ 0x38
  11981. if( cTxLock == queueUNLOCKED )
  11982. 80050a2: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  11983. 80050a6: d011 beq.n 80050cc <xQueueGiveFromISR+0x88>
  11984. pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 );
  11985. 80050a8: 3301 adds r3, #1
  11986. 80050aa: b25b sxtb r3, r3
  11987. 80050ac: f885 3045 strb.w r3, [r5, #69] @ 0x45
  11988. xReturn = pdPASS;
  11989. 80050b0: 2001 movs r0, #1
  11990. 80050b2: e019 b.n 80050e8 <xQueueGiveFromISR+0xa4>
  11991. configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutexHolder != NULL ) ) );
  11992. 80050b4: 6883 ldr r3, [r0, #8]
  11993. 80050b6: 2b00 cmp r3, #0
  11994. 80050b8: d0de beq.n 8005078 <xQueueGiveFromISR+0x34>
  11995. __asm volatile
  11996. 80050ba: f04f 0350 mov.w r3, #80 @ 0x50
  11997. 80050be: f383 8811 msr BASEPRI, r3
  11998. 80050c2: f3bf 8f6f isb sy
  11999. 80050c6: f3bf 8f4f dsb sy
  12000. 80050ca: e7fe b.n 80050ca <xQueueGiveFromISR+0x86>
  12001. if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE )
  12002. 80050cc: 6a6b ldr r3, [r5, #36] @ 0x24
  12003. 80050ce: b90b cbnz r3, 80050d4 <xQueueGiveFromISR+0x90>
  12004. xReturn = pdPASS;
  12005. 80050d0: 2001 movs r0, #1
  12006. 80050d2: e009 b.n 80050e8 <xQueueGiveFromISR+0xa4>
  12007. if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE )
  12008. 80050d4: f105 0024 add.w r0, r5, #36 @ 0x24
  12009. 80050d8: f000 feca bl 8005e70 <xTaskRemoveFromEventList>
  12010. 80050dc: b138 cbz r0, 80050ee <xQueueGiveFromISR+0xaa>
  12011. if( pxHigherPriorityTaskWoken != NULL )
  12012. 80050de: b144 cbz r4, 80050f2 <xQueueGiveFromISR+0xae>
  12013. *pxHigherPriorityTaskWoken = pdTRUE;
  12014. 80050e0: 2001 movs r0, #1
  12015. 80050e2: 6020 str r0, [r4, #0]
  12016. 80050e4: e000 b.n 80050e8 <xQueueGiveFromISR+0xa4>
  12017. xReturn = errQUEUE_FULL;
  12018. 80050e6: 2000 movs r0, #0
  12019. __asm volatile
  12020. 80050e8: f386 8811 msr BASEPRI, r6
  12021. }
  12022. 80050ec: bd70 pop {r4, r5, r6, pc}
  12023. xReturn = pdPASS;
  12024. 80050ee: 2001 movs r0, #1
  12025. 80050f0: e7fa b.n 80050e8 <xQueueGiveFromISR+0xa4>
  12026. 80050f2: 2001 movs r0, #1
  12027. 80050f4: e7f8 b.n 80050e8 <xQueueGiveFromISR+0xa4>
  12028. 080050f6 <xQueueReceive>:
  12029. {
  12030. 80050f6: b5f0 push {r4, r5, r6, r7, lr}
  12031. 80050f8: b085 sub sp, #20
  12032. 80050fa: 9201 str r2, [sp, #4]
  12033. configASSERT( ( pxQueue ) );
  12034. 80050fc: b190 cbz r0, 8005124 <xQueueReceive+0x2e>
  12035. 80050fe: 460f mov r7, r1
  12036. 8005100: 4604 mov r4, r0
  12037. configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) );
  12038. 8005102: b1c1 cbz r1, 8005136 <xQueueReceive+0x40>
  12039. configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
  12040. 8005104: f000 ff54 bl 8005fb0 <xTaskGetSchedulerState>
  12041. 8005108: 4606 mov r6, r0
  12042. 800510a: bb00 cbnz r0, 800514e <xQueueReceive+0x58>
  12043. 800510c: 9b01 ldr r3, [sp, #4]
  12044. 800510e: 2b00 cmp r3, #0
  12045. 8005110: d05e beq.n 80051d0 <xQueueReceive+0xda>
  12046. __asm volatile
  12047. 8005112: f04f 0350 mov.w r3, #80 @ 0x50
  12048. 8005116: f383 8811 msr BASEPRI, r3
  12049. 800511a: f3bf 8f6f isb sy
  12050. 800511e: f3bf 8f4f dsb sy
  12051. 8005122: e7fe b.n 8005122 <xQueueReceive+0x2c>
  12052. 8005124: f04f 0350 mov.w r3, #80 @ 0x50
  12053. 8005128: f383 8811 msr BASEPRI, r3
  12054. 800512c: f3bf 8f6f isb sy
  12055. 8005130: f3bf 8f4f dsb sy
  12056. configASSERT( ( pxQueue ) );
  12057. 8005134: e7fe b.n 8005134 <xQueueReceive+0x3e>
  12058. configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) );
  12059. 8005136: 6c03 ldr r3, [r0, #64] @ 0x40
  12060. 8005138: 2b00 cmp r3, #0
  12061. 800513a: d0e3 beq.n 8005104 <xQueueReceive+0xe>
  12062. 800513c: f04f 0350 mov.w r3, #80 @ 0x50
  12063. 8005140: f383 8811 msr BASEPRI, r3
  12064. 8005144: f3bf 8f6f isb sy
  12065. 8005148: f3bf 8f4f dsb sy
  12066. 800514c: e7fe b.n 800514c <xQueueReceive+0x56>
  12067. 800514e: 2600 movs r6, #0
  12068. 8005150: e03e b.n 80051d0 <xQueueReceive+0xda>
  12069. prvCopyDataFromQueue( pxQueue, pvBuffer );
  12070. 8005152: 4639 mov r1, r7
  12071. 8005154: 4620 mov r0, r4
  12072. 8005156: f7ff fcb0 bl 8004aba <prvCopyDataFromQueue>
  12073. pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
  12074. 800515a: 3d01 subs r5, #1
  12075. 800515c: 63a5 str r5, [r4, #56] @ 0x38
  12076. if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
  12077. 800515e: 6923 ldr r3, [r4, #16]
  12078. 8005160: b923 cbnz r3, 800516c <xQueueReceive+0x76>
  12079. taskEXIT_CRITICAL();
  12080. 8005162: f7ff fb19 bl 8004798 <vPortExitCritical>
  12081. return pdPASS;
  12082. 8005166: 2001 movs r0, #1
  12083. }
  12084. 8005168: b005 add sp, #20
  12085. 800516a: bdf0 pop {r4, r5, r6, r7, pc}
  12086. if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
  12087. 800516c: f104 0010 add.w r0, r4, #16
  12088. 8005170: f000 fe7e bl 8005e70 <xTaskRemoveFromEventList>
  12089. 8005174: 2800 cmp r0, #0
  12090. 8005176: d0f4 beq.n 8005162 <xQueueReceive+0x6c>
  12091. queueYIELD_IF_USING_PREEMPTION();
  12092. 8005178: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  12093. 800517c: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  12094. 8005180: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  12095. 8005184: f3bf 8f4f dsb sy
  12096. 8005188: f3bf 8f6f isb sy
  12097. 800518c: e7e9 b.n 8005162 <xQueueReceive+0x6c>
  12098. taskEXIT_CRITICAL();
  12099. 800518e: f7ff fb03 bl 8004798 <vPortExitCritical>
  12100. return errQUEUE_EMPTY;
  12101. 8005192: 2000 movs r0, #0
  12102. 8005194: e7e8 b.n 8005168 <xQueueReceive+0x72>
  12103. vTaskInternalSetTimeOutState( &xTimeOut );
  12104. 8005196: a802 add r0, sp, #8
  12105. 8005198: f000 feb0 bl 8005efc <vTaskInternalSetTimeOutState>
  12106. xEntryTimeSet = pdTRUE;
  12107. 800519c: 2601 movs r6, #1
  12108. 800519e: e021 b.n 80051e4 <xQueueReceive+0xee>
  12109. prvLockQueue( pxQueue );
  12110. 80051a0: 2300 movs r3, #0
  12111. 80051a2: f884 3044 strb.w r3, [r4, #68] @ 0x44
  12112. 80051a6: e029 b.n 80051fc <xQueueReceive+0x106>
  12113. 80051a8: 2300 movs r3, #0
  12114. 80051aa: f884 3045 strb.w r3, [r4, #69] @ 0x45
  12115. 80051ae: e02b b.n 8005208 <xQueueReceive+0x112>
  12116. prvUnlockQueue( pxQueue );
  12117. 80051b0: 4620 mov r0, r4
  12118. 80051b2: f7ff fc94 bl 8004ade <prvUnlockQueue>
  12119. ( void ) xTaskResumeAll();
  12120. 80051b6: f000 fd25 bl 8005c04 <xTaskResumeAll>
  12121. 80051ba: e009 b.n 80051d0 <xQueueReceive+0xda>
  12122. prvUnlockQueue( pxQueue );
  12123. 80051bc: 4620 mov r0, r4
  12124. 80051be: f7ff fc8e bl 8004ade <prvUnlockQueue>
  12125. ( void ) xTaskResumeAll();
  12126. 80051c2: f000 fd1f bl 8005c04 <xTaskResumeAll>
  12127. if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
  12128. 80051c6: 4620 mov r0, r4
  12129. 80051c8: f7ff fc2f bl 8004a2a <prvIsQueueEmpty>
  12130. 80051cc: 2800 cmp r0, #0
  12131. 80051ce: d13f bne.n 8005250 <xQueueReceive+0x15a>
  12132. taskENTER_CRITICAL();
  12133. 80051d0: f7ff fac0 bl 8004754 <vPortEnterCritical>
  12134. const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
  12135. 80051d4: 6ba5 ldr r5, [r4, #56] @ 0x38
  12136. if( uxMessagesWaiting > ( UBaseType_t ) 0 )
  12137. 80051d6: 2d00 cmp r5, #0
  12138. 80051d8: d1bb bne.n 8005152 <xQueueReceive+0x5c>
  12139. if( xTicksToWait == ( TickType_t ) 0 )
  12140. 80051da: 9b01 ldr r3, [sp, #4]
  12141. 80051dc: 2b00 cmp r3, #0
  12142. 80051de: d0d6 beq.n 800518e <xQueueReceive+0x98>
  12143. else if( xEntryTimeSet == pdFALSE )
  12144. 80051e0: 2e00 cmp r6, #0
  12145. 80051e2: d0d8 beq.n 8005196 <xQueueReceive+0xa0>
  12146. taskEXIT_CRITICAL();
  12147. 80051e4: f7ff fad8 bl 8004798 <vPortExitCritical>
  12148. vTaskSuspendAll();
  12149. 80051e8: f000 fc6a bl 8005ac0 <vTaskSuspendAll>
  12150. prvLockQueue( pxQueue );
  12151. 80051ec: f7ff fab2 bl 8004754 <vPortEnterCritical>
  12152. 80051f0: f894 3044 ldrb.w r3, [r4, #68] @ 0x44
  12153. 80051f4: b25b sxtb r3, r3
  12154. 80051f6: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  12155. 80051fa: d0d1 beq.n 80051a0 <xQueueReceive+0xaa>
  12156. 80051fc: f894 3045 ldrb.w r3, [r4, #69] @ 0x45
  12157. 8005200: b25b sxtb r3, r3
  12158. 8005202: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  12159. 8005206: d0cf beq.n 80051a8 <xQueueReceive+0xb2>
  12160. 8005208: f7ff fac6 bl 8004798 <vPortExitCritical>
  12161. if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
  12162. 800520c: a901 add r1, sp, #4
  12163. 800520e: a802 add r0, sp, #8
  12164. 8005210: f000 fe80 bl 8005f14 <xTaskCheckForTimeOut>
  12165. 8005214: 2800 cmp r0, #0
  12166. 8005216: d1d1 bne.n 80051bc <xQueueReceive+0xc6>
  12167. if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
  12168. 8005218: 4620 mov r0, r4
  12169. 800521a: f7ff fc06 bl 8004a2a <prvIsQueueEmpty>
  12170. 800521e: 2800 cmp r0, #0
  12171. 8005220: d0c6 beq.n 80051b0 <xQueueReceive+0xba>
  12172. vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
  12173. 8005222: 9901 ldr r1, [sp, #4]
  12174. 8005224: f104 0024 add.w r0, r4, #36 @ 0x24
  12175. 8005228: f000 fdee bl 8005e08 <vTaskPlaceOnEventList>
  12176. prvUnlockQueue( pxQueue );
  12177. 800522c: 4620 mov r0, r4
  12178. 800522e: f7ff fc56 bl 8004ade <prvUnlockQueue>
  12179. if( xTaskResumeAll() == pdFALSE )
  12180. 8005232: f000 fce7 bl 8005c04 <xTaskResumeAll>
  12181. 8005236: 2800 cmp r0, #0
  12182. 8005238: d1ca bne.n 80051d0 <xQueueReceive+0xda>
  12183. portYIELD_WITHIN_API();
  12184. 800523a: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  12185. 800523e: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  12186. 8005242: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  12187. 8005246: f3bf 8f4f dsb sy
  12188. 800524a: f3bf 8f6f isb sy
  12189. 800524e: e7bf b.n 80051d0 <xQueueReceive+0xda>
  12190. return errQUEUE_EMPTY;
  12191. 8005250: 2000 movs r0, #0
  12192. 8005252: e789 b.n 8005168 <xQueueReceive+0x72>
  12193. 08005254 <xQueueSemaphoreTake>:
  12194. {
  12195. 8005254: b570 push {r4, r5, r6, lr}
  12196. 8005256: b084 sub sp, #16
  12197. 8005258: 9101 str r1, [sp, #4]
  12198. configASSERT( ( pxQueue ) );
  12199. 800525a: b158 cbz r0, 8005274 <xQueueSemaphoreTake+0x20>
  12200. 800525c: 4604 mov r4, r0
  12201. configASSERT( pxQueue->uxItemSize == 0 );
  12202. 800525e: 6c03 ldr r3, [r0, #64] @ 0x40
  12203. 8005260: b18b cbz r3, 8005286 <xQueueSemaphoreTake+0x32>
  12204. 8005262: f04f 0350 mov.w r3, #80 @ 0x50
  12205. 8005266: f383 8811 msr BASEPRI, r3
  12206. 800526a: f3bf 8f6f isb sy
  12207. 800526e: f3bf 8f4f dsb sy
  12208. 8005272: e7fe b.n 8005272 <xQueueSemaphoreTake+0x1e>
  12209. 8005274: f04f 0350 mov.w r3, #80 @ 0x50
  12210. 8005278: f383 8811 msr BASEPRI, r3
  12211. 800527c: f3bf 8f6f isb sy
  12212. 8005280: f3bf 8f4f dsb sy
  12213. configASSERT( ( pxQueue ) );
  12214. 8005284: e7fe b.n 8005284 <xQueueSemaphoreTake+0x30>
  12215. configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
  12216. 8005286: f000 fe93 bl 8005fb0 <xTaskGetSchedulerState>
  12217. 800528a: 4605 mov r5, r0
  12218. 800528c: b950 cbnz r0, 80052a4 <xQueueSemaphoreTake+0x50>
  12219. 800528e: 9b01 ldr r3, [sp, #4]
  12220. 8005290: b15b cbz r3, 80052aa <xQueueSemaphoreTake+0x56>
  12221. 8005292: f04f 0350 mov.w r3, #80 @ 0x50
  12222. 8005296: f383 8811 msr BASEPRI, r3
  12223. 800529a: f3bf 8f6f isb sy
  12224. 800529e: f3bf 8f4f dsb sy
  12225. 80052a2: e7fe b.n 80052a2 <xQueueSemaphoreTake+0x4e>
  12226. 80052a4: 2600 movs r6, #0
  12227. 80052a6: 4635 mov r5, r6
  12228. 80052a8: e055 b.n 8005356 <xQueueSemaphoreTake+0x102>
  12229. 80052aa: 4606 mov r6, r0
  12230. 80052ac: e053 b.n 8005356 <xQueueSemaphoreTake+0x102>
  12231. pxQueue->uxMessagesWaiting = uxSemaphoreCount - ( UBaseType_t ) 1;
  12232. 80052ae: 3b01 subs r3, #1
  12233. 80052b0: 63a3 str r3, [r4, #56] @ 0x38
  12234. if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
  12235. 80052b2: 6823 ldr r3, [r4, #0]
  12236. 80052b4: b13b cbz r3, 80052c6 <xQueueSemaphoreTake+0x72>
  12237. if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
  12238. 80052b6: 6923 ldr r3, [r4, #16]
  12239. 80052b8: b94b cbnz r3, 80052ce <xQueueSemaphoreTake+0x7a>
  12240. taskEXIT_CRITICAL();
  12241. 80052ba: f7ff fa6d bl 8004798 <vPortExitCritical>
  12242. return pdPASS;
  12243. 80052be: 2601 movs r6, #1
  12244. }
  12245. 80052c0: 4630 mov r0, r6
  12246. 80052c2: b004 add sp, #16
  12247. 80052c4: bd70 pop {r4, r5, r6, pc}
  12248. pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount();
  12249. 80052c6: f000 ff67 bl 8006198 <pvTaskIncrementMutexHeldCount>
  12250. 80052ca: 60a0 str r0, [r4, #8]
  12251. 80052cc: e7f3 b.n 80052b6 <xQueueSemaphoreTake+0x62>
  12252. if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
  12253. 80052ce: f104 0010 add.w r0, r4, #16
  12254. 80052d2: f000 fdcd bl 8005e70 <xTaskRemoveFromEventList>
  12255. 80052d6: 2800 cmp r0, #0
  12256. 80052d8: d0ef beq.n 80052ba <xQueueSemaphoreTake+0x66>
  12257. queueYIELD_IF_USING_PREEMPTION();
  12258. 80052da: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  12259. 80052de: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  12260. 80052e2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  12261. 80052e6: f3bf 8f4f dsb sy
  12262. 80052ea: f3bf 8f6f isb sy
  12263. 80052ee: e7e4 b.n 80052ba <xQueueSemaphoreTake+0x66>
  12264. configASSERT( xInheritanceOccurred == pdFALSE );
  12265. 80052f0: b146 cbz r6, 8005304 <xQueueSemaphoreTake+0xb0>
  12266. 80052f2: f04f 0350 mov.w r3, #80 @ 0x50
  12267. 80052f6: f383 8811 msr BASEPRI, r3
  12268. 80052fa: f3bf 8f6f isb sy
  12269. 80052fe: f3bf 8f4f dsb sy
  12270. 8005302: e7fe b.n 8005302 <xQueueSemaphoreTake+0xae>
  12271. taskEXIT_CRITICAL();
  12272. 8005304: f7ff fa48 bl 8004798 <vPortExitCritical>
  12273. return errQUEUE_EMPTY;
  12274. 8005308: e7da b.n 80052c0 <xQueueSemaphoreTake+0x6c>
  12275. vTaskInternalSetTimeOutState( &xTimeOut );
  12276. 800530a: a802 add r0, sp, #8
  12277. 800530c: f000 fdf6 bl 8005efc <vTaskInternalSetTimeOutState>
  12278. xEntryTimeSet = pdTRUE;
  12279. 8005310: 2501 movs r5, #1
  12280. 8005312: e02a b.n 800536a <xQueueSemaphoreTake+0x116>
  12281. prvLockQueue( pxQueue );
  12282. 8005314: 2300 movs r3, #0
  12283. 8005316: f884 3044 strb.w r3, [r4, #68] @ 0x44
  12284. 800531a: e032 b.n 8005382 <xQueueSemaphoreTake+0x12e>
  12285. 800531c: 2300 movs r3, #0
  12286. 800531e: f884 3045 strb.w r3, [r4, #69] @ 0x45
  12287. 8005322: e034 b.n 800538e <xQueueSemaphoreTake+0x13a>
  12288. taskENTER_CRITICAL();
  12289. 8005324: f7ff fa16 bl 8004754 <vPortEnterCritical>
  12290. xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder );
  12291. 8005328: 68a0 ldr r0, [r4, #8]
  12292. 800532a: f000 fe51 bl 8005fd0 <xTaskPriorityInherit>
  12293. 800532e: 4606 mov r6, r0
  12294. taskEXIT_CRITICAL();
  12295. 8005330: f7ff fa32 bl 8004798 <vPortExitCritical>
  12296. 8005334: e03b b.n 80053ae <xQueueSemaphoreTake+0x15a>
  12297. prvUnlockQueue( pxQueue );
  12298. 8005336: 4620 mov r0, r4
  12299. 8005338: f7ff fbd1 bl 8004ade <prvUnlockQueue>
  12300. ( void ) xTaskResumeAll();
  12301. 800533c: f000 fc62 bl 8005c04 <xTaskResumeAll>
  12302. 8005340: e009 b.n 8005356 <xQueueSemaphoreTake+0x102>
  12303. prvUnlockQueue( pxQueue );
  12304. 8005342: 4620 mov r0, r4
  12305. 8005344: f7ff fbcb bl 8004ade <prvUnlockQueue>
  12306. ( void ) xTaskResumeAll();
  12307. 8005348: f000 fc5c bl 8005c04 <xTaskResumeAll>
  12308. if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
  12309. 800534c: 4620 mov r0, r4
  12310. 800534e: f7ff fb6c bl 8004a2a <prvIsQueueEmpty>
  12311. 8005352: 2800 cmp r0, #0
  12312. 8005354: d142 bne.n 80053dc <xQueueSemaphoreTake+0x188>
  12313. taskENTER_CRITICAL();
  12314. 8005356: f7ff f9fd bl 8004754 <vPortEnterCritical>
  12315. const UBaseType_t uxSemaphoreCount = pxQueue->uxMessagesWaiting;
  12316. 800535a: 6ba3 ldr r3, [r4, #56] @ 0x38
  12317. if( uxSemaphoreCount > ( UBaseType_t ) 0 )
  12318. 800535c: 2b00 cmp r3, #0
  12319. 800535e: d1a6 bne.n 80052ae <xQueueSemaphoreTake+0x5a>
  12320. if( xTicksToWait == ( TickType_t ) 0 )
  12321. 8005360: 9b01 ldr r3, [sp, #4]
  12322. 8005362: 2b00 cmp r3, #0
  12323. 8005364: d0c4 beq.n 80052f0 <xQueueSemaphoreTake+0x9c>
  12324. else if( xEntryTimeSet == pdFALSE )
  12325. 8005366: 2d00 cmp r5, #0
  12326. 8005368: d0cf beq.n 800530a <xQueueSemaphoreTake+0xb6>
  12327. taskEXIT_CRITICAL();
  12328. 800536a: f7ff fa15 bl 8004798 <vPortExitCritical>
  12329. vTaskSuspendAll();
  12330. 800536e: f000 fba7 bl 8005ac0 <vTaskSuspendAll>
  12331. prvLockQueue( pxQueue );
  12332. 8005372: f7ff f9ef bl 8004754 <vPortEnterCritical>
  12333. 8005376: f894 3044 ldrb.w r3, [r4, #68] @ 0x44
  12334. 800537a: b25b sxtb r3, r3
  12335. 800537c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  12336. 8005380: d0c8 beq.n 8005314 <xQueueSemaphoreTake+0xc0>
  12337. 8005382: f894 3045 ldrb.w r3, [r4, #69] @ 0x45
  12338. 8005386: b25b sxtb r3, r3
  12339. 8005388: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  12340. 800538c: d0c6 beq.n 800531c <xQueueSemaphoreTake+0xc8>
  12341. 800538e: f7ff fa03 bl 8004798 <vPortExitCritical>
  12342. if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE )
  12343. 8005392: a901 add r1, sp, #4
  12344. 8005394: a802 add r0, sp, #8
  12345. 8005396: f000 fdbd bl 8005f14 <xTaskCheckForTimeOut>
  12346. 800539a: 2800 cmp r0, #0
  12347. 800539c: d1d1 bne.n 8005342 <xQueueSemaphoreTake+0xee>
  12348. if( prvIsQueueEmpty( pxQueue ) != pdFALSE )
  12349. 800539e: 4620 mov r0, r4
  12350. 80053a0: f7ff fb43 bl 8004a2a <prvIsQueueEmpty>
  12351. 80053a4: 2800 cmp r0, #0
  12352. 80053a6: d0c6 beq.n 8005336 <xQueueSemaphoreTake+0xe2>
  12353. if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX )
  12354. 80053a8: 6823 ldr r3, [r4, #0]
  12355. 80053aa: 2b00 cmp r3, #0
  12356. 80053ac: d0ba beq.n 8005324 <xQueueSemaphoreTake+0xd0>
  12357. vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait );
  12358. 80053ae: 9901 ldr r1, [sp, #4]
  12359. 80053b0: f104 0024 add.w r0, r4, #36 @ 0x24
  12360. 80053b4: f000 fd28 bl 8005e08 <vTaskPlaceOnEventList>
  12361. prvUnlockQueue( pxQueue );
  12362. 80053b8: 4620 mov r0, r4
  12363. 80053ba: f7ff fb90 bl 8004ade <prvUnlockQueue>
  12364. if( xTaskResumeAll() == pdFALSE )
  12365. 80053be: f000 fc21 bl 8005c04 <xTaskResumeAll>
  12366. 80053c2: 2800 cmp r0, #0
  12367. 80053c4: d1c7 bne.n 8005356 <xQueueSemaphoreTake+0x102>
  12368. portYIELD_WITHIN_API();
  12369. 80053c6: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  12370. 80053ca: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  12371. 80053ce: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  12372. 80053d2: f3bf 8f4f dsb sy
  12373. 80053d6: f3bf 8f6f isb sy
  12374. 80053da: e7bc b.n 8005356 <xQueueSemaphoreTake+0x102>
  12375. if( xInheritanceOccurred != pdFALSE )
  12376. 80053dc: b90e cbnz r6, 80053e2 <xQueueSemaphoreTake+0x18e>
  12377. return errQUEUE_EMPTY;
  12378. 80053de: 2600 movs r6, #0
  12379. 80053e0: e76e b.n 80052c0 <xQueueSemaphoreTake+0x6c>
  12380. taskENTER_CRITICAL();
  12381. 80053e2: f7ff f9b7 bl 8004754 <vPortEnterCritical>
  12382. uxHighestWaitingPriority = prvGetDisinheritPriorityAfterTimeout( pxQueue );
  12383. 80053e6: 4620 mov r0, r4
  12384. 80053e8: f7ff fb08 bl 80049fc <prvGetDisinheritPriorityAfterTimeout>
  12385. 80053ec: 4601 mov r1, r0
  12386. vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority );
  12387. 80053ee: 68a0 ldr r0, [r4, #8]
  12388. 80053f0: f000 fe82 bl 80060f8 <vTaskPriorityDisinheritAfterTimeout>
  12389. taskEXIT_CRITICAL();
  12390. 80053f4: f7ff f9d0 bl 8004798 <vPortExitCritical>
  12391. 80053f8: e7f1 b.n 80053de <xQueueSemaphoreTake+0x18a>
  12392. 080053fa <xQueueTakeMutexRecursive>:
  12393. configASSERT( pxMutex );
  12394. 80053fa: b180 cbz r0, 800541e <xQueueTakeMutexRecursive+0x24>
  12395. {
  12396. 80053fc: b570 push {r4, r5, r6, lr}
  12397. 80053fe: 460c mov r4, r1
  12398. 8005400: 4605 mov r5, r0
  12399. if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() )
  12400. 8005402: 6886 ldr r6, [r0, #8]
  12401. 8005404: f000 fdce bl 8005fa4 <xTaskGetCurrentTaskHandle>
  12402. 8005408: 4286 cmp r6, r0
  12403. 800540a: d011 beq.n 8005430 <xQueueTakeMutexRecursive+0x36>
  12404. xReturn = xQueueSemaphoreTake( pxMutex, xTicksToWait );
  12405. 800540c: 4621 mov r1, r4
  12406. 800540e: 4628 mov r0, r5
  12407. 8005410: f7ff ff20 bl 8005254 <xQueueSemaphoreTake>
  12408. if( xReturn != pdFAIL )
  12409. 8005414: b180 cbz r0, 8005438 <xQueueTakeMutexRecursive+0x3e>
  12410. ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++;
  12411. 8005416: 68eb ldr r3, [r5, #12]
  12412. 8005418: 3301 adds r3, #1
  12413. 800541a: 60eb str r3, [r5, #12]
  12414. return xReturn;
  12415. 800541c: e00c b.n 8005438 <xQueueTakeMutexRecursive+0x3e>
  12416. 800541e: f04f 0350 mov.w r3, #80 @ 0x50
  12417. 8005422: f383 8811 msr BASEPRI, r3
  12418. 8005426: f3bf 8f6f isb sy
  12419. 800542a: f3bf 8f4f dsb sy
  12420. configASSERT( pxMutex );
  12421. 800542e: e7fe b.n 800542e <xQueueTakeMutexRecursive+0x34>
  12422. ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++;
  12423. 8005430: 68eb ldr r3, [r5, #12]
  12424. 8005432: 3301 adds r3, #1
  12425. 8005434: 60eb str r3, [r5, #12]
  12426. xReturn = pdPASS;
  12427. 8005436: 2001 movs r0, #1
  12428. }
  12429. 8005438: bd70 pop {r4, r5, r6, pc}
  12430. 0800543a <xQueueReceiveFromISR>:
  12431. {
  12432. 800543a: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  12433. configASSERT( pxQueue );
  12434. 800543e: b1b0 cbz r0, 800546e <xQueueReceiveFromISR+0x34>
  12435. 8005440: 460d mov r5, r1
  12436. 8005442: 4690 mov r8, r2
  12437. 8005444: 4604 mov r4, r0
  12438. configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
  12439. 8005446: b1d9 cbz r1, 8005480 <xQueueReceiveFromISR+0x46>
  12440. portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
  12441. 8005448: f7ff faaa bl 80049a0 <vPortValidateInterruptPriority>
  12442. __asm volatile
  12443. 800544c: f3ef 8711 mrs r7, BASEPRI
  12444. 8005450: f04f 0350 mov.w r3, #80 @ 0x50
  12445. 8005454: f383 8811 msr BASEPRI, r3
  12446. 8005458: f3bf 8f6f isb sy
  12447. 800545c: f3bf 8f4f dsb sy
  12448. const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting;
  12449. 8005460: 6ba6 ldr r6, [r4, #56] @ 0x38
  12450. if( uxMessagesWaiting > ( UBaseType_t ) 0 )
  12451. 8005462: b9ce cbnz r6, 8005498 <xQueueReceiveFromISR+0x5e>
  12452. xReturn = pdFAIL;
  12453. 8005464: 2000 movs r0, #0
  12454. __asm volatile
  12455. 8005466: f387 8811 msr BASEPRI, r7
  12456. }
  12457. 800546a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  12458. __asm volatile
  12459. 800546e: f04f 0350 mov.w r3, #80 @ 0x50
  12460. 8005472: f383 8811 msr BASEPRI, r3
  12461. 8005476: f3bf 8f6f isb sy
  12462. 800547a: f3bf 8f4f dsb sy
  12463. configASSERT( pxQueue );
  12464. 800547e: e7fe b.n 800547e <xQueueReceiveFromISR+0x44>
  12465. configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );
  12466. 8005480: 6c03 ldr r3, [r0, #64] @ 0x40
  12467. 8005482: 2b00 cmp r3, #0
  12468. 8005484: d0e0 beq.n 8005448 <xQueueReceiveFromISR+0xe>
  12469. 8005486: f04f 0350 mov.w r3, #80 @ 0x50
  12470. 800548a: f383 8811 msr BASEPRI, r3
  12471. 800548e: f3bf 8f6f isb sy
  12472. 8005492: f3bf 8f4f dsb sy
  12473. 8005496: e7fe b.n 8005496 <xQueueReceiveFromISR+0x5c>
  12474. const int8_t cRxLock = pxQueue->cRxLock;
  12475. 8005498: f894 9044 ldrb.w r9, [r4, #68] @ 0x44
  12476. 800549c: fa4f f989 sxtb.w r9, r9
  12477. prvCopyDataFromQueue( pxQueue, pvBuffer );
  12478. 80054a0: 4629 mov r1, r5
  12479. 80054a2: 4620 mov r0, r4
  12480. 80054a4: f7ff fb09 bl 8004aba <prvCopyDataFromQueue>
  12481. pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1;
  12482. 80054a8: 1e73 subs r3, r6, #1
  12483. 80054aa: 63a3 str r3, [r4, #56] @ 0x38
  12484. if( cRxLock == queueUNLOCKED )
  12485. 80054ac: f1b9 3fff cmp.w r9, #4294967295 @ 0xffffffff
  12486. 80054b0: d006 beq.n 80054c0 <xQueueReceiveFromISR+0x86>
  12487. pxQueue->cRxLock = ( int8_t ) ( cRxLock + 1 );
  12488. 80054b2: f109 0301 add.w r3, r9, #1
  12489. 80054b6: b25b sxtb r3, r3
  12490. 80054b8: f884 3044 strb.w r3, [r4, #68] @ 0x44
  12491. xReturn = pdPASS;
  12492. 80054bc: 2001 movs r0, #1
  12493. 80054be: e7d2 b.n 8005466 <xQueueReceiveFromISR+0x2c>
  12494. if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE )
  12495. 80054c0: 6923 ldr r3, [r4, #16]
  12496. 80054c2: b90b cbnz r3, 80054c8 <xQueueReceiveFromISR+0x8e>
  12497. xReturn = pdPASS;
  12498. 80054c4: 2001 movs r0, #1
  12499. 80054c6: e7ce b.n 8005466 <xQueueReceiveFromISR+0x2c>
  12500. if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE )
  12501. 80054c8: f104 0010 add.w r0, r4, #16
  12502. 80054cc: f000 fcd0 bl 8005e70 <xTaskRemoveFromEventList>
  12503. 80054d0: b130 cbz r0, 80054e0 <xQueueReceiveFromISR+0xa6>
  12504. if( pxHigherPriorityTaskWoken != NULL )
  12505. 80054d2: f1b8 0f00 cmp.w r8, #0
  12506. 80054d6: d005 beq.n 80054e4 <xQueueReceiveFromISR+0xaa>
  12507. *pxHigherPriorityTaskWoken = pdTRUE;
  12508. 80054d8: 2001 movs r0, #1
  12509. 80054da: f8c8 0000 str.w r0, [r8]
  12510. 80054de: e7c2 b.n 8005466 <xQueueReceiveFromISR+0x2c>
  12511. xReturn = pdPASS;
  12512. 80054e0: 2001 movs r0, #1
  12513. 80054e2: e7c0 b.n 8005466 <xQueueReceiveFromISR+0x2c>
  12514. 80054e4: 2001 movs r0, #1
  12515. 80054e6: e7be b.n 8005466 <xQueueReceiveFromISR+0x2c>
  12516. 080054e8 <uxQueueMessagesWaiting>:
  12517. configASSERT( xQueue );
  12518. 80054e8: b140 cbz r0, 80054fc <uxQueueMessagesWaiting+0x14>
  12519. {
  12520. 80054ea: b510 push {r4, lr}
  12521. 80054ec: 4604 mov r4, r0
  12522. taskENTER_CRITICAL();
  12523. 80054ee: f7ff f931 bl 8004754 <vPortEnterCritical>
  12524. uxReturn = ( ( Queue_t * ) xQueue )->uxMessagesWaiting;
  12525. 80054f2: 6ba4 ldr r4, [r4, #56] @ 0x38
  12526. taskEXIT_CRITICAL();
  12527. 80054f4: f7ff f950 bl 8004798 <vPortExitCritical>
  12528. } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
  12529. 80054f8: 4620 mov r0, r4
  12530. 80054fa: bd10 pop {r4, pc}
  12531. 80054fc: f04f 0350 mov.w r3, #80 @ 0x50
  12532. 8005500: f383 8811 msr BASEPRI, r3
  12533. 8005504: f3bf 8f6f isb sy
  12534. 8005508: f3bf 8f4f dsb sy
  12535. configASSERT( xQueue );
  12536. 800550c: e7fe b.n 800550c <uxQueueMessagesWaiting+0x24>
  12537. 0800550e <uxQueueMessagesWaitingFromISR>:
  12538. configASSERT( pxQueue );
  12539. 800550e: b108 cbz r0, 8005514 <uxQueueMessagesWaitingFromISR+0x6>
  12540. uxReturn = pxQueue->uxMessagesWaiting;
  12541. 8005510: 6b80 ldr r0, [r0, #56] @ 0x38
  12542. } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */
  12543. 8005512: 4770 bx lr
  12544. 8005514: f04f 0350 mov.w r3, #80 @ 0x50
  12545. 8005518: f383 8811 msr BASEPRI, r3
  12546. 800551c: f3bf 8f6f isb sy
  12547. 8005520: f3bf 8f4f dsb sy
  12548. configASSERT( pxQueue );
  12549. 8005524: e7fe b.n 8005524 <uxQueueMessagesWaitingFromISR+0x16>
  12550. ...
  12551. 08005528 <vQueueAddToRegistry>:
  12552. {
  12553. UBaseType_t ux;
  12554. /* See if there is an empty space in the registry. A NULL name denotes
  12555. a free slot. */
  12556. for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
  12557. 8005528: 2300 movs r3, #0
  12558. 800552a: 2b07 cmp r3, #7
  12559. 800552c: d80c bhi.n 8005548 <vQueueAddToRegistry+0x20>
  12560. {
  12561. if( xQueueRegistry[ ux ].pcQueueName == NULL )
  12562. 800552e: 4a07 ldr r2, [pc, #28] @ (800554c <vQueueAddToRegistry+0x24>)
  12563. 8005530: f852 2033 ldr.w r2, [r2, r3, lsl #3]
  12564. 8005534: b10a cbz r2, 800553a <vQueueAddToRegistry+0x12>
  12565. for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
  12566. 8005536: 3301 adds r3, #1
  12567. 8005538: e7f7 b.n 800552a <vQueueAddToRegistry+0x2>
  12568. {
  12569. /* Store the information on this queue. */
  12570. xQueueRegistry[ ux ].pcQueueName = pcQueueName;
  12571. 800553a: 4a04 ldr r2, [pc, #16] @ (800554c <vQueueAddToRegistry+0x24>)
  12572. 800553c: f842 1033 str.w r1, [r2, r3, lsl #3]
  12573. xQueueRegistry[ ux ].xHandle = xQueue;
  12574. 8005540: eb02 02c3 add.w r2, r2, r3, lsl #3
  12575. 8005544: 6050 str r0, [r2, #4]
  12576. traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName );
  12577. break;
  12578. 8005546: 4770 bx lr
  12579. else
  12580. {
  12581. mtCOVERAGE_TEST_MARKER();
  12582. }
  12583. }
  12584. }
  12585. 8005548: 4770 bx lr
  12586. 800554a: bf00 nop
  12587. 800554c: 24012888 .word 0x24012888
  12588. 08005550 <vQueueUnregisterQueue>:
  12589. {
  12590. UBaseType_t ux;
  12591. /* See if the handle of the queue being unregistered in actually in the
  12592. registry. */
  12593. for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
  12594. 8005550: 2300 movs r3, #0
  12595. 8005552: 2b07 cmp r3, #7
  12596. 8005554: d80f bhi.n 8005576 <vQueueUnregisterQueue+0x26>
  12597. {
  12598. if( xQueueRegistry[ ux ].xHandle == xQueue )
  12599. 8005556: 4a08 ldr r2, [pc, #32] @ (8005578 <vQueueUnregisterQueue+0x28>)
  12600. 8005558: eb02 02c3 add.w r2, r2, r3, lsl #3
  12601. 800555c: 6852 ldr r2, [r2, #4]
  12602. 800555e: 4282 cmp r2, r0
  12603. 8005560: d001 beq.n 8005566 <vQueueUnregisterQueue+0x16>
  12604. for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ )
  12605. 8005562: 3301 adds r3, #1
  12606. 8005564: e7f5 b.n 8005552 <vQueueUnregisterQueue+0x2>
  12607. {
  12608. /* Set the name to NULL to show that this slot if free again. */
  12609. xQueueRegistry[ ux ].pcQueueName = NULL;
  12610. 8005566: 4a04 ldr r2, [pc, #16] @ (8005578 <vQueueUnregisterQueue+0x28>)
  12611. 8005568: 2100 movs r1, #0
  12612. 800556a: f842 1033 str.w r1, [r2, r3, lsl #3]
  12613. /* Set the handle to NULL to ensure the same queue handle cannot
  12614. appear in the registry twice if it is added, removed, then
  12615. added again. */
  12616. xQueueRegistry[ ux ].xHandle = ( QueueHandle_t ) 0;
  12617. 800556e: eb02 02c3 add.w r2, r2, r3, lsl #3
  12618. 8005572: 6051 str r1, [r2, #4]
  12619. break;
  12620. 8005574: 4770 bx lr
  12621. {
  12622. mtCOVERAGE_TEST_MARKER();
  12623. }
  12624. }
  12625. } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */
  12626. 8005576: 4770 bx lr
  12627. 8005578: 24012888 .word 0x24012888
  12628. 0800557c <vQueueDelete>:
  12629. configASSERT( pxQueue );
  12630. 800557c: b138 cbz r0, 800558e <vQueueDelete+0x12>
  12631. {
  12632. 800557e: b510 push {r4, lr}
  12633. 8005580: 4604 mov r4, r0
  12634. vQueueUnregisterQueue( pxQueue );
  12635. 8005582: f7ff ffe5 bl 8005550 <vQueueUnregisterQueue>
  12636. if( pxQueue->ucStaticallyAllocated == ( uint8_t ) pdFALSE )
  12637. 8005586: f894 3046 ldrb.w r3, [r4, #70] @ 0x46
  12638. 800558a: b14b cbz r3, 80055a0 <vQueueDelete+0x24>
  12639. }
  12640. 800558c: bd10 pop {r4, pc}
  12641. 800558e: f04f 0350 mov.w r3, #80 @ 0x50
  12642. 8005592: f383 8811 msr BASEPRI, r3
  12643. 8005596: f3bf 8f6f isb sy
  12644. 800559a: f3bf 8f4f dsb sy
  12645. configASSERT( pxQueue );
  12646. 800559e: e7fe b.n 800559e <vQueueDelete+0x22>
  12647. vPortFree( pxQueue );
  12648. 80055a0: 4620 mov r0, r4
  12649. 80055a2: f7fe ffe9 bl 8004578 <vPortFree>
  12650. }
  12651. 80055a6: e7f1 b.n 800558c <vQueueDelete+0x10>
  12652. 080055a8 <vQueueWaitForMessageRestricted>:
  12653. /*-----------------------------------------------------------*/
  12654. #if ( configUSE_TIMERS == 1 )
  12655. void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely )
  12656. {
  12657. 80055a8: b570 push {r4, r5, r6, lr}
  12658. 80055aa: 4604 mov r4, r0
  12659. 80055ac: 460d mov r5, r1
  12660. 80055ae: 4616 mov r6, r2
  12661. will not actually cause the task to block, just place it on a blocked
  12662. list. It will not block until the scheduler is unlocked - at which
  12663. time a yield will be performed. If an item is added to the queue while
  12664. the queue is locked, and the calling task blocks on the queue, then the
  12665. calling task will be immediately unblocked when the queue is unlocked. */
  12666. prvLockQueue( pxQueue );
  12667. 80055b0: f7ff f8d0 bl 8004754 <vPortEnterCritical>
  12668. 80055b4: f894 3044 ldrb.w r3, [r4, #68] @ 0x44
  12669. 80055b8: b25b sxtb r3, r3
  12670. 80055ba: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  12671. 80055be: d00d beq.n 80055dc <vQueueWaitForMessageRestricted+0x34>
  12672. 80055c0: f894 3045 ldrb.w r3, [r4, #69] @ 0x45
  12673. 80055c4: b25b sxtb r3, r3
  12674. 80055c6: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  12675. 80055ca: d00b beq.n 80055e4 <vQueueWaitForMessageRestricted+0x3c>
  12676. 80055cc: f7ff f8e4 bl 8004798 <vPortExitCritical>
  12677. if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U )
  12678. 80055d0: 6ba3 ldr r3, [r4, #56] @ 0x38
  12679. 80055d2: b15b cbz r3, 80055ec <vQueueWaitForMessageRestricted+0x44>
  12680. }
  12681. else
  12682. {
  12683. mtCOVERAGE_TEST_MARKER();
  12684. }
  12685. prvUnlockQueue( pxQueue );
  12686. 80055d4: 4620 mov r0, r4
  12687. 80055d6: f7ff fa82 bl 8004ade <prvUnlockQueue>
  12688. }
  12689. 80055da: bd70 pop {r4, r5, r6, pc}
  12690. prvLockQueue( pxQueue );
  12691. 80055dc: 2300 movs r3, #0
  12692. 80055de: f884 3044 strb.w r3, [r4, #68] @ 0x44
  12693. 80055e2: e7ed b.n 80055c0 <vQueueWaitForMessageRestricted+0x18>
  12694. 80055e4: 2300 movs r3, #0
  12695. 80055e6: f884 3045 strb.w r3, [r4, #69] @ 0x45
  12696. 80055ea: e7ef b.n 80055cc <vQueueWaitForMessageRestricted+0x24>
  12697. vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait, xWaitIndefinitely );
  12698. 80055ec: 4632 mov r2, r6
  12699. 80055ee: 4629 mov r1, r5
  12700. 80055f0: f104 0024 add.w r0, r4, #36 @ 0x24
  12701. 80055f4: f000 fc20 bl 8005e38 <vTaskPlaceOnEventListRestricted>
  12702. 80055f8: e7ec b.n 80055d4 <vQueueWaitForMessageRestricted+0x2c>
  12703. ...
  12704. 080055fc <prvResetNextTaskUnblockTime>:
  12705. static void prvResetNextTaskUnblockTime( void )
  12706. {
  12707. TCB_t *pxTCB;
  12708. if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
  12709. 80055fc: 4b08 ldr r3, [pc, #32] @ (8005620 <prvResetNextTaskUnblockTime+0x24>)
  12710. 80055fe: 681b ldr r3, [r3, #0]
  12711. 8005600: 681b ldr r3, [r3, #0]
  12712. 8005602: b923 cbnz r3, 800560e <prvResetNextTaskUnblockTime+0x12>
  12713. {
  12714. /* The new current delayed list is empty. Set xNextTaskUnblockTime to
  12715. the maximum possible value so it is extremely unlikely that the
  12716. if( xTickCount >= xNextTaskUnblockTime ) test will pass until
  12717. there is an item in the delayed list. */
  12718. xNextTaskUnblockTime = portMAX_DELAY;
  12719. 8005604: 4b07 ldr r3, [pc, #28] @ (8005624 <prvResetNextTaskUnblockTime+0x28>)
  12720. 8005606: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
  12721. 800560a: 601a str r2, [r3, #0]
  12722. 800560c: 4770 bx lr
  12723. {
  12724. /* The new current delayed list is not empty, get the value of
  12725. the item at the head of the delayed list. This is the time at
  12726. which the task at the head of the delayed list should be removed
  12727. from the Blocked state. */
  12728. ( pxTCB ) = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  12729. 800560e: 4b04 ldr r3, [pc, #16] @ (8005620 <prvResetNextTaskUnblockTime+0x24>)
  12730. 8005610: 681b ldr r3, [r3, #0]
  12731. 8005612: 68db ldr r3, [r3, #12]
  12732. 8005614: 68db ldr r3, [r3, #12]
  12733. xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) );
  12734. 8005616: 685a ldr r2, [r3, #4]
  12735. 8005618: 4b02 ldr r3, [pc, #8] @ (8005624 <prvResetNextTaskUnblockTime+0x28>)
  12736. 800561a: 601a str r2, [r3, #0]
  12737. }
  12738. }
  12739. 800561c: 4770 bx lr
  12740. 800561e: bf00 nop
  12741. 8005620: 24012938 .word 0x24012938
  12742. 8005624: 240128d0 .word 0x240128d0
  12743. 08005628 <prvInitialiseNewTask>:
  12744. {
  12745. 8005628: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  12746. 800562c: 4680 mov r8, r0
  12747. 800562e: 460d mov r5, r1
  12748. 8005630: 4617 mov r7, r2
  12749. 8005632: 4699 mov r9, r3
  12750. 8005634: 9e08 ldr r6, [sp, #32]
  12751. 8005636: f8dd a024 ldr.w sl, [sp, #36] @ 0x24
  12752. 800563a: 9c0a ldr r4, [sp, #40] @ 0x28
  12753. ( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
  12754. 800563c: 0092 lsls r2, r2, #2
  12755. 800563e: 21a5 movs r1, #165 @ 0xa5
  12756. 8005640: 6b20 ldr r0, [r4, #48] @ 0x30
  12757. 8005642: f00e f839 bl 80136b8 <memset>
  12758. pxTopOfStack = &( pxNewTCB->pxStack[ ulStackDepth - ( uint32_t ) 1 ] );
  12759. 8005646: 6b23 ldr r3, [r4, #48] @ 0x30
  12760. 8005648: f06f 4240 mvn.w r2, #3221225472 @ 0xc0000000
  12761. 800564c: 443a add r2, r7
  12762. 800564e: eb03 0782 add.w r7, r3, r2, lsl #2
  12763. pxTopOfStack = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) ); /*lint !e923 !e9033 !e9078 MISRA exception. Avoiding casts between pointers and integers is not practical. Size differences accounted for using portPOINTER_SIZE_TYPE type. Checked by assert(). */
  12764. 8005652: f027 0707 bic.w r7, r7, #7
  12765. if( pcName != NULL )
  12766. 8005656: 2d00 cmp r5, #0
  12767. 8005658: d042 beq.n 80056e0 <prvInitialiseNewTask+0xb8>
  12768. for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
  12769. 800565a: f04f 0c00 mov.w ip, #0
  12770. 800565e: f1bc 0f0f cmp.w ip, #15
  12771. 8005662: d809 bhi.n 8005678 <prvInitialiseNewTask+0x50>
  12772. pxNewTCB->pcTaskName[ x ] = pcName[ x ];
  12773. 8005664: f815 300c ldrb.w r3, [r5, ip]
  12774. 8005668: eb04 020c add.w r2, r4, ip
  12775. 800566c: f882 3034 strb.w r3, [r2, #52] @ 0x34
  12776. if( pcName[ x ] == ( char ) 0x00 )
  12777. 8005670: b113 cbz r3, 8005678 <prvInitialiseNewTask+0x50>
  12778. for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ )
  12779. 8005672: f10c 0c01 add.w ip, ip, #1
  12780. 8005676: e7f2 b.n 800565e <prvInitialiseNewTask+0x36>
  12781. pxNewTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0';
  12782. 8005678: 2300 movs r3, #0
  12783. 800567a: f884 3043 strb.w r3, [r4, #67] @ 0x43
  12784. if( uxPriority >= ( UBaseType_t ) configMAX_PRIORITIES )
  12785. 800567e: 2e37 cmp r6, #55 @ 0x37
  12786. 8005680: d900 bls.n 8005684 <prvInitialiseNewTask+0x5c>
  12787. uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U;
  12788. 8005682: 2637 movs r6, #55 @ 0x37
  12789. pxNewTCB->uxPriority = uxPriority;
  12790. 8005684: 62e6 str r6, [r4, #44] @ 0x2c
  12791. pxNewTCB->uxBasePriority = uxPriority;
  12792. 8005686: 64e6 str r6, [r4, #76] @ 0x4c
  12793. pxNewTCB->uxMutexesHeld = 0;
  12794. 8005688: 2500 movs r5, #0
  12795. 800568a: 6525 str r5, [r4, #80] @ 0x50
  12796. vListInitialiseItem( &( pxNewTCB->xStateListItem ) );
  12797. 800568c: 1d20 adds r0, r4, #4
  12798. 800568e: f7fe ffbc bl 800460a <vListInitialiseItem>
  12799. vListInitialiseItem( &( pxNewTCB->xEventListItem ) );
  12800. 8005692: f104 0018 add.w r0, r4, #24
  12801. 8005696: f7fe ffb8 bl 800460a <vListInitialiseItem>
  12802. listSET_LIST_ITEM_OWNER( &( pxNewTCB->xStateListItem ), pxNewTCB );
  12803. 800569a: 6124 str r4, [r4, #16]
  12804. listSET_LIST_ITEM_VALUE( &( pxNewTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
  12805. 800569c: f1c6 0638 rsb r6, r6, #56 @ 0x38
  12806. 80056a0: 61a6 str r6, [r4, #24]
  12807. listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB );
  12808. 80056a2: 6264 str r4, [r4, #36] @ 0x24
  12809. pxNewTCB->ulNotifiedValue = 0;
  12810. 80056a4: f8c4 50a0 str.w r5, [r4, #160] @ 0xa0
  12811. pxNewTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION;
  12812. 80056a8: f884 50a4 strb.w r5, [r4, #164] @ 0xa4
  12813. _REENT_INIT_PTR( ( &( pxNewTCB->xNewLib_reent ) ) );
  12814. 80056ac: 224c movs r2, #76 @ 0x4c
  12815. 80056ae: 4629 mov r1, r5
  12816. 80056b0: f104 0054 add.w r0, r4, #84 @ 0x54
  12817. 80056b4: f00e f800 bl 80136b8 <memset>
  12818. 80056b8: 4b0b ldr r3, [pc, #44] @ (80056e8 <prvInitialiseNewTask+0xc0>)
  12819. 80056ba: 65a3 str r3, [r4, #88] @ 0x58
  12820. 80056bc: f103 0268 add.w r2, r3, #104 @ 0x68
  12821. 80056c0: 65e2 str r2, [r4, #92] @ 0x5c
  12822. 80056c2: 33d0 adds r3, #208 @ 0xd0
  12823. 80056c4: 6623 str r3, [r4, #96] @ 0x60
  12824. pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters );
  12825. 80056c6: 464a mov r2, r9
  12826. 80056c8: 4641 mov r1, r8
  12827. 80056ca: 4638 mov r0, r7
  12828. 80056cc: f7ff f816 bl 80046fc <pxPortInitialiseStack>
  12829. 80056d0: 6020 str r0, [r4, #0]
  12830. if( pxCreatedTask != NULL )
  12831. 80056d2: f1ba 0f00 cmp.w sl, #0
  12832. 80056d6: d001 beq.n 80056dc <prvInitialiseNewTask+0xb4>
  12833. *pxCreatedTask = ( TaskHandle_t ) pxNewTCB;
  12834. 80056d8: f8ca 4000 str.w r4, [sl]
  12835. }
  12836. 80056dc: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  12837. pxNewTCB->pcTaskName[ 0 ] = 0x00;
  12838. 80056e0: 2300 movs r3, #0
  12839. 80056e2: f884 3034 strb.w r3, [r4, #52] @ 0x34
  12840. 80056e6: e7ca b.n 800567e <prvInitialiseNewTask+0x56>
  12841. 80056e8: 24019c50 .word 0x24019c50
  12842. 080056ec <prvInitialiseTaskLists>:
  12843. {
  12844. 80056ec: b538 push {r3, r4, r5, lr}
  12845. for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
  12846. 80056ee: 2400 movs r4, #0
  12847. 80056f0: e007 b.n 8005702 <prvInitialiseTaskLists+0x16>
  12848. vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) );
  12849. 80056f2: eb04 0284 add.w r2, r4, r4, lsl #2
  12850. 80056f6: 0093 lsls r3, r2, #2
  12851. 80056f8: 480e ldr r0, [pc, #56] @ (8005734 <prvInitialiseTaskLists+0x48>)
  12852. 80056fa: 4418 add r0, r3
  12853. 80056fc: f7fe ff7a bl 80045f4 <vListInitialise>
  12854. for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )
  12855. 8005700: 3401 adds r4, #1
  12856. 8005702: 2c37 cmp r4, #55 @ 0x37
  12857. 8005704: d9f5 bls.n 80056f2 <prvInitialiseTaskLists+0x6>
  12858. vListInitialise( &xDelayedTaskList1 );
  12859. 8005706: 4d0c ldr r5, [pc, #48] @ (8005738 <prvInitialiseTaskLists+0x4c>)
  12860. 8005708: 4628 mov r0, r5
  12861. 800570a: f7fe ff73 bl 80045f4 <vListInitialise>
  12862. vListInitialise( &xDelayedTaskList2 );
  12863. 800570e: 4c0b ldr r4, [pc, #44] @ (800573c <prvInitialiseTaskLists+0x50>)
  12864. 8005710: 4620 mov r0, r4
  12865. 8005712: f7fe ff6f bl 80045f4 <vListInitialise>
  12866. vListInitialise( &xPendingReadyList );
  12867. 8005716: 480a ldr r0, [pc, #40] @ (8005740 <prvInitialiseTaskLists+0x54>)
  12868. 8005718: f7fe ff6c bl 80045f4 <vListInitialise>
  12869. vListInitialise( &xTasksWaitingTermination );
  12870. 800571c: 4809 ldr r0, [pc, #36] @ (8005744 <prvInitialiseTaskLists+0x58>)
  12871. 800571e: f7fe ff69 bl 80045f4 <vListInitialise>
  12872. vListInitialise( &xSuspendedTaskList );
  12873. 8005722: 4809 ldr r0, [pc, #36] @ (8005748 <prvInitialiseTaskLists+0x5c>)
  12874. 8005724: f7fe ff66 bl 80045f4 <vListInitialise>
  12875. pxDelayedTaskList = &xDelayedTaskList1;
  12876. 8005728: 4b08 ldr r3, [pc, #32] @ (800574c <prvInitialiseTaskLists+0x60>)
  12877. 800572a: 601d str r5, [r3, #0]
  12878. pxOverflowDelayedTaskList = &xDelayedTaskList2;
  12879. 800572c: 4b08 ldr r3, [pc, #32] @ (8005750 <prvInitialiseTaskLists+0x64>)
  12880. 800572e: 601c str r4, [r3, #0]
  12881. }
  12882. 8005730: bd38 pop {r3, r4, r5, pc}
  12883. 8005732: bf00 nop
  12884. 8005734: 24012964 .word 0x24012964
  12885. 8005738: 24012950 .word 0x24012950
  12886. 800573c: 2401293c .word 0x2401293c
  12887. 8005740: 24012920 .word 0x24012920
  12888. 8005744: 2401290c .word 0x2401290c
  12889. 8005748: 240128f4 .word 0x240128f4
  12890. 800574c: 24012938 .word 0x24012938
  12891. 8005750: 24012934 .word 0x24012934
  12892. 08005754 <prvAddNewTaskToReadyList>:
  12893. {
  12894. 8005754: b510 push {r4, lr}
  12895. 8005756: 4604 mov r4, r0
  12896. taskENTER_CRITICAL();
  12897. 8005758: f7fe fffc bl 8004754 <vPortEnterCritical>
  12898. uxCurrentNumberOfTasks++;
  12899. 800575c: 4a22 ldr r2, [pc, #136] @ (80057e8 <prvAddNewTaskToReadyList+0x94>)
  12900. 800575e: 6813 ldr r3, [r2, #0]
  12901. 8005760: 3301 adds r3, #1
  12902. 8005762: 6013 str r3, [r2, #0]
  12903. if( pxCurrentTCB == NULL )
  12904. 8005764: 4b21 ldr r3, [pc, #132] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
  12905. 8005766: 681b ldr r3, [r3, #0]
  12906. 8005768: b15b cbz r3, 8005782 <prvAddNewTaskToReadyList+0x2e>
  12907. if( xSchedulerRunning == pdFALSE )
  12908. 800576a: 4b21 ldr r3, [pc, #132] @ (80057f0 <prvAddNewTaskToReadyList+0x9c>)
  12909. 800576c: 681b ldr r3, [r3, #0]
  12910. 800576e: b96b cbnz r3, 800578c <prvAddNewTaskToReadyList+0x38>
  12911. if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority )
  12912. 8005770: 4b1e ldr r3, [pc, #120] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
  12913. 8005772: 681b ldr r3, [r3, #0]
  12914. 8005774: 6ada ldr r2, [r3, #44] @ 0x2c
  12915. 8005776: 6ae3 ldr r3, [r4, #44] @ 0x2c
  12916. 8005778: 429a cmp r2, r3
  12917. 800577a: d807 bhi.n 800578c <prvAddNewTaskToReadyList+0x38>
  12918. pxCurrentTCB = pxNewTCB;
  12919. 800577c: 4b1b ldr r3, [pc, #108] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
  12920. 800577e: 601c str r4, [r3, #0]
  12921. 8005780: e004 b.n 800578c <prvAddNewTaskToReadyList+0x38>
  12922. pxCurrentTCB = pxNewTCB;
  12923. 8005782: 4b1a ldr r3, [pc, #104] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
  12924. 8005784: 601c str r4, [r3, #0]
  12925. if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 )
  12926. 8005786: 6813 ldr r3, [r2, #0]
  12927. 8005788: 2b01 cmp r3, #1
  12928. 800578a: d029 beq.n 80057e0 <prvAddNewTaskToReadyList+0x8c>
  12929. uxTaskNumber++;
  12930. 800578c: 4a19 ldr r2, [pc, #100] @ (80057f4 <prvAddNewTaskToReadyList+0xa0>)
  12931. 800578e: 6813 ldr r3, [r2, #0]
  12932. 8005790: 3301 adds r3, #1
  12933. 8005792: 6013 str r3, [r2, #0]
  12934. pxNewTCB->uxTCBNumber = uxTaskNumber;
  12935. 8005794: 6463 str r3, [r4, #68] @ 0x44
  12936. prvAddTaskToReadyList( pxNewTCB );
  12937. 8005796: 6ae0 ldr r0, [r4, #44] @ 0x2c
  12938. 8005798: 4b17 ldr r3, [pc, #92] @ (80057f8 <prvAddNewTaskToReadyList+0xa4>)
  12939. 800579a: 681b ldr r3, [r3, #0]
  12940. 800579c: 4298 cmp r0, r3
  12941. 800579e: d901 bls.n 80057a4 <prvAddNewTaskToReadyList+0x50>
  12942. 80057a0: 4b15 ldr r3, [pc, #84] @ (80057f8 <prvAddNewTaskToReadyList+0xa4>)
  12943. 80057a2: 6018 str r0, [r3, #0]
  12944. 80057a4: eb00 0080 add.w r0, r0, r0, lsl #2
  12945. 80057a8: 1d21 adds r1, r4, #4
  12946. 80057aa: 4b14 ldr r3, [pc, #80] @ (80057fc <prvAddNewTaskToReadyList+0xa8>)
  12947. 80057ac: eb03 0080 add.w r0, r3, r0, lsl #2
  12948. 80057b0: f7fe ff2e bl 8004610 <vListInsertEnd>
  12949. taskEXIT_CRITICAL();
  12950. 80057b4: f7fe fff0 bl 8004798 <vPortExitCritical>
  12951. if( xSchedulerRunning != pdFALSE )
  12952. 80057b8: 4b0d ldr r3, [pc, #52] @ (80057f0 <prvAddNewTaskToReadyList+0x9c>)
  12953. 80057ba: 681b ldr r3, [r3, #0]
  12954. 80057bc: b17b cbz r3, 80057de <prvAddNewTaskToReadyList+0x8a>
  12955. if( pxCurrentTCB->uxPriority < pxNewTCB->uxPriority )
  12956. 80057be: 4b0b ldr r3, [pc, #44] @ (80057ec <prvAddNewTaskToReadyList+0x98>)
  12957. 80057c0: 681b ldr r3, [r3, #0]
  12958. 80057c2: 6ada ldr r2, [r3, #44] @ 0x2c
  12959. 80057c4: 6ae3 ldr r3, [r4, #44] @ 0x2c
  12960. 80057c6: 429a cmp r2, r3
  12961. 80057c8: d209 bcs.n 80057de <prvAddNewTaskToReadyList+0x8a>
  12962. taskYIELD_IF_USING_PREEMPTION();
  12963. 80057ca: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  12964. 80057ce: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  12965. 80057d2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  12966. 80057d6: f3bf 8f4f dsb sy
  12967. 80057da: f3bf 8f6f isb sy
  12968. }
  12969. 80057de: bd10 pop {r4, pc}
  12970. prvInitialiseTaskLists();
  12971. 80057e0: f7ff ff84 bl 80056ec <prvInitialiseTaskLists>
  12972. 80057e4: e7d2 b.n 800578c <prvAddNewTaskToReadyList+0x38>
  12973. 80057e6: bf00 nop
  12974. 80057e8: 240128f0 .word 0x240128f0
  12975. 80057ec: 24012dc4 .word 0x24012dc4
  12976. 80057f0: 240128e4 .word 0x240128e4
  12977. 80057f4: 240128d4 .word 0x240128d4
  12978. 80057f8: 240128e8 .word 0x240128e8
  12979. 80057fc: 24012964 .word 0x24012964
  12980. 08005800 <prvDeleteTCB>:
  12981. {
  12982. 8005800: b510 push {r4, lr}
  12983. 8005802: 4604 mov r4, r0
  12984. _reclaim_reent( &( pxTCB->xNewLib_reent ) );
  12985. 8005804: 3054 adds r0, #84 @ 0x54
  12986. 8005806: f00d ff81 bl 801370c <_reclaim_reent>
  12987. if( pxTCB->ucStaticallyAllocated == tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB )
  12988. 800580a: f894 30a5 ldrb.w r3, [r4, #165] @ 0xa5
  12989. 800580e: b163 cbz r3, 800582a <prvDeleteTCB+0x2a>
  12990. else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY )
  12991. 8005810: 2b01 cmp r3, #1
  12992. 8005812: d011 beq.n 8005838 <prvDeleteTCB+0x38>
  12993. configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB );
  12994. 8005814: 2b02 cmp r3, #2
  12995. 8005816: d00e beq.n 8005836 <prvDeleteTCB+0x36>
  12996. 8005818: f04f 0350 mov.w r3, #80 @ 0x50
  12997. 800581c: f383 8811 msr BASEPRI, r3
  12998. 8005820: f3bf 8f6f isb sy
  12999. 8005824: f3bf 8f4f dsb sy
  13000. 8005828: e7fe b.n 8005828 <prvDeleteTCB+0x28>
  13001. vPortFree( pxTCB->pxStack );
  13002. 800582a: 6b20 ldr r0, [r4, #48] @ 0x30
  13003. 800582c: f7fe fea4 bl 8004578 <vPortFree>
  13004. vPortFree( pxTCB );
  13005. 8005830: 4620 mov r0, r4
  13006. 8005832: f7fe fea1 bl 8004578 <vPortFree>
  13007. }
  13008. 8005836: bd10 pop {r4, pc}
  13009. vPortFree( pxTCB );
  13010. 8005838: 4620 mov r0, r4
  13011. 800583a: f7fe fe9d bl 8004578 <vPortFree>
  13012. 800583e: e7fa b.n 8005836 <prvDeleteTCB+0x36>
  13013. 08005840 <prvCheckTasksWaitingTermination>:
  13014. while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U )
  13015. 8005840: 4b0f ldr r3, [pc, #60] @ (8005880 <prvCheckTasksWaitingTermination+0x40>)
  13016. 8005842: 681b ldr r3, [r3, #0]
  13017. 8005844: b1d3 cbz r3, 800587c <prvCheckTasksWaitingTermination+0x3c>
  13018. {
  13019. 8005846: b510 push {r4, lr}
  13020. taskENTER_CRITICAL();
  13021. 8005848: f7fe ff84 bl 8004754 <vPortEnterCritical>
  13022. pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  13023. 800584c: 4b0d ldr r3, [pc, #52] @ (8005884 <prvCheckTasksWaitingTermination+0x44>)
  13024. 800584e: 68db ldr r3, [r3, #12]
  13025. 8005850: 68dc ldr r4, [r3, #12]
  13026. ( void ) uxListRemove( &( pxTCB->xStateListItem ) );
  13027. 8005852: 1d20 adds r0, r4, #4
  13028. 8005854: f7fe ff00 bl 8004658 <uxListRemove>
  13029. --uxCurrentNumberOfTasks;
  13030. 8005858: 4a0b ldr r2, [pc, #44] @ (8005888 <prvCheckTasksWaitingTermination+0x48>)
  13031. 800585a: 6813 ldr r3, [r2, #0]
  13032. 800585c: 3b01 subs r3, #1
  13033. 800585e: 6013 str r3, [r2, #0]
  13034. --uxDeletedTasksWaitingCleanUp;
  13035. 8005860: 4a07 ldr r2, [pc, #28] @ (8005880 <prvCheckTasksWaitingTermination+0x40>)
  13036. 8005862: 6813 ldr r3, [r2, #0]
  13037. 8005864: 3b01 subs r3, #1
  13038. 8005866: 6013 str r3, [r2, #0]
  13039. taskEXIT_CRITICAL();
  13040. 8005868: f7fe ff96 bl 8004798 <vPortExitCritical>
  13041. prvDeleteTCB( pxTCB );
  13042. 800586c: 4620 mov r0, r4
  13043. 800586e: f7ff ffc7 bl 8005800 <prvDeleteTCB>
  13044. while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U )
  13045. 8005872: 4b03 ldr r3, [pc, #12] @ (8005880 <prvCheckTasksWaitingTermination+0x40>)
  13046. 8005874: 681b ldr r3, [r3, #0]
  13047. 8005876: 2b00 cmp r3, #0
  13048. 8005878: d1e6 bne.n 8005848 <prvCheckTasksWaitingTermination+0x8>
  13049. }
  13050. 800587a: bd10 pop {r4, pc}
  13051. 800587c: 4770 bx lr
  13052. 800587e: bf00 nop
  13053. 8005880: 24012908 .word 0x24012908
  13054. 8005884: 2401290c .word 0x2401290c
  13055. 8005888: 240128f0 .word 0x240128f0
  13056. 0800588c <prvIdleTask>:
  13057. {
  13058. 800588c: b508 push {r3, lr}
  13059. prvCheckTasksWaitingTermination();
  13060. 800588e: f7ff ffd7 bl 8005840 <prvCheckTasksWaitingTermination>
  13061. if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 )
  13062. 8005892: 4b07 ldr r3, [pc, #28] @ (80058b0 <prvIdleTask+0x24>)
  13063. 8005894: 681b ldr r3, [r3, #0]
  13064. 8005896: 2b01 cmp r3, #1
  13065. 8005898: d9f9 bls.n 800588e <prvIdleTask+0x2>
  13066. taskYIELD();
  13067. 800589a: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  13068. 800589e: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  13069. 80058a2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  13070. 80058a6: f3bf 8f4f dsb sy
  13071. 80058aa: f3bf 8f6f isb sy
  13072. 80058ae: e7ee b.n 800588e <prvIdleTask+0x2>
  13073. 80058b0: 24012964 .word 0x24012964
  13074. 080058b4 <prvAddCurrentTaskToDelayedList>:
  13075. #endif
  13076. /*-----------------------------------------------------------*/
  13077. static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely )
  13078. {
  13079. 80058b4: b570 push {r4, r5, r6, lr}
  13080. 80058b6: 4604 mov r4, r0
  13081. 80058b8: 460d mov r5, r1
  13082. TickType_t xTimeToWake;
  13083. const TickType_t xConstTickCount = xTickCount;
  13084. 80058ba: 4b19 ldr r3, [pc, #100] @ (8005920 <prvAddCurrentTaskToDelayedList+0x6c>)
  13085. 80058bc: 681e ldr r6, [r3, #0]
  13086. }
  13087. #endif
  13088. /* Remove the task from the ready list before adding it to the blocked list
  13089. as the same list item is used for both lists. */
  13090. if( uxListRemove( &( pxCurrentTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
  13091. 80058be: 4b19 ldr r3, [pc, #100] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
  13092. 80058c0: 6818 ldr r0, [r3, #0]
  13093. 80058c2: 3004 adds r0, #4
  13094. 80058c4: f7fe fec8 bl 8004658 <uxListRemove>
  13095. mtCOVERAGE_TEST_MARKER();
  13096. }
  13097. #if ( INCLUDE_vTaskSuspend == 1 )
  13098. {
  13099. if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) )
  13100. 80058c8: f1b4 3fff cmp.w r4, #4294967295 @ 0xffffffff
  13101. 80058cc: bf14 ite ne
  13102. 80058ce: 2300 movne r3, #0
  13103. 80058d0: 2301 moveq r3, #1
  13104. 80058d2: 2d00 cmp r5, #0
  13105. 80058d4: bf08 it eq
  13106. 80058d6: 2300 moveq r3, #0
  13107. 80058d8: b96b cbnz r3, 80058f6 <prvAddCurrentTaskToDelayedList+0x42>
  13108. else
  13109. {
  13110. /* Calculate the time at which the task should be woken if the event
  13111. does not occur. This may overflow but this doesn't matter, the
  13112. kernel will manage it correctly. */
  13113. xTimeToWake = xConstTickCount + xTicksToWait;
  13114. 80058da: 4434 add r4, r6
  13115. /* The list item will be inserted in wake time order. */
  13116. listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake );
  13117. 80058dc: 4b11 ldr r3, [pc, #68] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
  13118. 80058de: 681b ldr r3, [r3, #0]
  13119. 80058e0: 605c str r4, [r3, #4]
  13120. if( xTimeToWake < xConstTickCount )
  13121. 80058e2: 42a6 cmp r6, r4
  13122. 80058e4: d90e bls.n 8005904 <prvAddCurrentTaskToDelayedList+0x50>
  13123. {
  13124. /* Wake time has overflowed. Place this item in the overflow
  13125. list. */
  13126. vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
  13127. 80058e6: 4b10 ldr r3, [pc, #64] @ (8005928 <prvAddCurrentTaskToDelayedList+0x74>)
  13128. 80058e8: 6818 ldr r0, [r3, #0]
  13129. 80058ea: 4b0e ldr r3, [pc, #56] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
  13130. 80058ec: 6819 ldr r1, [r3, #0]
  13131. 80058ee: 3104 adds r1, #4
  13132. 80058f0: f7fe fe99 bl 8004626 <vListInsert>
  13133. /* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */
  13134. ( void ) xCanBlockIndefinitely;
  13135. }
  13136. #endif /* INCLUDE_vTaskSuspend */
  13137. }
  13138. 80058f4: bd70 pop {r4, r5, r6, pc}
  13139. vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) );
  13140. 80058f6: 4b0b ldr r3, [pc, #44] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
  13141. 80058f8: 6819 ldr r1, [r3, #0]
  13142. 80058fa: 3104 adds r1, #4
  13143. 80058fc: 480b ldr r0, [pc, #44] @ (800592c <prvAddCurrentTaskToDelayedList+0x78>)
  13144. 80058fe: f7fe fe87 bl 8004610 <vListInsertEnd>
  13145. 8005902: e7f7 b.n 80058f4 <prvAddCurrentTaskToDelayedList+0x40>
  13146. vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) );
  13147. 8005904: 4b0a ldr r3, [pc, #40] @ (8005930 <prvAddCurrentTaskToDelayedList+0x7c>)
  13148. 8005906: 6818 ldr r0, [r3, #0]
  13149. 8005908: 4b06 ldr r3, [pc, #24] @ (8005924 <prvAddCurrentTaskToDelayedList+0x70>)
  13150. 800590a: 6819 ldr r1, [r3, #0]
  13151. 800590c: 3104 adds r1, #4
  13152. 800590e: f7fe fe8a bl 8004626 <vListInsert>
  13153. if( xTimeToWake < xNextTaskUnblockTime )
  13154. 8005912: 4b08 ldr r3, [pc, #32] @ (8005934 <prvAddCurrentTaskToDelayedList+0x80>)
  13155. 8005914: 681b ldr r3, [r3, #0]
  13156. 8005916: 42a3 cmp r3, r4
  13157. 8005918: d9ec bls.n 80058f4 <prvAddCurrentTaskToDelayedList+0x40>
  13158. xNextTaskUnblockTime = xTimeToWake;
  13159. 800591a: 4b06 ldr r3, [pc, #24] @ (8005934 <prvAddCurrentTaskToDelayedList+0x80>)
  13160. 800591c: 601c str r4, [r3, #0]
  13161. }
  13162. 800591e: e7e9 b.n 80058f4 <prvAddCurrentTaskToDelayedList+0x40>
  13163. 8005920: 240128ec .word 0x240128ec
  13164. 8005924: 24012dc4 .word 0x24012dc4
  13165. 8005928: 24012934 .word 0x24012934
  13166. 800592c: 240128f4 .word 0x240128f4
  13167. 8005930: 24012938 .word 0x24012938
  13168. 8005934: 240128d0 .word 0x240128d0
  13169. 08005938 <xTaskCreateStatic>:
  13170. {
  13171. 8005938: b530 push {r4, r5, lr}
  13172. 800593a: b087 sub sp, #28
  13173. 800593c: 9c0b ldr r4, [sp, #44] @ 0x2c
  13174. configASSERT( puxStackBuffer != NULL );
  13175. 800593e: b17c cbz r4, 8005960 <xTaskCreateStatic+0x28>
  13176. configASSERT( pxTaskBuffer != NULL );
  13177. 8005940: 9d0c ldr r5, [sp, #48] @ 0x30
  13178. 8005942: b1b5 cbz r5, 8005972 <xTaskCreateStatic+0x3a>
  13179. volatile size_t xSize = sizeof( StaticTask_t );
  13180. 8005944: 25a8 movs r5, #168 @ 0xa8
  13181. 8005946: 9504 str r5, [sp, #16]
  13182. configASSERT( xSize == sizeof( TCB_t ) );
  13183. 8005948: 9d04 ldr r5, [sp, #16]
  13184. 800594a: 2da8 cmp r5, #168 @ 0xa8
  13185. 800594c: d01a beq.n 8005984 <xTaskCreateStatic+0x4c>
  13186. 800594e: f04f 0350 mov.w r3, #80 @ 0x50
  13187. 8005952: f383 8811 msr BASEPRI, r3
  13188. 8005956: f3bf 8f6f isb sy
  13189. 800595a: f3bf 8f4f dsb sy
  13190. 800595e: e7fe b.n 800595e <xTaskCreateStatic+0x26>
  13191. 8005960: f04f 0350 mov.w r3, #80 @ 0x50
  13192. 8005964: f383 8811 msr BASEPRI, r3
  13193. 8005968: f3bf 8f6f isb sy
  13194. 800596c: f3bf 8f4f dsb sy
  13195. configASSERT( puxStackBuffer != NULL );
  13196. 8005970: e7fe b.n 8005970 <xTaskCreateStatic+0x38>
  13197. 8005972: f04f 0350 mov.w r3, #80 @ 0x50
  13198. 8005976: f383 8811 msr BASEPRI, r3
  13199. 800597a: f3bf 8f6f isb sy
  13200. 800597e: f3bf 8f4f dsb sy
  13201. configASSERT( pxTaskBuffer != NULL );
  13202. 8005982: e7fe b.n 8005982 <xTaskCreateStatic+0x4a>
  13203. ( void ) xSize; /* Prevent lint warning when configASSERT() is not used. */
  13204. 8005984: 9d04 ldr r5, [sp, #16]
  13205. pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer;
  13206. 8005986: 9d0c ldr r5, [sp, #48] @ 0x30
  13207. 8005988: 632c str r4, [r5, #48] @ 0x30
  13208. pxNewTCB->ucStaticallyAllocated = tskSTATICALLY_ALLOCATED_STACK_AND_TCB;
  13209. 800598a: 2402 movs r4, #2
  13210. 800598c: f885 40a5 strb.w r4, [r5, #165] @ 0xa5
  13211. prvInitialiseNewTask( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &xReturn, pxNewTCB, NULL );
  13212. 8005990: 2400 movs r4, #0
  13213. 8005992: 9403 str r4, [sp, #12]
  13214. 8005994: 9502 str r5, [sp, #8]
  13215. 8005996: ac05 add r4, sp, #20
  13216. 8005998: 9401 str r4, [sp, #4]
  13217. 800599a: 9c0a ldr r4, [sp, #40] @ 0x28
  13218. 800599c: 9400 str r4, [sp, #0]
  13219. 800599e: f7ff fe43 bl 8005628 <prvInitialiseNewTask>
  13220. prvAddNewTaskToReadyList( pxNewTCB );
  13221. 80059a2: 980c ldr r0, [sp, #48] @ 0x30
  13222. 80059a4: f7ff fed6 bl 8005754 <prvAddNewTaskToReadyList>
  13223. }
  13224. 80059a8: 9805 ldr r0, [sp, #20]
  13225. 80059aa: b007 add sp, #28
  13226. 80059ac: bd30 pop {r4, r5, pc}
  13227. 080059ae <xTaskCreate>:
  13228. {
  13229. 80059ae: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
  13230. 80059b2: b085 sub sp, #20
  13231. 80059b4: 4607 mov r7, r0
  13232. 80059b6: 4688 mov r8, r1
  13233. 80059b8: 4614 mov r4, r2
  13234. 80059ba: 461e mov r6, r3
  13235. pxStack = pvPortMalloc( ( ( ( size_t ) usStackDepth ) * sizeof( StackType_t ) ) ); /*lint !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack and this allocation is the stack. */
  13236. 80059bc: 0090 lsls r0, r2, #2
  13237. 80059be: f7fe fd59 bl 8004474 <pvPortMalloc>
  13238. if( pxStack != NULL )
  13239. 80059c2: b308 cbz r0, 8005a08 <xTaskCreate+0x5a>
  13240. 80059c4: 4681 mov r9, r0
  13241. pxNewTCB = ( TCB_t * ) pvPortMalloc( sizeof( TCB_t ) ); /*lint !e9087 !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack, and the first member of TCB_t is always a pointer to the task's stack. */
  13242. 80059c6: 20a8 movs r0, #168 @ 0xa8
  13243. 80059c8: f7fe fd54 bl 8004474 <pvPortMalloc>
  13244. if( pxNewTCB != NULL )
  13245. 80059cc: 4605 mov r5, r0
  13246. 80059ce: b1a8 cbz r0, 80059fc <xTaskCreate+0x4e>
  13247. pxNewTCB->pxStack = pxStack;
  13248. 80059d0: f8c0 9030 str.w r9, [r0, #48] @ 0x30
  13249. pxNewTCB->ucStaticallyAllocated = tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB;
  13250. 80059d4: 2300 movs r3, #0
  13251. 80059d6: f880 30a5 strb.w r3, [r0, #165] @ 0xa5
  13252. prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL );
  13253. 80059da: 9303 str r3, [sp, #12]
  13254. 80059dc: 9002 str r0, [sp, #8]
  13255. 80059de: 9b0d ldr r3, [sp, #52] @ 0x34
  13256. 80059e0: 9301 str r3, [sp, #4]
  13257. 80059e2: 9b0c ldr r3, [sp, #48] @ 0x30
  13258. 80059e4: 9300 str r3, [sp, #0]
  13259. 80059e6: 4633 mov r3, r6
  13260. 80059e8: 4622 mov r2, r4
  13261. 80059ea: 4641 mov r1, r8
  13262. 80059ec: 4638 mov r0, r7
  13263. 80059ee: f7ff fe1b bl 8005628 <prvInitialiseNewTask>
  13264. prvAddNewTaskToReadyList( pxNewTCB );
  13265. 80059f2: 4628 mov r0, r5
  13266. 80059f4: f7ff feae bl 8005754 <prvAddNewTaskToReadyList>
  13267. xReturn = pdPASS;
  13268. 80059f8: 2001 movs r0, #1
  13269. 80059fa: e007 b.n 8005a0c <xTaskCreate+0x5e>
  13270. vPortFree( pxStack );
  13271. 80059fc: 4648 mov r0, r9
  13272. 80059fe: f7fe fdbb bl 8004578 <vPortFree>
  13273. xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY;
  13274. 8005a02: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  13275. 8005a06: e001 b.n 8005a0c <xTaskCreate+0x5e>
  13276. 8005a08: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  13277. }
  13278. 8005a0c: b005 add sp, #20
  13279. 8005a0e: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
  13280. ...
  13281. 08005a14 <vTaskStartScheduler>:
  13282. {
  13283. 8005a14: b510 push {r4, lr}
  13284. 8005a16: b088 sub sp, #32
  13285. StaticTask_t *pxIdleTaskTCBBuffer = NULL;
  13286. 8005a18: 2400 movs r4, #0
  13287. 8005a1a: 9405 str r4, [sp, #20]
  13288. StackType_t *pxIdleTaskStackBuffer = NULL;
  13289. 8005a1c: 9406 str r4, [sp, #24]
  13290. vApplicationGetIdleTaskMemory( &pxIdleTaskTCBBuffer, &pxIdleTaskStackBuffer, &ulIdleTaskStackSize );
  13291. 8005a1e: aa07 add r2, sp, #28
  13292. 8005a20: a906 add r1, sp, #24
  13293. 8005a22: a805 add r0, sp, #20
  13294. 8005a24: f7fe fcaa bl 800437c <vApplicationGetIdleTaskMemory>
  13295. xIdleTaskHandle = xTaskCreateStatic( prvIdleTask,
  13296. 8005a28: 9b05 ldr r3, [sp, #20]
  13297. 8005a2a: 9302 str r3, [sp, #8]
  13298. 8005a2c: 9b06 ldr r3, [sp, #24]
  13299. 8005a2e: 9301 str r3, [sp, #4]
  13300. 8005a30: 9400 str r4, [sp, #0]
  13301. 8005a32: 4623 mov r3, r4
  13302. 8005a34: 9a07 ldr r2, [sp, #28]
  13303. 8005a36: 491a ldr r1, [pc, #104] @ (8005aa0 <vTaskStartScheduler+0x8c>)
  13304. 8005a38: 481a ldr r0, [pc, #104] @ (8005aa4 <vTaskStartScheduler+0x90>)
  13305. 8005a3a: f7ff ff7d bl 8005938 <xTaskCreateStatic>
  13306. 8005a3e: 4b1a ldr r3, [pc, #104] @ (8005aa8 <vTaskStartScheduler+0x94>)
  13307. 8005a40: 6018 str r0, [r3, #0]
  13308. if( xIdleTaskHandle != NULL )
  13309. 8005a42: b1e8 cbz r0, 8005a80 <vTaskStartScheduler+0x6c>
  13310. xReturn = xTimerCreateTimerTask();
  13311. 8005a44: f000 fc26 bl 8006294 <xTimerCreateTimerTask>
  13312. if( xReturn == pdPASS )
  13313. 8005a48: 2801 cmp r0, #1
  13314. 8005a4a: d11a bne.n 8005a82 <vTaskStartScheduler+0x6e>
  13315. 8005a4c: f04f 0350 mov.w r3, #80 @ 0x50
  13316. 8005a50: f383 8811 msr BASEPRI, r3
  13317. 8005a54: f3bf 8f6f isb sy
  13318. 8005a58: f3bf 8f4f dsb sy
  13319. _impure_ptr = &( pxCurrentTCB->xNewLib_reent );
  13320. 8005a5c: 4b13 ldr r3, [pc, #76] @ (8005aac <vTaskStartScheduler+0x98>)
  13321. 8005a5e: 681b ldr r3, [r3, #0]
  13322. 8005a60: 3354 adds r3, #84 @ 0x54
  13323. 8005a62: 4a13 ldr r2, [pc, #76] @ (8005ab0 <vTaskStartScheduler+0x9c>)
  13324. 8005a64: 6013 str r3, [r2, #0]
  13325. xNextTaskUnblockTime = portMAX_DELAY;
  13326. 8005a66: 4b13 ldr r3, [pc, #76] @ (8005ab4 <vTaskStartScheduler+0xa0>)
  13327. 8005a68: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
  13328. 8005a6c: 601a str r2, [r3, #0]
  13329. xSchedulerRunning = pdTRUE;
  13330. 8005a6e: 4b12 ldr r3, [pc, #72] @ (8005ab8 <vTaskStartScheduler+0xa4>)
  13331. 8005a70: 2201 movs r2, #1
  13332. 8005a72: 601a str r2, [r3, #0]
  13333. xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT;
  13334. 8005a74: 4b11 ldr r3, [pc, #68] @ (8005abc <vTaskStartScheduler+0xa8>)
  13335. 8005a76: 2200 movs r2, #0
  13336. 8005a78: 601a str r2, [r3, #0]
  13337. if( xPortStartScheduler() != pdFALSE )
  13338. 8005a7a: f7fe ff05 bl 8004888 <xPortStartScheduler>
  13339. 8005a7e: e003 b.n 8005a88 <vTaskStartScheduler+0x74>
  13340. xReturn = pdFAIL;
  13341. 8005a80: 2000 movs r0, #0
  13342. configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY );
  13343. 8005a82: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
  13344. 8005a86: d001 beq.n 8005a8c <vTaskStartScheduler+0x78>
  13345. }
  13346. 8005a88: b008 add sp, #32
  13347. 8005a8a: bd10 pop {r4, pc}
  13348. 8005a8c: f04f 0350 mov.w r3, #80 @ 0x50
  13349. 8005a90: f383 8811 msr BASEPRI, r3
  13350. 8005a94: f3bf 8f6f isb sy
  13351. 8005a98: f3bf 8f4f dsb sy
  13352. configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY );
  13353. 8005a9c: e7fe b.n 8005a9c <vTaskStartScheduler+0x88>
  13354. 8005a9e: bf00 nop
  13355. 8005aa0: 0801464c .word 0x0801464c
  13356. 8005aa4: 0800588d .word 0x0800588d
  13357. 8005aa8: 240128cc .word 0x240128cc
  13358. 8005aac: 24012dc4 .word 0x24012dc4
  13359. 8005ab0: 2400003c .word 0x2400003c
  13360. 8005ab4: 240128d0 .word 0x240128d0
  13361. 8005ab8: 240128e4 .word 0x240128e4
  13362. 8005abc: 240128ec .word 0x240128ec
  13363. 08005ac0 <vTaskSuspendAll>:
  13364. ++uxSchedulerSuspended;
  13365. 8005ac0: 4a02 ldr r2, [pc, #8] @ (8005acc <vTaskSuspendAll+0xc>)
  13366. 8005ac2: 6813 ldr r3, [r2, #0]
  13367. 8005ac4: 3301 adds r3, #1
  13368. 8005ac6: 6013 str r3, [r2, #0]
  13369. }
  13370. 8005ac8: 4770 bx lr
  13371. 8005aca: bf00 nop
  13372. 8005acc: 240128c8 .word 0x240128c8
  13373. 08005ad0 <xTaskGetTickCount>:
  13374. xTicks = xTickCount;
  13375. 8005ad0: 4b01 ldr r3, [pc, #4] @ (8005ad8 <xTaskGetTickCount+0x8>)
  13376. 8005ad2: 6818 ldr r0, [r3, #0]
  13377. }
  13378. 8005ad4: 4770 bx lr
  13379. 8005ad6: bf00 nop
  13380. 8005ad8: 240128ec .word 0x240128ec
  13381. 08005adc <xTaskGetTickCountFromISR>:
  13382. {
  13383. 8005adc: b508 push {r3, lr}
  13384. portASSERT_IF_INTERRUPT_PRIORITY_INVALID();
  13385. 8005ade: f7fe ff5f bl 80049a0 <vPortValidateInterruptPriority>
  13386. xReturn = xTickCount;
  13387. 8005ae2: 4b01 ldr r3, [pc, #4] @ (8005ae8 <xTaskGetTickCountFromISR+0xc>)
  13388. 8005ae4: 6818 ldr r0, [r3, #0]
  13389. }
  13390. 8005ae6: bd08 pop {r3, pc}
  13391. 8005ae8: 240128ec .word 0x240128ec
  13392. 08005aec <xTaskIncrementTick>:
  13393. {
  13394. 8005aec: b5f8 push {r3, r4, r5, r6, r7, lr}
  13395. if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
  13396. 8005aee: 4b3a ldr r3, [pc, #232] @ (8005bd8 <xTaskIncrementTick+0xec>)
  13397. 8005af0: 681b ldr r3, [r3, #0]
  13398. 8005af2: 2b00 cmp r3, #0
  13399. 8005af4: d169 bne.n 8005bca <xTaskIncrementTick+0xde>
  13400. const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1;
  13401. 8005af6: 4b39 ldr r3, [pc, #228] @ (8005bdc <xTaskIncrementTick+0xf0>)
  13402. 8005af8: 681d ldr r5, [r3, #0]
  13403. 8005afa: 3501 adds r5, #1
  13404. xTickCount = xConstTickCount;
  13405. 8005afc: 601d str r5, [r3, #0]
  13406. if( xConstTickCount == ( TickType_t ) 0U ) /*lint !e774 'if' does not always evaluate to false as it is looking for an overflow. */
  13407. 8005afe: b9c5 cbnz r5, 8005b32 <xTaskIncrementTick+0x46>
  13408. taskSWITCH_DELAYED_LISTS();
  13409. 8005b00: 4b37 ldr r3, [pc, #220] @ (8005be0 <xTaskIncrementTick+0xf4>)
  13410. 8005b02: 681b ldr r3, [r3, #0]
  13411. 8005b04: 681b ldr r3, [r3, #0]
  13412. 8005b06: b143 cbz r3, 8005b1a <xTaskIncrementTick+0x2e>
  13413. 8005b08: f04f 0350 mov.w r3, #80 @ 0x50
  13414. 8005b0c: f383 8811 msr BASEPRI, r3
  13415. 8005b10: f3bf 8f6f isb sy
  13416. 8005b14: f3bf 8f4f dsb sy
  13417. 8005b18: e7fe b.n 8005b18 <xTaskIncrementTick+0x2c>
  13418. 8005b1a: 4a31 ldr r2, [pc, #196] @ (8005be0 <xTaskIncrementTick+0xf4>)
  13419. 8005b1c: 6811 ldr r1, [r2, #0]
  13420. 8005b1e: 4b31 ldr r3, [pc, #196] @ (8005be4 <xTaskIncrementTick+0xf8>)
  13421. 8005b20: 6818 ldr r0, [r3, #0]
  13422. 8005b22: 6010 str r0, [r2, #0]
  13423. 8005b24: 6019 str r1, [r3, #0]
  13424. 8005b26: 4a30 ldr r2, [pc, #192] @ (8005be8 <xTaskIncrementTick+0xfc>)
  13425. 8005b28: 6813 ldr r3, [r2, #0]
  13426. 8005b2a: 3301 adds r3, #1
  13427. 8005b2c: 6013 str r3, [r2, #0]
  13428. 8005b2e: f7ff fd65 bl 80055fc <prvResetNextTaskUnblockTime>
  13429. if( xConstTickCount >= xNextTaskUnblockTime )
  13430. 8005b32: 4b2e ldr r3, [pc, #184] @ (8005bec <xTaskIncrementTick+0x100>)
  13431. 8005b34: 681b ldr r3, [r3, #0]
  13432. 8005b36: 42ab cmp r3, r5
  13433. 8005b38: d93d bls.n 8005bb6 <xTaskIncrementTick+0xca>
  13434. BaseType_t xSwitchRequired = pdFALSE;
  13435. 8005b3a: 2700 movs r7, #0
  13436. if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > ( UBaseType_t ) 1 )
  13437. 8005b3c: 4b2c ldr r3, [pc, #176] @ (8005bf0 <xTaskIncrementTick+0x104>)
  13438. 8005b3e: 681b ldr r3, [r3, #0]
  13439. 8005b40: 6adb ldr r3, [r3, #44] @ 0x2c
  13440. 8005b42: eb03 0383 add.w r3, r3, r3, lsl #2
  13441. 8005b46: 009a lsls r2, r3, #2
  13442. 8005b48: 4b2a ldr r3, [pc, #168] @ (8005bf4 <xTaskIncrementTick+0x108>)
  13443. 8005b4a: 589b ldr r3, [r3, r2]
  13444. 8005b4c: 2b01 cmp r3, #1
  13445. 8005b4e: d900 bls.n 8005b52 <xTaskIncrementTick+0x66>
  13446. xSwitchRequired = pdTRUE;
  13447. 8005b50: 2701 movs r7, #1
  13448. if( xYieldPending != pdFALSE )
  13449. 8005b52: 4b29 ldr r3, [pc, #164] @ (8005bf8 <xTaskIncrementTick+0x10c>)
  13450. 8005b54: 681b ldr r3, [r3, #0]
  13451. 8005b56: 2b00 cmp r3, #0
  13452. 8005b58: d03c beq.n 8005bd4 <xTaskIncrementTick+0xe8>
  13453. xSwitchRequired = pdTRUE;
  13454. 8005b5a: 2701 movs r7, #1
  13455. return xSwitchRequired;
  13456. 8005b5c: e03a b.n 8005bd4 <xTaskIncrementTick+0xe8>
  13457. xSwitchRequired = pdTRUE;
  13458. 8005b5e: 2701 movs r7, #1
  13459. if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE )
  13460. 8005b60: 4b1f ldr r3, [pc, #124] @ (8005be0 <xTaskIncrementTick+0xf4>)
  13461. 8005b62: 681b ldr r3, [r3, #0]
  13462. 8005b64: 681b ldr r3, [r3, #0]
  13463. 8005b66: b343 cbz r3, 8005bba <xTaskIncrementTick+0xce>
  13464. pxTCB = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  13465. 8005b68: 4b1d ldr r3, [pc, #116] @ (8005be0 <xTaskIncrementTick+0xf4>)
  13466. 8005b6a: 681b ldr r3, [r3, #0]
  13467. 8005b6c: 68db ldr r3, [r3, #12]
  13468. 8005b6e: 68dc ldr r4, [r3, #12]
  13469. xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) );
  13470. 8005b70: 6863 ldr r3, [r4, #4]
  13471. if( xConstTickCount < xItemValue )
  13472. 8005b72: 429d cmp r5, r3
  13473. 8005b74: d326 bcc.n 8005bc4 <xTaskIncrementTick+0xd8>
  13474. ( void ) uxListRemove( &( pxTCB->xStateListItem ) );
  13475. 8005b76: 1d26 adds r6, r4, #4
  13476. 8005b78: 4630 mov r0, r6
  13477. 8005b7a: f7fe fd6d bl 8004658 <uxListRemove>
  13478. if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )
  13479. 8005b7e: 6aa3 ldr r3, [r4, #40] @ 0x28
  13480. 8005b80: b11b cbz r3, 8005b8a <xTaskIncrementTick+0x9e>
  13481. ( void ) uxListRemove( &( pxTCB->xEventListItem ) );
  13482. 8005b82: f104 0018 add.w r0, r4, #24
  13483. 8005b86: f7fe fd67 bl 8004658 <uxListRemove>
  13484. prvAddTaskToReadyList( pxTCB );
  13485. 8005b8a: 6ae3 ldr r3, [r4, #44] @ 0x2c
  13486. 8005b8c: 4a1b ldr r2, [pc, #108] @ (8005bfc <xTaskIncrementTick+0x110>)
  13487. 8005b8e: 6812 ldr r2, [r2, #0]
  13488. 8005b90: 4293 cmp r3, r2
  13489. 8005b92: d901 bls.n 8005b98 <xTaskIncrementTick+0xac>
  13490. 8005b94: 4a19 ldr r2, [pc, #100] @ (8005bfc <xTaskIncrementTick+0x110>)
  13491. 8005b96: 6013 str r3, [r2, #0]
  13492. 8005b98: eb03 0383 add.w r3, r3, r3, lsl #2
  13493. 8005b9c: 009a lsls r2, r3, #2
  13494. 8005b9e: 4631 mov r1, r6
  13495. 8005ba0: 4814 ldr r0, [pc, #80] @ (8005bf4 <xTaskIncrementTick+0x108>)
  13496. 8005ba2: 4410 add r0, r2
  13497. 8005ba4: f7fe fd34 bl 8004610 <vListInsertEnd>
  13498. if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
  13499. 8005ba8: 6ae2 ldr r2, [r4, #44] @ 0x2c
  13500. 8005baa: 4b11 ldr r3, [pc, #68] @ (8005bf0 <xTaskIncrementTick+0x104>)
  13501. 8005bac: 681b ldr r3, [r3, #0]
  13502. 8005bae: 6adb ldr r3, [r3, #44] @ 0x2c
  13503. 8005bb0: 429a cmp r2, r3
  13504. 8005bb2: d2d4 bcs.n 8005b5e <xTaskIncrementTick+0x72>
  13505. 8005bb4: e7d4 b.n 8005b60 <xTaskIncrementTick+0x74>
  13506. BaseType_t xSwitchRequired = pdFALSE;
  13507. 8005bb6: 2700 movs r7, #0
  13508. 8005bb8: e7d2 b.n 8005b60 <xTaskIncrementTick+0x74>
  13509. xNextTaskUnblockTime = portMAX_DELAY; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
  13510. 8005bba: 4b0c ldr r3, [pc, #48] @ (8005bec <xTaskIncrementTick+0x100>)
  13511. 8005bbc: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
  13512. 8005bc0: 601a str r2, [r3, #0]
  13513. break;
  13514. 8005bc2: e7bb b.n 8005b3c <xTaskIncrementTick+0x50>
  13515. xNextTaskUnblockTime = xItemValue;
  13516. 8005bc4: 4a09 ldr r2, [pc, #36] @ (8005bec <xTaskIncrementTick+0x100>)
  13517. 8005bc6: 6013 str r3, [r2, #0]
  13518. break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */
  13519. 8005bc8: e7b8 b.n 8005b3c <xTaskIncrementTick+0x50>
  13520. ++xPendedTicks;
  13521. 8005bca: 4a0d ldr r2, [pc, #52] @ (8005c00 <xTaskIncrementTick+0x114>)
  13522. 8005bcc: 6813 ldr r3, [r2, #0]
  13523. 8005bce: 3301 adds r3, #1
  13524. 8005bd0: 6013 str r3, [r2, #0]
  13525. BaseType_t xSwitchRequired = pdFALSE;
  13526. 8005bd2: 2700 movs r7, #0
  13527. }
  13528. 8005bd4: 4638 mov r0, r7
  13529. 8005bd6: bdf8 pop {r3, r4, r5, r6, r7, pc}
  13530. 8005bd8: 240128c8 .word 0x240128c8
  13531. 8005bdc: 240128ec .word 0x240128ec
  13532. 8005be0: 24012938 .word 0x24012938
  13533. 8005be4: 24012934 .word 0x24012934
  13534. 8005be8: 240128d8 .word 0x240128d8
  13535. 8005bec: 240128d0 .word 0x240128d0
  13536. 8005bf0: 24012dc4 .word 0x24012dc4
  13537. 8005bf4: 24012964 .word 0x24012964
  13538. 8005bf8: 240128dc .word 0x240128dc
  13539. 8005bfc: 240128e8 .word 0x240128e8
  13540. 8005c00: 240128e0 .word 0x240128e0
  13541. 08005c04 <xTaskResumeAll>:
  13542. {
  13543. 8005c04: b538 push {r3, r4, r5, lr}
  13544. configASSERT( uxSchedulerSuspended );
  13545. 8005c06: 4b35 ldr r3, [pc, #212] @ (8005cdc <xTaskResumeAll+0xd8>)
  13546. 8005c08: 681b ldr r3, [r3, #0]
  13547. 8005c0a: b943 cbnz r3, 8005c1e <xTaskResumeAll+0x1a>
  13548. 8005c0c: f04f 0350 mov.w r3, #80 @ 0x50
  13549. 8005c10: f383 8811 msr BASEPRI, r3
  13550. 8005c14: f3bf 8f6f isb sy
  13551. 8005c18: f3bf 8f4f dsb sy
  13552. 8005c1c: e7fe b.n 8005c1c <xTaskResumeAll+0x18>
  13553. taskENTER_CRITICAL();
  13554. 8005c1e: f7fe fd99 bl 8004754 <vPortEnterCritical>
  13555. --uxSchedulerSuspended;
  13556. 8005c22: 4b2e ldr r3, [pc, #184] @ (8005cdc <xTaskResumeAll+0xd8>)
  13557. 8005c24: 681a ldr r2, [r3, #0]
  13558. 8005c26: 3a01 subs r2, #1
  13559. 8005c28: 601a str r2, [r3, #0]
  13560. if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
  13561. 8005c2a: 681b ldr r3, [r3, #0]
  13562. 8005c2c: 2b00 cmp r3, #0
  13563. 8005c2e: d14f bne.n 8005cd0 <xTaskResumeAll+0xcc>
  13564. if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U )
  13565. 8005c30: 4b2b ldr r3, [pc, #172] @ (8005ce0 <xTaskResumeAll+0xdc>)
  13566. 8005c32: 681b ldr r3, [r3, #0]
  13567. 8005c34: b90b cbnz r3, 8005c3a <xTaskResumeAll+0x36>
  13568. BaseType_t xAlreadyYielded = pdFALSE;
  13569. 8005c36: 2400 movs r4, #0
  13570. 8005c38: e04b b.n 8005cd2 <xTaskResumeAll+0xce>
  13571. TCB_t *pxTCB = NULL;
  13572. 8005c3a: 2400 movs r4, #0
  13573. while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE )
  13574. 8005c3c: 4b29 ldr r3, [pc, #164] @ (8005ce4 <xTaskResumeAll+0xe0>)
  13575. 8005c3e: 681b ldr r3, [r3, #0]
  13576. 8005c40: b31b cbz r3, 8005c8a <xTaskResumeAll+0x86>
  13577. pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  13578. 8005c42: 4b28 ldr r3, [pc, #160] @ (8005ce4 <xTaskResumeAll+0xe0>)
  13579. 8005c44: 68db ldr r3, [r3, #12]
  13580. 8005c46: 68dc ldr r4, [r3, #12]
  13581. ( void ) uxListRemove( &( pxTCB->xEventListItem ) );
  13582. 8005c48: f104 0018 add.w r0, r4, #24
  13583. 8005c4c: f7fe fd04 bl 8004658 <uxListRemove>
  13584. ( void ) uxListRemove( &( pxTCB->xStateListItem ) );
  13585. 8005c50: 1d25 adds r5, r4, #4
  13586. 8005c52: 4628 mov r0, r5
  13587. 8005c54: f7fe fd00 bl 8004658 <uxListRemove>
  13588. prvAddTaskToReadyList( pxTCB );
  13589. 8005c58: 6ae0 ldr r0, [r4, #44] @ 0x2c
  13590. 8005c5a: 4b23 ldr r3, [pc, #140] @ (8005ce8 <xTaskResumeAll+0xe4>)
  13591. 8005c5c: 681b ldr r3, [r3, #0]
  13592. 8005c5e: 4298 cmp r0, r3
  13593. 8005c60: d901 bls.n 8005c66 <xTaskResumeAll+0x62>
  13594. 8005c62: 4b21 ldr r3, [pc, #132] @ (8005ce8 <xTaskResumeAll+0xe4>)
  13595. 8005c64: 6018 str r0, [r3, #0]
  13596. 8005c66: eb00 0080 add.w r0, r0, r0, lsl #2
  13597. 8005c6a: 4629 mov r1, r5
  13598. 8005c6c: 4b1f ldr r3, [pc, #124] @ (8005cec <xTaskResumeAll+0xe8>)
  13599. 8005c6e: eb03 0080 add.w r0, r3, r0, lsl #2
  13600. 8005c72: f7fe fccd bl 8004610 <vListInsertEnd>
  13601. if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
  13602. 8005c76: 6ae2 ldr r2, [r4, #44] @ 0x2c
  13603. 8005c78: 4b1d ldr r3, [pc, #116] @ (8005cf0 <xTaskResumeAll+0xec>)
  13604. 8005c7a: 681b ldr r3, [r3, #0]
  13605. 8005c7c: 6adb ldr r3, [r3, #44] @ 0x2c
  13606. 8005c7e: 429a cmp r2, r3
  13607. 8005c80: d3dc bcc.n 8005c3c <xTaskResumeAll+0x38>
  13608. xYieldPending = pdTRUE;
  13609. 8005c82: 4b1c ldr r3, [pc, #112] @ (8005cf4 <xTaskResumeAll+0xf0>)
  13610. 8005c84: 2201 movs r2, #1
  13611. 8005c86: 601a str r2, [r3, #0]
  13612. 8005c88: e7d8 b.n 8005c3c <xTaskResumeAll+0x38>
  13613. if( pxTCB != NULL )
  13614. 8005c8a: b10c cbz r4, 8005c90 <xTaskResumeAll+0x8c>
  13615. prvResetNextTaskUnblockTime();
  13616. 8005c8c: f7ff fcb6 bl 80055fc <prvResetNextTaskUnblockTime>
  13617. TickType_t xPendedCounts = xPendedTicks; /* Non-volatile copy. */
  13618. 8005c90: 4b19 ldr r3, [pc, #100] @ (8005cf8 <xTaskResumeAll+0xf4>)
  13619. 8005c92: 681c ldr r4, [r3, #0]
  13620. if( xPendedCounts > ( TickType_t ) 0U )
  13621. 8005c94: b984 cbnz r4, 8005cb8 <xTaskResumeAll+0xb4>
  13622. if( xYieldPending != pdFALSE )
  13623. 8005c96: 4b17 ldr r3, [pc, #92] @ (8005cf4 <xTaskResumeAll+0xf0>)
  13624. 8005c98: 681c ldr r4, [r3, #0]
  13625. 8005c9a: b1d4 cbz r4, 8005cd2 <xTaskResumeAll+0xce>
  13626. taskYIELD_IF_USING_PREEMPTION();
  13627. 8005c9c: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  13628. 8005ca0: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  13629. 8005ca4: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  13630. 8005ca8: f3bf 8f4f dsb sy
  13631. 8005cac: f3bf 8f6f isb sy
  13632. xAlreadyYielded = pdTRUE;
  13633. 8005cb0: 2401 movs r4, #1
  13634. 8005cb2: e00e b.n 8005cd2 <xTaskResumeAll+0xce>
  13635. } while( xPendedCounts > ( TickType_t ) 0U );
  13636. 8005cb4: 3c01 subs r4, #1
  13637. 8005cb6: d007 beq.n 8005cc8 <xTaskResumeAll+0xc4>
  13638. if( xTaskIncrementTick() != pdFALSE )
  13639. 8005cb8: f7ff ff18 bl 8005aec <xTaskIncrementTick>
  13640. 8005cbc: 2800 cmp r0, #0
  13641. 8005cbe: d0f9 beq.n 8005cb4 <xTaskResumeAll+0xb0>
  13642. xYieldPending = pdTRUE;
  13643. 8005cc0: 4b0c ldr r3, [pc, #48] @ (8005cf4 <xTaskResumeAll+0xf0>)
  13644. 8005cc2: 2201 movs r2, #1
  13645. 8005cc4: 601a str r2, [r3, #0]
  13646. 8005cc6: e7f5 b.n 8005cb4 <xTaskResumeAll+0xb0>
  13647. xPendedTicks = 0;
  13648. 8005cc8: 4b0b ldr r3, [pc, #44] @ (8005cf8 <xTaskResumeAll+0xf4>)
  13649. 8005cca: 2200 movs r2, #0
  13650. 8005ccc: 601a str r2, [r3, #0]
  13651. 8005cce: e7e2 b.n 8005c96 <xTaskResumeAll+0x92>
  13652. BaseType_t xAlreadyYielded = pdFALSE;
  13653. 8005cd0: 2400 movs r4, #0
  13654. taskEXIT_CRITICAL();
  13655. 8005cd2: f7fe fd61 bl 8004798 <vPortExitCritical>
  13656. }
  13657. 8005cd6: 4620 mov r0, r4
  13658. 8005cd8: bd38 pop {r3, r4, r5, pc}
  13659. 8005cda: bf00 nop
  13660. 8005cdc: 240128c8 .word 0x240128c8
  13661. 8005ce0: 240128f0 .word 0x240128f0
  13662. 8005ce4: 24012920 .word 0x24012920
  13663. 8005ce8: 240128e8 .word 0x240128e8
  13664. 8005cec: 24012964 .word 0x24012964
  13665. 8005cf0: 24012dc4 .word 0x24012dc4
  13666. 8005cf4: 240128dc .word 0x240128dc
  13667. 8005cf8: 240128e0 .word 0x240128e0
  13668. 08005cfc <vTaskDelay>:
  13669. {
  13670. 8005cfc: b510 push {r4, lr}
  13671. if( xTicksToDelay > ( TickType_t ) 0U )
  13672. 8005cfe: b1a8 cbz r0, 8005d2c <vTaskDelay+0x30>
  13673. 8005d00: 4604 mov r4, r0
  13674. configASSERT( uxSchedulerSuspended == 0 );
  13675. 8005d02: 4b10 ldr r3, [pc, #64] @ (8005d44 <vTaskDelay+0x48>)
  13676. 8005d04: 681b ldr r3, [r3, #0]
  13677. 8005d06: b143 cbz r3, 8005d1a <vTaskDelay+0x1e>
  13678. 8005d08: f04f 0350 mov.w r3, #80 @ 0x50
  13679. 8005d0c: f383 8811 msr BASEPRI, r3
  13680. 8005d10: f3bf 8f6f isb sy
  13681. 8005d14: f3bf 8f4f dsb sy
  13682. 8005d18: e7fe b.n 8005d18 <vTaskDelay+0x1c>
  13683. vTaskSuspendAll();
  13684. 8005d1a: f7ff fed1 bl 8005ac0 <vTaskSuspendAll>
  13685. prvAddCurrentTaskToDelayedList( xTicksToDelay, pdFALSE );
  13686. 8005d1e: 2100 movs r1, #0
  13687. 8005d20: 4620 mov r0, r4
  13688. 8005d22: f7ff fdc7 bl 80058b4 <prvAddCurrentTaskToDelayedList>
  13689. xAlreadyYielded = xTaskResumeAll();
  13690. 8005d26: f7ff ff6d bl 8005c04 <xTaskResumeAll>
  13691. if( xAlreadyYielded == pdFALSE )
  13692. 8005d2a: b948 cbnz r0, 8005d40 <vTaskDelay+0x44>
  13693. portYIELD_WITHIN_API();
  13694. 8005d2c: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  13695. 8005d30: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  13696. 8005d34: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  13697. 8005d38: f3bf 8f4f dsb sy
  13698. 8005d3c: f3bf 8f6f isb sy
  13699. }
  13700. 8005d40: bd10 pop {r4, pc}
  13701. 8005d42: bf00 nop
  13702. 8005d44: 240128c8 .word 0x240128c8
  13703. 08005d48 <vTaskSwitchContext>:
  13704. {
  13705. 8005d48: b508 push {r3, lr}
  13706. if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
  13707. 8005d4a: 4b29 ldr r3, [pc, #164] @ (8005df0 <vTaskSwitchContext+0xa8>)
  13708. 8005d4c: 681b ldr r3, [r3, #0]
  13709. 8005d4e: b11b cbz r3, 8005d58 <vTaskSwitchContext+0x10>
  13710. xYieldPending = pdTRUE;
  13711. 8005d50: 4b28 ldr r3, [pc, #160] @ (8005df4 <vTaskSwitchContext+0xac>)
  13712. 8005d52: 2201 movs r2, #1
  13713. 8005d54: 601a str r2, [r3, #0]
  13714. }
  13715. 8005d56: bd08 pop {r3, pc}
  13716. xYieldPending = pdFALSE;
  13717. 8005d58: 4b26 ldr r3, [pc, #152] @ (8005df4 <vTaskSwitchContext+0xac>)
  13718. 8005d5a: 2200 movs r2, #0
  13719. 8005d5c: 601a str r2, [r3, #0]
  13720. taskCHECK_FOR_STACK_OVERFLOW();
  13721. 8005d5e: 4b26 ldr r3, [pc, #152] @ (8005df8 <vTaskSwitchContext+0xb0>)
  13722. 8005d60: 681a ldr r2, [r3, #0]
  13723. 8005d62: 6812 ldr r2, [r2, #0]
  13724. 8005d64: 681b ldr r3, [r3, #0]
  13725. 8005d66: 6b1b ldr r3, [r3, #48] @ 0x30
  13726. 8005d68: 429a cmp r2, r3
  13727. 8005d6a: d90a bls.n 8005d82 <vTaskSwitchContext+0x3a>
  13728. taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  13729. 8005d6c: 4b23 ldr r3, [pc, #140] @ (8005dfc <vTaskSwitchContext+0xb4>)
  13730. 8005d6e: 681b ldr r3, [r3, #0]
  13731. 8005d70: eb03 0183 add.w r1, r3, r3, lsl #2
  13732. 8005d74: 008a lsls r2, r1, #2
  13733. 8005d76: 4922 ldr r1, [pc, #136] @ (8005e00 <vTaskSwitchContext+0xb8>)
  13734. 8005d78: 588a ldr r2, [r1, r2]
  13735. 8005d7a: b992 cbnz r2, 8005da2 <vTaskSwitchContext+0x5a>
  13736. 8005d7c: b143 cbz r3, 8005d90 <vTaskSwitchContext+0x48>
  13737. 8005d7e: 3b01 subs r3, #1
  13738. 8005d80: e7f6 b.n 8005d70 <vTaskSwitchContext+0x28>
  13739. taskCHECK_FOR_STACK_OVERFLOW();
  13740. 8005d82: 4b1d ldr r3, [pc, #116] @ (8005df8 <vTaskSwitchContext+0xb0>)
  13741. 8005d84: 6818 ldr r0, [r3, #0]
  13742. 8005d86: 6819 ldr r1, [r3, #0]
  13743. 8005d88: 3134 adds r1, #52 @ 0x34
  13744. 8005d8a: f7fa fb83 bl 8000494 <vApplicationStackOverflowHook>
  13745. 8005d8e: e7ed b.n 8005d6c <vTaskSwitchContext+0x24>
  13746. 8005d90: f04f 0350 mov.w r3, #80 @ 0x50
  13747. 8005d94: f383 8811 msr BASEPRI, r3
  13748. 8005d98: f3bf 8f6f isb sy
  13749. 8005d9c: f3bf 8f4f dsb sy
  13750. taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  13751. 8005da0: e7fe b.n 8005da0 <vTaskSwitchContext+0x58>
  13752. 8005da2: 4608 mov r0, r1
  13753. 8005da4: eb03 0183 add.w r1, r3, r3, lsl #2
  13754. 8005da8: 008a lsls r2, r1, #2
  13755. 8005daa: 4402 add r2, r0
  13756. 8005dac: 6851 ldr r1, [r2, #4]
  13757. 8005dae: 6849 ldr r1, [r1, #4]
  13758. 8005db0: 6051 str r1, [r2, #4]
  13759. 8005db2: eb03 0c83 add.w ip, r3, r3, lsl #2
  13760. 8005db6: ea4f 028c mov.w r2, ip, lsl #2
  13761. 8005dba: 3208 adds r2, #8
  13762. 8005dbc: 4402 add r2, r0
  13763. 8005dbe: 4291 cmp r1, r2
  13764. 8005dc0: d00f beq.n 8005de2 <vTaskSwitchContext+0x9a>
  13765. 8005dc2: eb03 0283 add.w r2, r3, r3, lsl #2
  13766. 8005dc6: 0091 lsls r1, r2, #2
  13767. 8005dc8: 4a0d ldr r2, [pc, #52] @ (8005e00 <vTaskSwitchContext+0xb8>)
  13768. 8005dca: 440a add r2, r1
  13769. 8005dcc: 6852 ldr r2, [r2, #4]
  13770. 8005dce: 68d1 ldr r1, [r2, #12]
  13771. 8005dd0: 4a09 ldr r2, [pc, #36] @ (8005df8 <vTaskSwitchContext+0xb0>)
  13772. 8005dd2: 6011 str r1, [r2, #0]
  13773. 8005dd4: 4909 ldr r1, [pc, #36] @ (8005dfc <vTaskSwitchContext+0xb4>)
  13774. 8005dd6: 600b str r3, [r1, #0]
  13775. _impure_ptr = &( pxCurrentTCB->xNewLib_reent );
  13776. 8005dd8: 6813 ldr r3, [r2, #0]
  13777. 8005dda: 3354 adds r3, #84 @ 0x54
  13778. 8005ddc: 4a09 ldr r2, [pc, #36] @ (8005e04 <vTaskSwitchContext+0xbc>)
  13779. 8005dde: 6013 str r3, [r2, #0]
  13780. }
  13781. 8005de0: e7b9 b.n 8005d56 <vTaskSwitchContext+0xe>
  13782. taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  13783. 8005de2: 6848 ldr r0, [r1, #4]
  13784. 8005de4: 4662 mov r2, ip
  13785. 8005de6: 0091 lsls r1, r2, #2
  13786. 8005de8: 4a05 ldr r2, [pc, #20] @ (8005e00 <vTaskSwitchContext+0xb8>)
  13787. 8005dea: 440a add r2, r1
  13788. 8005dec: 6050 str r0, [r2, #4]
  13789. 8005dee: e7e8 b.n 8005dc2 <vTaskSwitchContext+0x7a>
  13790. 8005df0: 240128c8 .word 0x240128c8
  13791. 8005df4: 240128dc .word 0x240128dc
  13792. 8005df8: 24012dc4 .word 0x24012dc4
  13793. 8005dfc: 240128e8 .word 0x240128e8
  13794. 8005e00: 24012964 .word 0x24012964
  13795. 8005e04: 2400003c .word 0x2400003c
  13796. 08005e08 <vTaskPlaceOnEventList>:
  13797. configASSERT( pxEventList );
  13798. 8005e08: b158 cbz r0, 8005e22 <vTaskPlaceOnEventList+0x1a>
  13799. {
  13800. 8005e0a: b510 push {r4, lr}
  13801. 8005e0c: 460c mov r4, r1
  13802. vListInsert( pxEventList, &( pxCurrentTCB->xEventListItem ) );
  13803. 8005e0e: 4a09 ldr r2, [pc, #36] @ (8005e34 <vTaskPlaceOnEventList+0x2c>)
  13804. 8005e10: 6811 ldr r1, [r2, #0]
  13805. 8005e12: 3118 adds r1, #24
  13806. 8005e14: f7fe fc07 bl 8004626 <vListInsert>
  13807. prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE );
  13808. 8005e18: 2101 movs r1, #1
  13809. 8005e1a: 4620 mov r0, r4
  13810. 8005e1c: f7ff fd4a bl 80058b4 <prvAddCurrentTaskToDelayedList>
  13811. }
  13812. 8005e20: bd10 pop {r4, pc}
  13813. 8005e22: f04f 0350 mov.w r3, #80 @ 0x50
  13814. 8005e26: f383 8811 msr BASEPRI, r3
  13815. 8005e2a: f3bf 8f6f isb sy
  13816. 8005e2e: f3bf 8f4f dsb sy
  13817. configASSERT( pxEventList );
  13818. 8005e32: e7fe b.n 8005e32 <vTaskPlaceOnEventList+0x2a>
  13819. 8005e34: 24012dc4 .word 0x24012dc4
  13820. 08005e38 <vTaskPlaceOnEventListRestricted>:
  13821. {
  13822. 8005e38: b538 push {r3, r4, r5, lr}
  13823. configASSERT( pxEventList );
  13824. 8005e3a: b170 cbz r0, 8005e5a <vTaskPlaceOnEventListRestricted+0x22>
  13825. 8005e3c: 460d mov r5, r1
  13826. 8005e3e: 4614 mov r4, r2
  13827. vListInsertEnd( pxEventList, &( pxCurrentTCB->xEventListItem ) );
  13828. 8005e40: 4a0a ldr r2, [pc, #40] @ (8005e6c <vTaskPlaceOnEventListRestricted+0x34>)
  13829. 8005e42: 6811 ldr r1, [r2, #0]
  13830. 8005e44: 3118 adds r1, #24
  13831. 8005e46: f7fe fbe3 bl 8004610 <vListInsertEnd>
  13832. if( xWaitIndefinitely != pdFALSE )
  13833. 8005e4a: b10c cbz r4, 8005e50 <vTaskPlaceOnEventListRestricted+0x18>
  13834. xTicksToWait = portMAX_DELAY;
  13835. 8005e4c: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  13836. prvAddCurrentTaskToDelayedList( xTicksToWait, xWaitIndefinitely );
  13837. 8005e50: 4621 mov r1, r4
  13838. 8005e52: 4628 mov r0, r5
  13839. 8005e54: f7ff fd2e bl 80058b4 <prvAddCurrentTaskToDelayedList>
  13840. }
  13841. 8005e58: bd38 pop {r3, r4, r5, pc}
  13842. 8005e5a: f04f 0350 mov.w r3, #80 @ 0x50
  13843. 8005e5e: f383 8811 msr BASEPRI, r3
  13844. 8005e62: f3bf 8f6f isb sy
  13845. 8005e66: f3bf 8f4f dsb sy
  13846. configASSERT( pxEventList );
  13847. 8005e6a: e7fe b.n 8005e6a <vTaskPlaceOnEventListRestricted+0x32>
  13848. 8005e6c: 24012dc4 .word 0x24012dc4
  13849. 08005e70 <xTaskRemoveFromEventList>:
  13850. {
  13851. 8005e70: b538 push {r3, r4, r5, lr}
  13852. pxUnblockedTCB = listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  13853. 8005e72: 68c3 ldr r3, [r0, #12]
  13854. 8005e74: 68dc ldr r4, [r3, #12]
  13855. configASSERT( pxUnblockedTCB );
  13856. 8005e76: b324 cbz r4, 8005ec2 <xTaskRemoveFromEventList+0x52>
  13857. ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) );
  13858. 8005e78: f104 0518 add.w r5, r4, #24
  13859. 8005e7c: 4628 mov r0, r5
  13860. 8005e7e: f7fe fbeb bl 8004658 <uxListRemove>
  13861. if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
  13862. 8005e82: 4b18 ldr r3, [pc, #96] @ (8005ee4 <xTaskRemoveFromEventList+0x74>)
  13863. 8005e84: 681b ldr r3, [r3, #0]
  13864. 8005e86: bb2b cbnz r3, 8005ed4 <xTaskRemoveFromEventList+0x64>
  13865. ( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) );
  13866. 8005e88: 1d25 adds r5, r4, #4
  13867. 8005e8a: 4628 mov r0, r5
  13868. 8005e8c: f7fe fbe4 bl 8004658 <uxListRemove>
  13869. prvAddTaskToReadyList( pxUnblockedTCB );
  13870. 8005e90: 6ae0 ldr r0, [r4, #44] @ 0x2c
  13871. 8005e92: 4b15 ldr r3, [pc, #84] @ (8005ee8 <xTaskRemoveFromEventList+0x78>)
  13872. 8005e94: 681b ldr r3, [r3, #0]
  13873. 8005e96: 4298 cmp r0, r3
  13874. 8005e98: d901 bls.n 8005e9e <xTaskRemoveFromEventList+0x2e>
  13875. 8005e9a: 4b13 ldr r3, [pc, #76] @ (8005ee8 <xTaskRemoveFromEventList+0x78>)
  13876. 8005e9c: 6018 str r0, [r3, #0]
  13877. 8005e9e: eb00 0080 add.w r0, r0, r0, lsl #2
  13878. 8005ea2: 4629 mov r1, r5
  13879. 8005ea4: 4b11 ldr r3, [pc, #68] @ (8005eec <xTaskRemoveFromEventList+0x7c>)
  13880. 8005ea6: eb03 0080 add.w r0, r3, r0, lsl #2
  13881. 8005eaa: f7fe fbb1 bl 8004610 <vListInsertEnd>
  13882. if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority )
  13883. 8005eae: 6ae2 ldr r2, [r4, #44] @ 0x2c
  13884. 8005eb0: 4b0f ldr r3, [pc, #60] @ (8005ef0 <xTaskRemoveFromEventList+0x80>)
  13885. 8005eb2: 681b ldr r3, [r3, #0]
  13886. 8005eb4: 6adb ldr r3, [r3, #44] @ 0x2c
  13887. 8005eb6: 429a cmp r2, r3
  13888. 8005eb8: d911 bls.n 8005ede <xTaskRemoveFromEventList+0x6e>
  13889. xYieldPending = pdTRUE;
  13890. 8005eba: 2001 movs r0, #1
  13891. 8005ebc: 4b0d ldr r3, [pc, #52] @ (8005ef4 <xTaskRemoveFromEventList+0x84>)
  13892. 8005ebe: 6018 str r0, [r3, #0]
  13893. }
  13894. 8005ec0: bd38 pop {r3, r4, r5, pc}
  13895. 8005ec2: f04f 0350 mov.w r3, #80 @ 0x50
  13896. 8005ec6: f383 8811 msr BASEPRI, r3
  13897. 8005eca: f3bf 8f6f isb sy
  13898. 8005ece: f3bf 8f4f dsb sy
  13899. configASSERT( pxUnblockedTCB );
  13900. 8005ed2: e7fe b.n 8005ed2 <xTaskRemoveFromEventList+0x62>
  13901. vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) );
  13902. 8005ed4: 4629 mov r1, r5
  13903. 8005ed6: 4808 ldr r0, [pc, #32] @ (8005ef8 <xTaskRemoveFromEventList+0x88>)
  13904. 8005ed8: f7fe fb9a bl 8004610 <vListInsertEnd>
  13905. 8005edc: e7e7 b.n 8005eae <xTaskRemoveFromEventList+0x3e>
  13906. xReturn = pdFALSE;
  13907. 8005ede: 2000 movs r0, #0
  13908. return xReturn;
  13909. 8005ee0: e7ee b.n 8005ec0 <xTaskRemoveFromEventList+0x50>
  13910. 8005ee2: bf00 nop
  13911. 8005ee4: 240128c8 .word 0x240128c8
  13912. 8005ee8: 240128e8 .word 0x240128e8
  13913. 8005eec: 24012964 .word 0x24012964
  13914. 8005ef0: 24012dc4 .word 0x24012dc4
  13915. 8005ef4: 240128dc .word 0x240128dc
  13916. 8005ef8: 24012920 .word 0x24012920
  13917. 08005efc <vTaskInternalSetTimeOutState>:
  13918. pxTimeOut->xOverflowCount = xNumOfOverflows;
  13919. 8005efc: 4b03 ldr r3, [pc, #12] @ (8005f0c <vTaskInternalSetTimeOutState+0x10>)
  13920. 8005efe: 681b ldr r3, [r3, #0]
  13921. 8005f00: 6003 str r3, [r0, #0]
  13922. pxTimeOut->xTimeOnEntering = xTickCount;
  13923. 8005f02: 4b03 ldr r3, [pc, #12] @ (8005f10 <vTaskInternalSetTimeOutState+0x14>)
  13924. 8005f04: 681b ldr r3, [r3, #0]
  13925. 8005f06: 6043 str r3, [r0, #4]
  13926. }
  13927. 8005f08: 4770 bx lr
  13928. 8005f0a: bf00 nop
  13929. 8005f0c: 240128d8 .word 0x240128d8
  13930. 8005f10: 240128ec .word 0x240128ec
  13931. 08005f14 <xTaskCheckForTimeOut>:
  13932. {
  13933. 8005f14: b5f8 push {r3, r4, r5, r6, r7, lr}
  13934. configASSERT( pxTimeOut );
  13935. 8005f16: b1c8 cbz r0, 8005f4c <xTaskCheckForTimeOut+0x38>
  13936. 8005f18: 460c mov r4, r1
  13937. 8005f1a: 4605 mov r5, r0
  13938. configASSERT( pxTicksToWait );
  13939. 8005f1c: b1f9 cbz r1, 8005f5e <xTaskCheckForTimeOut+0x4a>
  13940. taskENTER_CRITICAL();
  13941. 8005f1e: f7fe fc19 bl 8004754 <vPortEnterCritical>
  13942. const TickType_t xConstTickCount = xTickCount;
  13943. 8005f22: 4b1b ldr r3, [pc, #108] @ (8005f90 <xTaskCheckForTimeOut+0x7c>)
  13944. 8005f24: 6819 ldr r1, [r3, #0]
  13945. const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering;
  13946. 8005f26: 686b ldr r3, [r5, #4]
  13947. 8005f28: 1ac8 subs r0, r1, r3
  13948. if( *pxTicksToWait == portMAX_DELAY )
  13949. 8005f2a: 6822 ldr r2, [r4, #0]
  13950. 8005f2c: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
  13951. 8005f30: d026 beq.n 8005f80 <xTaskCheckForTimeOut+0x6c>
  13952. if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */
  13953. 8005f32: 4e18 ldr r6, [pc, #96] @ (8005f94 <xTaskCheckForTimeOut+0x80>)
  13954. 8005f34: 6836 ldr r6, [r6, #0]
  13955. 8005f36: 682f ldr r7, [r5, #0]
  13956. 8005f38: 42b7 cmp r7, r6
  13957. 8005f3a: d001 beq.n 8005f40 <xTaskCheckForTimeOut+0x2c>
  13958. 8005f3c: 428b cmp r3, r1
  13959. 8005f3e: d924 bls.n 8005f8a <xTaskCheckForTimeOut+0x76>
  13960. else if( xElapsedTime < *pxTicksToWait ) /*lint !e961 Explicit casting is only redundant with some compilers, whereas others require it to prevent integer conversion errors. */
  13961. 8005f40: 4282 cmp r2, r0
  13962. 8005f42: d815 bhi.n 8005f70 <xTaskCheckForTimeOut+0x5c>
  13963. *pxTicksToWait = 0;
  13964. 8005f44: 2300 movs r3, #0
  13965. 8005f46: 6023 str r3, [r4, #0]
  13966. xReturn = pdTRUE;
  13967. 8005f48: 2401 movs r4, #1
  13968. 8005f4a: e01a b.n 8005f82 <xTaskCheckForTimeOut+0x6e>
  13969. 8005f4c: f04f 0350 mov.w r3, #80 @ 0x50
  13970. 8005f50: f383 8811 msr BASEPRI, r3
  13971. 8005f54: f3bf 8f6f isb sy
  13972. 8005f58: f3bf 8f4f dsb sy
  13973. configASSERT( pxTimeOut );
  13974. 8005f5c: e7fe b.n 8005f5c <xTaskCheckForTimeOut+0x48>
  13975. 8005f5e: f04f 0350 mov.w r3, #80 @ 0x50
  13976. 8005f62: f383 8811 msr BASEPRI, r3
  13977. 8005f66: f3bf 8f6f isb sy
  13978. 8005f6a: f3bf 8f4f dsb sy
  13979. configASSERT( pxTicksToWait );
  13980. 8005f6e: e7fe b.n 8005f6e <xTaskCheckForTimeOut+0x5a>
  13981. *pxTicksToWait -= xElapsedTime;
  13982. 8005f70: 1a5b subs r3, r3, r1
  13983. 8005f72: 4413 add r3, r2
  13984. 8005f74: 6023 str r3, [r4, #0]
  13985. vTaskInternalSetTimeOutState( pxTimeOut );
  13986. 8005f76: 4628 mov r0, r5
  13987. 8005f78: f7ff ffc0 bl 8005efc <vTaskInternalSetTimeOutState>
  13988. xReturn = pdFALSE;
  13989. 8005f7c: 2400 movs r4, #0
  13990. 8005f7e: e000 b.n 8005f82 <xTaskCheckForTimeOut+0x6e>
  13991. xReturn = pdFALSE;
  13992. 8005f80: 2400 movs r4, #0
  13993. taskEXIT_CRITICAL();
  13994. 8005f82: f7fe fc09 bl 8004798 <vPortExitCritical>
  13995. }
  13996. 8005f86: 4620 mov r0, r4
  13997. 8005f88: bdf8 pop {r3, r4, r5, r6, r7, pc}
  13998. xReturn = pdTRUE;
  13999. 8005f8a: 2401 movs r4, #1
  14000. 8005f8c: e7f9 b.n 8005f82 <xTaskCheckForTimeOut+0x6e>
  14001. 8005f8e: bf00 nop
  14002. 8005f90: 240128ec .word 0x240128ec
  14003. 8005f94: 240128d8 .word 0x240128d8
  14004. 08005f98 <vTaskMissedYield>:
  14005. xYieldPending = pdTRUE;
  14006. 8005f98: 4b01 ldr r3, [pc, #4] @ (8005fa0 <vTaskMissedYield+0x8>)
  14007. 8005f9a: 2201 movs r2, #1
  14008. 8005f9c: 601a str r2, [r3, #0]
  14009. }
  14010. 8005f9e: 4770 bx lr
  14011. 8005fa0: 240128dc .word 0x240128dc
  14012. 08005fa4 <xTaskGetCurrentTaskHandle>:
  14013. xReturn = pxCurrentTCB;
  14014. 8005fa4: 4b01 ldr r3, [pc, #4] @ (8005fac <xTaskGetCurrentTaskHandle+0x8>)
  14015. 8005fa6: 6818 ldr r0, [r3, #0]
  14016. }
  14017. 8005fa8: 4770 bx lr
  14018. 8005faa: bf00 nop
  14019. 8005fac: 24012dc4 .word 0x24012dc4
  14020. 08005fb0 <xTaskGetSchedulerState>:
  14021. if( xSchedulerRunning == pdFALSE )
  14022. 8005fb0: 4b05 ldr r3, [pc, #20] @ (8005fc8 <xTaskGetSchedulerState+0x18>)
  14023. 8005fb2: 681b ldr r3, [r3, #0]
  14024. 8005fb4: b133 cbz r3, 8005fc4 <xTaskGetSchedulerState+0x14>
  14025. if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
  14026. 8005fb6: 4b05 ldr r3, [pc, #20] @ (8005fcc <xTaskGetSchedulerState+0x1c>)
  14027. 8005fb8: 681b ldr r3, [r3, #0]
  14028. 8005fba: b10b cbz r3, 8005fc0 <xTaskGetSchedulerState+0x10>
  14029. xReturn = taskSCHEDULER_SUSPENDED;
  14030. 8005fbc: 2000 movs r0, #0
  14031. }
  14032. 8005fbe: 4770 bx lr
  14033. xReturn = taskSCHEDULER_RUNNING;
  14034. 8005fc0: 2002 movs r0, #2
  14035. 8005fc2: 4770 bx lr
  14036. xReturn = taskSCHEDULER_NOT_STARTED;
  14037. 8005fc4: 2001 movs r0, #1
  14038. 8005fc6: 4770 bx lr
  14039. 8005fc8: 240128e4 .word 0x240128e4
  14040. 8005fcc: 240128c8 .word 0x240128c8
  14041. 08005fd0 <xTaskPriorityInherit>:
  14042. if( pxMutexHolder != NULL )
  14043. 8005fd0: 2800 cmp r0, #0
  14044. 8005fd2: d03e beq.n 8006052 <xTaskPriorityInherit+0x82>
  14045. {
  14046. 8005fd4: b538 push {r3, r4, r5, lr}
  14047. 8005fd6: 4604 mov r4, r0
  14048. if( pxMutexHolderTCB->uxPriority < pxCurrentTCB->uxPriority )
  14049. 8005fd8: 6ac3 ldr r3, [r0, #44] @ 0x2c
  14050. 8005fda: 4a20 ldr r2, [pc, #128] @ (800605c <xTaskPriorityInherit+0x8c>)
  14051. 8005fdc: 6812 ldr r2, [r2, #0]
  14052. 8005fde: 6ad2 ldr r2, [r2, #44] @ 0x2c
  14053. 8005fe0: 4293 cmp r3, r2
  14054. 8005fe2: d22e bcs.n 8006042 <xTaskPriorityInherit+0x72>
  14055. if( ( listGET_LIST_ITEM_VALUE( &( pxMutexHolderTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL )
  14056. 8005fe4: 6982 ldr r2, [r0, #24]
  14057. 8005fe6: 2a00 cmp r2, #0
  14058. 8005fe8: db05 blt.n 8005ff6 <xTaskPriorityInherit+0x26>
  14059. listSET_LIST_ITEM_VALUE( &( pxMutexHolderTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxCurrentTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
  14060. 8005fea: 4a1c ldr r2, [pc, #112] @ (800605c <xTaskPriorityInherit+0x8c>)
  14061. 8005fec: 6812 ldr r2, [r2, #0]
  14062. 8005fee: 6ad2 ldr r2, [r2, #44] @ 0x2c
  14063. 8005ff0: f1c2 0238 rsb r2, r2, #56 @ 0x38
  14064. 8005ff4: 6182 str r2, [r0, #24]
  14065. if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxMutexHolderTCB->uxPriority ] ), &( pxMutexHolderTCB->xStateListItem ) ) != pdFALSE )
  14066. 8005ff6: 6961 ldr r1, [r4, #20]
  14067. 8005ff8: eb03 0383 add.w r3, r3, r3, lsl #2
  14068. 8005ffc: 4a18 ldr r2, [pc, #96] @ (8006060 <xTaskPriorityInherit+0x90>)
  14069. 8005ffe: eb02 0383 add.w r3, r2, r3, lsl #2
  14070. 8006002: 4299 cmp r1, r3
  14071. 8006004: d005 beq.n 8006012 <xTaskPriorityInherit+0x42>
  14072. pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
  14073. 8006006: 4b15 ldr r3, [pc, #84] @ (800605c <xTaskPriorityInherit+0x8c>)
  14074. 8006008: 681b ldr r3, [r3, #0]
  14075. 800600a: 6adb ldr r3, [r3, #44] @ 0x2c
  14076. 800600c: 62e3 str r3, [r4, #44] @ 0x2c
  14077. xReturn = pdTRUE;
  14078. 800600e: 2001 movs r0, #1
  14079. }
  14080. 8006010: bd38 pop {r3, r4, r5, pc}
  14081. if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
  14082. 8006012: 1d25 adds r5, r4, #4
  14083. 8006014: 4628 mov r0, r5
  14084. 8006016: f7fe fb1f bl 8004658 <uxListRemove>
  14085. pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority;
  14086. 800601a: 4b10 ldr r3, [pc, #64] @ (800605c <xTaskPriorityInherit+0x8c>)
  14087. 800601c: 681b ldr r3, [r3, #0]
  14088. 800601e: 6ad8 ldr r0, [r3, #44] @ 0x2c
  14089. 8006020: 62e0 str r0, [r4, #44] @ 0x2c
  14090. prvAddTaskToReadyList( pxMutexHolderTCB );
  14091. 8006022: 4b10 ldr r3, [pc, #64] @ (8006064 <xTaskPriorityInherit+0x94>)
  14092. 8006024: 681b ldr r3, [r3, #0]
  14093. 8006026: 4298 cmp r0, r3
  14094. 8006028: d901 bls.n 800602e <xTaskPriorityInherit+0x5e>
  14095. 800602a: 4b0e ldr r3, [pc, #56] @ (8006064 <xTaskPriorityInherit+0x94>)
  14096. 800602c: 6018 str r0, [r3, #0]
  14097. 800602e: eb00 0080 add.w r0, r0, r0, lsl #2
  14098. 8006032: 4629 mov r1, r5
  14099. 8006034: 4b0a ldr r3, [pc, #40] @ (8006060 <xTaskPriorityInherit+0x90>)
  14100. 8006036: eb03 0080 add.w r0, r3, r0, lsl #2
  14101. 800603a: f7fe fae9 bl 8004610 <vListInsertEnd>
  14102. xReturn = pdTRUE;
  14103. 800603e: 2001 movs r0, #1
  14104. 8006040: e7e6 b.n 8006010 <xTaskPriorityInherit+0x40>
  14105. if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority )
  14106. 8006042: 6cc2 ldr r2, [r0, #76] @ 0x4c
  14107. 8006044: 4b05 ldr r3, [pc, #20] @ (800605c <xTaskPriorityInherit+0x8c>)
  14108. 8006046: 681b ldr r3, [r3, #0]
  14109. 8006048: 6adb ldr r3, [r3, #44] @ 0x2c
  14110. 800604a: 429a cmp r2, r3
  14111. 800604c: d303 bcc.n 8006056 <xTaskPriorityInherit+0x86>
  14112. BaseType_t xReturn = pdFALSE;
  14113. 800604e: 2000 movs r0, #0
  14114. 8006050: e7de b.n 8006010 <xTaskPriorityInherit+0x40>
  14115. 8006052: 2000 movs r0, #0
  14116. }
  14117. 8006054: 4770 bx lr
  14118. xReturn = pdTRUE;
  14119. 8006056: 2001 movs r0, #1
  14120. return xReturn;
  14121. 8006058: e7da b.n 8006010 <xTaskPriorityInherit+0x40>
  14122. 800605a: bf00 nop
  14123. 800605c: 24012dc4 .word 0x24012dc4
  14124. 8006060: 24012964 .word 0x24012964
  14125. 8006064: 240128e8 .word 0x240128e8
  14126. 08006068 <xTaskPriorityDisinherit>:
  14127. if( pxMutexHolder != NULL )
  14128. 8006068: 2800 cmp r0, #0
  14129. 800606a: d03b beq.n 80060e4 <xTaskPriorityDisinherit+0x7c>
  14130. {
  14131. 800606c: b538 push {r3, r4, r5, lr}
  14132. 800606e: 4604 mov r4, r0
  14133. configASSERT( pxTCB == pxCurrentTCB );
  14134. 8006070: 4b1e ldr r3, [pc, #120] @ (80060ec <xTaskPriorityDisinherit+0x84>)
  14135. 8006072: 681b ldr r3, [r3, #0]
  14136. 8006074: 4283 cmp r3, r0
  14137. 8006076: d008 beq.n 800608a <xTaskPriorityDisinherit+0x22>
  14138. 8006078: f04f 0350 mov.w r3, #80 @ 0x50
  14139. 800607c: f383 8811 msr BASEPRI, r3
  14140. 8006080: f3bf 8f6f isb sy
  14141. 8006084: f3bf 8f4f dsb sy
  14142. 8006088: e7fe b.n 8006088 <xTaskPriorityDisinherit+0x20>
  14143. configASSERT( pxTCB->uxMutexesHeld );
  14144. 800608a: 6d03 ldr r3, [r0, #80] @ 0x50
  14145. 800608c: b943 cbnz r3, 80060a0 <xTaskPriorityDisinherit+0x38>
  14146. 800608e: f04f 0350 mov.w r3, #80 @ 0x50
  14147. 8006092: f383 8811 msr BASEPRI, r3
  14148. 8006096: f3bf 8f6f isb sy
  14149. 800609a: f3bf 8f4f dsb sy
  14150. 800609e: e7fe b.n 800609e <xTaskPriorityDisinherit+0x36>
  14151. ( pxTCB->uxMutexesHeld )--;
  14152. 80060a0: 3b01 subs r3, #1
  14153. 80060a2: 6503 str r3, [r0, #80] @ 0x50
  14154. if( pxTCB->uxPriority != pxTCB->uxBasePriority )
  14155. 80060a4: 6ac1 ldr r1, [r0, #44] @ 0x2c
  14156. 80060a6: 6cc2 ldr r2, [r0, #76] @ 0x4c
  14157. 80060a8: 4291 cmp r1, r2
  14158. 80060aa: d01d beq.n 80060e8 <xTaskPriorityDisinherit+0x80>
  14159. if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 )
  14160. 80060ac: b10b cbz r3, 80060b2 <xTaskPriorityDisinherit+0x4a>
  14161. BaseType_t xReturn = pdFALSE;
  14162. 80060ae: 2000 movs r0, #0
  14163. }
  14164. 80060b0: bd38 pop {r3, r4, r5, pc}
  14165. if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
  14166. 80060b2: 1d05 adds r5, r0, #4
  14167. 80060b4: 4628 mov r0, r5
  14168. 80060b6: f7fe facf bl 8004658 <uxListRemove>
  14169. pxTCB->uxPriority = pxTCB->uxBasePriority;
  14170. 80060ba: 6ce0 ldr r0, [r4, #76] @ 0x4c
  14171. 80060bc: 62e0 str r0, [r4, #44] @ 0x2c
  14172. listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
  14173. 80060be: f1c0 0338 rsb r3, r0, #56 @ 0x38
  14174. 80060c2: 61a3 str r3, [r4, #24]
  14175. prvAddTaskToReadyList( pxTCB );
  14176. 80060c4: 4b0a ldr r3, [pc, #40] @ (80060f0 <xTaskPriorityDisinherit+0x88>)
  14177. 80060c6: 681b ldr r3, [r3, #0]
  14178. 80060c8: 4298 cmp r0, r3
  14179. 80060ca: d901 bls.n 80060d0 <xTaskPriorityDisinherit+0x68>
  14180. 80060cc: 4b08 ldr r3, [pc, #32] @ (80060f0 <xTaskPriorityDisinherit+0x88>)
  14181. 80060ce: 6018 str r0, [r3, #0]
  14182. 80060d0: eb00 0080 add.w r0, r0, r0, lsl #2
  14183. 80060d4: 4629 mov r1, r5
  14184. 80060d6: 4b07 ldr r3, [pc, #28] @ (80060f4 <xTaskPriorityDisinherit+0x8c>)
  14185. 80060d8: eb03 0080 add.w r0, r3, r0, lsl #2
  14186. 80060dc: f7fe fa98 bl 8004610 <vListInsertEnd>
  14187. xReturn = pdTRUE;
  14188. 80060e0: 2001 movs r0, #1
  14189. 80060e2: e7e5 b.n 80060b0 <xTaskPriorityDisinherit+0x48>
  14190. BaseType_t xReturn = pdFALSE;
  14191. 80060e4: 2000 movs r0, #0
  14192. }
  14193. 80060e6: 4770 bx lr
  14194. BaseType_t xReturn = pdFALSE;
  14195. 80060e8: 2000 movs r0, #0
  14196. 80060ea: e7e1 b.n 80060b0 <xTaskPriorityDisinherit+0x48>
  14197. 80060ec: 24012dc4 .word 0x24012dc4
  14198. 80060f0: 240128e8 .word 0x240128e8
  14199. 80060f4: 24012964 .word 0x24012964
  14200. 080060f8 <vTaskPriorityDisinheritAfterTimeout>:
  14201. if( pxMutexHolder != NULL )
  14202. 80060f8: 2800 cmp r0, #0
  14203. 80060fa: d046 beq.n 800618a <vTaskPriorityDisinheritAfterTimeout+0x92>
  14204. {
  14205. 80060fc: b538 push {r3, r4, r5, lr}
  14206. 80060fe: 4604 mov r4, r0
  14207. configASSERT( pxTCB->uxMutexesHeld );
  14208. 8006100: 6d03 ldr r3, [r0, #80] @ 0x50
  14209. 8006102: b943 cbnz r3, 8006116 <vTaskPriorityDisinheritAfterTimeout+0x1e>
  14210. 8006104: f04f 0350 mov.w r3, #80 @ 0x50
  14211. 8006108: f383 8811 msr BASEPRI, r3
  14212. 800610c: f3bf 8f6f isb sy
  14213. 8006110: f3bf 8f4f dsb sy
  14214. 8006114: e7fe b.n 8006114 <vTaskPriorityDisinheritAfterTimeout+0x1c>
  14215. if( pxTCB->uxBasePriority < uxHighestPriorityWaitingTask )
  14216. 8006116: 6cc2 ldr r2, [r0, #76] @ 0x4c
  14217. 8006118: 428a cmp r2, r1
  14218. 800611a: d200 bcs.n 800611e <vTaskPriorityDisinheritAfterTimeout+0x26>
  14219. uxPriorityToUse = uxHighestPriorityWaitingTask;
  14220. 800611c: 460a mov r2, r1
  14221. if( pxTCB->uxPriority != uxPriorityToUse )
  14222. 800611e: 6ae1 ldr r1, [r4, #44] @ 0x2c
  14223. 8006120: 4291 cmp r1, r2
  14224. 8006122: d001 beq.n 8006128 <vTaskPriorityDisinheritAfterTimeout+0x30>
  14225. if( pxTCB->uxMutexesHeld == uxOnlyOneMutexHeld )
  14226. 8006124: 2b01 cmp r3, #1
  14227. 8006126: d000 beq.n 800612a <vTaskPriorityDisinheritAfterTimeout+0x32>
  14228. }
  14229. 8006128: bd38 pop {r3, r4, r5, pc}
  14230. configASSERT( pxTCB != pxCurrentTCB );
  14231. 800612a: 4b18 ldr r3, [pc, #96] @ (800618c <vTaskPriorityDisinheritAfterTimeout+0x94>)
  14232. 800612c: 681b ldr r3, [r3, #0]
  14233. 800612e: 42a3 cmp r3, r4
  14234. 8006130: d022 beq.n 8006178 <vTaskPriorityDisinheritAfterTimeout+0x80>
  14235. pxTCB->uxPriority = uxPriorityToUse;
  14236. 8006132: 62e2 str r2, [r4, #44] @ 0x2c
  14237. if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL )
  14238. 8006134: 69a3 ldr r3, [r4, #24]
  14239. 8006136: 2b00 cmp r3, #0
  14240. 8006138: db02 blt.n 8006140 <vTaskPriorityDisinheritAfterTimeout+0x48>
  14241. listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriorityToUse ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
  14242. 800613a: f1c2 0238 rsb r2, r2, #56 @ 0x38
  14243. 800613e: 61a2 str r2, [r4, #24]
  14244. if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ uxPriorityUsedOnEntry ] ), &( pxTCB->xStateListItem ) ) != pdFALSE )
  14245. 8006140: 6962 ldr r2, [r4, #20]
  14246. 8006142: eb01 0181 add.w r1, r1, r1, lsl #2
  14247. 8006146: 4b12 ldr r3, [pc, #72] @ (8006190 <vTaskPriorityDisinheritAfterTimeout+0x98>)
  14248. 8006148: eb03 0381 add.w r3, r3, r1, lsl #2
  14249. 800614c: 429a cmp r2, r3
  14250. 800614e: d1eb bne.n 8006128 <vTaskPriorityDisinheritAfterTimeout+0x30>
  14251. if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
  14252. 8006150: 1d25 adds r5, r4, #4
  14253. 8006152: 4628 mov r0, r5
  14254. 8006154: f7fe fa80 bl 8004658 <uxListRemove>
  14255. prvAddTaskToReadyList( pxTCB );
  14256. 8006158: 6ae0 ldr r0, [r4, #44] @ 0x2c
  14257. 800615a: 4b0e ldr r3, [pc, #56] @ (8006194 <vTaskPriorityDisinheritAfterTimeout+0x9c>)
  14258. 800615c: 681b ldr r3, [r3, #0]
  14259. 800615e: 4298 cmp r0, r3
  14260. 8006160: d901 bls.n 8006166 <vTaskPriorityDisinheritAfterTimeout+0x6e>
  14261. 8006162: 4b0c ldr r3, [pc, #48] @ (8006194 <vTaskPriorityDisinheritAfterTimeout+0x9c>)
  14262. 8006164: 6018 str r0, [r3, #0]
  14263. 8006166: eb00 0080 add.w r0, r0, r0, lsl #2
  14264. 800616a: 4629 mov r1, r5
  14265. 800616c: 4b08 ldr r3, [pc, #32] @ (8006190 <vTaskPriorityDisinheritAfterTimeout+0x98>)
  14266. 800616e: eb03 0080 add.w r0, r3, r0, lsl #2
  14267. 8006172: f7fe fa4d bl 8004610 <vListInsertEnd>
  14268. }
  14269. 8006176: e7d7 b.n 8006128 <vTaskPriorityDisinheritAfterTimeout+0x30>
  14270. 8006178: f04f 0350 mov.w r3, #80 @ 0x50
  14271. 800617c: f383 8811 msr BASEPRI, r3
  14272. 8006180: f3bf 8f6f isb sy
  14273. 8006184: f3bf 8f4f dsb sy
  14274. configASSERT( pxTCB != pxCurrentTCB );
  14275. 8006188: e7fe b.n 8006188 <vTaskPriorityDisinheritAfterTimeout+0x90>
  14276. 800618a: 4770 bx lr
  14277. 800618c: 24012dc4 .word 0x24012dc4
  14278. 8006190: 24012964 .word 0x24012964
  14279. 8006194: 240128e8 .word 0x240128e8
  14280. 08006198 <pvTaskIncrementMutexHeldCount>:
  14281. if( pxCurrentTCB != NULL )
  14282. 8006198: 4b05 ldr r3, [pc, #20] @ (80061b0 <pvTaskIncrementMutexHeldCount+0x18>)
  14283. 800619a: 681b ldr r3, [r3, #0]
  14284. 800619c: b123 cbz r3, 80061a8 <pvTaskIncrementMutexHeldCount+0x10>
  14285. ( pxCurrentTCB->uxMutexesHeld )++;
  14286. 800619e: 4b04 ldr r3, [pc, #16] @ (80061b0 <pvTaskIncrementMutexHeldCount+0x18>)
  14287. 80061a0: 681a ldr r2, [r3, #0]
  14288. 80061a2: 6d13 ldr r3, [r2, #80] @ 0x50
  14289. 80061a4: 3301 adds r3, #1
  14290. 80061a6: 6513 str r3, [r2, #80] @ 0x50
  14291. return pxCurrentTCB;
  14292. 80061a8: 4b01 ldr r3, [pc, #4] @ (80061b0 <pvTaskIncrementMutexHeldCount+0x18>)
  14293. 80061aa: 6818 ldr r0, [r3, #0]
  14294. }
  14295. 80061ac: 4770 bx lr
  14296. 80061ae: bf00 nop
  14297. 80061b0: 24012dc4 .word 0x24012dc4
  14298. 080061b4 <prvGetNextExpireTime>:
  14299. the timer with the nearest expiry time will expire. If there are no
  14300. active timers then just set the next expire time to 0. That will cause
  14301. this task to unblock when the tick count overflows, at which point the
  14302. timer lists will be switched and the next expiry time can be
  14303. re-assessed. */
  14304. *pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList );
  14305. 80061b4: 4b06 ldr r3, [pc, #24] @ (80061d0 <prvGetNextExpireTime+0x1c>)
  14306. 80061b6: 681a ldr r2, [r3, #0]
  14307. 80061b8: 6813 ldr r3, [r2, #0]
  14308. 80061ba: b92b cbnz r3, 80061c8 <prvGetNextExpireTime+0x14>
  14309. 80061bc: 2301 movs r3, #1
  14310. 80061be: 6003 str r3, [r0, #0]
  14311. if( *pxListWasEmpty == pdFALSE )
  14312. 80061c0: b923 cbnz r3, 80061cc <prvGetNextExpireTime+0x18>
  14313. {
  14314. xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList );
  14315. 80061c2: 68d3 ldr r3, [r2, #12]
  14316. 80061c4: 6818 ldr r0, [r3, #0]
  14317. 80061c6: 4770 bx lr
  14318. *pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList );
  14319. 80061c8: 2300 movs r3, #0
  14320. 80061ca: e7f8 b.n 80061be <prvGetNextExpireTime+0xa>
  14321. }
  14322. else
  14323. {
  14324. /* Ensure the task unblocks when the tick count rolls over. */
  14325. xNextExpireTime = ( TickType_t ) 0U;
  14326. 80061cc: 2000 movs r0, #0
  14327. }
  14328. return xNextExpireTime;
  14329. }
  14330. 80061ce: 4770 bx lr
  14331. 80061d0: 24012ec8 .word 0x24012ec8
  14332. 080061d4 <prvInsertTimerInActiveList>:
  14333. return xTimeNow;
  14334. }
  14335. /*-----------------------------------------------------------*/
  14336. static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime )
  14337. {
  14338. 80061d4: b508 push {r3, lr}
  14339. BaseType_t xProcessTimerNow = pdFALSE;
  14340. listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime );
  14341. 80061d6: 6041 str r1, [r0, #4]
  14342. listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer );
  14343. 80061d8: 6100 str r0, [r0, #16]
  14344. if( xNextExpiryTime <= xTimeNow )
  14345. 80061da: 4291 cmp r1, r2
  14346. 80061dc: d80c bhi.n 80061f8 <prvInsertTimerInActiveList+0x24>
  14347. {
  14348. /* Has the expiry time elapsed between the command to start/reset a
  14349. timer was issued, and the time the command was processed? */
  14350. if( ( ( TickType_t ) ( xTimeNow - xCommandTime ) ) >= pxTimer->xTimerPeriodInTicks ) /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
  14351. 80061de: 1ad2 subs r2, r2, r3
  14352. 80061e0: 6983 ldr r3, [r0, #24]
  14353. 80061e2: 429a cmp r2, r3
  14354. 80061e4: d301 bcc.n 80061ea <prvInsertTimerInActiveList+0x16>
  14355. {
  14356. /* The time between a command being issued and the command being
  14357. processed actually exceeds the timers period. */
  14358. xProcessTimerNow = pdTRUE;
  14359. 80061e6: 2001 movs r0, #1
  14360. vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) );
  14361. }
  14362. }
  14363. return xProcessTimerNow;
  14364. }
  14365. 80061e8: bd08 pop {r3, pc}
  14366. vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) );
  14367. 80061ea: 1d01 adds r1, r0, #4
  14368. 80061ec: 4b0b ldr r3, [pc, #44] @ (800621c <prvInsertTimerInActiveList+0x48>)
  14369. 80061ee: 6818 ldr r0, [r3, #0]
  14370. 80061f0: f7fe fa19 bl 8004626 <vListInsert>
  14371. BaseType_t xProcessTimerNow = pdFALSE;
  14372. 80061f4: 2000 movs r0, #0
  14373. 80061f6: e7f7 b.n 80061e8 <prvInsertTimerInActiveList+0x14>
  14374. if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) )
  14375. 80061f8: 429a cmp r2, r3
  14376. 80061fa: bf2c ite cs
  14377. 80061fc: 2200 movcs r2, #0
  14378. 80061fe: 2201 movcc r2, #1
  14379. 8006200: 4299 cmp r1, r3
  14380. 8006202: bf38 it cc
  14381. 8006204: 2200 movcc r2, #0
  14382. 8006206: b10a cbz r2, 800620c <prvInsertTimerInActiveList+0x38>
  14383. xProcessTimerNow = pdTRUE;
  14384. 8006208: 2001 movs r0, #1
  14385. return xProcessTimerNow;
  14386. 800620a: e7ed b.n 80061e8 <prvInsertTimerInActiveList+0x14>
  14387. vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) );
  14388. 800620c: 1d01 adds r1, r0, #4
  14389. 800620e: 4b04 ldr r3, [pc, #16] @ (8006220 <prvInsertTimerInActiveList+0x4c>)
  14390. 8006210: 6818 ldr r0, [r3, #0]
  14391. 8006212: f7fe fa08 bl 8004626 <vListInsert>
  14392. BaseType_t xProcessTimerNow = pdFALSE;
  14393. 8006216: 2000 movs r0, #0
  14394. 8006218: e7e6 b.n 80061e8 <prvInsertTimerInActiveList+0x14>
  14395. 800621a: bf00 nop
  14396. 800621c: 24012ec4 .word 0x24012ec4
  14397. 8006220: 24012ec8 .word 0x24012ec8
  14398. 08006224 <prvCheckForValidListAndQueue>:
  14399. pxOverflowTimerList = pxTemp;
  14400. }
  14401. /*-----------------------------------------------------------*/
  14402. static void prvCheckForValidListAndQueue( void )
  14403. {
  14404. 8006224: b530 push {r4, r5, lr}
  14405. 8006226: b083 sub sp, #12
  14406. /* Check that the list from which active timers are referenced, and the
  14407. queue used to communicate with the timer service, have been
  14408. initialised. */
  14409. taskENTER_CRITICAL();
  14410. 8006228: f7fe fa94 bl 8004754 <vPortEnterCritical>
  14411. {
  14412. if( xTimerQueue == NULL )
  14413. 800622c: 4b11 ldr r3, [pc, #68] @ (8006274 <prvCheckForValidListAndQueue+0x50>)
  14414. 800622e: 681b ldr r3, [r3, #0]
  14415. 8006230: b11b cbz r3, 800623a <prvCheckForValidListAndQueue+0x16>
  14416. else
  14417. {
  14418. mtCOVERAGE_TEST_MARKER();
  14419. }
  14420. }
  14421. taskEXIT_CRITICAL();
  14422. 8006232: f7fe fab1 bl 8004798 <vPortExitCritical>
  14423. }
  14424. 8006236: b003 add sp, #12
  14425. 8006238: bd30 pop {r4, r5, pc}
  14426. vListInitialise( &xActiveTimerList1 );
  14427. 800623a: 4d0f ldr r5, [pc, #60] @ (8006278 <prvCheckForValidListAndQueue+0x54>)
  14428. 800623c: 4628 mov r0, r5
  14429. 800623e: f7fe f9d9 bl 80045f4 <vListInitialise>
  14430. vListInitialise( &xActiveTimerList2 );
  14431. 8006242: 4c0e ldr r4, [pc, #56] @ (800627c <prvCheckForValidListAndQueue+0x58>)
  14432. 8006244: 4620 mov r0, r4
  14433. 8006246: f7fe f9d5 bl 80045f4 <vListInitialise>
  14434. pxCurrentTimerList = &xActiveTimerList1;
  14435. 800624a: 4b0d ldr r3, [pc, #52] @ (8006280 <prvCheckForValidListAndQueue+0x5c>)
  14436. 800624c: 601d str r5, [r3, #0]
  14437. pxOverflowTimerList = &xActiveTimerList2;
  14438. 800624e: 4b0d ldr r3, [pc, #52] @ (8006284 <prvCheckForValidListAndQueue+0x60>)
  14439. 8006250: 601c str r4, [r3, #0]
  14440. xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );
  14441. 8006252: 2300 movs r3, #0
  14442. 8006254: 9300 str r3, [sp, #0]
  14443. 8006256: 4b0c ldr r3, [pc, #48] @ (8006288 <prvCheckForValidListAndQueue+0x64>)
  14444. 8006258: 4a0c ldr r2, [pc, #48] @ (800628c <prvCheckForValidListAndQueue+0x68>)
  14445. 800625a: 2110 movs r1, #16
  14446. 800625c: 200a movs r0, #10
  14447. 800625e: f7fe fcc8 bl 8004bf2 <xQueueGenericCreateStatic>
  14448. 8006262: 4b04 ldr r3, [pc, #16] @ (8006274 <prvCheckForValidListAndQueue+0x50>)
  14449. 8006264: 6018 str r0, [r3, #0]
  14450. if( xTimerQueue != NULL )
  14451. 8006266: 2800 cmp r0, #0
  14452. 8006268: d0e3 beq.n 8006232 <prvCheckForValidListAndQueue+0xe>
  14453. vQueueAddToRegistry( xTimerQueue, "TmrQ" );
  14454. 800626a: 4909 ldr r1, [pc, #36] @ (8006290 <prvCheckForValidListAndQueue+0x6c>)
  14455. 800626c: f7ff f95c bl 8005528 <vQueueAddToRegistry>
  14456. 8006270: e7df b.n 8006232 <prvCheckForValidListAndQueue+0xe>
  14457. 8006272: bf00 nop
  14458. 8006274: 24012ec0 .word 0x24012ec0
  14459. 8006278: 24012ee0 .word 0x24012ee0
  14460. 800627c: 24012ecc .word 0x24012ecc
  14461. 8006280: 24012ec8 .word 0x24012ec8
  14462. 8006284: 24012ec4 .word 0x24012ec4
  14463. 8006288: 24012dc8 .word 0x24012dc8
  14464. 800628c: 24012e18 .word 0x24012e18
  14465. 8006290: 08014654 .word 0x08014654
  14466. 08006294 <xTimerCreateTimerTask>:
  14467. {
  14468. 8006294: b510 push {r4, lr}
  14469. 8006296: b088 sub sp, #32
  14470. prvCheckForValidListAndQueue();
  14471. 8006298: f7ff ffc4 bl 8006224 <prvCheckForValidListAndQueue>
  14472. if( xTimerQueue != NULL )
  14473. 800629c: 4b12 ldr r3, [pc, #72] @ (80062e8 <xTimerCreateTimerTask+0x54>)
  14474. 800629e: 681b ldr r3, [r3, #0]
  14475. 80062a0: b1cb cbz r3, 80062d6 <xTimerCreateTimerTask+0x42>
  14476. StaticTask_t *pxTimerTaskTCBBuffer = NULL;
  14477. 80062a2: 2400 movs r4, #0
  14478. 80062a4: 9405 str r4, [sp, #20]
  14479. StackType_t *pxTimerTaskStackBuffer = NULL;
  14480. 80062a6: 9406 str r4, [sp, #24]
  14481. vApplicationGetTimerTaskMemory( &pxTimerTaskTCBBuffer, &pxTimerTaskStackBuffer, &ulTimerTaskStackSize );
  14482. 80062a8: aa07 add r2, sp, #28
  14483. 80062aa: a906 add r1, sp, #24
  14484. 80062ac: a805 add r0, sp, #20
  14485. 80062ae: f7fe f871 bl 8004394 <vApplicationGetTimerTaskMemory>
  14486. xTimerTaskHandle = xTaskCreateStatic( prvTimerTask,
  14487. 80062b2: 9b05 ldr r3, [sp, #20]
  14488. 80062b4: 9302 str r3, [sp, #8]
  14489. 80062b6: 9b06 ldr r3, [sp, #24]
  14490. 80062b8: 9301 str r3, [sp, #4]
  14491. 80062ba: 2302 movs r3, #2
  14492. 80062bc: 9300 str r3, [sp, #0]
  14493. 80062be: 4623 mov r3, r4
  14494. 80062c0: 9a07 ldr r2, [sp, #28]
  14495. 80062c2: 490a ldr r1, [pc, #40] @ (80062ec <xTimerCreateTimerTask+0x58>)
  14496. 80062c4: 480a ldr r0, [pc, #40] @ (80062f0 <xTimerCreateTimerTask+0x5c>)
  14497. 80062c6: f7ff fb37 bl 8005938 <xTaskCreateStatic>
  14498. 80062ca: 4b0a ldr r3, [pc, #40] @ (80062f4 <xTimerCreateTimerTask+0x60>)
  14499. 80062cc: 6018 str r0, [r3, #0]
  14500. if( xTimerTaskHandle != NULL )
  14501. 80062ce: b110 cbz r0, 80062d6 <xTimerCreateTimerTask+0x42>
  14502. }
  14503. 80062d0: 2001 movs r0, #1
  14504. 80062d2: b008 add sp, #32
  14505. 80062d4: bd10 pop {r4, pc}
  14506. 80062d6: f04f 0350 mov.w r3, #80 @ 0x50
  14507. 80062da: f383 8811 msr BASEPRI, r3
  14508. 80062de: f3bf 8f6f isb sy
  14509. 80062e2: f3bf 8f4f dsb sy
  14510. configASSERT( xReturn );
  14511. 80062e6: e7fe b.n 80062e6 <xTimerCreateTimerTask+0x52>
  14512. 80062e8: 24012ec0 .word 0x24012ec0
  14513. 80062ec: 0801465c .word 0x0801465c
  14514. 80062f0: 080065fd .word 0x080065fd
  14515. 80062f4: 24012ebc .word 0x24012ebc
  14516. 080062f8 <xTimerGenericCommand>:
  14517. configASSERT( xTimer );
  14518. 80062f8: b1b8 cbz r0, 800632a <xTimerGenericCommand+0x32>
  14519. 80062fa: 469c mov ip, r3
  14520. 80062fc: 4603 mov r3, r0
  14521. if( xTimerQueue != NULL )
  14522. 80062fe: 4818 ldr r0, [pc, #96] @ (8006360 <xTimerGenericCommand+0x68>)
  14523. 8006300: 6800 ldr r0, [r0, #0]
  14524. 8006302: b358 cbz r0, 800635c <xTimerGenericCommand+0x64>
  14525. {
  14526. 8006304: b500 push {lr}
  14527. 8006306: b085 sub sp, #20
  14528. xMessage.xMessageID = xCommandID;
  14529. 8006308: 9100 str r1, [sp, #0]
  14530. xMessage.u.xTimerParameters.xMessageValue = xOptionalValue;
  14531. 800630a: 9201 str r2, [sp, #4]
  14532. xMessage.u.xTimerParameters.pxTimer = xTimer;
  14533. 800630c: 9302 str r3, [sp, #8]
  14534. if( xCommandID < tmrFIRST_FROM_ISR_COMMAND )
  14535. 800630e: 2905 cmp r1, #5
  14536. 8006310: dc1c bgt.n 800634c <xTimerGenericCommand+0x54>
  14537. if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING )
  14538. 8006312: f7ff fe4d bl 8005fb0 <xTaskGetSchedulerState>
  14539. 8006316: 2802 cmp r0, #2
  14540. 8006318: d010 beq.n 800633c <xTimerGenericCommand+0x44>
  14541. xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY );
  14542. 800631a: 2300 movs r3, #0
  14543. 800631c: 461a mov r2, r3
  14544. 800631e: 4669 mov r1, sp
  14545. 8006320: 480f ldr r0, [pc, #60] @ (8006360 <xTimerGenericCommand+0x68>)
  14546. 8006322: 6800 ldr r0, [r0, #0]
  14547. 8006324: f7fe fd1d bl 8004d62 <xQueueGenericSend>
  14548. 8006328: e015 b.n 8006356 <xTimerGenericCommand+0x5e>
  14549. 800632a: f04f 0350 mov.w r3, #80 @ 0x50
  14550. 800632e: f383 8811 msr BASEPRI, r3
  14551. 8006332: f3bf 8f6f isb sy
  14552. 8006336: f3bf 8f4f dsb sy
  14553. configASSERT( xTimer );
  14554. 800633a: e7fe b.n 800633a <xTimerGenericCommand+0x42>
  14555. xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait );
  14556. 800633c: 2300 movs r3, #0
  14557. 800633e: 9a06 ldr r2, [sp, #24]
  14558. 8006340: 4669 mov r1, sp
  14559. 8006342: 4807 ldr r0, [pc, #28] @ (8006360 <xTimerGenericCommand+0x68>)
  14560. 8006344: 6800 ldr r0, [r0, #0]
  14561. 8006346: f7fe fd0c bl 8004d62 <xQueueGenericSend>
  14562. 800634a: e004 b.n 8006356 <xTimerGenericCommand+0x5e>
  14563. xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken );
  14564. 800634c: 2300 movs r3, #0
  14565. 800634e: 4662 mov r2, ip
  14566. 8006350: 4669 mov r1, sp
  14567. 8006352: f7fe fe10 bl 8004f76 <xQueueGenericSendFromISR>
  14568. }
  14569. 8006356: b005 add sp, #20
  14570. 8006358: f85d fb04 ldr.w pc, [sp], #4
  14571. BaseType_t xReturn = pdFAIL;
  14572. 800635c: 2000 movs r0, #0
  14573. }
  14574. 800635e: 4770 bx lr
  14575. 8006360: 24012ec0 .word 0x24012ec0
  14576. 08006364 <prvSwitchTimerLists>:
  14577. {
  14578. 8006364: b570 push {r4, r5, r6, lr}
  14579. 8006366: b082 sub sp, #8
  14580. while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE )
  14581. 8006368: 4b1b ldr r3, [pc, #108] @ (80063d8 <prvSwitchTimerLists+0x74>)
  14582. 800636a: 681b ldr r3, [r3, #0]
  14583. 800636c: 681a ldr r2, [r3, #0]
  14584. 800636e: b362 cbz r2, 80063ca <prvSwitchTimerLists+0x66>
  14585. xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList );
  14586. 8006370: 68db ldr r3, [r3, #12]
  14587. 8006372: 681e ldr r6, [r3, #0]
  14588. pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  14589. 8006374: 68dc ldr r4, [r3, #12]
  14590. ( void ) uxListRemove( &( pxTimer->xTimerListItem ) );
  14591. 8006376: 1d25 adds r5, r4, #4
  14592. 8006378: 4628 mov r0, r5
  14593. 800637a: f7fe f96d bl 8004658 <uxListRemove>
  14594. pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
  14595. 800637e: 6a23 ldr r3, [r4, #32]
  14596. 8006380: 4620 mov r0, r4
  14597. 8006382: 4798 blx r3
  14598. if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
  14599. 8006384: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  14600. 8006388: f013 0f04 tst.w r3, #4
  14601. 800638c: d0ec beq.n 8006368 <prvSwitchTimerLists+0x4>
  14602. xReloadTime = ( xNextExpireTime + pxTimer->xTimerPeriodInTicks );
  14603. 800638e: 69a3 ldr r3, [r4, #24]
  14604. 8006390: 4433 add r3, r6
  14605. if( xReloadTime > xNextExpireTime )
  14606. 8006392: 429e cmp r6, r3
  14607. 8006394: d207 bcs.n 80063a6 <prvSwitchTimerLists+0x42>
  14608. listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime );
  14609. 8006396: 6063 str r3, [r4, #4]
  14610. listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer );
  14611. 8006398: 6124 str r4, [r4, #16]
  14612. vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) );
  14613. 800639a: 4629 mov r1, r5
  14614. 800639c: 4b0e ldr r3, [pc, #56] @ (80063d8 <prvSwitchTimerLists+0x74>)
  14615. 800639e: 6818 ldr r0, [r3, #0]
  14616. 80063a0: f7fe f941 bl 8004626 <vListInsert>
  14617. 80063a4: e7e0 b.n 8006368 <prvSwitchTimerLists+0x4>
  14618. xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY );
  14619. 80063a6: 2100 movs r1, #0
  14620. 80063a8: 9100 str r1, [sp, #0]
  14621. 80063aa: 460b mov r3, r1
  14622. 80063ac: 4632 mov r2, r6
  14623. 80063ae: 4620 mov r0, r4
  14624. 80063b0: f7ff ffa2 bl 80062f8 <xTimerGenericCommand>
  14625. configASSERT( xResult );
  14626. 80063b4: 2800 cmp r0, #0
  14627. 80063b6: d1d7 bne.n 8006368 <prvSwitchTimerLists+0x4>
  14628. 80063b8: f04f 0350 mov.w r3, #80 @ 0x50
  14629. 80063bc: f383 8811 msr BASEPRI, r3
  14630. 80063c0: f3bf 8f6f isb sy
  14631. 80063c4: f3bf 8f4f dsb sy
  14632. 80063c8: e7fe b.n 80063c8 <prvSwitchTimerLists+0x64>
  14633. pxCurrentTimerList = pxOverflowTimerList;
  14634. 80063ca: 4a04 ldr r2, [pc, #16] @ (80063dc <prvSwitchTimerLists+0x78>)
  14635. 80063cc: 6810 ldr r0, [r2, #0]
  14636. 80063ce: 4902 ldr r1, [pc, #8] @ (80063d8 <prvSwitchTimerLists+0x74>)
  14637. 80063d0: 6008 str r0, [r1, #0]
  14638. pxOverflowTimerList = pxTemp;
  14639. 80063d2: 6013 str r3, [r2, #0]
  14640. }
  14641. 80063d4: b002 add sp, #8
  14642. 80063d6: bd70 pop {r4, r5, r6, pc}
  14643. 80063d8: 24012ec8 .word 0x24012ec8
  14644. 80063dc: 24012ec4 .word 0x24012ec4
  14645. 080063e0 <prvSampleTimeNow>:
  14646. {
  14647. 80063e0: b538 push {r3, r4, r5, lr}
  14648. 80063e2: 4605 mov r5, r0
  14649. xTimeNow = xTaskGetTickCount();
  14650. 80063e4: f7ff fb74 bl 8005ad0 <xTaskGetTickCount>
  14651. 80063e8: 4604 mov r4, r0
  14652. if( xTimeNow < xLastTime )
  14653. 80063ea: 4b07 ldr r3, [pc, #28] @ (8006408 <prvSampleTimeNow+0x28>)
  14654. 80063ec: 681b ldr r3, [r3, #0]
  14655. 80063ee: 4283 cmp r3, r0
  14656. 80063f0: d805 bhi.n 80063fe <prvSampleTimeNow+0x1e>
  14657. *pxTimerListsWereSwitched = pdFALSE;
  14658. 80063f2: 2300 movs r3, #0
  14659. 80063f4: 602b str r3, [r5, #0]
  14660. xLastTime = xTimeNow;
  14661. 80063f6: 4b04 ldr r3, [pc, #16] @ (8006408 <prvSampleTimeNow+0x28>)
  14662. 80063f8: 601c str r4, [r3, #0]
  14663. }
  14664. 80063fa: 4620 mov r0, r4
  14665. 80063fc: bd38 pop {r3, r4, r5, pc}
  14666. prvSwitchTimerLists();
  14667. 80063fe: f7ff ffb1 bl 8006364 <prvSwitchTimerLists>
  14668. *pxTimerListsWereSwitched = pdTRUE;
  14669. 8006402: 2301 movs r3, #1
  14670. 8006404: 602b str r3, [r5, #0]
  14671. 8006406: e7f6 b.n 80063f6 <prvSampleTimeNow+0x16>
  14672. 8006408: 24012eb8 .word 0x24012eb8
  14673. 0800640c <prvProcessExpiredTimer>:
  14674. {
  14675. 800640c: b570 push {r4, r5, r6, lr}
  14676. 800640e: b082 sub sp, #8
  14677. 8006410: 4606 mov r6, r0
  14678. 8006412: 460d mov r5, r1
  14679. Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
  14680. 8006414: 4917 ldr r1, [pc, #92] @ (8006474 <prvProcessExpiredTimer+0x68>)
  14681. 8006416: 6809 ldr r1, [r1, #0]
  14682. 8006418: 68c9 ldr r1, [r1, #12]
  14683. 800641a: 68cc ldr r4, [r1, #12]
  14684. ( void ) uxListRemove( &( pxTimer->xTimerListItem ) );
  14685. 800641c: 1d20 adds r0, r4, #4
  14686. 800641e: f7fe f91b bl 8004658 <uxListRemove>
  14687. if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
  14688. 8006422: f894 c028 ldrb.w ip, [r4, #40] @ 0x28
  14689. 8006426: f01c 0f04 tst.w ip, #4
  14690. 800642a: d108 bne.n 800643e <prvProcessExpiredTimer+0x32>
  14691. pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
  14692. 800642c: f02c 0c01 bic.w ip, ip, #1
  14693. 8006430: f884 c028 strb.w ip, [r4, #40] @ 0x28
  14694. pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
  14695. 8006434: 6a23 ldr r3, [r4, #32]
  14696. 8006436: 4620 mov r0, r4
  14697. 8006438: 4798 blx r3
  14698. }
  14699. 800643a: b002 add sp, #8
  14700. 800643c: bd70 pop {r4, r5, r6, pc}
  14701. if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) != pdFALSE )
  14702. 800643e: 69a1 ldr r1, [r4, #24]
  14703. 8006440: 4633 mov r3, r6
  14704. 8006442: 462a mov r2, r5
  14705. 8006444: 4431 add r1, r6
  14706. 8006446: 4620 mov r0, r4
  14707. 8006448: f7ff fec4 bl 80061d4 <prvInsertTimerInActiveList>
  14708. 800644c: 2800 cmp r0, #0
  14709. 800644e: d0f1 beq.n 8006434 <prvProcessExpiredTimer+0x28>
  14710. xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY );
  14711. 8006450: 2100 movs r1, #0
  14712. 8006452: 9100 str r1, [sp, #0]
  14713. 8006454: 460b mov r3, r1
  14714. 8006456: 4632 mov r2, r6
  14715. 8006458: 4620 mov r0, r4
  14716. 800645a: f7ff ff4d bl 80062f8 <xTimerGenericCommand>
  14717. configASSERT( xResult );
  14718. 800645e: 2800 cmp r0, #0
  14719. 8006460: d1e8 bne.n 8006434 <prvProcessExpiredTimer+0x28>
  14720. 8006462: f04f 0350 mov.w r3, #80 @ 0x50
  14721. 8006466: f383 8811 msr BASEPRI, r3
  14722. 800646a: f3bf 8f6f isb sy
  14723. 800646e: f3bf 8f4f dsb sy
  14724. 8006472: e7fe b.n 8006472 <prvProcessExpiredTimer+0x66>
  14725. 8006474: 24012ec8 .word 0x24012ec8
  14726. 08006478 <prvProcessTimerOrBlockTask>:
  14727. {
  14728. 8006478: b570 push {r4, r5, r6, lr}
  14729. 800647a: b082 sub sp, #8
  14730. 800647c: 4606 mov r6, r0
  14731. 800647e: 460c mov r4, r1
  14732. vTaskSuspendAll();
  14733. 8006480: f7ff fb1e bl 8005ac0 <vTaskSuspendAll>
  14734. xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched );
  14735. 8006484: a801 add r0, sp, #4
  14736. 8006486: f7ff ffab bl 80063e0 <prvSampleTimeNow>
  14737. if( xTimerListsWereSwitched == pdFALSE )
  14738. 800648a: 9b01 ldr r3, [sp, #4]
  14739. 800648c: bb3b cbnz r3, 80064de <prvProcessTimerOrBlockTask+0x66>
  14740. 800648e: 4605 mov r5, r0
  14741. if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) )
  14742. 8006490: 42b0 cmp r0, r6
  14743. 8006492: bf28 it cs
  14744. 8006494: 2c00 cmpcs r4, #0
  14745. 8006496: d019 beq.n 80064cc <prvProcessTimerOrBlockTask+0x54>
  14746. if( xListWasEmpty != pdFALSE )
  14747. 8006498: b124 cbz r4, 80064a4 <prvProcessTimerOrBlockTask+0x2c>
  14748. xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList );
  14749. 800649a: 4a13 ldr r2, [pc, #76] @ (80064e8 <prvProcessTimerOrBlockTask+0x70>)
  14750. 800649c: 6812 ldr r2, [r2, #0]
  14751. 800649e: 6812 ldr r2, [r2, #0]
  14752. 80064a0: b9da cbnz r2, 80064da <prvProcessTimerOrBlockTask+0x62>
  14753. 80064a2: 2401 movs r4, #1
  14754. vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty );
  14755. 80064a4: 4622 mov r2, r4
  14756. 80064a6: 1b71 subs r1, r6, r5
  14757. 80064a8: 4b10 ldr r3, [pc, #64] @ (80064ec <prvProcessTimerOrBlockTask+0x74>)
  14758. 80064aa: 6818 ldr r0, [r3, #0]
  14759. 80064ac: f7ff f87c bl 80055a8 <vQueueWaitForMessageRestricted>
  14760. if( xTaskResumeAll() == pdFALSE )
  14761. 80064b0: f7ff fba8 bl 8005c04 <xTaskResumeAll>
  14762. 80064b4: b9a8 cbnz r0, 80064e2 <prvProcessTimerOrBlockTask+0x6a>
  14763. portYIELD_WITHIN_API();
  14764. 80064b6: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000
  14765. 80064ba: f04f 5280 mov.w r2, #268435456 @ 0x10000000
  14766. 80064be: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04
  14767. 80064c2: f3bf 8f4f dsb sy
  14768. 80064c6: f3bf 8f6f isb sy
  14769. 80064ca: e00a b.n 80064e2 <prvProcessTimerOrBlockTask+0x6a>
  14770. ( void ) xTaskResumeAll();
  14771. 80064cc: f7ff fb9a bl 8005c04 <xTaskResumeAll>
  14772. prvProcessExpiredTimer( xNextExpireTime, xTimeNow );
  14773. 80064d0: 4629 mov r1, r5
  14774. 80064d2: 4630 mov r0, r6
  14775. 80064d4: f7ff ff9a bl 800640c <prvProcessExpiredTimer>
  14776. 80064d8: e003 b.n 80064e2 <prvProcessTimerOrBlockTask+0x6a>
  14777. xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList );
  14778. 80064da: 461c mov r4, r3
  14779. 80064dc: e7e2 b.n 80064a4 <prvProcessTimerOrBlockTask+0x2c>
  14780. ( void ) xTaskResumeAll();
  14781. 80064de: f7ff fb91 bl 8005c04 <xTaskResumeAll>
  14782. }
  14783. 80064e2: b002 add sp, #8
  14784. 80064e4: bd70 pop {r4, r5, r6, pc}
  14785. 80064e6: bf00 nop
  14786. 80064e8: 24012ec4 .word 0x24012ec4
  14787. 80064ec: 24012ec0 .word 0x24012ec0
  14788. 080064f0 <prvProcessReceivedCommands>:
  14789. {
  14790. 80064f0: b510 push {r4, lr}
  14791. 80064f2: b088 sub sp, #32
  14792. while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */
  14793. 80064f4: e002 b.n 80064fc <prvProcessReceivedCommands+0xc>
  14794. if( xMessage.xMessageID >= ( BaseType_t ) 0 )
  14795. 80064f6: 9b04 ldr r3, [sp, #16]
  14796. 80064f8: 2b00 cmp r3, #0
  14797. 80064fa: da0f bge.n 800651c <prvProcessReceivedCommands+0x2c>
  14798. while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */
  14799. 80064fc: 2200 movs r2, #0
  14800. 80064fe: a904 add r1, sp, #16
  14801. 8006500: 4b3d ldr r3, [pc, #244] @ (80065f8 <prvProcessReceivedCommands+0x108>)
  14802. 8006502: 6818 ldr r0, [r3, #0]
  14803. 8006504: f7fe fdf7 bl 80050f6 <xQueueReceive>
  14804. 8006508: 2800 cmp r0, #0
  14805. 800650a: d073 beq.n 80065f4 <prvProcessReceivedCommands+0x104>
  14806. if( xMessage.xMessageID < ( BaseType_t ) 0 )
  14807. 800650c: 9b04 ldr r3, [sp, #16]
  14808. 800650e: 2b00 cmp r3, #0
  14809. 8006510: daf1 bge.n 80064f6 <prvProcessReceivedCommands+0x6>
  14810. pxCallback->pxCallbackFunction( pxCallback->pvParameter1, pxCallback->ulParameter2 );
  14811. 8006512: 9907 ldr r1, [sp, #28]
  14812. 8006514: 9806 ldr r0, [sp, #24]
  14813. 8006516: 9b05 ldr r3, [sp, #20]
  14814. 8006518: 4798 blx r3
  14815. 800651a: e7ec b.n 80064f6 <prvProcessReceivedCommands+0x6>
  14816. pxTimer = xMessage.u.xTimerParameters.pxTimer;
  14817. 800651c: 9c06 ldr r4, [sp, #24]
  14818. if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) /*lint !e961. The cast is only redundant when NULL is passed into the macro. */
  14819. 800651e: 6963 ldr r3, [r4, #20]
  14820. 8006520: b113 cbz r3, 8006528 <prvProcessReceivedCommands+0x38>
  14821. ( void ) uxListRemove( &( pxTimer->xTimerListItem ) );
  14822. 8006522: 1d20 adds r0, r4, #4
  14823. 8006524: f7fe f898 bl 8004658 <uxListRemove>
  14824. xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched );
  14825. 8006528: a803 add r0, sp, #12
  14826. 800652a: f7ff ff59 bl 80063e0 <prvSampleTimeNow>
  14827. switch( xMessage.xMessageID )
  14828. 800652e: 9b04 ldr r3, [sp, #16]
  14829. 8006530: 2b09 cmp r3, #9
  14830. 8006532: d8e3 bhi.n 80064fc <prvProcessReceivedCommands+0xc>
  14831. 8006534: e8df f003 tbb [pc, r3]
  14832. 8006538: 30050505 .word 0x30050505
  14833. 800653c: 05055037 .word 0x05055037
  14834. 8006540: 3730 .short 0x3730
  14835. pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE;
  14836. 8006542: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  14837. 8006546: f043 0301 orr.w r3, r3, #1
  14838. 800654a: f884 3028 strb.w r3, [r4, #40] @ 0x28
  14839. if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE )
  14840. 800654e: 9b05 ldr r3, [sp, #20]
  14841. 8006550: 69a1 ldr r1, [r4, #24]
  14842. 8006552: 4602 mov r2, r0
  14843. 8006554: 4419 add r1, r3
  14844. 8006556: 4620 mov r0, r4
  14845. 8006558: f7ff fe3c bl 80061d4 <prvInsertTimerInActiveList>
  14846. 800655c: 2800 cmp r0, #0
  14847. 800655e: d0cd beq.n 80064fc <prvProcessReceivedCommands+0xc>
  14848. pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer );
  14849. 8006560: 6a23 ldr r3, [r4, #32]
  14850. 8006562: 4620 mov r0, r4
  14851. 8006564: 4798 blx r3
  14852. if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
  14853. 8006566: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  14854. 800656a: f013 0f04 tst.w r3, #4
  14855. 800656e: d0c5 beq.n 80064fc <prvProcessReceivedCommands+0xc>
  14856. xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY );
  14857. 8006570: 69a2 ldr r2, [r4, #24]
  14858. 8006572: 2100 movs r1, #0
  14859. 8006574: 9100 str r1, [sp, #0]
  14860. 8006576: 460b mov r3, r1
  14861. 8006578: 9805 ldr r0, [sp, #20]
  14862. 800657a: 4402 add r2, r0
  14863. 800657c: 4620 mov r0, r4
  14864. 800657e: f7ff febb bl 80062f8 <xTimerGenericCommand>
  14865. configASSERT( xResult );
  14866. 8006582: 2800 cmp r0, #0
  14867. 8006584: d1ba bne.n 80064fc <prvProcessReceivedCommands+0xc>
  14868. 8006586: f04f 0350 mov.w r3, #80 @ 0x50
  14869. 800658a: f383 8811 msr BASEPRI, r3
  14870. 800658e: f3bf 8f6f isb sy
  14871. 8006592: f3bf 8f4f dsb sy
  14872. 8006596: e7fe b.n 8006596 <prvProcessReceivedCommands+0xa6>
  14873. pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
  14874. 8006598: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  14875. 800659c: f023 0301 bic.w r3, r3, #1
  14876. 80065a0: f884 3028 strb.w r3, [r4, #40] @ 0x28
  14877. break;
  14878. 80065a4: e7aa b.n 80064fc <prvProcessReceivedCommands+0xc>
  14879. pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE;
  14880. 80065a6: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  14881. 80065aa: f043 0301 orr.w r3, r3, #1
  14882. 80065ae: f884 3028 strb.w r3, [r4, #40] @ 0x28
  14883. pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue;
  14884. 80065b2: 9905 ldr r1, [sp, #20]
  14885. 80065b4: 61a1 str r1, [r4, #24]
  14886. configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );
  14887. 80065b6: b131 cbz r1, 80065c6 <prvProcessReceivedCommands+0xd6>
  14888. ( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow );
  14889. 80065b8: 4603 mov r3, r0
  14890. 80065ba: 4602 mov r2, r0
  14891. 80065bc: 4401 add r1, r0
  14892. 80065be: 4620 mov r0, r4
  14893. 80065c0: f7ff fe08 bl 80061d4 <prvInsertTimerInActiveList>
  14894. break;
  14895. 80065c4: e79a b.n 80064fc <prvProcessReceivedCommands+0xc>
  14896. 80065c6: f04f 0350 mov.w r3, #80 @ 0x50
  14897. 80065ca: f383 8811 msr BASEPRI, r3
  14898. 80065ce: f3bf 8f6f isb sy
  14899. 80065d2: f3bf 8f4f dsb sy
  14900. configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );
  14901. 80065d6: e7fe b.n 80065d6 <prvProcessReceivedCommands+0xe6>
  14902. if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) == ( uint8_t ) 0 )
  14903. 80065d8: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  14904. 80065dc: f013 0f02 tst.w r3, #2
  14905. 80065e0: d004 beq.n 80065ec <prvProcessReceivedCommands+0xfc>
  14906. pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
  14907. 80065e2: f023 0301 bic.w r3, r3, #1
  14908. 80065e6: f884 3028 strb.w r3, [r4, #40] @ 0x28
  14909. 80065ea: e787 b.n 80064fc <prvProcessReceivedCommands+0xc>
  14910. vPortFree( pxTimer );
  14911. 80065ec: 4620 mov r0, r4
  14912. 80065ee: f7fd ffc3 bl 8004578 <vPortFree>
  14913. 80065f2: e783 b.n 80064fc <prvProcessReceivedCommands+0xc>
  14914. }
  14915. 80065f4: b008 add sp, #32
  14916. 80065f6: bd10 pop {r4, pc}
  14917. 80065f8: 24012ec0 .word 0x24012ec0
  14918. 080065fc <prvTimerTask>:
  14919. {
  14920. 80065fc: b500 push {lr}
  14921. 80065fe: b083 sub sp, #12
  14922. xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty );
  14923. 8006600: a801 add r0, sp, #4
  14924. 8006602: f7ff fdd7 bl 80061b4 <prvGetNextExpireTime>
  14925. prvProcessTimerOrBlockTask( xNextExpireTime, xListWasEmpty );
  14926. 8006606: 9901 ldr r1, [sp, #4]
  14927. 8006608: f7ff ff36 bl 8006478 <prvProcessTimerOrBlockTask>
  14928. prvProcessReceivedCommands();
  14929. 800660c: f7ff ff70 bl 80064f0 <prvProcessReceivedCommands>
  14930. for( ;; )
  14931. 8006610: e7f6 b.n 8006600 <prvTimerTask+0x4>
  14932. 08006612 <netconn_apimsg>:
  14933. * @param apimsg a struct containing the function to call and its parameters
  14934. * @return ERR_OK if the function was called, another err_t if not
  14935. */
  14936. static err_t
  14937. netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg)
  14938. {
  14939. 8006612: b510 push {r4, lr}
  14940. 8006614: 460c mov r4, r1
  14941. err_t err;
  14942. #ifdef LWIP_DEBUG
  14943. /* catch functions that don't set err */
  14944. apimsg->err = ERR_VAL;
  14945. 8006616: 23fa movs r3, #250 @ 0xfa
  14946. 8006618: 710b strb r3, [r1, #4]
  14947. #if LWIP_NETCONN_SEM_PER_THREAD
  14948. apimsg->op_completed_sem = LWIP_NETCONN_THREAD_SEM_GET();
  14949. #endif /* LWIP_NETCONN_SEM_PER_THREAD */
  14950. err = tcpip_send_msg_wait_sem(fn, apimsg, LWIP_API_MSG_SEM(apimsg));
  14951. 800661a: 680a ldr r2, [r1, #0]
  14952. 800661c: 320c adds r2, #12
  14953. 800661e: f00a ff41 bl 80114a4 <tcpip_send_msg_wait_sem>
  14954. if (err == ERR_OK) {
  14955. 8006622: b100 cbz r0, 8006626 <netconn_apimsg+0x14>
  14956. return apimsg->err;
  14957. }
  14958. return err;
  14959. }
  14960. 8006624: bd10 pop {r4, pc}
  14961. return apimsg->err;
  14962. 8006626: f994 0004 ldrsb.w r0, [r4, #4]
  14963. 800662a: e7fb b.n 8006624 <netconn_apimsg+0x12>
  14964. 0800662c <netconn_tcp_recvd_msg>:
  14965. }
  14966. #if LWIP_TCP
  14967. static err_t
  14968. netconn_tcp_recvd_msg(struct netconn *conn, size_t len, struct api_msg *msg)
  14969. {
  14970. 800662c: b510 push {r4, lr}
  14971. LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
  14972. 800662e: b160 cbz r0, 800664a <netconn_tcp_recvd_msg+0x1e>
  14973. 8006630: 460c mov r4, r1
  14974. 8006632: 4611 mov r1, r2
  14975. 8006634: 7803 ldrb r3, [r0, #0]
  14976. 8006636: f003 03f0 and.w r3, r3, #240 @ 0xf0
  14977. 800663a: 2b10 cmp r3, #16
  14978. 800663c: d105 bne.n 800664a <netconn_tcp_recvd_msg+0x1e>
  14979. NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;);
  14980. msg->conn = conn;
  14981. 800663e: 6010 str r0, [r2, #0]
  14982. msg->msg.r.len = len;
  14983. 8006640: 6094 str r4, [r2, #8]
  14984. return netconn_apimsg(lwip_netconn_do_recv, msg);
  14985. 8006642: 4807 ldr r0, [pc, #28] @ (8006660 <netconn_tcp_recvd_msg+0x34>)
  14986. 8006644: f7ff ffe5 bl 8006612 <netconn_apimsg>
  14987. }
  14988. 8006648: bd10 pop {r4, pc}
  14989. LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
  14990. 800664a: 4b06 ldr r3, [pc, #24] @ (8006664 <netconn_tcp_recvd_msg+0x38>)
  14991. 800664c: f240 22a7 movw r2, #679 @ 0x2a7
  14992. 8006650: 4905 ldr r1, [pc, #20] @ (8006668 <netconn_tcp_recvd_msg+0x3c>)
  14993. 8006652: 4806 ldr r0, [pc, #24] @ (800666c <netconn_tcp_recvd_msg+0x40>)
  14994. 8006654: f00c fed8 bl 8013408 <iprintf>
  14995. 8006658: f06f 000f mvn.w r0, #15
  14996. 800665c: e7f4 b.n 8006648 <netconn_tcp_recvd_msg+0x1c>
  14997. 800665e: bf00 nop
  14998. 8006660: 08007c13 .word 0x08007c13
  14999. 8006664: 08014664 .word 0x08014664
  15000. 8006668: 080146c8 .word 0x080146c8
  15001. 800666c: 080144e8 .word 0x080144e8
  15002. 08006670 <netconn_close_shutdown>:
  15003. * @param how fully close or only shutdown one side?
  15004. * @return ERR_OK if the netconn was closed, any other err_t on error
  15005. */
  15006. static err_t
  15007. netconn_close_shutdown(struct netconn *conn, u8_t how)
  15008. {
  15009. 8006670: b500 push {lr}
  15010. 8006672: b089 sub sp, #36 @ 0x24
  15011. API_MSG_VAR_DECLARE(msg);
  15012. err_t err;
  15013. LWIP_UNUSED_ARG(how);
  15014. LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;);
  15015. 8006674: b160 cbz r0, 8006690 <netconn_close_shutdown+0x20>
  15016. API_MSG_VAR_ALLOC(msg);
  15017. API_MSG_VAR_REF(msg).conn = conn;
  15018. 8006676: 9000 str r0, [sp, #0]
  15019. #if LWIP_TCP
  15020. /* shutting down both ends is the same as closing */
  15021. API_MSG_VAR_REF(msg).msg.sd.shut = how;
  15022. 8006678: f88d 1008 strb.w r1, [sp, #8]
  15023. #if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER
  15024. /* get the time we started, which is later compared to
  15025. sys_now() + conn->send_timeout */
  15026. API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now();
  15027. #else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
  15028. API_MSG_VAR_REF(msg).msg.sd.polls_left =
  15029. 800667c: 2329 movs r3, #41 @ 0x29
  15030. 800667e: f88d 3009 strb.w r3, [sp, #9]
  15031. ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1;
  15032. #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
  15033. #endif /* LWIP_TCP */
  15034. err = netconn_apimsg(lwip_netconn_do_close, &API_MSG_VAR_REF(msg));
  15035. 8006682: 4669 mov r1, sp
  15036. 8006684: 4807 ldr r0, [pc, #28] @ (80066a4 <netconn_close_shutdown+0x34>)
  15037. 8006686: f7ff ffc4 bl 8006612 <netconn_apimsg>
  15038. API_MSG_VAR_FREE(msg);
  15039. return err;
  15040. }
  15041. 800668a: b009 add sp, #36 @ 0x24
  15042. 800668c: f85d fb04 ldr.w pc, [sp], #4
  15043. LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;);
  15044. 8006690: 4b05 ldr r3, [pc, #20] @ (80066a8 <netconn_close_shutdown+0x38>)
  15045. 8006692: f240 4247 movw r2, #1095 @ 0x447
  15046. 8006696: 4905 ldr r1, [pc, #20] @ (80066ac <netconn_close_shutdown+0x3c>)
  15047. 8006698: 4805 ldr r0, [pc, #20] @ (80066b0 <netconn_close_shutdown+0x40>)
  15048. 800669a: f00c feb5 bl 8013408 <iprintf>
  15049. 800669e: f06f 000f mvn.w r0, #15
  15050. 80066a2: e7f2 b.n 800668a <netconn_close_shutdown+0x1a>
  15051. 80066a4: 08007db9 .word 0x08007db9
  15052. 80066a8: 08014664 .word 0x08014664
  15053. 80066ac: 080146ec .word 0x080146ec
  15054. 80066b0: 080144e8 .word 0x080144e8
  15055. 080066b4 <netconn_new_with_proto_and_callback>:
  15056. {
  15057. 80066b4: b570 push {r4, r5, r6, lr}
  15058. 80066b6: b088 sub sp, #32
  15059. 80066b8: 460c mov r4, r1
  15060. conn = netconn_alloc(t, callback);
  15061. 80066ba: 4611 mov r1, r2
  15062. 80066bc: f001 f878 bl 80077b0 <netconn_alloc>
  15063. if (conn != NULL) {
  15064. 80066c0: 4605 mov r5, r0
  15065. 80066c2: b138 cbz r0, 80066d4 <netconn_new_with_proto_and_callback+0x20>
  15066. API_MSG_VAR_REF(msg).msg.n.proto = proto;
  15067. 80066c4: f88d 4008 strb.w r4, [sp, #8]
  15068. API_MSG_VAR_REF(msg).conn = conn;
  15069. 80066c8: 9000 str r0, [sp, #0]
  15070. err = netconn_apimsg(lwip_netconn_do_newconn, &API_MSG_VAR_REF(msg));
  15071. 80066ca: 4669 mov r1, sp
  15072. 80066cc: 4820 ldr r0, [pc, #128] @ (8006750 <netconn_new_with_proto_and_callback+0x9c>)
  15073. 80066ce: f7ff ffa0 bl 8006612 <netconn_apimsg>
  15074. if (err != ERR_OK) {
  15075. 80066d2: b910 cbnz r0, 80066da <netconn_new_with_proto_and_callback+0x26>
  15076. }
  15077. 80066d4: 4628 mov r0, r5
  15078. 80066d6: b008 add sp, #32
  15079. 80066d8: bd70 pop {r4, r5, r6, pc}
  15080. LWIP_ASSERT("freeing conn without freeing pcb", conn->pcb.tcp == NULL);
  15081. 80066da: 686b ldr r3, [r5, #4]
  15082. 80066dc: b12b cbz r3, 80066ea <netconn_new_with_proto_and_callback+0x36>
  15083. 80066de: 4b1d ldr r3, [pc, #116] @ (8006754 <netconn_new_with_proto_and_callback+0xa0>)
  15084. 80066e0: 22a3 movs r2, #163 @ 0xa3
  15085. 80066e2: 491d ldr r1, [pc, #116] @ (8006758 <netconn_new_with_proto_and_callback+0xa4>)
  15086. 80066e4: 481d ldr r0, [pc, #116] @ (800675c <netconn_new_with_proto_and_callback+0xa8>)
  15087. 80066e6: f00c fe8f bl 8013408 <iprintf>
  15088. LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox));
  15089. 80066ea: f105 0410 add.w r4, r5, #16
  15090. 80066ee: 4620 mov r0, r4
  15091. 80066f0: f006 fc37 bl 800cf62 <sys_mbox_valid>
  15092. 80066f4: b1b0 cbz r0, 8006724 <netconn_new_with_proto_and_callback+0x70>
  15093. LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox));
  15094. 80066f6: f105 0014 add.w r0, r5, #20
  15095. 80066fa: f006 fc32 bl 800cf62 <sys_mbox_valid>
  15096. 80066fe: b9c0 cbnz r0, 8006732 <netconn_new_with_proto_and_callback+0x7e>
  15097. LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed));
  15098. 8006700: f105 060c add.w r6, r5, #12
  15099. 8006704: 4630 mov r0, r6
  15100. 8006706: f006 fc72 bl 800cfee <sys_sem_valid>
  15101. 800670a: b1c8 cbz r0, 8006740 <netconn_new_with_proto_and_callback+0x8c>
  15102. sys_sem_free(&conn->op_completed);
  15103. 800670c: 4630 mov r0, r6
  15104. 800670e: f006 fc69 bl 800cfe4 <sys_sem_free>
  15105. sys_mbox_free(&conn->recvmbox);
  15106. 8006712: 4620 mov r0, r4
  15107. 8006714: f006 fbe0 bl 800ced8 <sys_mbox_free>
  15108. memp_free(MEMP_NETCONN, conn);
  15109. 8006718: 4629 mov r1, r5
  15110. 800671a: 2007 movs r0, #7
  15111. 800671c: f004 ffa8 bl 800b670 <memp_free>
  15112. return NULL;
  15113. 8006720: 2500 movs r5, #0
  15114. 8006722: e7d7 b.n 80066d4 <netconn_new_with_proto_and_callback+0x20>
  15115. LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox));
  15116. 8006724: 4b0b ldr r3, [pc, #44] @ (8006754 <netconn_new_with_proto_and_callback+0xa0>)
  15117. 8006726: 22a4 movs r2, #164 @ 0xa4
  15118. 8006728: 490d ldr r1, [pc, #52] @ (8006760 <netconn_new_with_proto_and_callback+0xac>)
  15119. 800672a: 480c ldr r0, [pc, #48] @ (800675c <netconn_new_with_proto_and_callback+0xa8>)
  15120. 800672c: f00c fe6c bl 8013408 <iprintf>
  15121. 8006730: e7e1 b.n 80066f6 <netconn_new_with_proto_and_callback+0x42>
  15122. LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox));
  15123. 8006732: 4b08 ldr r3, [pc, #32] @ (8006754 <netconn_new_with_proto_and_callback+0xa0>)
  15124. 8006734: 22a6 movs r2, #166 @ 0xa6
  15125. 8006736: 490b ldr r1, [pc, #44] @ (8006764 <netconn_new_with_proto_and_callback+0xb0>)
  15126. 8006738: 4808 ldr r0, [pc, #32] @ (800675c <netconn_new_with_proto_and_callback+0xa8>)
  15127. 800673a: f00c fe65 bl 8013408 <iprintf>
  15128. 800673e: e7df b.n 8006700 <netconn_new_with_proto_and_callback+0x4c>
  15129. LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed));
  15130. 8006740: 4b04 ldr r3, [pc, #16] @ (8006754 <netconn_new_with_proto_and_callback+0xa0>)
  15131. 8006742: 22a9 movs r2, #169 @ 0xa9
  15132. 8006744: 4908 ldr r1, [pc, #32] @ (8006768 <netconn_new_with_proto_and_callback+0xb4>)
  15133. 8006746: 4805 ldr r0, [pc, #20] @ (800675c <netconn_new_with_proto_and_callback+0xa8>)
  15134. 8006748: f00c fe5e bl 8013408 <iprintf>
  15135. 800674c: e7de b.n 800670c <netconn_new_with_proto_and_callback+0x58>
  15136. 800674e: bf00 nop
  15137. 8006750: 0800779d .word 0x0800779d
  15138. 8006754: 08014664 .word 0x08014664
  15139. 8006758: 08014708 .word 0x08014708
  15140. 800675c: 080144e8 .word 0x080144e8
  15141. 8006760: 0801472c .word 0x0801472c
  15142. 8006764: 08014744 .word 0x08014744
  15143. 8006768: 08014768 .word 0x08014768
  15144. 0800676c <netconn_prepare_delete>:
  15145. if (conn == NULL) {
  15146. 800676c: b160 cbz r0, 8006788 <netconn_prepare_delete+0x1c>
  15147. {
  15148. 800676e: b500 push {lr}
  15149. 8006770: b089 sub sp, #36 @ 0x24
  15150. API_MSG_VAR_REF(msg).conn = conn;
  15151. 8006772: 9000 str r0, [sp, #0]
  15152. API_MSG_VAR_REF(msg).msg.sd.polls_left =
  15153. 8006774: 2329 movs r3, #41 @ 0x29
  15154. 8006776: f88d 3009 strb.w r3, [sp, #9]
  15155. err = netconn_apimsg(lwip_netconn_do_delconn, &API_MSG_VAR_REF(msg));
  15156. 800677a: 4669 mov r1, sp
  15157. 800677c: 4803 ldr r0, [pc, #12] @ (800678c <netconn_prepare_delete+0x20>)
  15158. 800677e: f7ff ff48 bl 8006612 <netconn_apimsg>
  15159. }
  15160. 8006782: b009 add sp, #36 @ 0x24
  15161. 8006784: f85d fb04 ldr.w pc, [sp], #4
  15162. return ERR_OK;
  15163. 8006788: 2000 movs r0, #0
  15164. }
  15165. 800678a: 4770 bx lr
  15166. 800678c: 0800796d .word 0x0800796d
  15167. 08006790 <netconn_delete>:
  15168. {
  15169. 8006790: b538 push {r3, r4, r5, lr}
  15170. if (conn == NULL) {
  15171. 8006792: b150 cbz r0, 80067aa <netconn_delete+0x1a>
  15172. 8006794: 4605 mov r5, r0
  15173. err = netconn_prepare_delete(conn);
  15174. 8006796: f7ff ffe9 bl 800676c <netconn_prepare_delete>
  15175. if (err == ERR_OK) {
  15176. 800679a: 4604 mov r4, r0
  15177. 800679c: b108 cbz r0, 80067a2 <netconn_delete+0x12>
  15178. }
  15179. 800679e: 4620 mov r0, r4
  15180. 80067a0: bd38 pop {r3, r4, r5, pc}
  15181. netconn_free(conn);
  15182. 80067a2: 4628 mov r0, r5
  15183. 80067a4: f001 f850 bl 8007848 <netconn_free>
  15184. 80067a8: e7f9 b.n 800679e <netconn_delete+0xe>
  15185. return ERR_OK;
  15186. 80067aa: 2400 movs r4, #0
  15187. 80067ac: e7f7 b.n 800679e <netconn_delete+0xe>
  15188. ...
  15189. 080067b0 <netconn_getaddr>:
  15190. {
  15191. 80067b0: b510 push {r4, lr}
  15192. 80067b2: b088 sub sp, #32
  15193. LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;);
  15194. 80067b4: b160 cbz r0, 80067d0 <netconn_getaddr+0x20>
  15195. LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;);
  15196. 80067b6: b1a9 cbz r1, 80067e4 <netconn_getaddr+0x34>
  15197. LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;);
  15198. 80067b8: b1f2 cbz r2, 80067f8 <netconn_getaddr+0x48>
  15199. API_MSG_VAR_REF(msg).conn = conn;
  15200. 80067ba: 9000 str r0, [sp, #0]
  15201. API_MSG_VAR_REF(msg).msg.ad.local = local;
  15202. 80067bc: f88d 3010 strb.w r3, [sp, #16]
  15203. msg.msg.ad.ipaddr = addr;
  15204. 80067c0: 9102 str r1, [sp, #8]
  15205. msg.msg.ad.port = port;
  15206. 80067c2: 9203 str r2, [sp, #12]
  15207. err = netconn_apimsg(lwip_netconn_do_getaddr, &msg);
  15208. 80067c4: 4669 mov r1, sp
  15209. 80067c6: 4811 ldr r0, [pc, #68] @ (800680c <netconn_getaddr+0x5c>)
  15210. 80067c8: f7ff ff23 bl 8006612 <netconn_apimsg>
  15211. }
  15212. 80067cc: b008 add sp, #32
  15213. 80067ce: bd10 pop {r4, pc}
  15214. LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;);
  15215. 80067d0: 4b0f ldr r3, [pc, #60] @ (8006810 <netconn_getaddr+0x60>)
  15216. 80067d2: f44f 7289 mov.w r2, #274 @ 0x112
  15217. 80067d6: 490f ldr r1, [pc, #60] @ (8006814 <netconn_getaddr+0x64>)
  15218. 80067d8: 480f ldr r0, [pc, #60] @ (8006818 <netconn_getaddr+0x68>)
  15219. 80067da: f00c fe15 bl 8013408 <iprintf>
  15220. 80067de: f06f 000f mvn.w r0, #15
  15221. 80067e2: e7f3 b.n 80067cc <netconn_getaddr+0x1c>
  15222. LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;);
  15223. 80067e4: 4b0a ldr r3, [pc, #40] @ (8006810 <netconn_getaddr+0x60>)
  15224. 80067e6: f240 1213 movw r2, #275 @ 0x113
  15225. 80067ea: 490c ldr r1, [pc, #48] @ (800681c <netconn_getaddr+0x6c>)
  15226. 80067ec: 480a ldr r0, [pc, #40] @ (8006818 <netconn_getaddr+0x68>)
  15227. 80067ee: f00c fe0b bl 8013408 <iprintf>
  15228. 80067f2: f06f 000f mvn.w r0, #15
  15229. 80067f6: e7e9 b.n 80067cc <netconn_getaddr+0x1c>
  15230. LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;);
  15231. 80067f8: 4b05 ldr r3, [pc, #20] @ (8006810 <netconn_getaddr+0x60>)
  15232. 80067fa: f44f 728a mov.w r2, #276 @ 0x114
  15233. 80067fe: 4908 ldr r1, [pc, #32] @ (8006820 <netconn_getaddr+0x70>)
  15234. 8006800: 4805 ldr r0, [pc, #20] @ (8006818 <netconn_getaddr+0x68>)
  15235. 8006802: f00c fe01 bl 8013408 <iprintf>
  15236. 8006806: f06f 000f mvn.w r0, #15
  15237. 800680a: e7df b.n 80067cc <netconn_getaddr+0x1c>
  15238. 800680c: 08007d1d .word 0x08007d1d
  15239. 8006810: 08014664 .word 0x08014664
  15240. 8006814: 08014784 .word 0x08014784
  15241. 8006818: 080144e8 .word 0x080144e8
  15242. 800681c: 080147a4 .word 0x080147a4
  15243. 8006820: 080147c4 .word 0x080147c4
  15244. 08006824 <netconn_connect>:
  15245. {
  15246. 8006824: b500 push {lr}
  15247. 8006826: b089 sub sp, #36 @ 0x24
  15248. LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;);
  15249. 8006828: b160 cbz r0, 8006844 <netconn_connect+0x20>
  15250. 800682a: 4603 mov r3, r0
  15251. if (addr == NULL) {
  15252. 800682c: b1a1 cbz r1, 8006858 <netconn_connect+0x34>
  15253. API_MSG_VAR_REF(msg).conn = conn;
  15254. 800682e: 9300 str r3, [sp, #0]
  15255. API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr);
  15256. 8006830: 9102 str r1, [sp, #8]
  15257. API_MSG_VAR_REF(msg).msg.bc.port = port;
  15258. 8006832: f8ad 200c strh.w r2, [sp, #12]
  15259. err = netconn_apimsg(lwip_netconn_do_connect, &API_MSG_VAR_REF(msg));
  15260. 8006836: 4669 mov r1, sp
  15261. 8006838: 4808 ldr r0, [pc, #32] @ (800685c <netconn_connect+0x38>)
  15262. 800683a: f7ff feea bl 8006612 <netconn_apimsg>
  15263. }
  15264. 800683e: b009 add sp, #36 @ 0x24
  15265. 8006840: f85d fb04 ldr.w pc, [sp], #4
  15266. LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;);
  15267. 8006844: 4b06 ldr r3, [pc, #24] @ (8006860 <netconn_connect+0x3c>)
  15268. 8006846: f44f 72bf mov.w r2, #382 @ 0x17e
  15269. 800684a: 4906 ldr r1, [pc, #24] @ (8006864 <netconn_connect+0x40>)
  15270. 800684c: 4806 ldr r0, [pc, #24] @ (8006868 <netconn_connect+0x44>)
  15271. 800684e: f00c fddb bl 8013408 <iprintf>
  15272. 8006852: f06f 000f mvn.w r0, #15
  15273. 8006856: e7f2 b.n 800683e <netconn_connect+0x1a>
  15274. addr = IP4_ADDR_ANY;
  15275. 8006858: 4904 ldr r1, [pc, #16] @ (800686c <netconn_connect+0x48>)
  15276. 800685a: e7e8 b.n 800682e <netconn_connect+0xa>
  15277. 800685c: 08007aa9 .word 0x08007aa9
  15278. 8006860: 08014664 .word 0x08014664
  15279. 8006864: 080147e4 .word 0x080147e4
  15280. 8006868: 080144e8 .word 0x080144e8
  15281. 800686c: 080156d8 .word 0x080156d8
  15282. 08006870 <netconn_disconnect>:
  15283. {
  15284. 8006870: b500 push {lr}
  15285. 8006872: b089 sub sp, #36 @ 0x24
  15286. LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;);
  15287. 8006874: b138 cbz r0, 8006886 <netconn_disconnect+0x16>
  15288. API_MSG_VAR_REF(msg).conn = conn;
  15289. 8006876: 9000 str r0, [sp, #0]
  15290. err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg));
  15291. 8006878: 4669 mov r1, sp
  15292. 800687a: 4808 ldr r0, [pc, #32] @ (800689c <netconn_disconnect+0x2c>)
  15293. 800687c: f7ff fec9 bl 8006612 <netconn_apimsg>
  15294. }
  15295. 8006880: b009 add sp, #36 @ 0x24
  15296. 8006882: f85d fb04 ldr.w pc, [sp], #4
  15297. LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;);
  15298. 8006886: 4b06 ldr r3, [pc, #24] @ (80068a0 <netconn_disconnect+0x30>)
  15299. 8006888: f44f 72cf mov.w r2, #414 @ 0x19e
  15300. 800688c: 4905 ldr r1, [pc, #20] @ (80068a4 <netconn_disconnect+0x34>)
  15301. 800688e: 4806 ldr r0, [pc, #24] @ (80068a8 <netconn_disconnect+0x38>)
  15302. 8006890: f00c fdba bl 8013408 <iprintf>
  15303. 8006894: f06f 000f mvn.w r0, #15
  15304. 8006898: e7f2 b.n 8006880 <netconn_disconnect+0x10>
  15305. 800689a: bf00 nop
  15306. 800689c: 08007ba5 .word 0x08007ba5
  15307. 80068a0: 08014664 .word 0x08014664
  15308. 80068a4: 08014804 .word 0x08014804
  15309. 80068a8: 080144e8 .word 0x080144e8
  15310. 080068ac <netconn_tcp_recvd>:
  15311. {
  15312. 80068ac: b500 push {lr}
  15313. 80068ae: b089 sub sp, #36 @ 0x24
  15314. LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
  15315. 80068b0: b150 cbz r0, 80068c8 <netconn_tcp_recvd+0x1c>
  15316. 80068b2: 7803 ldrb r3, [r0, #0]
  15317. 80068b4: f003 03f0 and.w r3, r3, #240 @ 0xf0
  15318. 80068b8: 2b10 cmp r3, #16
  15319. 80068ba: d105 bne.n 80068c8 <netconn_tcp_recvd+0x1c>
  15320. err = netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg));
  15321. 80068bc: 466a mov r2, sp
  15322. 80068be: f7ff feb5 bl 800662c <netconn_tcp_recvd_msg>
  15323. }
  15324. 80068c2: b009 add sp, #36 @ 0x24
  15325. 80068c4: f85d fb04 ldr.w pc, [sp], #4
  15326. LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
  15327. 80068c8: 4b04 ldr r3, [pc, #16] @ (80068dc <netconn_tcp_recvd+0x30>)
  15328. 80068ca: f240 22b5 movw r2, #693 @ 0x2b5
  15329. 80068ce: 4904 ldr r1, [pc, #16] @ (80068e0 <netconn_tcp_recvd+0x34>)
  15330. 80068d0: 4804 ldr r0, [pc, #16] @ (80068e4 <netconn_tcp_recvd+0x38>)
  15331. 80068d2: f00c fd99 bl 8013408 <iprintf>
  15332. 80068d6: f06f 000f mvn.w r0, #15
  15333. 80068da: e7f2 b.n 80068c2 <netconn_tcp_recvd+0x16>
  15334. 80068dc: 08014664 .word 0x08014664
  15335. 80068e0: 080146c8 .word 0x080146c8
  15336. 80068e4: 080144e8 .word 0x080144e8
  15337. 080068e8 <netconn_send>:
  15338. {
  15339. 80068e8: b500 push {lr}
  15340. 80068ea: b089 sub sp, #36 @ 0x24
  15341. LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;);
  15342. 80068ec: b140 cbz r0, 8006900 <netconn_send+0x18>
  15343. API_MSG_VAR_REF(msg).conn = conn;
  15344. 80068ee: 9000 str r0, [sp, #0]
  15345. API_MSG_VAR_REF(msg).msg.b = buf;
  15346. 80068f0: 9102 str r1, [sp, #8]
  15347. err = netconn_apimsg(lwip_netconn_do_send, &API_MSG_VAR_REF(msg));
  15348. 80068f2: 4669 mov r1, sp
  15349. 80068f4: 4807 ldr r0, [pc, #28] @ (8006914 <netconn_send+0x2c>)
  15350. 80068f6: f7ff fe8c bl 8006612 <netconn_apimsg>
  15351. }
  15352. 80068fa: b009 add sp, #36 @ 0x24
  15353. 80068fc: f85d fb04 ldr.w pc, [sp], #4
  15354. LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;);
  15355. 8006900: 4b05 ldr r3, [pc, #20] @ (8006918 <netconn_send+0x30>)
  15356. 8006902: f240 32b2 movw r2, #946 @ 0x3b2
  15357. 8006906: 4905 ldr r1, [pc, #20] @ (800691c <netconn_send+0x34>)
  15358. 8006908: 4805 ldr r0, [pc, #20] @ (8006920 <netconn_send+0x38>)
  15359. 800690a: f00c fd7d bl 8013408 <iprintf>
  15360. 800690e: f06f 000f mvn.w r0, #15
  15361. 8006912: e7f2 b.n 80068fa <netconn_send+0x12>
  15362. 8006914: 08007bc7 .word 0x08007bc7
  15363. 8006918: 08014664 .word 0x08014664
  15364. 800691c: 08014828 .word 0x08014828
  15365. 8006920: 080144e8 .word 0x080144e8
  15366. 08006924 <netconn_write_vectors_partly>:
  15367. {
  15368. 8006924: b5f0 push {r4, r5, r6, r7, lr}
  15369. 8006926: b089 sub sp, #36 @ 0x24
  15370. 8006928: 9e0e ldr r6, [sp, #56] @ 0x38
  15371. LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;);
  15372. 800692a: b178 cbz r0, 800694c <netconn_write_vectors_partly+0x28>
  15373. 800692c: 4684 mov ip, r0
  15374. LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;);
  15375. 800692e: 7800 ldrb r0, [r0, #0]
  15376. 8006930: f000 00f0 and.w r0, r0, #240 @ 0xf0
  15377. 8006934: 2810 cmp r0, #16
  15378. 8006936: d113 bne.n 8006960 <netconn_write_vectors_partly+0x3c>
  15379. dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
  15380. 8006938: f89c 0028 ldrb.w r0, [ip, #40] @ 0x28
  15381. 800693c: f010 0f02 tst.w r0, #2
  15382. 8006940: d118 bne.n 8006974 <netconn_write_vectors_partly+0x50>
  15383. 8006942: f013 0f04 tst.w r3, #4
  15384. 8006946: d028 beq.n 800699a <netconn_write_vectors_partly+0x76>
  15385. 8006948: 2001 movs r0, #1
  15386. 800694a: e014 b.n 8006976 <netconn_write_vectors_partly+0x52>
  15387. LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;);
  15388. 800694c: 4b2d ldr r3, [pc, #180] @ (8006a04 <netconn_write_vectors_partly+0xe0>)
  15389. 800694e: f240 32ee movw r2, #1006 @ 0x3ee
  15390. 8006952: 492d ldr r1, [pc, #180] @ (8006a08 <netconn_write_vectors_partly+0xe4>)
  15391. 8006954: 482d ldr r0, [pc, #180] @ (8006a0c <netconn_write_vectors_partly+0xe8>)
  15392. 8006956: f00c fd57 bl 8013408 <iprintf>
  15393. 800695a: f06f 050f mvn.w r5, #15
  15394. 800695e: e049 b.n 80069f4 <netconn_write_vectors_partly+0xd0>
  15395. LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;);
  15396. 8006960: 4b28 ldr r3, [pc, #160] @ (8006a04 <netconn_write_vectors_partly+0xe0>)
  15397. 8006962: f240 32ef movw r2, #1007 @ 0x3ef
  15398. 8006966: 492a ldr r1, [pc, #168] @ (8006a10 <netconn_write_vectors_partly+0xec>)
  15399. 8006968: 4828 ldr r0, [pc, #160] @ (8006a0c <netconn_write_vectors_partly+0xe8>)
  15400. 800696a: f00c fd4d bl 8013408 <iprintf>
  15401. 800696e: f06f 0505 mvn.w r5, #5
  15402. 8006972: e03f b.n 80069f4 <netconn_write_vectors_partly+0xd0>
  15403. dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
  15404. 8006974: 2001 movs r0, #1
  15405. if (dontblock && !bytes_written) {
  15406. 8006976: f000 07ff and.w r7, r0, #255 @ 0xff
  15407. 800697a: 2e00 cmp r6, #0
  15408. 800697c: bf14 ite ne
  15409. 800697e: 2000 movne r0, #0
  15410. 8006980: f000 0001 andeq.w r0, r0, #1
  15411. 8006984: bb88 cbnz r0, 80069ea <netconn_write_vectors_partly+0xc6>
  15412. size = 0;
  15413. 8006986: 4604 mov r4, r0
  15414. for (i = 0; i < vectorcnt; i++) {
  15415. 8006988: 4282 cmp r2, r0
  15416. 800698a: dd08 ble.n 800699e <netconn_write_vectors_partly+0x7a>
  15417. size += vectors[i].len;
  15418. 800698c: eb01 05c0 add.w r5, r1, r0, lsl #3
  15419. 8006990: 686d ldr r5, [r5, #4]
  15420. if (size < vectors[i].len) {
  15421. 8006992: 1964 adds r4, r4, r5
  15422. 8006994: d22c bcs.n 80069f0 <netconn_write_vectors_partly+0xcc>
  15423. for (i = 0; i < vectorcnt; i++) {
  15424. 8006996: 3001 adds r0, #1
  15425. 8006998: e7f6 b.n 8006988 <netconn_write_vectors_partly+0x64>
  15426. dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
  15427. 800699a: 2000 movs r0, #0
  15428. 800699c: e7eb b.n 8006976 <netconn_write_vectors_partly+0x52>
  15429. if (size == 0) {
  15430. 800699e: b364 cbz r4, 80069fa <netconn_write_vectors_partly+0xd6>
  15431. } else if (size > SSIZE_MAX) {
  15432. 80069a0: 2c00 cmp r4, #0
  15433. 80069a2: da02 bge.n 80069aa <netconn_write_vectors_partly+0x86>
  15434. if (!bytes_written) {
  15435. 80069a4: b35e cbz r6, 80069fe <netconn_write_vectors_partly+0xda>
  15436. size = (size_t)limited;
  15437. 80069a6: f06f 4400 mvn.w r4, #2147483648 @ 0x80000000
  15438. API_MSG_VAR_REF(msg).conn = conn;
  15439. 80069aa: f8cd c000 str.w ip, [sp]
  15440. API_MSG_VAR_REF(msg).msg.w.vector = vectors;
  15441. 80069ae: 9102 str r1, [sp, #8]
  15442. API_MSG_VAR_REF(msg).msg.w.vector_cnt = vectorcnt;
  15443. 80069b0: f8ad 200c strh.w r2, [sp, #12]
  15444. API_MSG_VAR_REF(msg).msg.w.vector_off = 0;
  15445. 80069b4: 2200 movs r2, #0
  15446. 80069b6: 9204 str r2, [sp, #16]
  15447. API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags;
  15448. 80069b8: f88d 301c strb.w r3, [sp, #28]
  15449. API_MSG_VAR_REF(msg).msg.w.len = size;
  15450. 80069bc: 9405 str r4, [sp, #20]
  15451. API_MSG_VAR_REF(msg).msg.w.offset = 0;
  15452. 80069be: 9206 str r2, [sp, #24]
  15453. err = netconn_apimsg(lwip_netconn_do_write, &API_MSG_VAR_REF(msg));
  15454. 80069c0: 4669 mov r1, sp
  15455. 80069c2: 4814 ldr r0, [pc, #80] @ (8006a14 <netconn_write_vectors_partly+0xf0>)
  15456. 80069c4: f7ff fe25 bl 8006612 <netconn_apimsg>
  15457. if (err == ERR_OK) {
  15458. 80069c8: 4605 mov r5, r0
  15459. 80069ca: b998 cbnz r0, 80069f4 <netconn_write_vectors_partly+0xd0>
  15460. if (bytes_written != NULL) {
  15461. 80069cc: b10e cbz r6, 80069d2 <netconn_write_vectors_partly+0xae>
  15462. *bytes_written = API_MSG_VAR_REF(msg).msg.w.offset;
  15463. 80069ce: 9b06 ldr r3, [sp, #24]
  15464. 80069d0: 6033 str r3, [r6, #0]
  15465. if (!dontblock) {
  15466. 80069d2: b97f cbnz r7, 80069f4 <netconn_write_vectors_partly+0xd0>
  15467. LWIP_ASSERT("do_write failed to write all bytes", API_MSG_VAR_REF(msg).msg.w.offset == size);
  15468. 80069d4: 9b06 ldr r3, [sp, #24]
  15469. 80069d6: 42a3 cmp r3, r4
  15470. 80069d8: d00c beq.n 80069f4 <netconn_write_vectors_partly+0xd0>
  15471. 80069da: 4b0a ldr r3, [pc, #40] @ (8006a04 <netconn_write_vectors_partly+0xe0>)
  15472. 80069dc: f44f 6286 mov.w r2, #1072 @ 0x430
  15473. 80069e0: 490d ldr r1, [pc, #52] @ (8006a18 <netconn_write_vectors_partly+0xf4>)
  15474. 80069e2: 480a ldr r0, [pc, #40] @ (8006a0c <netconn_write_vectors_partly+0xe8>)
  15475. 80069e4: f00c fd10 bl 8013408 <iprintf>
  15476. 80069e8: e004 b.n 80069f4 <netconn_write_vectors_partly+0xd0>
  15477. return ERR_VAL;
  15478. 80069ea: f06f 0505 mvn.w r5, #5
  15479. 80069ee: e001 b.n 80069f4 <netconn_write_vectors_partly+0xd0>
  15480. return ERR_VAL;
  15481. 80069f0: f06f 0505 mvn.w r5, #5
  15482. }
  15483. 80069f4: 4628 mov r0, r5
  15484. 80069f6: b009 add sp, #36 @ 0x24
  15485. 80069f8: bdf0 pop {r4, r5, r6, r7, pc}
  15486. return ERR_OK;
  15487. 80069fa: 2500 movs r5, #0
  15488. 80069fc: e7fa b.n 80069f4 <netconn_write_vectors_partly+0xd0>
  15489. return ERR_VAL;
  15490. 80069fe: f06f 0505 mvn.w r5, #5
  15491. 8006a02: e7f7 b.n 80069f4 <netconn_write_vectors_partly+0xd0>
  15492. 8006a04: 08014664 .word 0x08014664
  15493. 8006a08: 08014844 .word 0x08014844
  15494. 8006a0c: 080144e8 .word 0x080144e8
  15495. 8006a10: 08014860 .word 0x08014860
  15496. 8006a14: 08007c51 .word 0x08007c51
  15497. 8006a18: 08014884 .word 0x08014884
  15498. 08006a1c <netconn_write_partly>:
  15499. {
  15500. 8006a1c: b500 push {lr}
  15501. 8006a1e: b085 sub sp, #20
  15502. vector.ptr = dataptr;
  15503. 8006a20: 9102 str r1, [sp, #8]
  15504. vector.len = size;
  15505. 8006a22: 9203 str r2, [sp, #12]
  15506. return netconn_write_vectors_partly(conn, &vector, 1, apiflags, bytes_written);
  15507. 8006a24: 9a06 ldr r2, [sp, #24]
  15508. 8006a26: 9200 str r2, [sp, #0]
  15509. 8006a28: 2201 movs r2, #1
  15510. 8006a2a: a902 add r1, sp, #8
  15511. 8006a2c: f7ff ff7a bl 8006924 <netconn_write_vectors_partly>
  15512. }
  15513. 8006a30: b005 add sp, #20
  15514. 8006a32: f85d fb04 ldr.w pc, [sp], #4
  15515. 08006a36 <netconn_err>:
  15516. * @param conn the netconn to get the error from
  15517. * @return and pending error or ERR_OK if no error was pending
  15518. */
  15519. err_t
  15520. netconn_err(struct netconn *conn)
  15521. {
  15522. 8006a36: b538 push {r3, r4, r5, lr}
  15523. err_t err;
  15524. SYS_ARCH_DECL_PROTECT(lev);
  15525. if (conn == NULL) {
  15526. 8006a38: b150 cbz r0, 8006a50 <netconn_err+0x1a>
  15527. 8006a3a: 4604 mov r4, r0
  15528. return ERR_OK;
  15529. }
  15530. SYS_ARCH_PROTECT(lev);
  15531. 8006a3c: f006 fb18 bl 800d070 <sys_arch_protect>
  15532. err = conn->pending_err;
  15533. 8006a40: f994 5008 ldrsb.w r5, [r4, #8]
  15534. conn->pending_err = ERR_OK;
  15535. 8006a44: 2300 movs r3, #0
  15536. 8006a46: 7223 strb r3, [r4, #8]
  15537. SYS_ARCH_UNPROTECT(lev);
  15538. 8006a48: f006 fb1e bl 800d088 <sys_arch_unprotect>
  15539. return err;
  15540. }
  15541. 8006a4c: 4628 mov r0, r5
  15542. 8006a4e: bd38 pop {r3, r4, r5, pc}
  15543. return ERR_OK;
  15544. 8006a50: 2500 movs r5, #0
  15545. 8006a52: e7fb b.n 8006a4c <netconn_err+0x16>
  15546. 08006a54 <netconn_recv_data>:
  15547. {
  15548. 8006a54: b5f0 push {r4, r5, r6, r7, lr}
  15549. 8006a56: b083 sub sp, #12
  15550. void *buf = NULL;
  15551. 8006a58: 2300 movs r3, #0
  15552. 8006a5a: 9301 str r3, [sp, #4]
  15553. LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;);
  15554. 8006a5c: 2900 cmp r1, #0
  15555. 8006a5e: d040 beq.n 8006ae2 <netconn_recv_data+0x8e>
  15556. 8006a60: 4604 mov r4, r0
  15557. 8006a62: 4616 mov r6, r2
  15558. 8006a64: 460f mov r7, r1
  15559. *new_buf = NULL;
  15560. 8006a66: 2300 movs r3, #0
  15561. 8006a68: 600b str r3, [r1, #0]
  15562. LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;);
  15563. 8006a6a: 2800 cmp r0, #0
  15564. 8006a6c: d043 beq.n 8006af6 <netconn_recv_data+0xa2>
  15565. if (!NETCONN_RECVMBOX_WAITABLE(conn)) {
  15566. 8006a6e: f100 0510 add.w r5, r0, #16
  15567. 8006a72: 4628 mov r0, r5
  15568. 8006a74: f006 fa75 bl 800cf62 <sys_mbox_valid>
  15569. 8006a78: 2800 cmp r0, #0
  15570. 8006a7a: d046 beq.n 8006b0a <netconn_recv_data+0xb6>
  15571. if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) ||
  15572. 8006a7c: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  15573. 8006a80: f013 0f02 tst.w r3, #2
  15574. 8006a84: d109 bne.n 8006a9a <netconn_recv_data+0x46>
  15575. 8006a86: f016 0f04 tst.w r6, #4
  15576. 8006a8a: d106 bne.n 8006a9a <netconn_recv_data+0x46>
  15577. 8006a8c: f013 0f01 tst.w r3, #1
  15578. 8006a90: d103 bne.n 8006a9a <netconn_recv_data+0x46>
  15579. (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) {
  15580. 8006a92: f994 3008 ldrsb.w r3, [r4, #8]
  15581. 8006a96: 2b00 cmp r3, #0
  15582. 8006a98: d04c beq.n 8006b34 <netconn_recv_data+0xe0>
  15583. if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_ARCH_TIMEOUT) {
  15584. 8006a9a: a901 add r1, sp, #4
  15585. 8006a9c: 4628 mov r0, r5
  15586. 8006a9e: f006 fa55 bl 800cf4c <sys_arch_mbox_tryfetch>
  15587. 8006aa2: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
  15588. 8006aa6: d038 beq.n 8006b1a <netconn_recv_data+0xc6>
  15589. if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP)
  15590. 8006aa8: 7823 ldrb r3, [r4, #0]
  15591. 8006aaa: f003 03f0 and.w r3, r3, #240 @ 0xf0
  15592. 8006aae: 2b10 cmp r3, #16
  15593. 8006ab0: d04b beq.n 8006b4a <netconn_recv_data+0xf6>
  15594. LWIP_ASSERT("buf != NULL", buf != NULL);
  15595. 8006ab2: 9b01 ldr r3, [sp, #4]
  15596. 8006ab4: 2b00 cmp r3, #0
  15597. 8006ab6: d058 beq.n 8006b6a <netconn_recv_data+0x116>
  15598. len = netbuf_len((struct netbuf *)buf);
  15599. 8006ab8: 9b01 ldr r3, [sp, #4]
  15600. 8006aba: 681b ldr r3, [r3, #0]
  15601. 8006abc: 891d ldrh r5, [r3, #8]
  15602. SYS_ARCH_DEC(conn->recv_avail, len);
  15603. 8006abe: f006 fad7 bl 800d070 <sys_arch_protect>
  15604. 8006ac2: 6a63 ldr r3, [r4, #36] @ 0x24
  15605. 8006ac4: 1b5b subs r3, r3, r5
  15606. 8006ac6: 6263 str r3, [r4, #36] @ 0x24
  15607. 8006ac8: f006 fade bl 800d088 <sys_arch_unprotect>
  15608. API_EVENT(conn, NETCONN_EVT_RCVMINUS, len);
  15609. 8006acc: 6b23 ldr r3, [r4, #48] @ 0x30
  15610. 8006ace: b11b cbz r3, 8006ad8 <netconn_recv_data+0x84>
  15611. 8006ad0: 462a mov r2, r5
  15612. 8006ad2: 2101 movs r1, #1
  15613. 8006ad4: 4620 mov r0, r4
  15614. 8006ad6: 4798 blx r3
  15615. *new_buf = buf;
  15616. 8006ad8: 9b01 ldr r3, [sp, #4]
  15617. 8006ada: 603b str r3, [r7, #0]
  15618. return ERR_OK;
  15619. 8006adc: 2000 movs r0, #0
  15620. }
  15621. 8006ade: b003 add sp, #12
  15622. 8006ae0: bdf0 pop {r4, r5, r6, r7, pc}
  15623. LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;);
  15624. 8006ae2: 4b27 ldr r3, [pc, #156] @ (8006b80 <netconn_recv_data+0x12c>)
  15625. 8006ae4: f44f 7212 mov.w r2, #584 @ 0x248
  15626. 8006ae8: 4926 ldr r1, [pc, #152] @ (8006b84 <netconn_recv_data+0x130>)
  15627. 8006aea: 4827 ldr r0, [pc, #156] @ (8006b88 <netconn_recv_data+0x134>)
  15628. 8006aec: f00c fc8c bl 8013408 <iprintf>
  15629. 8006af0: f06f 000f mvn.w r0, #15
  15630. 8006af4: e7f3 b.n 8006ade <netconn_recv_data+0x8a>
  15631. LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;);
  15632. 8006af6: 4b22 ldr r3, [pc, #136] @ (8006b80 <netconn_recv_data+0x12c>)
  15633. 8006af8: f240 224a movw r2, #586 @ 0x24a
  15634. 8006afc: 4923 ldr r1, [pc, #140] @ (8006b8c <netconn_recv_data+0x138>)
  15635. 8006afe: 4822 ldr r0, [pc, #136] @ (8006b88 <netconn_recv_data+0x134>)
  15636. 8006b00: f00c fc82 bl 8013408 <iprintf>
  15637. 8006b04: f06f 000f mvn.w r0, #15
  15638. 8006b08: e7e9 b.n 8006ade <netconn_recv_data+0x8a>
  15639. err_t err = netconn_err(conn);
  15640. 8006b0a: 4620 mov r0, r4
  15641. 8006b0c: f7ff ff93 bl 8006a36 <netconn_err>
  15642. if (err != ERR_OK) {
  15643. 8006b10: 2800 cmp r0, #0
  15644. 8006b12: d1e4 bne.n 8006ade <netconn_recv_data+0x8a>
  15645. return ERR_CONN;
  15646. 8006b14: f06f 000a mvn.w r0, #10
  15647. 8006b18: e7e1 b.n 8006ade <netconn_recv_data+0x8a>
  15648. err = netconn_err(conn);
  15649. 8006b1a: 4620 mov r0, r4
  15650. 8006b1c: f7ff ff8b bl 8006a36 <netconn_err>
  15651. if (err != ERR_OK) {
  15652. 8006b20: 2800 cmp r0, #0
  15653. 8006b22: d1dc bne.n 8006ade <netconn_recv_data+0x8a>
  15654. if (conn->flags & NETCONN_FLAG_MBOXCLOSED) {
  15655. 8006b24: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  15656. 8006b28: f013 0f01 tst.w r3, #1
  15657. 8006b2c: d025 beq.n 8006b7a <netconn_recv_data+0x126>
  15658. return ERR_CONN;
  15659. 8006b2e: f06f 000a mvn.w r0, #10
  15660. 8006b32: e7d4 b.n 8006ade <netconn_recv_data+0x8a>
  15661. if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) {
  15662. 8006b34: 69e2 ldr r2, [r4, #28]
  15663. 8006b36: a901 add r1, sp, #4
  15664. 8006b38: 4628 mov r0, r5
  15665. 8006b3a: f006 f9e6 bl 800cf0a <sys_arch_mbox_fetch>
  15666. 8006b3e: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
  15667. 8006b42: d1b1 bne.n 8006aa8 <netconn_recv_data+0x54>
  15668. return ERR_TIMEOUT;
  15669. 8006b44: f06f 0002 mvn.w r0, #2
  15670. 8006b48: e7c9 b.n 8006ade <netconn_recv_data+0x8a>
  15671. if (lwip_netconn_is_err_msg(buf, &err)) {
  15672. 8006b4a: f10d 0103 add.w r1, sp, #3
  15673. 8006b4e: 9801 ldr r0, [sp, #4]
  15674. 8006b50: f000 fdf6 bl 8007740 <lwip_netconn_is_err_msg>
  15675. 8006b54: b130 cbz r0, 8006b64 <netconn_recv_data+0x110>
  15676. if (err == ERR_CLSD) {
  15677. 8006b56: f99d 0003 ldrsb.w r0, [sp, #3]
  15678. 8006b5a: f110 0f0f cmn.w r0, #15
  15679. 8006b5e: d1be bne.n 8006ade <netconn_recv_data+0x8a>
  15680. return ERR_OK;
  15681. 8006b60: 2000 movs r0, #0
  15682. 8006b62: e7bc b.n 8006ade <netconn_recv_data+0x8a>
  15683. len = ((struct pbuf *)buf)->tot_len;
  15684. 8006b64: 9b01 ldr r3, [sp, #4]
  15685. 8006b66: 891d ldrh r5, [r3, #8]
  15686. 8006b68: e7a9 b.n 8006abe <netconn_recv_data+0x6a>
  15687. LWIP_ASSERT("buf != NULL", buf != NULL);
  15688. 8006b6a: 4b05 ldr r3, [pc, #20] @ (8006b80 <netconn_recv_data+0x12c>)
  15689. 8006b6c: f240 2291 movw r2, #657 @ 0x291
  15690. 8006b70: 4907 ldr r1, [pc, #28] @ (8006b90 <netconn_recv_data+0x13c>)
  15691. 8006b72: 4805 ldr r0, [pc, #20] @ (8006b88 <netconn_recv_data+0x134>)
  15692. 8006b74: f00c fc48 bl 8013408 <iprintf>
  15693. 8006b78: e79e b.n 8006ab8 <netconn_recv_data+0x64>
  15694. return ERR_WOULDBLOCK;
  15695. 8006b7a: f06f 0006 mvn.w r0, #6
  15696. 8006b7e: e7ae b.n 8006ade <netconn_recv_data+0x8a>
  15697. 8006b80: 08014664 .word 0x08014664
  15698. 8006b84: 080148a8 .word 0x080148a8
  15699. 8006b88: 080144e8 .word 0x080144e8
  15700. 8006b8c: 080148c8 .word 0x080148c8
  15701. 8006b90: 080148e4 .word 0x080148e4
  15702. 08006b94 <netconn_recv_udp_raw_netbuf_flags>:
  15703. {
  15704. 8006b94: b508 push {r3, lr}
  15705. LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) &&
  15706. 8006b96: b138 cbz r0, 8006ba8 <netconn_recv_udp_raw_netbuf_flags+0x14>
  15707. 8006b98: 7803 ldrb r3, [r0, #0]
  15708. 8006b9a: f003 03f0 and.w r3, r3, #240 @ 0xf0
  15709. 8006b9e: 2b10 cmp r3, #16
  15710. 8006ba0: d002 beq.n 8006ba8 <netconn_recv_udp_raw_netbuf_flags+0x14>
  15711. return netconn_recv_data(conn, (void **)new_buf, apiflags);
  15712. 8006ba2: f7ff ff57 bl 8006a54 <netconn_recv_data>
  15713. }
  15714. 8006ba6: bd08 pop {r3, pc}
  15715. LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) &&
  15716. 8006ba8: 4b04 ldr r3, [pc, #16] @ (8006bbc <netconn_recv_udp_raw_netbuf_flags+0x28>)
  15717. 8006baa: f44f 7253 mov.w r2, #844 @ 0x34c
  15718. 8006bae: 4904 ldr r1, [pc, #16] @ (8006bc0 <netconn_recv_udp_raw_netbuf_flags+0x2c>)
  15719. 8006bb0: 4804 ldr r0, [pc, #16] @ (8006bc4 <netconn_recv_udp_raw_netbuf_flags+0x30>)
  15720. 8006bb2: f00c fc29 bl 8013408 <iprintf>
  15721. 8006bb6: f06f 000f mvn.w r0, #15
  15722. 8006bba: e7f4 b.n 8006ba6 <netconn_recv_udp_raw_netbuf_flags+0x12>
  15723. 8006bbc: 08014664 .word 0x08014664
  15724. 8006bc0: 080148f0 .word 0x080148f0
  15725. 8006bc4: 080144e8 .word 0x080144e8
  15726. 08006bc8 <netconn_recv_data_tcp>:
  15727. {
  15728. 8006bc8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  15729. 8006bcc: b088 sub sp, #32
  15730. 8006bce: 4604 mov r4, r0
  15731. 8006bd0: 460f mov r7, r1
  15732. 8006bd2: 4615 mov r5, r2
  15733. if (!NETCONN_RECVMBOX_WAITABLE(conn)) {
  15734. 8006bd4: 3010 adds r0, #16
  15735. 8006bd6: f006 f9c4 bl 800cf62 <sys_mbox_valid>
  15736. 8006bda: 2800 cmp r0, #0
  15737. 8006bdc: d043 beq.n 8006c66 <netconn_recv_data_tcp+0x9e>
  15738. if (netconn_is_flag_set(conn, NETCONN_FIN_RX_PENDING)) {
  15739. 8006bde: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  15740. 8006be2: f994 2028 ldrsb.w r2, [r4, #40] @ 0x28
  15741. 8006be6: 2a00 cmp r2, #0
  15742. 8006be8: db1f blt.n 8006c2a <netconn_recv_data_tcp+0x62>
  15743. if (!(apiflags & NETCONN_NOAUTORCVD)) {
  15744. 8006bea: f005 0808 and.w r8, r5, #8
  15745. err = netconn_recv_data(conn, (void **)new_buf, apiflags);
  15746. 8006bee: 462a mov r2, r5
  15747. 8006bf0: 4639 mov r1, r7
  15748. 8006bf2: 4620 mov r0, r4
  15749. 8006bf4: f7ff ff2e bl 8006a54 <netconn_recv_data>
  15750. if (err != ERR_OK) {
  15751. 8006bf8: 4606 mov r6, r0
  15752. 8006bfa: bb38 cbnz r0, 8006c4c <netconn_recv_data_tcp+0x84>
  15753. buf = *new_buf;
  15754. 8006bfc: 683f ldr r7, [r7, #0]
  15755. if (!(apiflags & NETCONN_NOAUTORCVD)) {
  15756. 8006bfe: f1b8 0f00 cmp.w r8, #0
  15757. 8006c02: d105 bne.n 8006c10 <netconn_recv_data_tcp+0x48>
  15758. u16_t len = buf ? buf->tot_len : 1;
  15759. 8006c04: b337 cbz r7, 8006c54 <netconn_recv_data_tcp+0x8c>
  15760. 8006c06: 8939 ldrh r1, [r7, #8]
  15761. netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg));
  15762. 8006c08: 466a mov r2, sp
  15763. 8006c0a: 4620 mov r0, r4
  15764. 8006c0c: f7ff fd0e bl 800662c <netconn_tcp_recvd_msg>
  15765. if (buf == NULL) {
  15766. 8006c10: b9e7 cbnz r7, 8006c4c <netconn_recv_data_tcp+0x84>
  15767. if (apiflags & NETCONN_NOFIN) {
  15768. 8006c12: f015 0f10 tst.w r5, #16
  15769. 8006c16: d00c beq.n 8006c32 <netconn_recv_data_tcp+0x6a>
  15770. netconn_set_flags(conn, NETCONN_FIN_RX_PENDING);
  15771. 8006c18: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  15772. 8006c1c: f043 0380 orr.w r3, r3, #128 @ 0x80
  15773. 8006c20: f884 3028 strb.w r3, [r4, #40] @ 0x28
  15774. return ERR_WOULDBLOCK;
  15775. 8006c24: f06f 0606 mvn.w r6, #6
  15776. 8006c28: e010 b.n 8006c4c <netconn_recv_data_tcp+0x84>
  15777. netconn_clear_flags(conn, NETCONN_FIN_RX_PENDING);
  15778. 8006c2a: f003 037f and.w r3, r3, #127 @ 0x7f
  15779. 8006c2e: f884 3028 strb.w r3, [r4, #40] @ 0x28
  15780. API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0);
  15781. 8006c32: 6b23 ldr r3, [r4, #48] @ 0x30
  15782. 8006c34: b11b cbz r3, 8006c3e <netconn_recv_data_tcp+0x76>
  15783. 8006c36: 2200 movs r2, #0
  15784. 8006c38: 2101 movs r1, #1
  15785. 8006c3a: 4620 mov r0, r4
  15786. 8006c3c: 4798 blx r3
  15787. if (conn->pcb.ip == NULL) {
  15788. 8006c3e: 6863 ldr r3, [r4, #4]
  15789. 8006c40: b953 cbnz r3, 8006c58 <netconn_recv_data_tcp+0x90>
  15790. err = netconn_err(conn);
  15791. 8006c42: 4620 mov r0, r4
  15792. 8006c44: f7ff fef7 bl 8006a36 <netconn_err>
  15793. if (err != ERR_OK) {
  15794. 8006c48: 4606 mov r6, r0
  15795. 8006c4a: b178 cbz r0, 8006c6c <netconn_recv_data_tcp+0xa4>
  15796. }
  15797. 8006c4c: 4630 mov r0, r6
  15798. 8006c4e: b008 add sp, #32
  15799. 8006c50: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  15800. u16_t len = buf ? buf->tot_len : 1;
  15801. 8006c54: 2101 movs r1, #1
  15802. 8006c56: e7d7 b.n 8006c08 <netconn_recv_data_tcp+0x40>
  15803. netconn_close_shutdown(conn, NETCONN_SHUT_RD);
  15804. 8006c58: 2101 movs r1, #1
  15805. 8006c5a: 4620 mov r0, r4
  15806. 8006c5c: f7ff fd08 bl 8006670 <netconn_close_shutdown>
  15807. return ERR_CLSD;
  15808. 8006c60: f06f 060e mvn.w r6, #14
  15809. 8006c64: e7f2 b.n 8006c4c <netconn_recv_data_tcp+0x84>
  15810. return ERR_CONN;
  15811. 8006c66: f06f 060a mvn.w r6, #10
  15812. 8006c6a: e7ef b.n 8006c4c <netconn_recv_data_tcp+0x84>
  15813. return ERR_RST;
  15814. 8006c6c: f06f 060d mvn.w r6, #13
  15815. 8006c70: e7ec b.n 8006c4c <netconn_recv_data_tcp+0x84>
  15816. ...
  15817. 08006c74 <netconn_recv_tcp_pbuf_flags>:
  15818. {
  15819. 8006c74: b508 push {r3, lr}
  15820. LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
  15821. 8006c76: b138 cbz r0, 8006c88 <netconn_recv_tcp_pbuf_flags+0x14>
  15822. 8006c78: 7803 ldrb r3, [r0, #0]
  15823. 8006c7a: f003 03f0 and.w r3, r3, #240 @ 0xf0
  15824. 8006c7e: 2b10 cmp r3, #16
  15825. 8006c80: d102 bne.n 8006c88 <netconn_recv_tcp_pbuf_flags+0x14>
  15826. return netconn_recv_data_tcp(conn, new_buf, apiflags);
  15827. 8006c82: f7ff ffa1 bl 8006bc8 <netconn_recv_data_tcp>
  15828. }
  15829. 8006c86: bd08 pop {r3, pc}
  15830. LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) &&
  15831. 8006c88: 4b04 ldr r3, [pc, #16] @ (8006c9c <netconn_recv_tcp_pbuf_flags+0x28>)
  15832. 8006c8a: f240 3225 movw r2, #805 @ 0x325
  15833. 8006c8e: 4904 ldr r1, [pc, #16] @ (8006ca0 <netconn_recv_tcp_pbuf_flags+0x2c>)
  15834. 8006c90: 4804 ldr r0, [pc, #16] @ (8006ca4 <netconn_recv_tcp_pbuf_flags+0x30>)
  15835. 8006c92: f00c fbb9 bl 8013408 <iprintf>
  15836. 8006c96: f06f 000f mvn.w r0, #15
  15837. 8006c9a: e7f4 b.n 8006c86 <netconn_recv_tcp_pbuf_flags+0x12>
  15838. 8006c9c: 08014664 .word 0x08014664
  15839. 8006ca0: 080146c8 .word 0x080146c8
  15840. 8006ca4: 080144e8 .word 0x080144e8
  15841. 08006ca8 <lwip_netconn_err_to_msg>:
  15842. /** Translate an error to a unique void* passed via an mbox */
  15843. static void *
  15844. lwip_netconn_err_to_msg(err_t err)
  15845. {
  15846. switch (err) {
  15847. 8006ca8: f110 0f0e cmn.w r0, #14
  15848. 8006cac: d011 beq.n 8006cd2 <lwip_netconn_err_to_msg+0x2a>
  15849. 8006cae: f110 0f0d cmn.w r0, #13
  15850. 8006cb2: d010 beq.n 8006cd6 <lwip_netconn_err_to_msg+0x2e>
  15851. 8006cb4: f110 0f0f cmn.w r0, #15
  15852. 8006cb8: d00f beq.n 8006cda <lwip_netconn_err_to_msg+0x32>
  15853. case ERR_RST:
  15854. return LWIP_CONST_CAST(void *, &netconn_reset);
  15855. case ERR_CLSD:
  15856. return LWIP_CONST_CAST(void *, &netconn_closed);
  15857. default:
  15858. LWIP_ASSERT("unhandled error", err == ERR_OK);
  15859. 8006cba: b908 cbnz r0, 8006cc0 <lwip_netconn_err_to_msg+0x18>
  15860. return NULL;
  15861. 8006cbc: 2000 movs r0, #0
  15862. }
  15863. }
  15864. 8006cbe: 4770 bx lr
  15865. {
  15866. 8006cc0: b508 push {r3, lr}
  15867. LWIP_ASSERT("unhandled error", err == ERR_OK);
  15868. 8006cc2: 4b07 ldr r3, [pc, #28] @ (8006ce0 <lwip_netconn_err_to_msg+0x38>)
  15869. 8006cc4: 227d movs r2, #125 @ 0x7d
  15870. 8006cc6: 4907 ldr r1, [pc, #28] @ (8006ce4 <lwip_netconn_err_to_msg+0x3c>)
  15871. 8006cc8: 4807 ldr r0, [pc, #28] @ (8006ce8 <lwip_netconn_err_to_msg+0x40>)
  15872. 8006cca: f00c fb9d bl 8013408 <iprintf>
  15873. return NULL;
  15874. 8006cce: 2000 movs r0, #0
  15875. }
  15876. 8006cd0: bd08 pop {r3, pc}
  15877. return LWIP_CONST_CAST(void *, &netconn_reset);
  15878. 8006cd2: 4806 ldr r0, [pc, #24] @ (8006cec <lwip_netconn_err_to_msg+0x44>)
  15879. 8006cd4: 4770 bx lr
  15880. switch (err) {
  15881. 8006cd6: 4806 ldr r0, [pc, #24] @ (8006cf0 <lwip_netconn_err_to_msg+0x48>)
  15882. 8006cd8: 4770 bx lr
  15883. return LWIP_CONST_CAST(void *, &netconn_closed);
  15884. 8006cda: 4806 ldr r0, [pc, #24] @ (8006cf4 <lwip_netconn_err_to_msg+0x4c>)
  15885. 8006cdc: 4770 bx lr
  15886. 8006cde: bf00 nop
  15887. 8006ce0: 0801491c .word 0x0801491c
  15888. 8006ce4: 08014980 .word 0x08014980
  15889. 8006ce8: 080144e8 .word 0x080144e8
  15890. 8006cec: 08014e32 .word 0x08014e32
  15891. 8006cf0: 08014e33 .word 0x08014e33
  15892. 8006cf4: 08014e31 .word 0x08014e31
  15893. 08006cf8 <recv_udp>:
  15894. * @see udp.h (struct udp_pcb.recv) for parameters
  15895. */
  15896. static void
  15897. recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p,
  15898. const ip_addr_t *addr, u16_t port)
  15899. {
  15900. 8006cf8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  15901. 8006cfc: 4604 mov r4, r0
  15902. 8006cfe: 4615 mov r5, r2
  15903. 8006d00: 4698 mov r8, r3
  15904. #if LWIP_SO_RCVBUF
  15905. int recv_avail;
  15906. #endif /* LWIP_SO_RCVBUF */
  15907. LWIP_UNUSED_ARG(pcb); /* only used for asserts... */
  15908. LWIP_ASSERT("recv_udp must have a pcb argument", pcb != NULL);
  15909. 8006d02: 460e mov r6, r1
  15910. 8006d04: b1f1 cbz r1, 8006d44 <recv_udp+0x4c>
  15911. LWIP_ASSERT("recv_udp must have an argument", arg != NULL);
  15912. 8006d06: b324 cbz r4, 8006d52 <recv_udp+0x5a>
  15913. if (conn == NULL) {
  15914. pbuf_free(p);
  15915. return;
  15916. }
  15917. LWIP_ASSERT("recv_udp: recv for wrong pcb!", conn->pcb.udp == pcb);
  15918. 8006d08: 6863 ldr r3, [r4, #4]
  15919. 8006d0a: 42b3 cmp r3, r6
  15920. 8006d0c: d005 beq.n 8006d1a <recv_udp+0x22>
  15921. 8006d0e: 4b2d ldr r3, [pc, #180] @ (8006dc4 <recv_udp+0xcc>)
  15922. 8006d10: 22ee movs r2, #238 @ 0xee
  15923. 8006d12: 492d ldr r1, [pc, #180] @ (8006dc8 <recv_udp+0xd0>)
  15924. 8006d14: 482d ldr r0, [pc, #180] @ (8006dcc <recv_udp+0xd4>)
  15925. 8006d16: f00c fb77 bl 8013408 <iprintf>
  15926. #if LWIP_SO_RCVBUF
  15927. SYS_ARCH_GET(conn->recv_avail, recv_avail);
  15928. 8006d1a: f006 f9a9 bl 800d070 <sys_arch_protect>
  15929. 8006d1e: 6a67 ldr r7, [r4, #36] @ 0x24
  15930. 8006d20: f006 f9b2 bl 800d088 <sys_arch_unprotect>
  15931. if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) ||
  15932. 8006d24: f104 0610 add.w r6, r4, #16
  15933. 8006d28: 4630 mov r0, r6
  15934. 8006d2a: f006 f91a bl 800cf62 <sys_mbox_valid>
  15935. 8006d2e: b120 cbz r0, 8006d3a <recv_udp+0x42>
  15936. ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) {
  15937. 8006d30: 892a ldrh r2, [r5, #8]
  15938. 8006d32: 443a add r2, r7
  15939. 8006d34: 6a23 ldr r3, [r4, #32]
  15940. if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) ||
  15941. 8006d36: 429a cmp r2, r3
  15942. 8006d38: dd15 ble.n 8006d66 <recv_udp+0x6e>
  15943. #else /* LWIP_SO_RCVBUF */
  15944. if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) {
  15945. #endif /* LWIP_SO_RCVBUF */
  15946. pbuf_free(p);
  15947. 8006d3a: 4628 mov r0, r5
  15948. 8006d3c: f005 f830 bl 800bda0 <pbuf_free>
  15949. SYS_ARCH_INC(conn->recv_avail, len);
  15950. #endif /* LWIP_SO_RCVBUF */
  15951. /* Register event with callback */
  15952. API_EVENT(conn, NETCONN_EVT_RCVPLUS, len);
  15953. }
  15954. }
  15955. 8006d40: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  15956. LWIP_ASSERT("recv_udp must have a pcb argument", pcb != NULL);
  15957. 8006d44: 4b1f ldr r3, [pc, #124] @ (8006dc4 <recv_udp+0xcc>)
  15958. 8006d46: 22e5 movs r2, #229 @ 0xe5
  15959. 8006d48: 4921 ldr r1, [pc, #132] @ (8006dd0 <recv_udp+0xd8>)
  15960. 8006d4a: 4820 ldr r0, [pc, #128] @ (8006dcc <recv_udp+0xd4>)
  15961. 8006d4c: f00c fb5c bl 8013408 <iprintf>
  15962. 8006d50: e7d9 b.n 8006d06 <recv_udp+0xe>
  15963. LWIP_ASSERT("recv_udp must have an argument", arg != NULL);
  15964. 8006d52: 4b1c ldr r3, [pc, #112] @ (8006dc4 <recv_udp+0xcc>)
  15965. 8006d54: 22e6 movs r2, #230 @ 0xe6
  15966. 8006d56: 491f ldr r1, [pc, #124] @ (8006dd4 <recv_udp+0xdc>)
  15967. 8006d58: 481c ldr r0, [pc, #112] @ (8006dcc <recv_udp+0xd4>)
  15968. 8006d5a: f00c fb55 bl 8013408 <iprintf>
  15969. pbuf_free(p);
  15970. 8006d5e: 4628 mov r0, r5
  15971. 8006d60: f005 f81e bl 800bda0 <pbuf_free>
  15972. return;
  15973. 8006d64: e7ec b.n 8006d40 <recv_udp+0x48>
  15974. buf = (struct netbuf *)memp_malloc(MEMP_NETBUF);
  15975. 8006d66: 2006 movs r0, #6
  15976. 8006d68: f004 fc4c bl 800b604 <memp_malloc>
  15977. if (buf == NULL) {
  15978. 8006d6c: 4607 mov r7, r0
  15979. 8006d6e: b1f8 cbz r0, 8006db0 <recv_udp+0xb8>
  15980. buf->p = p;
  15981. 8006d70: 6005 str r5, [r0, #0]
  15982. buf->ptr = p;
  15983. 8006d72: 6045 str r5, [r0, #4]
  15984. ip_addr_set(&buf->addr, addr);
  15985. 8006d74: f1b8 0f00 cmp.w r8, #0
  15986. 8006d78: d01e beq.n 8006db8 <recv_udp+0xc0>
  15987. 8006d7a: f8d8 3000 ldr.w r3, [r8]
  15988. 8006d7e: 60bb str r3, [r7, #8]
  15989. buf->port = port;
  15990. 8006d80: f8bd 3018 ldrh.w r3, [sp, #24]
  15991. 8006d84: 81bb strh r3, [r7, #12]
  15992. len = p->tot_len;
  15993. 8006d86: 892d ldrh r5, [r5, #8]
  15994. if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) {
  15995. 8006d88: 4639 mov r1, r7
  15996. 8006d8a: 4630 mov r0, r6
  15997. 8006d8c: f006 f8ad bl 800ceea <sys_mbox_trypost>
  15998. 8006d90: b9a0 cbnz r0, 8006dbc <recv_udp+0xc4>
  15999. SYS_ARCH_INC(conn->recv_avail, len);
  16000. 8006d92: f006 f96d bl 800d070 <sys_arch_protect>
  16001. 8006d96: 6a63 ldr r3, [r4, #36] @ 0x24
  16002. 8006d98: 442b add r3, r5
  16003. 8006d9a: 6263 str r3, [r4, #36] @ 0x24
  16004. 8006d9c: f006 f974 bl 800d088 <sys_arch_unprotect>
  16005. API_EVENT(conn, NETCONN_EVT_RCVPLUS, len);
  16006. 8006da0: 6b23 ldr r3, [r4, #48] @ 0x30
  16007. 8006da2: 2b00 cmp r3, #0
  16008. 8006da4: d0cc beq.n 8006d40 <recv_udp+0x48>
  16009. 8006da6: 462a mov r2, r5
  16010. 8006da8: 2100 movs r1, #0
  16011. 8006daa: 4620 mov r0, r4
  16012. 8006dac: 4798 blx r3
  16013. 8006dae: e7c7 b.n 8006d40 <recv_udp+0x48>
  16014. pbuf_free(p);
  16015. 8006db0: 4628 mov r0, r5
  16016. 8006db2: f004 fff5 bl 800bda0 <pbuf_free>
  16017. return;
  16018. 8006db6: e7c3 b.n 8006d40 <recv_udp+0x48>
  16019. ip_addr_set(&buf->addr, addr);
  16020. 8006db8: 2300 movs r3, #0
  16021. 8006dba: e7e0 b.n 8006d7e <recv_udp+0x86>
  16022. netbuf_delete(buf);
  16023. 8006dbc: 4638 mov r0, r7
  16024. 8006dbe: f004 fc71 bl 800b6a4 <netbuf_delete>
  16025. return;
  16026. 8006dc2: e7bd b.n 8006d40 <recv_udp+0x48>
  16027. 8006dc4: 0801491c .word 0x0801491c
  16028. 8006dc8: 080149d4 .word 0x080149d4
  16029. 8006dcc: 080144e8 .word 0x080144e8
  16030. 8006dd0: 08014990 .word 0x08014990
  16031. 8006dd4: 080149b4 .word 0x080149b4
  16032. 08006dd8 <setup_tcp>:
  16033. *
  16034. * @param conn the TCP netconn to setup
  16035. */
  16036. static void
  16037. setup_tcp(struct netconn *conn)
  16038. {
  16039. 8006dd8: b510 push {r4, lr}
  16040. 8006dda: 4601 mov r1, r0
  16041. struct tcp_pcb *pcb;
  16042. pcb = conn->pcb.tcp;
  16043. 8006ddc: 6844 ldr r4, [r0, #4]
  16044. tcp_arg(pcb, conn);
  16045. 8006dde: 4620 mov r0, r4
  16046. 8006de0: f006 fb22 bl 800d428 <tcp_arg>
  16047. tcp_recv(pcb, recv_tcp);
  16048. 8006de4: 4908 ldr r1, [pc, #32] @ (8006e08 <setup_tcp+0x30>)
  16049. 8006de6: 4620 mov r0, r4
  16050. 8006de8: f006 fb26 bl 800d438 <tcp_recv>
  16051. tcp_sent(pcb, sent_tcp);
  16052. 8006dec: 4907 ldr r1, [pc, #28] @ (8006e0c <setup_tcp+0x34>)
  16053. 8006dee: 4620 mov r0, r4
  16054. 8006df0: f006 fb3c bl 800d46c <tcp_sent>
  16055. tcp_poll(pcb, poll_tcp, NETCONN_TCP_POLL_INTERVAL);
  16056. 8006df4: 2202 movs r2, #2
  16057. 8006df6: 4906 ldr r1, [pc, #24] @ (8006e10 <setup_tcp+0x38>)
  16058. 8006df8: 4620 mov r0, r4
  16059. 8006dfa: f006 fb77 bl 800d4ec <tcp_poll>
  16060. tcp_err(pcb, err_tcp);
  16061. 8006dfe: 4905 ldr r1, [pc, #20] @ (8006e14 <setup_tcp+0x3c>)
  16062. 8006e00: 4620 mov r0, r4
  16063. 8006e02: f006 fb4d bl 800d4a0 <tcp_err>
  16064. }
  16065. 8006e06: bd10 pop {r4, pc}
  16066. 8006e08: 08007661 .word 0x08007661
  16067. 8006e0c: 080075ed .word 0x080075ed
  16068. 8006e10: 08007565 .word 0x08007565
  16069. 8006e14: 08006ea1 .word 0x08006ea1
  16070. 08006e18 <pcb_new>:
  16071. *
  16072. * @param msg the api_msg describing the connection type
  16073. */
  16074. static void
  16075. pcb_new(struct api_msg *msg)
  16076. {
  16077. 8006e18: b538 push {r3, r4, r5, lr}
  16078. 8006e1a: 4604 mov r4, r0
  16079. enum lwip_ip_addr_type iptype = IPADDR_TYPE_V4;
  16080. LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL);
  16081. 8006e1c: 6803 ldr r3, [r0, #0]
  16082. 8006e1e: 685b ldr r3, [r3, #4]
  16083. 8006e20: b133 cbz r3, 8006e30 <pcb_new+0x18>
  16084. 8006e22: 4b1b ldr r3, [pc, #108] @ (8006e90 <pcb_new+0x78>)
  16085. 8006e24: f240 2265 movw r2, #613 @ 0x265
  16086. 8006e28: 491a ldr r1, [pc, #104] @ (8006e94 <pcb_new+0x7c>)
  16087. 8006e2a: 481b ldr r0, [pc, #108] @ (8006e98 <pcb_new+0x80>)
  16088. 8006e2c: f00c faec bl 8013408 <iprintf>
  16089. iptype = IPADDR_TYPE_ANY;
  16090. }
  16091. #endif
  16092. /* Allocate a PCB for this connection */
  16093. switch (NETCONNTYPE_GROUP(msg->conn->type)) {
  16094. 8006e30: 6825 ldr r5, [r4, #0]
  16095. 8006e32: 782b ldrb r3, [r5, #0]
  16096. 8006e34: f003 03f0 and.w r3, r3, #240 @ 0xf0
  16097. 8006e38: 2b10 cmp r3, #16
  16098. 8006e3a: d017 beq.n 8006e6c <pcb_new+0x54>
  16099. 8006e3c: 2b20 cmp r3, #32
  16100. 8006e3e: d120 bne.n 8006e82 <pcb_new+0x6a>
  16101. }
  16102. break;
  16103. #endif /* LWIP_RAW */
  16104. #if LWIP_UDP
  16105. case NETCONN_UDP:
  16106. msg->conn->pcb.udp = udp_new_ip_type(iptype);
  16107. 8006e40: 2000 movs r0, #0
  16108. 8006e42: f00b f861 bl 8011f08 <udp_new_ip_type>
  16109. 8006e46: 6068 str r0, [r5, #4]
  16110. if (msg->conn->pcb.udp != NULL) {
  16111. 8006e48: 6823 ldr r3, [r4, #0]
  16112. 8006e4a: 685a ldr r2, [r3, #4]
  16113. 8006e4c: b13a cbz r2, 8006e5e <pcb_new+0x46>
  16114. #if LWIP_UDPLITE
  16115. if (NETCONNTYPE_ISUDPLITE(msg->conn->type)) {
  16116. udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_UDPLITE);
  16117. }
  16118. #endif /* LWIP_UDPLITE */
  16119. if (NETCONNTYPE_ISUDPNOCHKSUM(msg->conn->type)) {
  16120. 8006e4e: 781b ldrb r3, [r3, #0]
  16121. 8006e50: 2b22 cmp r3, #34 @ 0x22
  16122. 8006e52: d008 beq.n 8006e66 <pcb_new+0x4e>
  16123. udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM);
  16124. }
  16125. udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn);
  16126. 8006e54: 6822 ldr r2, [r4, #0]
  16127. 8006e56: 4911 ldr r1, [pc, #68] @ (8006e9c <pcb_new+0x84>)
  16128. 8006e58: 6850 ldr r0, [r2, #4]
  16129. 8006e5a: f00a ffff bl 8011e5c <udp_recv>
  16130. default:
  16131. /* Unsupported netconn type, e.g. protocol disabled */
  16132. msg->err = ERR_VAL;
  16133. return;
  16134. }
  16135. if (msg->conn->pcb.ip == NULL) {
  16136. 8006e5e: 6823 ldr r3, [r4, #0]
  16137. 8006e60: 685b ldr r3, [r3, #4]
  16138. 8006e62: b18b cbz r3, 8006e88 <pcb_new+0x70>
  16139. msg->err = ERR_MEM;
  16140. }
  16141. }
  16142. 8006e64: bd38 pop {r3, r4, r5, pc}
  16143. udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM);
  16144. 8006e66: 2301 movs r3, #1
  16145. 8006e68: 7413 strb r3, [r2, #16]
  16146. 8006e6a: e7f3 b.n 8006e54 <pcb_new+0x3c>
  16147. msg->conn->pcb.tcp = tcp_new_ip_type(iptype);
  16148. 8006e6c: 2000 movs r0, #0
  16149. 8006e6e: f006 fe9d bl 800dbac <tcp_new_ip_type>
  16150. 8006e72: 6068 str r0, [r5, #4]
  16151. if (msg->conn->pcb.tcp != NULL) {
  16152. 8006e74: 6820 ldr r0, [r4, #0]
  16153. 8006e76: 6843 ldr r3, [r0, #4]
  16154. 8006e78: 2b00 cmp r3, #0
  16155. 8006e7a: d0f0 beq.n 8006e5e <pcb_new+0x46>
  16156. setup_tcp(msg->conn);
  16157. 8006e7c: f7ff ffac bl 8006dd8 <setup_tcp>
  16158. 8006e80: e7ed b.n 8006e5e <pcb_new+0x46>
  16159. msg->err = ERR_VAL;
  16160. 8006e82: 23fa movs r3, #250 @ 0xfa
  16161. 8006e84: 7123 strb r3, [r4, #4]
  16162. return;
  16163. 8006e86: e7ed b.n 8006e64 <pcb_new+0x4c>
  16164. msg->err = ERR_MEM;
  16165. 8006e88: 23ff movs r3, #255 @ 0xff
  16166. 8006e8a: 7123 strb r3, [r4, #4]
  16167. 8006e8c: e7ea b.n 8006e64 <pcb_new+0x4c>
  16168. 8006e8e: bf00 nop
  16169. 8006e90: 0801491c .word 0x0801491c
  16170. 8006e94: 080149f4 .word 0x080149f4
  16171. 8006e98: 080144e8 .word 0x080144e8
  16172. 8006e9c: 08006cf9 .word 0x08006cf9
  16173. 08006ea0 <err_tcp>:
  16174. {
  16175. 8006ea0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  16176. 8006ea4: 460d mov r5, r1
  16177. LWIP_ASSERT("conn != NULL", (conn != NULL));
  16178. 8006ea6: 4604 mov r4, r0
  16179. 8006ea8: 2800 cmp r0, #0
  16180. 8006eaa: d040 beq.n 8006f2e <err_tcp+0x8e>
  16181. SYS_ARCH_PROTECT(lev);
  16182. 8006eac: f006 f8e0 bl 800d070 <sys_arch_protect>
  16183. conn->pcb.tcp = NULL;
  16184. 8006eb0: 2200 movs r2, #0
  16185. 8006eb2: 6062 str r2, [r4, #4]
  16186. conn->pending_err = err;
  16187. 8006eb4: 7225 strb r5, [r4, #8]
  16188. conn->flags |= NETCONN_FLAG_MBOXCLOSED;
  16189. 8006eb6: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  16190. 8006eba: f043 0301 orr.w r3, r3, #1
  16191. 8006ebe: f884 3028 strb.w r3, [r4, #40] @ 0x28
  16192. old_state = conn->state;
  16193. 8006ec2: 7866 ldrb r6, [r4, #1]
  16194. conn->state = NETCONN_NONE;
  16195. 8006ec4: 7062 strb r2, [r4, #1]
  16196. SYS_ARCH_UNPROTECT(lev);
  16197. 8006ec6: f006 f8df bl 800d088 <sys_arch_unprotect>
  16198. API_EVENT(conn, NETCONN_EVT_ERROR, 0);
  16199. 8006eca: 6b23 ldr r3, [r4, #48] @ 0x30
  16200. 8006ecc: b11b cbz r3, 8006ed6 <err_tcp+0x36>
  16201. 8006ece: 2200 movs r2, #0
  16202. 8006ed0: 2104 movs r1, #4
  16203. 8006ed2: 4620 mov r0, r4
  16204. 8006ed4: 4798 blx r3
  16205. API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0);
  16206. 8006ed6: 6b23 ldr r3, [r4, #48] @ 0x30
  16207. 8006ed8: b11b cbz r3, 8006ee2 <err_tcp+0x42>
  16208. 8006eda: 2200 movs r2, #0
  16209. 8006edc: 4611 mov r1, r2
  16210. 8006ede: 4620 mov r0, r4
  16211. 8006ee0: 4798 blx r3
  16212. API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0);
  16213. 8006ee2: 6b23 ldr r3, [r4, #48] @ 0x30
  16214. 8006ee4: b11b cbz r3, 8006eee <err_tcp+0x4e>
  16215. 8006ee6: 2200 movs r2, #0
  16216. 8006ee8: 2102 movs r1, #2
  16217. 8006eea: 4620 mov r0, r4
  16218. 8006eec: 4798 blx r3
  16219. mbox_msg = lwip_netconn_err_to_msg(err);
  16220. 8006eee: 4628 mov r0, r5
  16221. 8006ef0: f7ff feda bl 8006ca8 <lwip_netconn_err_to_msg>
  16222. 8006ef4: 4607 mov r7, r0
  16223. if (NETCONN_MBOX_VALID(conn, &conn->recvmbox)) {
  16224. 8006ef6: f104 0810 add.w r8, r4, #16
  16225. 8006efa: 4640 mov r0, r8
  16226. 8006efc: f006 f831 bl 800cf62 <sys_mbox_valid>
  16227. 8006f00: b9e8 cbnz r0, 8006f3e <err_tcp+0x9e>
  16228. if (NETCONN_MBOX_VALID(conn, &conn->acceptmbox)) {
  16229. 8006f02: f104 0814 add.w r8, r4, #20
  16230. 8006f06: 4640 mov r0, r8
  16231. 8006f08: f006 f82b bl 800cf62 <sys_mbox_valid>
  16232. 8006f0c: b9e0 cbnz r0, 8006f48 <err_tcp+0xa8>
  16233. if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) ||
  16234. 8006f0e: 2e04 cmp r6, #4
  16235. 8006f10: bf18 it ne
  16236. 8006f12: 2e01 cmpne r6, #1
  16237. 8006f14: d01d beq.n 8006f52 <err_tcp+0xb2>
  16238. 8006f16: 2e03 cmp r6, #3
  16239. 8006f18: d01b beq.n 8006f52 <err_tcp+0xb2>
  16240. LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL);
  16241. 8006f1a: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16242. 8006f1c: b3a3 cbz r3, 8006f88 <err_tcp+0xe8>
  16243. 8006f1e: 4b25 ldr r3, [pc, #148] @ (8006fb4 <err_tcp+0x114>)
  16244. 8006f20: f240 12f7 movw r2, #503 @ 0x1f7
  16245. 8006f24: 4924 ldr r1, [pc, #144] @ (8006fb8 <err_tcp+0x118>)
  16246. 8006f26: 4825 ldr r0, [pc, #148] @ (8006fbc <err_tcp+0x11c>)
  16247. 8006f28: f00c fa6e bl 8013408 <iprintf>
  16248. }
  16249. 8006f2c: e02c b.n 8006f88 <err_tcp+0xe8>
  16250. LWIP_ASSERT("conn != NULL", (conn != NULL));
  16251. 8006f2e: 4b21 ldr r3, [pc, #132] @ (8006fb4 <err_tcp+0x114>)
  16252. 8006f30: f44f 72dc mov.w r2, #440 @ 0x1b8
  16253. 8006f34: 4922 ldr r1, [pc, #136] @ (8006fc0 <err_tcp+0x120>)
  16254. 8006f36: 4821 ldr r0, [pc, #132] @ (8006fbc <err_tcp+0x11c>)
  16255. 8006f38: f00c fa66 bl 8013408 <iprintf>
  16256. 8006f3c: e7b6 b.n 8006eac <err_tcp+0xc>
  16257. sys_mbox_trypost(&conn->recvmbox, mbox_msg);
  16258. 8006f3e: 4639 mov r1, r7
  16259. 8006f40: 4640 mov r0, r8
  16260. 8006f42: f005 ffd2 bl 800ceea <sys_mbox_trypost>
  16261. 8006f46: e7dc b.n 8006f02 <err_tcp+0x62>
  16262. sys_mbox_trypost(&conn->acceptmbox, mbox_msg);
  16263. 8006f48: 4639 mov r1, r7
  16264. 8006f4a: 4640 mov r0, r8
  16265. 8006f4c: f005 ffcd bl 800ceea <sys_mbox_trypost>
  16266. 8006f50: e7dd b.n 8006f0e <err_tcp+0x6e>
  16267. int was_nonblocking_connect = IN_NONBLOCKING_CONNECT(conn);
  16268. 8006f52: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  16269. SET_NONBLOCKING_CONNECT(conn, 0);
  16270. 8006f56: f003 02fb and.w r2, r3, #251 @ 0xfb
  16271. 8006f5a: f884 2028 strb.w r2, [r4, #40] @ 0x28
  16272. if (!was_nonblocking_connect) {
  16273. 8006f5e: f013 0f04 tst.w r3, #4
  16274. 8006f62: d111 bne.n 8006f88 <err_tcp+0xe8>
  16275. LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
  16276. 8006f64: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16277. 8006f66: b18b cbz r3, 8006f8c <err_tcp+0xec>
  16278. if (old_state == NETCONN_CLOSE) {
  16279. 8006f68: 2e04 cmp r6, #4
  16280. 8006f6a: d017 beq.n 8006f9c <err_tcp+0xfc>
  16281. conn->current_msg->err = err;
  16282. 8006f6c: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16283. 8006f6e: 711d strb r5, [r3, #4]
  16284. op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg);
  16285. 8006f70: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16286. 8006f72: 681d ldr r5, [r3, #0]
  16287. 8006f74: 350c adds r5, #12
  16288. LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem));
  16289. 8006f76: 4628 mov r0, r5
  16290. 8006f78: f006 f839 bl 800cfee <sys_sem_valid>
  16291. 8006f7c: b190 cbz r0, 8006fa4 <err_tcp+0x104>
  16292. conn->current_msg = NULL;
  16293. 8006f7e: 2300 movs r3, #0
  16294. 8006f80: 62e3 str r3, [r4, #44] @ 0x2c
  16295. sys_sem_signal(op_completed_sem);
  16296. 8006f82: 4628 mov r0, r5
  16297. 8006f84: f006 f829 bl 800cfda <sys_sem_signal>
  16298. }
  16299. 8006f88: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  16300. LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
  16301. 8006f8c: 4b09 ldr r3, [pc, #36] @ (8006fb4 <err_tcp+0x114>)
  16302. 8006f8e: f44f 72f3 mov.w r2, #486 @ 0x1e6
  16303. 8006f92: 490c ldr r1, [pc, #48] @ (8006fc4 <err_tcp+0x124>)
  16304. 8006f94: 4809 ldr r0, [pc, #36] @ (8006fbc <err_tcp+0x11c>)
  16305. 8006f96: f00c fa37 bl 8013408 <iprintf>
  16306. 8006f9a: e7e5 b.n 8006f68 <err_tcp+0xc8>
  16307. conn->current_msg->err = ERR_OK;
  16308. 8006f9c: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16309. 8006f9e: 2200 movs r2, #0
  16310. 8006fa0: 711a strb r2, [r3, #4]
  16311. 8006fa2: e7e5 b.n 8006f70 <err_tcp+0xd0>
  16312. LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem));
  16313. 8006fa4: 4b03 ldr r3, [pc, #12] @ (8006fb4 <err_tcp+0x114>)
  16314. 8006fa6: f240 12ef movw r2, #495 @ 0x1ef
  16315. 8006faa: 4907 ldr r1, [pc, #28] @ (8006fc8 <err_tcp+0x128>)
  16316. 8006fac: 4803 ldr r0, [pc, #12] @ (8006fbc <err_tcp+0x11c>)
  16317. 8006fae: f00c fa2b bl 8013408 <iprintf>
  16318. 8006fb2: e7e4 b.n 8006f7e <err_tcp+0xde>
  16319. 8006fb4: 0801491c .word 0x0801491c
  16320. 8006fb8: 08014a5c .word 0x08014a5c
  16321. 8006fbc: 080144e8 .word 0x080144e8
  16322. 8006fc0: 08014a14 .word 0x08014a14
  16323. 8006fc4: 08014a24 .word 0x08014a24
  16324. 8006fc8: 08014a40 .word 0x08014a40
  16325. 08006fcc <lwip_netconn_do_connected>:
  16326. LWIP_UNUSED_ARG(pcb);
  16327. conn = (struct netconn *)arg;
  16328. if (conn == NULL) {
  16329. 8006fcc: 2800 cmp r0, #0
  16330. 8006fce: d060 beq.n 8007092 <lwip_netconn_do_connected+0xc6>
  16331. {
  16332. 8006fd0: b570 push {r4, r5, r6, lr}
  16333. 8006fd2: 4616 mov r6, r2
  16334. 8006fd4: 4604 mov r4, r0
  16335. return ERR_VAL;
  16336. }
  16337. LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT);
  16338. 8006fd6: 7843 ldrb r3, [r0, #1]
  16339. 8006fd8: 2b03 cmp r3, #3
  16340. 8006fda: d132 bne.n 8007042 <lwip_netconn_do_connected+0x76>
  16341. LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect",
  16342. 8006fdc: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16343. 8006fde: 2b00 cmp r3, #0
  16344. 8006fe0: d037 beq.n 8007052 <lwip_netconn_do_connected+0x86>
  16345. (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn));
  16346. if (conn->current_msg != NULL) {
  16347. 8006fe2: 6ae5 ldr r5, [r4, #44] @ 0x2c
  16348. 8006fe4: b11d cbz r5, 8006fee <lwip_netconn_do_connected+0x22>
  16349. conn->current_msg->err = err;
  16350. 8006fe6: 712e strb r6, [r5, #4]
  16351. op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg);
  16352. 8006fe8: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16353. 8006fea: 681d ldr r5, [r3, #0]
  16354. 8006fec: 350c adds r5, #12
  16355. }
  16356. if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) {
  16357. 8006fee: 7823 ldrb r3, [r4, #0]
  16358. 8006ff0: f003 03f0 and.w r3, r3, #240 @ 0xf0
  16359. 8006ff4: 2b10 cmp r3, #16
  16360. 8006ff6: d039 beq.n 800706c <lwip_netconn_do_connected+0xa0>
  16361. setup_tcp(conn);
  16362. }
  16363. was_blocking = !IN_NONBLOCKING_CONNECT(conn);
  16364. 8006ff8: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  16365. 8006ffc: f003 0604 and.w r6, r3, #4
  16366. 8007000: 2e00 cmp r6, #0
  16367. 8007002: bf0c ite eq
  16368. 8007004: 2201 moveq r2, #1
  16369. 8007006: 2200 movne r2, #0
  16370. SET_NONBLOCKING_CONNECT(conn, 0);
  16371. 8007008: f003 03fb and.w r3, r3, #251 @ 0xfb
  16372. 800700c: f884 3028 strb.w r3, [r4, #40] @ 0x28
  16373. LWIP_ASSERT("blocking connect state error",
  16374. 8007010: bf14 ite ne
  16375. 8007012: 2301 movne r3, #1
  16376. 8007014: 2300 moveq r3, #0
  16377. 8007016: 2d00 cmp r5, #0
  16378. 8007018: bf08 it eq
  16379. 800701a: f043 0301 orreq.w r3, r3, #1
  16380. 800701e: b123 cbz r3, 800702a <lwip_netconn_do_connected+0x5e>
  16381. 8007020: 2d00 cmp r5, #0
  16382. 8007022: bf18 it ne
  16383. 8007024: f042 0201 orrne.w r2, r2, #1
  16384. 8007028: bb32 cbnz r2, 8007078 <lwip_netconn_do_connected+0xac>
  16385. (was_blocking && op_completed_sem != NULL) ||
  16386. (!was_blocking && op_completed_sem == NULL));
  16387. conn->current_msg = NULL;
  16388. 800702a: 2300 movs r3, #0
  16389. 800702c: 62e3 str r3, [r4, #44] @ 0x2c
  16390. conn->state = NETCONN_NONE;
  16391. 800702e: 7063 strb r3, [r4, #1]
  16392. API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0);
  16393. 8007030: 6b23 ldr r3, [r4, #48] @ 0x30
  16394. 8007032: b11b cbz r3, 800703c <lwip_netconn_do_connected+0x70>
  16395. 8007034: 2200 movs r2, #0
  16396. 8007036: 2102 movs r1, #2
  16397. 8007038: 4620 mov r0, r4
  16398. 800703a: 4798 blx r3
  16399. if (was_blocking) {
  16400. 800703c: b326 cbz r6, 8007088 <lwip_netconn_do_connected+0xbc>
  16401. sys_sem_signal(op_completed_sem);
  16402. }
  16403. return ERR_OK;
  16404. 800703e: 2000 movs r0, #0
  16405. }
  16406. 8007040: bd70 pop {r4, r5, r6, pc}
  16407. LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT);
  16408. 8007042: 4b15 ldr r3, [pc, #84] @ (8007098 <lwip_netconn_do_connected+0xcc>)
  16409. 8007044: f240 5223 movw r2, #1315 @ 0x523
  16410. 8007048: 4914 ldr r1, [pc, #80] @ (800709c <lwip_netconn_do_connected+0xd0>)
  16411. 800704a: 4815 ldr r0, [pc, #84] @ (80070a0 <lwip_netconn_do_connected+0xd4>)
  16412. 800704c: f00c f9dc bl 8013408 <iprintf>
  16413. 8007050: e7c4 b.n 8006fdc <lwip_netconn_do_connected+0x10>
  16414. LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect",
  16415. 8007052: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  16416. 8007056: f013 0f04 tst.w r3, #4
  16417. 800705a: d1c2 bne.n 8006fe2 <lwip_netconn_do_connected+0x16>
  16418. 800705c: 4b0e ldr r3, [pc, #56] @ (8007098 <lwip_netconn_do_connected+0xcc>)
  16419. 800705e: f240 5224 movw r2, #1316 @ 0x524
  16420. 8007062: 4910 ldr r1, [pc, #64] @ (80070a4 <lwip_netconn_do_connected+0xd8>)
  16421. 8007064: 480e ldr r0, [pc, #56] @ (80070a0 <lwip_netconn_do_connected+0xd4>)
  16422. 8007066: f00c f9cf bl 8013408 <iprintf>
  16423. 800706a: e7ba b.n 8006fe2 <lwip_netconn_do_connected+0x16>
  16424. if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) {
  16425. 800706c: 2e00 cmp r6, #0
  16426. 800706e: d1c3 bne.n 8006ff8 <lwip_netconn_do_connected+0x2c>
  16427. setup_tcp(conn);
  16428. 8007070: 4620 mov r0, r4
  16429. 8007072: f7ff feb1 bl 8006dd8 <setup_tcp>
  16430. 8007076: e7bf b.n 8006ff8 <lwip_netconn_do_connected+0x2c>
  16431. LWIP_ASSERT("blocking connect state error",
  16432. 8007078: 4b07 ldr r3, [pc, #28] @ (8007098 <lwip_netconn_do_connected+0xcc>)
  16433. 800707a: f44f 62a6 mov.w r2, #1328 @ 0x530
  16434. 800707e: 490a ldr r1, [pc, #40] @ (80070a8 <lwip_netconn_do_connected+0xdc>)
  16435. 8007080: 4807 ldr r0, [pc, #28] @ (80070a0 <lwip_netconn_do_connected+0xd4>)
  16436. 8007082: f00c f9c1 bl 8013408 <iprintf>
  16437. 8007086: e7d0 b.n 800702a <lwip_netconn_do_connected+0x5e>
  16438. sys_sem_signal(op_completed_sem);
  16439. 8007088: 4628 mov r0, r5
  16440. 800708a: f005 ffa6 bl 800cfda <sys_sem_signal>
  16441. return ERR_OK;
  16442. 800708e: 2000 movs r0, #0
  16443. 8007090: e7d6 b.n 8007040 <lwip_netconn_do_connected+0x74>
  16444. return ERR_VAL;
  16445. 8007092: f06f 0005 mvn.w r0, #5
  16446. }
  16447. 8007096: 4770 bx lr
  16448. 8007098: 0801491c .word 0x0801491c
  16449. 800709c: 08014a78 .word 0x08014a78
  16450. 80070a0: 080144e8 .word 0x080144e8
  16451. 80070a4: 08014a98 .word 0x08014a98
  16452. 80070a8: 08014ad8 .word 0x08014ad8
  16453. 080070ac <lwip_netconn_do_writemore>:
  16454. * @return ERR_OK
  16455. * ERR_MEM if LWIP_TCPIP_CORE_LOCKING=1 and sending hasn't yet finished
  16456. */
  16457. static err_t
  16458. lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM)
  16459. {
  16460. 80070ac: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
  16461. 80070b0: 468b mov fp, r1
  16462. size_t diff;
  16463. u8_t dontblock;
  16464. u8_t apiflags;
  16465. u8_t write_more;
  16466. LWIP_ASSERT("conn != NULL", conn != NULL);
  16467. 80070b2: 4605 mov r5, r0
  16468. 80070b4: b1e8 cbz r0, 80070f2 <lwip_netconn_do_writemore+0x46>
  16469. LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE));
  16470. 80070b6: 786b ldrb r3, [r5, #1]
  16471. 80070b8: 2b01 cmp r3, #1
  16472. 80070ba: d122 bne.n 8007102 <lwip_netconn_do_writemore+0x56>
  16473. LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
  16474. 80070bc: 6aeb ldr r3, [r5, #44] @ 0x2c
  16475. 80070be: b343 cbz r3, 8007112 <lwip_netconn_do_writemore+0x66>
  16476. LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL);
  16477. 80070c0: 686b ldr r3, [r5, #4]
  16478. 80070c2: b373 cbz r3, 8007122 <lwip_netconn_do_writemore+0x76>
  16479. LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len",
  16480. 80070c4: 6aeb ldr r3, [r5, #44] @ 0x2c
  16481. 80070c6: 699a ldr r2, [r3, #24]
  16482. 80070c8: 695b ldr r3, [r3, #20]
  16483. 80070ca: 429a cmp r2, r3
  16484. 80070cc: d231 bcs.n 8007132 <lwip_netconn_do_writemore+0x86>
  16485. conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len);
  16486. LWIP_ASSERT("conn->current_msg->msg.w.vector_cnt > 0", conn->current_msg->msg.w.vector_cnt > 0);
  16487. 80070ce: 6aeb ldr r3, [r5, #44] @ 0x2c
  16488. 80070d0: 899b ldrh r3, [r3, #12]
  16489. 80070d2: 2b00 cmp r3, #0
  16490. 80070d4: d035 beq.n 8007142 <lwip_netconn_do_writemore+0x96>
  16491. apiflags = conn->current_msg->msg.w.apiflags;
  16492. 80070d6: 6aeb ldr r3, [r5, #44] @ 0x2c
  16493. 80070d8: f893 801c ldrb.w r8, [r3, #28]
  16494. dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
  16495. 80070dc: f895 3028 ldrb.w r3, [r5, #40] @ 0x28
  16496. 80070e0: f013 0f02 tst.w r3, #2
  16497. 80070e4: d135 bne.n 8007152 <lwip_netconn_do_writemore+0xa6>
  16498. 80070e6: f018 0f04 tst.w r8, #4
  16499. 80070ea: d037 beq.n 800715c <lwip_netconn_do_writemore+0xb0>
  16500. 80070ec: f04f 0a01 mov.w sl, #1
  16501. 80070f0: e031 b.n 8007156 <lwip_netconn_do_writemore+0xaa>
  16502. LWIP_ASSERT("conn != NULL", conn != NULL);
  16503. 80070f2: 4b8d ldr r3, [pc, #564] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
  16504. 80070f4: f240 6273 movw r2, #1651 @ 0x673
  16505. 80070f8: 498c ldr r1, [pc, #560] @ (800732c <lwip_netconn_do_writemore+0x280>)
  16506. 80070fa: 488d ldr r0, [pc, #564] @ (8007330 <lwip_netconn_do_writemore+0x284>)
  16507. 80070fc: f00c f984 bl 8013408 <iprintf>
  16508. 8007100: e7d9 b.n 80070b6 <lwip_netconn_do_writemore+0xa>
  16509. LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE));
  16510. 8007102: 4b89 ldr r3, [pc, #548] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
  16511. 8007104: f240 6274 movw r2, #1652 @ 0x674
  16512. 8007108: 498a ldr r1, [pc, #552] @ (8007334 <lwip_netconn_do_writemore+0x288>)
  16513. 800710a: 4889 ldr r0, [pc, #548] @ (8007330 <lwip_netconn_do_writemore+0x284>)
  16514. 800710c: f00c f97c bl 8013408 <iprintf>
  16515. 8007110: e7d4 b.n 80070bc <lwip_netconn_do_writemore+0x10>
  16516. LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
  16517. 8007112: 4b85 ldr r3, [pc, #532] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
  16518. 8007114: f240 6275 movw r2, #1653 @ 0x675
  16519. 8007118: 4987 ldr r1, [pc, #540] @ (8007338 <lwip_netconn_do_writemore+0x28c>)
  16520. 800711a: 4885 ldr r0, [pc, #532] @ (8007330 <lwip_netconn_do_writemore+0x284>)
  16521. 800711c: f00c f974 bl 8013408 <iprintf>
  16522. 8007120: e7ce b.n 80070c0 <lwip_netconn_do_writemore+0x14>
  16523. LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL);
  16524. 8007122: 4b81 ldr r3, [pc, #516] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
  16525. 8007124: f240 6276 movw r2, #1654 @ 0x676
  16526. 8007128: 4984 ldr r1, [pc, #528] @ (800733c <lwip_netconn_do_writemore+0x290>)
  16527. 800712a: 4881 ldr r0, [pc, #516] @ (8007330 <lwip_netconn_do_writemore+0x284>)
  16528. 800712c: f00c f96c bl 8013408 <iprintf>
  16529. 8007130: e7c8 b.n 80070c4 <lwip_netconn_do_writemore+0x18>
  16530. LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len",
  16531. 8007132: 4b7d ldr r3, [pc, #500] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
  16532. 8007134: f240 6277 movw r2, #1655 @ 0x677
  16533. 8007138: 4981 ldr r1, [pc, #516] @ (8007340 <lwip_netconn_do_writemore+0x294>)
  16534. 800713a: 487d ldr r0, [pc, #500] @ (8007330 <lwip_netconn_do_writemore+0x284>)
  16535. 800713c: f00c f964 bl 8013408 <iprintf>
  16536. 8007140: e7c5 b.n 80070ce <lwip_netconn_do_writemore+0x22>
  16537. LWIP_ASSERT("conn->current_msg->msg.w.vector_cnt > 0", conn->current_msg->msg.w.vector_cnt > 0);
  16538. 8007142: 4b79 ldr r3, [pc, #484] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
  16539. 8007144: f240 6279 movw r2, #1657 @ 0x679
  16540. 8007148: 497e ldr r1, [pc, #504] @ (8007344 <lwip_netconn_do_writemore+0x298>)
  16541. 800714a: 4879 ldr r0, [pc, #484] @ (8007330 <lwip_netconn_do_writemore+0x284>)
  16542. 800714c: f00c f95c bl 8013408 <iprintf>
  16543. 8007150: e7c1 b.n 80070d6 <lwip_netconn_do_writemore+0x2a>
  16544. dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK);
  16545. 8007152: f04f 0a01 mov.w sl, #1
  16546. 8007156: fa5f fa8a uxtb.w sl, sl
  16547. 800715a: e061 b.n 8007220 <lwip_netconn_do_writemore+0x174>
  16548. 800715c: f04f 0a00 mov.w sl, #0
  16549. 8007160: e7f9 b.n 8007156 <lwip_netconn_do_writemore+0xaa>
  16550. diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off;
  16551. if (diff > 0xffffUL) { /* max_u16_t */
  16552. len = 0xffff;
  16553. apiflags |= TCP_WRITE_FLAG_MORE;
  16554. } else {
  16555. len = (u16_t)diff;
  16556. 8007162: b2b4 uxth r4, r6
  16557. 8007164: e06a b.n 800723c <lwip_netconn_do_writemore+0x190>
  16558. /* don't try to write more than sendbuf */
  16559. len = available;
  16560. if (dontblock) {
  16561. if (!len) {
  16562. /* set error according to partial write or not */
  16563. err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK;
  16564. 8007166: 6993 ldr r3, [r2, #24]
  16565. 8007168: b9c3 cbnz r3, 800719c <lwip_netconn_do_writemore+0xf0>
  16566. 800716a: f06f 0406 mvn.w r4, #6
  16567. }
  16568. } while (write_more && err == ERR_OK);
  16569. /* if OK or memory error, check available space */
  16570. if ((err == ERR_OK) || (err == ERR_MEM)) {
  16571. err_mem:
  16572. if (dontblock && (conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len)) {
  16573. 800716e: f1ba 0f00 cmp.w sl, #0
  16574. 8007172: f000 8094 beq.w 800729e <lwip_netconn_do_writemore+0x1f2>
  16575. 8007176: 6aeb ldr r3, [r5, #44] @ 0x2c
  16576. 8007178: 699a ldr r2, [r3, #24]
  16577. 800717a: 695b ldr r3, [r3, #20]
  16578. 800717c: 429a cmp r2, r3
  16579. 800717e: f080 808e bcs.w 800729e <lwip_netconn_do_writemore+0x1f2>
  16580. /* non-blocking write did not write everything: mark the pcb non-writable
  16581. and let poll_tcp check writable space to mark the pcb writable again */
  16582. API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0);
  16583. 8007182: 6b2b ldr r3, [r5, #48] @ 0x30
  16584. 8007184: b11b cbz r3, 800718e <lwip_netconn_do_writemore+0xe2>
  16585. 8007186: 2200 movs r2, #0
  16586. 8007188: 2103 movs r1, #3
  16587. 800718a: 4628 mov r0, r5
  16588. 800718c: 4798 blx r3
  16589. conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE;
  16590. 800718e: f895 3028 ldrb.w r3, [r5, #40] @ 0x28
  16591. 8007192: f043 0310 orr.w r3, r3, #16
  16592. 8007196: f885 3028 strb.w r3, [r5, #40] @ 0x28
  16593. 800719a: e091 b.n 80072c0 <lwip_netconn_do_writemore+0x214>
  16594. err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK;
  16595. 800719c: 2400 movs r4, #0
  16596. goto err_mem;
  16597. 800719e: e7e6 b.n 800716e <lwip_netconn_do_writemore+0xc2>
  16598. apiflags |= TCP_WRITE_FLAG_MORE;
  16599. 80071a0: f048 0802 orr.w r8, r8, #2
  16600. len = available;
  16601. 80071a4: 4604 mov r4, r0
  16602. LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!",
  16603. 80071a6: 46a1 mov r9, r4
  16604. 80071a8: 4423 add r3, r4
  16605. 80071aa: 4299 cmp r1, r3
  16606. 80071ac: d30e bcc.n 80071cc <lwip_netconn_do_writemore+0x120>
  16607. if ((len == 0xffff && diff > 0xffffUL) ||
  16608. 80071ae: f64f 73ff movw r3, #65535 @ 0xffff
  16609. 80071b2: 429c cmp r4, r3
  16610. 80071b4: bf14 ite ne
  16611. 80071b6: 2200 movne r2, #0
  16612. 80071b8: 2201 moveq r2, #1
  16613. 80071ba: 429e cmp r6, r3
  16614. 80071bc: bf98 it ls
  16615. 80071be: 2200 movls r2, #0
  16616. 80071c0: b982 cbnz r2, 80071e4 <lwip_netconn_do_writemore+0x138>
  16617. (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) {
  16618. 80071c2: b2b6 uxth r6, r6
  16619. if ((len == 0xffff && diff > 0xffffUL) ||
  16620. 80071c4: 42a6 cmp r6, r4
  16621. 80071c6: d009 beq.n 80071dc <lwip_netconn_do_writemore+0x130>
  16622. write_more = 0;
  16623. 80071c8: 2600 movs r6, #0
  16624. 80071ca: e00e b.n 80071ea <lwip_netconn_do_writemore+0x13e>
  16625. LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!",
  16626. 80071cc: 4b56 ldr r3, [pc, #344] @ (8007328 <lwip_netconn_do_writemore+0x27c>)
  16627. 80071ce: f240 62a3 movw r2, #1699 @ 0x6a3
  16628. 80071d2: 495d ldr r1, [pc, #372] @ (8007348 <lwip_netconn_do_writemore+0x29c>)
  16629. 80071d4: 4856 ldr r0, [pc, #344] @ (8007330 <lwip_netconn_do_writemore+0x284>)
  16630. 80071d6: f00c f917 bl 8013408 <iprintf>
  16631. 80071da: e7e8 b.n 80071ae <lwip_netconn_do_writemore+0x102>
  16632. (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) {
  16633. 80071dc: 6aeb ldr r3, [r5, #44] @ 0x2c
  16634. 80071de: 899b ldrh r3, [r3, #12]
  16635. 80071e0: 2b01 cmp r3, #1
  16636. 80071e2: d937 bls.n 8007254 <lwip_netconn_do_writemore+0x1a8>
  16637. apiflags |= TCP_WRITE_FLAG_MORE;
  16638. 80071e4: f048 0802 orr.w r8, r8, #2
  16639. write_more = 1;
  16640. 80071e8: 2601 movs r6, #1
  16641. err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags);
  16642. 80071ea: 4643 mov r3, r8
  16643. 80071ec: 4622 mov r2, r4
  16644. 80071ee: 4639 mov r1, r7
  16645. 80071f0: 6868 ldr r0, [r5, #4]
  16646. 80071f2: f009 f84f bl 8010294 <tcp_write>
  16647. if (err == ERR_OK) {
  16648. 80071f6: 4604 mov r4, r0
  16649. 80071f8: b968 cbnz r0, 8007216 <lwip_netconn_do_writemore+0x16a>
  16650. conn->current_msg->msg.w.offset += len;
  16651. 80071fa: 6aea ldr r2, [r5, #44] @ 0x2c
  16652. 80071fc: 6993 ldr r3, [r2, #24]
  16653. 80071fe: 444b add r3, r9
  16654. 8007200: 6193 str r3, [r2, #24]
  16655. conn->current_msg->msg.w.vector_off += len;
  16656. 8007202: 6aea ldr r2, [r5, #44] @ 0x2c
  16657. 8007204: 6913 ldr r3, [r2, #16]
  16658. 8007206: 444b add r3, r9
  16659. 8007208: 6113 str r3, [r2, #16]
  16660. if (conn->current_msg->msg.w.vector_off == conn->current_msg->msg.w.vector->len) {
  16661. 800720a: 6aeb ldr r3, [r5, #44] @ 0x2c
  16662. 800720c: 6919 ldr r1, [r3, #16]
  16663. 800720e: 689a ldr r2, [r3, #8]
  16664. 8007210: 6852 ldr r2, [r2, #4]
  16665. 8007212: 4291 cmp r1, r2
  16666. 8007214: d020 beq.n 8007258 <lwip_netconn_do_writemore+0x1ac>
  16667. } while (write_more && err == ERR_OK);
  16668. 8007216: fab4 f384 clz r3, r4
  16669. 800721a: 095b lsrs r3, r3, #5
  16670. 800721c: b356 cbz r6, 8007274 <lwip_netconn_do_writemore+0x1c8>
  16671. 800721e: b34b cbz r3, 8007274 <lwip_netconn_do_writemore+0x1c8>
  16672. dataptr = (const u8_t *)conn->current_msg->msg.w.vector->ptr + conn->current_msg->msg.w.vector_off;
  16673. 8007220: 6aea ldr r2, [r5, #44] @ 0x2c
  16674. 8007222: 6891 ldr r1, [r2, #8]
  16675. 8007224: 680f ldr r7, [r1, #0]
  16676. 8007226: 6913 ldr r3, [r2, #16]
  16677. 8007228: 441f add r7, r3
  16678. diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off;
  16679. 800722a: 6849 ldr r1, [r1, #4]
  16680. 800722c: 1ace subs r6, r1, r3
  16681. if (diff > 0xffffUL) { /* max_u16_t */
  16682. 800722e: f5b6 3f80 cmp.w r6, #65536 @ 0x10000
  16683. 8007232: d396 bcc.n 8007162 <lwip_netconn_do_writemore+0xb6>
  16684. apiflags |= TCP_WRITE_FLAG_MORE;
  16685. 8007234: f048 0802 orr.w r8, r8, #2
  16686. len = 0xffff;
  16687. 8007238: f64f 74ff movw r4, #65535 @ 0xffff
  16688. available = tcp_sndbuf(conn->pcb.tcp);
  16689. 800723c: 6868 ldr r0, [r5, #4]
  16690. 800723e: f8b0 0064 ldrh.w r0, [r0, #100] @ 0x64
  16691. if (available < len) {
  16692. 8007242: 4284 cmp r4, r0
  16693. 8007244: d9af bls.n 80071a6 <lwip_netconn_do_writemore+0xfa>
  16694. if (dontblock) {
  16695. 8007246: f1ba 0f00 cmp.w sl, #0
  16696. 800724a: d0a9 beq.n 80071a0 <lwip_netconn_do_writemore+0xf4>
  16697. if (!len) {
  16698. 800724c: 2800 cmp r0, #0
  16699. 800724e: d08a beq.n 8007166 <lwip_netconn_do_writemore+0xba>
  16700. len = available;
  16701. 8007250: 4604 mov r4, r0
  16702. 8007252: e7a8 b.n 80071a6 <lwip_netconn_do_writemore+0xfa>
  16703. write_more = 0;
  16704. 8007254: 2600 movs r6, #0
  16705. 8007256: e7c8 b.n 80071ea <lwip_netconn_do_writemore+0x13e>
  16706. conn->current_msg->msg.w.vector_cnt--;
  16707. 8007258: 899a ldrh r2, [r3, #12]
  16708. 800725a: 3a01 subs r2, #1
  16709. 800725c: 819a strh r2, [r3, #12]
  16710. if (conn->current_msg->msg.w.vector_cnt > 0) {
  16711. 800725e: 6aeb ldr r3, [r5, #44] @ 0x2c
  16712. 8007260: 899a ldrh r2, [r3, #12]
  16713. 8007262: 2a00 cmp r2, #0
  16714. 8007264: d0d7 beq.n 8007216 <lwip_netconn_do_writemore+0x16a>
  16715. conn->current_msg->msg.w.vector++;
  16716. 8007266: 689a ldr r2, [r3, #8]
  16717. 8007268: 3208 adds r2, #8
  16718. 800726a: 609a str r2, [r3, #8]
  16719. conn->current_msg->msg.w.vector_off = 0;
  16720. 800726c: 6aeb ldr r3, [r5, #44] @ 0x2c
  16721. 800726e: 2200 movs r2, #0
  16722. 8007270: 611a str r2, [r3, #16]
  16723. 8007272: e7d0 b.n 8007216 <lwip_netconn_do_writemore+0x16a>
  16724. if ((err == ERR_OK) || (err == ERR_MEM)) {
  16725. 8007274: 1c63 adds r3, r4, #1
  16726. 8007276: b2db uxtb r3, r3
  16727. 8007278: 2b01 cmp r3, #1
  16728. 800727a: f67f af78 bls.w 800716e <lwip_netconn_do_writemore+0xc2>
  16729. don't try writing any more but return the error
  16730. to the application thread. */
  16731. err = out_err;
  16732. write_finished = 1;
  16733. }
  16734. } else if (err == ERR_MEM) {
  16735. 800727e: f1b4 3fff cmp.w r4, #4294967295 @ 0xffffffff
  16736. 8007282: d038 beq.n 80072f6 <lwip_netconn_do_writemore+0x24a>
  16737. }
  16738. }
  16739. if (write_finished) {
  16740. /* everything was written: set back connection state
  16741. and back to application task */
  16742. sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg);
  16743. 8007284: 6aeb ldr r3, [r5, #44] @ 0x2c
  16744. 8007286: 6818 ldr r0, [r3, #0]
  16745. 8007288: 300c adds r0, #12
  16746. conn->current_msg->err = err;
  16747. 800728a: 711c strb r4, [r3, #4]
  16748. conn->current_msg = NULL;
  16749. 800728c: 2300 movs r3, #0
  16750. 800728e: 62eb str r3, [r5, #44] @ 0x2c
  16751. conn->state = NETCONN_NONE;
  16752. 8007290: 706b strb r3, [r5, #1]
  16753. #if LWIP_TCPIP_CORE_LOCKING
  16754. if (delayed)
  16755. 8007292: f1bb 0f00 cmp.w fp, #0
  16756. 8007296: d142 bne.n 800731e <lwip_netconn_do_writemore+0x272>
  16757. #if LWIP_TCPIP_CORE_LOCKING
  16758. else {
  16759. return ERR_MEM;
  16760. }
  16761. #endif
  16762. return ERR_OK;
  16763. 8007298: 2000 movs r0, #0
  16764. }
  16765. 800729a: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
  16766. } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) ||
  16767. 800729e: 686b ldr r3, [r5, #4]
  16768. 80072a0: f8b3 1064 ldrh.w r1, [r3, #100] @ 0x64
  16769. 80072a4: f640 3269 movw r2, #2921 @ 0xb69
  16770. 80072a8: 4291 cmp r1, r2
  16771. 80072aa: d903 bls.n 80072b4 <lwip_netconn_do_writemore+0x208>
  16772. (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) {
  16773. 80072ac: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66
  16774. } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) ||
  16775. 80072b0: 2b07 cmp r3, #7
  16776. 80072b2: d905 bls.n 80072c0 <lwip_netconn_do_writemore+0x214>
  16777. API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0);
  16778. 80072b4: 6b2b ldr r3, [r5, #48] @ 0x30
  16779. 80072b6: b11b cbz r3, 80072c0 <lwip_netconn_do_writemore+0x214>
  16780. 80072b8: 2200 movs r2, #0
  16781. 80072ba: 2103 movs r1, #3
  16782. 80072bc: 4628 mov r0, r5
  16783. 80072be: 4798 blx r3
  16784. if (err == ERR_OK) {
  16785. 80072c0: 2c00 cmp r4, #0
  16786. 80072c2: d1dc bne.n 800727e <lwip_netconn_do_writemore+0x1d2>
  16787. if ((conn->current_msg->msg.w.offset == conn->current_msg->msg.w.len) || dontblock) {
  16788. 80072c4: 6aeb ldr r3, [r5, #44] @ 0x2c
  16789. 80072c6: 699a ldr r2, [r3, #24]
  16790. 80072c8: 695b ldr r3, [r3, #20]
  16791. 80072ca: 429a cmp r2, r3
  16792. 80072cc: d005 beq.n 80072da <lwip_netconn_do_writemore+0x22e>
  16793. 80072ce: f1ba 0f00 cmp.w sl, #0
  16794. 80072d2: d004 beq.n 80072de <lwip_netconn_do_writemore+0x232>
  16795. write_finished = 1;
  16796. 80072d4: f04f 0a01 mov.w sl, #1
  16797. 80072d8: e001 b.n 80072de <lwip_netconn_do_writemore+0x232>
  16798. 80072da: f04f 0a01 mov.w sl, #1
  16799. out_err = tcp_output(conn->pcb.tcp);
  16800. 80072de: 6868 ldr r0, [r5, #4]
  16801. 80072e0: f009 fdc0 bl 8010e64 <tcp_output>
  16802. if (out_err == ERR_RTE) {
  16803. 80072e4: f110 0f04 cmn.w r0, #4
  16804. 80072e8: d015 beq.n 8007316 <lwip_netconn_do_writemore+0x26a>
  16805. if (write_finished) {
  16806. 80072ea: f1ba 0f00 cmp.w sl, #0
  16807. 80072ee: d1c9 bne.n 8007284 <lwip_netconn_do_writemore+0x1d8>
  16808. return ERR_MEM;
  16809. 80072f0: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  16810. 80072f4: e7d1 b.n 800729a <lwip_netconn_do_writemore+0x1ee>
  16811. err_t out_err = tcp_output(conn->pcb.tcp);
  16812. 80072f6: 6868 ldr r0, [r5, #4]
  16813. 80072f8: f009 fdb4 bl 8010e64 <tcp_output>
  16814. 80072fc: 4604 mov r4, r0
  16815. if (out_err == ERR_RTE) {
  16816. 80072fe: f110 0f04 cmn.w r0, #4
  16817. 8007302: d0bf beq.n 8007284 <lwip_netconn_do_writemore+0x1d8>
  16818. } else if (dontblock) {
  16819. 8007304: f1ba 0f00 cmp.w sl, #0
  16820. 8007308: d0f2 beq.n 80072f0 <lwip_netconn_do_writemore+0x244>
  16821. err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK;
  16822. 800730a: 6aeb ldr r3, [r5, #44] @ 0x2c
  16823. 800730c: 699b ldr r3, [r3, #24]
  16824. 800730e: b923 cbnz r3, 800731a <lwip_netconn_do_writemore+0x26e>
  16825. 8007310: f06f 0406 mvn.w r4, #6
  16826. 8007314: e7b6 b.n 8007284 <lwip_netconn_do_writemore+0x1d8>
  16827. err = out_err;
  16828. 8007316: 4604 mov r4, r0
  16829. 8007318: e7b4 b.n 8007284 <lwip_netconn_do_writemore+0x1d8>
  16830. err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK;
  16831. 800731a: 2400 movs r4, #0
  16832. 800731c: e7b2 b.n 8007284 <lwip_netconn_do_writemore+0x1d8>
  16833. sys_sem_signal(op_completed_sem);
  16834. 800731e: f005 fe5c bl 800cfda <sys_sem_signal>
  16835. return ERR_OK;
  16836. 8007322: 2000 movs r0, #0
  16837. 8007324: e7b9 b.n 800729a <lwip_netconn_do_writemore+0x1ee>
  16838. 8007326: bf00 nop
  16839. 8007328: 0801491c .word 0x0801491c
  16840. 800732c: 08014a14 .word 0x08014a14
  16841. 8007330: 080144e8 .word 0x080144e8
  16842. 8007334: 08014af8 .word 0x08014af8
  16843. 8007338: 08014a24 .word 0x08014a24
  16844. 800733c: 08014b18 .word 0x08014b18
  16845. 8007340: 08014b30 .word 0x08014b30
  16846. 8007344: 08014b70 .word 0x08014b70
  16847. 8007348: 08014b98 .word 0x08014b98
  16848. 0800734c <lwip_netconn_do_close_internal>:
  16849. {
  16850. 800734c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  16851. 8007350: 4688 mov r8, r1
  16852. LWIP_ASSERT("invalid conn", (conn != NULL));
  16853. 8007352: 4604 mov r4, r0
  16854. 8007354: 2800 cmp r0, #0
  16855. 8007356: d05b beq.n 8007410 <lwip_netconn_do_close_internal+0xc4>
  16856. LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP));
  16857. 8007358: 7823 ldrb r3, [r4, #0]
  16858. 800735a: f003 03f0 and.w r3, r3, #240 @ 0xf0
  16859. 800735e: 2b10 cmp r3, #16
  16860. 8007360: d15e bne.n 8007420 <lwip_netconn_do_close_internal+0xd4>
  16861. LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE));
  16862. 8007362: 7863 ldrb r3, [r4, #1]
  16863. 8007364: 2b04 cmp r3, #4
  16864. 8007366: d163 bne.n 8007430 <lwip_netconn_do_close_internal+0xe4>
  16865. LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL));
  16866. 8007368: 6863 ldr r3, [r4, #4]
  16867. 800736a: 2b00 cmp r3, #0
  16868. 800736c: d068 beq.n 8007440 <lwip_netconn_do_close_internal+0xf4>
  16869. LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
  16870. 800736e: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16871. 8007370: 2b00 cmp r3, #0
  16872. 8007372: d06d beq.n 8007450 <lwip_netconn_do_close_internal+0x104>
  16873. tpcb = conn->pcb.tcp;
  16874. 8007374: 6866 ldr r6, [r4, #4]
  16875. shut = conn->current_msg->msg.sd.shut;
  16876. 8007376: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16877. 8007378: 7a1b ldrb r3, [r3, #8]
  16878. shut_rx = shut & NETCONN_SHUT_RD;
  16879. 800737a: f003 0901 and.w r9, r3, #1
  16880. shut_tx = shut & NETCONN_SHUT_WR;
  16881. 800737e: f003 0702 and.w r7, r3, #2
  16882. if (shut == NETCONN_SHUT_RDWR) {
  16883. 8007382: 2b03 cmp r3, #3
  16884. 8007384: d00f beq.n 80073a6 <lwip_netconn_do_close_internal+0x5a>
  16885. } else if (shut_rx &&
  16886. 8007386: f1b9 0f00 cmp.w r9, #0
  16887. 800738a: d006 beq.n 800739a <lwip_netconn_do_close_internal+0x4e>
  16888. ((tpcb->state == FIN_WAIT_1) ||
  16889. 800738c: 7d32 ldrb r2, [r6, #20]
  16890. (tpcb->state == FIN_WAIT_2) ||
  16891. 800738e: 1f53 subs r3, r2, #5
  16892. 8007390: b2db uxtb r3, r3
  16893. } else if (shut_rx &&
  16894. 8007392: 2a08 cmp r2, #8
  16895. 8007394: bf18 it ne
  16896. 8007396: 2b01 cmpne r3, #1
  16897. 8007398: d905 bls.n 80073a6 <lwip_netconn_do_close_internal+0x5a>
  16898. } else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0)) {
  16899. 800739a: 2f00 cmp r7, #0
  16900. 800739c: d060 beq.n 8007460 <lwip_netconn_do_close_internal+0x114>
  16901. 800739e: 8b73 ldrh r3, [r6, #26]
  16902. 80073a0: f013 0f10 tst.w r3, #16
  16903. 80073a4: d05e beq.n 8007464 <lwip_netconn_do_close_internal+0x118>
  16904. tcp_arg(tpcb, NULL);
  16905. 80073a6: 2100 movs r1, #0
  16906. 80073a8: 4630 mov r0, r6
  16907. 80073aa: f006 f83d bl 800d428 <tcp_arg>
  16908. 80073ae: f04f 0a01 mov.w sl, #1
  16909. if (tpcb->state == LISTEN) {
  16910. 80073b2: 7d33 ldrb r3, [r6, #20]
  16911. 80073b4: 2b01 cmp r3, #1
  16912. 80073b6: d058 beq.n 800746a <lwip_netconn_do_close_internal+0x11e>
  16913. if (shut_rx) {
  16914. 80073b8: f1b9 0f00 cmp.w r9, #0
  16915. 80073bc: d15a bne.n 8007474 <lwip_netconn_do_close_internal+0x128>
  16916. if (shut_tx) {
  16917. 80073be: 2f00 cmp r7, #0
  16918. 80073c0: d161 bne.n 8007486 <lwip_netconn_do_close_internal+0x13a>
  16919. if (shut_close) {
  16920. 80073c2: f1ba 0f00 cmp.w sl, #0
  16921. 80073c6: d163 bne.n 8007490 <lwip_netconn_do_close_internal+0x144>
  16922. err = tcp_shutdown(tpcb, shut_rx, shut_tx);
  16923. 80073c8: 463a mov r2, r7
  16924. 80073ca: 4649 mov r1, r9
  16925. 80073cc: 4630 mov r0, r6
  16926. 80073ce: f006 fd67 bl 800dea0 <tcp_shutdown>
  16927. 80073d2: 4605 mov r5, r0
  16928. if (err == ERR_OK) {
  16929. 80073d4: 2d00 cmp r5, #0
  16930. 80073d6: d06f beq.n 80074b8 <lwip_netconn_do_close_internal+0x16c>
  16931. if (err == ERR_MEM) {
  16932. 80073d8: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff
  16933. 80073dc: d16c bne.n 80074b8 <lwip_netconn_do_close_internal+0x16c>
  16934. if (conn->current_msg->msg.sd.polls_left == 0) {
  16935. 80073de: 6ae3 ldr r3, [r4, #44] @ 0x2c
  16936. 80073e0: 7a5b ldrb r3, [r3, #9]
  16937. 80073e2: 2b00 cmp r3, #0
  16938. 80073e4: d065 beq.n 80074b2 <lwip_netconn_do_close_internal+0x166>
  16939. LWIP_ASSERT("Closing a listen pcb may not fail!", (tpcb->state != LISTEN));
  16940. 80073e6: 7d33 ldrb r3, [r6, #20]
  16941. 80073e8: 2b01 cmp r3, #1
  16942. 80073ea: f000 8097 beq.w 800751c <lwip_netconn_do_close_internal+0x1d0>
  16943. if (shut_tx) {
  16944. 80073ee: 2f00 cmp r7, #0
  16945. 80073f0: f040 809c bne.w 800752c <lwip_netconn_do_close_internal+0x1e0>
  16946. tcp_poll(tpcb, poll_tcp, 1);
  16947. 80073f4: 2201 movs r2, #1
  16948. 80073f6: 4950 ldr r1, [pc, #320] @ (8007538 <lwip_netconn_do_close_internal+0x1ec>)
  16949. 80073f8: 4630 mov r0, r6
  16950. 80073fa: f006 f877 bl 800d4ec <tcp_poll>
  16951. tcp_err(tpcb, err_tcp);
  16952. 80073fe: 494f ldr r1, [pc, #316] @ (800753c <lwip_netconn_do_close_internal+0x1f0>)
  16953. 8007400: 4630 mov r0, r6
  16954. 8007402: f006 f84d bl 800d4a0 <tcp_err>
  16955. tcp_arg(tpcb, conn);
  16956. 8007406: 4621 mov r1, r4
  16957. 8007408: 4630 mov r0, r6
  16958. 800740a: f006 f80d bl 800d428 <tcp_arg>
  16959. return err;
  16960. 800740e: e079 b.n 8007504 <lwip_netconn_do_close_internal+0x1b8>
  16961. LWIP_ASSERT("invalid conn", (conn != NULL));
  16962. 8007410: 4b4b ldr r3, [pc, #300] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
  16963. 8007412: f240 32a2 movw r2, #930 @ 0x3a2
  16964. 8007416: 494b ldr r1, [pc, #300] @ (8007544 <lwip_netconn_do_close_internal+0x1f8>)
  16965. 8007418: 484b ldr r0, [pc, #300] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
  16966. 800741a: f00b fff5 bl 8013408 <iprintf>
  16967. 800741e: e79b b.n 8007358 <lwip_netconn_do_close_internal+0xc>
  16968. LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP));
  16969. 8007420: 4b47 ldr r3, [pc, #284] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
  16970. 8007422: f240 32a3 movw r2, #931 @ 0x3a3
  16971. 8007426: 4949 ldr r1, [pc, #292] @ (800754c <lwip_netconn_do_close_internal+0x200>)
  16972. 8007428: 4847 ldr r0, [pc, #284] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
  16973. 800742a: f00b ffed bl 8013408 <iprintf>
  16974. 800742e: e798 b.n 8007362 <lwip_netconn_do_close_internal+0x16>
  16975. LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE));
  16976. 8007430: 4b43 ldr r3, [pc, #268] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
  16977. 8007432: f44f 7269 mov.w r2, #932 @ 0x3a4
  16978. 8007436: 4946 ldr r1, [pc, #280] @ (8007550 <lwip_netconn_do_close_internal+0x204>)
  16979. 8007438: 4843 ldr r0, [pc, #268] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
  16980. 800743a: f00b ffe5 bl 8013408 <iprintf>
  16981. 800743e: e793 b.n 8007368 <lwip_netconn_do_close_internal+0x1c>
  16982. LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL));
  16983. 8007440: 4b3f ldr r3, [pc, #252] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
  16984. 8007442: f240 32a5 movw r2, #933 @ 0x3a5
  16985. 8007446: 4943 ldr r1, [pc, #268] @ (8007554 <lwip_netconn_do_close_internal+0x208>)
  16986. 8007448: 483f ldr r0, [pc, #252] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
  16987. 800744a: f00b ffdd bl 8013408 <iprintf>
  16988. 800744e: e78e b.n 800736e <lwip_netconn_do_close_internal+0x22>
  16989. LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL);
  16990. 8007450: 4b3b ldr r3, [pc, #236] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
  16991. 8007452: f240 32a6 movw r2, #934 @ 0x3a6
  16992. 8007456: 4940 ldr r1, [pc, #256] @ (8007558 <lwip_netconn_do_close_internal+0x20c>)
  16993. 8007458: 483b ldr r0, [pc, #236] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
  16994. 800745a: f00b ffd5 bl 8013408 <iprintf>
  16995. 800745e: e789 b.n 8007374 <lwip_netconn_do_close_internal+0x28>
  16996. shut_close = 0;
  16997. 8007460: 46ba mov sl, r7
  16998. 8007462: e7a6 b.n 80073b2 <lwip_netconn_do_close_internal+0x66>
  16999. 8007464: f04f 0a00 mov.w sl, #0
  17000. 8007468: e7a3 b.n 80073b2 <lwip_netconn_do_close_internal+0x66>
  17001. tcp_accept(tpcb, NULL);
  17002. 800746a: 2100 movs r1, #0
  17003. 800746c: 4630 mov r0, r6
  17004. 800746e: f006 f831 bl 800d4d4 <tcp_accept>
  17005. 8007472: e016 b.n 80074a2 <lwip_netconn_do_close_internal+0x156>
  17006. tcp_recv(tpcb, NULL);
  17007. 8007474: 2100 movs r1, #0
  17008. 8007476: 4630 mov r0, r6
  17009. 8007478: f005 ffde bl 800d438 <tcp_recv>
  17010. tcp_accept(tpcb, NULL);
  17011. 800747c: 2100 movs r1, #0
  17012. 800747e: 4630 mov r0, r6
  17013. 8007480: f006 f828 bl 800d4d4 <tcp_accept>
  17014. 8007484: e79b b.n 80073be <lwip_netconn_do_close_internal+0x72>
  17015. tcp_sent(tpcb, NULL);
  17016. 8007486: 2100 movs r1, #0
  17017. 8007488: 4630 mov r0, r6
  17018. 800748a: f005 ffef bl 800d46c <tcp_sent>
  17019. 800748e: e798 b.n 80073c2 <lwip_netconn_do_close_internal+0x76>
  17020. tcp_poll(tpcb, NULL, 0);
  17021. 8007490: 2200 movs r2, #0
  17022. 8007492: 4611 mov r1, r2
  17023. 8007494: 4630 mov r0, r6
  17024. 8007496: f006 f829 bl 800d4ec <tcp_poll>
  17025. tcp_err(tpcb, NULL);
  17026. 800749a: 2100 movs r1, #0
  17027. 800749c: 4630 mov r0, r6
  17028. 800749e: f005 ffff bl 800d4a0 <tcp_err>
  17029. if (shut_close) {
  17030. 80074a2: f1ba 0f00 cmp.w sl, #0
  17031. 80074a6: d08f beq.n 80073c8 <lwip_netconn_do_close_internal+0x7c>
  17032. err = tcp_close(tpcb);
  17033. 80074a8: 4630 mov r0, r6
  17034. 80074aa: f006 fc2b bl 800dd04 <tcp_close>
  17035. 80074ae: 4605 mov r5, r0
  17036. 80074b0: e790 b.n 80073d4 <lwip_netconn_do_close_internal+0x88>
  17037. if (shut_close) {
  17038. 80074b2: f1ba 0f00 cmp.w sl, #0
  17039. 80074b6: d128 bne.n 800750a <lwip_netconn_do_close_internal+0x1be>
  17040. sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg);
  17041. 80074b8: 6ae3 ldr r3, [r4, #44] @ 0x2c
  17042. 80074ba: 681e ldr r6, [r3, #0]
  17043. 80074bc: 360c adds r6, #12
  17044. conn->current_msg->err = err;
  17045. 80074be: 711d strb r5, [r3, #4]
  17046. conn->current_msg = NULL;
  17047. 80074c0: 2300 movs r3, #0
  17048. 80074c2: 62e3 str r3, [r4, #44] @ 0x2c
  17049. conn->state = NETCONN_NONE;
  17050. 80074c4: 7063 strb r3, [r4, #1]
  17051. if (err == ERR_OK) {
  17052. 80074c6: b9cd cbnz r5, 80074fc <lwip_netconn_do_close_internal+0x1b0>
  17053. if (shut_close) {
  17054. 80074c8: f1ba 0f00 cmp.w sl, #0
  17055. 80074cc: d006 beq.n 80074dc <lwip_netconn_do_close_internal+0x190>
  17056. conn->pcb.tcp = NULL;
  17057. 80074ce: 6063 str r3, [r4, #4]
  17058. API_EVENT(conn, NETCONN_EVT_ERROR, 0);
  17059. 80074d0: 6b23 ldr r3, [r4, #48] @ 0x30
  17060. 80074d2: b11b cbz r3, 80074dc <lwip_netconn_do_close_internal+0x190>
  17061. 80074d4: 2200 movs r2, #0
  17062. 80074d6: 2104 movs r1, #4
  17063. 80074d8: 4620 mov r0, r4
  17064. 80074da: 4798 blx r3
  17065. if (shut_rx) {
  17066. 80074dc: f1b9 0f00 cmp.w r9, #0
  17067. 80074e0: d005 beq.n 80074ee <lwip_netconn_do_close_internal+0x1a2>
  17068. API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0);
  17069. 80074e2: 6b23 ldr r3, [r4, #48] @ 0x30
  17070. 80074e4: b11b cbz r3, 80074ee <lwip_netconn_do_close_internal+0x1a2>
  17071. 80074e6: 2200 movs r2, #0
  17072. 80074e8: 4611 mov r1, r2
  17073. 80074ea: 4620 mov r0, r4
  17074. 80074ec: 4798 blx r3
  17075. if (shut_tx) {
  17076. 80074ee: b12f cbz r7, 80074fc <lwip_netconn_do_close_internal+0x1b0>
  17077. API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0);
  17078. 80074f0: 6b23 ldr r3, [r4, #48] @ 0x30
  17079. 80074f2: b11b cbz r3, 80074fc <lwip_netconn_do_close_internal+0x1b0>
  17080. 80074f4: 2200 movs r2, #0
  17081. 80074f6: 2102 movs r1, #2
  17082. 80074f8: 4620 mov r0, r4
  17083. 80074fa: 4798 blx r3
  17084. if (delayed)
  17085. 80074fc: f1b8 0f00 cmp.w r8, #0
  17086. 8007500: d108 bne.n 8007514 <lwip_netconn_do_close_internal+0x1c8>
  17087. return ERR_OK;
  17088. 8007502: 2500 movs r5, #0
  17089. }
  17090. 8007504: 4628 mov r0, r5
  17091. 8007506: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  17092. tcp_abort(tpcb);
  17093. 800750a: 4630 mov r0, r6
  17094. 800750c: f006 fa24 bl 800d958 <tcp_abort>
  17095. err = ERR_OK;
  17096. 8007510: 2500 movs r5, #0
  17097. 8007512: e7d1 b.n 80074b8 <lwip_netconn_do_close_internal+0x16c>
  17098. sys_sem_signal(op_completed_sem);
  17099. 8007514: 4630 mov r0, r6
  17100. 8007516: f005 fd60 bl 800cfda <sys_sem_signal>
  17101. 800751a: e7f2 b.n 8007502 <lwip_netconn_do_close_internal+0x1b6>
  17102. LWIP_ASSERT("Closing a listen pcb may not fail!", (tpcb->state != LISTEN));
  17103. 800751c: 4b08 ldr r3, [pc, #32] @ (8007540 <lwip_netconn_do_close_internal+0x1f4>)
  17104. 800751e: f240 4241 movw r2, #1089 @ 0x441
  17105. 8007522: 490e ldr r1, [pc, #56] @ (800755c <lwip_netconn_do_close_internal+0x210>)
  17106. 8007524: 4808 ldr r0, [pc, #32] @ (8007548 <lwip_netconn_do_close_internal+0x1fc>)
  17107. 8007526: f00b ff6f bl 8013408 <iprintf>
  17108. 800752a: e760 b.n 80073ee <lwip_netconn_do_close_internal+0xa2>
  17109. tcp_sent(tpcb, sent_tcp);
  17110. 800752c: 490c ldr r1, [pc, #48] @ (8007560 <lwip_netconn_do_close_internal+0x214>)
  17111. 800752e: 4630 mov r0, r6
  17112. 8007530: f005 ff9c bl 800d46c <tcp_sent>
  17113. 8007534: e75e b.n 80073f4 <lwip_netconn_do_close_internal+0xa8>
  17114. 8007536: bf00 nop
  17115. 8007538: 08007565 .word 0x08007565
  17116. 800753c: 08006ea1 .word 0x08006ea1
  17117. 8007540: 0801491c .word 0x0801491c
  17118. 8007544: 08014818 .word 0x08014818
  17119. 8007548: 080144e8 .word 0x080144e8
  17120. 800754c: 08014bc4 .word 0x08014bc4
  17121. 8007550: 08014be4 .word 0x08014be4
  17122. 8007554: 08014c08 .word 0x08014c08
  17123. 8007558: 08014a24 .word 0x08014a24
  17124. 800755c: 08014c1c .word 0x08014c1c
  17125. 8007560: 080075ed .word 0x080075ed
  17126. 08007564 <poll_tcp>:
  17127. {
  17128. 8007564: b510 push {r4, lr}
  17129. LWIP_ASSERT("conn != NULL", (conn != NULL));
  17130. 8007566: 4604 mov r4, r0
  17131. 8007568: b308 cbz r0, 80075ae <poll_tcp+0x4a>
  17132. if (conn->state == NETCONN_WRITE) {
  17133. 800756a: 7863 ldrb r3, [r4, #1]
  17134. 800756c: 2b01 cmp r3, #1
  17135. 800756e: d026 beq.n 80075be <poll_tcp+0x5a>
  17136. } else if (conn->state == NETCONN_CLOSE) {
  17137. 8007570: 2b04 cmp r3, #4
  17138. 8007572: d029 beq.n 80075c8 <poll_tcp+0x64>
  17139. if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) {
  17140. 8007574: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  17141. 8007578: f013 0f10 tst.w r3, #16
  17142. 800757c: d015 beq.n 80075aa <poll_tcp+0x46>
  17143. if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) &&
  17144. 800757e: 6862 ldr r2, [r4, #4]
  17145. 8007580: b19a cbz r2, 80075aa <poll_tcp+0x46>
  17146. 8007582: f8b2 0064 ldrh.w r0, [r2, #100] @ 0x64
  17147. 8007586: f640 3169 movw r1, #2921 @ 0xb69
  17148. 800758a: 4288 cmp r0, r1
  17149. 800758c: d90d bls.n 80075aa <poll_tcp+0x46>
  17150. (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) {
  17151. 800758e: f8b2 2066 ldrh.w r2, [r2, #102] @ 0x66
  17152. if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) &&
  17153. 8007592: 2a07 cmp r2, #7
  17154. 8007594: d809 bhi.n 80075aa <poll_tcp+0x46>
  17155. netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE);
  17156. 8007596: f003 03ef and.w r3, r3, #239 @ 0xef
  17157. 800759a: f884 3028 strb.w r3, [r4, #40] @ 0x28
  17158. API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0);
  17159. 800759e: 6b23 ldr r3, [r4, #48] @ 0x30
  17160. 80075a0: b11b cbz r3, 80075aa <poll_tcp+0x46>
  17161. 80075a2: 2200 movs r2, #0
  17162. 80075a4: 2102 movs r1, #2
  17163. 80075a6: 4620 mov r0, r4
  17164. 80075a8: 4798 blx r3
  17165. }
  17166. 80075aa: 2000 movs r0, #0
  17167. 80075ac: bd10 pop {r4, pc}
  17168. LWIP_ASSERT("conn != NULL", (conn != NULL));
  17169. 80075ae: 4b0c ldr r3, [pc, #48] @ (80075e0 <poll_tcp+0x7c>)
  17170. 80075b0: f44f 72b5 mov.w r2, #362 @ 0x16a
  17171. 80075b4: 490b ldr r1, [pc, #44] @ (80075e4 <poll_tcp+0x80>)
  17172. 80075b6: 480c ldr r0, [pc, #48] @ (80075e8 <poll_tcp+0x84>)
  17173. 80075b8: f00b ff26 bl 8013408 <iprintf>
  17174. 80075bc: e7d5 b.n 800756a <poll_tcp+0x6>
  17175. lwip_netconn_do_writemore(conn WRITE_DELAYED);
  17176. 80075be: 2101 movs r1, #1
  17177. 80075c0: 4620 mov r0, r4
  17178. 80075c2: f7ff fd73 bl 80070ac <lwip_netconn_do_writemore>
  17179. 80075c6: e7d5 b.n 8007574 <poll_tcp+0x10>
  17180. if (conn->current_msg && conn->current_msg->msg.sd.polls_left) {
  17181. 80075c8: 6ae3 ldr r3, [r4, #44] @ 0x2c
  17182. 80075ca: b11b cbz r3, 80075d4 <poll_tcp+0x70>
  17183. 80075cc: 7a5a ldrb r2, [r3, #9]
  17184. 80075ce: b10a cbz r2, 80075d4 <poll_tcp+0x70>
  17185. conn->current_msg->msg.sd.polls_left--;
  17186. 80075d0: 3a01 subs r2, #1
  17187. 80075d2: 725a strb r2, [r3, #9]
  17188. lwip_netconn_do_close_internal(conn WRITE_DELAYED);
  17189. 80075d4: 2101 movs r1, #1
  17190. 80075d6: 4620 mov r0, r4
  17191. 80075d8: f7ff feb8 bl 800734c <lwip_netconn_do_close_internal>
  17192. 80075dc: e7ca b.n 8007574 <poll_tcp+0x10>
  17193. 80075de: bf00 nop
  17194. 80075e0: 0801491c .word 0x0801491c
  17195. 80075e4: 08014a14 .word 0x08014a14
  17196. 80075e8: 080144e8 .word 0x080144e8
  17197. 080075ec <sent_tcp>:
  17198. {
  17199. 80075ec: b538 push {r3, r4, r5, lr}
  17200. LWIP_ASSERT("conn != NULL", (conn != NULL));
  17201. 80075ee: b1f8 cbz r0, 8007630 <sent_tcp+0x44>
  17202. 80075f0: 4615 mov r5, r2
  17203. 80075f2: 4604 mov r4, r0
  17204. if (conn->state == NETCONN_WRITE) {
  17205. 80075f4: 7843 ldrb r3, [r0, #1]
  17206. 80075f6: 2b01 cmp r3, #1
  17207. 80075f8: d023 beq.n 8007642 <sent_tcp+0x56>
  17208. } else if (conn->state == NETCONN_CLOSE) {
  17209. 80075fa: 2b04 cmp r3, #4
  17210. 80075fc: d025 beq.n 800764a <sent_tcp+0x5e>
  17211. if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) &&
  17212. 80075fe: 6863 ldr r3, [r4, #4]
  17213. 8007600: b1eb cbz r3, 800763e <sent_tcp+0x52>
  17214. 8007602: f8b3 1064 ldrh.w r1, [r3, #100] @ 0x64
  17215. 8007606: f640 3269 movw r2, #2921 @ 0xb69
  17216. 800760a: 4291 cmp r1, r2
  17217. 800760c: d917 bls.n 800763e <sent_tcp+0x52>
  17218. (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) {
  17219. 800760e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66
  17220. if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) &&
  17221. 8007612: 2b07 cmp r3, #7
  17222. 8007614: d813 bhi.n 800763e <sent_tcp+0x52>
  17223. netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE);
  17224. 8007616: f894 3028 ldrb.w r3, [r4, #40] @ 0x28
  17225. 800761a: f003 03ef and.w r3, r3, #239 @ 0xef
  17226. 800761e: f884 3028 strb.w r3, [r4, #40] @ 0x28
  17227. API_EVENT(conn, NETCONN_EVT_SENDPLUS, len);
  17228. 8007622: 6b23 ldr r3, [r4, #48] @ 0x30
  17229. 8007624: b15b cbz r3, 800763e <sent_tcp+0x52>
  17230. 8007626: 462a mov r2, r5
  17231. 8007628: 2102 movs r1, #2
  17232. 800762a: 4620 mov r0, r4
  17233. 800762c: 4798 blx r3
  17234. 800762e: e006 b.n 800763e <sent_tcp+0x52>
  17235. LWIP_ASSERT("conn != NULL", (conn != NULL));
  17236. 8007630: 4b08 ldr r3, [pc, #32] @ (8007654 <sent_tcp+0x68>)
  17237. 8007632: f240 1293 movw r2, #403 @ 0x193
  17238. 8007636: 4908 ldr r1, [pc, #32] @ (8007658 <sent_tcp+0x6c>)
  17239. 8007638: 4808 ldr r0, [pc, #32] @ (800765c <sent_tcp+0x70>)
  17240. 800763a: f00b fee5 bl 8013408 <iprintf>
  17241. }
  17242. 800763e: 2000 movs r0, #0
  17243. 8007640: bd38 pop {r3, r4, r5, pc}
  17244. lwip_netconn_do_writemore(conn WRITE_DELAYED);
  17245. 8007642: 2101 movs r1, #1
  17246. 8007644: f7ff fd32 bl 80070ac <lwip_netconn_do_writemore>
  17247. 8007648: e7d9 b.n 80075fe <sent_tcp+0x12>
  17248. lwip_netconn_do_close_internal(conn WRITE_DELAYED);
  17249. 800764a: 2101 movs r1, #1
  17250. 800764c: f7ff fe7e bl 800734c <lwip_netconn_do_close_internal>
  17251. 8007650: e7d5 b.n 80075fe <sent_tcp+0x12>
  17252. 8007652: bf00 nop
  17253. 8007654: 0801491c .word 0x0801491c
  17254. 8007658: 08014a14 .word 0x08014a14
  17255. 800765c: 080144e8 .word 0x080144e8
  17256. 08007660 <recv_tcp>:
  17257. {
  17258. 8007660: b5f8 push {r3, r4, r5, r6, r7, lr}
  17259. 8007662: 4604 mov r4, r0
  17260. 8007664: 4615 mov r5, r2
  17261. 8007666: 461e mov r6, r3
  17262. LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL);
  17263. 8007668: 460f mov r7, r1
  17264. 800766a: 2900 cmp r1, #0
  17265. 800766c: d02f beq.n 80076ce <recv_tcp+0x6e>
  17266. LWIP_ASSERT("recv_tcp must have an argument", arg != NULL);
  17267. 800766e: 2c00 cmp r4, #0
  17268. 8007670: d035 beq.n 80076de <recv_tcp+0x7e>
  17269. LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK);
  17270. 8007672: 2e00 cmp r6, #0
  17271. 8007674: d13b bne.n 80076ee <recv_tcp+0x8e>
  17272. if (conn == NULL) {
  17273. 8007676: 2c00 cmp r4, #0
  17274. 8007678: d04e beq.n 8007718 <recv_tcp+0xb8>
  17275. LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb);
  17276. 800767a: 6863 ldr r3, [r4, #4]
  17277. 800767c: 42bb cmp r3, r7
  17278. 800767e: d006 beq.n 800768e <recv_tcp+0x2e>
  17279. 8007680: 4b28 ldr r3, [pc, #160] @ (8007724 <recv_tcp+0xc4>)
  17280. 8007682: f240 1235 movw r2, #309 @ 0x135
  17281. 8007686: 4928 ldr r1, [pc, #160] @ (8007728 <recv_tcp+0xc8>)
  17282. 8007688: 4828 ldr r0, [pc, #160] @ (800772c <recv_tcp+0xcc>)
  17283. 800768a: f00b febd bl 8013408 <iprintf>
  17284. if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) {
  17285. 800768e: f104 0610 add.w r6, r4, #16
  17286. 8007692: 4630 mov r0, r6
  17287. 8007694: f005 fc65 bl 800cf62 <sys_mbox_valid>
  17288. 8007698: 2800 cmp r0, #0
  17289. 800769a: d030 beq.n 80076fe <recv_tcp+0x9e>
  17290. if (p != NULL) {
  17291. 800769c: 2d00 cmp r5, #0
  17292. 800769e: d038 beq.n 8007712 <recv_tcp+0xb2>
  17293. len = p->tot_len;
  17294. 80076a0: 892f ldrh r7, [r5, #8]
  17295. if (sys_mbox_trypost(&conn->recvmbox, msg) != ERR_OK) {
  17296. 80076a2: 4629 mov r1, r5
  17297. 80076a4: 4630 mov r0, r6
  17298. 80076a6: f005 fc20 bl 800ceea <sys_mbox_trypost>
  17299. 80076aa: 4605 mov r5, r0
  17300. 80076ac: 2800 cmp r0, #0
  17301. 80076ae: d136 bne.n 800771e <recv_tcp+0xbe>
  17302. SYS_ARCH_INC(conn->recv_avail, len);
  17303. 80076b0: f005 fcde bl 800d070 <sys_arch_protect>
  17304. 80076b4: 6a63 ldr r3, [r4, #36] @ 0x24
  17305. 80076b6: 443b add r3, r7
  17306. 80076b8: 6263 str r3, [r4, #36] @ 0x24
  17307. 80076ba: f005 fce5 bl 800d088 <sys_arch_unprotect>
  17308. API_EVENT(conn, NETCONN_EVT_RCVPLUS, len);
  17309. 80076be: 6b23 ldr r3, [r4, #48] @ 0x30
  17310. 80076c0: b11b cbz r3, 80076ca <recv_tcp+0x6a>
  17311. 80076c2: 463a mov r2, r7
  17312. 80076c4: 2100 movs r1, #0
  17313. 80076c6: 4620 mov r0, r4
  17314. 80076c8: 4798 blx r3
  17315. }
  17316. 80076ca: 4628 mov r0, r5
  17317. 80076cc: bdf8 pop {r3, r4, r5, r6, r7, pc}
  17318. LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL);
  17319. 80076ce: 4b15 ldr r3, [pc, #84] @ (8007724 <recv_tcp+0xc4>)
  17320. 80076d0: f44f 7296 mov.w r2, #300 @ 0x12c
  17321. 80076d4: 4916 ldr r1, [pc, #88] @ (8007730 <recv_tcp+0xd0>)
  17322. 80076d6: 4815 ldr r0, [pc, #84] @ (800772c <recv_tcp+0xcc>)
  17323. 80076d8: f00b fe96 bl 8013408 <iprintf>
  17324. 80076dc: e7c7 b.n 800766e <recv_tcp+0xe>
  17325. LWIP_ASSERT("recv_tcp must have an argument", arg != NULL);
  17326. 80076de: 4b11 ldr r3, [pc, #68] @ (8007724 <recv_tcp+0xc4>)
  17327. 80076e0: f240 122d movw r2, #301 @ 0x12d
  17328. 80076e4: 4913 ldr r1, [pc, #76] @ (8007734 <recv_tcp+0xd4>)
  17329. 80076e6: 4811 ldr r0, [pc, #68] @ (800772c <recv_tcp+0xcc>)
  17330. 80076e8: f00b fe8e bl 8013408 <iprintf>
  17331. 80076ec: e7c1 b.n 8007672 <recv_tcp+0x12>
  17332. LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK);
  17333. 80076ee: 4b0d ldr r3, [pc, #52] @ (8007724 <recv_tcp+0xc4>)
  17334. 80076f0: f44f 7297 mov.w r2, #302 @ 0x12e
  17335. 80076f4: 4910 ldr r1, [pc, #64] @ (8007738 <recv_tcp+0xd8>)
  17336. 80076f6: 480d ldr r0, [pc, #52] @ (800772c <recv_tcp+0xcc>)
  17337. 80076f8: f00b fe86 bl 8013408 <iprintf>
  17338. 80076fc: e7bb b.n 8007676 <recv_tcp+0x16>
  17339. if (p != NULL) {
  17340. 80076fe: b135 cbz r5, 800770e <recv_tcp+0xae>
  17341. tcp_recved(pcb, p->tot_len);
  17342. 8007700: 8929 ldrh r1, [r5, #8]
  17343. 8007702: 4638 mov r0, r7
  17344. 8007704: f005 fe12 bl 800d32c <tcp_recved>
  17345. pbuf_free(p);
  17346. 8007708: 4628 mov r0, r5
  17347. 800770a: f004 fb49 bl 800bda0 <pbuf_free>
  17348. return ERR_OK;
  17349. 800770e: 2500 movs r5, #0
  17350. 8007710: e7db b.n 80076ca <recv_tcp+0x6a>
  17351. msg = LWIP_CONST_CAST(void *, &netconn_closed);
  17352. 8007712: 4d0a ldr r5, [pc, #40] @ (800773c <recv_tcp+0xdc>)
  17353. len = 0;
  17354. 8007714: 2700 movs r7, #0
  17355. 8007716: e7c4 b.n 80076a2 <recv_tcp+0x42>
  17356. return ERR_VAL;
  17357. 8007718: f06f 0505 mvn.w r5, #5
  17358. 800771c: e7d5 b.n 80076ca <recv_tcp+0x6a>
  17359. return ERR_MEM;
  17360. 800771e: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  17361. 8007722: e7d2 b.n 80076ca <recv_tcp+0x6a>
  17362. 8007724: 0801491c .word 0x0801491c
  17363. 8007728: 08014c9c .word 0x08014c9c
  17364. 800772c: 080144e8 .word 0x080144e8
  17365. 8007730: 08014c40 .word 0x08014c40
  17366. 8007734: 08014c64 .word 0x08014c64
  17367. 8007738: 08014c84 .word 0x08014c84
  17368. 800773c: 08014e31 .word 0x08014e31
  17369. 08007740 <lwip_netconn_is_err_msg>:
  17370. {
  17371. 8007740: b538 push {r3, r4, r5, lr}
  17372. 8007742: 4604 mov r4, r0
  17373. LWIP_ASSERT("err != NULL", err != NULL);
  17374. 8007744: 460d mov r5, r1
  17375. 8007746: b151 cbz r1, 800775e <lwip_netconn_is_err_msg+0x1e>
  17376. if (msg == &netconn_aborted) {
  17377. 8007748: 4b0e ldr r3, [pc, #56] @ (8007784 <lwip_netconn_is_err_msg+0x44>)
  17378. 800774a: 429c cmp r4, r3
  17379. 800774c: d00e beq.n 800776c <lwip_netconn_is_err_msg+0x2c>
  17380. } else if (msg == &netconn_reset) {
  17381. 800774e: 4b0e ldr r3, [pc, #56] @ (8007788 <lwip_netconn_is_err_msg+0x48>)
  17382. 8007750: 429c cmp r4, r3
  17383. 8007752: d00f beq.n 8007774 <lwip_netconn_is_err_msg+0x34>
  17384. } else if (msg == &netconn_closed) {
  17385. 8007754: 4b0d ldr r3, [pc, #52] @ (800778c <lwip_netconn_is_err_msg+0x4c>)
  17386. 8007756: 429c cmp r4, r3
  17387. 8007758: d010 beq.n 800777c <lwip_netconn_is_err_msg+0x3c>
  17388. return 0;
  17389. 800775a: 2000 movs r0, #0
  17390. }
  17391. 800775c: bd38 pop {r3, r4, r5, pc}
  17392. LWIP_ASSERT("err != NULL", err != NULL);
  17393. 800775e: 4b0c ldr r3, [pc, #48] @ (8007790 <lwip_netconn_is_err_msg+0x50>)
  17394. 8007760: 2285 movs r2, #133 @ 0x85
  17395. 8007762: 490c ldr r1, [pc, #48] @ (8007794 <lwip_netconn_is_err_msg+0x54>)
  17396. 8007764: 480c ldr r0, [pc, #48] @ (8007798 <lwip_netconn_is_err_msg+0x58>)
  17397. 8007766: f00b fe4f bl 8013408 <iprintf>
  17398. 800776a: e7ed b.n 8007748 <lwip_netconn_is_err_msg+0x8>
  17399. *err = ERR_ABRT;
  17400. 800776c: 23f3 movs r3, #243 @ 0xf3
  17401. 800776e: 702b strb r3, [r5, #0]
  17402. return 1;
  17403. 8007770: 2001 movs r0, #1
  17404. 8007772: e7f3 b.n 800775c <lwip_netconn_is_err_msg+0x1c>
  17405. *err = ERR_RST;
  17406. 8007774: 23f2 movs r3, #242 @ 0xf2
  17407. 8007776: 702b strb r3, [r5, #0]
  17408. return 1;
  17409. 8007778: 2001 movs r0, #1
  17410. 800777a: e7ef b.n 800775c <lwip_netconn_is_err_msg+0x1c>
  17411. *err = ERR_CLSD;
  17412. 800777c: 23f1 movs r3, #241 @ 0xf1
  17413. 800777e: 702b strb r3, [r5, #0]
  17414. return 1;
  17415. 8007780: 2001 movs r0, #1
  17416. 8007782: e7eb b.n 800775c <lwip_netconn_is_err_msg+0x1c>
  17417. 8007784: 08014e33 .word 0x08014e33
  17418. 8007788: 08014e32 .word 0x08014e32
  17419. 800778c: 08014e31 .word 0x08014e31
  17420. 8007790: 0801491c .word 0x0801491c
  17421. 8007794: 08014cbc .word 0x08014cbc
  17422. 8007798: 080144e8 .word 0x080144e8
  17423. 0800779c <lwip_netconn_do_newconn>:
  17424. {
  17425. 800779c: b508 push {r3, lr}
  17426. msg->err = ERR_OK;
  17427. 800779e: 2300 movs r3, #0
  17428. 80077a0: 7103 strb r3, [r0, #4]
  17429. if (msg->conn->pcb.tcp == NULL) {
  17430. 80077a2: 6803 ldr r3, [r0, #0]
  17431. 80077a4: 685b ldr r3, [r3, #4]
  17432. 80077a6: b103 cbz r3, 80077aa <lwip_netconn_do_newconn+0xe>
  17433. }
  17434. 80077a8: bd08 pop {r3, pc}
  17435. pcb_new(msg);
  17436. 80077aa: f7ff fb35 bl 8006e18 <pcb_new>
  17437. }
  17438. 80077ae: e7fb b.n 80077a8 <lwip_netconn_do_newconn+0xc>
  17439. 080077b0 <netconn_alloc>:
  17440. {
  17441. 80077b0: b570 push {r4, r5, r6, lr}
  17442. 80077b2: 4605 mov r5, r0
  17443. 80077b4: 460e mov r6, r1
  17444. conn = (struct netconn *)memp_malloc(MEMP_NETCONN);
  17445. 80077b6: 2007 movs r0, #7
  17446. 80077b8: f003 ff24 bl 800b604 <memp_malloc>
  17447. if (conn == NULL) {
  17448. 80077bc: 4604 mov r4, r0
  17449. 80077be: b3a0 cbz r0, 800782a <netconn_alloc+0x7a>
  17450. conn->pending_err = ERR_OK;
  17451. 80077c0: 2300 movs r3, #0
  17452. 80077c2: 7203 strb r3, [r0, #8]
  17453. conn->type = t;
  17454. 80077c4: 7005 strb r5, [r0, #0]
  17455. conn->pcb.tcp = NULL;
  17456. 80077c6: 6043 str r3, [r0, #4]
  17457. switch (NETCONNTYPE_GROUP(t)) {
  17458. 80077c8: f005 05f0 and.w r5, r5, #240 @ 0xf0
  17459. 80077cc: 2d10 cmp r5, #16
  17460. 80077ce: d001 beq.n 80077d4 <netconn_alloc+0x24>
  17461. 80077d0: 2d20 cmp r5, #32
  17462. 80077d2: d11e bne.n 8007812 <netconn_alloc+0x62>
  17463. if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) {
  17464. 80077d4: f104 0510 add.w r5, r4, #16
  17465. 80077d8: 2106 movs r1, #6
  17466. 80077da: 4628 mov r0, r5
  17467. 80077dc: f005 fb6e bl 800cebc <sys_mbox_new>
  17468. 80077e0: b9f0 cbnz r0, 8007820 <netconn_alloc+0x70>
  17469. if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) {
  17470. 80077e2: 2100 movs r1, #0
  17471. 80077e4: f104 000c add.w r0, r4, #12
  17472. 80077e8: f005 fbc4 bl 800cf74 <sys_sem_new>
  17473. 80077ec: b9f8 cbnz r0, 800782e <netconn_alloc+0x7e>
  17474. sys_mbox_set_invalid(&conn->acceptmbox);
  17475. 80077ee: f104 0014 add.w r0, r4, #20
  17476. 80077f2: f005 fbbc bl 800cf6e <sys_mbox_set_invalid>
  17477. conn->state = NETCONN_NONE;
  17478. 80077f6: 2300 movs r3, #0
  17479. 80077f8: 7063 strb r3, [r4, #1]
  17480. conn->socket = -1;
  17481. 80077fa: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
  17482. 80077fe: 61a2 str r2, [r4, #24]
  17483. conn->callback = callback;
  17484. 8007800: 6326 str r6, [r4, #48] @ 0x30
  17485. conn->current_msg = NULL;
  17486. 8007802: 62e3 str r3, [r4, #44] @ 0x2c
  17487. conn->recv_timeout = 0;
  17488. 8007804: 61e3 str r3, [r4, #28]
  17489. conn->recv_bufsize = RECV_BUFSIZE_DEFAULT;
  17490. 8007806: 4a0c ldr r2, [pc, #48] @ (8007838 <netconn_alloc+0x88>)
  17491. 8007808: 6222 str r2, [r4, #32]
  17492. conn->recv_avail = 0;
  17493. 800780a: 6263 str r3, [r4, #36] @ 0x24
  17494. conn->flags = init_flags;
  17495. 800780c: f884 3028 strb.w r3, [r4, #40] @ 0x28
  17496. return conn;
  17497. 8007810: e00b b.n 800782a <netconn_alloc+0x7a>
  17498. LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0);
  17499. 8007812: 4b0a ldr r3, [pc, #40] @ (800783c <netconn_alloc+0x8c>)
  17500. 8007814: f240 22e5 movw r2, #741 @ 0x2e5
  17501. 8007818: 4909 ldr r1, [pc, #36] @ (8007840 <netconn_alloc+0x90>)
  17502. 800781a: 480a ldr r0, [pc, #40] @ (8007844 <netconn_alloc+0x94>)
  17503. 800781c: f00b fdf4 bl 8013408 <iprintf>
  17504. memp_free(MEMP_NETCONN, conn);
  17505. 8007820: 4621 mov r1, r4
  17506. 8007822: 2007 movs r0, #7
  17507. 8007824: f003 ff24 bl 800b670 <memp_free>
  17508. return NULL;
  17509. 8007828: 2400 movs r4, #0
  17510. }
  17511. 800782a: 4620 mov r0, r4
  17512. 800782c: bd70 pop {r4, r5, r6, pc}
  17513. sys_mbox_free(&conn->recvmbox);
  17514. 800782e: 4628 mov r0, r5
  17515. 8007830: f005 fb52 bl 800ced8 <sys_mbox_free>
  17516. goto free_and_return;
  17517. 8007834: e7f4 b.n 8007820 <netconn_alloc+0x70>
  17518. 8007836: bf00 nop
  17519. 8007838: 77359400 .word 0x77359400
  17520. 800783c: 0801491c .word 0x0801491c
  17521. 8007840: 08014cc8 .word 0x08014cc8
  17522. 8007844: 080144e8 .word 0x080144e8
  17523. 08007848 <netconn_free>:
  17524. {
  17525. 8007848: b538 push {r3, r4, r5, lr}
  17526. 800784a: 4604 mov r4, r0
  17527. LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL);
  17528. 800784c: 6843 ldr r3, [r0, #4]
  17529. 800784e: b133 cbz r3, 800785e <netconn_free+0x16>
  17530. 8007850: 4b16 ldr r3, [pc, #88] @ (80078ac <netconn_free+0x64>)
  17531. 8007852: f44f 7247 mov.w r2, #796 @ 0x31c
  17532. 8007856: 4916 ldr r1, [pc, #88] @ (80078b0 <netconn_free+0x68>)
  17533. 8007858: 4816 ldr r0, [pc, #88] @ (80078b4 <netconn_free+0x6c>)
  17534. 800785a: f00b fdd5 bl 8013408 <iprintf>
  17535. LWIP_ASSERT("recvmbox must be deallocated before calling this function",
  17536. 800785e: f104 0010 add.w r0, r4, #16
  17537. 8007862: f005 fb7e bl 800cf62 <sys_mbox_valid>
  17538. 8007866: b988 cbnz r0, 800788c <netconn_free+0x44>
  17539. LWIP_ASSERT("acceptmbox must be deallocated before calling this function",
  17540. 8007868: f104 0014 add.w r0, r4, #20
  17541. 800786c: f005 fb79 bl 800cf62 <sys_mbox_valid>
  17542. 8007870: b9a0 cbnz r0, 800789c <netconn_free+0x54>
  17543. sys_sem_free(&conn->op_completed);
  17544. 8007872: f104 050c add.w r5, r4, #12
  17545. 8007876: 4628 mov r0, r5
  17546. 8007878: f005 fbb4 bl 800cfe4 <sys_sem_free>
  17547. sys_sem_set_invalid(&conn->op_completed);
  17548. 800787c: 4628 mov r0, r5
  17549. 800787e: f005 fbbc bl 800cffa <sys_sem_set_invalid>
  17550. memp_free(MEMP_NETCONN, conn);
  17551. 8007882: 4621 mov r1, r4
  17552. 8007884: 2007 movs r0, #7
  17553. 8007886: f003 fef3 bl 800b670 <memp_free>
  17554. }
  17555. 800788a: bd38 pop {r3, r4, r5, pc}
  17556. LWIP_ASSERT("recvmbox must be deallocated before calling this function",
  17557. 800788c: 4b07 ldr r3, [pc, #28] @ (80078ac <netconn_free+0x64>)
  17558. 800788e: f240 3223 movw r2, #803 @ 0x323
  17559. 8007892: 4909 ldr r1, [pc, #36] @ (80078b8 <netconn_free+0x70>)
  17560. 8007894: 4807 ldr r0, [pc, #28] @ (80078b4 <netconn_free+0x6c>)
  17561. 8007896: f00b fdb7 bl 8013408 <iprintf>
  17562. 800789a: e7e5 b.n 8007868 <netconn_free+0x20>
  17563. LWIP_ASSERT("acceptmbox must be deallocated before calling this function",
  17564. 800789c: 4b03 ldr r3, [pc, #12] @ (80078ac <netconn_free+0x64>)
  17565. 800789e: f240 3226 movw r2, #806 @ 0x326
  17566. 80078a2: 4906 ldr r1, [pc, #24] @ (80078bc <netconn_free+0x74>)
  17567. 80078a4: 4803 ldr r0, [pc, #12] @ (80078b4 <netconn_free+0x6c>)
  17568. 80078a6: f00b fdaf bl 8013408 <iprintf>
  17569. 80078aa: e7e2 b.n 8007872 <netconn_free+0x2a>
  17570. 80078ac: 0801491c .word 0x0801491c
  17571. 80078b0: 08014cf0 .word 0x08014cf0
  17572. 80078b4: 080144e8 .word 0x080144e8
  17573. 80078b8: 08014d20 .word 0x08014d20
  17574. 80078bc: 08014d5c .word 0x08014d5c
  17575. 080078c0 <netconn_drain>:
  17576. {
  17577. 80078c0: b530 push {r4, r5, lr}
  17578. 80078c2: b083 sub sp, #12
  17579. 80078c4: 4604 mov r4, r0
  17580. if (sys_mbox_valid(&conn->recvmbox)) {
  17581. 80078c6: f100 0510 add.w r5, r0, #16
  17582. 80078ca: 4628 mov r0, r5
  17583. 80078cc: f005 fb49 bl 800cf62 <sys_mbox_valid>
  17584. 80078d0: b958 cbnz r0, 80078ea <netconn_drain+0x2a>
  17585. if (sys_mbox_valid(&conn->acceptmbox)) {
  17586. 80078d2: 3414 adds r4, #20
  17587. 80078d4: 4620 mov r0, r4
  17588. 80078d6: f005 fb44 bl 800cf62 <sys_mbox_valid>
  17589. 80078da: bb20 cbnz r0, 8007926 <netconn_drain+0x66>
  17590. 80078dc: e043 b.n 8007966 <netconn_drain+0xa6>
  17591. if (!lwip_netconn_is_err_msg(mem, &err)) {
  17592. 80078de: f10d 0103 add.w r1, sp, #3
  17593. 80078e2: 9801 ldr r0, [sp, #4]
  17594. 80078e4: f7ff ff2c bl 8007740 <lwip_netconn_is_err_msg>
  17595. 80078e8: b178 cbz r0, 800790a <netconn_drain+0x4a>
  17596. while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) {
  17597. 80078ea: a901 add r1, sp, #4
  17598. 80078ec: 4628 mov r0, r5
  17599. 80078ee: f005 fb2d bl 800cf4c <sys_arch_mbox_tryfetch>
  17600. 80078f2: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
  17601. 80078f6: d00c beq.n 8007912 <netconn_drain+0x52>
  17602. if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) {
  17603. 80078f8: 7823 ldrb r3, [r4, #0]
  17604. 80078fa: f003 03f0 and.w r3, r3, #240 @ 0xf0
  17605. 80078fe: 2b10 cmp r3, #16
  17606. 8007900: d0ed beq.n 80078de <netconn_drain+0x1e>
  17607. netbuf_delete((struct netbuf *)mem);
  17608. 8007902: 9801 ldr r0, [sp, #4]
  17609. 8007904: f003 fece bl 800b6a4 <netbuf_delete>
  17610. 8007908: e7ef b.n 80078ea <netconn_drain+0x2a>
  17611. pbuf_free((struct pbuf *)mem);
  17612. 800790a: 9801 ldr r0, [sp, #4]
  17613. 800790c: f004 fa48 bl 800bda0 <pbuf_free>
  17614. 8007910: e7eb b.n 80078ea <netconn_drain+0x2a>
  17615. sys_mbox_free(&conn->recvmbox);
  17616. 8007912: 4628 mov r0, r5
  17617. 8007914: f005 fae0 bl 800ced8 <sys_mbox_free>
  17618. sys_mbox_set_invalid(&conn->recvmbox);
  17619. 8007918: 4628 mov r0, r5
  17620. 800791a: f005 fb28 bl 800cf6e <sys_mbox_set_invalid>
  17621. 800791e: e7d8 b.n 80078d2 <netconn_drain+0x12>
  17622. netconn_free(newconn);
  17623. 8007920: 4628 mov r0, r5
  17624. 8007922: f7ff ff91 bl 8007848 <netconn_free>
  17625. while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) {
  17626. 8007926: a901 add r1, sp, #4
  17627. 8007928: 4620 mov r0, r4
  17628. 800792a: f005 fb0f bl 800cf4c <sys_arch_mbox_tryfetch>
  17629. 800792e: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
  17630. 8007932: d012 beq.n 800795a <netconn_drain+0x9a>
  17631. if (!lwip_netconn_is_err_msg(mem, &err)) {
  17632. 8007934: f10d 0103 add.w r1, sp, #3
  17633. 8007938: 9801 ldr r0, [sp, #4]
  17634. 800793a: f7ff ff01 bl 8007740 <lwip_netconn_is_err_msg>
  17635. 800793e: 2800 cmp r0, #0
  17636. 8007940: d1f1 bne.n 8007926 <netconn_drain+0x66>
  17637. struct netconn *newconn = (struct netconn *)mem;
  17638. 8007942: 9d01 ldr r5, [sp, #4]
  17639. netconn_drain(newconn);
  17640. 8007944: 4628 mov r0, r5
  17641. 8007946: f7ff ffbb bl 80078c0 <netconn_drain>
  17642. if (newconn->pcb.tcp != NULL) {
  17643. 800794a: 6868 ldr r0, [r5, #4]
  17644. 800794c: 2800 cmp r0, #0
  17645. 800794e: d0e7 beq.n 8007920 <netconn_drain+0x60>
  17646. tcp_abort(newconn->pcb.tcp);
  17647. 8007950: f006 f802 bl 800d958 <tcp_abort>
  17648. newconn->pcb.tcp = NULL;
  17649. 8007954: 2300 movs r3, #0
  17650. 8007956: 606b str r3, [r5, #4]
  17651. 8007958: e7e2 b.n 8007920 <netconn_drain+0x60>
  17652. sys_mbox_free(&conn->acceptmbox);
  17653. 800795a: 4620 mov r0, r4
  17654. 800795c: f005 fabc bl 800ced8 <sys_mbox_free>
  17655. sys_mbox_set_invalid(&conn->acceptmbox);
  17656. 8007960: 4620 mov r0, r4
  17657. 8007962: f005 fb04 bl 800cf6e <sys_mbox_set_invalid>
  17658. }
  17659. 8007966: b003 add sp, #12
  17660. 8007968: bd30 pop {r4, r5, pc}
  17661. ...
  17662. 0800796c <lwip_netconn_do_delconn>:
  17663. {
  17664. 800796c: b538 push {r3, r4, r5, lr}
  17665. 800796e: 4604 mov r4, r0
  17666. enum netconn_state state = msg->conn->state;
  17667. 8007970: 6803 ldr r3, [r0, #0]
  17668. 8007972: 785d ldrb r5, [r3, #1]
  17669. LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */
  17670. 8007974: b125 cbz r5, 8007980 <lwip_netconn_do_delconn+0x14>
  17671. 8007976: 781b ldrb r3, [r3, #0]
  17672. 8007978: f003 03f0 and.w r3, r3, #240 @ 0xf0
  17673. 800797c: 2b10 cmp r3, #16
  17674. 800797e: d10c bne.n 800799a <lwip_netconn_do_delconn+0x2e>
  17675. if (((state != NETCONN_NONE) &&
  17676. 8007980: 2d00 cmp r5, #0
  17677. 8007982: bf18 it ne
  17678. 8007984: 2d02 cmpne r5, #2
  17679. 8007986: d016 beq.n 80079b6 <lwip_netconn_do_delconn+0x4a>
  17680. (state != NETCONN_LISTEN) &&
  17681. 8007988: 2d03 cmp r5, #3
  17682. 800798a: d00e beq.n 80079aa <lwip_netconn_do_delconn+0x3e>
  17683. msg->err = ERR_INPROGRESS;
  17684. 800798c: 23fb movs r3, #251 @ 0xfb
  17685. 800798e: 7123 strb r3, [r4, #4]
  17686. if (sys_sem_valid(LWIP_API_MSG_SEM(msg))) {
  17687. 8007990: 6820 ldr r0, [r4, #0]
  17688. 8007992: 300c adds r0, #12
  17689. 8007994: f005 fb2b bl 800cfee <sys_sem_valid>
  17690. }
  17691. 8007998: bd38 pop {r3, r4, r5, pc}
  17692. LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */
  17693. 800799a: 4b3d ldr r3, [pc, #244] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
  17694. 800799c: f240 425e movw r2, #1118 @ 0x45e
  17695. 80079a0: 493c ldr r1, [pc, #240] @ (8007a94 <lwip_netconn_do_delconn+0x128>)
  17696. 80079a2: 483d ldr r0, [pc, #244] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
  17697. 80079a4: f00b fd30 bl 8013408 <iprintf>
  17698. 80079a8: e7ea b.n 8007980 <lwip_netconn_do_delconn+0x14>
  17699. ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) {
  17700. 80079aa: 6823 ldr r3, [r4, #0]
  17701. 80079ac: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
  17702. 80079b0: f013 0f04 tst.w r3, #4
  17703. 80079b4: d0ea beq.n 800798c <lwip_netconn_do_delconn+0x20>
  17704. LWIP_ASSERT("blocking connect in progress",
  17705. 80079b6: 2d03 cmp r5, #3
  17706. 80079b8: d025 beq.n 8007a06 <lwip_netconn_do_delconn+0x9a>
  17707. msg->err = ERR_OK;
  17708. 80079ba: 2300 movs r3, #0
  17709. 80079bc: 7123 strb r3, [r4, #4]
  17710. netconn_drain(msg->conn);
  17711. 80079be: 6820 ldr r0, [r4, #0]
  17712. 80079c0: f7ff ff7e bl 80078c0 <netconn_drain>
  17713. if (msg->conn->pcb.tcp != NULL) {
  17714. 80079c4: 6822 ldr r2, [r4, #0]
  17715. 80079c6: 6851 ldr r1, [r2, #4]
  17716. 80079c8: b179 cbz r1, 80079ea <lwip_netconn_do_delconn+0x7e>
  17717. switch (NETCONNTYPE_GROUP(msg->conn->type)) {
  17718. 80079ca: 7813 ldrb r3, [r2, #0]
  17719. 80079cc: f003 03f0 and.w r3, r3, #240 @ 0xf0
  17720. 80079d0: 2b10 cmp r3, #16
  17721. 80079d2: d026 beq.n 8007a22 <lwip_netconn_do_delconn+0xb6>
  17722. 80079d4: 2b20 cmp r3, #32
  17723. 80079d6: d105 bne.n 80079e4 <lwip_netconn_do_delconn+0x78>
  17724. msg->conn->pcb.udp->recv_arg = NULL;
  17725. 80079d8: 2300 movs r3, #0
  17726. 80079da: 61cb str r3, [r1, #28]
  17727. udp_remove(msg->conn->pcb.udp);
  17728. 80079dc: 6823 ldr r3, [r4, #0]
  17729. 80079de: 6858 ldr r0, [r3, #4]
  17730. 80079e0: f00a fa54 bl 8011e8c <udp_remove>
  17731. msg->conn->pcb.tcp = NULL;
  17732. 80079e4: 6823 ldr r3, [r4, #0]
  17733. 80079e6: 2200 movs r2, #0
  17734. 80079e8: 605a str r2, [r3, #4]
  17735. API_EVENT(msg->conn, NETCONN_EVT_RCVPLUS, 0);
  17736. 80079ea: 6820 ldr r0, [r4, #0]
  17737. 80079ec: 6b03 ldr r3, [r0, #48] @ 0x30
  17738. 80079ee: b113 cbz r3, 80079f6 <lwip_netconn_do_delconn+0x8a>
  17739. 80079f0: 2200 movs r2, #0
  17740. 80079f2: 4611 mov r1, r2
  17741. 80079f4: 4798 blx r3
  17742. API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0);
  17743. 80079f6: 6820 ldr r0, [r4, #0]
  17744. 80079f8: 6b03 ldr r3, [r0, #48] @ 0x30
  17745. 80079fa: 2b00 cmp r3, #0
  17746. 80079fc: d0c8 beq.n 8007990 <lwip_netconn_do_delconn+0x24>
  17747. 80079fe: 2200 movs r2, #0
  17748. 8007a00: 2102 movs r1, #2
  17749. 8007a02: 4798 blx r3
  17750. 8007a04: e7c4 b.n 8007990 <lwip_netconn_do_delconn+0x24>
  17751. LWIP_ASSERT("blocking connect in progress",
  17752. 8007a06: 6823 ldr r3, [r4, #0]
  17753. 8007a08: f893 3028 ldrb.w r3, [r3, #40] @ 0x28
  17754. 8007a0c: f013 0f04 tst.w r3, #4
  17755. 8007a10: d1d3 bne.n 80079ba <lwip_netconn_do_delconn+0x4e>
  17756. 8007a12: 4b1f ldr r3, [pc, #124] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
  17757. 8007a14: f240 427a movw r2, #1146 @ 0x47a
  17758. 8007a18: 4920 ldr r1, [pc, #128] @ (8007a9c <lwip_netconn_do_delconn+0x130>)
  17759. 8007a1a: 481f ldr r0, [pc, #124] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
  17760. 8007a1c: f00b fcf4 bl 8013408 <iprintf>
  17761. 8007a20: e7cb b.n 80079ba <lwip_netconn_do_delconn+0x4e>
  17762. LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL);
  17763. 8007a22: 6ad3 ldr r3, [r2, #44] @ 0x2c
  17764. 8007a24: b133 cbz r3, 8007a34 <lwip_netconn_do_delconn+0xc8>
  17765. 8007a26: 4b1a ldr r3, [pc, #104] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
  17766. 8007a28: f240 4294 movw r2, #1172 @ 0x494
  17767. 8007a2c: 491c ldr r1, [pc, #112] @ (8007aa0 <lwip_netconn_do_delconn+0x134>)
  17768. 8007a2e: 481a ldr r0, [pc, #104] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
  17769. 8007a30: f00b fcea bl 8013408 <iprintf>
  17770. msg->conn->state = NETCONN_CLOSE;
  17771. 8007a34: 6823 ldr r3, [r4, #0]
  17772. 8007a36: 2204 movs r2, #4
  17773. 8007a38: 705a strb r2, [r3, #1]
  17774. msg->msg.sd.shut = NETCONN_SHUT_RDWR;
  17775. 8007a3a: 2303 movs r3, #3
  17776. 8007a3c: 7223 strb r3, [r4, #8]
  17777. msg->conn->current_msg = msg;
  17778. 8007a3e: 6823 ldr r3, [r4, #0]
  17779. 8007a40: 62dc str r4, [r3, #44] @ 0x2c
  17780. if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) {
  17781. 8007a42: 2100 movs r1, #0
  17782. 8007a44: 6820 ldr r0, [r4, #0]
  17783. 8007a46: f7ff fc81 bl 800734c <lwip_netconn_do_close_internal>
  17784. 8007a4a: 2800 cmp r0, #0
  17785. 8007a4c: d0a4 beq.n 8007998 <lwip_netconn_do_delconn+0x2c>
  17786. LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE);
  17787. 8007a4e: 6823 ldr r3, [r4, #0]
  17788. 8007a50: 785b ldrb r3, [r3, #1]
  17789. 8007a52: 2b04 cmp r3, #4
  17790. 8007a54: d114 bne.n 8007a80 <lwip_netconn_do_delconn+0x114>
  17791. UNLOCK_TCPIP_CORE();
  17792. 8007a56: f7fc f84d bl 8003af4 <sys_unlock_tcpip_core>
  17793. sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0);
  17794. 8007a5a: 6820 ldr r0, [r4, #0]
  17795. 8007a5c: 2100 movs r1, #0
  17796. 8007a5e: 300c adds r0, #12
  17797. 8007a60: f005 fa9d bl 800cf9e <sys_arch_sem_wait>
  17798. LOCK_TCPIP_CORE();
  17799. 8007a64: f7fc f838 bl 8003ad8 <sys_lock_tcpip_core>
  17800. LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE);
  17801. 8007a68: 6823 ldr r3, [r4, #0]
  17802. 8007a6a: 785b ldrb r3, [r3, #1]
  17803. 8007a6c: 2b00 cmp r3, #0
  17804. 8007a6e: d093 beq.n 8007998 <lwip_netconn_do_delconn+0x2c>
  17805. 8007a70: 4b07 ldr r3, [pc, #28] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
  17806. 8007a72: f240 429e movw r2, #1182 @ 0x49e
  17807. 8007a76: 490b ldr r1, [pc, #44] @ (8007aa4 <lwip_netconn_do_delconn+0x138>)
  17808. 8007a78: 4807 ldr r0, [pc, #28] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
  17809. 8007a7a: f00b fcc5 bl 8013408 <iprintf>
  17810. return;
  17811. 8007a7e: e78b b.n 8007998 <lwip_netconn_do_delconn+0x2c>
  17812. LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE);
  17813. 8007a80: 4b03 ldr r3, [pc, #12] @ (8007a90 <lwip_netconn_do_delconn+0x124>)
  17814. 8007a82: f240 429a movw r2, #1178 @ 0x49a
  17815. 8007a86: 4907 ldr r1, [pc, #28] @ (8007aa4 <lwip_netconn_do_delconn+0x138>)
  17816. 8007a88: 4803 ldr r0, [pc, #12] @ (8007a98 <lwip_netconn_do_delconn+0x12c>)
  17817. 8007a8a: f00b fcbd bl 8013408 <iprintf>
  17818. 8007a8e: e7e2 b.n 8007a56 <lwip_netconn_do_delconn+0xea>
  17819. 8007a90: 0801491c .word 0x0801491c
  17820. 8007a94: 08014d98 .word 0x08014d98
  17821. 8007a98: 080144e8 .word 0x080144e8
  17822. 8007a9c: 08014dac .word 0x08014dac
  17823. 8007aa0: 08014dcc .word 0x08014dcc
  17824. 8007aa4: 08014de8 .word 0x08014de8
  17825. 08007aa8 <lwip_netconn_do_connect>:
  17826. {
  17827. 8007aa8: b510 push {r4, lr}
  17828. 8007aaa: 4604 mov r4, r0
  17829. if (msg->conn->pcb.tcp == NULL) {
  17830. 8007aac: 6802 ldr r2, [r0, #0]
  17831. 8007aae: 6850 ldr r0, [r2, #4]
  17832. 8007ab0: 2800 cmp r0, #0
  17833. 8007ab2: d066 beq.n 8007b82 <lwip_netconn_do_connect+0xda>
  17834. switch (NETCONNTYPE_GROUP(msg->conn->type)) {
  17835. 8007ab4: 7813 ldrb r3, [r2, #0]
  17836. 8007ab6: f003 03f0 and.w r3, r3, #240 @ 0xf0
  17837. 8007aba: 2b10 cmp r3, #16
  17838. 8007abc: d006 beq.n 8007acc <lwip_netconn_do_connect+0x24>
  17839. 8007abe: 2b20 cmp r3, #32
  17840. 8007ac0: d155 bne.n 8007b6e <lwip_netconn_do_connect+0xc6>
  17841. err = udp_connect(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port);
  17842. 8007ac2: 89a2 ldrh r2, [r4, #12]
  17843. 8007ac4: 68a1 ldr r1, [r4, #8]
  17844. 8007ac6: f00a f967 bl 8011d98 <udp_connect>
  17845. break;
  17846. 8007aca: e05c b.n 8007b86 <lwip_netconn_do_connect+0xde>
  17847. if (msg->conn->state == NETCONN_CONNECT) {
  17848. 8007acc: 7853 ldrb r3, [r2, #1]
  17849. 8007ace: 2b03 cmp r3, #3
  17850. 8007ad0: d05b beq.n 8007b8a <lwip_netconn_do_connect+0xe2>
  17851. } else if (msg->conn->state != NETCONN_NONE) {
  17852. 8007ad2: b113 cbz r3, 8007ada <lwip_netconn_do_connect+0x32>
  17853. err = ERR_ISCONN;
  17854. 8007ad4: f06f 0009 mvn.w r0, #9
  17855. 8007ad8: e055 b.n 8007b86 <lwip_netconn_do_connect+0xde>
  17856. setup_tcp(msg->conn);
  17857. 8007ada: 4610 mov r0, r2
  17858. 8007adc: f7ff f97c bl 8006dd8 <setup_tcp>
  17859. err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr),
  17860. 8007ae0: 6820 ldr r0, [r4, #0]
  17861. 8007ae2: 4b2b ldr r3, [pc, #172] @ (8007b90 <lwip_netconn_do_connect+0xe8>)
  17862. 8007ae4: 89a2 ldrh r2, [r4, #12]
  17863. 8007ae6: 68a1 ldr r1, [r4, #8]
  17864. 8007ae8: 6840 ldr r0, [r0, #4]
  17865. 8007aea: f005 fd61 bl 800d5b0 <tcp_connect>
  17866. if (err == ERR_OK) {
  17867. 8007aee: 2800 cmp r0, #0
  17868. 8007af0: d149 bne.n 8007b86 <lwip_netconn_do_connect+0xde>
  17869. u8_t non_blocking = netconn_is_nonblocking(msg->conn);
  17870. 8007af2: 6822 ldr r2, [r4, #0]
  17871. 8007af4: f892 3028 ldrb.w r3, [r2, #40] @ 0x28
  17872. msg->conn->state = NETCONN_CONNECT;
  17873. 8007af8: 2103 movs r1, #3
  17874. 8007afa: 7051 strb r1, [r2, #1]
  17875. SET_NONBLOCKING_CONNECT(msg->conn, non_blocking);
  17876. 8007afc: f013 0302 ands.w r3, r3, #2
  17877. 8007b00: d00a beq.n 8007b18 <lwip_netconn_do_connect+0x70>
  17878. 8007b02: 6821 ldr r1, [r4, #0]
  17879. 8007b04: f891 2028 ldrb.w r2, [r1, #40] @ 0x28
  17880. 8007b08: f042 0204 orr.w r2, r2, #4
  17881. 8007b0c: f881 2028 strb.w r2, [r1, #40] @ 0x28
  17882. if (non_blocking) {
  17883. 8007b10: b153 cbz r3, 8007b28 <lwip_netconn_do_connect+0x80>
  17884. err = ERR_INPROGRESS;
  17885. 8007b12: f06f 0004 mvn.w r0, #4
  17886. 8007b16: e036 b.n 8007b86 <lwip_netconn_do_connect+0xde>
  17887. SET_NONBLOCKING_CONNECT(msg->conn, non_blocking);
  17888. 8007b18: 6821 ldr r1, [r4, #0]
  17889. 8007b1a: f891 2028 ldrb.w r2, [r1, #40] @ 0x28
  17890. 8007b1e: f002 02fb and.w r2, r2, #251 @ 0xfb
  17891. 8007b22: f881 2028 strb.w r2, [r1, #40] @ 0x28
  17892. 8007b26: e7f3 b.n 8007b10 <lwip_netconn_do_connect+0x68>
  17893. msg->conn->current_msg = msg;
  17894. 8007b28: 6823 ldr r3, [r4, #0]
  17895. 8007b2a: 62dc str r4, [r3, #44] @ 0x2c
  17896. LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT);
  17897. 8007b2c: 6823 ldr r3, [r4, #0]
  17898. 8007b2e: 785b ldrb r3, [r3, #1]
  17899. 8007b30: 2b03 cmp r3, #3
  17900. 8007b32: d114 bne.n 8007b5e <lwip_netconn_do_connect+0xb6>
  17901. UNLOCK_TCPIP_CORE();
  17902. 8007b34: f7fb ffde bl 8003af4 <sys_unlock_tcpip_core>
  17903. sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0);
  17904. 8007b38: 6820 ldr r0, [r4, #0]
  17905. 8007b3a: 2100 movs r1, #0
  17906. 8007b3c: 300c adds r0, #12
  17907. 8007b3e: f005 fa2e bl 800cf9e <sys_arch_sem_wait>
  17908. LOCK_TCPIP_CORE();
  17909. 8007b42: f7fb ffc9 bl 8003ad8 <sys_lock_tcpip_core>
  17910. LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT);
  17911. 8007b46: 6823 ldr r3, [r4, #0]
  17912. 8007b48: 785b ldrb r3, [r3, #1]
  17913. 8007b4a: 2b03 cmp r3, #3
  17914. 8007b4c: d11c bne.n 8007b88 <lwip_netconn_do_connect+0xe0>
  17915. 8007b4e: 4b11 ldr r3, [pc, #68] @ (8007b94 <lwip_netconn_do_connect+0xec>)
  17916. 8007b50: f240 5274 movw r2, #1396 @ 0x574
  17917. 8007b54: 4910 ldr r1, [pc, #64] @ (8007b98 <lwip_netconn_do_connect+0xf0>)
  17918. 8007b56: 4811 ldr r0, [pc, #68] @ (8007b9c <lwip_netconn_do_connect+0xf4>)
  17919. 8007b58: f00b fc56 bl 8013408 <iprintf>
  17920. return;
  17921. 8007b5c: e014 b.n 8007b88 <lwip_netconn_do_connect+0xe0>
  17922. LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT);
  17923. 8007b5e: 4b0d ldr r3, [pc, #52] @ (8007b94 <lwip_netconn_do_connect+0xec>)
  17924. 8007b60: f44f 62ae mov.w r2, #1392 @ 0x570
  17925. 8007b64: 490c ldr r1, [pc, #48] @ (8007b98 <lwip_netconn_do_connect+0xf0>)
  17926. 8007b66: 480d ldr r0, [pc, #52] @ (8007b9c <lwip_netconn_do_connect+0xf4>)
  17927. 8007b68: f00b fc4e bl 8013408 <iprintf>
  17928. 8007b6c: e7e2 b.n 8007b34 <lwip_netconn_do_connect+0x8c>
  17929. LWIP_ERROR("Invalid netconn type", 0, do {
  17930. 8007b6e: 4b09 ldr r3, [pc, #36] @ (8007b94 <lwip_netconn_do_connect+0xec>)
  17931. 8007b70: f240 527d movw r2, #1405 @ 0x57d
  17932. 8007b74: 490a ldr r1, [pc, #40] @ (8007ba0 <lwip_netconn_do_connect+0xf8>)
  17933. 8007b76: 4809 ldr r0, [pc, #36] @ (8007b9c <lwip_netconn_do_connect+0xf4>)
  17934. 8007b78: f00b fc46 bl 8013408 <iprintf>
  17935. 8007b7c: f06f 0005 mvn.w r0, #5
  17936. break;
  17937. 8007b80: e001 b.n 8007b86 <lwip_netconn_do_connect+0xde>
  17938. err = ERR_CLSD;
  17939. 8007b82: f06f 000e mvn.w r0, #14
  17940. msg->err = err;
  17941. 8007b86: 7120 strb r0, [r4, #4]
  17942. }
  17943. 8007b88: bd10 pop {r4, pc}
  17944. err = ERR_ALREADY;
  17945. 8007b8a: f06f 0008 mvn.w r0, #8
  17946. 8007b8e: e7fa b.n 8007b86 <lwip_netconn_do_connect+0xde>
  17947. 8007b90: 08006fcd .word 0x08006fcd
  17948. 8007b94: 0801491c .word 0x0801491c
  17949. 8007b98: 08014de8 .word 0x08014de8
  17950. 8007b9c: 080144e8 .word 0x080144e8
  17951. 8007ba0: 08014df0 .word 0x08014df0
  17952. 08007ba4 <lwip_netconn_do_disconnect>:
  17953. {
  17954. 8007ba4: b510 push {r4, lr}
  17955. 8007ba6: 4604 mov r4, r0
  17956. if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) {
  17957. 8007ba8: 6802 ldr r2, [r0, #0]
  17958. 8007baa: 7813 ldrb r3, [r2, #0]
  17959. 8007bac: f003 03f0 and.w r3, r3, #240 @ 0xf0
  17960. 8007bb0: 2b20 cmp r3, #32
  17961. 8007bb2: d002 beq.n 8007bba <lwip_netconn_do_disconnect+0x16>
  17962. msg->err = ERR_VAL;
  17963. 8007bb4: 23fa movs r3, #250 @ 0xfa
  17964. 8007bb6: 7103 strb r3, [r0, #4]
  17965. }
  17966. 8007bb8: bd10 pop {r4, pc}
  17967. udp_disconnect(msg->conn->pcb.udp);
  17968. 8007bba: 6850 ldr r0, [r2, #4]
  17969. 8007bbc: f00a f932 bl 8011e24 <udp_disconnect>
  17970. msg->err = ERR_OK;
  17971. 8007bc0: 2300 movs r3, #0
  17972. 8007bc2: 7123 strb r3, [r4, #4]
  17973. 8007bc4: e7f8 b.n 8007bb8 <lwip_netconn_do_disconnect+0x14>
  17974. 08007bc6 <lwip_netconn_do_send>:
  17975. {
  17976. 8007bc6: b510 push {r4, lr}
  17977. 8007bc8: 4604 mov r4, r0
  17978. err_t err = netconn_err(msg->conn);
  17979. 8007bca: 6800 ldr r0, [r0, #0]
  17980. 8007bcc: f7fe ff33 bl 8006a36 <netconn_err>
  17981. if (err == ERR_OK) {
  17982. 8007bd0: 4603 mov r3, r0
  17983. 8007bd2: b948 cbnz r0, 8007be8 <lwip_netconn_do_send+0x22>
  17984. if (msg->conn->pcb.tcp != NULL) {
  17985. 8007bd4: 6823 ldr r3, [r4, #0]
  17986. 8007bd6: 6858 ldr r0, [r3, #4]
  17987. 8007bd8: b1c0 cbz r0, 8007c0c <lwip_netconn_do_send+0x46>
  17988. switch (NETCONNTYPE_GROUP(msg->conn->type)) {
  17989. 8007bda: 781b ldrb r3, [r3, #0]
  17990. 8007bdc: f003 03f0 and.w r3, r3, #240 @ 0xf0
  17991. 8007be0: 2b20 cmp r3, #32
  17992. 8007be2: d003 beq.n 8007bec <lwip_netconn_do_send+0x26>
  17993. err = ERR_CONN;
  17994. 8007be4: f06f 030a mvn.w r3, #10
  17995. msg->err = err;
  17996. 8007be8: 7123 strb r3, [r4, #4]
  17997. }
  17998. 8007bea: bd10 pop {r4, pc}
  17999. if (ip_addr_isany_val(msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) {
  18000. 8007bec: 68a1 ldr r1, [r4, #8]
  18001. 8007bee: 688b ldr r3, [r1, #8]
  18002. 8007bf0: b923 cbnz r3, 8007bfc <lwip_netconn_do_send+0x36>
  18003. err = udp_send(msg->conn->pcb.udp, msg->msg.b->p);
  18004. 8007bf2: 6809 ldr r1, [r1, #0]
  18005. 8007bf4: f00a f8ac bl 8011d50 <udp_send>
  18006. 8007bf8: 4603 mov r3, r0
  18007. 8007bfa: e7f5 b.n 8007be8 <lwip_netconn_do_send+0x22>
  18008. err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port);
  18009. 8007bfc: 898b ldrh r3, [r1, #12]
  18010. 8007bfe: f101 0208 add.w r2, r1, #8
  18011. 8007c02: 6809 ldr r1, [r1, #0]
  18012. 8007c04: f00a f85e bl 8011cc4 <udp_sendto>
  18013. 8007c08: 4603 mov r3, r0
  18014. 8007c0a: e7ed b.n 8007be8 <lwip_netconn_do_send+0x22>
  18015. err = ERR_CONN;
  18016. 8007c0c: f06f 030a mvn.w r3, #10
  18017. 8007c10: e7ea b.n 8007be8 <lwip_netconn_do_send+0x22>
  18018. 08007c12 <lwip_netconn_do_recv>:
  18019. msg->err = ERR_OK;
  18020. 8007c12: 2300 movs r3, #0
  18021. 8007c14: 7103 strb r3, [r0, #4]
  18022. if (msg->conn->pcb.tcp != NULL) {
  18023. 8007c16: 6803 ldr r3, [r0, #0]
  18024. 8007c18: 685a ldr r2, [r3, #4]
  18025. 8007c1a: b1ba cbz r2, 8007c4c <lwip_netconn_do_recv+0x3a>
  18026. {
  18027. 8007c1c: b570 push {r4, r5, r6, lr}
  18028. 8007c1e: 4606 mov r6, r0
  18029. if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) {
  18030. 8007c20: 781b ldrb r3, [r3, #0]
  18031. 8007c22: f003 03f0 and.w r3, r3, #240 @ 0xf0
  18032. 8007c26: 2b10 cmp r3, #16
  18033. 8007c28: d000 beq.n 8007c2c <lwip_netconn_do_recv+0x1a>
  18034. }
  18035. 8007c2a: bd70 pop {r4, r5, r6, pc}
  18036. size_t remaining = msg->msg.r.len;
  18037. 8007c2c: 6884 ldr r4, [r0, #8]
  18038. 8007c2e: e008 b.n 8007c42 <lwip_netconn_do_recv+0x30>
  18039. u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining);
  18040. 8007c30: f64f 75ff movw r5, #65535 @ 0xffff
  18041. tcp_recved(msg->conn->pcb.tcp, recved);
  18042. 8007c34: 6833 ldr r3, [r6, #0]
  18043. 8007c36: 4629 mov r1, r5
  18044. 8007c38: 6858 ldr r0, [r3, #4]
  18045. 8007c3a: f005 fb77 bl 800d32c <tcp_recved>
  18046. } while (remaining != 0);
  18047. 8007c3e: 1b64 subs r4, r4, r5
  18048. 8007c40: d0f3 beq.n 8007c2a <lwip_netconn_do_recv+0x18>
  18049. u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining);
  18050. 8007c42: f5b4 3f80 cmp.w r4, #65536 @ 0x10000
  18051. 8007c46: d2f3 bcs.n 8007c30 <lwip_netconn_do_recv+0x1e>
  18052. 8007c48: b2a5 uxth r5, r4
  18053. 8007c4a: e7f3 b.n 8007c34 <lwip_netconn_do_recv+0x22>
  18054. 8007c4c: 4770 bx lr
  18055. ...
  18056. 08007c50 <lwip_netconn_do_write>:
  18057. *
  18058. * @param m the api_msg pointing to the connection
  18059. */
  18060. void
  18061. lwip_netconn_do_write(void *m)
  18062. {
  18063. 8007c50: b510 push {r4, lr}
  18064. 8007c52: 4604 mov r4, r0
  18065. struct api_msg *msg = (struct api_msg *)m;
  18066. err_t err = netconn_err(msg->conn);
  18067. 8007c54: 6800 ldr r0, [r0, #0]
  18068. 8007c56: f7fe feee bl 8006a36 <netconn_err>
  18069. if (err == ERR_OK) {
  18070. 8007c5a: 4603 mov r3, r0
  18071. 8007c5c: b938 cbnz r0, 8007c6e <lwip_netconn_do_write+0x1e>
  18072. if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) {
  18073. 8007c5e: 6822 ldr r2, [r4, #0]
  18074. 8007c60: 7813 ldrb r3, [r2, #0]
  18075. 8007c62: f003 03f0 and.w r3, r3, #240 @ 0xf0
  18076. 8007c66: 2b10 cmp r3, #16
  18077. 8007c68: d003 beq.n 8007c72 <lwip_netconn_do_write+0x22>
  18078. #else /* LWIP_TCP */
  18079. err = ERR_VAL;
  18080. #endif /* LWIP_TCP */
  18081. #if (LWIP_UDP || LWIP_RAW)
  18082. } else {
  18083. err = ERR_VAL;
  18084. 8007c6a: f06f 0305 mvn.w r3, #5
  18085. #endif /* (LWIP_UDP || LWIP_RAW) */
  18086. }
  18087. }
  18088. msg->err = err;
  18089. 8007c6e: 7123 strb r3, [r4, #4]
  18090. TCPIP_APIMSG_ACK(msg);
  18091. }
  18092. 8007c70: bd10 pop {r4, pc}
  18093. if (msg->conn->state != NETCONN_NONE) {
  18094. 8007c72: 7853 ldrb r3, [r2, #1]
  18095. 8007c74: 2b00 cmp r3, #0
  18096. 8007c76: d141 bne.n 8007cfc <lwip_netconn_do_write+0xac>
  18097. } else if (msg->conn->pcb.tcp != NULL) {
  18098. 8007c78: 6853 ldr r3, [r2, #4]
  18099. 8007c7a: 2b00 cmp r3, #0
  18100. 8007c7c: d041 beq.n 8007d02 <lwip_netconn_do_write+0xb2>
  18101. msg->conn->state = NETCONN_WRITE;
  18102. 8007c7e: 2301 movs r3, #1
  18103. 8007c80: 7053 strb r3, [r2, #1]
  18104. LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL);
  18105. 8007c82: 6823 ldr r3, [r4, #0]
  18106. 8007c84: 6adb ldr r3, [r3, #44] @ 0x2c
  18107. 8007c86: b133 cbz r3, 8007c96 <lwip_netconn_do_write+0x46>
  18108. 8007c88: 4b1f ldr r3, [pc, #124] @ (8007d08 <lwip_netconn_do_write+0xb8>)
  18109. 8007c8a: f240 7223 movw r2, #1827 @ 0x723
  18110. 8007c8e: 491f ldr r1, [pc, #124] @ (8007d0c <lwip_netconn_do_write+0xbc>)
  18111. 8007c90: 481f ldr r0, [pc, #124] @ (8007d10 <lwip_netconn_do_write+0xc0>)
  18112. 8007c92: f00b fbb9 bl 8013408 <iprintf>
  18113. LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0);
  18114. 8007c96: 6963 ldr r3, [r4, #20]
  18115. 8007c98: b303 cbz r3, 8007cdc <lwip_netconn_do_write+0x8c>
  18116. msg->conn->current_msg = msg;
  18117. 8007c9a: 6823 ldr r3, [r4, #0]
  18118. 8007c9c: 62dc str r4, [r3, #44] @ 0x2c
  18119. if (lwip_netconn_do_writemore(msg->conn, 0) != ERR_OK) {
  18120. 8007c9e: 2100 movs r1, #0
  18121. 8007ca0: 6820 ldr r0, [r4, #0]
  18122. 8007ca2: f7ff fa03 bl 80070ac <lwip_netconn_do_writemore>
  18123. 8007ca6: 2800 cmp r0, #0
  18124. 8007ca8: d0e2 beq.n 8007c70 <lwip_netconn_do_write+0x20>
  18125. LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE);
  18126. 8007caa: 6823 ldr r3, [r4, #0]
  18127. 8007cac: 785b ldrb r3, [r3, #1]
  18128. 8007cae: 2b01 cmp r3, #1
  18129. 8007cb0: d11c bne.n 8007cec <lwip_netconn_do_write+0x9c>
  18130. UNLOCK_TCPIP_CORE();
  18131. 8007cb2: f7fb ff1f bl 8003af4 <sys_unlock_tcpip_core>
  18132. sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0);
  18133. 8007cb6: 6820 ldr r0, [r4, #0]
  18134. 8007cb8: 2100 movs r1, #0
  18135. 8007cba: 300c adds r0, #12
  18136. 8007cbc: f005 f96f bl 800cf9e <sys_arch_sem_wait>
  18137. LOCK_TCPIP_CORE();
  18138. 8007cc0: f7fb ff0a bl 8003ad8 <sys_lock_tcpip_core>
  18139. LWIP_ASSERT("state!", msg->conn->state != NETCONN_WRITE);
  18140. 8007cc4: 6823 ldr r3, [r4, #0]
  18141. 8007cc6: 785b ldrb r3, [r3, #1]
  18142. 8007cc8: 2b01 cmp r3, #1
  18143. 8007cca: d1d1 bne.n 8007c70 <lwip_netconn_do_write+0x20>
  18144. 8007ccc: 4b0e ldr r3, [pc, #56] @ (8007d08 <lwip_netconn_do_write+0xb8>)
  18145. 8007cce: f240 722c movw r2, #1836 @ 0x72c
  18146. 8007cd2: 4910 ldr r1, [pc, #64] @ (8007d14 <lwip_netconn_do_write+0xc4>)
  18147. 8007cd4: 480e ldr r0, [pc, #56] @ (8007d10 <lwip_netconn_do_write+0xc0>)
  18148. 8007cd6: f00b fb97 bl 8013408 <iprintf>
  18149. return;
  18150. 8007cda: e7c9 b.n 8007c70 <lwip_netconn_do_write+0x20>
  18151. LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0);
  18152. 8007cdc: 4b0a ldr r3, [pc, #40] @ (8007d08 <lwip_netconn_do_write+0xb8>)
  18153. 8007cde: f240 7224 movw r2, #1828 @ 0x724
  18154. 8007ce2: 490d ldr r1, [pc, #52] @ (8007d18 <lwip_netconn_do_write+0xc8>)
  18155. 8007ce4: 480a ldr r0, [pc, #40] @ (8007d10 <lwip_netconn_do_write+0xc0>)
  18156. 8007ce6: f00b fb8f bl 8013408 <iprintf>
  18157. 8007cea: e7d6 b.n 8007c9a <lwip_netconn_do_write+0x4a>
  18158. LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE);
  18159. 8007cec: 4b06 ldr r3, [pc, #24] @ (8007d08 <lwip_netconn_do_write+0xb8>)
  18160. 8007cee: f44f 62e5 mov.w r2, #1832 @ 0x728
  18161. 8007cf2: 4908 ldr r1, [pc, #32] @ (8007d14 <lwip_netconn_do_write+0xc4>)
  18162. 8007cf4: 4806 ldr r0, [pc, #24] @ (8007d10 <lwip_netconn_do_write+0xc0>)
  18163. 8007cf6: f00b fb87 bl 8013408 <iprintf>
  18164. 8007cfa: e7da b.n 8007cb2 <lwip_netconn_do_write+0x62>
  18165. err = ERR_INPROGRESS;
  18166. 8007cfc: f06f 0304 mvn.w r3, #4
  18167. 8007d00: e7b5 b.n 8007c6e <lwip_netconn_do_write+0x1e>
  18168. err = ERR_CONN;
  18169. 8007d02: f06f 030a mvn.w r3, #10
  18170. 8007d06: e7b2 b.n 8007c6e <lwip_netconn_do_write+0x1e>
  18171. 8007d08: 0801491c .word 0x0801491c
  18172. 8007d0c: 08014dcc .word 0x08014dcc
  18173. 8007d10: 080144e8 .word 0x080144e8
  18174. 8007d14: 08014de8 .word 0x08014de8
  18175. 8007d18: 08014e08 .word 0x08014e08
  18176. 08007d1c <lwip_netconn_do_getaddr>:
  18177. *
  18178. * @param m the api_msg pointing to the connection
  18179. */
  18180. void
  18181. lwip_netconn_do_getaddr(void *m)
  18182. {
  18183. 8007d1c: b508 push {r3, lr}
  18184. struct api_msg *msg = (struct api_msg *)m;
  18185. if (msg->conn->pcb.ip != NULL) {
  18186. 8007d1e: 6803 ldr r3, [r0, #0]
  18187. 8007d20: 685b ldr r3, [r3, #4]
  18188. 8007d22: 2b00 cmp r3, #0
  18189. 8007d24: d03f beq.n 8007da6 <lwip_netconn_do_getaddr+0x8a>
  18190. if (msg->msg.ad.local) {
  18191. 8007d26: 7c02 ldrb r2, [r0, #16]
  18192. 8007d28: b19a cbz r2, 8007d52 <lwip_netconn_do_getaddr+0x36>
  18193. ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr),
  18194. 8007d2a: 6882 ldr r2, [r0, #8]
  18195. 8007d2c: 681b ldr r3, [r3, #0]
  18196. 8007d2e: 6013 str r3, [r2, #0]
  18197. } else {
  18198. ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr),
  18199. msg->conn->pcb.ip->remote_ip);
  18200. }
  18201. msg->err = ERR_OK;
  18202. 8007d30: 2300 movs r3, #0
  18203. 8007d32: 7103 strb r3, [r0, #4]
  18204. switch (NETCONNTYPE_GROUP(msg->conn->type)) {
  18205. 8007d34: 6802 ldr r2, [r0, #0]
  18206. 8007d36: 7813 ldrb r3, [r2, #0]
  18207. 8007d38: f003 03f0 and.w r3, r3, #240 @ 0xf0
  18208. 8007d3c: 2b10 cmp r3, #16
  18209. 8007d3e: d018 beq.n 8007d72 <lwip_netconn_do_getaddr+0x56>
  18210. 8007d40: 2b20 cmp r3, #32
  18211. 8007d42: d128 bne.n 8007d96 <lwip_netconn_do_getaddr+0x7a>
  18212. }
  18213. break;
  18214. #endif /* LWIP_RAW */
  18215. #if LWIP_UDP
  18216. case NETCONN_UDP:
  18217. if (msg->msg.ad.local) {
  18218. 8007d44: 7c03 ldrb r3, [r0, #16]
  18219. 8007d46: b143 cbz r3, 8007d5a <lwip_netconn_do_getaddr+0x3e>
  18220. API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port;
  18221. 8007d48: 6852 ldr r2, [r2, #4]
  18222. 8007d4a: 68c3 ldr r3, [r0, #12]
  18223. 8007d4c: 8a52 ldrh r2, [r2, #18]
  18224. 8007d4e: 801a strh r2, [r3, #0]
  18225. 8007d50: e02b b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
  18226. ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr),
  18227. 8007d52: 6882 ldr r2, [r0, #8]
  18228. 8007d54: 685b ldr r3, [r3, #4]
  18229. 8007d56: 6013 str r3, [r2, #0]
  18230. 8007d58: e7ea b.n 8007d30 <lwip_netconn_do_getaddr+0x14>
  18231. } else {
  18232. if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) {
  18233. 8007d5a: 6853 ldr r3, [r2, #4]
  18234. 8007d5c: 7c1a ldrb r2, [r3, #16]
  18235. 8007d5e: f012 0f04 tst.w r2, #4
  18236. 8007d62: d102 bne.n 8007d6a <lwip_netconn_do_getaddr+0x4e>
  18237. msg->err = ERR_CONN;
  18238. 8007d64: 23f5 movs r3, #245 @ 0xf5
  18239. 8007d66: 7103 strb r3, [r0, #4]
  18240. 8007d68: e01f b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
  18241. } else {
  18242. API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port;
  18243. 8007d6a: 68c2 ldr r2, [r0, #12]
  18244. 8007d6c: 8a9b ldrh r3, [r3, #20]
  18245. 8007d6e: 8013 strh r3, [r2, #0]
  18246. 8007d70: e01b b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
  18247. }
  18248. break;
  18249. #endif /* LWIP_UDP */
  18250. #if LWIP_TCP
  18251. case NETCONN_TCP:
  18252. if ((msg->msg.ad.local == 0) &&
  18253. 8007d72: 7c03 ldrb r3, [r0, #16]
  18254. 8007d74: b91b cbnz r3, 8007d7e <lwip_netconn_do_getaddr+0x62>
  18255. ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) {
  18256. 8007d76: 6851 ldr r1, [r2, #4]
  18257. 8007d78: 7d09 ldrb r1, [r1, #20]
  18258. if ((msg->msg.ad.local == 0) &&
  18259. 8007d7a: 2901 cmp r1, #1
  18260. 8007d7c: d905 bls.n 8007d8a <lwip_netconn_do_getaddr+0x6e>
  18261. /* pcb is not connected and remote name is requested */
  18262. msg->err = ERR_CONN;
  18263. } else {
  18264. API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port);
  18265. 8007d7e: b13b cbz r3, 8007d90 <lwip_netconn_do_getaddr+0x74>
  18266. 8007d80: 6853 ldr r3, [r2, #4]
  18267. 8007d82: 8ada ldrh r2, [r3, #22]
  18268. 8007d84: 68c3 ldr r3, [r0, #12]
  18269. 8007d86: 801a strh r2, [r3, #0]
  18270. 8007d88: e00f b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
  18271. msg->err = ERR_CONN;
  18272. 8007d8a: 23f5 movs r3, #245 @ 0xf5
  18273. 8007d8c: 7103 strb r3, [r0, #4]
  18274. 8007d8e: e00c b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
  18275. API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port);
  18276. 8007d90: 6853 ldr r3, [r2, #4]
  18277. 8007d92: 8b1a ldrh r2, [r3, #24]
  18278. 8007d94: e7f6 b.n 8007d84 <lwip_netconn_do_getaddr+0x68>
  18279. }
  18280. break;
  18281. #endif /* LWIP_TCP */
  18282. default:
  18283. LWIP_ASSERT("invalid netconn_type", 0);
  18284. 8007d96: 4b05 ldr r3, [pc, #20] @ (8007dac <lwip_netconn_do_getaddr+0x90>)
  18285. 8007d98: f240 727d movw r2, #1917 @ 0x77d
  18286. 8007d9c: 4904 ldr r1, [pc, #16] @ (8007db0 <lwip_netconn_do_getaddr+0x94>)
  18287. 8007d9e: 4805 ldr r0, [pc, #20] @ (8007db4 <lwip_netconn_do_getaddr+0x98>)
  18288. 8007da0: f00b fb32 bl 8013408 <iprintf>
  18289. break;
  18290. 8007da4: e001 b.n 8007daa <lwip_netconn_do_getaddr+0x8e>
  18291. }
  18292. } else {
  18293. msg->err = ERR_CONN;
  18294. 8007da6: 23f5 movs r3, #245 @ 0xf5
  18295. 8007da8: 7103 strb r3, [r0, #4]
  18296. }
  18297. TCPIP_APIMSG_ACK(msg);
  18298. }
  18299. 8007daa: bd08 pop {r3, pc}
  18300. 8007dac: 0801491c .word 0x0801491c
  18301. 8007db0: 08014e1c .word 0x08014e1c
  18302. 8007db4: 080144e8 .word 0x080144e8
  18303. 08007db8 <lwip_netconn_do_close>:
  18304. *
  18305. * @param m the api_msg pointing to the connection
  18306. */
  18307. void
  18308. lwip_netconn_do_close(void *m)
  18309. {
  18310. 8007db8: b510 push {r4, lr}
  18311. 8007dba: 4604 mov r4, r0
  18312. struct api_msg *msg = (struct api_msg *)m;
  18313. #if LWIP_TCP
  18314. enum netconn_state state = msg->conn->state;
  18315. 8007dbc: 6800 ldr r0, [r0, #0]
  18316. 8007dbe: 7842 ldrb r2, [r0, #1]
  18317. /* First check if this is a TCP netconn and if it is in a correct state
  18318. (LISTEN doesn't support half shutdown) */
  18319. if ((msg->conn->pcb.tcp != NULL) &&
  18320. 8007dc0: 6843 ldr r3, [r0, #4]
  18321. 8007dc2: b123 cbz r3, 8007dce <lwip_netconn_do_close+0x16>
  18322. (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) &&
  18323. 8007dc4: 7803 ldrb r3, [r0, #0]
  18324. if ((msg->conn->pcb.tcp != NULL) &&
  18325. 8007dc6: f003 03f0 and.w r3, r3, #240 @ 0xf0
  18326. 8007dca: 2b10 cmp r3, #16
  18327. 8007dcc: d002 beq.n 8007dd4 <lwip_netconn_do_close+0x1c>
  18328. return;
  18329. }
  18330. } else
  18331. #endif /* LWIP_TCP */
  18332. {
  18333. msg->err = ERR_CONN;
  18334. 8007dce: 23f5 movs r3, #245 @ 0xf5
  18335. 8007dd0: 7123 strb r3, [r4, #4]
  18336. }
  18337. TCPIP_APIMSG_ACK(msg);
  18338. }
  18339. 8007dd2: bd10 pop {r4, pc}
  18340. ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) {
  18341. 8007dd4: 7a23 ldrb r3, [r4, #8]
  18342. (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) &&
  18343. 8007dd6: 2b03 cmp r3, #3
  18344. 8007dd8: d001 beq.n 8007dde <lwip_netconn_do_close+0x26>
  18345. ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) {
  18346. 8007dda: 2a02 cmp r2, #2
  18347. 8007ddc: d0f7 beq.n 8007dce <lwip_netconn_do_close+0x16>
  18348. if (state == NETCONN_CONNECT) {
  18349. 8007dde: 2a03 cmp r2, #3
  18350. 8007de0: d004 beq.n 8007dec <lwip_netconn_do_close+0x34>
  18351. } else if (state == NETCONN_WRITE) {
  18352. 8007de2: 2a01 cmp r2, #1
  18353. 8007de4: d105 bne.n 8007df2 <lwip_netconn_do_close+0x3a>
  18354. msg->err = ERR_INPROGRESS;
  18355. 8007de6: 23fb movs r3, #251 @ 0xfb
  18356. 8007de8: 7123 strb r3, [r4, #4]
  18357. 8007dea: e7f2 b.n 8007dd2 <lwip_netconn_do_close+0x1a>
  18358. msg->err = ERR_CONN;
  18359. 8007dec: 23f5 movs r3, #245 @ 0xf5
  18360. 8007dee: 7123 strb r3, [r4, #4]
  18361. 8007df0: e7ef b.n 8007dd2 <lwip_netconn_do_close+0x1a>
  18362. if (msg->msg.sd.shut & NETCONN_SHUT_RD) {
  18363. 8007df2: f013 0f01 tst.w r3, #1
  18364. 8007df6: d12d bne.n 8007e54 <lwip_netconn_do_close+0x9c>
  18365. LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL);
  18366. 8007df8: 6823 ldr r3, [r4, #0]
  18367. 8007dfa: 6adb ldr r3, [r3, #44] @ 0x2c
  18368. 8007dfc: b133 cbz r3, 8007e0c <lwip_netconn_do_close+0x54>
  18369. 8007dfe: 4b1b ldr r3, [pc, #108] @ (8007e6c <lwip_netconn_do_close+0xb4>)
  18370. 8007e00: f240 72bd movw r2, #1981 @ 0x7bd
  18371. 8007e04: 491a ldr r1, [pc, #104] @ (8007e70 <lwip_netconn_do_close+0xb8>)
  18372. 8007e06: 481b ldr r0, [pc, #108] @ (8007e74 <lwip_netconn_do_close+0xbc>)
  18373. 8007e08: f00b fafe bl 8013408 <iprintf>
  18374. msg->conn->state = NETCONN_CLOSE;
  18375. 8007e0c: 6823 ldr r3, [r4, #0]
  18376. 8007e0e: 2204 movs r2, #4
  18377. 8007e10: 705a strb r2, [r3, #1]
  18378. msg->conn->current_msg = msg;
  18379. 8007e12: 6823 ldr r3, [r4, #0]
  18380. 8007e14: 62dc str r4, [r3, #44] @ 0x2c
  18381. if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) {
  18382. 8007e16: 2100 movs r1, #0
  18383. 8007e18: 6820 ldr r0, [r4, #0]
  18384. 8007e1a: f7ff fa97 bl 800734c <lwip_netconn_do_close_internal>
  18385. 8007e1e: 2800 cmp r0, #0
  18386. 8007e20: d0d7 beq.n 8007dd2 <lwip_netconn_do_close+0x1a>
  18387. LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE);
  18388. 8007e22: 6823 ldr r3, [r4, #0]
  18389. 8007e24: 785b ldrb r3, [r3, #1]
  18390. 8007e26: 2b04 cmp r3, #4
  18391. 8007e28: d117 bne.n 8007e5a <lwip_netconn_do_close+0xa2>
  18392. UNLOCK_TCPIP_CORE();
  18393. 8007e2a: f7fb fe63 bl 8003af4 <sys_unlock_tcpip_core>
  18394. sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0);
  18395. 8007e2e: 6820 ldr r0, [r4, #0]
  18396. 8007e30: 2100 movs r1, #0
  18397. 8007e32: 300c adds r0, #12
  18398. 8007e34: f005 f8b3 bl 800cf9e <sys_arch_sem_wait>
  18399. LOCK_TCPIP_CORE();
  18400. 8007e38: f7fb fe4e bl 8003ad8 <sys_lock_tcpip_core>
  18401. LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE);
  18402. 8007e3c: 6823 ldr r3, [r4, #0]
  18403. 8007e3e: 785b ldrb r3, [r3, #1]
  18404. 8007e40: 2b00 cmp r3, #0
  18405. 8007e42: d0c6 beq.n 8007dd2 <lwip_netconn_do_close+0x1a>
  18406. 8007e44: 4b09 ldr r3, [pc, #36] @ (8007e6c <lwip_netconn_do_close+0xb4>)
  18407. 8007e46: f240 72c6 movw r2, #1990 @ 0x7c6
  18408. 8007e4a: 490b ldr r1, [pc, #44] @ (8007e78 <lwip_netconn_do_close+0xc0>)
  18409. 8007e4c: 4809 ldr r0, [pc, #36] @ (8007e74 <lwip_netconn_do_close+0xbc>)
  18410. 8007e4e: f00b fadb bl 8013408 <iprintf>
  18411. return;
  18412. 8007e52: e7be b.n 8007dd2 <lwip_netconn_do_close+0x1a>
  18413. netconn_drain(msg->conn);
  18414. 8007e54: f7ff fd34 bl 80078c0 <netconn_drain>
  18415. 8007e58: e7ce b.n 8007df8 <lwip_netconn_do_close+0x40>
  18416. LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE);
  18417. 8007e5a: 4b04 ldr r3, [pc, #16] @ (8007e6c <lwip_netconn_do_close+0xb4>)
  18418. 8007e5c: f240 72c2 movw r2, #1986 @ 0x7c2
  18419. 8007e60: 4905 ldr r1, [pc, #20] @ (8007e78 <lwip_netconn_do_close+0xc0>)
  18420. 8007e62: 4804 ldr r0, [pc, #16] @ (8007e74 <lwip_netconn_do_close+0xbc>)
  18421. 8007e64: f00b fad0 bl 8013408 <iprintf>
  18422. 8007e68: e7df b.n 8007e2a <lwip_netconn_do_close+0x72>
  18423. 8007e6a: bf00 nop
  18424. 8007e6c: 0801491c .word 0x0801491c
  18425. 8007e70: 08014dcc .word 0x08014dcc
  18426. 8007e74: 080144e8 .word 0x080144e8
  18427. 8007e78: 08014de8 .word 0x08014de8
  18428. 08007e7c <lwip_htons>:
  18429. * @return n in network byte order
  18430. */
  18431. u16_t
  18432. lwip_htons(u16_t n)
  18433. {
  18434. return PP_HTONS(n);
  18435. 8007e7c: 0a03 lsrs r3, r0, #8
  18436. 8007e7e: ea43 2000 orr.w r0, r3, r0, lsl #8
  18437. }
  18438. 8007e82: b280 uxth r0, r0
  18439. 8007e84: 4770 bx lr
  18440. 08007e86 <lwip_htonl>:
  18441. * @return n in network byte order
  18442. */
  18443. u32_t
  18444. lwip_htonl(u32_t n)
  18445. {
  18446. return PP_HTONL(n);
  18447. 8007e86: 0203 lsls r3, r0, #8
  18448. 8007e88: f403 037f and.w r3, r3, #16711680 @ 0xff0000
  18449. 8007e8c: ea43 6300 orr.w r3, r3, r0, lsl #24
  18450. 8007e90: 0a02 lsrs r2, r0, #8
  18451. 8007e92: f402 427f and.w r2, r2, #65280 @ 0xff00
  18452. 8007e96: 4313 orrs r3, r2
  18453. }
  18454. 8007e98: ea43 6010 orr.w r0, r3, r0, lsr #24
  18455. 8007e9c: 4770 bx lr
  18456. 08007e9e <dhcp_set_state>:
  18457. * If the state changed, reset the number of tries.
  18458. */
  18459. static void
  18460. dhcp_set_state(struct dhcp *dhcp, u8_t new_state)
  18461. {
  18462. if (new_state != dhcp->state) {
  18463. 8007e9e: 7943 ldrb r3, [r0, #5]
  18464. 8007ea0: 428b cmp r3, r1
  18465. 8007ea2: d003 beq.n 8007eac <dhcp_set_state+0xe>
  18466. dhcp->state = new_state;
  18467. 8007ea4: 7141 strb r1, [r0, #5]
  18468. dhcp->tries = 0;
  18469. 8007ea6: 2300 movs r3, #0
  18470. 8007ea8: 7183 strb r3, [r0, #6]
  18471. dhcp->request_timeout = 0;
  18472. 8007eaa: 8103 strh r3, [r0, #8]
  18473. }
  18474. }
  18475. 8007eac: 4770 bx lr
  18476. ...
  18477. 08007eb0 <dhcp_option_short>:
  18478. return options_out_len;
  18479. }
  18480. static u16_t
  18481. dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value)
  18482. {
  18483. 8007eb0: b570 push {r4, r5, r6, lr}
  18484. 8007eb2: 4604 mov r4, r0
  18485. 8007eb4: 460d mov r5, r1
  18486. 8007eb6: 4616 mov r6, r2
  18487. LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN);
  18488. 8007eb8: 1c83 adds r3, r0, #2
  18489. 8007eba: 2b44 cmp r3, #68 @ 0x44
  18490. 8007ebc: d807 bhi.n 8007ece <dhcp_option_short+0x1e>
  18491. options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8);
  18492. 8007ebe: 1c63 adds r3, r4, #1
  18493. 8007ec0: b29b uxth r3, r3
  18494. 8007ec2: 0a32 lsrs r2, r6, #8
  18495. 8007ec4: 552a strb r2, [r5, r4]
  18496. options[options_out_len++] = (u8_t) (value & 0x00ffU);
  18497. 8007ec6: 1ca0 adds r0, r4, #2
  18498. 8007ec8: 54ee strb r6, [r5, r3]
  18499. return options_out_len;
  18500. }
  18501. 8007eca: b280 uxth r0, r0
  18502. 8007ecc: bd70 pop {r4, r5, r6, pc}
  18503. LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN);
  18504. 8007ece: 4b04 ldr r3, [pc, #16] @ (8007ee0 <dhcp_option_short+0x30>)
  18505. 8007ed0: f240 52ae movw r2, #1454 @ 0x5ae
  18506. 8007ed4: 4903 ldr r1, [pc, #12] @ (8007ee4 <dhcp_option_short+0x34>)
  18507. 8007ed6: 4804 ldr r0, [pc, #16] @ (8007ee8 <dhcp_option_short+0x38>)
  18508. 8007ed8: f00b fa96 bl 8013408 <iprintf>
  18509. 8007edc: e7ef b.n 8007ebe <dhcp_option_short+0xe>
  18510. 8007ede: bf00 nop
  18511. 8007ee0: 08014e34 .word 0x08014e34
  18512. 8007ee4: 08014e98 .word 0x08014e98
  18513. 8007ee8: 080144e8 .word 0x080144e8
  18514. 08007eec <dhcp_option>:
  18515. {
  18516. 8007eec: b5f8 push {r3, r4, r5, r6, r7, lr}
  18517. 8007eee: 4604 mov r4, r0
  18518. 8007ef0: 460d mov r5, r1
  18519. 8007ef2: 4617 mov r7, r2
  18520. 8007ef4: 461e mov r6, r3
  18521. LWIP_ASSERT("dhcp_option: options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN);
  18522. 8007ef6: 4403 add r3, r0
  18523. 8007ef8: 3302 adds r3, #2
  18524. 8007efa: 2b44 cmp r3, #68 @ 0x44
  18525. 8007efc: d806 bhi.n 8007f0c <dhcp_option+0x20>
  18526. options[options_out_len++] = option_type;
  18527. 8007efe: 1c63 adds r3, r4, #1
  18528. 8007f00: b29b uxth r3, r3
  18529. 8007f02: 552f strb r7, [r5, r4]
  18530. options[options_out_len++] = option_len;
  18531. 8007f04: 1ca0 adds r0, r4, #2
  18532. 8007f06: 54ee strb r6, [r5, r3]
  18533. }
  18534. 8007f08: b280 uxth r0, r0
  18535. 8007f0a: bdf8 pop {r3, r4, r5, r6, r7, pc}
  18536. LWIP_ASSERT("dhcp_option: options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN);
  18537. 8007f0c: 4b03 ldr r3, [pc, #12] @ (8007f1c <dhcp_option+0x30>)
  18538. 8007f0e: f240 529a movw r2, #1434 @ 0x59a
  18539. 8007f12: 4903 ldr r1, [pc, #12] @ (8007f20 <dhcp_option+0x34>)
  18540. 8007f14: 4803 ldr r0, [pc, #12] @ (8007f24 <dhcp_option+0x38>)
  18541. 8007f16: f00b fa77 bl 8013408 <iprintf>
  18542. 8007f1a: e7f0 b.n 8007efe <dhcp_option+0x12>
  18543. 8007f1c: 08014e34 .word 0x08014e34
  18544. 8007f20: 08014ed4 .word 0x08014ed4
  18545. 8007f24: 080144e8 .word 0x080144e8
  18546. 08007f28 <dhcp_option_byte>:
  18547. {
  18548. 8007f28: b570 push {r4, r5, r6, lr}
  18549. 8007f2a: 4604 mov r4, r0
  18550. 8007f2c: 460d mov r5, r1
  18551. 8007f2e: 4616 mov r6, r2
  18552. LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN);
  18553. 8007f30: 2843 cmp r0, #67 @ 0x43
  18554. 8007f32: d803 bhi.n 8007f3c <dhcp_option_byte+0x14>
  18555. options[options_out_len++] = value;
  18556. 8007f34: 1c60 adds r0, r4, #1
  18557. 8007f36: 552e strb r6, [r5, r4]
  18558. }
  18559. 8007f38: b280 uxth r0, r0
  18560. 8007f3a: bd70 pop {r4, r5, r6, pc}
  18561. LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN);
  18562. 8007f3c: 4b03 ldr r3, [pc, #12] @ (8007f4c <dhcp_option_byte+0x24>)
  18563. 8007f3e: f240 52a6 movw r2, #1446 @ 0x5a6
  18564. 8007f42: 4903 ldr r1, [pc, #12] @ (8007f50 <dhcp_option_byte+0x28>)
  18565. 8007f44: 4803 ldr r0, [pc, #12] @ (8007f54 <dhcp_option_byte+0x2c>)
  18566. 8007f46: f00b fa5f bl 8013408 <iprintf>
  18567. 8007f4a: e7f3 b.n 8007f34 <dhcp_option_byte+0xc>
  18568. 8007f4c: 08014e34 .word 0x08014e34
  18569. 8007f50: 08014f18 .word 0x08014f18
  18570. 8007f54: 080144e8 .word 0x080144e8
  18571. 08007f58 <dhcp_option_long>:
  18572. static u16_t
  18573. dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value)
  18574. {
  18575. 8007f58: b570 push {r4, r5, r6, lr}
  18576. 8007f5a: 4604 mov r4, r0
  18577. 8007f5c: 460d mov r5, r1
  18578. 8007f5e: 4616 mov r6, r2
  18579. LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN);
  18580. 8007f60: 1d03 adds r3, r0, #4
  18581. 8007f62: 2b44 cmp r3, #68 @ 0x44
  18582. 8007f64: d811 bhi.n 8007f8a <dhcp_option_long+0x32>
  18583. options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24);
  18584. 8007f66: 1c63 adds r3, r4, #1
  18585. 8007f68: b29b uxth r3, r3
  18586. 8007f6a: 0e32 lsrs r2, r6, #24
  18587. 8007f6c: 552a strb r2, [r5, r4]
  18588. options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16);
  18589. 8007f6e: 1ca2 adds r2, r4, #2
  18590. 8007f70: b292 uxth r2, r2
  18591. 8007f72: f3c6 4107 ubfx r1, r6, #16, #8
  18592. 8007f76: 54e9 strb r1, [r5, r3]
  18593. options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8);
  18594. 8007f78: 1ce3 adds r3, r4, #3
  18595. 8007f7a: b29b uxth r3, r3
  18596. 8007f7c: f3c6 2107 ubfx r1, r6, #8, #8
  18597. 8007f80: 54a9 strb r1, [r5, r2]
  18598. options[options_out_len++] = (u8_t)((value & 0x000000ffUL));
  18599. 8007f82: 1d20 adds r0, r4, #4
  18600. 8007f84: 54ee strb r6, [r5, r3]
  18601. return options_out_len;
  18602. }
  18603. 8007f86: b280 uxth r0, r0
  18604. 8007f88: bd70 pop {r4, r5, r6, pc}
  18605. LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN);
  18606. 8007f8a: 4b04 ldr r3, [pc, #16] @ (8007f9c <dhcp_option_long+0x44>)
  18607. 8007f8c: f240 52b7 movw r2, #1463 @ 0x5b7
  18608. 8007f90: 4903 ldr r1, [pc, #12] @ (8007fa0 <dhcp_option_long+0x48>)
  18609. 8007f92: 4804 ldr r0, [pc, #16] @ (8007fa4 <dhcp_option_long+0x4c>)
  18610. 8007f94: f00b fa38 bl 8013408 <iprintf>
  18611. 8007f98: e7e5 b.n 8007f66 <dhcp_option_long+0xe>
  18612. 8007f9a: bf00 nop
  18613. 8007f9c: 08014e34 .word 0x08014e34
  18614. 8007fa0: 08014f50 .word 0x08014f50
  18615. 8007fa4: 080144e8 .word 0x080144e8
  18616. 08007fa8 <dhcp_create_msg>:
  18617. * @param dhcp dhcp control struct
  18618. * @param message_type message type of the request
  18619. */
  18620. static struct pbuf *
  18621. dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type, u16_t *options_out_len)
  18622. {
  18623. 8007fa8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  18624. if (!xid_initialised) {
  18625. xid = DHCP_GLOBAL_XID;
  18626. xid_initialised = !xid_initialised;
  18627. }
  18628. #endif
  18629. LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return NULL;);
  18630. 8007fac: 4680 mov r8, r0
  18631. 8007fae: 2800 cmp r0, #0
  18632. 8007fb0: d041 beq.n 8008036 <dhcp_create_msg+0x8e>
  18633. 8007fb2: 4689 mov r9, r1
  18634. 8007fb4: 4615 mov r5, r2
  18635. 8007fb6: 461e mov r6, r3
  18636. LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;);
  18637. 8007fb8: 2900 cmp r1, #0
  18638. 8007fba: d045 beq.n 8008048 <dhcp_create_msg+0xa0>
  18639. p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM);
  18640. 8007fbc: f44f 7220 mov.w r2, #640 @ 0x280
  18641. 8007fc0: f44f 719a mov.w r1, #308 @ 0x134
  18642. 8007fc4: 2036 movs r0, #54 @ 0x36
  18643. 8007fc6: f003 ff53 bl 800be70 <pbuf_alloc>
  18644. if (p_out == NULL) {
  18645. 8007fca: 4607 mov r7, r0
  18646. 8007fcc: 2800 cmp r0, #0
  18647. 8007fce: d079 beq.n 80080c4 <dhcp_create_msg+0x11c>
  18648. LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
  18649. ("dhcp_create_msg(): could not allocate pbuf\n"));
  18650. return NULL;
  18651. }
  18652. LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
  18653. 8007fd0: 8943 ldrh r3, [r0, #10]
  18654. 8007fd2: f5b3 7f9a cmp.w r3, #308 @ 0x134
  18655. 8007fd6: d340 bcc.n 800805a <dhcp_create_msg+0xb2>
  18656. (p_out->len >= sizeof(struct dhcp_msg)));
  18657. /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */
  18658. if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) {
  18659. 8007fd8: 2d03 cmp r5, #3
  18660. 8007fda: d046 beq.n 800806a <dhcp_create_msg+0xc2>
  18661. /* reuse transaction identifier in retransmissions */
  18662. if (dhcp->tries == 0) {
  18663. 8007fdc: f899 3006 ldrb.w r3, [r9, #6]
  18664. 8007fe0: 2b00 cmp r3, #0
  18665. 8007fe2: d047 beq.n 8008074 <dhcp_create_msg+0xcc>
  18666. xid = LWIP_RAND();
  18667. #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
  18668. xid++;
  18669. #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
  18670. }
  18671. dhcp->xid = xid;
  18672. 8007fe4: 4b39 ldr r3, [pc, #228] @ (80080cc <dhcp_create_msg+0x124>)
  18673. 8007fe6: 681b ldr r3, [r3, #0]
  18674. 8007fe8: f8c9 3000 str.w r3, [r9]
  18675. }
  18676. LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
  18677. ("transaction id xid(%"X32_F")\n", xid));
  18678. msg_out = (struct dhcp_msg *)p_out->payload;
  18679. 8007fec: 687c ldr r4, [r7, #4]
  18680. memset(msg_out, 0, sizeof(struct dhcp_msg));
  18681. 8007fee: f44f 729a mov.w r2, #308 @ 0x134
  18682. 8007ff2: 2100 movs r1, #0
  18683. 8007ff4: 4620 mov r0, r4
  18684. 8007ff6: f00b fb5f bl 80136b8 <memset>
  18685. msg_out->op = DHCP_BOOTREQUEST;
  18686. 8007ffa: 2301 movs r3, #1
  18687. 8007ffc: 7023 strb r3, [r4, #0]
  18688. /* @todo: make link layer independent */
  18689. msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET;
  18690. 8007ffe: 7063 strb r3, [r4, #1]
  18691. msg_out->hlen = netif->hwaddr_len;
  18692. 8008000: f898 3030 ldrb.w r3, [r8, #48] @ 0x30
  18693. 8008004: 70a3 strb r3, [r4, #2]
  18694. msg_out->xid = lwip_htonl(dhcp->xid);
  18695. 8008006: f8d9 0000 ldr.w r0, [r9]
  18696. 800800a: f7ff ff3c bl 8007e86 <lwip_htonl>
  18697. 800800e: 6060 str r0, [r4, #4]
  18698. /* we don't need the broadcast flag since we can receive unicast traffic
  18699. before being fully configured! */
  18700. /* set ciaddr to netif->ip_addr based on message_type and state */
  18701. if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || (message_type == DHCP_RELEASE) ||
  18702. 8008010: 2d04 cmp r5, #4
  18703. 8008012: bf18 it ne
  18704. 8008014: 2d08 cmpne r5, #8
  18705. 8008016: d009 beq.n 800802c <dhcp_create_msg+0x84>
  18706. 8008018: 2d07 cmp r5, #7
  18707. 800801a: d007 beq.n 800802c <dhcp_create_msg+0x84>
  18708. 800801c: 2d03 cmp r5, #3
  18709. 800801e: d108 bne.n 8008032 <dhcp_create_msg+0x8a>
  18710. ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
  18711. ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) {
  18712. 8008020: f899 3005 ldrb.w r3, [r9, #5]
  18713. 8008024: 3b04 subs r3, #4
  18714. 8008026: b2db uxtb r3, r3
  18715. ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */
  18716. 8008028: 2b01 cmp r3, #1
  18717. 800802a: d802 bhi.n 8008032 <dhcp_create_msg+0x8a>
  18718. ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif));
  18719. 800802c: f8d8 3004 ldr.w r3, [r8, #4]
  18720. 8008030: 60e3 str r3, [r4, #12]
  18721. {
  18722. 8008032: 2000 movs r0, #0
  18723. 8008034: e02b b.n 800808e <dhcp_create_msg+0xe6>
  18724. LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return NULL;);
  18725. 8008036: 4b26 ldr r3, [pc, #152] @ (80080d0 <dhcp_create_msg+0x128>)
  18726. 8008038: f240 7269 movw r2, #1897 @ 0x769
  18727. 800803c: 4925 ldr r1, [pc, #148] @ (80080d4 <dhcp_create_msg+0x12c>)
  18728. 800803e: 4826 ldr r0, [pc, #152] @ (80080d8 <dhcp_create_msg+0x130>)
  18729. 8008040: f00b f9e2 bl 8013408 <iprintf>
  18730. 8008044: 4647 mov r7, r8
  18731. 8008046: e03d b.n 80080c4 <dhcp_create_msg+0x11c>
  18732. LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;);
  18733. 8008048: 4b21 ldr r3, [pc, #132] @ (80080d0 <dhcp_create_msg+0x128>)
  18734. 800804a: f240 726a movw r2, #1898 @ 0x76a
  18735. 800804e: 4923 ldr r1, [pc, #140] @ (80080dc <dhcp_create_msg+0x134>)
  18736. 8008050: 4821 ldr r0, [pc, #132] @ (80080d8 <dhcp_create_msg+0x130>)
  18737. 8008052: f00b f9d9 bl 8013408 <iprintf>
  18738. 8008056: 464f mov r7, r9
  18739. 8008058: e034 b.n 80080c4 <dhcp_create_msg+0x11c>
  18740. LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
  18741. 800805a: 4b1d ldr r3, [pc, #116] @ (80080d0 <dhcp_create_msg+0x128>)
  18742. 800805c: f240 7271 movw r2, #1905 @ 0x771
  18743. 8008060: 491f ldr r1, [pc, #124] @ (80080e0 <dhcp_create_msg+0x138>)
  18744. 8008062: 481d ldr r0, [pc, #116] @ (80080d8 <dhcp_create_msg+0x130>)
  18745. 8008064: f00b f9d0 bl 8013408 <iprintf>
  18746. 8008068: e7b6 b.n 8007fd8 <dhcp_create_msg+0x30>
  18747. if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) {
  18748. 800806a: f899 3005 ldrb.w r3, [r9, #5]
  18749. 800806e: 2b03 cmp r3, #3
  18750. 8008070: d1bc bne.n 8007fec <dhcp_create_msg+0x44>
  18751. 8008072: e7b3 b.n 8007fdc <dhcp_create_msg+0x34>
  18752. xid = LWIP_RAND();
  18753. 8008074: f00b f81c bl 80130b0 <rand>
  18754. 8008078: 4b14 ldr r3, [pc, #80] @ (80080cc <dhcp_create_msg+0x124>)
  18755. 800807a: 6018 str r0, [r3, #0]
  18756. 800807c: e7b2 b.n 8007fe4 <dhcp_create_msg+0x3c>
  18757. }
  18758. for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
  18759. /* copy netif hardware address (padded with zeroes through memset already) */
  18760. msg_out->chaddr[i] = netif->hwaddr[i];
  18761. 800807e: eb08 0300 add.w r3, r8, r0
  18762. 8008082: f893 302a ldrb.w r3, [r3, #42] @ 0x2a
  18763. 8008086: 1821 adds r1, r4, r0
  18764. 8008088: 770b strb r3, [r1, #28]
  18765. for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
  18766. 800808a: 3001 adds r0, #1
  18767. 800808c: b280 uxth r0, r0
  18768. 800808e: 2805 cmp r0, #5
  18769. 8008090: d9f5 bls.n 800807e <dhcp_create_msg+0xd6>
  18770. }
  18771. msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE);
  18772. 8008092: 2363 movs r3, #99 @ 0x63
  18773. 8008094: f884 30ec strb.w r3, [r4, #236] @ 0xec
  18774. 8008098: f06f 027d mvn.w r2, #125 @ 0x7d
  18775. 800809c: f884 20ed strb.w r2, [r4, #237] @ 0xed
  18776. 80080a0: 2253 movs r2, #83 @ 0x53
  18777. 80080a2: f884 20ee strb.w r2, [r4, #238] @ 0xee
  18778. 80080a6: f884 30ef strb.w r3, [r4, #239] @ 0xef
  18779. /* Add option MESSAGE_TYPE */
  18780. options_out_len_loc = dhcp_option(0, msg_out->options, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN);
  18781. 80080aa: 34f0 adds r4, #240 @ 0xf0
  18782. 80080ac: 2301 movs r3, #1
  18783. 80080ae: 2235 movs r2, #53 @ 0x35
  18784. 80080b0: 4621 mov r1, r4
  18785. 80080b2: 2000 movs r0, #0
  18786. 80080b4: f7ff ff1a bl 8007eec <dhcp_option>
  18787. options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type);
  18788. 80080b8: 462a mov r2, r5
  18789. 80080ba: 4621 mov r1, r4
  18790. 80080bc: f7ff ff34 bl 8007f28 <dhcp_option_byte>
  18791. if (options_out_len) {
  18792. 80080c0: b106 cbz r6, 80080c4 <dhcp_create_msg+0x11c>
  18793. *options_out_len = options_out_len_loc;
  18794. 80080c2: 8030 strh r0, [r6, #0]
  18795. }
  18796. return p_out;
  18797. }
  18798. 80080c4: 4638 mov r0, r7
  18799. 80080c6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  18800. 80080ca: bf00 nop
  18801. 80080cc: 24012ef4 .word 0x24012ef4
  18802. 80080d0: 08014e34 .word 0x08014e34
  18803. 80080d4: 08014f8c .word 0x08014f8c
  18804. 80080d8: 080144e8 .word 0x080144e8
  18805. 80080dc: 08014fac .word 0x08014fac
  18806. 80080e0: 08014fcc .word 0x08014fcc
  18807. 080080e4 <dhcp_handle_ack>:
  18808. {
  18809. 80080e4: b510 push {r4, lr}
  18810. struct dhcp *dhcp = netif_dhcp_data(netif);
  18811. 80080e6: 6a44 ldr r4, [r0, #36] @ 0x24
  18812. ip4_addr_set_zero(&dhcp->offered_sn_mask);
  18813. 80080e8: 2300 movs r3, #0
  18814. 80080ea: 6223 str r3, [r4, #32]
  18815. ip4_addr_set_zero(&dhcp->offered_gw_addr);
  18816. 80080ec: 6263 str r3, [r4, #36] @ 0x24
  18817. if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) {
  18818. 80080ee: 4b1a ldr r3, [pc, #104] @ (8008158 <dhcp_handle_ack+0x74>)
  18819. 80080f0: 78db ldrb r3, [r3, #3]
  18820. 80080f2: b113 cbz r3, 80080fa <dhcp_handle_ack+0x16>
  18821. dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME);
  18822. 80080f4: 4b19 ldr r3, [pc, #100] @ (800815c <dhcp_handle_ack+0x78>)
  18823. 80080f6: 68db ldr r3, [r3, #12]
  18824. 80080f8: 62a3 str r3, [r4, #40] @ 0x28
  18825. if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) {
  18826. 80080fa: 4b17 ldr r3, [pc, #92] @ (8008158 <dhcp_handle_ack+0x74>)
  18827. 80080fc: 791b ldrb r3, [r3, #4]
  18828. 80080fe: b19b cbz r3, 8008128 <dhcp_handle_ack+0x44>
  18829. dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1);
  18830. 8008100: 4b16 ldr r3, [pc, #88] @ (800815c <dhcp_handle_ack+0x78>)
  18831. 8008102: 691b ldr r3, [r3, #16]
  18832. 8008104: 62e3 str r3, [r4, #44] @ 0x2c
  18833. if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) {
  18834. 8008106: 4b14 ldr r3, [pc, #80] @ (8008158 <dhcp_handle_ack+0x74>)
  18835. 8008108: 795b ldrb r3, [r3, #5]
  18836. 800810a: b18b cbz r3, 8008130 <dhcp_handle_ack+0x4c>
  18837. dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2);
  18838. 800810c: 4b13 ldr r3, [pc, #76] @ (800815c <dhcp_handle_ack+0x78>)
  18839. 800810e: 695b ldr r3, [r3, #20]
  18840. 8008110: 6323 str r3, [r4, #48] @ 0x30
  18841. ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
  18842. 8008112: 690b ldr r3, [r1, #16]
  18843. 8008114: 61e3 str r3, [r4, #28]
  18844. if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) {
  18845. 8008116: 4b10 ldr r3, [pc, #64] @ (8008158 <dhcp_handle_ack+0x74>)
  18846. 8008118: 799b ldrb r3, [r3, #6]
  18847. 800811a: b97b cbnz r3, 800813c <dhcp_handle_ack+0x58>
  18848. dhcp->subnet_mask_given = 0;
  18849. 800811c: 2300 movs r3, #0
  18850. 800811e: 71e3 strb r3, [r4, #7]
  18851. if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) {
  18852. 8008120: 4b0d ldr r3, [pc, #52] @ (8008158 <dhcp_handle_ack+0x74>)
  18853. 8008122: 79db ldrb r3, [r3, #7]
  18854. 8008124: b993 cbnz r3, 800814c <dhcp_handle_ack+0x68>
  18855. }
  18856. 8008126: bd10 pop {r4, pc}
  18857. dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2;
  18858. 8008128: 6aa3 ldr r3, [r4, #40] @ 0x28
  18859. 800812a: 085b lsrs r3, r3, #1
  18860. 800812c: 62e3 str r3, [r4, #44] @ 0x2c
  18861. 800812e: e7ea b.n 8008106 <dhcp_handle_ack+0x22>
  18862. dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U;
  18863. 8008130: 6aa3 ldr r3, [r4, #40] @ 0x28
  18864. 8008132: ebc3 03c3 rsb r3, r3, r3, lsl #3
  18865. 8008136: 08db lsrs r3, r3, #3
  18866. 8008138: 6323 str r3, [r4, #48] @ 0x30
  18867. 800813a: e7ea b.n 8008112 <dhcp_handle_ack+0x2e>
  18868. ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)));
  18869. 800813c: 4b07 ldr r3, [pc, #28] @ (800815c <dhcp_handle_ack+0x78>)
  18870. 800813e: 6998 ldr r0, [r3, #24]
  18871. 8008140: f7ff fea1 bl 8007e86 <lwip_htonl>
  18872. 8008144: 6220 str r0, [r4, #32]
  18873. dhcp->subnet_mask_given = 1;
  18874. 8008146: 2301 movs r3, #1
  18875. 8008148: 71e3 strb r3, [r4, #7]
  18876. 800814a: e7e9 b.n 8008120 <dhcp_handle_ack+0x3c>
  18877. ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER)));
  18878. 800814c: 4b03 ldr r3, [pc, #12] @ (800815c <dhcp_handle_ack+0x78>)
  18879. 800814e: 69d8 ldr r0, [r3, #28]
  18880. 8008150: f7ff fe99 bl 8007e86 <lwip_htonl>
  18881. 8008154: 6260 str r0, [r4, #36] @ 0x24
  18882. }
  18883. 8008156: e7e6 b.n 8008126 <dhcp_handle_ack+0x42>
  18884. 8008158: 24012f00 .word 0x24012f00
  18885. 800815c: 24012f08 .word 0x24012f08
  18886. 08008160 <dhcp_option_trailer>:
  18887. * Adds the END option to the DHCP message, and if
  18888. * necessary, up to three padding bytes.
  18889. */
  18890. static void
  18891. dhcp_option_trailer(u16_t options_out_len, u8_t *options, struct pbuf *p_out)
  18892. {
  18893. 8008160: b508 push {r3, lr}
  18894. 8008162: 4684 mov ip, r0
  18895. 8008164: 4610 mov r0, r2
  18896. options[options_out_len++] = DHCP_OPTION_END;
  18897. 8008166: f10c 0301 add.w r3, ip, #1
  18898. 800816a: b29b uxth r3, r3
  18899. 800816c: 22ff movs r2, #255 @ 0xff
  18900. 800816e: f801 200c strb.w r2, [r1, ip]
  18901. /* packet is too small, or not 4 byte aligned? */
  18902. while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
  18903. 8008172: e007 b.n 8008184 <dhcp_option_trailer+0x24>
  18904. (options_out_len < DHCP_OPTIONS_LEN)) {
  18905. /* add a fill/padding byte */
  18906. options[options_out_len++] = 0;
  18907. 8008174: f103 0c01 add.w ip, r3, #1
  18908. 8008178: f04f 0e00 mov.w lr, #0
  18909. 800817c: f801 e003 strb.w lr, [r1, r3]
  18910. 8008180: fa1f f38c uxth.w r3, ip
  18911. while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) &&
  18912. 8008184: 2b43 cmp r3, #67 @ 0x43
  18913. 8008186: d9f5 bls.n 8008174 <dhcp_option_trailer+0x14>
  18914. }
  18915. /* shrink the pbuf to the actual content length */
  18916. pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + options_out_len));
  18917. 8008188: f103 01f0 add.w r1, r3, #240 @ 0xf0
  18918. 800818c: b289 uxth r1, r1
  18919. 800818e: f003 ff1d bl 800bfcc <pbuf_realloc>
  18920. }
  18921. 8008192: bd08 pop {r3, pc}
  18922. 08008194 <dhcp_rebind>:
  18923. {
  18924. 8008194: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  18925. 8008198: b084 sub sp, #16
  18926. 800819a: 4607 mov r7, r0
  18927. struct dhcp *dhcp = netif_dhcp_data(netif);
  18928. 800819c: 6a45 ldr r5, [r0, #36] @ 0x24
  18929. dhcp_set_state(dhcp, DHCP_STATE_REBINDING);
  18930. 800819e: 2104 movs r1, #4
  18931. 80081a0: 4628 mov r0, r5
  18932. 80081a2: f7ff fe7c bl 8007e9e <dhcp_set_state>
  18933. p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
  18934. 80081a6: f10d 030e add.w r3, sp, #14
  18935. 80081aa: 2203 movs r2, #3
  18936. 80081ac: 4629 mov r1, r5
  18937. 80081ae: 4638 mov r0, r7
  18938. 80081b0: f7ff fefa bl 8007fa8 <dhcp_create_msg>
  18939. if (p_out != NULL) {
  18940. 80081b4: 2800 cmp r0, #0
  18941. 80081b6: d048 beq.n 800824a <dhcp_rebind+0xb6>
  18942. 80081b8: 4680 mov r8, r0
  18943. struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
  18944. 80081ba: 6846 ldr r6, [r0, #4]
  18945. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
  18946. 80081bc: 36f0 adds r6, #240 @ 0xf0
  18947. 80081be: 2302 movs r3, #2
  18948. 80081c0: 2239 movs r2, #57 @ 0x39
  18949. 80081c2: 4631 mov r1, r6
  18950. 80081c4: f8bd 000e ldrh.w r0, [sp, #14]
  18951. 80081c8: f7ff fe90 bl 8007eec <dhcp_option>
  18952. 80081cc: f8ad 000e strh.w r0, [sp, #14]
  18953. options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
  18954. 80081d0: 8d3a ldrh r2, [r7, #40] @ 0x28
  18955. 80081d2: 4631 mov r1, r6
  18956. 80081d4: f7ff fe6c bl 8007eb0 <dhcp_option_short>
  18957. 80081d8: f8ad 000e strh.w r0, [sp, #14]
  18958. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
  18959. 80081dc: 2303 movs r3, #3
  18960. 80081de: 2237 movs r2, #55 @ 0x37
  18961. 80081e0: 4631 mov r1, r6
  18962. 80081e2: f7ff fe83 bl 8007eec <dhcp_option>
  18963. 80081e6: f8ad 000e strh.w r0, [sp, #14]
  18964. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  18965. 80081ea: 2400 movs r4, #0
  18966. 80081ec: e00a b.n 8008204 <dhcp_rebind+0x70>
  18967. options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
  18968. 80081ee: 4b20 ldr r3, [pc, #128] @ (8008270 <dhcp_rebind+0xdc>)
  18969. 80081f0: 5d1a ldrb r2, [r3, r4]
  18970. 80081f2: 4631 mov r1, r6
  18971. 80081f4: f8bd 000e ldrh.w r0, [sp, #14]
  18972. 80081f8: f7ff fe96 bl 8007f28 <dhcp_option_byte>
  18973. 80081fc: f8ad 000e strh.w r0, [sp, #14]
  18974. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  18975. 8008200: 3401 adds r4, #1
  18976. 8008202: b2e4 uxtb r4, r4
  18977. 8008204: 2c02 cmp r4, #2
  18978. 8008206: d9f2 bls.n 80081ee <dhcp_rebind+0x5a>
  18979. dhcp_option_trailer(options_out_len, msg_out->options, p_out);
  18980. 8008208: 4642 mov r2, r8
  18981. 800820a: 4631 mov r1, r6
  18982. 800820c: f8bd 000e ldrh.w r0, [sp, #14]
  18983. 8008210: f7ff ffa6 bl 8008160 <dhcp_option_trailer>
  18984. result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
  18985. 8008214: 9700 str r7, [sp, #0]
  18986. 8008216: 2343 movs r3, #67 @ 0x43
  18987. 8008218: 4a16 ldr r2, [pc, #88] @ (8008274 <dhcp_rebind+0xe0>)
  18988. 800821a: 4641 mov r1, r8
  18989. 800821c: 4816 ldr r0, [pc, #88] @ (8008278 <dhcp_rebind+0xe4>)
  18990. 800821e: 6800 ldr r0, [r0, #0]
  18991. 8008220: f009 fcfc bl 8011c1c <udp_sendto_if>
  18992. 8008224: 4604 mov r4, r0
  18993. pbuf_free(p_out);
  18994. 8008226: 4640 mov r0, r8
  18995. 8008228: f003 fdba bl 800bda0 <pbuf_free>
  18996. if (dhcp->tries < 255) {
  18997. 800822c: 79ab ldrb r3, [r5, #6]
  18998. 800822e: 2bff cmp r3, #255 @ 0xff
  18999. 8008230: d001 beq.n 8008236 <dhcp_rebind+0xa2>
  19000. dhcp->tries++;
  19001. 8008232: 3301 adds r3, #1
  19002. 8008234: 71ab strb r3, [r5, #6]
  19003. msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
  19004. 8008236: 79ab ldrb r3, [r5, #6]
  19005. 8008238: 2b09 cmp r3, #9
  19006. 800823a: d809 bhi.n 8008250 <dhcp_rebind+0xbc>
  19007. 800823c: ebc3 1243 rsb r2, r3, r3, lsl #5
  19008. 8008240: eb03 0382 add.w r3, r3, r2, lsl #2
  19009. 8008244: 00db lsls r3, r3, #3
  19010. 8008246: b29b uxth r3, r3
  19011. 8008248: e004 b.n 8008254 <dhcp_rebind+0xc0>
  19012. result = ERR_MEM;
  19013. 800824a: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  19014. 800824e: e7ed b.n 800822c <dhcp_rebind+0x98>
  19015. msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
  19016. 8008250: f242 7310 movw r3, #10000 @ 0x2710
  19017. dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
  19018. 8008254: f203 13f3 addw r3, r3, #499 @ 0x1f3
  19019. 8008258: 4a08 ldr r2, [pc, #32] @ (800827c <dhcp_rebind+0xe8>)
  19020. 800825a: fb82 1203 smull r1, r2, r2, r3
  19021. 800825e: 17db asrs r3, r3, #31
  19022. 8008260: ebc3 1362 rsb r3, r3, r2, asr #5
  19023. 8008264: 812b strh r3, [r5, #8]
  19024. }
  19025. 8008266: 4620 mov r0, r4
  19026. 8008268: b004 add sp, #16
  19027. 800826a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  19028. 800826e: bf00 nop
  19029. 8008270: 080151c8 .word 0x080151c8
  19030. 8008274: 080156d4 .word 0x080156d4
  19031. 8008278: 24012efc .word 0x24012efc
  19032. 800827c: 10624dd3 .word 0x10624dd3
  19033. 08008280 <dhcp_t2_timeout>:
  19034. {
  19035. 8008280: b510 push {r4, lr}
  19036. struct dhcp *dhcp = netif_dhcp_data(netif);
  19037. 8008282: 6a44 ldr r4, [r0, #36] @ 0x24
  19038. if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
  19039. 8008284: 7963 ldrb r3, [r4, #5]
  19040. 8008286: 2b0a cmp r3, #10
  19041. 8008288: bf18 it ne
  19042. 800828a: 2b01 cmpne r3, #1
  19043. 800828c: d003 beq.n 8008296 <dhcp_t2_timeout+0x16>
  19044. 800828e: 2b05 cmp r3, #5
  19045. 8008290: d001 beq.n 8008296 <dhcp_t2_timeout+0x16>
  19046. (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) {
  19047. 8008292: 2b04 cmp r3, #4
  19048. 8008294: d10c bne.n 80082b0 <dhcp_t2_timeout+0x30>
  19049. dhcp_rebind(netif);
  19050. 8008296: f7ff ff7d bl 8008194 <dhcp_rebind>
  19051. if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
  19052. 800829a: 8aa3 ldrh r3, [r4, #20]
  19053. 800829c: 8a62 ldrh r2, [r4, #18]
  19054. 800829e: 1a9b subs r3, r3, r2
  19055. 80082a0: 2b01 cmp r3, #1
  19056. 80082a2: dd05 ble.n 80082b0 <dhcp_t2_timeout+0x30>
  19057. dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2);
  19058. 80082a4: 461a mov r2, r3
  19059. 80082a6: 2b00 cmp r3, #0
  19060. 80082a8: db03 blt.n 80082b2 <dhcp_t2_timeout+0x32>
  19061. 80082aa: f3c2 024f ubfx r2, r2, #1, #16
  19062. 80082ae: 8222 strh r2, [r4, #16]
  19063. }
  19064. 80082b0: bd10 pop {r4, pc}
  19065. dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2);
  19066. 80082b2: 1c5a adds r2, r3, #1
  19067. 80082b4: e7f9 b.n 80082aa <dhcp_t2_timeout+0x2a>
  19068. ...
  19069. 080082b8 <dhcp_reboot>:
  19070. {
  19071. 80082b8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  19072. 80082bc: b084 sub sp, #16
  19073. 80082be: 4607 mov r7, r0
  19074. struct dhcp *dhcp = netif_dhcp_data(netif);
  19075. 80082c0: 6a45 ldr r5, [r0, #36] @ 0x24
  19076. dhcp_set_state(dhcp, DHCP_STATE_REBOOTING);
  19077. 80082c2: 2103 movs r1, #3
  19078. 80082c4: 4628 mov r0, r5
  19079. 80082c6: f7ff fdea bl 8007e9e <dhcp_set_state>
  19080. p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
  19081. 80082ca: f10d 030e add.w r3, sp, #14
  19082. 80082ce: 2203 movs r2, #3
  19083. 80082d0: 4629 mov r1, r5
  19084. 80082d2: 4638 mov r0, r7
  19085. 80082d4: f7ff fe68 bl 8007fa8 <dhcp_create_msg>
  19086. if (p_out != NULL) {
  19087. 80082d8: 2800 cmp r0, #0
  19088. 80082da: d05b beq.n 8008394 <dhcp_reboot+0xdc>
  19089. 80082dc: 4680 mov r8, r0
  19090. struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
  19091. 80082de: 6846 ldr r6, [r0, #4]
  19092. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
  19093. 80082e0: 36f0 adds r6, #240 @ 0xf0
  19094. 80082e2: 2302 movs r3, #2
  19095. 80082e4: 2239 movs r2, #57 @ 0x39
  19096. 80082e6: 4631 mov r1, r6
  19097. 80082e8: f8bd 000e ldrh.w r0, [sp, #14]
  19098. 80082ec: f7ff fdfe bl 8007eec <dhcp_option>
  19099. 80082f0: f8ad 000e strh.w r0, [sp, #14]
  19100. options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED);
  19101. 80082f4: f44f 7210 mov.w r2, #576 @ 0x240
  19102. 80082f8: 4631 mov r1, r6
  19103. 80082fa: f7ff fdd9 bl 8007eb0 <dhcp_option_short>
  19104. 80082fe: f8ad 000e strh.w r0, [sp, #14]
  19105. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
  19106. 8008302: 2304 movs r3, #4
  19107. 8008304: 2232 movs r2, #50 @ 0x32
  19108. 8008306: 4631 mov r1, r6
  19109. 8008308: f7ff fdf0 bl 8007eec <dhcp_option>
  19110. 800830c: 4604 mov r4, r0
  19111. 800830e: f8ad 000e strh.w r0, [sp, #14]
  19112. options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
  19113. 8008312: 69e8 ldr r0, [r5, #28]
  19114. 8008314: f7ff fdb7 bl 8007e86 <lwip_htonl>
  19115. 8008318: 4602 mov r2, r0
  19116. 800831a: 4631 mov r1, r6
  19117. 800831c: 4620 mov r0, r4
  19118. 800831e: f7ff fe1b bl 8007f58 <dhcp_option_long>
  19119. 8008322: f8ad 000e strh.w r0, [sp, #14]
  19120. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
  19121. 8008326: 2303 movs r3, #3
  19122. 8008328: 2237 movs r2, #55 @ 0x37
  19123. 800832a: 4631 mov r1, r6
  19124. 800832c: f7ff fdde bl 8007eec <dhcp_option>
  19125. 8008330: f8ad 000e strh.w r0, [sp, #14]
  19126. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  19127. 8008334: 2400 movs r4, #0
  19128. 8008336: e00a b.n 800834e <dhcp_reboot+0x96>
  19129. options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
  19130. 8008338: 4b1f ldr r3, [pc, #124] @ (80083b8 <dhcp_reboot+0x100>)
  19131. 800833a: 5d1a ldrb r2, [r3, r4]
  19132. 800833c: 4631 mov r1, r6
  19133. 800833e: f8bd 000e ldrh.w r0, [sp, #14]
  19134. 8008342: f7ff fdf1 bl 8007f28 <dhcp_option_byte>
  19135. 8008346: f8ad 000e strh.w r0, [sp, #14]
  19136. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  19137. 800834a: 3401 adds r4, #1
  19138. 800834c: b2e4 uxtb r4, r4
  19139. 800834e: 2c02 cmp r4, #2
  19140. 8008350: d9f2 bls.n 8008338 <dhcp_reboot+0x80>
  19141. dhcp_option_trailer(options_out_len, msg_out->options, p_out);
  19142. 8008352: 4642 mov r2, r8
  19143. 8008354: 4631 mov r1, r6
  19144. 8008356: f8bd 000e ldrh.w r0, [sp, #14]
  19145. 800835a: f7ff ff01 bl 8008160 <dhcp_option_trailer>
  19146. result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif);
  19147. 800835e: 9700 str r7, [sp, #0]
  19148. 8008360: 2343 movs r3, #67 @ 0x43
  19149. 8008362: 4a16 ldr r2, [pc, #88] @ (80083bc <dhcp_reboot+0x104>)
  19150. 8008364: 4641 mov r1, r8
  19151. 8008366: 4816 ldr r0, [pc, #88] @ (80083c0 <dhcp_reboot+0x108>)
  19152. 8008368: 6800 ldr r0, [r0, #0]
  19153. 800836a: f009 fc57 bl 8011c1c <udp_sendto_if>
  19154. 800836e: 4604 mov r4, r0
  19155. pbuf_free(p_out);
  19156. 8008370: 4640 mov r0, r8
  19157. 8008372: f003 fd15 bl 800bda0 <pbuf_free>
  19158. if (dhcp->tries < 255) {
  19159. 8008376: 79ab ldrb r3, [r5, #6]
  19160. 8008378: 2bff cmp r3, #255 @ 0xff
  19161. 800837a: d001 beq.n 8008380 <dhcp_reboot+0xc8>
  19162. dhcp->tries++;
  19163. 800837c: 3301 adds r3, #1
  19164. 800837e: 71ab strb r3, [r5, #6]
  19165. msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
  19166. 8008380: 79ab ldrb r3, [r5, #6]
  19167. 8008382: 2b09 cmp r3, #9
  19168. 8008384: d809 bhi.n 800839a <dhcp_reboot+0xe2>
  19169. 8008386: ebc3 1243 rsb r2, r3, r3, lsl #5
  19170. 800838a: eb03 0382 add.w r3, r3, r2, lsl #2
  19171. 800838e: 00db lsls r3, r3, #3
  19172. 8008390: b29b uxth r3, r3
  19173. 8008392: e004 b.n 800839e <dhcp_reboot+0xe6>
  19174. result = ERR_MEM;
  19175. 8008394: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  19176. 8008398: e7ed b.n 8008376 <dhcp_reboot+0xbe>
  19177. msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000);
  19178. 800839a: f242 7310 movw r3, #10000 @ 0x2710
  19179. dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
  19180. 800839e: f203 13f3 addw r3, r3, #499 @ 0x1f3
  19181. 80083a2: 4a08 ldr r2, [pc, #32] @ (80083c4 <dhcp_reboot+0x10c>)
  19182. 80083a4: fb82 1203 smull r1, r2, r2, r3
  19183. 80083a8: 17db asrs r3, r3, #31
  19184. 80083aa: ebc3 1362 rsb r3, r3, r2, asr #5
  19185. 80083ae: 812b strh r3, [r5, #8]
  19186. }
  19187. 80083b0: 4620 mov r0, r4
  19188. 80083b2: b004 add sp, #16
  19189. 80083b4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  19190. 80083b8: 080151c8 .word 0x080151c8
  19191. 80083bc: 080156d4 .word 0x080156d4
  19192. 80083c0: 24012efc .word 0x24012efc
  19193. 80083c4: 10624dd3 .word 0x10624dd3
  19194. 080083c8 <dhcp_select>:
  19195. {
  19196. 80083c8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  19197. 80083cc: b084 sub sp, #16
  19198. LWIP_ERROR("dhcp_select: netif != NULL", (netif != NULL), return ERR_ARG;);
  19199. 80083ce: 2800 cmp r0, #0
  19200. 80083d0: d050 beq.n 8008474 <dhcp_select+0xac>
  19201. 80083d2: 4607 mov r7, r0
  19202. dhcp = netif_dhcp_data(netif);
  19203. 80083d4: 6a44 ldr r4, [r0, #36] @ 0x24
  19204. LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;);
  19205. 80083d6: 2c00 cmp r4, #0
  19206. 80083d8: d056 beq.n 8008488 <dhcp_select+0xc0>
  19207. dhcp_set_state(dhcp, DHCP_STATE_REQUESTING);
  19208. 80083da: 2101 movs r1, #1
  19209. 80083dc: 4620 mov r0, r4
  19210. 80083de: f7ff fd5e bl 8007e9e <dhcp_set_state>
  19211. p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
  19212. 80083e2: f10d 030e add.w r3, sp, #14
  19213. 80083e6: 2203 movs r2, #3
  19214. 80083e8: 4621 mov r1, r4
  19215. 80083ea: 4638 mov r0, r7
  19216. 80083ec: f7ff fddc bl 8007fa8 <dhcp_create_msg>
  19217. if (p_out != NULL) {
  19218. 80083f0: 4680 mov r8, r0
  19219. 80083f2: 2800 cmp r0, #0
  19220. 80083f4: f000 8090 beq.w 8008518 <dhcp_select+0x150>
  19221. struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
  19222. 80083f8: 6846 ldr r6, [r0, #4]
  19223. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
  19224. 80083fa: 36f0 adds r6, #240 @ 0xf0
  19225. 80083fc: 2302 movs r3, #2
  19226. 80083fe: 2239 movs r2, #57 @ 0x39
  19227. 8008400: 4631 mov r1, r6
  19228. 8008402: f8bd 000e ldrh.w r0, [sp, #14]
  19229. 8008406: f7ff fd71 bl 8007eec <dhcp_option>
  19230. 800840a: f8ad 000e strh.w r0, [sp, #14]
  19231. options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
  19232. 800840e: 8d3a ldrh r2, [r7, #40] @ 0x28
  19233. 8008410: 4631 mov r1, r6
  19234. 8008412: f7ff fd4d bl 8007eb0 <dhcp_option_short>
  19235. 8008416: f8ad 000e strh.w r0, [sp, #14]
  19236. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
  19237. 800841a: 2304 movs r3, #4
  19238. 800841c: 2232 movs r2, #50 @ 0x32
  19239. 800841e: 4631 mov r1, r6
  19240. 8008420: f7ff fd64 bl 8007eec <dhcp_option>
  19241. 8008424: 4605 mov r5, r0
  19242. 8008426: f8ad 000e strh.w r0, [sp, #14]
  19243. options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
  19244. 800842a: 69e0 ldr r0, [r4, #28]
  19245. 800842c: f7ff fd2b bl 8007e86 <lwip_htonl>
  19246. 8008430: 4602 mov r2, r0
  19247. 8008432: 4631 mov r1, r6
  19248. 8008434: 4628 mov r0, r5
  19249. 8008436: f7ff fd8f bl 8007f58 <dhcp_option_long>
  19250. 800843a: f8ad 000e strh.w r0, [sp, #14]
  19251. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
  19252. 800843e: 2304 movs r3, #4
  19253. 8008440: 2236 movs r2, #54 @ 0x36
  19254. 8008442: 4631 mov r1, r6
  19255. 8008444: f7ff fd52 bl 8007eec <dhcp_option>
  19256. 8008448: 4605 mov r5, r0
  19257. 800844a: f8ad 000e strh.w r0, [sp, #14]
  19258. options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr))));
  19259. 800844e: 69a0 ldr r0, [r4, #24]
  19260. 8008450: f7ff fd19 bl 8007e86 <lwip_htonl>
  19261. 8008454: 4602 mov r2, r0
  19262. 8008456: 4631 mov r1, r6
  19263. 8008458: 4628 mov r0, r5
  19264. 800845a: f7ff fd7d bl 8007f58 <dhcp_option_long>
  19265. 800845e: f8ad 000e strh.w r0, [sp, #14]
  19266. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
  19267. 8008462: 2303 movs r3, #3
  19268. 8008464: 2237 movs r2, #55 @ 0x37
  19269. 8008466: 4631 mov r1, r6
  19270. 8008468: f7ff fd40 bl 8007eec <dhcp_option>
  19271. 800846c: f8ad 000e strh.w r0, [sp, #14]
  19272. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  19273. 8008470: 2500 movs r5, #0
  19274. 8008472: e01e b.n 80084b2 <dhcp_select+0xea>
  19275. LWIP_ERROR("dhcp_select: netif != NULL", (netif != NULL), return ERR_ARG;);
  19276. 8008474: 4b2b ldr r3, [pc, #172] @ (8008524 <dhcp_select+0x15c>)
  19277. 8008476: f240 1277 movw r2, #375 @ 0x177
  19278. 800847a: 492b ldr r1, [pc, #172] @ (8008528 <dhcp_select+0x160>)
  19279. 800847c: 482b ldr r0, [pc, #172] @ (800852c <dhcp_select+0x164>)
  19280. 800847e: f00a ffc3 bl 8013408 <iprintf>
  19281. 8008482: f06f 050f mvn.w r5, #15
  19282. 8008486: e043 b.n 8008510 <dhcp_select+0x148>
  19283. LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;);
  19284. 8008488: 4b26 ldr r3, [pc, #152] @ (8008524 <dhcp_select+0x15c>)
  19285. 800848a: f240 1279 movw r2, #377 @ 0x179
  19286. 800848e: 4928 ldr r1, [pc, #160] @ (8008530 <dhcp_select+0x168>)
  19287. 8008490: 4826 ldr r0, [pc, #152] @ (800852c <dhcp_select+0x164>)
  19288. 8008492: f00a ffb9 bl 8013408 <iprintf>
  19289. 8008496: f06f 0505 mvn.w r5, #5
  19290. 800849a: e039 b.n 8008510 <dhcp_select+0x148>
  19291. options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
  19292. 800849c: 4b25 ldr r3, [pc, #148] @ (8008534 <dhcp_select+0x16c>)
  19293. 800849e: 5d5a ldrb r2, [r3, r5]
  19294. 80084a0: 4631 mov r1, r6
  19295. 80084a2: f8bd 000e ldrh.w r0, [sp, #14]
  19296. 80084a6: f7ff fd3f bl 8007f28 <dhcp_option_byte>
  19297. 80084aa: f8ad 000e strh.w r0, [sp, #14]
  19298. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  19299. 80084ae: 3501 adds r5, #1
  19300. 80084b0: b2ed uxtb r5, r5
  19301. 80084b2: 2d02 cmp r5, #2
  19302. 80084b4: d9f2 bls.n 800849c <dhcp_select+0xd4>
  19303. dhcp_option_trailer(options_out_len, msg_out->options, p_out);
  19304. 80084b6: 4642 mov r2, r8
  19305. 80084b8: 4631 mov r1, r6
  19306. 80084ba: f8bd 000e ldrh.w r0, [sp, #14]
  19307. 80084be: f7ff fe4f bl 8008160 <dhcp_option_trailer>
  19308. result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
  19309. 80084c2: 4b1d ldr r3, [pc, #116] @ (8008538 <dhcp_select+0x170>)
  19310. 80084c4: 9301 str r3, [sp, #4]
  19311. 80084c6: 9700 str r7, [sp, #0]
  19312. 80084c8: 2343 movs r3, #67 @ 0x43
  19313. 80084ca: 4a1c ldr r2, [pc, #112] @ (800853c <dhcp_select+0x174>)
  19314. 80084cc: 4641 mov r1, r8
  19315. 80084ce: 481c ldr r0, [pc, #112] @ (8008540 <dhcp_select+0x178>)
  19316. 80084d0: 6800 ldr r0, [r0, #0]
  19317. 80084d2: f009 fae9 bl 8011aa8 <udp_sendto_if_src>
  19318. 80084d6: 4605 mov r5, r0
  19319. pbuf_free(p_out);
  19320. 80084d8: 4640 mov r0, r8
  19321. 80084da: f003 fc61 bl 800bda0 <pbuf_free>
  19322. if (dhcp->tries < 255) {
  19323. 80084de: 79a3 ldrb r3, [r4, #6]
  19324. 80084e0: 2bff cmp r3, #255 @ 0xff
  19325. 80084e2: d001 beq.n 80084e8 <dhcp_select+0x120>
  19326. dhcp->tries++;
  19327. 80084e4: 3301 adds r3, #1
  19328. 80084e6: 71a3 strb r3, [r4, #6]
  19329. msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
  19330. 80084e8: 79a2 ldrb r2, [r4, #6]
  19331. 80084ea: 2a05 cmp r2, #5
  19332. 80084ec: d817 bhi.n 800851e <dhcp_select+0x156>
  19333. 80084ee: 2301 movs r3, #1
  19334. 80084f0: 4093 lsls r3, r2
  19335. 80084f2: ebc3 1243 rsb r2, r3, r3, lsl #5
  19336. 80084f6: eb03 0382 add.w r3, r3, r2, lsl #2
  19337. 80084fa: 00db lsls r3, r3, #3
  19338. 80084fc: b29b uxth r3, r3
  19339. dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
  19340. 80084fe: f203 13f3 addw r3, r3, #499 @ 0x1f3
  19341. 8008502: 4a10 ldr r2, [pc, #64] @ (8008544 <dhcp_select+0x17c>)
  19342. 8008504: fb82 1203 smull r1, r2, r2, r3
  19343. 8008508: 17db asrs r3, r3, #31
  19344. 800850a: ebc3 1362 rsb r3, r3, r2, asr #5
  19345. 800850e: 8123 strh r3, [r4, #8]
  19346. }
  19347. 8008510: 4628 mov r0, r5
  19348. 8008512: b004 add sp, #16
  19349. 8008514: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  19350. result = ERR_MEM;
  19351. 8008518: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  19352. 800851c: e7df b.n 80084de <dhcp_select+0x116>
  19353. msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
  19354. 800851e: f64e 2360 movw r3, #60000 @ 0xea60
  19355. 8008522: e7ec b.n 80084fe <dhcp_select+0x136>
  19356. 8008524: 08014e34 .word 0x08014e34
  19357. 8008528: 0801500c .word 0x0801500c
  19358. 800852c: 080144e8 .word 0x080144e8
  19359. 8008530: 08015028 .word 0x08015028
  19360. 8008534: 080151c8 .word 0x080151c8
  19361. 8008538: 080156d8 .word 0x080156d8
  19362. 800853c: 080156d4 .word 0x080156d4
  19363. 8008540: 24012efc .word 0x24012efc
  19364. 8008544: 10624dd3 .word 0x10624dd3
  19365. 08008548 <dhcp_handle_offer>:
  19366. {
  19367. 8008548: b570 push {r4, r5, r6, lr}
  19368. struct dhcp *dhcp = netif_dhcp_data(netif);
  19369. 800854a: 6a46 ldr r6, [r0, #36] @ 0x24
  19370. if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) {
  19371. 800854c: 4b09 ldr r3, [pc, #36] @ (8008574 <dhcp_handle_offer+0x2c>)
  19372. 800854e: 789b ldrb r3, [r3, #2]
  19373. 8008550: b903 cbnz r3, 8008554 <dhcp_handle_offer+0xc>
  19374. }
  19375. 8008552: bd70 pop {r4, r5, r6, pc}
  19376. 8008554: 4604 mov r4, r0
  19377. 8008556: 460d mov r5, r1
  19378. dhcp->request_timeout = 0; /* stop timer */
  19379. 8008558: 2300 movs r3, #0
  19380. 800855a: 8133 strh r3, [r6, #8]
  19381. ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID)));
  19382. 800855c: 4b06 ldr r3, [pc, #24] @ (8008578 <dhcp_handle_offer+0x30>)
  19383. 800855e: 6898 ldr r0, [r3, #8]
  19384. 8008560: f7ff fc91 bl 8007e86 <lwip_htonl>
  19385. 8008564: 61b0 str r0, [r6, #24]
  19386. ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr);
  19387. 8008566: 692b ldr r3, [r5, #16]
  19388. 8008568: 61f3 str r3, [r6, #28]
  19389. dhcp_select(netif);
  19390. 800856a: 4620 mov r0, r4
  19391. 800856c: f7ff ff2c bl 80083c8 <dhcp_select>
  19392. }
  19393. 8008570: e7ef b.n 8008552 <dhcp_handle_offer+0xa>
  19394. 8008572: bf00 nop
  19395. 8008574: 24012f00 .word 0x24012f00
  19396. 8008578: 24012f08 .word 0x24012f08
  19397. 0800857c <dhcp_discover>:
  19398. {
  19399. 800857c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  19400. 8008580: b084 sub sp, #16
  19401. 8008582: 4606 mov r6, r0
  19402. struct dhcp *dhcp = netif_dhcp_data(netif);
  19403. 8008584: 6a44 ldr r4, [r0, #36] @ 0x24
  19404. ip4_addr_set_any(&dhcp->offered_ip_addr);
  19405. 8008586: 2300 movs r3, #0
  19406. 8008588: 61e3 str r3, [r4, #28]
  19407. dhcp_set_state(dhcp, DHCP_STATE_SELECTING);
  19408. 800858a: 2106 movs r1, #6
  19409. 800858c: 4620 mov r0, r4
  19410. 800858e: f7ff fc86 bl 8007e9e <dhcp_set_state>
  19411. p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len);
  19412. 8008592: f10d 030e add.w r3, sp, #14
  19413. 8008596: 2201 movs r2, #1
  19414. 8008598: 4621 mov r1, r4
  19415. 800859a: 4630 mov r0, r6
  19416. 800859c: f7ff fd04 bl 8007fa8 <dhcp_create_msg>
  19417. if (p_out != NULL) {
  19418. 80085a0: 2800 cmp r0, #0
  19419. 80085a2: d03a beq.n 800861a <dhcp_discover+0x9e>
  19420. 80085a4: 4680 mov r8, r0
  19421. struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
  19422. 80085a6: 6847 ldr r7, [r0, #4]
  19423. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
  19424. 80085a8: 37f0 adds r7, #240 @ 0xf0
  19425. 80085aa: 2302 movs r3, #2
  19426. 80085ac: 2239 movs r2, #57 @ 0x39
  19427. 80085ae: 4639 mov r1, r7
  19428. 80085b0: f8bd 000e ldrh.w r0, [sp, #14]
  19429. 80085b4: f7ff fc9a bl 8007eec <dhcp_option>
  19430. 80085b8: f8ad 000e strh.w r0, [sp, #14]
  19431. options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
  19432. 80085bc: 8d32 ldrh r2, [r6, #40] @ 0x28
  19433. 80085be: 4639 mov r1, r7
  19434. 80085c0: f7ff fc76 bl 8007eb0 <dhcp_option_short>
  19435. 80085c4: f8ad 000e strh.w r0, [sp, #14]
  19436. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
  19437. 80085c8: 2303 movs r3, #3
  19438. 80085ca: 2237 movs r2, #55 @ 0x37
  19439. 80085cc: 4639 mov r1, r7
  19440. 80085ce: f7ff fc8d bl 8007eec <dhcp_option>
  19441. 80085d2: f8ad 000e strh.w r0, [sp, #14]
  19442. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  19443. 80085d6: 2500 movs r5, #0
  19444. 80085d8: e00a b.n 80085f0 <dhcp_discover+0x74>
  19445. options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
  19446. 80085da: 4b20 ldr r3, [pc, #128] @ (800865c <dhcp_discover+0xe0>)
  19447. 80085dc: 5d5a ldrb r2, [r3, r5]
  19448. 80085de: 4639 mov r1, r7
  19449. 80085e0: f8bd 000e ldrh.w r0, [sp, #14]
  19450. 80085e4: f7ff fca0 bl 8007f28 <dhcp_option_byte>
  19451. 80085e8: f8ad 000e strh.w r0, [sp, #14]
  19452. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  19453. 80085ec: 3501 adds r5, #1
  19454. 80085ee: b2ed uxtb r5, r5
  19455. 80085f0: 2d02 cmp r5, #2
  19456. 80085f2: d9f2 bls.n 80085da <dhcp_discover+0x5e>
  19457. dhcp_option_trailer(options_out_len, msg_out->options, p_out);
  19458. 80085f4: 4642 mov r2, r8
  19459. 80085f6: 4639 mov r1, r7
  19460. 80085f8: f8bd 000e ldrh.w r0, [sp, #14]
  19461. 80085fc: f7ff fdb0 bl 8008160 <dhcp_option_trailer>
  19462. udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
  19463. 8008600: 4b17 ldr r3, [pc, #92] @ (8008660 <dhcp_discover+0xe4>)
  19464. 8008602: 9301 str r3, [sp, #4]
  19465. 8008604: 9600 str r6, [sp, #0]
  19466. 8008606: 2343 movs r3, #67 @ 0x43
  19467. 8008608: 4a16 ldr r2, [pc, #88] @ (8008664 <dhcp_discover+0xe8>)
  19468. 800860a: 4641 mov r1, r8
  19469. 800860c: 4816 ldr r0, [pc, #88] @ (8008668 <dhcp_discover+0xec>)
  19470. 800860e: 6800 ldr r0, [r0, #0]
  19471. 8008610: f009 fa4a bl 8011aa8 <udp_sendto_if_src>
  19472. pbuf_free(p_out);
  19473. 8008614: 4640 mov r0, r8
  19474. 8008616: f003 fbc3 bl 800bda0 <pbuf_free>
  19475. if (dhcp->tries < 255) {
  19476. 800861a: 79a3 ldrb r3, [r4, #6]
  19477. 800861c: 2bff cmp r3, #255 @ 0xff
  19478. 800861e: d001 beq.n 8008624 <dhcp_discover+0xa8>
  19479. dhcp->tries++;
  19480. 8008620: 3301 adds r3, #1
  19481. 8008622: 71a3 strb r3, [r4, #6]
  19482. msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
  19483. 8008624: 79a2 ldrb r2, [r4, #6]
  19484. 8008626: 2a05 cmp r2, #5
  19485. 8008628: d814 bhi.n 8008654 <dhcp_discover+0xd8>
  19486. 800862a: 2301 movs r3, #1
  19487. 800862c: 4093 lsls r3, r2
  19488. 800862e: ebc3 1243 rsb r2, r3, r3, lsl #5
  19489. 8008632: eb03 0382 add.w r3, r3, r2, lsl #2
  19490. 8008636: 00db lsls r3, r3, #3
  19491. 8008638: b29b uxth r3, r3
  19492. dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
  19493. 800863a: f203 13f3 addw r3, r3, #499 @ 0x1f3
  19494. 800863e: 4a0b ldr r2, [pc, #44] @ (800866c <dhcp_discover+0xf0>)
  19495. 8008640: fb82 1203 smull r1, r2, r2, r3
  19496. 8008644: 17db asrs r3, r3, #31
  19497. 8008646: ebc3 1362 rsb r3, r3, r2, asr #5
  19498. 800864a: 8123 strh r3, [r4, #8]
  19499. }
  19500. 800864c: 2000 movs r0, #0
  19501. 800864e: b004 add sp, #16
  19502. 8008650: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  19503. msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000);
  19504. 8008654: f64e 2360 movw r3, #60000 @ 0xea60
  19505. 8008658: e7ef b.n 800863a <dhcp_discover+0xbe>
  19506. 800865a: bf00 nop
  19507. 800865c: 080151c8 .word 0x080151c8
  19508. 8008660: 080156d8 .word 0x080156d8
  19509. 8008664: 080156d4 .word 0x080156d4
  19510. 8008668: 24012efc .word 0x24012efc
  19511. 800866c: 10624dd3 .word 0x10624dd3
  19512. 08008670 <dhcp_decline>:
  19513. {
  19514. 8008670: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  19515. 8008674: b084 sub sp, #16
  19516. 8008676: 4605 mov r5, r0
  19517. struct dhcp *dhcp = netif_dhcp_data(netif);
  19518. 8008678: 6a44 ldr r4, [r0, #36] @ 0x24
  19519. dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF);
  19520. 800867a: 210c movs r1, #12
  19521. 800867c: 4620 mov r0, r4
  19522. 800867e: f7ff fc0e bl 8007e9e <dhcp_set_state>
  19523. p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len);
  19524. 8008682: f10d 030e add.w r3, sp, #14
  19525. 8008686: 2204 movs r2, #4
  19526. 8008688: 4621 mov r1, r4
  19527. 800868a: 4628 mov r0, r5
  19528. 800868c: f7ff fc8c bl 8007fa8 <dhcp_create_msg>
  19529. if (p_out != NULL) {
  19530. 8008690: b398 cbz r0, 80086fa <dhcp_decline+0x8a>
  19531. 8008692: 4607 mov r7, r0
  19532. struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
  19533. 8008694: 6846 ldr r6, [r0, #4]
  19534. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4);
  19535. 8008696: 36f0 adds r6, #240 @ 0xf0
  19536. 8008698: 2304 movs r3, #4
  19537. 800869a: 2232 movs r2, #50 @ 0x32
  19538. 800869c: 4631 mov r1, r6
  19539. 800869e: f8bd 000e ldrh.w r0, [sp, #14]
  19540. 80086a2: f7ff fc23 bl 8007eec <dhcp_option>
  19541. 80086a6: 4680 mov r8, r0
  19542. 80086a8: f8ad 000e strh.w r0, [sp, #14]
  19543. options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr)));
  19544. 80086ac: 69e0 ldr r0, [r4, #28]
  19545. 80086ae: f7ff fbea bl 8007e86 <lwip_htonl>
  19546. 80086b2: 4602 mov r2, r0
  19547. 80086b4: 4631 mov r1, r6
  19548. 80086b6: 4640 mov r0, r8
  19549. 80086b8: f7ff fc4e bl 8007f58 <dhcp_option_long>
  19550. 80086bc: f8ad 000e strh.w r0, [sp, #14]
  19551. dhcp_option_trailer(options_out_len, msg_out->options, p_out);
  19552. 80086c0: 463a mov r2, r7
  19553. 80086c2: 4631 mov r1, r6
  19554. 80086c4: f7ff fd4c bl 8008160 <dhcp_option_trailer>
  19555. result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY);
  19556. 80086c8: 4b0d ldr r3, [pc, #52] @ (8008700 <dhcp_decline+0x90>)
  19557. 80086ca: 9301 str r3, [sp, #4]
  19558. 80086cc: 9500 str r5, [sp, #0]
  19559. 80086ce: 2343 movs r3, #67 @ 0x43
  19560. 80086d0: 4a0c ldr r2, [pc, #48] @ (8008704 <dhcp_decline+0x94>)
  19561. 80086d2: 4639 mov r1, r7
  19562. 80086d4: 480c ldr r0, [pc, #48] @ (8008708 <dhcp_decline+0x98>)
  19563. 80086d6: 6800 ldr r0, [r0, #0]
  19564. 80086d8: f009 f9e6 bl 8011aa8 <udp_sendto_if_src>
  19565. 80086dc: 4605 mov r5, r0
  19566. pbuf_free(p_out);
  19567. 80086de: 4638 mov r0, r7
  19568. 80086e0: f003 fb5e bl 800bda0 <pbuf_free>
  19569. if (dhcp->tries < 255) {
  19570. 80086e4: 79a3 ldrb r3, [r4, #6]
  19571. 80086e6: 2bff cmp r3, #255 @ 0xff
  19572. 80086e8: d001 beq.n 80086ee <dhcp_decline+0x7e>
  19573. dhcp->tries++;
  19574. 80086ea: 3301 adds r3, #1
  19575. 80086ec: 71a3 strb r3, [r4, #6]
  19576. dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
  19577. 80086ee: 2314 movs r3, #20
  19578. 80086f0: 8123 strh r3, [r4, #8]
  19579. }
  19580. 80086f2: 4628 mov r0, r5
  19581. 80086f4: b004 add sp, #16
  19582. 80086f6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  19583. result = ERR_MEM;
  19584. 80086fa: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  19585. 80086fe: e7f1 b.n 80086e4 <dhcp_decline+0x74>
  19586. 8008700: 080156d8 .word 0x080156d8
  19587. 8008704: 080156d4 .word 0x080156d4
  19588. 8008708: 24012efc .word 0x24012efc
  19589. 0800870c <dhcp_check>:
  19590. {
  19591. 800870c: b538 push {r3, r4, r5, lr}
  19592. 800870e: 4605 mov r5, r0
  19593. struct dhcp *dhcp = netif_dhcp_data(netif);
  19594. 8008710: 6a44 ldr r4, [r0, #36] @ 0x24
  19595. dhcp_set_state(dhcp, DHCP_STATE_CHECKING);
  19596. 8008712: 2108 movs r1, #8
  19597. 8008714: 4620 mov r0, r4
  19598. 8008716: f7ff fbc2 bl 8007e9e <dhcp_set_state>
  19599. result = etharp_query(netif, &dhcp->offered_ip_addr, NULL);
  19600. 800871a: 2200 movs r2, #0
  19601. 800871c: f104 011c add.w r1, r4, #28
  19602. 8008720: 4628 mov r0, r5
  19603. 8008722: f001 f935 bl 8009990 <etharp_query>
  19604. if (dhcp->tries < 255) {
  19605. 8008726: 79a3 ldrb r3, [r4, #6]
  19606. 8008728: 2bff cmp r3, #255 @ 0xff
  19607. 800872a: d001 beq.n 8008730 <dhcp_check+0x24>
  19608. dhcp->tries++;
  19609. 800872c: 3301 adds r3, #1
  19610. 800872e: 71a3 strb r3, [r4, #6]
  19611. dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
  19612. 8008730: 2301 movs r3, #1
  19613. 8008732: 8123 strh r3, [r4, #8]
  19614. }
  19615. 8008734: bd38 pop {r3, r4, r5, pc}
  19616. ...
  19617. 08008738 <dhcp_bind>:
  19618. {
  19619. 8008738: b530 push {r4, r5, lr}
  19620. 800873a: b083 sub sp, #12
  19621. LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;);
  19622. 800873c: 2800 cmp r0, #0
  19623. 800873e: d065 beq.n 800880c <dhcp_bind+0xd4>
  19624. 8008740: 4605 mov r5, r0
  19625. dhcp = netif_dhcp_data(netif);
  19626. 8008742: 6a44 ldr r4, [r0, #36] @ 0x24
  19627. LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;);
  19628. 8008744: 2c00 cmp r4, #0
  19629. 8008746: d069 beq.n 800881c <dhcp_bind+0xe4>
  19630. dhcp->lease_used = 0;
  19631. 8008748: 2300 movs r3, #0
  19632. 800874a: 8263 strh r3, [r4, #18]
  19633. if (dhcp->offered_t0_lease != 0xffffffffUL) {
  19634. 800874c: 6aa2 ldr r2, [r4, #40] @ 0x28
  19635. 800874e: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
  19636. 8008752: d00f beq.n 8008774 <dhcp_bind+0x3c>
  19637. timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
  19638. 8008754: 321e adds r2, #30
  19639. 8008756: f1a3 3377 sub.w r3, r3, #2004318071 @ 0x77777777
  19640. 800875a: fba3 1302 umull r1, r3, r3, r2
  19641. 800875e: 095b lsrs r3, r3, #5
  19642. if (timeout > 0xffff) {
  19643. 8008760: f5b2 1f70 cmp.w r2, #3932160 @ 0x3c0000
  19644. 8008764: d301 bcc.n 800876a <dhcp_bind+0x32>
  19645. timeout = 0xffff;
  19646. 8008766: f64f 73ff movw r3, #65535 @ 0xffff
  19647. dhcp->t0_timeout = (u16_t)timeout;
  19648. 800876a: b29b uxth r3, r3
  19649. 800876c: 82a3 strh r3, [r4, #20]
  19650. if (dhcp->t0_timeout == 0) {
  19651. 800876e: b90b cbnz r3, 8008774 <dhcp_bind+0x3c>
  19652. dhcp->t0_timeout = 1;
  19653. 8008770: 2301 movs r3, #1
  19654. 8008772: 82a3 strh r3, [r4, #20]
  19655. if (dhcp->offered_t1_renew != 0xffffffffUL) {
  19656. 8008774: 6ae2 ldr r2, [r4, #44] @ 0x2c
  19657. 8008776: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
  19658. 800877a: d010 beq.n 800879e <dhcp_bind+0x66>
  19659. timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
  19660. 800877c: 321e adds r2, #30
  19661. 800877e: 4b34 ldr r3, [pc, #208] @ (8008850 <dhcp_bind+0x118>)
  19662. 8008780: fba3 1302 umull r1, r3, r3, r2
  19663. 8008784: 095b lsrs r3, r3, #5
  19664. if (timeout > 0xffff) {
  19665. 8008786: f5b2 1f70 cmp.w r2, #3932160 @ 0x3c0000
  19666. 800878a: d301 bcc.n 8008790 <dhcp_bind+0x58>
  19667. timeout = 0xffff;
  19668. 800878c: f64f 73ff movw r3, #65535 @ 0xffff
  19669. dhcp->t1_timeout = (u16_t)timeout;
  19670. 8008790: b29b uxth r3, r3
  19671. 8008792: 8163 strh r3, [r4, #10]
  19672. if (dhcp->t1_timeout == 0) {
  19673. 8008794: b90b cbnz r3, 800879a <dhcp_bind+0x62>
  19674. dhcp->t1_timeout = 1;
  19675. 8008796: 2301 movs r3, #1
  19676. 8008798: 8163 strh r3, [r4, #10]
  19677. dhcp->t1_renew_time = dhcp->t1_timeout;
  19678. 800879a: 8963 ldrh r3, [r4, #10]
  19679. 800879c: 81e3 strh r3, [r4, #14]
  19680. if (dhcp->offered_t2_rebind != 0xffffffffUL) {
  19681. 800879e: 6b22 ldr r2, [r4, #48] @ 0x30
  19682. 80087a0: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
  19683. 80087a4: d010 beq.n 80087c8 <dhcp_bind+0x90>
  19684. timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS;
  19685. 80087a6: 321e adds r2, #30
  19686. 80087a8: 4b29 ldr r3, [pc, #164] @ (8008850 <dhcp_bind+0x118>)
  19687. 80087aa: fba3 1302 umull r1, r3, r3, r2
  19688. 80087ae: 095b lsrs r3, r3, #5
  19689. if (timeout > 0xffff) {
  19690. 80087b0: f5b2 1f70 cmp.w r2, #3932160 @ 0x3c0000
  19691. 80087b4: d301 bcc.n 80087ba <dhcp_bind+0x82>
  19692. timeout = 0xffff;
  19693. 80087b6: f64f 73ff movw r3, #65535 @ 0xffff
  19694. dhcp->t2_timeout = (u16_t)timeout;
  19695. 80087ba: b29b uxth r3, r3
  19696. 80087bc: 81a3 strh r3, [r4, #12]
  19697. if (dhcp->t2_timeout == 0) {
  19698. 80087be: b90b cbnz r3, 80087c4 <dhcp_bind+0x8c>
  19699. dhcp->t2_timeout = 1;
  19700. 80087c0: 2301 movs r3, #1
  19701. 80087c2: 81a3 strh r3, [r4, #12]
  19702. dhcp->t2_rebind_time = dhcp->t2_timeout;
  19703. 80087c4: 89a3 ldrh r3, [r4, #12]
  19704. 80087c6: 8223 strh r3, [r4, #16]
  19705. if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) {
  19706. 80087c8: 8962 ldrh r2, [r4, #10]
  19707. 80087ca: 89a3 ldrh r3, [r4, #12]
  19708. 80087cc: 429a cmp r2, r3
  19709. 80087ce: d302 bcc.n 80087d6 <dhcp_bind+0x9e>
  19710. 80087d0: b10b cbz r3, 80087d6 <dhcp_bind+0x9e>
  19711. dhcp->t1_timeout = 0;
  19712. 80087d2: 2300 movs r3, #0
  19713. 80087d4: 8163 strh r3, [r4, #10]
  19714. if (dhcp->subnet_mask_given) {
  19715. 80087d6: 79e3 ldrb r3, [r4, #7]
  19716. 80087d8: b343 cbz r3, 800882c <dhcp_bind+0xf4>
  19717. ip4_addr_copy(sn_mask, dhcp->offered_sn_mask);
  19718. 80087da: 6a23 ldr r3, [r4, #32]
  19719. 80087dc: 9301 str r3, [sp, #4]
  19720. ip4_addr_copy(gw_addr, dhcp->offered_gw_addr);
  19721. 80087de: 6a63 ldr r3, [r4, #36] @ 0x24
  19722. 80087e0: 9300 str r3, [sp, #0]
  19723. if (ip4_addr_isany_val(gw_addr)) {
  19724. 80087e2: b933 cbnz r3, 80087f2 <dhcp_bind+0xba>
  19725. ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask);
  19726. 80087e4: 69e3 ldr r3, [r4, #28]
  19727. 80087e6: 9a01 ldr r2, [sp, #4]
  19728. 80087e8: 4013 ands r3, r2
  19729. 80087ea: 9300 str r3, [sp, #0]
  19730. ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL));
  19731. 80087ec: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000
  19732. 80087f0: 9300 str r3, [sp, #0]
  19733. dhcp_set_state(dhcp, DHCP_STATE_BOUND);
  19734. 80087f2: 210a movs r1, #10
  19735. 80087f4: 4620 mov r0, r4
  19736. 80087f6: f7ff fb52 bl 8007e9e <dhcp_set_state>
  19737. netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr);
  19738. 80087fa: 466b mov r3, sp
  19739. 80087fc: aa01 add r2, sp, #4
  19740. 80087fe: f104 011c add.w r1, r4, #28
  19741. 8008802: 4628 mov r0, r5
  19742. 8008804: f003 f822 bl 800b84c <netif_set_addr>
  19743. }
  19744. 8008808: b003 add sp, #12
  19745. 800880a: bd30 pop {r4, r5, pc}
  19746. LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;);
  19747. 800880c: 4b11 ldr r3, [pc, #68] @ (8008854 <dhcp_bind+0x11c>)
  19748. 800880e: f240 4215 movw r2, #1045 @ 0x415
  19749. 8008812: 4911 ldr r1, [pc, #68] @ (8008858 <dhcp_bind+0x120>)
  19750. 8008814: 4811 ldr r0, [pc, #68] @ (800885c <dhcp_bind+0x124>)
  19751. 8008816: f00a fdf7 bl 8013408 <iprintf>
  19752. 800881a: e7f5 b.n 8008808 <dhcp_bind+0xd0>
  19753. LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;);
  19754. 800881c: 4b0d ldr r3, [pc, #52] @ (8008854 <dhcp_bind+0x11c>)
  19755. 800881e: f240 4217 movw r2, #1047 @ 0x417
  19756. 8008822: 490f ldr r1, [pc, #60] @ (8008860 <dhcp_bind+0x128>)
  19757. 8008824: 480d ldr r0, [pc, #52] @ (800885c <dhcp_bind+0x124>)
  19758. 8008826: f00a fdef bl 8013408 <iprintf>
  19759. 800882a: e7ed b.n 8008808 <dhcp_bind+0xd0>
  19760. u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr);
  19761. 800882c: 7f22 ldrb r2, [r4, #28]
  19762. if (first_octet <= 127) {
  19763. 800882e: f994 301c ldrsb.w r3, [r4, #28]
  19764. 8008832: 2b00 cmp r3, #0
  19765. 8008834: db02 blt.n 800883c <dhcp_bind+0x104>
  19766. ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL));
  19767. 8008836: 23ff movs r3, #255 @ 0xff
  19768. 8008838: 9301 str r3, [sp, #4]
  19769. 800883a: e7d0 b.n 80087de <dhcp_bind+0xa6>
  19770. } else if (first_octet >= 192) {
  19771. 800883c: 2abf cmp r2, #191 @ 0xbf
  19772. 800883e: d903 bls.n 8008848 <dhcp_bind+0x110>
  19773. ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL));
  19774. 8008840: f06f 437f mvn.w r3, #4278190080 @ 0xff000000
  19775. 8008844: 9301 str r3, [sp, #4]
  19776. 8008846: e7ca b.n 80087de <dhcp_bind+0xa6>
  19777. ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL));
  19778. 8008848: f64f 73ff movw r3, #65535 @ 0xffff
  19779. 800884c: 9301 str r3, [sp, #4]
  19780. 800884e: e7c6 b.n 80087de <dhcp_bind+0xa6>
  19781. 8008850: 88888889 .word 0x88888889
  19782. 8008854: 08014e34 .word 0x08014e34
  19783. 8008858: 08015044 .word 0x08015044
  19784. 800885c: 080144e8 .word 0x080144e8
  19785. 8008860: 08015060 .word 0x08015060
  19786. 08008864 <dhcp_handle_nak>:
  19787. {
  19788. 8008864: b510 push {r4, lr}
  19789. 8008866: 4604 mov r4, r0
  19790. dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF);
  19791. 8008868: 210c movs r1, #12
  19792. 800886a: 6a40 ldr r0, [r0, #36] @ 0x24
  19793. 800886c: f7ff fb17 bl 8007e9e <dhcp_set_state>
  19794. netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
  19795. 8008870: 4904 ldr r1, [pc, #16] @ (8008884 <dhcp_handle_nak+0x20>)
  19796. 8008872: 460b mov r3, r1
  19797. 8008874: 460a mov r2, r1
  19798. 8008876: 4620 mov r0, r4
  19799. 8008878: f002 ffe8 bl 800b84c <netif_set_addr>
  19800. dhcp_discover(netif);
  19801. 800887c: 4620 mov r0, r4
  19802. 800887e: f7ff fe7d bl 800857c <dhcp_discover>
  19803. }
  19804. 8008882: bd10 pop {r4, pc}
  19805. 8008884: 080156d8 .word 0x080156d8
  19806. 08008888 <dhcp_dec_pcb_refcount>:
  19807. {
  19808. 8008888: b510 push {r4, lr}
  19809. LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0));
  19810. 800888a: 4b0c ldr r3, [pc, #48] @ (80088bc <dhcp_dec_pcb_refcount+0x34>)
  19811. 800888c: 781b ldrb r3, [r3, #0]
  19812. 800888e: b133 cbz r3, 800889e <dhcp_dec_pcb_refcount+0x16>
  19813. dhcp_pcb_refcount--;
  19814. 8008890: 4a0a ldr r2, [pc, #40] @ (80088bc <dhcp_dec_pcb_refcount+0x34>)
  19815. 8008892: 7813 ldrb r3, [r2, #0]
  19816. 8008894: 3b01 subs r3, #1
  19817. 8008896: b2db uxtb r3, r3
  19818. 8008898: 7013 strb r3, [r2, #0]
  19819. if (dhcp_pcb_refcount == 0) {
  19820. 800889a: b13b cbz r3, 80088ac <dhcp_dec_pcb_refcount+0x24>
  19821. }
  19822. 800889c: bd10 pop {r4, pc}
  19823. LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0));
  19824. 800889e: 4b08 ldr r3, [pc, #32] @ (80088c0 <dhcp_dec_pcb_refcount+0x38>)
  19825. 80088a0: 22ff movs r2, #255 @ 0xff
  19826. 80088a2: 4908 ldr r1, [pc, #32] @ (80088c4 <dhcp_dec_pcb_refcount+0x3c>)
  19827. 80088a4: 4808 ldr r0, [pc, #32] @ (80088c8 <dhcp_dec_pcb_refcount+0x40>)
  19828. 80088a6: f00a fdaf bl 8013408 <iprintf>
  19829. 80088aa: e7f1 b.n 8008890 <dhcp_dec_pcb_refcount+0x8>
  19830. udp_remove(dhcp_pcb);
  19831. 80088ac: 4c07 ldr r4, [pc, #28] @ (80088cc <dhcp_dec_pcb_refcount+0x44>)
  19832. 80088ae: 6820 ldr r0, [r4, #0]
  19833. 80088b0: f009 faec bl 8011e8c <udp_remove>
  19834. dhcp_pcb = NULL;
  19835. 80088b4: 2300 movs r3, #0
  19836. 80088b6: 6023 str r3, [r4, #0]
  19837. }
  19838. 80088b8: e7f0 b.n 800889c <dhcp_dec_pcb_refcount+0x14>
  19839. 80088ba: bf00 nop
  19840. 80088bc: 24012ef8 .word 0x24012ef8
  19841. 80088c0: 08014e34 .word 0x08014e34
  19842. 80088c4: 08015078 .word 0x08015078
  19843. 80088c8: 080144e8 .word 0x080144e8
  19844. 80088cc: 24012efc .word 0x24012efc
  19845. 080088d0 <dhcp_inc_pcb_refcount>:
  19846. {
  19847. 80088d0: b538 push {r3, r4, r5, lr}
  19848. if (dhcp_pcb_refcount == 0) {
  19849. 80088d2: 4b17 ldr r3, [pc, #92] @ (8008930 <dhcp_inc_pcb_refcount+0x60>)
  19850. 80088d4: 781b ldrb r3, [r3, #0]
  19851. 80088d6: bb0b cbnz r3, 800891c <dhcp_inc_pcb_refcount+0x4c>
  19852. LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL);
  19853. 80088d8: 4b16 ldr r3, [pc, #88] @ (8008934 <dhcp_inc_pcb_refcount+0x64>)
  19854. 80088da: 681b ldr r3, [r3, #0]
  19855. 80088dc: b12b cbz r3, 80088ea <dhcp_inc_pcb_refcount+0x1a>
  19856. 80088de: 4b16 ldr r3, [pc, #88] @ (8008938 <dhcp_inc_pcb_refcount+0x68>)
  19857. 80088e0: 22e5 movs r2, #229 @ 0xe5
  19858. 80088e2: 4916 ldr r1, [pc, #88] @ (800893c <dhcp_inc_pcb_refcount+0x6c>)
  19859. 80088e4: 4816 ldr r0, [pc, #88] @ (8008940 <dhcp_inc_pcb_refcount+0x70>)
  19860. 80088e6: f00a fd8f bl 8013408 <iprintf>
  19861. dhcp_pcb = udp_new();
  19862. 80088ea: f009 fafd bl 8011ee8 <udp_new>
  19863. 80088ee: 4b11 ldr r3, [pc, #68] @ (8008934 <dhcp_inc_pcb_refcount+0x64>)
  19864. 80088f0: 6018 str r0, [r3, #0]
  19865. if (dhcp_pcb == NULL) {
  19866. 80088f2: b1c8 cbz r0, 8008928 <dhcp_inc_pcb_refcount+0x58>
  19867. ip_set_option(dhcp_pcb, SOF_BROADCAST);
  19868. 80088f4: 7a43 ldrb r3, [r0, #9]
  19869. 80088f6: f043 0320 orr.w r3, r3, #32
  19870. 80088fa: 7243 strb r3, [r0, #9]
  19871. udp_bind(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_CLIENT);
  19872. 80088fc: 4d11 ldr r5, [pc, #68] @ (8008944 <dhcp_inc_pcb_refcount+0x74>)
  19873. 80088fe: 2244 movs r2, #68 @ 0x44
  19874. 8008900: 4629 mov r1, r5
  19875. 8008902: f009 f877 bl 80119f4 <udp_bind>
  19876. udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER);
  19877. 8008906: 4c0b ldr r4, [pc, #44] @ (8008934 <dhcp_inc_pcb_refcount+0x64>)
  19878. 8008908: 2243 movs r2, #67 @ 0x43
  19879. 800890a: 4629 mov r1, r5
  19880. 800890c: 6820 ldr r0, [r4, #0]
  19881. 800890e: f009 fa43 bl 8011d98 <udp_connect>
  19882. udp_recv(dhcp_pcb, dhcp_recv, NULL);
  19883. 8008912: 2200 movs r2, #0
  19884. 8008914: 490c ldr r1, [pc, #48] @ (8008948 <dhcp_inc_pcb_refcount+0x78>)
  19885. 8008916: 6820 ldr r0, [r4, #0]
  19886. 8008918: f009 faa0 bl 8011e5c <udp_recv>
  19887. dhcp_pcb_refcount++;
  19888. 800891c: 4a04 ldr r2, [pc, #16] @ (8008930 <dhcp_inc_pcb_refcount+0x60>)
  19889. 800891e: 7813 ldrb r3, [r2, #0]
  19890. 8008920: 3301 adds r3, #1
  19891. 8008922: 7013 strb r3, [r2, #0]
  19892. return ERR_OK;
  19893. 8008924: 2000 movs r0, #0
  19894. }
  19895. 8008926: bd38 pop {r3, r4, r5, pc}
  19896. return ERR_MEM;
  19897. 8008928: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  19898. 800892c: e7fb b.n 8008926 <dhcp_inc_pcb_refcount+0x56>
  19899. 800892e: bf00 nop
  19900. 8008930: 24012ef8 .word 0x24012ef8
  19901. 8008934: 24012efc .word 0x24012efc
  19902. 8008938: 08014e34 .word 0x08014e34
  19903. 800893c: 0801509c .word 0x0801509c
  19904. 8008940: 080144e8 .word 0x080144e8
  19905. 8008944: 080156d8 .word 0x080156d8
  19906. 8008948: 08008ddd .word 0x08008ddd
  19907. 0800894c <dhcp_parse_reply>:
  19908. dhcp_clear_all_options(dhcp);
  19909. 800894c: 4bbf ldr r3, [pc, #764] @ (8008c4c <dhcp_parse_reply+0x300>)
  19910. 800894e: 2200 movs r2, #0
  19911. 8008950: 601a str r2, [r3, #0]
  19912. 8008952: 605a str r2, [r3, #4]
  19913. if (p->len < DHCP_SNAME_OFS) {
  19914. 8008954: 8943 ldrh r3, [r0, #10]
  19915. 8008956: 2b2b cmp r3, #43 @ 0x2b
  19916. 8008958: f240 821e bls.w 8008d98 <dhcp_parse_reply+0x44c>
  19917. {
  19918. 800895c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  19919. 8008960: b087 sub sp, #28
  19920. options_idx_max = p->tot_len;
  19921. 8008962: 8904 ldrh r4, [r0, #8]
  19922. int parse_sname_as_options = 0;
  19923. 8008964: 4690 mov r8, r2
  19924. options_idx = DHCP_OPTIONS_OFS;
  19925. 8008966: 27f0 movs r7, #240 @ 0xf0
  19926. 8008968: 9002 str r0, [sp, #8]
  19927. q = p;
  19928. 800896a: 9d02 ldr r5, [sp, #8]
  19929. while ((q != NULL) && (options_idx >= q->len)) {
  19930. 800896c: e004 b.n 8008978 <dhcp_parse_reply+0x2c>
  19931. options_idx = (u16_t)(options_idx - q->len);
  19932. 800896e: 1aff subs r7, r7, r3
  19933. 8008970: b2bf uxth r7, r7
  19934. options_idx_max = (u16_t)(options_idx_max - q->len);
  19935. 8008972: 1ae4 subs r4, r4, r3
  19936. 8008974: b2a4 uxth r4, r4
  19937. q = q->next;
  19938. 8008976: 682d ldr r5, [r5, #0]
  19939. while ((q != NULL) && (options_idx >= q->len)) {
  19940. 8008978: 2d00 cmp r5, #0
  19941. 800897a: f000 8210 beq.w 8008d9e <dhcp_parse_reply+0x452>
  19942. 800897e: 896b ldrh r3, [r5, #10]
  19943. 8008980: 42bb cmp r3, r7
  19944. 8008982: d9f4 bls.n 800896e <dhcp_parse_reply+0x22>
  19945. options = (u8_t *)q->payload;
  19946. 8008984: 686b ldr r3, [r5, #4]
  19947. 8008986: 9301 str r3, [sp, #4]
  19948. offset = options_idx;
  19949. 8008988: 463e mov r6, r7
  19950. 800898a: 46c3 mov fp, r8
  19951. while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
  19952. 800898c: e0b1 b.n 8008af2 <dhcp_parse_reply+0x1a6>
  19953. len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0);
  19954. 800898e: 682a ldr r2, [r5, #0]
  19955. 8008990: b112 cbz r2, 8008998 <dhcp_parse_reply+0x4c>
  19956. 8008992: 6852 ldr r2, [r2, #4]
  19957. 8008994: 7812 ldrb r2, [r2, #0]
  19958. 8008996: e0c9 b.n 8008b2c <dhcp_parse_reply+0x1e0>
  19959. 8008998: 2200 movs r2, #0
  19960. 800899a: e0c7 b.n 8008b2c <dhcp_parse_reply+0x1e0>
  19961. switch (op) {
  19962. 800899c: 4688 mov r8, r1
  19963. 800899e: 460a mov r2, r1
  19964. 80089a0: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
  19965. 80089a4: e090 b.n 8008ac8 <dhcp_parse_reply+0x17c>
  19966. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  19967. 80089a6: 2a04 cmp r2, #4
  19968. 80089a8: d103 bne.n 80089b2 <dhcp_parse_reply+0x66>
  19969. decode_len = len;
  19970. 80089aa: 4690 mov r8, r2
  19971. decode_idx = DHCP_OPTION_IDX_SUBNET_MASK;
  19972. 80089ac: f04f 0906 mov.w r9, #6
  19973. 80089b0: e08a b.n 8008ac8 <dhcp_parse_reply+0x17c>
  19974. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  19975. 80089b2: 4ba7 ldr r3, [pc, #668] @ (8008c50 <dhcp_parse_reply+0x304>)
  19976. 80089b4: f240 622e movw r2, #1582 @ 0x62e
  19977. 80089b8: 49a6 ldr r1, [pc, #664] @ (8008c54 <dhcp_parse_reply+0x308>)
  19978. 80089ba: 48a7 ldr r0, [pc, #668] @ (8008c58 <dhcp_parse_reply+0x30c>)
  19979. 80089bc: f00a fd24 bl 8013408 <iprintf>
  19980. 80089c0: f06f 0005 mvn.w r0, #5
  19981. 80089c4: e1ed b.n 8008da2 <dhcp_parse_reply+0x456>
  19982. LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
  19983. 80089c6: 2a03 cmp r2, #3
  19984. 80089c8: d904 bls.n 80089d4 <dhcp_parse_reply+0x88>
  19985. decode_idx = DHCP_OPTION_IDX_ROUTER;
  19986. 80089ca: f04f 0907 mov.w r9, #7
  19987. decode_len = 4; /* only copy the first given router */
  19988. 80089ce: f04f 0804 mov.w r8, #4
  19989. 80089d2: e079 b.n 8008ac8 <dhcp_parse_reply+0x17c>
  19990. LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
  19991. 80089d4: 4b9e ldr r3, [pc, #632] @ (8008c50 <dhcp_parse_reply+0x304>)
  19992. 80089d6: f240 6233 movw r2, #1587 @ 0x633
  19993. 80089da: 49a0 ldr r1, [pc, #640] @ (8008c5c <dhcp_parse_reply+0x310>)
  19994. 80089dc: 489e ldr r0, [pc, #632] @ (8008c58 <dhcp_parse_reply+0x30c>)
  19995. 80089de: f00a fd13 bl 8013408 <iprintf>
  19996. 80089e2: f06f 0005 mvn.w r0, #5
  19997. 80089e6: e1dc b.n 8008da2 <dhcp_parse_reply+0x456>
  19998. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  19999. 80089e8: 2a04 cmp r2, #4
  20000. 80089ea: d103 bne.n 80089f4 <dhcp_parse_reply+0xa8>
  20001. decode_len = len;
  20002. 80089ec: 4690 mov r8, r2
  20003. decode_idx = DHCP_OPTION_IDX_LEASE_TIME;
  20004. 80089ee: f04f 0903 mov.w r9, #3
  20005. 80089f2: e069 b.n 8008ac8 <dhcp_parse_reply+0x17c>
  20006. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  20007. 80089f4: 4b96 ldr r3, [pc, #600] @ (8008c50 <dhcp_parse_reply+0x304>)
  20008. 80089f6: f240 6241 movw r2, #1601 @ 0x641
  20009. 80089fa: 4996 ldr r1, [pc, #600] @ (8008c54 <dhcp_parse_reply+0x308>)
  20010. 80089fc: 4896 ldr r0, [pc, #600] @ (8008c58 <dhcp_parse_reply+0x30c>)
  20011. 80089fe: f00a fd03 bl 8013408 <iprintf>
  20012. 8008a02: f06f 0005 mvn.w r0, #5
  20013. 8008a06: e1cc b.n 8008da2 <dhcp_parse_reply+0x456>
  20014. LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
  20015. 8008a08: 2a01 cmp r2, #1
  20016. 8008a0a: d105 bne.n 8008a18 <dhcp_parse_reply+0xcc>
  20017. LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;);
  20018. 8008a0c: 2ff0 cmp r7, #240 @ 0xf0
  20019. 8008a0e: d10d bne.n 8008a2c <dhcp_parse_reply+0xe0>
  20020. decode_len = len;
  20021. 8008a10: 4690 mov r8, r2
  20022. decode_idx = DHCP_OPTION_IDX_OVERLOAD;
  20023. 8008a12: f04f 0900 mov.w r9, #0
  20024. 8008a16: e057 b.n 8008ac8 <dhcp_parse_reply+0x17c>
  20025. LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
  20026. 8008a18: 4b8d ldr r3, [pc, #564] @ (8008c50 <dhcp_parse_reply+0x304>)
  20027. 8008a1a: f240 624f movw r2, #1615 @ 0x64f
  20028. 8008a1e: 4990 ldr r1, [pc, #576] @ (8008c60 <dhcp_parse_reply+0x314>)
  20029. 8008a20: 488d ldr r0, [pc, #564] @ (8008c58 <dhcp_parse_reply+0x30c>)
  20030. 8008a22: f00a fcf1 bl 8013408 <iprintf>
  20031. 8008a26: f06f 0005 mvn.w r0, #5
  20032. 8008a2a: e1ba b.n 8008da2 <dhcp_parse_reply+0x456>
  20033. LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;);
  20034. 8008a2c: 4b88 ldr r3, [pc, #544] @ (8008c50 <dhcp_parse_reply+0x304>)
  20035. 8008a2e: f240 6251 movw r2, #1617 @ 0x651
  20036. 8008a32: 498c ldr r1, [pc, #560] @ (8008c64 <dhcp_parse_reply+0x318>)
  20037. 8008a34: 4888 ldr r0, [pc, #544] @ (8008c58 <dhcp_parse_reply+0x30c>)
  20038. 8008a36: f00a fce7 bl 8013408 <iprintf>
  20039. 8008a3a: f06f 0005 mvn.w r0, #5
  20040. 8008a3e: e1b0 b.n 8008da2 <dhcp_parse_reply+0x456>
  20041. LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
  20042. 8008a40: 2a01 cmp r2, #1
  20043. 8008a42: d103 bne.n 8008a4c <dhcp_parse_reply+0x100>
  20044. decode_len = len;
  20045. 8008a44: 4690 mov r8, r2
  20046. decode_idx = DHCP_OPTION_IDX_MSG_TYPE;
  20047. 8008a46: f04f 0901 mov.w r9, #1
  20048. 8008a4a: e03d b.n 8008ac8 <dhcp_parse_reply+0x17c>
  20049. LWIP_ERROR("len == 1", len == 1, return ERR_VAL;);
  20050. 8008a4c: 4b80 ldr r3, [pc, #512] @ (8008c50 <dhcp_parse_reply+0x304>)
  20051. 8008a4e: f240 6255 movw r2, #1621 @ 0x655
  20052. 8008a52: 4983 ldr r1, [pc, #524] @ (8008c60 <dhcp_parse_reply+0x314>)
  20053. 8008a54: 4880 ldr r0, [pc, #512] @ (8008c58 <dhcp_parse_reply+0x30c>)
  20054. 8008a56: f00a fcd7 bl 8013408 <iprintf>
  20055. 8008a5a: f06f 0005 mvn.w r0, #5
  20056. 8008a5e: e1a0 b.n 8008da2 <dhcp_parse_reply+0x456>
  20057. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  20058. 8008a60: 2a04 cmp r2, #4
  20059. 8008a62: d103 bne.n 8008a6c <dhcp_parse_reply+0x120>
  20060. decode_len = len;
  20061. 8008a64: 4690 mov r8, r2
  20062. decode_idx = DHCP_OPTION_IDX_SERVER_ID;
  20063. 8008a66: f04f 0902 mov.w r9, #2
  20064. 8008a6a: e02d b.n 8008ac8 <dhcp_parse_reply+0x17c>
  20065. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  20066. 8008a6c: 4b78 ldr r3, [pc, #480] @ (8008c50 <dhcp_parse_reply+0x304>)
  20067. 8008a6e: f240 6259 movw r2, #1625 @ 0x659
  20068. 8008a72: 4978 ldr r1, [pc, #480] @ (8008c54 <dhcp_parse_reply+0x308>)
  20069. 8008a74: 4878 ldr r0, [pc, #480] @ (8008c58 <dhcp_parse_reply+0x30c>)
  20070. 8008a76: f00a fcc7 bl 8013408 <iprintf>
  20071. 8008a7a: f06f 0005 mvn.w r0, #5
  20072. 8008a7e: e190 b.n 8008da2 <dhcp_parse_reply+0x456>
  20073. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  20074. 8008a80: 2a04 cmp r2, #4
  20075. 8008a82: d103 bne.n 8008a8c <dhcp_parse_reply+0x140>
  20076. decode_len = len;
  20077. 8008a84: 4690 mov r8, r2
  20078. decode_idx = DHCP_OPTION_IDX_T1;
  20079. 8008a86: f04f 0904 mov.w r9, #4
  20080. 8008a8a: e01d b.n 8008ac8 <dhcp_parse_reply+0x17c>
  20081. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  20082. 8008a8c: 4b70 ldr r3, [pc, #448] @ (8008c50 <dhcp_parse_reply+0x304>)
  20083. 8008a8e: f240 625d movw r2, #1629 @ 0x65d
  20084. 8008a92: 4970 ldr r1, [pc, #448] @ (8008c54 <dhcp_parse_reply+0x308>)
  20085. 8008a94: 4870 ldr r0, [pc, #448] @ (8008c58 <dhcp_parse_reply+0x30c>)
  20086. 8008a96: f00a fcb7 bl 8013408 <iprintf>
  20087. 8008a9a: f06f 0005 mvn.w r0, #5
  20088. 8008a9e: e180 b.n 8008da2 <dhcp_parse_reply+0x456>
  20089. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  20090. 8008aa0: 2a04 cmp r2, #4
  20091. 8008aa2: d103 bne.n 8008aac <dhcp_parse_reply+0x160>
  20092. decode_len = len;
  20093. 8008aa4: 4690 mov r8, r2
  20094. decode_idx = DHCP_OPTION_IDX_T2;
  20095. 8008aa6: f04f 0905 mov.w r9, #5
  20096. 8008aaa: e00d b.n 8008ac8 <dhcp_parse_reply+0x17c>
  20097. LWIP_ERROR("len == 4", len == 4, return ERR_VAL;);
  20098. 8008aac: 4b68 ldr r3, [pc, #416] @ (8008c50 <dhcp_parse_reply+0x304>)
  20099. 8008aae: f240 6261 movw r2, #1633 @ 0x661
  20100. 8008ab2: 4968 ldr r1, [pc, #416] @ (8008c54 <dhcp_parse_reply+0x308>)
  20101. 8008ab4: 4868 ldr r0, [pc, #416] @ (8008c58 <dhcp_parse_reply+0x30c>)
  20102. 8008ab6: f00a fca7 bl 8013408 <iprintf>
  20103. 8008aba: f06f 0005 mvn.w r0, #5
  20104. 8008abe: e170 b.n 8008da2 <dhcp_parse_reply+0x456>
  20105. int decode_idx = -1;
  20106. 8008ac0: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
  20107. decode_len = 0;
  20108. 8008ac4: f04f 0800 mov.w r8, #0
  20109. if (op == DHCP_OPTION_PAD) {
  20110. 8008ac8: 2900 cmp r1, #0
  20111. 8008aca: f040 80ad bne.w 8008c28 <dhcp_parse_reply+0x2dc>
  20112. offset++;
  20113. 8008ace: 3601 adds r6, #1
  20114. 8008ad0: b2b6 uxth r6, r6
  20115. if (offset >= q->len) {
  20116. 8008ad2: 896b ldrh r3, [r5, #10]
  20117. 8008ad4: 429e cmp r6, r3
  20118. 8008ad6: d30c bcc.n 8008af2 <dhcp_parse_reply+0x1a6>
  20119. offset = (u16_t)(offset - q->len);
  20120. 8008ad8: 1af6 subs r6, r6, r3
  20121. 8008ada: b2b6 uxth r6, r6
  20122. offset_max = (u16_t)(offset_max - q->len);
  20123. 8008adc: 1ae3 subs r3, r4, r3
  20124. 8008ade: b29c uxth r4, r3
  20125. if (offset < offset_max) {
  20126. 8008ae0: 42a6 cmp r6, r4
  20127. 8008ae2: f080 8167 bcs.w 8008db4 <dhcp_parse_reply+0x468>
  20128. q = q->next;
  20129. 8008ae6: 682d ldr r5, [r5, #0]
  20130. LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;);
  20131. 8008ae8: 2d00 cmp r5, #0
  20132. 8008aea: f000 812a beq.w 8008d42 <dhcp_parse_reply+0x3f6>
  20133. options = (u8_t *)q->payload;
  20134. 8008aee: 686b ldr r3, [r5, #4]
  20135. 8008af0: 9301 str r3, [sp, #4]
  20136. while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) {
  20137. 8008af2: 2d00 cmp r5, #0
  20138. 8008af4: bf18 it ne
  20139. 8008af6: 42a6 cmpne r6, r4
  20140. 8008af8: f080 812d bcs.w 8008d56 <dhcp_parse_reply+0x40a>
  20141. 8008afc: 46b4 mov ip, r6
  20142. 8008afe: 9b01 ldr r3, [sp, #4]
  20143. 8008b00: 5d99 ldrb r1, [r3, r6]
  20144. 8008b02: 29ff cmp r1, #255 @ 0xff
  20145. 8008b04: f000 8127 beq.w 8008d56 <dhcp_parse_reply+0x40a>
  20146. u16_t val_offset = (u16_t)(offset + 2);
  20147. 8008b08: 1cb3 adds r3, r6, #2
  20148. 8008b0a: fa1f fa83 uxth.w sl, r3
  20149. if (val_offset < offset) {
  20150. 8008b0e: 4556 cmp r6, sl
  20151. 8008b10: f200 814a bhi.w 8008da8 <dhcp_parse_reply+0x45c>
  20152. if ((offset + 1) < q->len) {
  20153. 8008b14: 4630 mov r0, r6
  20154. 8008b16: 1c72 adds r2, r6, #1
  20155. 8008b18: f8b5 e00a ldrh.w lr, [r5, #10]
  20156. 8008b1c: 4572 cmp r2, lr
  20157. 8008b1e: f6bf af36 bge.w 800898e <dhcp_parse_reply+0x42>
  20158. len = options[offset + 1];
  20159. 8008b22: f10c 0c01 add.w ip, ip, #1
  20160. 8008b26: 9b01 ldr r3, [sp, #4]
  20161. 8008b28: f813 200c ldrb.w r2, [r3, ip]
  20162. switch (op) {
  20163. 8008b2c: 293b cmp r1, #59 @ 0x3b
  20164. 8008b2e: d8c7 bhi.n 8008ac0 <dhcp_parse_reply+0x174>
  20165. 8008b30: f20f 0c04 addw ip, pc, #4
  20166. 8008b34: f85c f021 ldr.w pc, [ip, r1, lsl #2]
  20167. 8008b38: 0800899d .word 0x0800899d
  20168. 8008b3c: 080089a7 .word 0x080089a7
  20169. 8008b40: 08008ac1 .word 0x08008ac1
  20170. 8008b44: 080089c7 .word 0x080089c7
  20171. 8008b48: 08008ac1 .word 0x08008ac1
  20172. 8008b4c: 08008ac1 .word 0x08008ac1
  20173. 8008b50: 08008ac1 .word 0x08008ac1
  20174. 8008b54: 08008ac1 .word 0x08008ac1
  20175. 8008b58: 08008ac1 .word 0x08008ac1
  20176. 8008b5c: 08008ac1 .word 0x08008ac1
  20177. 8008b60: 08008ac1 .word 0x08008ac1
  20178. 8008b64: 08008ac1 .word 0x08008ac1
  20179. 8008b68: 08008ac1 .word 0x08008ac1
  20180. 8008b6c: 08008ac1 .word 0x08008ac1
  20181. 8008b70: 08008ac1 .word 0x08008ac1
  20182. 8008b74: 08008ac1 .word 0x08008ac1
  20183. 8008b78: 08008ac1 .word 0x08008ac1
  20184. 8008b7c: 08008ac1 .word 0x08008ac1
  20185. 8008b80: 08008ac1 .word 0x08008ac1
  20186. 8008b84: 08008ac1 .word 0x08008ac1
  20187. 8008b88: 08008ac1 .word 0x08008ac1
  20188. 8008b8c: 08008ac1 .word 0x08008ac1
  20189. 8008b90: 08008ac1 .word 0x08008ac1
  20190. 8008b94: 08008ac1 .word 0x08008ac1
  20191. 8008b98: 08008ac1 .word 0x08008ac1
  20192. 8008b9c: 08008ac1 .word 0x08008ac1
  20193. 8008ba0: 08008ac1 .word 0x08008ac1
  20194. 8008ba4: 08008ac1 .word 0x08008ac1
  20195. 8008ba8: 08008ac1 .word 0x08008ac1
  20196. 8008bac: 08008ac1 .word 0x08008ac1
  20197. 8008bb0: 08008ac1 .word 0x08008ac1
  20198. 8008bb4: 08008ac1 .word 0x08008ac1
  20199. 8008bb8: 08008ac1 .word 0x08008ac1
  20200. 8008bbc: 08008ac1 .word 0x08008ac1
  20201. 8008bc0: 08008ac1 .word 0x08008ac1
  20202. 8008bc4: 08008ac1 .word 0x08008ac1
  20203. 8008bc8: 08008ac1 .word 0x08008ac1
  20204. 8008bcc: 08008ac1 .word 0x08008ac1
  20205. 8008bd0: 08008ac1 .word 0x08008ac1
  20206. 8008bd4: 08008ac1 .word 0x08008ac1
  20207. 8008bd8: 08008ac1 .word 0x08008ac1
  20208. 8008bdc: 08008ac1 .word 0x08008ac1
  20209. 8008be0: 08008ac1 .word 0x08008ac1
  20210. 8008be4: 08008ac1 .word 0x08008ac1
  20211. 8008be8: 08008ac1 .word 0x08008ac1
  20212. 8008bec: 08008ac1 .word 0x08008ac1
  20213. 8008bf0: 08008ac1 .word 0x08008ac1
  20214. 8008bf4: 08008ac1 .word 0x08008ac1
  20215. 8008bf8: 08008ac1 .word 0x08008ac1
  20216. 8008bfc: 08008ac1 .word 0x08008ac1
  20217. 8008c00: 08008ac1 .word 0x08008ac1
  20218. 8008c04: 080089e9 .word 0x080089e9
  20219. 8008c08: 08008a09 .word 0x08008a09
  20220. 8008c0c: 08008a41 .word 0x08008a41
  20221. 8008c10: 08008a61 .word 0x08008a61
  20222. 8008c14: 08008ac1 .word 0x08008ac1
  20223. 8008c18: 08008ac1 .word 0x08008ac1
  20224. 8008c1c: 08008ac1 .word 0x08008ac1
  20225. 8008c20: 08008a81 .word 0x08008a81
  20226. 8008c24: 08008aa1 .word 0x08008aa1
  20227. if (offset + len + 2 > 0xFFFF) {
  20228. 8008c28: 4410 add r0, r2
  20229. 8008c2a: f64f 71fd movw r1, #65533 @ 0xfffd
  20230. 8008c2e: 4288 cmp r0, r1
  20231. 8008c30: f300 80bd bgt.w 8008dae <dhcp_parse_reply+0x462>
  20232. offset = (u16_t)(offset + len + 2);
  20233. 8008c34: 4432 add r2, r6
  20234. 8008c36: b292 uxth r2, r2
  20235. 8008c38: 3202 adds r2, #2
  20236. 8008c3a: b296 uxth r6, r2
  20237. if (decode_len > 0) {
  20238. 8008c3c: f1b8 0f00 cmp.w r8, #0
  20239. 8008c40: f43f af47 beq.w 8008ad2 <dhcp_parse_reply+0x186>
  20240. u32_t value = 0;
  20241. 8008c44: 2200 movs r2, #0
  20242. 8008c46: 9205 str r2, [sp, #20]
  20243. 8008c48: 9603 str r6, [sp, #12]
  20244. 8008c4a: e03b b.n 8008cc4 <dhcp_parse_reply+0x378>
  20245. 8008c4c: 24012f00 .word 0x24012f00
  20246. 8008c50: 08014e34 .word 0x08014e34
  20247. 8008c54: 080150c4 .word 0x080150c4
  20248. 8008c58: 080144e8 .word 0x080144e8
  20249. 8008c5c: 080150d0 .word 0x080150d0
  20250. 8008c60: 080150e4 .word 0x080150e4
  20251. 8008c64: 080150f0 .word 0x080150f0
  20252. if (!dhcp_option_given(dhcp, decode_idx)) {
  20253. 8008c68: 4b54 ldr r3, [pc, #336] @ (8008dbc <dhcp_parse_reply+0x470>)
  20254. 8008c6a: f813 3009 ldrb.w r3, [r3, r9]
  20255. 8008c6e: 2b00 cmp r3, #0
  20256. 8008c70: d165 bne.n 8008d3e <dhcp_parse_reply+0x3f2>
  20257. copy_len = LWIP_MIN(decode_len, 4);
  20258. 8008c72: 4646 mov r6, r8
  20259. 8008c74: 2e04 cmp r6, #4
  20260. 8008c76: bf28 it cs
  20261. 8008c78: 2604 movcs r6, #4
  20262. 8008c7a: b2f6 uxtb r6, r6
  20263. if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) {
  20264. 8008c7c: 4653 mov r3, sl
  20265. 8008c7e: 4632 mov r2, r6
  20266. 8008c80: a905 add r1, sp, #20
  20267. 8008c82: 4628 mov r0, r5
  20268. 8008c84: f003 fb0e bl 800c2a4 <pbuf_copy_partial>
  20269. 8008c88: 42b0 cmp r0, r6
  20270. 8008c8a: d152 bne.n 8008d32 <dhcp_parse_reply+0x3e6>
  20271. if (decode_len > 4) {
  20272. 8008c8c: f1b8 0f04 cmp.w r8, #4
  20273. 8008c90: d92d bls.n 8008cee <dhcp_parse_reply+0x3a2>
  20274. LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;);
  20275. 8008c92: f018 0f03 tst.w r8, #3
  20276. 8008c96: d120 bne.n 8008cda <dhcp_parse_reply+0x38e>
  20277. dhcp_got_option(dhcp, decode_idx);
  20278. 8008c98: 4b48 ldr r3, [pc, #288] @ (8008dbc <dhcp_parse_reply+0x470>)
  20279. 8008c9a: 2201 movs r2, #1
  20280. 8008c9c: f803 2009 strb.w r2, [r3, r9]
  20281. dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value));
  20282. 8008ca0: 9805 ldr r0, [sp, #20]
  20283. 8008ca2: f7ff f8f0 bl 8007e86 <lwip_htonl>
  20284. 8008ca6: 4b46 ldr r3, [pc, #280] @ (8008dc0 <dhcp_parse_reply+0x474>)
  20285. 8008ca8: f843 0029 str.w r0, [r3, r9, lsl #2]
  20286. decode_len = (u8_t)(decode_len - 4);
  20287. 8008cac: f1a8 0804 sub.w r8, r8, #4
  20288. 8008cb0: fa5f f888 uxtb.w r8, r8
  20289. next_val_offset = (u16_t)(val_offset + 4);
  20290. 8008cb4: f10a 0304 add.w r3, sl, #4
  20291. 8008cb8: b29b uxth r3, r3
  20292. if (next_val_offset < val_offset) {
  20293. 8008cba: 459a cmp sl, r3
  20294. 8008cbc: d83c bhi.n 8008d38 <dhcp_parse_reply+0x3ec>
  20295. decode_idx++;
  20296. 8008cbe: f109 0901 add.w r9, r9, #1
  20297. val_offset = next_val_offset;
  20298. 8008cc2: 469a mov sl, r3
  20299. LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX);
  20300. 8008cc4: f1b9 0f07 cmp.w r9, #7
  20301. 8008cc8: d9ce bls.n 8008c68 <dhcp_parse_reply+0x31c>
  20302. 8008cca: 4b3e ldr r3, [pc, #248] @ (8008dc4 <dhcp_parse_reply+0x478>)
  20303. 8008ccc: f44f 62cf mov.w r2, #1656 @ 0x678
  20304. 8008cd0: 493d ldr r1, [pc, #244] @ (8008dc8 <dhcp_parse_reply+0x47c>)
  20305. 8008cd2: 483e ldr r0, [pc, #248] @ (8008dcc <dhcp_parse_reply+0x480>)
  20306. 8008cd4: f00a fb98 bl 8013408 <iprintf>
  20307. 8008cd8: e7c6 b.n 8008c68 <dhcp_parse_reply+0x31c>
  20308. LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;);
  20309. 8008cda: 4b3a ldr r3, [pc, #232] @ (8008dc4 <dhcp_parse_reply+0x478>)
  20310. 8008cdc: f240 6281 movw r2, #1665 @ 0x681
  20311. 8008ce0: 493b ldr r1, [pc, #236] @ (8008dd0 <dhcp_parse_reply+0x484>)
  20312. 8008ce2: 483a ldr r0, [pc, #232] @ (8008dcc <dhcp_parse_reply+0x480>)
  20313. 8008ce4: f00a fb90 bl 8013408 <iprintf>
  20314. 8008ce8: f06f 0005 mvn.w r0, #5
  20315. 8008cec: e059 b.n 8008da2 <dhcp_parse_reply+0x456>
  20316. } else if (decode_len == 4) {
  20317. 8008cee: 9e03 ldr r6, [sp, #12]
  20318. 8008cf0: f1b8 0f04 cmp.w r8, #4
  20319. 8008cf4: d00e beq.n 8008d14 <dhcp_parse_reply+0x3c8>
  20320. LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;);
  20321. 8008cf6: f1b8 0f01 cmp.w r8, #1
  20322. 8008cfa: d110 bne.n 8008d1e <dhcp_parse_reply+0x3d2>
  20323. value = ((u8_t *)&value)[0];
  20324. 8008cfc: f89d 3014 ldrb.w r3, [sp, #20]
  20325. 8008d00: 9305 str r3, [sp, #20]
  20326. dhcp_got_option(dhcp, decode_idx);
  20327. 8008d02: 4b2e ldr r3, [pc, #184] @ (8008dbc <dhcp_parse_reply+0x470>)
  20328. 8008d04: 2201 movs r2, #1
  20329. 8008d06: f803 2009 strb.w r2, [r3, r9]
  20330. dhcp_set_option_value(dhcp, decode_idx, value);
  20331. 8008d0a: 4b2d ldr r3, [pc, #180] @ (8008dc0 <dhcp_parse_reply+0x474>)
  20332. 8008d0c: 9a05 ldr r2, [sp, #20]
  20333. 8008d0e: f843 2029 str.w r2, [r3, r9, lsl #2]
  20334. 8008d12: e6de b.n 8008ad2 <dhcp_parse_reply+0x186>
  20335. value = lwip_ntohl(value);
  20336. 8008d14: 9805 ldr r0, [sp, #20]
  20337. 8008d16: f7ff f8b6 bl 8007e86 <lwip_htonl>
  20338. 8008d1a: 9005 str r0, [sp, #20]
  20339. 8008d1c: e7f1 b.n 8008d02 <dhcp_parse_reply+0x3b6>
  20340. LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;);
  20341. 8008d1e: 4b29 ldr r3, [pc, #164] @ (8008dc4 <dhcp_parse_reply+0x478>)
  20342. 8008d20: f44f 62d2 mov.w r2, #1680 @ 0x690
  20343. 8008d24: 492b ldr r1, [pc, #172] @ (8008dd4 <dhcp_parse_reply+0x488>)
  20344. 8008d26: 4829 ldr r0, [pc, #164] @ (8008dcc <dhcp_parse_reply+0x480>)
  20345. 8008d28: f00a fb6e bl 8013408 <iprintf>
  20346. 8008d2c: f06f 0005 mvn.w r0, #5
  20347. 8008d30: e037 b.n 8008da2 <dhcp_parse_reply+0x456>
  20348. return ERR_BUF;
  20349. 8008d32: f06f 0001 mvn.w r0, #1
  20350. 8008d36: e034 b.n 8008da2 <dhcp_parse_reply+0x456>
  20351. return ERR_BUF;
  20352. 8008d38: f06f 0001 mvn.w r0, #1
  20353. 8008d3c: e031 b.n 8008da2 <dhcp_parse_reply+0x456>
  20354. 8008d3e: 9e03 ldr r6, [sp, #12]
  20355. 8008d40: e6c7 b.n 8008ad2 <dhcp_parse_reply+0x186>
  20356. LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;);
  20357. 8008d42: 4b20 ldr r3, [pc, #128] @ (8008dc4 <dhcp_parse_reply+0x478>)
  20358. 8008d44: f240 629d movw r2, #1693 @ 0x69d
  20359. 8008d48: 4923 ldr r1, [pc, #140] @ (8008dd8 <dhcp_parse_reply+0x48c>)
  20360. 8008d4a: 4820 ldr r0, [pc, #128] @ (8008dcc <dhcp_parse_reply+0x480>)
  20361. 8008d4c: f00a fb5c bl 8013408 <iprintf>
  20362. 8008d50: f06f 0005 mvn.w r0, #5
  20363. 8008d54: e025 b.n 8008da2 <dhcp_parse_reply+0x456>
  20364. if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) {
  20365. 8008d56: 46d8 mov r8, fp
  20366. 8008d58: 4b18 ldr r3, [pc, #96] @ (8008dbc <dhcp_parse_reply+0x470>)
  20367. 8008d5a: 781b ldrb r3, [r3, #0]
  20368. 8008d5c: b153 cbz r3, 8008d74 <dhcp_parse_reply+0x428>
  20369. u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD);
  20370. 8008d5e: 4b18 ldr r3, [pc, #96] @ (8008dc0 <dhcp_parse_reply+0x474>)
  20371. 8008d60: 681b ldr r3, [r3, #0]
  20372. dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD);
  20373. 8008d62: 4a16 ldr r2, [pc, #88] @ (8008dbc <dhcp_parse_reply+0x470>)
  20374. 8008d64: 2100 movs r1, #0
  20375. 8008d66: 7011 strb r1, [r2, #0]
  20376. if (overload == DHCP_OVERLOAD_FILE) {
  20377. 8008d68: 2b01 cmp r3, #1
  20378. 8008d6a: d012 beq.n 8008d92 <dhcp_parse_reply+0x446>
  20379. } else if (overload == DHCP_OVERLOAD_SNAME) {
  20380. 8008d6c: 2b02 cmp r3, #2
  20381. 8008d6e: d009 beq.n 8008d84 <dhcp_parse_reply+0x438>
  20382. } else if (overload == DHCP_OVERLOAD_SNAME_FILE) {
  20383. 8008d70: 2b03 cmp r3, #3
  20384. 8008d72: d00c beq.n 8008d8e <dhcp_parse_reply+0x442>
  20385. } else if (parse_sname_as_options) {
  20386. 8008d74: f1b8 0f00 cmp.w r8, #0
  20387. 8008d78: d007 beq.n 8008d8a <dhcp_parse_reply+0x43e>
  20388. parse_sname_as_options = 0;
  20389. 8008d7a: f04f 0800 mov.w r8, #0
  20390. options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN;
  20391. 8008d7e: 246c movs r4, #108 @ 0x6c
  20392. options_idx = DHCP_SNAME_OFS;
  20393. 8008d80: 272c movs r7, #44 @ 0x2c
  20394. 8008d82: e5f2 b.n 800896a <dhcp_parse_reply+0x1e>
  20395. parse_sname_as_options = 1;
  20396. 8008d84: f04f 0801 mov.w r8, #1
  20397. 8008d88: e7f4 b.n 8008d74 <dhcp_parse_reply+0x428>
  20398. return ERR_OK;
  20399. 8008d8a: 2000 movs r0, #0
  20400. 8008d8c: e009 b.n 8008da2 <dhcp_parse_reply+0x456>
  20401. parse_sname_as_options = 1;
  20402. 8008d8e: f04f 0801 mov.w r8, #1
  20403. options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN;
  20404. 8008d92: 24ec movs r4, #236 @ 0xec
  20405. options_idx = DHCP_FILE_OFS;
  20406. 8008d94: 276c movs r7, #108 @ 0x6c
  20407. goto again;
  20408. 8008d96: e5e8 b.n 800896a <dhcp_parse_reply+0x1e>
  20409. return ERR_BUF;
  20410. 8008d98: f06f 0001 mvn.w r0, #1
  20411. }
  20412. 8008d9c: 4770 bx lr
  20413. return ERR_BUF;
  20414. 8008d9e: f06f 0001 mvn.w r0, #1
  20415. }
  20416. 8008da2: b007 add sp, #28
  20417. 8008da4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  20418. return ERR_BUF;
  20419. 8008da8: f06f 0001 mvn.w r0, #1
  20420. 8008dac: e7f9 b.n 8008da2 <dhcp_parse_reply+0x456>
  20421. return ERR_BUF;
  20422. 8008dae: f06f 0001 mvn.w r0, #1
  20423. 8008db2: e7f6 b.n 8008da2 <dhcp_parse_reply+0x456>
  20424. return ERR_BUF;
  20425. 8008db4: f06f 0001 mvn.w r0, #1
  20426. 8008db8: e7f3 b.n 8008da2 <dhcp_parse_reply+0x456>
  20427. 8008dba: bf00 nop
  20428. 8008dbc: 24012f00 .word 0x24012f00
  20429. 8008dc0: 24012f08 .word 0x24012f08
  20430. 8008dc4: 08014e34 .word 0x08014e34
  20431. 8008dc8: 08015108 .word 0x08015108
  20432. 8008dcc: 080144e8 .word 0x080144e8
  20433. 8008dd0: 0801511c .word 0x0801511c
  20434. 8008dd4: 08015134 .word 0x08015134
  20435. 8008dd8: 08015148 .word 0x08015148
  20436. 08008ddc <dhcp_recv>:
  20437. {
  20438. 8008ddc: b570 push {r4, r5, r6, lr}
  20439. 8008dde: 4614 mov r4, r2
  20440. struct netif *netif = ip_current_input_netif();
  20441. 8008de0: 4b36 ldr r3, [pc, #216] @ (8008ebc <dhcp_recv+0xe0>)
  20442. 8008de2: 685d ldr r5, [r3, #4]
  20443. struct dhcp *dhcp = netif_dhcp_data(netif);
  20444. 8008de4: 6a6e ldr r6, [r5, #36] @ 0x24
  20445. struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload;
  20446. 8008de6: 6852 ldr r2, [r2, #4]
  20447. if ((dhcp == NULL) || (dhcp->pcb_allocated == 0)) {
  20448. 8008de8: b1f6 cbz r6, 8008e28 <dhcp_recv+0x4c>
  20449. 8008dea: 7933 ldrb r3, [r6, #4]
  20450. 8008dec: b1e3 cbz r3, 8008e28 <dhcp_recv+0x4c>
  20451. if (p->len < DHCP_MIN_REPLY_LEN) {
  20452. 8008dee: 8963 ldrh r3, [r4, #10]
  20453. 8008df0: 2b2b cmp r3, #43 @ 0x2b
  20454. 8008df2: d919 bls.n 8008e28 <dhcp_recv+0x4c>
  20455. if (reply_msg->op != DHCP_BOOTREPLY) {
  20456. 8008df4: 7813 ldrb r3, [r2, #0]
  20457. 8008df6: 2b02 cmp r3, #2
  20458. 8008df8: d116 bne.n 8008e28 <dhcp_recv+0x4c>
  20459. for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
  20460. 8008dfa: 2300 movs r3, #0
  20461. 8008dfc: f895 1030 ldrb.w r1, [r5, #48] @ 0x30
  20462. 8008e00: 4299 cmp r1, r3
  20463. 8008e02: d90b bls.n 8008e1c <dhcp_recv+0x40>
  20464. 8008e04: 2b05 cmp r3, #5
  20465. 8008e06: d809 bhi.n 8008e1c <dhcp_recv+0x40>
  20466. if (netif->hwaddr[i] != reply_msg->chaddr[i]) {
  20467. 8008e08: 18e9 adds r1, r5, r3
  20468. 8008e0a: f891 002a ldrb.w r0, [r1, #42] @ 0x2a
  20469. 8008e0e: 18d1 adds r1, r2, r3
  20470. 8008e10: 7f09 ldrb r1, [r1, #28]
  20471. 8008e12: 4288 cmp r0, r1
  20472. 8008e14: d108 bne.n 8008e28 <dhcp_recv+0x4c>
  20473. for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) {
  20474. 8008e16: 3301 adds r3, #1
  20475. 8008e18: b2db uxtb r3, r3
  20476. 8008e1a: e7ef b.n 8008dfc <dhcp_recv+0x20>
  20477. if (lwip_ntohl(reply_msg->xid) != dhcp->xid) {
  20478. 8008e1c: 6850 ldr r0, [r2, #4]
  20479. 8008e1e: f7ff f832 bl 8007e86 <lwip_htonl>
  20480. 8008e22: 6833 ldr r3, [r6, #0]
  20481. 8008e24: 4298 cmp r0, r3
  20482. 8008e26: d003 beq.n 8008e30 <dhcp_recv+0x54>
  20483. pbuf_free(p);
  20484. 8008e28: 4620 mov r0, r4
  20485. 8008e2a: f002 ffb9 bl 800bda0 <pbuf_free>
  20486. }
  20487. 8008e2e: bd70 pop {r4, r5, r6, pc}
  20488. if (dhcp_parse_reply(p, dhcp) != ERR_OK) {
  20489. 8008e30: 4631 mov r1, r6
  20490. 8008e32: 4620 mov r0, r4
  20491. 8008e34: f7ff fd8a bl 800894c <dhcp_parse_reply>
  20492. 8008e38: 2800 cmp r0, #0
  20493. 8008e3a: d1f5 bne.n 8008e28 <dhcp_recv+0x4c>
  20494. if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) {
  20495. 8008e3c: 4b20 ldr r3, [pc, #128] @ (8008ec0 <dhcp_recv+0xe4>)
  20496. 8008e3e: 785b ldrb r3, [r3, #1]
  20497. 8008e40: 2b00 cmp r3, #0
  20498. 8008e42: d0f1 beq.n 8008e28 <dhcp_recv+0x4c>
  20499. msg_in = (struct dhcp_msg *)p->payload;
  20500. 8008e44: 6861 ldr r1, [r4, #4]
  20501. msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE);
  20502. 8008e46: 4b1f ldr r3, [pc, #124] @ (8008ec4 <dhcp_recv+0xe8>)
  20503. 8008e48: 791b ldrb r3, [r3, #4]
  20504. if (msg_type == DHCP_ACK) {
  20505. 8008e4a: 2b05 cmp r3, #5
  20506. 8008e4c: d00a beq.n 8008e64 <dhcp_recv+0x88>
  20507. else if ((msg_type == DHCP_NAK) &&
  20508. 8008e4e: 2b06 cmp r3, #6
  20509. 8008e50: d026 beq.n 8008ea0 <dhcp_recv+0xc4>
  20510. else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) {
  20511. 8008e52: 2b02 cmp r3, #2
  20512. 8008e54: d1e8 bne.n 8008e28 <dhcp_recv+0x4c>
  20513. 8008e56: 7973 ldrb r3, [r6, #5]
  20514. 8008e58: 2b06 cmp r3, #6
  20515. 8008e5a: d1e5 bne.n 8008e28 <dhcp_recv+0x4c>
  20516. dhcp_handle_offer(netif, msg_in);
  20517. 8008e5c: 4628 mov r0, r5
  20518. 8008e5e: f7ff fb73 bl 8008548 <dhcp_handle_offer>
  20519. 8008e62: e7e1 b.n 8008e28 <dhcp_recv+0x4c>
  20520. if (dhcp->state == DHCP_STATE_REQUESTING) {
  20521. 8008e64: 7973 ldrb r3, [r6, #5]
  20522. 8008e66: 2b01 cmp r3, #1
  20523. 8008e68: d00a beq.n 8008e80 <dhcp_recv+0xa4>
  20524. else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) ||
  20525. 8008e6a: 3b03 subs r3, #3
  20526. 8008e6c: b2db uxtb r3, r3
  20527. 8008e6e: 2b02 cmp r3, #2
  20528. 8008e70: d8da bhi.n 8008e28 <dhcp_recv+0x4c>
  20529. dhcp_handle_ack(netif, msg_in);
  20530. 8008e72: 4628 mov r0, r5
  20531. 8008e74: f7ff f936 bl 80080e4 <dhcp_handle_ack>
  20532. dhcp_bind(netif);
  20533. 8008e78: 4628 mov r0, r5
  20534. 8008e7a: f7ff fc5d bl 8008738 <dhcp_bind>
  20535. 8008e7e: e7d3 b.n 8008e28 <dhcp_recv+0x4c>
  20536. dhcp_handle_ack(netif, msg_in);
  20537. 8008e80: 4628 mov r0, r5
  20538. 8008e82: f7ff f92f bl 80080e4 <dhcp_handle_ack>
  20539. if ((netif->flags & NETIF_FLAG_ETHARP) != 0) {
  20540. 8008e86: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
  20541. 8008e8a: f013 0f08 tst.w r3, #8
  20542. 8008e8e: d003 beq.n 8008e98 <dhcp_recv+0xbc>
  20543. dhcp_check(netif);
  20544. 8008e90: 4628 mov r0, r5
  20545. 8008e92: f7ff fc3b bl 800870c <dhcp_check>
  20546. 8008e96: e7c7 b.n 8008e28 <dhcp_recv+0x4c>
  20547. dhcp_bind(netif);
  20548. 8008e98: 4628 mov r0, r5
  20549. 8008e9a: f7ff fc4d bl 8008738 <dhcp_bind>
  20550. 8008e9e: e7c3 b.n 8008e28 <dhcp_recv+0x4c>
  20551. ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
  20552. 8008ea0: 7972 ldrb r2, [r6, #5]
  20553. else if ((msg_type == DHCP_NAK) &&
  20554. 8008ea2: 2a01 cmp r2, #1
  20555. 8008ea4: bf18 it ne
  20556. 8008ea6: 2a03 cmpne r2, #3
  20557. 8008ea8: d003 beq.n 8008eb2 <dhcp_recv+0xd6>
  20558. ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) ||
  20559. 8008eaa: 2a04 cmp r2, #4
  20560. 8008eac: d001 beq.n 8008eb2 <dhcp_recv+0xd6>
  20561. (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) {
  20562. 8008eae: 2a05 cmp r2, #5
  20563. 8008eb0: d1cf bne.n 8008e52 <dhcp_recv+0x76>
  20564. dhcp_handle_nak(netif);
  20565. 8008eb2: 4628 mov r0, r5
  20566. 8008eb4: f7ff fcd6 bl 8008864 <dhcp_handle_nak>
  20567. 8008eb8: e7b6 b.n 8008e28 <dhcp_recv+0x4c>
  20568. 8008eba: bf00 nop
  20569. 8008ebc: 2401301c .word 0x2401301c
  20570. 8008ec0: 24012f00 .word 0x24012f00
  20571. 8008ec4: 24012f08 .word 0x24012f08
  20572. 08008ec8 <dhcp_network_changed>:
  20573. {
  20574. 8008ec8: b538 push {r3, r4, r5, lr}
  20575. struct dhcp *dhcp = netif_dhcp_data(netif);
  20576. 8008eca: 6a45 ldr r5, [r0, #36] @ 0x24
  20577. if (!dhcp) {
  20578. 8008ecc: b135 cbz r5, 8008edc <dhcp_network_changed+0x14>
  20579. 8008ece: 4604 mov r4, r0
  20580. switch (dhcp->state) {
  20581. 8008ed0: 796b ldrb r3, [r5, #5]
  20582. 8008ed2: 2b05 cmp r3, #5
  20583. 8008ed4: d803 bhi.n 8008ede <dhcp_network_changed+0x16>
  20584. 8008ed6: 2b03 cmp r3, #3
  20585. 8008ed8: d203 bcs.n 8008ee2 <dhcp_network_changed+0x1a>
  20586. 8008eda: b943 cbnz r3, 8008eee <dhcp_network_changed+0x26>
  20587. }
  20588. 8008edc: bd38 pop {r3, r4, r5, pc}
  20589. switch (dhcp->state) {
  20590. 8008ede: 2b0a cmp r3, #10
  20591. 8008ee0: d105 bne.n 8008eee <dhcp_network_changed+0x26>
  20592. dhcp->tries = 0;
  20593. 8008ee2: 2300 movs r3, #0
  20594. 8008ee4: 71ab strb r3, [r5, #6]
  20595. dhcp_reboot(netif);
  20596. 8008ee6: 4620 mov r0, r4
  20597. 8008ee8: f7ff f9e6 bl 80082b8 <dhcp_reboot>
  20598. break;
  20599. 8008eec: e7f6 b.n 8008edc <dhcp_network_changed+0x14>
  20600. LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
  20601. 8008eee: 2b0c cmp r3, #12
  20602. 8008ef0: d805 bhi.n 8008efe <dhcp_network_changed+0x36>
  20603. dhcp->tries = 0;
  20604. 8008ef2: 2300 movs r3, #0
  20605. 8008ef4: 71ab strb r3, [r5, #6]
  20606. dhcp_discover(netif);
  20607. 8008ef6: 4620 mov r0, r4
  20608. 8008ef8: f7ff fb40 bl 800857c <dhcp_discover>
  20609. break;
  20610. 8008efc: e7ee b.n 8008edc <dhcp_network_changed+0x14>
  20611. LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF);
  20612. 8008efe: 4b04 ldr r3, [pc, #16] @ (8008f10 <dhcp_network_changed+0x48>)
  20613. 8008f00: f240 326d movw r2, #877 @ 0x36d
  20614. 8008f04: 4903 ldr r1, [pc, #12] @ (8008f14 <dhcp_network_changed+0x4c>)
  20615. 8008f06: 4804 ldr r0, [pc, #16] @ (8008f18 <dhcp_network_changed+0x50>)
  20616. 8008f08: f00a fa7e bl 8013408 <iprintf>
  20617. 8008f0c: e7f1 b.n 8008ef2 <dhcp_network_changed+0x2a>
  20618. 8008f0e: bf00 nop
  20619. 8008f10: 08014e34 .word 0x08014e34
  20620. 8008f14: 08015190 .word 0x08015190
  20621. 8008f18: 080144e8 .word 0x080144e8
  20622. 08008f1c <dhcp_arp_reply>:
  20623. {
  20624. 8008f1c: b508 push {r3, lr}
  20625. LWIP_ERROR("netif != NULL", (netif != NULL), return;);
  20626. 8008f1e: b130 cbz r0, 8008f2e <dhcp_arp_reply+0x12>
  20627. 8008f20: 4602 mov r2, r0
  20628. dhcp = netif_dhcp_data(netif);
  20629. 8008f22: 6a43 ldr r3, [r0, #36] @ 0x24
  20630. if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) {
  20631. 8008f24: b113 cbz r3, 8008f2c <dhcp_arp_reply+0x10>
  20632. 8008f26: 7958 ldrb r0, [r3, #5]
  20633. 8008f28: 2808 cmp r0, #8
  20634. 8008f2a: d008 beq.n 8008f3e <dhcp_arp_reply+0x22>
  20635. }
  20636. 8008f2c: bd08 pop {r3, pc}
  20637. LWIP_ERROR("netif != NULL", (netif != NULL), return;);
  20638. 8008f2e: 4b08 ldr r3, [pc, #32] @ (8008f50 <dhcp_arp_reply+0x34>)
  20639. 8008f30: f240 328b movw r2, #907 @ 0x38b
  20640. 8008f34: 4907 ldr r1, [pc, #28] @ (8008f54 <dhcp_arp_reply+0x38>)
  20641. 8008f36: 4808 ldr r0, [pc, #32] @ (8008f58 <dhcp_arp_reply+0x3c>)
  20642. 8008f38: f00a fa66 bl 8013408 <iprintf>
  20643. 8008f3c: e7f6 b.n 8008f2c <dhcp_arp_reply+0x10>
  20644. if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) {
  20645. 8008f3e: 6809 ldr r1, [r1, #0]
  20646. 8008f40: 69db ldr r3, [r3, #28]
  20647. 8008f42: 4299 cmp r1, r3
  20648. 8008f44: d1f2 bne.n 8008f2c <dhcp_arp_reply+0x10>
  20649. dhcp_decline(netif);
  20650. 8008f46: 4610 mov r0, r2
  20651. 8008f48: f7ff fb92 bl 8008670 <dhcp_decline>
  20652. 8008f4c: e7ee b.n 8008f2c <dhcp_arp_reply+0x10>
  20653. 8008f4e: bf00 nop
  20654. 8008f50: 08014e34 .word 0x08014e34
  20655. 8008f54: 080144d8 .word 0x080144d8
  20656. 8008f58: 080144e8 .word 0x080144e8
  20657. 08008f5c <dhcp_renew>:
  20658. {
  20659. 8008f5c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  20660. 8008f60: b084 sub sp, #16
  20661. 8008f62: 4607 mov r7, r0
  20662. struct dhcp *dhcp = netif_dhcp_data(netif);
  20663. 8008f64: 6a45 ldr r5, [r0, #36] @ 0x24
  20664. LWIP_ASSERT_CORE_LOCKED();
  20665. 8008f66: f7fa fdd1 bl 8003b0c <sys_check_core_locking>
  20666. dhcp_set_state(dhcp, DHCP_STATE_RENEWING);
  20667. 8008f6a: 2105 movs r1, #5
  20668. 8008f6c: 4628 mov r0, r5
  20669. 8008f6e: f7fe ff96 bl 8007e9e <dhcp_set_state>
  20670. p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len);
  20671. 8008f72: f10d 030e add.w r3, sp, #14
  20672. 8008f76: 2203 movs r2, #3
  20673. 8008f78: 4629 mov r1, r5
  20674. 8008f7a: 4638 mov r0, r7
  20675. 8008f7c: f7ff f814 bl 8007fa8 <dhcp_create_msg>
  20676. if (p_out != NULL) {
  20677. 8008f80: 2800 cmp r0, #0
  20678. 8008f82: d049 beq.n 8009018 <dhcp_renew+0xbc>
  20679. 8008f84: 4680 mov r8, r0
  20680. struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
  20681. 8008f86: 6846 ldr r6, [r0, #4]
  20682. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN);
  20683. 8008f88: 36f0 adds r6, #240 @ 0xf0
  20684. 8008f8a: 2302 movs r3, #2
  20685. 8008f8c: 2239 movs r2, #57 @ 0x39
  20686. 8008f8e: 4631 mov r1, r6
  20687. 8008f90: f8bd 000e ldrh.w r0, [sp, #14]
  20688. 8008f94: f7fe ffaa bl 8007eec <dhcp_option>
  20689. 8008f98: f8ad 000e strh.w r0, [sp, #14]
  20690. options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif));
  20691. 8008f9c: 8d3a ldrh r2, [r7, #40] @ 0x28
  20692. 8008f9e: 4631 mov r1, r6
  20693. 8008fa0: f7fe ff86 bl 8007eb0 <dhcp_option_short>
  20694. 8008fa4: f8ad 000e strh.w r0, [sp, #14]
  20695. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options));
  20696. 8008fa8: 2303 movs r3, #3
  20697. 8008faa: 2237 movs r2, #55 @ 0x37
  20698. 8008fac: 4631 mov r1, r6
  20699. 8008fae: f7fe ff9d bl 8007eec <dhcp_option>
  20700. 8008fb2: f8ad 000e strh.w r0, [sp, #14]
  20701. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  20702. 8008fb6: 2400 movs r4, #0
  20703. 8008fb8: e00a b.n 8008fd0 <dhcp_renew+0x74>
  20704. options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
  20705. 8008fba: 4b20 ldr r3, [pc, #128] @ (800903c <dhcp_renew+0xe0>)
  20706. 8008fbc: 5d1a ldrb r2, [r3, r4]
  20707. 8008fbe: 4631 mov r1, r6
  20708. 8008fc0: f8bd 000e ldrh.w r0, [sp, #14]
  20709. 8008fc4: f7fe ffb0 bl 8007f28 <dhcp_option_byte>
  20710. 8008fc8: f8ad 000e strh.w r0, [sp, #14]
  20711. for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
  20712. 8008fcc: 3401 adds r4, #1
  20713. 8008fce: b2e4 uxtb r4, r4
  20714. 8008fd0: 2c02 cmp r4, #2
  20715. 8008fd2: d9f2 bls.n 8008fba <dhcp_renew+0x5e>
  20716. dhcp_option_trailer(options_out_len, msg_out->options, p_out);
  20717. 8008fd4: 4642 mov r2, r8
  20718. 8008fd6: 4631 mov r1, r6
  20719. 8008fd8: f8bd 000e ldrh.w r0, [sp, #14]
  20720. 8008fdc: f7ff f8c0 bl 8008160 <dhcp_option_trailer>
  20721. result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
  20722. 8008fe0: 9700 str r7, [sp, #0]
  20723. 8008fe2: 2343 movs r3, #67 @ 0x43
  20724. 8008fe4: f105 0218 add.w r2, r5, #24
  20725. 8008fe8: 4641 mov r1, r8
  20726. 8008fea: 4815 ldr r0, [pc, #84] @ (8009040 <dhcp_renew+0xe4>)
  20727. 8008fec: 6800 ldr r0, [r0, #0]
  20728. 8008fee: f008 fe15 bl 8011c1c <udp_sendto_if>
  20729. 8008ff2: 4604 mov r4, r0
  20730. pbuf_free(p_out);
  20731. 8008ff4: 4640 mov r0, r8
  20732. 8008ff6: f002 fed3 bl 800bda0 <pbuf_free>
  20733. if (dhcp->tries < 255) {
  20734. 8008ffa: 79ab ldrb r3, [r5, #6]
  20735. 8008ffc: 2bff cmp r3, #255 @ 0xff
  20736. 8008ffe: d001 beq.n 8009004 <dhcp_renew+0xa8>
  20737. dhcp->tries++;
  20738. 8009000: 3301 adds r3, #1
  20739. 8009002: 71ab strb r3, [r5, #6]
  20740. msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000);
  20741. 8009004: 79ab ldrb r3, [r5, #6]
  20742. 8009006: 2b09 cmp r3, #9
  20743. 8009008: d809 bhi.n 800901e <dhcp_renew+0xc2>
  20744. 800900a: ebc3 1243 rsb r2, r3, r3, lsl #5
  20745. 800900e: eb03 0382 add.w r3, r3, r2, lsl #2
  20746. 8009012: 011b lsls r3, r3, #4
  20747. 8009014: b29b uxth r3, r3
  20748. 8009016: e004 b.n 8009022 <dhcp_renew+0xc6>
  20749. result = ERR_MEM;
  20750. 8009018: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  20751. 800901c: e7ed b.n 8008ffa <dhcp_renew+0x9e>
  20752. msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000);
  20753. 800901e: f644 6320 movw r3, #20000 @ 0x4e20
  20754. dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS);
  20755. 8009022: f203 13f3 addw r3, r3, #499 @ 0x1f3
  20756. 8009026: 4a07 ldr r2, [pc, #28] @ (8009044 <dhcp_renew+0xe8>)
  20757. 8009028: fb82 1203 smull r1, r2, r2, r3
  20758. 800902c: 17db asrs r3, r3, #31
  20759. 800902e: ebc3 1362 rsb r3, r3, r2, asr #5
  20760. 8009032: 812b strh r3, [r5, #8]
  20761. }
  20762. 8009034: 4620 mov r0, r4
  20763. 8009036: b004 add sp, #16
  20764. 8009038: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  20765. 800903c: 080151c8 .word 0x080151c8
  20766. 8009040: 24012efc .word 0x24012efc
  20767. 8009044: 10624dd3 .word 0x10624dd3
  20768. 08009048 <dhcp_t1_timeout>:
  20769. {
  20770. 8009048: b510 push {r4, lr}
  20771. struct dhcp *dhcp = netif_dhcp_data(netif);
  20772. 800904a: 6a44 ldr r4, [r0, #36] @ 0x24
  20773. if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) ||
  20774. 800904c: 7963 ldrb r3, [r4, #5]
  20775. 800904e: 2b0a cmp r3, #10
  20776. 8009050: bf18 it ne
  20777. 8009052: 2b01 cmpne r3, #1
  20778. 8009054: d002 beq.n 800905c <dhcp_t1_timeout+0x14>
  20779. 8009056: 2b05 cmp r3, #5
  20780. 8009058: d000 beq.n 800905c <dhcp_t1_timeout+0x14>
  20781. }
  20782. 800905a: bd10 pop {r4, pc}
  20783. dhcp_renew(netif);
  20784. 800905c: f7ff ff7e bl 8008f5c <dhcp_renew>
  20785. if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) {
  20786. 8009060: 89a3 ldrh r3, [r4, #12]
  20787. 8009062: 8a62 ldrh r2, [r4, #18]
  20788. 8009064: 1a9b subs r3, r3, r2
  20789. 8009066: 2b01 cmp r3, #1
  20790. 8009068: ddf7 ble.n 800905a <dhcp_t1_timeout+0x12>
  20791. dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2);
  20792. 800906a: 461a mov r2, r3
  20793. 800906c: 2b00 cmp r3, #0
  20794. 800906e: db03 blt.n 8009078 <dhcp_t1_timeout+0x30>
  20795. 8009070: f3c2 024f ubfx r2, r2, #1, #16
  20796. 8009074: 81e2 strh r2, [r4, #14]
  20797. }
  20798. 8009076: e7f0 b.n 800905a <dhcp_t1_timeout+0x12>
  20799. dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2);
  20800. 8009078: 1c5a adds r2, r3, #1
  20801. 800907a: e7f9 b.n 8009070 <dhcp_t1_timeout+0x28>
  20802. 0800907c <dhcp_supplied_address>:
  20803. * 0 otherwise
  20804. */
  20805. u8_t
  20806. dhcp_supplied_address(const struct netif *netif)
  20807. {
  20808. if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) {
  20809. 800907c: b178 cbz r0, 800909e <dhcp_supplied_address+0x22>
  20810. 800907e: 6a43 ldr r3, [r0, #36] @ 0x24
  20811. 8009080: b17b cbz r3, 80090a2 <dhcp_supplied_address+0x26>
  20812. struct dhcp *dhcp = netif_dhcp_data(netif);
  20813. return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) ||
  20814. 8009082: 795b ldrb r3, [r3, #5]
  20815. 8009084: 2b05 cmp r3, #5
  20816. 8009086: bf18 it ne
  20817. 8009088: 2b0a cmpne r3, #10
  20818. 800908a: d005 beq.n 8009098 <dhcp_supplied_address+0x1c>
  20819. 800908c: 2b04 cmp r3, #4
  20820. 800908e: d001 beq.n 8009094 <dhcp_supplied_address+0x18>
  20821. 8009090: 2000 movs r0, #0
  20822. 8009092: e002 b.n 800909a <dhcp_supplied_address+0x1e>
  20823. 8009094: 2001 movs r0, #1
  20824. 8009096: e000 b.n 800909a <dhcp_supplied_address+0x1e>
  20825. 8009098: 2001 movs r0, #1
  20826. 800909a: b2c0 uxtb r0, r0
  20827. 800909c: 4770 bx lr
  20828. (dhcp->state == DHCP_STATE_REBINDING);
  20829. }
  20830. return 0;
  20831. 800909e: 2000 movs r0, #0
  20832. 80090a0: 4770 bx lr
  20833. 80090a2: 2000 movs r0, #0
  20834. }
  20835. 80090a4: 4770 bx lr
  20836. ...
  20837. 080090a8 <dhcp_release_and_stop>:
  20838. {
  20839. 80090a8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  20840. 80090ac: b084 sub sp, #16
  20841. 80090ae: 4605 mov r5, r0
  20842. struct dhcp *dhcp = netif_dhcp_data(netif);
  20843. 80090b0: 6a44 ldr r4, [r0, #36] @ 0x24
  20844. LWIP_ASSERT_CORE_LOCKED();
  20845. 80090b2: f7fa fd2b bl 8003b0c <sys_check_core_locking>
  20846. if (dhcp == NULL) {
  20847. 80090b6: b1fc cbz r4, 80090f8 <dhcp_release_and_stop+0x50>
  20848. if (dhcp->state == DHCP_STATE_OFF) {
  20849. 80090b8: 7963 ldrb r3, [r4, #5]
  20850. 80090ba: b1eb cbz r3, 80090f8 <dhcp_release_and_stop+0x50>
  20851. ip_addr_copy(server_ip_addr, dhcp->server_ip_addr);
  20852. 80090bc: 69a3 ldr r3, [r4, #24]
  20853. 80090be: 9303 str r3, [sp, #12]
  20854. ip_addr_set_zero_ip4(&dhcp->server_ip_addr);
  20855. 80090c0: 2300 movs r3, #0
  20856. 80090c2: 61a3 str r3, [r4, #24]
  20857. ip4_addr_set_zero(&dhcp->offered_ip_addr);
  20858. 80090c4: 61e3 str r3, [r4, #28]
  20859. ip4_addr_set_zero(&dhcp->offered_sn_mask);
  20860. 80090c6: 6223 str r3, [r4, #32]
  20861. ip4_addr_set_zero(&dhcp->offered_gw_addr);
  20862. 80090c8: 6263 str r3, [r4, #36] @ 0x24
  20863. dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0;
  20864. 80090ca: 6323 str r3, [r4, #48] @ 0x30
  20865. 80090cc: 62e3 str r3, [r4, #44] @ 0x2c
  20866. 80090ce: 62a3 str r3, [r4, #40] @ 0x28
  20867. dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0;
  20868. 80090d0: 82a3 strh r3, [r4, #20]
  20869. 80090d2: 8263 strh r3, [r4, #18]
  20870. 80090d4: 8223 strh r3, [r4, #16]
  20871. 80090d6: 81e3 strh r3, [r4, #14]
  20872. if (dhcp_supplied_address(netif)) {
  20873. 80090d8: 4628 mov r0, r5
  20874. 80090da: f7ff ffcf bl 800907c <dhcp_supplied_address>
  20875. 80090de: b970 cbnz r0, 80090fe <dhcp_release_and_stop+0x56>
  20876. netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
  20877. 80090e0: 4921 ldr r1, [pc, #132] @ (8009168 <dhcp_release_and_stop+0xc0>)
  20878. 80090e2: 460b mov r3, r1
  20879. 80090e4: 460a mov r2, r1
  20880. 80090e6: 4628 mov r0, r5
  20881. 80090e8: f002 fbb0 bl 800b84c <netif_set_addr>
  20882. dhcp_set_state(dhcp, DHCP_STATE_OFF);
  20883. 80090ec: 2100 movs r1, #0
  20884. 80090ee: 4620 mov r0, r4
  20885. 80090f0: f7fe fed5 bl 8007e9e <dhcp_set_state>
  20886. if (dhcp->pcb_allocated != 0) {
  20887. 80090f4: 7923 ldrb r3, [r4, #4]
  20888. 80090f6: bb93 cbnz r3, 800915e <dhcp_release_and_stop+0xb6>
  20889. }
  20890. 80090f8: b004 add sp, #16
  20891. 80090fa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  20892. p_out = dhcp_create_msg(netif, dhcp, DHCP_RELEASE, &options_out_len);
  20893. 80090fe: f10d 030a add.w r3, sp, #10
  20894. 8009102: 2207 movs r2, #7
  20895. 8009104: 4621 mov r1, r4
  20896. 8009106: 4628 mov r0, r5
  20897. 8009108: f7fe ff4e bl 8007fa8 <dhcp_create_msg>
  20898. if (p_out != NULL) {
  20899. 800910c: 4607 mov r7, r0
  20900. 800910e: 2800 cmp r0, #0
  20901. 8009110: d0e6 beq.n 80090e0 <dhcp_release_and_stop+0x38>
  20902. struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload;
  20903. 8009112: 6846 ldr r6, [r0, #4]
  20904. options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4);
  20905. 8009114: 36f0 adds r6, #240 @ 0xf0
  20906. 8009116: 2304 movs r3, #4
  20907. 8009118: 2236 movs r2, #54 @ 0x36
  20908. 800911a: 4631 mov r1, r6
  20909. 800911c: f8bd 000a ldrh.w r0, [sp, #10]
  20910. 8009120: f7fe fee4 bl 8007eec <dhcp_option>
  20911. 8009124: 4680 mov r8, r0
  20912. 8009126: f8ad 000a strh.w r0, [sp, #10]
  20913. options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr))));
  20914. 800912a: 9803 ldr r0, [sp, #12]
  20915. 800912c: f7fe feab bl 8007e86 <lwip_htonl>
  20916. 8009130: 4602 mov r2, r0
  20917. 8009132: 4631 mov r1, r6
  20918. 8009134: 4640 mov r0, r8
  20919. 8009136: f7fe ff0f bl 8007f58 <dhcp_option_long>
  20920. 800913a: f8ad 000a strh.w r0, [sp, #10]
  20921. dhcp_option_trailer(options_out_len, msg_out->options, p_out);
  20922. 800913e: 463a mov r2, r7
  20923. 8009140: 4631 mov r1, r6
  20924. 8009142: f7ff f80d bl 8008160 <dhcp_option_trailer>
  20925. udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif);
  20926. 8009146: 9500 str r5, [sp, #0]
  20927. 8009148: 2343 movs r3, #67 @ 0x43
  20928. 800914a: aa03 add r2, sp, #12
  20929. 800914c: 4639 mov r1, r7
  20930. 800914e: 4807 ldr r0, [pc, #28] @ (800916c <dhcp_release_and_stop+0xc4>)
  20931. 8009150: 6800 ldr r0, [r0, #0]
  20932. 8009152: f008 fd63 bl 8011c1c <udp_sendto_if>
  20933. pbuf_free(p_out);
  20934. 8009156: 4638 mov r0, r7
  20935. 8009158: f002 fe22 bl 800bda0 <pbuf_free>
  20936. LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n"));
  20937. 800915c: e7c0 b.n 80090e0 <dhcp_release_and_stop+0x38>
  20938. dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
  20939. 800915e: f7ff fb93 bl 8008888 <dhcp_dec_pcb_refcount>
  20940. dhcp->pcb_allocated = 0;
  20941. 8009162: 2300 movs r3, #0
  20942. 8009164: 7123 strb r3, [r4, #4]
  20943. 8009166: e7c7 b.n 80090f8 <dhcp_release_and_stop+0x50>
  20944. 8009168: 080156d8 .word 0x080156d8
  20945. 800916c: 24012efc .word 0x24012efc
  20946. 08009170 <dhcp_start>:
  20947. {
  20948. 8009170: b570 push {r4, r5, r6, lr}
  20949. 8009172: 4604 mov r4, r0
  20950. LWIP_ASSERT_CORE_LOCKED();
  20951. 8009174: f7fa fcca bl 8003b0c <sys_check_core_locking>
  20952. LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
  20953. 8009178: b324 cbz r4, 80091c4 <dhcp_start+0x54>
  20954. LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;);
  20955. 800917a: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
  20956. 800917e: f013 0f01 tst.w r3, #1
  20957. 8009182: d029 beq.n 80091d8 <dhcp_start+0x68>
  20958. dhcp = netif_dhcp_data(netif);
  20959. 8009184: 6a65 ldr r5, [r4, #36] @ 0x24
  20960. if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) {
  20961. 8009186: 8d23 ldrh r3, [r4, #40] @ 0x28
  20962. 8009188: f5b3 7f10 cmp.w r3, #576 @ 0x240
  20963. 800918c: d343 bcc.n 8009216 <dhcp_start+0xa6>
  20964. if (dhcp == NULL) {
  20965. 800918e: b36d cbz r5, 80091ec <dhcp_start+0x7c>
  20966. if (dhcp->pcb_allocated != 0) {
  20967. 8009190: 792b ldrb r3, [r5, #4]
  20968. 8009192: bb93 cbnz r3, 80091fa <dhcp_start+0x8a>
  20969. memset(dhcp, 0, sizeof(struct dhcp));
  20970. 8009194: 2234 movs r2, #52 @ 0x34
  20971. 8009196: 2100 movs r1, #0
  20972. 8009198: 4628 mov r0, r5
  20973. 800919a: f00a fa8d bl 80136b8 <memset>
  20974. if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */
  20975. 800919e: f7ff fb97 bl 80088d0 <dhcp_inc_pcb_refcount>
  20976. 80091a2: 4606 mov r6, r0
  20977. 80091a4: 2800 cmp r0, #0
  20978. 80091a6: d13c bne.n 8009222 <dhcp_start+0xb2>
  20979. dhcp->pcb_allocated = 1;
  20980. 80091a8: 2301 movs r3, #1
  20981. 80091aa: 712b strb r3, [r5, #4]
  20982. if (!netif_is_link_up(netif)) {
  20983. 80091ac: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
  20984. 80091b0: f013 0f04 tst.w r3, #4
  20985. 80091b4: d024 beq.n 8009200 <dhcp_start+0x90>
  20986. result = dhcp_discover(netif);
  20987. 80091b6: 4620 mov r0, r4
  20988. 80091b8: f7ff f9e0 bl 800857c <dhcp_discover>
  20989. if (result != ERR_OK) {
  20990. 80091bc: 4606 mov r6, r0
  20991. 80091be: bb20 cbnz r0, 800920a <dhcp_start+0x9a>
  20992. }
  20993. 80091c0: 4630 mov r0, r6
  20994. 80091c2: bd70 pop {r4, r5, r6, pc}
  20995. LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;);
  20996. 80091c4: 4b18 ldr r3, [pc, #96] @ (8009228 <dhcp_start+0xb8>)
  20997. 80091c6: f240 22e7 movw r2, #743 @ 0x2e7
  20998. 80091ca: 4918 ldr r1, [pc, #96] @ (800922c <dhcp_start+0xbc>)
  20999. 80091cc: 4818 ldr r0, [pc, #96] @ (8009230 <dhcp_start+0xc0>)
  21000. 80091ce: f00a f91b bl 8013408 <iprintf>
  21001. 80091d2: f06f 060f mvn.w r6, #15
  21002. 80091d6: e7f3 b.n 80091c0 <dhcp_start+0x50>
  21003. LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;);
  21004. 80091d8: 4b13 ldr r3, [pc, #76] @ (8009228 <dhcp_start+0xb8>)
  21005. 80091da: f44f 723a mov.w r2, #744 @ 0x2e8
  21006. 80091de: 4915 ldr r1, [pc, #84] @ (8009234 <dhcp_start+0xc4>)
  21007. 80091e0: 4813 ldr r0, [pc, #76] @ (8009230 <dhcp_start+0xc0>)
  21008. 80091e2: f00a f911 bl 8013408 <iprintf>
  21009. 80091e6: f06f 060f mvn.w r6, #15
  21010. 80091ea: e7e9 b.n 80091c0 <dhcp_start+0x50>
  21011. dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp));
  21012. 80091ec: 2034 movs r0, #52 @ 0x34
  21013. 80091ee: f002 f8d1 bl 800b394 <mem_malloc>
  21014. if (dhcp == NULL) {
  21015. 80091f2: 4605 mov r5, r0
  21016. 80091f4: b190 cbz r0, 800921c <dhcp_start+0xac>
  21017. netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
  21018. 80091f6: 6260 str r0, [r4, #36] @ 0x24
  21019. LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp"));
  21020. 80091f8: e7cc b.n 8009194 <dhcp_start+0x24>
  21021. dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */
  21022. 80091fa: f7ff fb45 bl 8008888 <dhcp_dec_pcb_refcount>
  21023. 80091fe: e7c9 b.n 8009194 <dhcp_start+0x24>
  21024. dhcp_set_state(dhcp, DHCP_STATE_INIT);
  21025. 8009200: 2102 movs r1, #2
  21026. 8009202: 4628 mov r0, r5
  21027. 8009204: f7fe fe4b bl 8007e9e <dhcp_set_state>
  21028. return ERR_OK;
  21029. 8009208: e7da b.n 80091c0 <dhcp_start+0x50>
  21030. dhcp_release_and_stop(netif);
  21031. 800920a: 4620 mov r0, r4
  21032. 800920c: f7ff ff4c bl 80090a8 <dhcp_release_and_stop>
  21033. return ERR_MEM;
  21034. 8009210: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  21035. 8009214: e7d4 b.n 80091c0 <dhcp_start+0x50>
  21036. return ERR_MEM;
  21037. 8009216: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  21038. 800921a: e7d1 b.n 80091c0 <dhcp_start+0x50>
  21039. return ERR_MEM;
  21040. 800921c: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  21041. 8009220: e7ce b.n 80091c0 <dhcp_start+0x50>
  21042. return ERR_MEM;
  21043. 8009222: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  21044. 8009226: e7cb b.n 80091c0 <dhcp_start+0x50>
  21045. 8009228: 08014e34 .word 0x08014e34
  21046. 800922c: 080144d8 .word 0x080144d8
  21047. 8009230: 080144e8 .word 0x080144e8
  21048. 8009234: 080151a4 .word 0x080151a4
  21049. 08009238 <dhcp_coarse_tmr>:
  21050. {
  21051. 8009238: b510 push {r4, lr}
  21052. NETIF_FOREACH(netif) {
  21053. 800923a: 4b17 ldr r3, [pc, #92] @ (8009298 <dhcp_coarse_tmr+0x60>)
  21054. 800923c: 681c ldr r4, [r3, #0]
  21055. 800923e: e006 b.n 800924e <dhcp_coarse_tmr+0x16>
  21056. dhcp_release_and_stop(netif);
  21057. 8009240: 4620 mov r0, r4
  21058. 8009242: f7ff ff31 bl 80090a8 <dhcp_release_and_stop>
  21059. dhcp_start(netif);
  21060. 8009246: 4620 mov r0, r4
  21061. 8009248: f7ff ff92 bl 8009170 <dhcp_start>
  21062. NETIF_FOREACH(netif) {
  21063. 800924c: 6824 ldr r4, [r4, #0]
  21064. 800924e: b314 cbz r4, 8009296 <dhcp_coarse_tmr+0x5e>
  21065. struct dhcp *dhcp = netif_dhcp_data(netif);
  21066. 8009250: 6a63 ldr r3, [r4, #36] @ 0x24
  21067. if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) {
  21068. 8009252: 2b00 cmp r3, #0
  21069. 8009254: d0fa beq.n 800924c <dhcp_coarse_tmr+0x14>
  21070. 8009256: 795a ldrb r2, [r3, #5]
  21071. 8009258: 2a00 cmp r2, #0
  21072. 800925a: d0f7 beq.n 800924c <dhcp_coarse_tmr+0x14>
  21073. if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) {
  21074. 800925c: 8a99 ldrh r1, [r3, #20]
  21075. 800925e: b129 cbz r1, 800926c <dhcp_coarse_tmr+0x34>
  21076. 8009260: 8a5a ldrh r2, [r3, #18]
  21077. 8009262: 3201 adds r2, #1
  21078. 8009264: b292 uxth r2, r2
  21079. 8009266: 825a strh r2, [r3, #18]
  21080. 8009268: 4291 cmp r1, r2
  21081. 800926a: d0e9 beq.n 8009240 <dhcp_coarse_tmr+0x8>
  21082. } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) {
  21083. 800926c: 8a1a ldrh r2, [r3, #16]
  21084. 800926e: b11a cbz r2, 8009278 <dhcp_coarse_tmr+0x40>
  21085. 8009270: 1e51 subs r1, r2, #1
  21086. 8009272: 8219 strh r1, [r3, #16]
  21087. 8009274: 2a01 cmp r2, #1
  21088. 8009276: d00a beq.n 800928e <dhcp_coarse_tmr+0x56>
  21089. } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) {
  21090. 8009278: 89da ldrh r2, [r3, #14]
  21091. 800927a: 2a00 cmp r2, #0
  21092. 800927c: d0e6 beq.n 800924c <dhcp_coarse_tmr+0x14>
  21093. 800927e: 1e51 subs r1, r2, #1
  21094. 8009280: 81d9 strh r1, [r3, #14]
  21095. 8009282: 2a01 cmp r2, #1
  21096. 8009284: d1e2 bne.n 800924c <dhcp_coarse_tmr+0x14>
  21097. dhcp_t1_timeout(netif);
  21098. 8009286: 4620 mov r0, r4
  21099. 8009288: f7ff fede bl 8009048 <dhcp_t1_timeout>
  21100. 800928c: e7de b.n 800924c <dhcp_coarse_tmr+0x14>
  21101. dhcp_t2_timeout(netif);
  21102. 800928e: 4620 mov r0, r4
  21103. 8009290: f7fe fff6 bl 8008280 <dhcp_t2_timeout>
  21104. 8009294: e7da b.n 800924c <dhcp_coarse_tmr+0x14>
  21105. }
  21106. 8009296: bd10 pop {r4, pc}
  21107. 8009298: 24019b80 .word 0x24019b80
  21108. 0800929c <dhcp_timeout>:
  21109. {
  21110. 800929c: b510 push {r4, lr}
  21111. 800929e: 4604 mov r4, r0
  21112. struct dhcp *dhcp = netif_dhcp_data(netif);
  21113. 80092a0: 6a42 ldr r2, [r0, #36] @ 0x24
  21114. if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) {
  21115. 80092a2: 7953 ldrb r3, [r2, #5]
  21116. 80092a4: 2b06 cmp r3, #6
  21117. 80092a6: bf18 it ne
  21118. 80092a8: 2b0c cmpne r3, #12
  21119. 80092aa: d00b beq.n 80092c4 <dhcp_timeout+0x28>
  21120. } else if (dhcp->state == DHCP_STATE_REQUESTING) {
  21121. 80092ac: 2b01 cmp r3, #1
  21122. 80092ae: d00c beq.n 80092ca <dhcp_timeout+0x2e>
  21123. } else if (dhcp->state == DHCP_STATE_CHECKING) {
  21124. 80092b0: 2b08 cmp r3, #8
  21125. 80092b2: d016 beq.n 80092e2 <dhcp_timeout+0x46>
  21126. } else if (dhcp->state == DHCP_STATE_REBOOTING) {
  21127. 80092b4: 2b03 cmp r3, #3
  21128. 80092b6: d107 bne.n 80092c8 <dhcp_timeout+0x2c>
  21129. if (dhcp->tries < REBOOT_TRIES) {
  21130. 80092b8: 7993 ldrb r3, [r2, #6]
  21131. 80092ba: 2b01 cmp r3, #1
  21132. 80092bc: d91a bls.n 80092f4 <dhcp_timeout+0x58>
  21133. dhcp_discover(netif);
  21134. 80092be: f7ff f95d bl 800857c <dhcp_discover>
  21135. }
  21136. 80092c2: e001 b.n 80092c8 <dhcp_timeout+0x2c>
  21137. dhcp_discover(netif);
  21138. 80092c4: f7ff f95a bl 800857c <dhcp_discover>
  21139. }
  21140. 80092c8: bd10 pop {r4, pc}
  21141. if (dhcp->tries <= 5) {
  21142. 80092ca: 7993 ldrb r3, [r2, #6]
  21143. 80092cc: 2b05 cmp r3, #5
  21144. 80092ce: d802 bhi.n 80092d6 <dhcp_timeout+0x3a>
  21145. dhcp_select(netif);
  21146. 80092d0: f7ff f87a bl 80083c8 <dhcp_select>
  21147. 80092d4: e7f8 b.n 80092c8 <dhcp_timeout+0x2c>
  21148. dhcp_release_and_stop(netif);
  21149. 80092d6: f7ff fee7 bl 80090a8 <dhcp_release_and_stop>
  21150. dhcp_start(netif);
  21151. 80092da: 4620 mov r0, r4
  21152. 80092dc: f7ff ff48 bl 8009170 <dhcp_start>
  21153. 80092e0: e7f2 b.n 80092c8 <dhcp_timeout+0x2c>
  21154. if (dhcp->tries <= 1) {
  21155. 80092e2: 7993 ldrb r3, [r2, #6]
  21156. 80092e4: 2b01 cmp r3, #1
  21157. 80092e6: d902 bls.n 80092ee <dhcp_timeout+0x52>
  21158. dhcp_bind(netif);
  21159. 80092e8: f7ff fa26 bl 8008738 <dhcp_bind>
  21160. 80092ec: e7ec b.n 80092c8 <dhcp_timeout+0x2c>
  21161. dhcp_check(netif);
  21162. 80092ee: f7ff fa0d bl 800870c <dhcp_check>
  21163. 80092f2: e7e9 b.n 80092c8 <dhcp_timeout+0x2c>
  21164. dhcp_reboot(netif);
  21165. 80092f4: f7fe ffe0 bl 80082b8 <dhcp_reboot>
  21166. 80092f8: e7e6 b.n 80092c8 <dhcp_timeout+0x2c>
  21167. ...
  21168. 080092fc <dhcp_fine_tmr>:
  21169. {
  21170. 80092fc: b510 push {r4, lr}
  21171. NETIF_FOREACH(netif) {
  21172. 80092fe: 4b0b ldr r3, [pc, #44] @ (800932c <dhcp_fine_tmr+0x30>)
  21173. 8009300: 681c ldr r4, [r3, #0]
  21174. 8009302: e002 b.n 800930a <dhcp_fine_tmr+0xe>
  21175. } else if (dhcp->request_timeout == 1) {
  21176. 8009304: 2a01 cmp r2, #1
  21177. 8009306: d00a beq.n 800931e <dhcp_fine_tmr+0x22>
  21178. NETIF_FOREACH(netif) {
  21179. 8009308: 6824 ldr r4, [r4, #0]
  21180. 800930a: b174 cbz r4, 800932a <dhcp_fine_tmr+0x2e>
  21181. struct dhcp *dhcp = netif_dhcp_data(netif);
  21182. 800930c: 6a63 ldr r3, [r4, #36] @ 0x24
  21183. if (dhcp != NULL) {
  21184. 800930e: 2b00 cmp r3, #0
  21185. 8009310: d0fa beq.n 8009308 <dhcp_fine_tmr+0xc>
  21186. if (dhcp->request_timeout > 1) {
  21187. 8009312: 891a ldrh r2, [r3, #8]
  21188. 8009314: 2a01 cmp r2, #1
  21189. 8009316: d9f5 bls.n 8009304 <dhcp_fine_tmr+0x8>
  21190. dhcp->request_timeout--;
  21191. 8009318: 3a01 subs r2, #1
  21192. 800931a: 811a strh r2, [r3, #8]
  21193. 800931c: e7f4 b.n 8009308 <dhcp_fine_tmr+0xc>
  21194. dhcp->request_timeout--;
  21195. 800931e: 3a01 subs r2, #1
  21196. 8009320: 811a strh r2, [r3, #8]
  21197. dhcp_timeout(netif);
  21198. 8009322: 4620 mov r0, r4
  21199. 8009324: f7ff ffba bl 800929c <dhcp_timeout>
  21200. 8009328: e7ee b.n 8009308 <dhcp_fine_tmr+0xc>
  21201. }
  21202. 800932a: bd10 pop {r4, pc}
  21203. 800932c: 24019b80 .word 0x24019b80
  21204. 08009330 <dhcp_stop>:
  21205. {
  21206. 8009330: b508 push {r3, lr}
  21207. dhcp_release_and_stop(netif);
  21208. 8009332: f7ff feb9 bl 80090a8 <dhcp_release_and_stop>
  21209. }
  21210. 8009336: bd08 pop {r3, pc}
  21211. 08009338 <err_to_errno>:
  21212. };
  21213. int
  21214. err_to_errno(err_t err)
  21215. {
  21216. if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_to_errno_table))) {
  21217. 8009338: f100 0310 add.w r3, r0, #16
  21218. 800933c: b2db uxtb r3, r3
  21219. 800933e: 2b10 cmp r3, #16
  21220. 8009340: d804 bhi.n 800934c <err_to_errno+0x14>
  21221. return EIO;
  21222. }
  21223. return err_to_errno_table[-err];
  21224. 8009342: 4240 negs r0, r0
  21225. 8009344: 4b02 ldr r3, [pc, #8] @ (8009350 <err_to_errno+0x18>)
  21226. 8009346: f853 0020 ldr.w r0, [r3, r0, lsl #2]
  21227. 800934a: 4770 bx lr
  21228. return EIO;
  21229. 800934c: 2005 movs r0, #5
  21230. }
  21231. 800934e: 4770 bx lr
  21232. 8009350: 080151cc .word 0x080151cc
  21233. 08009354 <etharp_free_entry>:
  21234. #endif /* ARP_QUEUEING */
  21235. /** Clean up ARP table entries */
  21236. static void
  21237. etharp_free_entry(int i)
  21238. {
  21239. 8009354: b510 push {r4, lr}
  21240. 8009356: 4604 mov r4, r0
  21241. /* remove from SNMP ARP index tree */
  21242. mib2_remove_arp_entry(arp_table[i].netif, &arp_table[i].ipaddr);
  21243. /* and empty packet queue */
  21244. if (arp_table[i].q != NULL) {
  21245. 8009358: eb00 0240 add.w r2, r0, r0, lsl #1
  21246. 800935c: 4b0d ldr r3, [pc, #52] @ (8009394 <etharp_free_entry+0x40>)
  21247. 800935e: f853 0032 ldr.w r0, [r3, r2, lsl #3]
  21248. 8009362: b138 cbz r0, 8009374 <etharp_free_entry+0x20>
  21249. /* remove all queued packets */
  21250. LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_free_entry: freeing entry %"U16_F", packet queue %p.\n", (u16_t)i, (void *)(arp_table[i].q)));
  21251. free_etharp_q(arp_table[i].q);
  21252. 8009364: f002 fd1c bl 800bda0 <pbuf_free>
  21253. arp_table[i].q = NULL;
  21254. 8009368: eb04 0344 add.w r3, r4, r4, lsl #1
  21255. 800936c: 00db lsls r3, r3, #3
  21256. 800936e: 4a09 ldr r2, [pc, #36] @ (8009394 <etharp_free_entry+0x40>)
  21257. 8009370: 2100 movs r1, #0
  21258. 8009372: 50d1 str r1, [r2, r3]
  21259. }
  21260. /* recycle entry for re-use */
  21261. arp_table[i].state = ETHARP_STATE_EMPTY;
  21262. 8009374: 4a07 ldr r2, [pc, #28] @ (8009394 <etharp_free_entry+0x40>)
  21263. 8009376: eb04 0344 add.w r3, r4, r4, lsl #1
  21264. 800937a: eb02 03c3 add.w r3, r2, r3, lsl #3
  21265. 800937e: 2100 movs r1, #0
  21266. 8009380: 7519 strb r1, [r3, #20]
  21267. #ifdef LWIP_DEBUG
  21268. /* for debugging, clean out the complete entry */
  21269. arp_table[i].ctime = 0;
  21270. 8009382: 8259 strh r1, [r3, #18]
  21271. arp_table[i].netif = NULL;
  21272. 8009384: 6099 str r1, [r3, #8]
  21273. ip4_addr_set_zero(&arp_table[i].ipaddr);
  21274. 8009386: 6059 str r1, [r3, #4]
  21275. arp_table[i].ethaddr = ethzero;
  21276. 8009388: 4a03 ldr r2, [pc, #12] @ (8009398 <etharp_free_entry+0x44>)
  21277. 800938a: 6810 ldr r0, [r2, #0]
  21278. 800938c: 60d8 str r0, [r3, #12]
  21279. 800938e: 8892 ldrh r2, [r2, #4]
  21280. 8009390: 821a strh r2, [r3, #16]
  21281. #endif /* LWIP_DEBUG */
  21282. }
  21283. 8009392: bd10 pop {r4, pc}
  21284. 8009394: 24012f2c .word 0x24012f2c
  21285. 8009398: 080154b4 .word 0x080154b4
  21286. 0800939c <etharp_find_entry>:
  21287. * @return The ARP entry index that matched or is created, ERR_MEM if no
  21288. * entry is found or could be recycled.
  21289. */
  21290. static s16_t
  21291. etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif *netif)
  21292. {
  21293. 800939c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  21294. 80093a0: b085 sub sp, #20
  21295. 80093a2: 4606 mov r6, r0
  21296. 80093a4: 4617 mov r7, r2
  21297. s16_t empty = ARP_TABLE_SIZE;
  21298. s16_t i = 0;
  21299. /* oldest entry with packets on queue */
  21300. s16_t old_queue = ARP_TABLE_SIZE;
  21301. /* its age */
  21302. u16_t age_queue = 0, age_pending = 0, age_stable = 0;
  21303. 80093a6: f04f 0900 mov.w r9, #0
  21304. 80093aa: f8cd 900c str.w r9, [sp, #12]
  21305. 80093ae: 46cb mov fp, r9
  21306. s16_t old_queue = ARP_TABLE_SIZE;
  21307. 80093b0: f04f 0a0a mov.w sl, #10
  21308. * 4) remember the oldest pending entry with queued packets (if any)
  21309. * 5) search for a matching IP entry, either pending or stable
  21310. * until 5 matches, or all entries are searched for.
  21311. */
  21312. for (i = 0; i < ARP_TABLE_SIZE; ++i) {
  21313. 80093b4: 464b mov r3, r9
  21314. s16_t empty = ARP_TABLE_SIZE;
  21315. 80093b6: 4655 mov r5, sl
  21316. s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE;
  21317. 80093b8: 46d0 mov r8, sl
  21318. 80093ba: f8cd a008 str.w sl, [sp, #8]
  21319. 80093be: 9101 str r1, [sp, #4]
  21320. for (i = 0; i < ARP_TABLE_SIZE; ++i) {
  21321. 80093c0: e029 b.n 8009416 <etharp_find_entry+0x7a>
  21322. LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE",
  21323. state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE);
  21324. /* if given, does IP address match IP address in ARP entry? */
  21325. if (ipaddr && ip4_addr_cmp(ipaddr, &arp_table[i].ipaddr)
  21326. #if ETHARP_TABLE_MATCH_NETIF
  21327. && ((netif == NULL) || (netif == arp_table[i].netif))
  21328. 80093c2: 2f00 cmp r7, #0
  21329. 80093c4: f000 80ad beq.w 8009522 <etharp_find_entry+0x186>
  21330. 80093c8: 4a5a ldr r2, [pc, #360] @ (8009534 <etharp_find_entry+0x198>)
  21331. 80093ca: eb02 02ce add.w r2, r2, lr, lsl #3
  21332. 80093ce: 6892 ldr r2, [r2, #8]
  21333. 80093d0: 42ba cmp r2, r7
  21334. 80093d2: d13a bne.n 800944a <etharp_find_entry+0xae>
  21335. #endif /* ETHARP_TABLE_MATCH_NETIF */
  21336. ) {
  21337. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %d\n", (int)i));
  21338. /* found exact IP address match, simply bail out */
  21339. return i;
  21340. 80093d4: 461d mov r5, r3
  21341. 80093d6: e07e b.n 80094d6 <etharp_find_entry+0x13a>
  21342. }
  21343. /* pending entry? */
  21344. if (state == ETHARP_STATE_PENDING) {
  21345. /* pending with queued packets? */
  21346. if (arp_table[i].q != NULL) {
  21347. 80093d8: eb04 0244 add.w r2, r4, r4, lsl #1
  21348. 80093dc: 4855 ldr r0, [pc, #340] @ (8009534 <etharp_find_entry+0x198>)
  21349. 80093de: f850 2032 ldr.w r2, [r0, r2, lsl #3]
  21350. 80093e2: b14a cbz r2, 80093f8 <etharp_find_entry+0x5c>
  21351. if (arp_table[i].ctime >= age_queue) {
  21352. 80093e4: eb04 0444 add.w r4, r4, r4, lsl #1
  21353. 80093e8: eb00 02c4 add.w r2, r0, r4, lsl #3
  21354. 80093ec: 8a52 ldrh r2, [r2, #18]
  21355. 80093ee: 455a cmp r2, fp
  21356. 80093f0: d30f bcc.n 8009412 <etharp_find_entry+0x76>
  21357. old_queue = i;
  21358. age_queue = arp_table[i].ctime;
  21359. 80093f2: 4693 mov fp, r2
  21360. old_queue = i;
  21361. 80093f4: 469a mov sl, r3
  21362. 80093f6: e00c b.n 8009412 <etharp_find_entry+0x76>
  21363. }
  21364. } else
  21365. /* pending without queued packets? */
  21366. {
  21367. if (arp_table[i].ctime >= age_pending) {
  21368. 80093f8: eb04 0444 add.w r4, r4, r4, lsl #1
  21369. 80093fc: 4a4d ldr r2, [pc, #308] @ (8009534 <etharp_find_entry+0x198>)
  21370. 80093fe: eb02 02c4 add.w r2, r2, r4, lsl #3
  21371. 8009402: 8a52 ldrh r2, [r2, #18]
  21372. 8009404: 9903 ldr r1, [sp, #12]
  21373. 8009406: 428a cmp r2, r1
  21374. 8009408: d303 bcc.n 8009412 <etharp_find_entry+0x76>
  21375. old_pending = i;
  21376. age_pending = arp_table[i].ctime;
  21377. 800940a: 9203 str r2, [sp, #12]
  21378. old_pending = i;
  21379. 800940c: 9302 str r3, [sp, #8]
  21380. 800940e: e000 b.n 8009412 <etharp_find_entry+0x76>
  21381. empty = i;
  21382. 8009410: 461d mov r5, r3
  21383. for (i = 0; i < ARP_TABLE_SIZE; ++i) {
  21384. 8009412: 3301 adds r3, #1
  21385. 8009414: b21b sxth r3, r3
  21386. 8009416: 2b09 cmp r3, #9
  21387. 8009418: dc26 bgt.n 8009468 <etharp_find_entry+0xcc>
  21388. u8_t state = arp_table[i].state;
  21389. 800941a: 461c mov r4, r3
  21390. 800941c: eb03 0043 add.w r0, r3, r3, lsl #1
  21391. 8009420: 4a44 ldr r2, [pc, #272] @ (8009534 <etharp_find_entry+0x198>)
  21392. 8009422: eb02 02c0 add.w r2, r2, r0, lsl #3
  21393. 8009426: 7d10 ldrb r0, [r2, #20]
  21394. if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) {
  21395. 8009428: 2d0a cmp r5, #10
  21396. 800942a: bf08 it eq
  21397. 800942c: 2800 cmpeq r0, #0
  21398. 800942e: d0ef beq.n 8009410 <etharp_find_entry+0x74>
  21399. } else if (state != ETHARP_STATE_EMPTY) {
  21400. 8009430: 2800 cmp r0, #0
  21401. 8009432: d0ee beq.n 8009412 <etharp_find_entry+0x76>
  21402. if (ipaddr && ip4_addr_cmp(ipaddr, &arp_table[i].ipaddr)
  21403. 8009434: b14e cbz r6, 800944a <etharp_find_entry+0xae>
  21404. 8009436: eb03 0e43 add.w lr, r3, r3, lsl #1
  21405. 800943a: 4a3e ldr r2, [pc, #248] @ (8009534 <etharp_find_entry+0x198>)
  21406. 800943c: eb02 0cce add.w ip, r2, lr, lsl #3
  21407. 8009440: f8dc 2004 ldr.w r2, [ip, #4]
  21408. 8009444: 6831 ldr r1, [r6, #0]
  21409. 8009446: 4291 cmp r1, r2
  21410. 8009448: d0bb beq.n 80093c2 <etharp_find_entry+0x26>
  21411. if (state == ETHARP_STATE_PENDING) {
  21412. 800944a: 2801 cmp r0, #1
  21413. 800944c: d0c4 beq.n 80093d8 <etharp_find_entry+0x3c>
  21414. }
  21415. }
  21416. /* stable entry? */
  21417. } else if (state >= ETHARP_STATE_STABLE) {
  21418. 800944e: 2801 cmp r0, #1
  21419. 8009450: d9df bls.n 8009412 <etharp_find_entry+0x76>
  21420. /* don't record old_stable for static entries since they never expire */
  21421. if (state < ETHARP_STATE_STATIC)
  21422. #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
  21423. {
  21424. /* remember entry with oldest stable entry in oldest, its age in maxtime */
  21425. if (arp_table[i].ctime >= age_stable) {
  21426. 8009452: eb04 0444 add.w r4, r4, r4, lsl #1
  21427. 8009456: 4a37 ldr r2, [pc, #220] @ (8009534 <etharp_find_entry+0x198>)
  21428. 8009458: eb02 02c4 add.w r2, r2, r4, lsl #3
  21429. 800945c: 8a52 ldrh r2, [r2, #18]
  21430. 800945e: 454a cmp r2, r9
  21431. 8009460: d3d7 bcc.n 8009412 <etharp_find_entry+0x76>
  21432. old_stable = i;
  21433. age_stable = arp_table[i].ctime;
  21434. 8009462: 4691 mov r9, r2
  21435. old_stable = i;
  21436. 8009464: 4698 mov r8, r3
  21437. 8009466: e7d4 b.n 8009412 <etharp_find_entry+0x76>
  21438. }
  21439. }
  21440. /* { we have no match } => try to create a new entry */
  21441. /* don't create new entry, only search? */
  21442. if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) ||
  21443. 8009468: 9901 ldr r1, [sp, #4]
  21444. 800946a: f011 0f02 tst.w r1, #2
  21445. 800946e: d15a bne.n 8009526 <etharp_find_entry+0x18a>
  21446. 8009470: 2d0a cmp r5, #10
  21447. 8009472: d034 beq.n 80094de <etharp_find_entry+0x142>
  21448. *
  21449. * { ETHARP_FLAG_TRY_HARD is set at this point }
  21450. */
  21451. /* 1) empty entry available? */
  21452. if (empty < ARP_TABLE_SIZE) {
  21453. 8009474: 2d09 cmp r5, #9
  21454. 8009476: dd16 ble.n 80094a6 <etharp_find_entry+0x10a>
  21455. i = empty;
  21456. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %d\n", (int)i));
  21457. } else {
  21458. /* 2) found recyclable stable entry? */
  21459. if (old_stable < ARP_TABLE_SIZE) {
  21460. 8009478: f1b8 0f09 cmp.w r8, #9
  21461. 800947c: dc35 bgt.n 80094ea <etharp_find_entry+0x14e>
  21462. /* recycle oldest stable*/
  21463. i = old_stable;
  21464. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %d\n", (int)i));
  21465. /* no queued packets should exist on stable entries */
  21466. LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL);
  21467. 800947e: eb08 0348 add.w r3, r8, r8, lsl #1
  21468. 8009482: 4a2c ldr r2, [pc, #176] @ (8009534 <etharp_find_entry+0x198>)
  21469. 8009484: f852 3033 ldr.w r3, [r2, r3, lsl #3]
  21470. 8009488: 2b00 cmp r3, #0
  21471. 800948a: d036 beq.n 80094fa <etharp_find_entry+0x15e>
  21472. 800948c: 4b2a ldr r3, [pc, #168] @ (8009538 <etharp_find_entry+0x19c>)
  21473. 800948e: f240 126d movw r2, #365 @ 0x16d
  21474. 8009492: 492a ldr r1, [pc, #168] @ (800953c <etharp_find_entry+0x1a0>)
  21475. 8009494: 482a ldr r0, [pc, #168] @ (8009540 <etharp_find_entry+0x1a4>)
  21476. 8009496: f009 ffb7 bl 8013408 <iprintf>
  21477. 800949a: 4645 mov r5, r8
  21478. return (s16_t)ERR_MEM;
  21479. }
  21480. /* { empty or recyclable entry found } */
  21481. LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
  21482. etharp_free_entry(i);
  21483. 800949c: 4628 mov r0, r5
  21484. 800949e: f7ff ff59 bl 8009354 <etharp_free_entry>
  21485. }
  21486. LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
  21487. 80094a2: 2d09 cmp r5, #9
  21488. 80094a4: dc2d bgt.n 8009502 <etharp_find_entry+0x166>
  21489. LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY",
  21490. 80094a6: 462c mov r4, r5
  21491. 80094a8: eb05 0245 add.w r2, r5, r5, lsl #1
  21492. 80094ac: 4b21 ldr r3, [pc, #132] @ (8009534 <etharp_find_entry+0x198>)
  21493. 80094ae: eb03 03c2 add.w r3, r3, r2, lsl #3
  21494. 80094b2: 7d1b ldrb r3, [r3, #20]
  21495. 80094b4: bb6b cbnz r3, 8009512 <etharp_find_entry+0x176>
  21496. arp_table[i].state == ETHARP_STATE_EMPTY);
  21497. /* IP address given? */
  21498. if (ipaddr != NULL) {
  21499. 80094b6: b136 cbz r6, 80094c6 <etharp_find_entry+0x12a>
  21500. /* set IP address */
  21501. ip4_addr_copy(arp_table[i].ipaddr, *ipaddr);
  21502. 80094b8: 6831 ldr r1, [r6, #0]
  21503. 80094ba: eb04 0244 add.w r2, r4, r4, lsl #1
  21504. 80094be: 4b1d ldr r3, [pc, #116] @ (8009534 <etharp_find_entry+0x198>)
  21505. 80094c0: eb03 03c2 add.w r3, r3, r2, lsl #3
  21506. 80094c4: 6059 str r1, [r3, #4]
  21507. }
  21508. arp_table[i].ctime = 0;
  21509. 80094c6: 4b1b ldr r3, [pc, #108] @ (8009534 <etharp_find_entry+0x198>)
  21510. 80094c8: eb04 0244 add.w r2, r4, r4, lsl #1
  21511. 80094cc: eb03 02c2 add.w r2, r3, r2, lsl #3
  21512. 80094d0: 2100 movs r1, #0
  21513. 80094d2: 8251 strh r1, [r2, #18]
  21514. #if ETHARP_TABLE_MATCH_NETIF
  21515. arp_table[i].netif = netif;
  21516. 80094d4: 6097 str r7, [r2, #8]
  21517. #endif /* ETHARP_TABLE_MATCH_NETIF */
  21518. return (s16_t)i;
  21519. }
  21520. 80094d6: 4628 mov r0, r5
  21521. 80094d8: b005 add sp, #20
  21522. 80094da: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  21523. ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) {
  21524. 80094de: f011 0f01 tst.w r1, #1
  21525. 80094e2: d1c7 bne.n 8009474 <etharp_find_entry+0xd8>
  21526. return (s16_t)ERR_MEM;
  21527. 80094e4: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  21528. 80094e8: e7f5 b.n 80094d6 <etharp_find_entry+0x13a>
  21529. } else if (old_pending < ARP_TABLE_SIZE) {
  21530. 80094ea: 9b02 ldr r3, [sp, #8]
  21531. 80094ec: 2b09 cmp r3, #9
  21532. 80094ee: dd06 ble.n 80094fe <etharp_find_entry+0x162>
  21533. } else if (old_queue < ARP_TABLE_SIZE) {
  21534. 80094f0: f1ba 0f09 cmp.w sl, #9
  21535. 80094f4: dc1a bgt.n 800952c <etharp_find_entry+0x190>
  21536. i = old_queue;
  21537. 80094f6: 4655 mov r5, sl
  21538. 80094f8: e7d0 b.n 800949c <etharp_find_entry+0x100>
  21539. 80094fa: 4645 mov r5, r8
  21540. 80094fc: e7ce b.n 800949c <etharp_find_entry+0x100>
  21541. i = old_pending;
  21542. 80094fe: 9d02 ldr r5, [sp, #8]
  21543. 8009500: e7cc b.n 800949c <etharp_find_entry+0x100>
  21544. LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE);
  21545. 8009502: 4b0d ldr r3, [pc, #52] @ (8009538 <etharp_find_entry+0x19c>)
  21546. 8009504: f240 1283 movw r2, #387 @ 0x183
  21547. 8009508: 490e ldr r1, [pc, #56] @ (8009544 <etharp_find_entry+0x1a8>)
  21548. 800950a: 480d ldr r0, [pc, #52] @ (8009540 <etharp_find_entry+0x1a4>)
  21549. 800950c: f009 ff7c bl 8013408 <iprintf>
  21550. 8009510: e7c9 b.n 80094a6 <etharp_find_entry+0x10a>
  21551. LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY",
  21552. 8009512: 4b09 ldr r3, [pc, #36] @ (8009538 <etharp_find_entry+0x19c>)
  21553. 8009514: f44f 72c2 mov.w r2, #388 @ 0x184
  21554. 8009518: 490b ldr r1, [pc, #44] @ (8009548 <etharp_find_entry+0x1ac>)
  21555. 800951a: 4809 ldr r0, [pc, #36] @ (8009540 <etharp_find_entry+0x1a4>)
  21556. 800951c: f009 ff74 bl 8013408 <iprintf>
  21557. 8009520: e7c9 b.n 80094b6 <etharp_find_entry+0x11a>
  21558. return i;
  21559. 8009522: 461d mov r5, r3
  21560. 8009524: e7d7 b.n 80094d6 <etharp_find_entry+0x13a>
  21561. return (s16_t)ERR_MEM;
  21562. 8009526: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  21563. 800952a: e7d4 b.n 80094d6 <etharp_find_entry+0x13a>
  21564. return (s16_t)ERR_MEM;
  21565. 800952c: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  21566. 8009530: e7d1 b.n 80094d6 <etharp_find_entry+0x13a>
  21567. 8009532: bf00 nop
  21568. 8009534: 24012f2c .word 0x24012f2c
  21569. 8009538: 08015210 .word 0x08015210
  21570. 800953c: 08015278 .word 0x08015278
  21571. 8009540: 080144e8 .word 0x080144e8
  21572. 8009544: 08015290 .word 0x08015290
  21573. 8009548: 080152a4 .word 0x080152a4
  21574. 0800954c <etharp_update_arp_entry>:
  21575. *
  21576. * @see pbuf_free()
  21577. */
  21578. static err_t
  21579. etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, u8_t flags)
  21580. {
  21581. 800954c: b5f0 push {r4, r5, r6, r7, lr}
  21582. 800954e: b083 sub sp, #12
  21583. 8009550: 4605 mov r5, r0
  21584. 8009552: 460c mov r4, r1
  21585. 8009554: 4616 mov r6, r2
  21586. 8009556: 461f mov r7, r3
  21587. s16_t i;
  21588. LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN);
  21589. 8009558: f890 2030 ldrb.w r2, [r0, #48] @ 0x30
  21590. 800955c: 2a06 cmp r2, #6
  21591. 800955e: d13d bne.n 80095dc <etharp_update_arp_entry+0x90>
  21592. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n",
  21593. ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr),
  21594. (u16_t)ethaddr->addr[0], (u16_t)ethaddr->addr[1], (u16_t)ethaddr->addr[2],
  21595. (u16_t)ethaddr->addr[3], (u16_t)ethaddr->addr[4], (u16_t)ethaddr->addr[5]));
  21596. /* non-unicast address? */
  21597. if (ip4_addr_isany(ipaddr) ||
  21598. 8009560: 2c00 cmp r4, #0
  21599. 8009562: d043 beq.n 80095ec <etharp_update_arp_entry+0xa0>
  21600. 8009564: 6820 ldr r0, [r4, #0]
  21601. 8009566: 2800 cmp r0, #0
  21602. 8009568: d040 beq.n 80095ec <etharp_update_arp_entry+0xa0>
  21603. ip4_addr_isbroadcast(ipaddr, netif) ||
  21604. 800956a: 4629 mov r1, r5
  21605. 800956c: f000 ff71 bl 800a452 <ip4_addr_isbroadcast_u32>
  21606. if (ip4_addr_isany(ipaddr) ||
  21607. 8009570: 2800 cmp r0, #0
  21608. 8009572: d13b bne.n 80095ec <etharp_update_arp_entry+0xa0>
  21609. ip4_addr_ismulticast(ipaddr)) {
  21610. 8009574: 6822 ldr r2, [r4, #0]
  21611. 8009576: f002 02f0 and.w r2, r2, #240 @ 0xf0
  21612. ip4_addr_isbroadcast(ipaddr, netif) ||
  21613. 800957a: 2ae0 cmp r2, #224 @ 0xe0
  21614. 800957c: d036 beq.n 80095ec <etharp_update_arp_entry+0xa0>
  21615. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: will not add non-unicast IP address to ARP cache\n"));
  21616. return ERR_ARG;
  21617. }
  21618. /* find or create ARP entry */
  21619. i = etharp_find_entry(ipaddr, flags, netif);
  21620. 800957e: 462a mov r2, r5
  21621. 8009580: 4639 mov r1, r7
  21622. 8009582: 4620 mov r0, r4
  21623. 8009584: f7ff ff0a bl 800939c <etharp_find_entry>
  21624. /* bail out if no entry could be found */
  21625. if (i < 0) {
  21626. 8009588: f1b0 0c00 subs.w ip, r0, #0
  21627. 800958c: db31 blt.n 80095f2 <etharp_update_arp_entry+0xa6>
  21628. return ERR_VAL;
  21629. } else
  21630. #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
  21631. {
  21632. /* mark it stable */
  21633. arp_table[i].state = ETHARP_STATE_STABLE;
  21634. 800958e: 4b1c ldr r3, [pc, #112] @ (8009600 <etharp_update_arp_entry+0xb4>)
  21635. 8009590: eb0c 004c add.w r0, ip, ip, lsl #1
  21636. 8009594: eb03 02c0 add.w r2, r3, r0, lsl #3
  21637. 8009598: 2102 movs r1, #2
  21638. 800959a: 7511 strb r1, [r2, #20]
  21639. }
  21640. /* record network interface */
  21641. arp_table[i].netif = netif;
  21642. 800959c: 6095 str r5, [r2, #8]
  21643. /* insert in SNMP ARP index tree */
  21644. mib2_add_arp_entry(netif, &arp_table[i].ipaddr);
  21645. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: updating stable entry %"S16_F"\n", i));
  21646. /* update address */
  21647. SMEMCPY(&arp_table[i].ethaddr, ethaddr, ETH_HWADDR_LEN);
  21648. 800959e: 00c1 lsls r1, r0, #3
  21649. 80095a0: 3108 adds r1, #8
  21650. 80095a2: 4419 add r1, r3
  21651. 80095a4: 6834 ldr r4, [r6, #0]
  21652. 80095a6: 604c str r4, [r1, #4]
  21653. 80095a8: 88b4 ldrh r4, [r6, #4]
  21654. 80095aa: 810c strh r4, [r1, #8]
  21655. /* reset time stamp */
  21656. arp_table[i].ctime = 0;
  21657. 80095ac: 2100 movs r1, #0
  21658. 80095ae: 8251 strh r1, [r2, #18]
  21659. /* get the packet pointer */
  21660. p = q->p;
  21661. /* now queue entry can be freed */
  21662. memp_free(MEMP_ARP_QUEUE, q);
  21663. #else /* ARP_QUEUEING */
  21664. if (arp_table[i].q != NULL) {
  21665. 80095b0: f853 7030 ldr.w r7, [r3, r0, lsl #3]
  21666. 80095b4: b30f cbz r7, 80095fa <etharp_update_arp_entry+0xae>
  21667. struct pbuf *p = arp_table[i].q;
  21668. arp_table[i].q = NULL;
  21669. 80095b6: 00c3 lsls r3, r0, #3
  21670. 80095b8: 460c mov r4, r1
  21671. 80095ba: 4a11 ldr r2, [pc, #68] @ (8009600 <etharp_update_arp_entry+0xb4>)
  21672. 80095bc: 50d1 str r1, [r2, r3]
  21673. #endif /* ARP_QUEUEING */
  21674. /* send the queued IP packet */
  21675. ethernet_output(netif, p, (struct eth_addr *)(netif->hwaddr), ethaddr, ETHTYPE_IP);
  21676. 80095be: f44f 6300 mov.w r3, #2048 @ 0x800
  21677. 80095c2: 9300 str r3, [sp, #0]
  21678. 80095c4: 4633 mov r3, r6
  21679. 80095c6: f105 022a add.w r2, r5, #42 @ 0x2a
  21680. 80095ca: 4639 mov r1, r7
  21681. 80095cc: 4628 mov r0, r5
  21682. 80095ce: f000 fbb9 bl 8009d44 <ethernet_output>
  21683. /* free the queued IP packet */
  21684. pbuf_free(p);
  21685. 80095d2: 4638 mov r0, r7
  21686. 80095d4: f002 fbe4 bl 800bda0 <pbuf_free>
  21687. }
  21688. return ERR_OK;
  21689. 80095d8: 4620 mov r0, r4
  21690. 80095da: e00c b.n 80095f6 <etharp_update_arp_entry+0xaa>
  21691. LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN);
  21692. 80095dc: 4b09 ldr r3, [pc, #36] @ (8009604 <etharp_update_arp_entry+0xb8>)
  21693. 80095de: f240 12a9 movw r2, #425 @ 0x1a9
  21694. 80095e2: 4909 ldr r1, [pc, #36] @ (8009608 <etharp_update_arp_entry+0xbc>)
  21695. 80095e4: 4809 ldr r0, [pc, #36] @ (800960c <etharp_update_arp_entry+0xc0>)
  21696. 80095e6: f009 ff0f bl 8013408 <iprintf>
  21697. 80095ea: e7b9 b.n 8009560 <etharp_update_arp_entry+0x14>
  21698. return ERR_ARG;
  21699. 80095ec: f06f 000f mvn.w r0, #15
  21700. 80095f0: e001 b.n 80095f6 <etharp_update_arp_entry+0xaa>
  21701. return (err_t)i;
  21702. 80095f2: fa4f f08c sxtb.w r0, ip
  21703. }
  21704. 80095f6: b003 add sp, #12
  21705. 80095f8: bdf0 pop {r4, r5, r6, r7, pc}
  21706. return ERR_OK;
  21707. 80095fa: 2000 movs r0, #0
  21708. 80095fc: e7fb b.n 80095f6 <etharp_update_arp_entry+0xaa>
  21709. 80095fe: bf00 nop
  21710. 8009600: 24012f2c .word 0x24012f2c
  21711. 8009604: 08015210 .word 0x08015210
  21712. 8009608: 080152d0 .word 0x080152d0
  21713. 800960c: 080144e8 .word 0x080144e8
  21714. 08009610 <etharp_raw>:
  21715. etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr,
  21716. const struct eth_addr *ethdst_addr,
  21717. const struct eth_addr *hwsrc_addr, const ip4_addr_t *ipsrc_addr,
  21718. const struct eth_addr *hwdst_addr, const ip4_addr_t *ipdst_addr,
  21719. const u16_t opcode)
  21720. {
  21721. 8009610: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  21722. 8009614: b082 sub sp, #8
  21723. 8009616: 460f mov r7, r1
  21724. 8009618: 4690 mov r8, r2
  21725. 800961a: 461d mov r5, r3
  21726. 800961c: f8dd a02c ldr.w sl, [sp, #44] @ 0x2c
  21727. struct pbuf *p;
  21728. err_t result = ERR_OK;
  21729. struct etharp_hdr *hdr;
  21730. LWIP_ASSERT("netif != NULL", netif != NULL);
  21731. 8009620: 4681 mov r9, r0
  21732. 8009622: 2800 cmp r0, #0
  21733. 8009624: d042 beq.n 80096ac <etharp_raw+0x9c>
  21734. /* allocate a pbuf for the outgoing ARP request packet */
  21735. p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM);
  21736. 8009626: f44f 7220 mov.w r2, #640 @ 0x280
  21737. 800962a: 211c movs r1, #28
  21738. 800962c: 200e movs r0, #14
  21739. 800962e: f002 fc1f bl 800be70 <pbuf_alloc>
  21740. /* could allocate a pbuf for an ARP request? */
  21741. if (p == NULL) {
  21742. 8009632: 4606 mov r6, r0
  21743. 8009634: 2800 cmp r0, #0
  21744. 8009636: d051 beq.n 80096dc <etharp_raw+0xcc>
  21745. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
  21746. ("etharp_raw: could not allocate pbuf for ARP request.\n"));
  21747. ETHARP_STATS_INC(etharp.memerr);
  21748. return ERR_MEM;
  21749. }
  21750. LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
  21751. 8009638: 8943 ldrh r3, [r0, #10]
  21752. 800963a: 2b1b cmp r3, #27
  21753. 800963c: d93e bls.n 80096bc <etharp_raw+0xac>
  21754. (p->len >= SIZEOF_ETHARP_HDR));
  21755. hdr = (struct etharp_hdr *)p->payload;
  21756. 800963e: 6874 ldr r4, [r6, #4]
  21757. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));
  21758. hdr->opcode = lwip_htons(opcode);
  21759. 8009640: f8bd 0034 ldrh.w r0, [sp, #52] @ 0x34
  21760. 8009644: f7fe fc1a bl 8007e7c <lwip_htons>
  21761. 8009648: 80e0 strh r0, [r4, #6]
  21762. LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!",
  21763. 800964a: f899 3030 ldrb.w r3, [r9, #48] @ 0x30
  21764. 800964e: 2b06 cmp r3, #6
  21765. 8009650: d13c bne.n 80096cc <etharp_raw+0xbc>
  21766. (netif->hwaddr_len == ETH_HWADDR_LEN));
  21767. /* Write the ARP MAC-Addresses */
  21768. SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN);
  21769. 8009652: 682b ldr r3, [r5, #0]
  21770. 8009654: 60a3 str r3, [r4, #8]
  21771. 8009656: 88ab ldrh r3, [r5, #4]
  21772. 8009658: 81a3 strh r3, [r4, #12]
  21773. SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN);
  21774. 800965a: f8da 3000 ldr.w r3, [sl]
  21775. 800965e: f8c4 3012 str.w r3, [r4, #18]
  21776. 8009662: f8ba 3004 ldrh.w r3, [sl, #4]
  21777. 8009666: 82e3 strh r3, [r4, #22]
  21778. /* Copy struct ip4_addr_wordaligned to aligned ip4_addr, to support compilers without
  21779. * structure packing. */
  21780. IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->sipaddr, ipsrc_addr);
  21781. 8009668: 9b0a ldr r3, [sp, #40] @ 0x28
  21782. 800966a: 681b ldr r3, [r3, #0]
  21783. 800966c: f8c4 300e str.w r3, [r4, #14]
  21784. IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr);
  21785. 8009670: 9b0c ldr r3, [sp, #48] @ 0x30
  21786. 8009672: 681b ldr r3, [r3, #0]
  21787. 8009674: 61a3 str r3, [r4, #24]
  21788. hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET);
  21789. 8009676: 2500 movs r5, #0
  21790. 8009678: 7025 strb r5, [r4, #0]
  21791. 800967a: 2301 movs r3, #1
  21792. 800967c: 7063 strb r3, [r4, #1]
  21793. hdr->proto = PP_HTONS(ETHTYPE_IP);
  21794. 800967e: 2308 movs r3, #8
  21795. 8009680: 70a3 strb r3, [r4, #2]
  21796. 8009682: 70e5 strb r5, [r4, #3]
  21797. /* set hwlen and protolen */
  21798. hdr->hwlen = ETH_HWADDR_LEN;
  21799. 8009684: 2306 movs r3, #6
  21800. 8009686: 7123 strb r3, [r4, #4]
  21801. hdr->protolen = sizeof(ip4_addr_t);
  21802. 8009688: 2304 movs r3, #4
  21803. 800968a: 7163 strb r3, [r4, #5]
  21804. if (ip4_addr_islinklocal(ipsrc_addr)) {
  21805. ethernet_output(netif, p, ethsrc_addr, &ethbroadcast, ETHTYPE_ARP);
  21806. } else
  21807. #endif /* LWIP_AUTOIP */
  21808. {
  21809. ethernet_output(netif, p, ethsrc_addr, ethdst_addr, ETHTYPE_ARP);
  21810. 800968c: f640 0306 movw r3, #2054 @ 0x806
  21811. 8009690: 9300 str r3, [sp, #0]
  21812. 8009692: 4643 mov r3, r8
  21813. 8009694: 463a mov r2, r7
  21814. 8009696: 4631 mov r1, r6
  21815. 8009698: 4648 mov r0, r9
  21816. 800969a: f000 fb53 bl 8009d44 <ethernet_output>
  21817. }
  21818. ETHARP_STATS_INC(etharp.xmit);
  21819. /* free ARP query packet */
  21820. pbuf_free(p);
  21821. 800969e: 4630 mov r0, r6
  21822. 80096a0: f002 fb7e bl 800bda0 <pbuf_free>
  21823. p = NULL;
  21824. /* could not allocate pbuf for ARP request */
  21825. return result;
  21826. 80096a4: 4628 mov r0, r5
  21827. }
  21828. 80096a6: b002 add sp, #8
  21829. 80096a8: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  21830. LWIP_ASSERT("netif != NULL", netif != NULL);
  21831. 80096ac: 4b0d ldr r3, [pc, #52] @ (80096e4 <etharp_raw+0xd4>)
  21832. 80096ae: f240 4257 movw r2, #1111 @ 0x457
  21833. 80096b2: 490d ldr r1, [pc, #52] @ (80096e8 <etharp_raw+0xd8>)
  21834. 80096b4: 480d ldr r0, [pc, #52] @ (80096ec <etharp_raw+0xdc>)
  21835. 80096b6: f009 fea7 bl 8013408 <iprintf>
  21836. 80096ba: e7b4 b.n 8009626 <etharp_raw+0x16>
  21837. LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
  21838. 80096bc: 4b09 ldr r3, [pc, #36] @ (80096e4 <etharp_raw+0xd4>)
  21839. 80096be: f240 4262 movw r2, #1122 @ 0x462
  21840. 80096c2: 490b ldr r1, [pc, #44] @ (80096f0 <etharp_raw+0xe0>)
  21841. 80096c4: 4809 ldr r0, [pc, #36] @ (80096ec <etharp_raw+0xdc>)
  21842. 80096c6: f009 fe9f bl 8013408 <iprintf>
  21843. 80096ca: e7b8 b.n 800963e <etharp_raw+0x2e>
  21844. LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!",
  21845. 80096cc: 4b05 ldr r3, [pc, #20] @ (80096e4 <etharp_raw+0xd4>)
  21846. 80096ce: f240 4269 movw r2, #1129 @ 0x469
  21847. 80096d2: 4908 ldr r1, [pc, #32] @ (80096f4 <etharp_raw+0xe4>)
  21848. 80096d4: 4805 ldr r0, [pc, #20] @ (80096ec <etharp_raw+0xdc>)
  21849. 80096d6: f009 fe97 bl 8013408 <iprintf>
  21850. 80096da: e7ba b.n 8009652 <etharp_raw+0x42>
  21851. return ERR_MEM;
  21852. 80096dc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  21853. 80096e0: e7e1 b.n 80096a6 <etharp_raw+0x96>
  21854. 80096e2: bf00 nop
  21855. 80096e4: 08015210 .word 0x08015210
  21856. 80096e8: 080144d8 .word 0x080144d8
  21857. 80096ec: 080144e8 .word 0x080144e8
  21858. 80096f0: 080152f4 .word 0x080152f4
  21859. 80096f4: 08015328 .word 0x08015328
  21860. 080096f8 <etharp_request_dst>:
  21861. * ERR_MEM if the ARP packet couldn't be allocated
  21862. * any other err_t on failure
  21863. */
  21864. static err_t
  21865. etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr *hw_dst_addr)
  21866. {
  21867. 80096f8: b530 push {r4, r5, lr}
  21868. 80096fa: b085 sub sp, #20
  21869. return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
  21870. 80096fc: f100 032a add.w r3, r0, #42 @ 0x2a
  21871. (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), &ethzero,
  21872. 8009700: 1d04 adds r4, r0, #4
  21873. return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr,
  21874. 8009702: 2501 movs r5, #1
  21875. 8009704: 9503 str r5, [sp, #12]
  21876. 8009706: 9102 str r1, [sp, #8]
  21877. 8009708: 4903 ldr r1, [pc, #12] @ (8009718 <etharp_request_dst+0x20>)
  21878. 800970a: 9101 str r1, [sp, #4]
  21879. 800970c: 9400 str r4, [sp, #0]
  21880. 800970e: 4619 mov r1, r3
  21881. 8009710: f7ff ff7e bl 8009610 <etharp_raw>
  21882. ipaddr, ARP_REQUEST);
  21883. }
  21884. 8009714: b005 add sp, #20
  21885. 8009716: bd30 pop {r4, r5, pc}
  21886. 8009718: 080154b4 .word 0x080154b4
  21887. 0800971c <etharp_cleanup_netif>:
  21888. {
  21889. 800971c: b538 push {r3, r4, r5, lr}
  21890. 800971e: 4605 mov r5, r0
  21891. for (i = 0; i < ARP_TABLE_SIZE; ++i) {
  21892. 8009720: 2400 movs r4, #0
  21893. 8009722: e000 b.n 8009726 <etharp_cleanup_netif+0xa>
  21894. 8009724: 3401 adds r4, #1
  21895. 8009726: 2c09 cmp r4, #9
  21896. 8009728: dc11 bgt.n 800974e <etharp_cleanup_netif+0x32>
  21897. u8_t state = arp_table[i].state;
  21898. 800972a: eb04 0244 add.w r2, r4, r4, lsl #1
  21899. 800972e: 4b08 ldr r3, [pc, #32] @ (8009750 <etharp_cleanup_netif+0x34>)
  21900. 8009730: eb03 03c2 add.w r3, r3, r2, lsl #3
  21901. 8009734: 7d1b ldrb r3, [r3, #20]
  21902. if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) {
  21903. 8009736: 2b00 cmp r3, #0
  21904. 8009738: d0f4 beq.n 8009724 <etharp_cleanup_netif+0x8>
  21905. 800973a: 4b05 ldr r3, [pc, #20] @ (8009750 <etharp_cleanup_netif+0x34>)
  21906. 800973c: eb03 03c2 add.w r3, r3, r2, lsl #3
  21907. 8009740: 689b ldr r3, [r3, #8]
  21908. 8009742: 42ab cmp r3, r5
  21909. 8009744: d1ee bne.n 8009724 <etharp_cleanup_netif+0x8>
  21910. etharp_free_entry(i);
  21911. 8009746: 4620 mov r0, r4
  21912. 8009748: f7ff fe04 bl 8009354 <etharp_free_entry>
  21913. 800974c: e7ea b.n 8009724 <etharp_cleanup_netif+0x8>
  21914. }
  21915. 800974e: bd38 pop {r3, r4, r5, pc}
  21916. 8009750: 24012f2c .word 0x24012f2c
  21917. 08009754 <etharp_input>:
  21918. {
  21919. 8009754: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  21920. 8009758: b086 sub sp, #24
  21921. 800975a: 4604 mov r4, r0
  21922. 800975c: 460d mov r5, r1
  21923. LWIP_ASSERT_CORE_LOCKED();
  21924. 800975e: f7fa f9d5 bl 8003b0c <sys_check_core_locking>
  21925. LWIP_ERROR("netif != NULL", (netif != NULL), return;);
  21926. 8009762: b19d cbz r5, 800978c <etharp_input+0x38>
  21927. hdr = (struct etharp_hdr *)p->payload;
  21928. 8009764: 6866 ldr r6, [r4, #4]
  21929. if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
  21930. 8009766: 8833 ldrh r3, [r6, #0]
  21931. 8009768: f5b3 7f80 cmp.w r3, #256 @ 0x100
  21932. 800976c: d108 bne.n 8009780 <etharp_input+0x2c>
  21933. (hdr->hwlen != ETH_HWADDR_LEN) ||
  21934. 800976e: 7933 ldrb r3, [r6, #4]
  21935. if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) ||
  21936. 8009770: 2b06 cmp r3, #6
  21937. 8009772: d105 bne.n 8009780 <etharp_input+0x2c>
  21938. (hdr->protolen != sizeof(ip4_addr_t)) ||
  21939. 8009774: 7973 ldrb r3, [r6, #5]
  21940. (hdr->hwlen != ETH_HWADDR_LEN) ||
  21941. 8009776: 2b04 cmp r3, #4
  21942. 8009778: d102 bne.n 8009780 <etharp_input+0x2c>
  21943. (hdr->proto != PP_HTONS(ETHTYPE_IP))) {
  21944. 800977a: 8873 ldrh r3, [r6, #2]
  21945. (hdr->protolen != sizeof(ip4_addr_t)) ||
  21946. 800977c: 2b08 cmp r3, #8
  21947. 800977e: d00d beq.n 800979c <etharp_input+0x48>
  21948. pbuf_free(p);
  21949. 8009780: 4620 mov r0, r4
  21950. 8009782: f002 fb0d bl 800bda0 <pbuf_free>
  21951. }
  21952. 8009786: b006 add sp, #24
  21953. 8009788: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  21954. LWIP_ERROR("netif != NULL", (netif != NULL), return;);
  21955. 800978c: 4b21 ldr r3, [pc, #132] @ (8009814 <etharp_input+0xc0>)
  21956. 800978e: f240 228a movw r2, #650 @ 0x28a
  21957. 8009792: 4921 ldr r1, [pc, #132] @ (8009818 <etharp_input+0xc4>)
  21958. 8009794: 4821 ldr r0, [pc, #132] @ (800981c <etharp_input+0xc8>)
  21959. 8009796: f009 fe37 bl 8013408 <iprintf>
  21960. 800979a: e7f4 b.n 8009786 <etharp_input+0x32>
  21961. IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&sipaddr, &hdr->sipaddr);
  21962. 800979c: f8d6 300e ldr.w r3, [r6, #14]
  21963. 80097a0: 9305 str r3, [sp, #20]
  21964. IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr);
  21965. 80097a2: 69b2 ldr r2, [r6, #24]
  21966. if (ip4_addr_isany_val(*netif_ip4_addr(netif))) {
  21967. 80097a4: 686f ldr r7, [r5, #4]
  21968. 80097a6: b997 cbnz r7, 80097ce <etharp_input+0x7a>
  21969. etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr),
  21970. 80097a8: f106 0808 add.w r8, r6, #8
  21971. 80097ac: 2302 movs r3, #2
  21972. 80097ae: 4642 mov r2, r8
  21973. 80097b0: a905 add r1, sp, #20
  21974. 80097b2: 4628 mov r0, r5
  21975. 80097b4: f7ff feca bl 800954c <etharp_update_arp_entry>
  21976. switch (hdr->opcode) {
  21977. 80097b8: 88f3 ldrh r3, [r6, #6]
  21978. 80097ba: f5b3 7f80 cmp.w r3, #256 @ 0x100
  21979. 80097be: d011 beq.n 80097e4 <etharp_input+0x90>
  21980. 80097c0: f5b3 7f00 cmp.w r3, #512 @ 0x200
  21981. 80097c4: d020 beq.n 8009808 <etharp_input+0xb4>
  21982. pbuf_free(p);
  21983. 80097c6: 4620 mov r0, r4
  21984. 80097c8: f002 faea bl 800bda0 <pbuf_free>
  21985. 80097cc: e7db b.n 8009786 <etharp_input+0x32>
  21986. for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif));
  21987. 80097ce: 4297 cmp r7, r2
  21988. 80097d0: bf14 ite ne
  21989. 80097d2: 2700 movne r7, #0
  21990. 80097d4: 2701 moveq r7, #1
  21991. etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr),
  21992. 80097d6: f106 0808 add.w r8, r6, #8
  21993. 80097da: b10f cbz r7, 80097e0 <etharp_input+0x8c>
  21994. 80097dc: 2301 movs r3, #1
  21995. 80097de: e7e6 b.n 80097ae <etharp_input+0x5a>
  21996. 80097e0: 2302 movs r3, #2
  21997. 80097e2: e7e4 b.n 80097ae <etharp_input+0x5a>
  21998. if (for_us) {
  21999. 80097e4: 2f00 cmp r7, #0
  22000. 80097e6: d0ee beq.n 80097c6 <etharp_input+0x72>
  22001. (struct eth_addr *)netif->hwaddr, &hdr->shwaddr,
  22002. 80097e8: f105 012a add.w r1, r5, #42 @ 0x2a
  22003. (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif),
  22004. 80097ec: 1d2b adds r3, r5, #4
  22005. etharp_raw(netif,
  22006. 80097ee: 2202 movs r2, #2
  22007. 80097f0: 9203 str r2, [sp, #12]
  22008. 80097f2: aa05 add r2, sp, #20
  22009. 80097f4: 9202 str r2, [sp, #8]
  22010. 80097f6: f8cd 8004 str.w r8, [sp, #4]
  22011. 80097fa: 9300 str r3, [sp, #0]
  22012. 80097fc: 460b mov r3, r1
  22013. 80097fe: 4642 mov r2, r8
  22014. 8009800: 4628 mov r0, r5
  22015. 8009802: f7ff ff05 bl 8009610 <etharp_raw>
  22016. 8009806: e7de b.n 80097c6 <etharp_input+0x72>
  22017. dhcp_arp_reply(netif, &sipaddr);
  22018. 8009808: a905 add r1, sp, #20
  22019. 800980a: 4628 mov r0, r5
  22020. 800980c: f7ff fb86 bl 8008f1c <dhcp_arp_reply>
  22021. break;
  22022. 8009810: e7d9 b.n 80097c6 <etharp_input+0x72>
  22023. 8009812: bf00 nop
  22024. 8009814: 08015210 .word 0x08015210
  22025. 8009818: 080144d8 .word 0x080144d8
  22026. 800981c: 080144e8 .word 0x080144e8
  22027. 08009820 <etharp_request>:
  22028. * ERR_MEM if the ARP packet couldn't be allocated
  22029. * any other err_t on failure
  22030. */
  22031. err_t
  22032. etharp_request(struct netif *netif, const ip4_addr_t *ipaddr)
  22033. {
  22034. 8009820: b508 push {r3, lr}
  22035. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n"));
  22036. return etharp_request_dst(netif, ipaddr, &ethbroadcast);
  22037. 8009822: 4a02 ldr r2, [pc, #8] @ (800982c <etharp_request+0xc>)
  22038. 8009824: f7ff ff68 bl 80096f8 <etharp_request_dst>
  22039. }
  22040. 8009828: bd08 pop {r3, pc}
  22041. 800982a: bf00 nop
  22042. 800982c: 080154bc .word 0x080154bc
  22043. 08009830 <etharp_tmr>:
  22044. {
  22045. 8009830: b510 push {r4, lr}
  22046. for (i = 0; i < ARP_TABLE_SIZE; ++i) {
  22047. 8009832: 2400 movs r4, #0
  22048. 8009834: e005 b.n 8009842 <etharp_tmr+0x12>
  22049. ((arp_table[i].state == ETHARP_STATE_PENDING) &&
  22050. 8009836: 2b04 cmp r3, #4
  22051. 8009838: d91b bls.n 8009872 <etharp_tmr+0x42>
  22052. etharp_free_entry(i);
  22053. 800983a: 4620 mov r0, r4
  22054. 800983c: f7ff fd8a bl 8009354 <etharp_free_entry>
  22055. for (i = 0; i < ARP_TABLE_SIZE; ++i) {
  22056. 8009840: 3401 adds r4, #1
  22057. 8009842: 2c09 cmp r4, #9
  22058. 8009844: dc35 bgt.n 80098b2 <etharp_tmr+0x82>
  22059. u8_t state = arp_table[i].state;
  22060. 8009846: eb04 0344 add.w r3, r4, r4, lsl #1
  22061. 800984a: 00da lsls r2, r3, #3
  22062. 800984c: 4b19 ldr r3, [pc, #100] @ (80098b4 <etharp_tmr+0x84>)
  22063. 800984e: 4413 add r3, r2
  22064. 8009850: 7d1a ldrb r2, [r3, #20]
  22065. if (state != ETHARP_STATE_EMPTY
  22066. 8009852: 2a00 cmp r2, #0
  22067. 8009854: d0f4 beq.n 8009840 <etharp_tmr+0x10>
  22068. arp_table[i].ctime++;
  22069. 8009856: eb04 0144 add.w r1, r4, r4, lsl #1
  22070. 800985a: 00cb lsls r3, r1, #3
  22071. 800985c: 4915 ldr r1, [pc, #84] @ (80098b4 <etharp_tmr+0x84>)
  22072. 800985e: 4419 add r1, r3
  22073. 8009860: 8a4b ldrh r3, [r1, #18]
  22074. 8009862: 3301 adds r3, #1
  22075. 8009864: b29b uxth r3, r3
  22076. 8009866: 824b strh r3, [r1, #18]
  22077. if ((arp_table[i].ctime >= ARP_MAXAGE) ||
  22078. 8009868: f5b3 7f96 cmp.w r3, #300 @ 0x12c
  22079. 800986c: d2e5 bcs.n 800983a <etharp_tmr+0xa>
  22080. 800986e: 2a01 cmp r2, #1
  22081. 8009870: d0e1 beq.n 8009836 <etharp_tmr+0x6>
  22082. } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) {
  22083. 8009872: 2a03 cmp r2, #3
  22084. 8009874: d00d beq.n 8009892 <etharp_tmr+0x62>
  22085. } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) {
  22086. 8009876: 2a04 cmp r2, #4
  22087. 8009878: d013 beq.n 80098a2 <etharp_tmr+0x72>
  22088. } else if (arp_table[i].state == ETHARP_STATE_PENDING) {
  22089. 800987a: 2a01 cmp r2, #1
  22090. 800987c: d1e0 bne.n 8009840 <etharp_tmr+0x10>
  22091. etharp_request(arp_table[i].netif, &arp_table[i].ipaddr);
  22092. 800987e: eb04 0244 add.w r2, r4, r4, lsl #1
  22093. 8009882: 00d3 lsls r3, r2, #3
  22094. 8009884: 4a0b ldr r2, [pc, #44] @ (80098b4 <etharp_tmr+0x84>)
  22095. 8009886: 4413 add r3, r2
  22096. 8009888: 1d19 adds r1, r3, #4
  22097. 800988a: 6898 ldr r0, [r3, #8]
  22098. 800988c: f7ff ffc8 bl 8009820 <etharp_request>
  22099. 8009890: e7d6 b.n 8009840 <etharp_tmr+0x10>
  22100. arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2;
  22101. 8009892: eb04 0344 add.w r3, r4, r4, lsl #1
  22102. 8009896: 00da lsls r2, r3, #3
  22103. 8009898: 4b06 ldr r3, [pc, #24] @ (80098b4 <etharp_tmr+0x84>)
  22104. 800989a: 4413 add r3, r2
  22105. 800989c: 2204 movs r2, #4
  22106. 800989e: 751a strb r2, [r3, #20]
  22107. 80098a0: e7ce b.n 8009840 <etharp_tmr+0x10>
  22108. arp_table[i].state = ETHARP_STATE_STABLE;
  22109. 80098a2: eb04 0344 add.w r3, r4, r4, lsl #1
  22110. 80098a6: 00da lsls r2, r3, #3
  22111. 80098a8: 4b02 ldr r3, [pc, #8] @ (80098b4 <etharp_tmr+0x84>)
  22112. 80098aa: 4413 add r3, r2
  22113. 80098ac: 2202 movs r2, #2
  22114. 80098ae: 751a strb r2, [r3, #20]
  22115. 80098b0: e7c6 b.n 8009840 <etharp_tmr+0x10>
  22116. }
  22117. 80098b2: bd10 pop {r4, pc}
  22118. 80098b4: 24012f2c .word 0x24012f2c
  22119. 080098b8 <etharp_output_to_arp_index>:
  22120. {
  22121. 80098b8: b570 push {r4, r5, r6, lr}
  22122. 80098ba: b082 sub sp, #8
  22123. 80098bc: 4605 mov r5, r0
  22124. 80098be: 460e mov r6, r1
  22125. 80098c0: 4614 mov r4, r2
  22126. LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE",
  22127. 80098c2: eb02 0242 add.w r2, r2, r2, lsl #1
  22128. 80098c6: 4b2e ldr r3, [pc, #184] @ (8009980 <etharp_output_to_arp_index+0xc8>)
  22129. 80098c8: eb03 03c2 add.w r3, r3, r2, lsl #3
  22130. 80098cc: 7d1b ldrb r3, [r3, #20]
  22131. 80098ce: 2b01 cmp r3, #1
  22132. 80098d0: d919 bls.n 8009906 <etharp_output_to_arp_index+0x4e>
  22133. if (arp_table[arp_idx].state == ETHARP_STATE_STABLE) {
  22134. 80098d2: eb04 0244 add.w r2, r4, r4, lsl #1
  22135. 80098d6: 4b2a ldr r3, [pc, #168] @ (8009980 <etharp_output_to_arp_index+0xc8>)
  22136. 80098d8: eb03 03c2 add.w r3, r3, r2, lsl #3
  22137. 80098dc: 7d1b ldrb r3, [r3, #20]
  22138. 80098de: 2b02 cmp r3, #2
  22139. 80098e0: d019 beq.n 8009916 <etharp_output_to_arp_index+0x5e>
  22140. return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP);
  22141. 80098e2: eb04 0344 add.w r3, r4, r4, lsl #1
  22142. 80098e6: 00db lsls r3, r3, #3
  22143. 80098e8: 3308 adds r3, #8
  22144. 80098ea: 4a25 ldr r2, [pc, #148] @ (8009980 <etharp_output_to_arp_index+0xc8>)
  22145. 80098ec: 4413 add r3, r2
  22146. 80098ee: f44f 6200 mov.w r2, #2048 @ 0x800
  22147. 80098f2: 9200 str r2, [sp, #0]
  22148. 80098f4: 3304 adds r3, #4
  22149. 80098f6: f105 022a add.w r2, r5, #42 @ 0x2a
  22150. 80098fa: 4631 mov r1, r6
  22151. 80098fc: 4628 mov r0, r5
  22152. 80098fe: f000 fa21 bl 8009d44 <ethernet_output>
  22153. }
  22154. 8009902: b002 add sp, #8
  22155. 8009904: bd70 pop {r4, r5, r6, pc}
  22156. LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE",
  22157. 8009906: 4b1f ldr r3, [pc, #124] @ (8009984 <etharp_output_to_arp_index+0xcc>)
  22158. 8009908: f240 22ee movw r2, #750 @ 0x2ee
  22159. 800990c: 491e ldr r1, [pc, #120] @ (8009988 <etharp_output_to_arp_index+0xd0>)
  22160. 800990e: 481f ldr r0, [pc, #124] @ (800998c <etharp_output_to_arp_index+0xd4>)
  22161. 8009910: f009 fd7a bl 8013408 <iprintf>
  22162. 8009914: e7dd b.n 80098d2 <etharp_output_to_arp_index+0x1a>
  22163. if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) {
  22164. 8009916: 4b1a ldr r3, [pc, #104] @ (8009980 <etharp_output_to_arp_index+0xc8>)
  22165. 8009918: eb03 03c2 add.w r3, r3, r2, lsl #3
  22166. 800991c: 8a5b ldrh r3, [r3, #18]
  22167. 800991e: f5b3 7f8e cmp.w r3, #284 @ 0x11c
  22168. 8009922: d81b bhi.n 800995c <etharp_output_to_arp_index+0xa4>
  22169. } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) {
  22170. 8009924: f5b3 7f87 cmp.w r3, #270 @ 0x10e
  22171. 8009928: d3db bcc.n 80098e2 <etharp_output_to_arp_index+0x2a>
  22172. if (etharp_request_dst(netif, &arp_table[arp_idx].ipaddr, &arp_table[arp_idx].ethaddr) == ERR_OK) {
  22173. 800992a: eb04 0144 add.w r1, r4, r4, lsl #1
  22174. 800992e: 4b14 ldr r3, [pc, #80] @ (8009980 <etharp_output_to_arp_index+0xc8>)
  22175. 8009930: eb03 01c1 add.w r1, r3, r1, lsl #3
  22176. 8009934: eb04 0244 add.w r2, r4, r4, lsl #1
  22177. 8009938: 00d2 lsls r2, r2, #3
  22178. 800993a: 3208 adds r2, #8
  22179. 800993c: 441a add r2, r3
  22180. 800993e: 3204 adds r2, #4
  22181. 8009940: 3104 adds r1, #4
  22182. 8009942: 4628 mov r0, r5
  22183. 8009944: f7ff fed8 bl 80096f8 <etharp_request_dst>
  22184. 8009948: 2800 cmp r0, #0
  22185. 800994a: d1ca bne.n 80098e2 <etharp_output_to_arp_index+0x2a>
  22186. arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
  22187. 800994c: eb04 0244 add.w r2, r4, r4, lsl #1
  22188. 8009950: 4b0b ldr r3, [pc, #44] @ (8009980 <etharp_output_to_arp_index+0xc8>)
  22189. 8009952: eb03 03c2 add.w r3, r3, r2, lsl #3
  22190. 8009956: 2203 movs r2, #3
  22191. 8009958: 751a strb r2, [r3, #20]
  22192. 800995a: e7c2 b.n 80098e2 <etharp_output_to_arp_index+0x2a>
  22193. if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) {
  22194. 800995c: 4908 ldr r1, [pc, #32] @ (8009980 <etharp_output_to_arp_index+0xc8>)
  22195. 800995e: eb01 01c2 add.w r1, r1, r2, lsl #3
  22196. 8009962: 3104 adds r1, #4
  22197. 8009964: 4628 mov r0, r5
  22198. 8009966: f7ff ff5b bl 8009820 <etharp_request>
  22199. 800996a: 2800 cmp r0, #0
  22200. 800996c: d1b9 bne.n 80098e2 <etharp_output_to_arp_index+0x2a>
  22201. arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1;
  22202. 800996e: eb04 0244 add.w r2, r4, r4, lsl #1
  22203. 8009972: 4b03 ldr r3, [pc, #12] @ (8009980 <etharp_output_to_arp_index+0xc8>)
  22204. 8009974: eb03 03c2 add.w r3, r3, r2, lsl #3
  22205. 8009978: 2203 movs r2, #3
  22206. 800997a: 751a strb r2, [r3, #20]
  22207. 800997c: e7b1 b.n 80098e2 <etharp_output_to_arp_index+0x2a>
  22208. 800997e: bf00 nop
  22209. 8009980: 24012f2c .word 0x24012f2c
  22210. 8009984: 08015210 .word 0x08015210
  22211. 8009988: 0801538c .word 0x0801538c
  22212. 800998c: 080144e8 .word 0x080144e8
  22213. 08009990 <etharp_query>:
  22214. {
  22215. 8009990: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
  22216. 8009994: b083 sub sp, #12
  22217. 8009996: 4605 mov r5, r0
  22218. 8009998: 4688 mov r8, r1
  22219. 800999a: 4616 mov r6, r2
  22220. struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr;
  22221. 800999c: f100 072a add.w r7, r0, #42 @ 0x2a
  22222. if (ip4_addr_isbroadcast(ipaddr, netif) ||
  22223. 80099a0: 4601 mov r1, r0
  22224. 80099a2: f8d8 0000 ldr.w r0, [r8]
  22225. 80099a6: f000 fd54 bl 800a452 <ip4_addr_isbroadcast_u32>
  22226. 80099aa: 2800 cmp r0, #0
  22227. 80099ac: f040 80a1 bne.w 8009af2 <etharp_query+0x162>
  22228. ip4_addr_ismulticast(ipaddr) ||
  22229. 80099b0: f8d8 3000 ldr.w r3, [r8]
  22230. 80099b4: f003 02f0 and.w r2, r3, #240 @ 0xf0
  22231. if (ip4_addr_isbroadcast(ipaddr, netif) ||
  22232. 80099b8: 2ae0 cmp r2, #224 @ 0xe0
  22233. 80099ba: f000 809d beq.w 8009af8 <etharp_query+0x168>
  22234. ip4_addr_isany(ipaddr)) {
  22235. 80099be: 2b00 cmp r3, #0
  22236. 80099c0: f000 809d beq.w 8009afe <etharp_query+0x16e>
  22237. i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif);
  22238. 80099c4: 462a mov r2, r5
  22239. 80099c6: 2101 movs r1, #1
  22240. 80099c8: 4640 mov r0, r8
  22241. 80099ca: f7ff fce7 bl 800939c <etharp_find_entry>
  22242. if (i_err < 0) {
  22243. 80099ce: 1e04 subs r4, r0, #0
  22244. 80099d0: db13 blt.n 80099fa <etharp_query+0x6a>
  22245. LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX);
  22246. 80099d2: b2a3 uxth r3, r4
  22247. 80099d4: 2b7e cmp r3, #126 @ 0x7e
  22248. 80099d6: d812 bhi.n 80099fe <etharp_query+0x6e>
  22249. i = (netif_addr_idx_t)i_err;
  22250. 80099d8: b2e4 uxtb r4, r4
  22251. if (arp_table[i].state == ETHARP_STATE_EMPTY) {
  22252. 80099da: eb04 0244 add.w r2, r4, r4, lsl #1
  22253. 80099de: 4b4b ldr r3, [pc, #300] @ (8009b0c <etharp_query+0x17c>)
  22254. 80099e0: eb03 03c2 add.w r3, r3, r2, lsl #3
  22255. 80099e4: 7d1b ldrb r3, [r3, #20]
  22256. 80099e6: b993 cbnz r3, 8009a0e <etharp_query+0x7e>
  22257. arp_table[i].state = ETHARP_STATE_PENDING;
  22258. 80099e8: 4b48 ldr r3, [pc, #288] @ (8009b0c <etharp_query+0x17c>)
  22259. 80099ea: eb03 03c2 add.w r3, r3, r2, lsl #3
  22260. 80099ee: f04f 0901 mov.w r9, #1
  22261. 80099f2: f883 9014 strb.w r9, [r3, #20]
  22262. arp_table[i].netif = netif;
  22263. 80099f6: 609d str r5, [r3, #8]
  22264. 80099f8: e00b b.n 8009a12 <etharp_query+0x82>
  22265. return (err_t)i_err;
  22266. 80099fa: b260 sxtb r0, r4
  22267. 80099fc: e042 b.n 8009a84 <etharp_query+0xf4>
  22268. LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX);
  22269. 80099fe: 4b44 ldr r3, [pc, #272] @ (8009b10 <etharp_query+0x180>)
  22270. 8009a00: f240 32c1 movw r2, #961 @ 0x3c1
  22271. 8009a04: 4943 ldr r1, [pc, #268] @ (8009b14 <etharp_query+0x184>)
  22272. 8009a06: 4844 ldr r0, [pc, #272] @ (8009b18 <etharp_query+0x188>)
  22273. 8009a08: f009 fcfe bl 8013408 <iprintf>
  22274. 8009a0c: e7e4 b.n 80099d8 <etharp_query+0x48>
  22275. int is_new_entry = 0;
  22276. 8009a0e: f04f 0900 mov.w r9, #0
  22277. LWIP_ASSERT("arp_table[i].state == PENDING or STABLE",
  22278. 8009a12: eb04 0244 add.w r2, r4, r4, lsl #1
  22279. 8009a16: 4b3d ldr r3, [pc, #244] @ (8009b0c <etharp_query+0x17c>)
  22280. 8009a18: eb03 03c2 add.w r3, r3, r2, lsl #3
  22281. 8009a1c: 7d1b ldrb r3, [r3, #20]
  22282. 8009a1e: b19b cbz r3, 8009a48 <etharp_query+0xb8>
  22283. if (is_new_entry || (q == NULL)) {
  22284. 8009a20: 2e00 cmp r6, #0
  22285. 8009a22: bf14 ite ne
  22286. 8009a24: 464b movne r3, r9
  22287. 8009a26: f049 0301 orreq.w r3, r9, #1
  22288. 8009a2a: b9ab cbnz r3, 8009a58 <etharp_query+0xc8>
  22289. err_t result = ERR_MEM;
  22290. 8009a2c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  22291. if (arp_table[i].state >= ETHARP_STATE_STABLE) {
  22292. 8009a30: eb04 0244 add.w r2, r4, r4, lsl #1
  22293. 8009a34: 4b35 ldr r3, [pc, #212] @ (8009b0c <etharp_query+0x17c>)
  22294. 8009a36: eb03 03c2 add.w r3, r3, r2, lsl #3
  22295. 8009a3a: 7d1b ldrb r3, [r3, #20]
  22296. 8009a3c: 2b01 cmp r3, #1
  22297. 8009a3e: d812 bhi.n 8009a66 <etharp_query+0xd6>
  22298. } else if (arp_table[i].state == ETHARP_STATE_PENDING) {
  22299. 8009a40: 2b01 cmp r3, #1
  22300. 8009a42: d11f bne.n 8009a84 <etharp_query+0xf4>
  22301. p = q;
  22302. 8009a44: 4635 mov r5, r6
  22303. 8009a46: e025 b.n 8009a94 <etharp_query+0x104>
  22304. LWIP_ASSERT("arp_table[i].state == PENDING or STABLE",
  22305. 8009a48: 4b31 ldr r3, [pc, #196] @ (8009b10 <etharp_query+0x180>)
  22306. 8009a4a: f240 32cd movw r2, #973 @ 0x3cd
  22307. 8009a4e: 4933 ldr r1, [pc, #204] @ (8009b1c <etharp_query+0x18c>)
  22308. 8009a50: 4831 ldr r0, [pc, #196] @ (8009b18 <etharp_query+0x188>)
  22309. 8009a52: f009 fcd9 bl 8013408 <iprintf>
  22310. 8009a56: e7e3 b.n 8009a20 <etharp_query+0x90>
  22311. result = etharp_request(netif, ipaddr);
  22312. 8009a58: 4641 mov r1, r8
  22313. 8009a5a: 4628 mov r0, r5
  22314. 8009a5c: f7ff fee0 bl 8009820 <etharp_request>
  22315. if (q == NULL) {
  22316. 8009a60: 2e00 cmp r6, #0
  22317. 8009a62: d1e5 bne.n 8009a30 <etharp_query+0xa0>
  22318. 8009a64: e00e b.n 8009a84 <etharp_query+0xf4>
  22319. ETHARP_SET_ADDRHINT(netif, i);
  22320. 8009a66: 4b2e ldr r3, [pc, #184] @ (8009b20 <etharp_query+0x190>)
  22321. 8009a68: 701c strb r4, [r3, #0]
  22322. result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP);
  22323. 8009a6a: 00d3 lsls r3, r2, #3
  22324. 8009a6c: 3308 adds r3, #8
  22325. 8009a6e: 4a27 ldr r2, [pc, #156] @ (8009b0c <etharp_query+0x17c>)
  22326. 8009a70: 4413 add r3, r2
  22327. 8009a72: f44f 6200 mov.w r2, #2048 @ 0x800
  22328. 8009a76: 9200 str r2, [sp, #0]
  22329. 8009a78: 3304 adds r3, #4
  22330. 8009a7a: 463a mov r2, r7
  22331. 8009a7c: 4631 mov r1, r6
  22332. 8009a7e: 4628 mov r0, r5
  22333. 8009a80: f000 f960 bl 8009d44 <ethernet_output>
  22334. }
  22335. 8009a84: b003 add sp, #12
  22336. 8009a86: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
  22337. if (PBUF_NEEDS_COPY(p)) {
  22338. 8009a8a: 7b2b ldrb r3, [r5, #12]
  22339. 8009a8c: f013 0f40 tst.w r3, #64 @ 0x40
  22340. 8009a90: d129 bne.n 8009ae6 <etharp_query+0x156>
  22341. p = p->next;
  22342. 8009a92: 682d ldr r5, [r5, #0]
  22343. while (p) {
  22344. 8009a94: b175 cbz r5, 8009ab4 <etharp_query+0x124>
  22345. LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0));
  22346. 8009a96: 896a ldrh r2, [r5, #10]
  22347. 8009a98: 892b ldrh r3, [r5, #8]
  22348. 8009a9a: 429a cmp r2, r3
  22349. 8009a9c: d1f5 bne.n 8009a8a <etharp_query+0xfa>
  22350. 8009a9e: 682b ldr r3, [r5, #0]
  22351. 8009aa0: 2b00 cmp r3, #0
  22352. 8009aa2: d0f2 beq.n 8009a8a <etharp_query+0xfa>
  22353. 8009aa4: 4b1a ldr r3, [pc, #104] @ (8009b10 <etharp_query+0x180>)
  22354. 8009aa6: f240 32f1 movw r2, #1009 @ 0x3f1
  22355. 8009aaa: 491e ldr r1, [pc, #120] @ (8009b24 <etharp_query+0x194>)
  22356. 8009aac: 481a ldr r0, [pc, #104] @ (8009b18 <etharp_query+0x188>)
  22357. 8009aae: f009 fcab bl 8013408 <iprintf>
  22358. 8009ab2: e7ea b.n 8009a8a <etharp_query+0xfa>
  22359. int copy_needed = 0;
  22360. 8009ab4: 2300 movs r3, #0
  22361. if (copy_needed) {
  22362. 8009ab6: b1c3 cbz r3, 8009aea <etharp_query+0x15a>
  22363. p = pbuf_clone(PBUF_LINK, PBUF_RAM, q);
  22364. 8009ab8: 4632 mov r2, r6
  22365. 8009aba: f44f 7120 mov.w r1, #640 @ 0x280
  22366. 8009abe: 200e movs r0, #14
  22367. 8009ac0: f002 fc3e bl 800c340 <pbuf_clone>
  22368. 8009ac4: 4606 mov r6, r0
  22369. if (p != NULL) {
  22370. 8009ac6: b1ee cbz r6, 8009b04 <etharp_query+0x174>
  22371. if (arp_table[i].q != NULL) {
  22372. 8009ac8: eb04 0344 add.w r3, r4, r4, lsl #1
  22373. 8009acc: 4a0f ldr r2, [pc, #60] @ (8009b0c <etharp_query+0x17c>)
  22374. 8009ace: f852 0033 ldr.w r0, [r2, r3, lsl #3]
  22375. 8009ad2: b108 cbz r0, 8009ad8 <etharp_query+0x148>
  22376. pbuf_free(arp_table[i].q);
  22377. 8009ad4: f002 f964 bl 800bda0 <pbuf_free>
  22378. arp_table[i].q = p;
  22379. 8009ad8: eb04 0444 add.w r4, r4, r4, lsl #1
  22380. 8009adc: 4b0b ldr r3, [pc, #44] @ (8009b0c <etharp_query+0x17c>)
  22381. 8009ade: f843 6034 str.w r6, [r3, r4, lsl #3]
  22382. result = ERR_OK;
  22383. 8009ae2: 2000 movs r0, #0
  22384. 8009ae4: e7ce b.n 8009a84 <etharp_query+0xf4>
  22385. copy_needed = 1;
  22386. 8009ae6: 2301 movs r3, #1
  22387. 8009ae8: e7e5 b.n 8009ab6 <etharp_query+0x126>
  22388. pbuf_ref(p);
  22389. 8009aea: 4630 mov r0, r6
  22390. 8009aec: f002 fae6 bl 800c0bc <pbuf_ref>
  22391. 8009af0: e7e9 b.n 8009ac6 <etharp_query+0x136>
  22392. return ERR_ARG;
  22393. 8009af2: f06f 000f mvn.w r0, #15
  22394. 8009af6: e7c5 b.n 8009a84 <etharp_query+0xf4>
  22395. 8009af8: f06f 000f mvn.w r0, #15
  22396. 8009afc: e7c2 b.n 8009a84 <etharp_query+0xf4>
  22397. 8009afe: f06f 000f mvn.w r0, #15
  22398. 8009b02: e7bf b.n 8009a84 <etharp_query+0xf4>
  22399. result = ERR_MEM;
  22400. 8009b04: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  22401. 8009b08: e7bc b.n 8009a84 <etharp_query+0xf4>
  22402. 8009b0a: bf00 nop
  22403. 8009b0c: 24012f2c .word 0x24012f2c
  22404. 8009b10: 08015210 .word 0x08015210
  22405. 8009b14: 080153bc .word 0x080153bc
  22406. 8009b18: 080144e8 .word 0x080144e8
  22407. 8009b1c: 080153cc .word 0x080153cc
  22408. 8009b20: 24012f28 .word 0x24012f28
  22409. 8009b24: 080153f4 .word 0x080153f4
  22410. 08009b28 <etharp_output>:
  22411. {
  22412. 8009b28: b5f0 push {r4, r5, r6, r7, lr}
  22413. 8009b2a: b085 sub sp, #20
  22414. 8009b2c: 4605 mov r5, r0
  22415. 8009b2e: 460f mov r7, r1
  22416. 8009b30: 4616 mov r6, r2
  22417. LWIP_ASSERT_CORE_LOCKED();
  22418. 8009b32: f7f9 ffeb bl 8003b0c <sys_check_core_locking>
  22419. LWIP_ASSERT("netif != NULL", netif != NULL);
  22420. 8009b36: 2d00 cmp r5, #0
  22421. 8009b38: d03d beq.n 8009bb6 <etharp_output+0x8e>
  22422. LWIP_ASSERT("q != NULL", q != NULL);
  22423. 8009b3a: 2f00 cmp r7, #0
  22424. 8009b3c: d043 beq.n 8009bc6 <etharp_output+0x9e>
  22425. LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL);
  22426. 8009b3e: 2e00 cmp r6, #0
  22427. 8009b40: d049 beq.n 8009bd6 <etharp_output+0xae>
  22428. if (ip4_addr_isbroadcast(ipaddr, netif)) {
  22429. 8009b42: 4629 mov r1, r5
  22430. 8009b44: 6830 ldr r0, [r6, #0]
  22431. 8009b46: f000 fc84 bl 800a452 <ip4_addr_isbroadcast_u32>
  22432. 8009b4a: 4603 mov r3, r0
  22433. 8009b4c: 2800 cmp r0, #0
  22434. 8009b4e: f040 8084 bne.w 8009c5a <etharp_output+0x132>
  22435. } else if (ip4_addr_ismulticast(ipaddr)) {
  22436. 8009b52: 6832 ldr r2, [r6, #0]
  22437. 8009b54: f002 01f0 and.w r1, r2, #240 @ 0xf0
  22438. 8009b58: 29e0 cmp r1, #224 @ 0xe0
  22439. 8009b5a: d044 beq.n 8009be6 <etharp_output+0xbe>
  22440. if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
  22441. 8009b5c: 6869 ldr r1, [r5, #4]
  22442. 8009b5e: 68a8 ldr r0, [r5, #8]
  22443. 8009b60: 4051 eors r1, r2
  22444. 8009b62: 4201 tst r1, r0
  22445. 8009b64: d009 beq.n 8009b7a <etharp_output+0x52>
  22446. !ip4_addr_islinklocal(ipaddr)) {
  22447. 8009b66: b292 uxth r2, r2
  22448. if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) &&
  22449. 8009b68: f64f 61a9 movw r1, #65193 @ 0xfea9
  22450. 8009b6c: 428a cmp r2, r1
  22451. 8009b6e: d004 beq.n 8009b7a <etharp_output+0x52>
  22452. if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) {
  22453. 8009b70: 68ea ldr r2, [r5, #12]
  22454. 8009b72: 2a00 cmp r2, #0
  22455. 8009b74: d07d beq.n 8009c72 <etharp_output+0x14a>
  22456. dst_addr = netif_ip4_gw(netif);
  22457. 8009b76: f105 060c add.w r6, r5, #12
  22458. if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
  22459. 8009b7a: 4a3f ldr r2, [pc, #252] @ (8009c78 <etharp_output+0x150>)
  22460. 8009b7c: 7812 ldrb r2, [r2, #0]
  22461. 8009b7e: eb02 0042 add.w r0, r2, r2, lsl #1
  22462. 8009b82: 493e ldr r1, [pc, #248] @ (8009c7c <etharp_output+0x154>)
  22463. 8009b84: eb01 01c0 add.w r1, r1, r0, lsl #3
  22464. 8009b88: 7d09 ldrb r1, [r1, #20]
  22465. 8009b8a: 2901 cmp r1, #1
  22466. 8009b8c: d943 bls.n 8009c16 <etharp_output+0xee>
  22467. (arp_table[etharp_cached_entry].netif == netif) &&
  22468. 8009b8e: 493b ldr r1, [pc, #236] @ (8009c7c <etharp_output+0x154>)
  22469. 8009b90: eb01 01c0 add.w r1, r1, r0, lsl #3
  22470. 8009b94: 6889 ldr r1, [r1, #8]
  22471. if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) &&
  22472. 8009b96: 42a9 cmp r1, r5
  22473. 8009b98: d13d bne.n 8009c16 <etharp_output+0xee>
  22474. (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) {
  22475. 8009b9a: 6830 ldr r0, [r6, #0]
  22476. 8009b9c: eb02 0442 add.w r4, r2, r2, lsl #1
  22477. 8009ba0: 4936 ldr r1, [pc, #216] @ (8009c7c <etharp_output+0x154>)
  22478. 8009ba2: eb01 01c4 add.w r1, r1, r4, lsl #3
  22479. 8009ba6: 6849 ldr r1, [r1, #4]
  22480. (arp_table[etharp_cached_entry].netif == netif) &&
  22481. 8009ba8: 4288 cmp r0, r1
  22482. 8009baa: d134 bne.n 8009c16 <etharp_output+0xee>
  22483. return etharp_output_to_arp_index(netif, q, etharp_cached_entry);
  22484. 8009bac: 4639 mov r1, r7
  22485. 8009bae: 4628 mov r0, r5
  22486. 8009bb0: f7ff fe82 bl 80098b8 <etharp_output_to_arp_index>
  22487. 8009bb4: e05b b.n 8009c6e <etharp_output+0x146>
  22488. LWIP_ASSERT("netif != NULL", netif != NULL);
  22489. 8009bb6: 4b32 ldr r3, [pc, #200] @ (8009c80 <etharp_output+0x158>)
  22490. 8009bb8: f240 321e movw r2, #798 @ 0x31e
  22491. 8009bbc: 4931 ldr r1, [pc, #196] @ (8009c84 <etharp_output+0x15c>)
  22492. 8009bbe: 4832 ldr r0, [pc, #200] @ (8009c88 <etharp_output+0x160>)
  22493. 8009bc0: f009 fc22 bl 8013408 <iprintf>
  22494. 8009bc4: e7b9 b.n 8009b3a <etharp_output+0x12>
  22495. LWIP_ASSERT("q != NULL", q != NULL);
  22496. 8009bc6: 4b2e ldr r3, [pc, #184] @ (8009c80 <etharp_output+0x158>)
  22497. 8009bc8: f240 321f movw r2, #799 @ 0x31f
  22498. 8009bcc: 492f ldr r1, [pc, #188] @ (8009c8c <etharp_output+0x164>)
  22499. 8009bce: 482e ldr r0, [pc, #184] @ (8009c88 <etharp_output+0x160>)
  22500. 8009bd0: f009 fc1a bl 8013408 <iprintf>
  22501. 8009bd4: e7b3 b.n 8009b3e <etharp_output+0x16>
  22502. LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL);
  22503. 8009bd6: 4b2a ldr r3, [pc, #168] @ (8009c80 <etharp_output+0x158>)
  22504. 8009bd8: f44f 7248 mov.w r2, #800 @ 0x320
  22505. 8009bdc: 492c ldr r1, [pc, #176] @ (8009c90 <etharp_output+0x168>)
  22506. 8009bde: 482a ldr r0, [pc, #168] @ (8009c88 <etharp_output+0x160>)
  22507. 8009be0: f009 fc12 bl 8013408 <iprintf>
  22508. 8009be4: e7ad b.n 8009b42 <etharp_output+0x1a>
  22509. mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0;
  22510. 8009be6: 2301 movs r3, #1
  22511. 8009be8: f88d 3008 strb.w r3, [sp, #8]
  22512. mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1;
  22513. 8009bec: 2300 movs r3, #0
  22514. 8009bee: f88d 3009 strb.w r3, [sp, #9]
  22515. mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2;
  22516. 8009bf2: 235e movs r3, #94 @ 0x5e
  22517. 8009bf4: f88d 300a strb.w r3, [sp, #10]
  22518. mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f;
  22519. 8009bf8: 7873 ldrb r3, [r6, #1]
  22520. 8009bfa: f003 037f and.w r3, r3, #127 @ 0x7f
  22521. 8009bfe: f88d 300b strb.w r3, [sp, #11]
  22522. mcastaddr.addr[4] = ip4_addr3(ipaddr);
  22523. 8009c02: 78b3 ldrb r3, [r6, #2]
  22524. 8009c04: f88d 300c strb.w r3, [sp, #12]
  22525. mcastaddr.addr[5] = ip4_addr4(ipaddr);
  22526. 8009c08: 78f3 ldrb r3, [r6, #3]
  22527. 8009c0a: f88d 300d strb.w r3, [sp, #13]
  22528. dest = &mcastaddr;
  22529. 8009c0e: ab02 add r3, sp, #8
  22530. 8009c10: e024 b.n 8009c5c <etharp_output+0x134>
  22531. for (i = 0; i < ARP_TABLE_SIZE; i++) {
  22532. 8009c12: 3301 adds r3, #1
  22533. 8009c14: b2db uxtb r3, r3
  22534. 8009c16: 2b09 cmp r3, #9
  22535. 8009c18: d819 bhi.n 8009c4e <etharp_output+0x126>
  22536. if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
  22537. 8009c1a: eb03 0c43 add.w ip, r3, r3, lsl #1
  22538. 8009c1e: 4c17 ldr r4, [pc, #92] @ (8009c7c <etharp_output+0x154>)
  22539. 8009c20: eb04 0ccc add.w ip, r4, ip, lsl #3
  22540. 8009c24: f89c 2014 ldrb.w r2, [ip, #20]
  22541. 8009c28: 2a01 cmp r2, #1
  22542. 8009c2a: d9f2 bls.n 8009c12 <etharp_output+0xea>
  22543. (arp_table[i].netif == netif) &&
  22544. 8009c2c: f8dc 2008 ldr.w r2, [ip, #8]
  22545. if ((arp_table[i].state >= ETHARP_STATE_STABLE) &&
  22546. 8009c30: 42aa cmp r2, r5
  22547. 8009c32: d1ee bne.n 8009c12 <etharp_output+0xea>
  22548. (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) {
  22549. 8009c34: 6831 ldr r1, [r6, #0]
  22550. 8009c36: f8dc 2004 ldr.w r2, [ip, #4]
  22551. (arp_table[i].netif == netif) &&
  22552. 8009c3a: 4291 cmp r1, r2
  22553. 8009c3c: d1e9 bne.n 8009c12 <etharp_output+0xea>
  22554. ETHARP_SET_ADDRHINT(netif, i);
  22555. 8009c3e: 4a0e ldr r2, [pc, #56] @ (8009c78 <etharp_output+0x150>)
  22556. 8009c40: 7013 strb r3, [r2, #0]
  22557. return etharp_output_to_arp_index(netif, q, i);
  22558. 8009c42: 461a mov r2, r3
  22559. 8009c44: 4639 mov r1, r7
  22560. 8009c46: 4628 mov r0, r5
  22561. 8009c48: f7ff fe36 bl 80098b8 <etharp_output_to_arp_index>
  22562. 8009c4c: e00f b.n 8009c6e <etharp_output+0x146>
  22563. return etharp_query(netif, dst_addr, q);
  22564. 8009c4e: 463a mov r2, r7
  22565. 8009c50: 4631 mov r1, r6
  22566. 8009c52: 4628 mov r0, r5
  22567. 8009c54: f7ff fe9c bl 8009990 <etharp_query>
  22568. 8009c58: e009 b.n 8009c6e <etharp_output+0x146>
  22569. dest = (const struct eth_addr *)&ethbroadcast;
  22570. 8009c5a: 4b0e ldr r3, [pc, #56] @ (8009c94 <etharp_output+0x16c>)
  22571. return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), dest, ETHTYPE_IP);
  22572. 8009c5c: f44f 6200 mov.w r2, #2048 @ 0x800
  22573. 8009c60: 9200 str r2, [sp, #0]
  22574. 8009c62: f105 022a add.w r2, r5, #42 @ 0x2a
  22575. 8009c66: 4639 mov r1, r7
  22576. 8009c68: 4628 mov r0, r5
  22577. 8009c6a: f000 f86b bl 8009d44 <ethernet_output>
  22578. }
  22579. 8009c6e: b005 add sp, #20
  22580. 8009c70: bdf0 pop {r4, r5, r6, r7, pc}
  22581. return ERR_RTE;
  22582. 8009c72: f06f 0003 mvn.w r0, #3
  22583. 8009c76: e7fa b.n 8009c6e <etharp_output+0x146>
  22584. 8009c78: 24012f28 .word 0x24012f28
  22585. 8009c7c: 24012f2c .word 0x24012f2c
  22586. 8009c80: 08015210 .word 0x08015210
  22587. 8009c84: 080144d8 .word 0x080144d8
  22588. 8009c88: 080144e8 .word 0x080144e8
  22589. 8009c8c: 08015410 .word 0x08015410
  22590. 8009c90: 0801536c .word 0x0801536c
  22591. 8009c94: 080154bc .word 0x080154bc
  22592. 08009c98 <ethernet_input>:
  22593. * @see ETHARP_SUPPORT_VLAN
  22594. * @see LWIP_HOOK_VLAN_CHECK
  22595. */
  22596. err_t
  22597. ethernet_input(struct pbuf *p, struct netif *netif)
  22598. {
  22599. 8009c98: b570 push {r4, r5, r6, lr}
  22600. 8009c9a: 4604 mov r4, r0
  22601. 8009c9c: 460d mov r5, r1
  22602. u16_t type;
  22603. #if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6
  22604. u16_t next_hdr_offset = SIZEOF_ETH_HDR;
  22605. #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */
  22606. LWIP_ASSERT_CORE_LOCKED();
  22607. 8009c9e: f7f9 ff35 bl 8003b0c <sys_check_core_locking>
  22608. if (p->len <= SIZEOF_ETH_HDR) {
  22609. 8009ca2: 8963 ldrh r3, [r4, #10]
  22610. 8009ca4: 2b0e cmp r3, #14
  22611. 8009ca6: d91b bls.n 8009ce0 <ethernet_input+0x48>
  22612. ETHARP_STATS_INC(etharp.drop);
  22613. MIB2_STATS_NETIF_INC(netif, ifinerrors);
  22614. goto free_and_return;
  22615. }
  22616. if (p->if_idx == NETIF_NO_INDEX) {
  22617. 8009ca8: 7be3 ldrb r3, [r4, #15]
  22618. 8009caa: b91b cbnz r3, 8009cb4 <ethernet_input+0x1c>
  22619. p->if_idx = netif_get_index(netif);
  22620. 8009cac: f895 3034 ldrb.w r3, [r5, #52] @ 0x34
  22621. 8009cb0: 3301 adds r3, #1
  22622. 8009cb2: 73e3 strb r3, [r4, #15]
  22623. }
  22624. /* points to packet payload, which starts with an Ethernet header */
  22625. ethhdr = (struct eth_hdr *)p->payload;
  22626. 8009cb4: 6860 ldr r0, [r4, #4]
  22627. (unsigned char)ethhdr->dest.addr[3], (unsigned char)ethhdr->dest.addr[4], (unsigned char)ethhdr->dest.addr[5],
  22628. (unsigned char)ethhdr->src.addr[0], (unsigned char)ethhdr->src.addr[1], (unsigned char)ethhdr->src.addr[2],
  22629. (unsigned char)ethhdr->src.addr[3], (unsigned char)ethhdr->src.addr[4], (unsigned char)ethhdr->src.addr[5],
  22630. lwip_htons(ethhdr->type)));
  22631. type = ethhdr->type;
  22632. 8009cb6: 8986 ldrh r6, [r0, #12]
  22633. #if LWIP_ARP_FILTER_NETIF
  22634. netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, lwip_htons(type));
  22635. #endif /* LWIP_ARP_FILTER_NETIF*/
  22636. if (ethhdr->dest.addr[0] & 1) {
  22637. 8009cb8: 7803 ldrb r3, [r0, #0]
  22638. 8009cba: f013 0f01 tst.w r3, #1
  22639. 8009cbe: d00a beq.n 8009cd6 <ethernet_input+0x3e>
  22640. /* this might be a multicast or broadcast packet */
  22641. if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) {
  22642. 8009cc0: 2b01 cmp r3, #1
  22643. 8009cc2: d012 beq.n 8009cea <ethernet_input+0x52>
  22644. (ethhdr->dest.addr[1] == LL_IP6_MULTICAST_ADDR_1)) {
  22645. /* mark the pbuf as link-layer multicast */
  22646. p->flags |= PBUF_FLAG_LLMCAST;
  22647. }
  22648. #endif /* LWIP_IPV6 */
  22649. else if (eth_addr_cmp(&ethhdr->dest, &ethbroadcast)) {
  22650. 8009cc4: 2206 movs r2, #6
  22651. 8009cc6: 491e ldr r1, [pc, #120] @ (8009d40 <ethernet_input+0xa8>)
  22652. 8009cc8: f009 fce6 bl 8013698 <memcmp>
  22653. 8009ccc: b918 cbnz r0, 8009cd6 <ethernet_input+0x3e>
  22654. /* mark the pbuf as link-layer broadcast */
  22655. p->flags |= PBUF_FLAG_LLBCAST;
  22656. 8009cce: 7b63 ldrb r3, [r4, #13]
  22657. 8009cd0: f043 0308 orr.w r3, r3, #8
  22658. 8009cd4: 7363 strb r3, [r4, #13]
  22659. }
  22660. }
  22661. switch (type) {
  22662. 8009cd6: 2e08 cmp r6, #8
  22663. 8009cd8: d012 beq.n 8009d00 <ethernet_input+0x68>
  22664. 8009cda: f5b6 6fc1 cmp.w r6, #1544 @ 0x608
  22665. 8009cde: d01f beq.n 8009d20 <ethernet_input+0x88>
  22666. /* This means the pbuf is freed or consumed,
  22667. so the caller doesn't have to free it again */
  22668. return ERR_OK;
  22669. free_and_return:
  22670. pbuf_free(p);
  22671. 8009ce0: 4620 mov r0, r4
  22672. 8009ce2: f002 f85d bl 800bda0 <pbuf_free>
  22673. return ERR_OK;
  22674. }
  22675. 8009ce6: 2000 movs r0, #0
  22676. 8009ce8: bd70 pop {r4, r5, r6, pc}
  22677. if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
  22678. 8009cea: 7843 ldrb r3, [r0, #1]
  22679. 8009cec: 2b00 cmp r3, #0
  22680. 8009cee: d1f2 bne.n 8009cd6 <ethernet_input+0x3e>
  22681. (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) {
  22682. 8009cf0: 7883 ldrb r3, [r0, #2]
  22683. if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) &&
  22684. 8009cf2: 2b5e cmp r3, #94 @ 0x5e
  22685. 8009cf4: d1ef bne.n 8009cd6 <ethernet_input+0x3e>
  22686. p->flags |= PBUF_FLAG_LLMCAST;
  22687. 8009cf6: 7b63 ldrb r3, [r4, #13]
  22688. 8009cf8: f043 0310 orr.w r3, r3, #16
  22689. 8009cfc: 7363 strb r3, [r4, #13]
  22690. 8009cfe: e7ea b.n 8009cd6 <ethernet_input+0x3e>
  22691. if (!(netif->flags & NETIF_FLAG_ETHARP)) {
  22692. 8009d00: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
  22693. 8009d04: f013 0f08 tst.w r3, #8
  22694. 8009d08: d0ea beq.n 8009ce0 <ethernet_input+0x48>
  22695. if (pbuf_remove_header(p, next_hdr_offset)) {
  22696. 8009d0a: 210e movs r1, #14
  22697. 8009d0c: 4620 mov r0, r4
  22698. 8009d0e: f002 f801 bl 800bd14 <pbuf_remove_header>
  22699. 8009d12: 2800 cmp r0, #0
  22700. 8009d14: d1e4 bne.n 8009ce0 <ethernet_input+0x48>
  22701. ip4_input(p, netif);
  22702. 8009d16: 4629 mov r1, r5
  22703. 8009d18: 4620 mov r0, r4
  22704. 8009d1a: f000 fa25 bl 800a168 <ip4_input>
  22705. break;
  22706. 8009d1e: e7e2 b.n 8009ce6 <ethernet_input+0x4e>
  22707. if (!(netif->flags & NETIF_FLAG_ETHARP)) {
  22708. 8009d20: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
  22709. 8009d24: f013 0f08 tst.w r3, #8
  22710. 8009d28: d0da beq.n 8009ce0 <ethernet_input+0x48>
  22711. if (pbuf_remove_header(p, next_hdr_offset)) {
  22712. 8009d2a: 210e movs r1, #14
  22713. 8009d2c: 4620 mov r0, r4
  22714. 8009d2e: f001 fff1 bl 800bd14 <pbuf_remove_header>
  22715. 8009d32: 2800 cmp r0, #0
  22716. 8009d34: d1d4 bne.n 8009ce0 <ethernet_input+0x48>
  22717. etharp_input(p, netif);
  22718. 8009d36: 4629 mov r1, r5
  22719. 8009d38: 4620 mov r0, r4
  22720. 8009d3a: f7ff fd0b bl 8009754 <etharp_input>
  22721. break;
  22722. 8009d3e: e7d2 b.n 8009ce6 <ethernet_input+0x4e>
  22723. 8009d40: 080154bc .word 0x080154bc
  22724. 08009d44 <ethernet_output>:
  22725. * @return ERR_OK if the packet was sent, any other err_t on failure
  22726. */
  22727. err_t
  22728. ethernet_output(struct netif * netif, struct pbuf * p,
  22729. const struct eth_addr * src, const struct eth_addr * dst,
  22730. u16_t eth_type) {
  22731. 8009d44: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  22732. 8009d48: 4605 mov r5, r0
  22733. 8009d4a: 460c mov r4, r1
  22734. 8009d4c: 4616 mov r6, r2
  22735. 8009d4e: 461f mov r7, r3
  22736. struct eth_hdr *ethhdr;
  22737. u16_t eth_type_be = lwip_htons(eth_type);
  22738. 8009d50: f8bd 0018 ldrh.w r0, [sp, #24]
  22739. 8009d54: f7fe f892 bl 8007e7c <lwip_htons>
  22740. 8009d58: 4680 mov r8, r0
  22741. eth_type_be = PP_HTONS(ETHTYPE_VLAN);
  22742. } else
  22743. #endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */
  22744. {
  22745. if (pbuf_add_header(p, SIZEOF_ETH_HDR) != 0) {
  22746. 8009d5a: 210e movs r1, #14
  22747. 8009d5c: 4620 mov r0, r4
  22748. 8009d5e: f001 ffd4 bl 800bd0a <pbuf_add_header>
  22749. 8009d62: b9f8 cbnz r0, 8009da4 <ethernet_output+0x60>
  22750. goto pbuf_header_failed;
  22751. }
  22752. }
  22753. LWIP_ASSERT_CORE_LOCKED();
  22754. 8009d64: f7f9 fed2 bl 8003b0c <sys_check_core_locking>
  22755. ethhdr = (struct eth_hdr *)p->payload;
  22756. 8009d68: 6861 ldr r1, [r4, #4]
  22757. ethhdr->type = eth_type_be;
  22758. 8009d6a: f8a1 800c strh.w r8, [r1, #12]
  22759. SMEMCPY(&ethhdr->dest, dst, ETH_HWADDR_LEN);
  22760. 8009d6e: 683b ldr r3, [r7, #0]
  22761. 8009d70: 600b str r3, [r1, #0]
  22762. 8009d72: 88bb ldrh r3, [r7, #4]
  22763. 8009d74: 808b strh r3, [r1, #4]
  22764. SMEMCPY(&ethhdr->src, src, ETH_HWADDR_LEN);
  22765. 8009d76: 6833 ldr r3, [r6, #0]
  22766. 8009d78: f8c1 3006 str.w r3, [r1, #6]
  22767. 8009d7c: 88b3 ldrh r3, [r6, #4]
  22768. 8009d7e: 814b strh r3, [r1, #10]
  22769. LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",
  22770. 8009d80: f895 3030 ldrb.w r3, [r5, #48] @ 0x30
  22771. 8009d84: 2b06 cmp r3, #6
  22772. 8009d86: d105 bne.n 8009d94 <ethernet_output+0x50>
  22773. (netif->hwaddr_len == ETH_HWADDR_LEN));
  22774. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE,
  22775. ("ethernet_output: sending packet %p\n", (void *)p));
  22776. /* send the packet */
  22777. return netif->linkoutput(netif, p);
  22778. 8009d88: 69ab ldr r3, [r5, #24]
  22779. 8009d8a: 4621 mov r1, r4
  22780. 8009d8c: 4628 mov r0, r5
  22781. 8009d8e: 4798 blx r3
  22782. pbuf_header_failed:
  22783. LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS,
  22784. ("ethernet_output: could not allocate room for header.\n"));
  22785. LINK_STATS_INC(link.lenerr);
  22786. return ERR_BUF;
  22787. }
  22788. 8009d90: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  22789. LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",
  22790. 8009d94: 4b05 ldr r3, [pc, #20] @ (8009dac <ethernet_output+0x68>)
  22791. 8009d96: f44f 7299 mov.w r2, #306 @ 0x132
  22792. 8009d9a: 4905 ldr r1, [pc, #20] @ (8009db0 <ethernet_output+0x6c>)
  22793. 8009d9c: 4805 ldr r0, [pc, #20] @ (8009db4 <ethernet_output+0x70>)
  22794. 8009d9e: f009 fb33 bl 8013408 <iprintf>
  22795. 8009da2: e7f1 b.n 8009d88 <ethernet_output+0x44>
  22796. return ERR_BUF;
  22797. 8009da4: f06f 0001 mvn.w r0, #1
  22798. 8009da8: e7f2 b.n 8009d90 <ethernet_output+0x4c>
  22799. 8009daa: bf00 nop
  22800. 8009dac: 0801541c .word 0x0801541c
  22801. 8009db0: 08015480 .word 0x08015480
  22802. 8009db4: 080144e8 .word 0x080144e8
  22803. 08009db8 <icmp_send_response>:
  22804. * @param type Type of the ICMP header
  22805. * @param code Code of the ICMP header
  22806. */
  22807. static void
  22808. icmp_send_response(struct pbuf *p, u8_t type, u8_t code)
  22809. {
  22810. 8009db8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  22811. 8009dbc: b086 sub sp, #24
  22812. 8009dbe: 4606 mov r6, r0
  22813. 8009dc0: 4688 mov r8, r1
  22814. 8009dc2: 4617 mov r7, r2
  22815. /* increase number of messages attempted to send */
  22816. MIB2_STATS_INC(mib2.icmpoutmsgs);
  22817. /* ICMP header + IP header + 8 bytes of data */
  22818. q = pbuf_alloc(PBUF_IP, sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE,
  22819. 8009dc4: f44f 7220 mov.w r2, #640 @ 0x280
  22820. 8009dc8: 2124 movs r1, #36 @ 0x24
  22821. 8009dca: 2022 movs r0, #34 @ 0x22
  22822. 8009dcc: f002 f850 bl 800be70 <pbuf_alloc>
  22823. PBUF_RAM);
  22824. if (q == NULL) {
  22825. 8009dd0: 2800 cmp r0, #0
  22826. 8009dd2: d03b beq.n 8009e4c <icmp_send_response+0x94>
  22827. 8009dd4: 4605 mov r5, r0
  22828. LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMP packet.\n"));
  22829. MIB2_STATS_INC(mib2.icmpouterrors);
  22830. return;
  22831. }
  22832. LWIP_ASSERT("check that first pbuf can hold icmp message",
  22833. 8009dd6: 8943 ldrh r3, [r0, #10]
  22834. 8009dd8: 2b23 cmp r3, #35 @ 0x23
  22835. 8009dda: d93a bls.n 8009e52 <icmp_send_response+0x9a>
  22836. (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE)));
  22837. iphdr = (struct ip_hdr *)p->payload;
  22838. 8009ddc: f8d6 c004 ldr.w ip, [r6, #4]
  22839. ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->src);
  22840. LWIP_DEBUGF(ICMP_DEBUG, (" to "));
  22841. ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->dest);
  22842. LWIP_DEBUGF(ICMP_DEBUG, ("\n"));
  22843. icmphdr = (struct icmp_echo_hdr *)q->payload;
  22844. 8009de0: 686c ldr r4, [r5, #4]
  22845. icmphdr->type = type;
  22846. 8009de2: f884 8000 strb.w r8, [r4]
  22847. icmphdr->code = code;
  22848. 8009de6: 7067 strb r7, [r4, #1]
  22849. icmphdr->id = 0;
  22850. 8009de8: 2300 movs r3, #0
  22851. 8009dea: 7123 strb r3, [r4, #4]
  22852. 8009dec: 7163 strb r3, [r4, #5]
  22853. icmphdr->seqno = 0;
  22854. 8009dee: 71a3 strb r3, [r4, #6]
  22855. 8009df0: 71e3 strb r3, [r4, #7]
  22856. /* copy fields from original packet */
  22857. SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload,
  22858. 8009df2: 686b ldr r3, [r5, #4]
  22859. 8009df4: 6872 ldr r2, [r6, #4]
  22860. 8009df6: 6816 ldr r6, [r2, #0]
  22861. 8009df8: 6850 ldr r0, [r2, #4]
  22862. 8009dfa: 6891 ldr r1, [r2, #8]
  22863. 8009dfc: 68d7 ldr r7, [r2, #12]
  22864. 8009dfe: 609e str r6, [r3, #8]
  22865. 8009e00: 60d8 str r0, [r3, #12]
  22866. 8009e02: 6119 str r1, [r3, #16]
  22867. 8009e04: 615f str r7, [r3, #20]
  22868. 8009e06: 6916 ldr r6, [r2, #16]
  22869. 8009e08: 6950 ldr r0, [r2, #20]
  22870. 8009e0a: 6991 ldr r1, [r2, #24]
  22871. 8009e0c: 619e str r6, [r3, #24]
  22872. 8009e0e: 61d8 str r0, [r3, #28]
  22873. 8009e10: 6219 str r1, [r3, #32]
  22874. IP_HLEN + ICMP_DEST_UNREACH_DATASIZE);
  22875. ip4_addr_copy(iphdr_src, iphdr->src);
  22876. 8009e12: f8dc 300c ldr.w r3, [ip, #12]
  22877. 8009e16: 9305 str r3, [sp, #20]
  22878. ip4_addr_t iphdr_dst;
  22879. ip4_addr_copy(iphdr_dst, iphdr->dest);
  22880. netif = ip4_route_src(&iphdr_dst, &iphdr_src);
  22881. }
  22882. #else
  22883. netif = ip4_route(&iphdr_src);
  22884. 8009e18: a805 add r0, sp, #20
  22885. 8009e1a: f000 f971 bl 800a100 <ip4_route>
  22886. #endif
  22887. if (netif != NULL) {
  22888. 8009e1e: 4607 mov r7, r0
  22889. 8009e20: b188 cbz r0, 8009e46 <icmp_send_response+0x8e>
  22890. /* calculate checksum */
  22891. icmphdr->chksum = 0;
  22892. 8009e22: 2600 movs r6, #0
  22893. 8009e24: 70a6 strb r6, [r4, #2]
  22894. 8009e26: 70e6 strb r6, [r4, #3]
  22895. #if CHECKSUM_GEN_ICMP
  22896. IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) {
  22897. icmphdr->chksum = inet_chksum(icmphdr, q->len);
  22898. 8009e28: 8969 ldrh r1, [r5, #10]
  22899. 8009e2a: 4620 mov r0, r4
  22900. 8009e2c: f000 f914 bl 800a058 <inet_chksum>
  22901. 8009e30: 8060 strh r0, [r4, #2]
  22902. }
  22903. #endif
  22904. ICMP_STATS_INC(icmp.xmit);
  22905. ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif);
  22906. 8009e32: 9702 str r7, [sp, #8]
  22907. 8009e34: 2301 movs r3, #1
  22908. 8009e36: 9301 str r3, [sp, #4]
  22909. 8009e38: 9600 str r6, [sp, #0]
  22910. 8009e3a: 23ff movs r3, #255 @ 0xff
  22911. 8009e3c: aa05 add r2, sp, #20
  22912. 8009e3e: 4631 mov r1, r6
  22913. 8009e40: 4628 mov r0, r5
  22914. 8009e42: f000 faf1 bl 800a428 <ip4_output_if>
  22915. }
  22916. pbuf_free(q);
  22917. 8009e46: 4628 mov r0, r5
  22918. 8009e48: f001 ffaa bl 800bda0 <pbuf_free>
  22919. }
  22920. 8009e4c: b006 add sp, #24
  22921. 8009e4e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  22922. LWIP_ASSERT("check that first pbuf can hold icmp message",
  22923. 8009e52: 4b04 ldr r3, [pc, #16] @ (8009e64 <icmp_send_response+0xac>)
  22924. 8009e54: f44f 72b4 mov.w r2, #360 @ 0x168
  22925. 8009e58: 4903 ldr r1, [pc, #12] @ (8009e68 <icmp_send_response+0xb0>)
  22926. 8009e5a: 4804 ldr r0, [pc, #16] @ (8009e6c <icmp_send_response+0xb4>)
  22927. 8009e5c: f009 fad4 bl 8013408 <iprintf>
  22928. 8009e60: e7bc b.n 8009ddc <icmp_send_response+0x24>
  22929. 8009e62: bf00 nop
  22930. 8009e64: 080154c4 .word 0x080154c4
  22931. 8009e68: 08015528 .word 0x08015528
  22932. 8009e6c: 080144e8 .word 0x080144e8
  22933. 08009e70 <icmp_input>:
  22934. {
  22935. 8009e70: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  22936. 8009e74: b084 sub sp, #16
  22937. 8009e76: 4605 mov r5, r0
  22938. iphdr_in = ip4_current_header();
  22939. 8009e78: 4b52 ldr r3, [pc, #328] @ (8009fc4 <icmp_input+0x154>)
  22940. 8009e7a: 689e ldr r6, [r3, #8]
  22941. hlen = IPH_HL_BYTES(iphdr_in);
  22942. 8009e7c: 7834 ldrb r4, [r6, #0]
  22943. 8009e7e: f004 040f and.w r4, r4, #15
  22944. 8009e82: 00a4 lsls r4, r4, #2
  22945. if (hlen < IP_HLEN) {
  22946. 8009e84: 2c13 cmp r4, #19
  22947. 8009e86: d916 bls.n 8009eb6 <icmp_input+0x46>
  22948. 8009e88: 460f mov r7, r1
  22949. if (p->len < sizeof(u16_t) * 2) {
  22950. 8009e8a: 8943 ldrh r3, [r0, #10]
  22951. 8009e8c: 2b03 cmp r3, #3
  22952. 8009e8e: d912 bls.n 8009eb6 <icmp_input+0x46>
  22953. type = *((u8_t *)p->payload);
  22954. 8009e90: 6843 ldr r3, [r0, #4]
  22955. 8009e92: 781b ldrb r3, [r3, #0]
  22956. switch (type) {
  22957. 8009e94: 2b08 cmp r3, #8
  22958. 8009e96: f040 8086 bne.w 8009fa6 <icmp_input+0x136>
  22959. if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
  22960. 8009e9a: 4b4a ldr r3, [pc, #296] @ (8009fc4 <icmp_input+0x154>)
  22961. 8009e9c: 6958 ldr r0, [r3, #20]
  22962. 8009e9e: f000 03f0 and.w r3, r0, #240 @ 0xf0
  22963. 8009ea2: 2be0 cmp r3, #224 @ 0xe0
  22964. 8009ea4: d01e beq.n 8009ee4 <icmp_input+0x74>
  22965. if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) {
  22966. 8009ea6: 4b47 ldr r3, [pc, #284] @ (8009fc4 <icmp_input+0x154>)
  22967. 8009ea8: 6819 ldr r1, [r3, #0]
  22968. 8009eaa: f000 fad2 bl 800a452 <ip4_addr_isbroadcast_u32>
  22969. 8009eae: b9c8 cbnz r0, 8009ee4 <icmp_input+0x74>
  22970. if (p->tot_len < sizeof(struct icmp_echo_hdr)) {
  22971. 8009eb0: 892b ldrh r3, [r5, #8]
  22972. 8009eb2: 2b07 cmp r3, #7
  22973. 8009eb4: d805 bhi.n 8009ec2 <icmp_input+0x52>
  22974. pbuf_free(p);
  22975. 8009eb6: 4628 mov r0, r5
  22976. 8009eb8: f001 ff72 bl 800bda0 <pbuf_free>
  22977. }
  22978. 8009ebc: b004 add sp, #16
  22979. 8009ebe: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  22980. if (inet_chksum_pbuf(p) != 0) {
  22981. 8009ec2: 4628 mov r0, r5
  22982. 8009ec4: f000 f8ce bl 800a064 <inet_chksum_pbuf>
  22983. 8009ec8: b980 cbnz r0, 8009eec <icmp_input+0x7c>
  22984. if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) {
  22985. 8009eca: f104 080e add.w r8, r4, #14
  22986. 8009ece: 4641 mov r1, r8
  22987. 8009ed0: 4628 mov r0, r5
  22988. 8009ed2: f001 ff1a bl 800bd0a <pbuf_add_header>
  22989. 8009ed6: 2800 cmp r0, #0
  22990. 8009ed8: d03e beq.n 8009f58 <icmp_input+0xe8>
  22991. u16_t alloc_len = (u16_t)(p->tot_len + hlen);
  22992. 8009eda: 892b ldrh r3, [r5, #8]
  22993. 8009edc: 1919 adds r1, r3, r4
  22994. 8009ede: b289 uxth r1, r1
  22995. if (alloc_len < p->tot_len) {
  22996. 8009ee0: 428b cmp r3, r1
  22997. 8009ee2: d907 bls.n 8009ef4 <icmp_input+0x84>
  22998. pbuf_free(p);
  22999. 8009ee4: 4628 mov r0, r5
  23000. 8009ee6: f001 ff5b bl 800bda0 <pbuf_free>
  23001. return;
  23002. 8009eea: e7e7 b.n 8009ebc <icmp_input+0x4c>
  23003. pbuf_free(p);
  23004. 8009eec: 4628 mov r0, r5
  23005. 8009eee: f001 ff57 bl 800bda0 <pbuf_free>
  23006. return;
  23007. 8009ef2: e7e3 b.n 8009ebc <icmp_input+0x4c>
  23008. r = pbuf_alloc(PBUF_LINK, alloc_len, PBUF_RAM);
  23009. 8009ef4: f44f 7220 mov.w r2, #640 @ 0x280
  23010. 8009ef8: 200e movs r0, #14
  23011. 8009efa: f001 ffb9 bl 800be70 <pbuf_alloc>
  23012. if (r == NULL) {
  23013. 8009efe: 4680 mov r8, r0
  23014. 8009f00: 2800 cmp r0, #0
  23015. 8009f02: d0ef beq.n 8009ee4 <icmp_input+0x74>
  23016. if (r->len < hlen + sizeof(struct icmp_echo_hdr)) {
  23017. 8009f04: 8942 ldrh r2, [r0, #10]
  23018. 8009f06: f104 0308 add.w r3, r4, #8
  23019. 8009f0a: 429a cmp r2, r3
  23020. 8009f0c: d313 bcc.n 8009f36 <icmp_input+0xc6>
  23021. MEMCPY(r->payload, iphdr_in, hlen);
  23022. 8009f0e: 4622 mov r2, r4
  23023. 8009f10: 4631 mov r1, r6
  23024. 8009f12: 6840 ldr r0, [r0, #4]
  23025. 8009f14: f009 fcb5 bl 8013882 <memcpy>
  23026. if (pbuf_remove_header(r, hlen)) {
  23027. 8009f18: 4621 mov r1, r4
  23028. 8009f1a: 4640 mov r0, r8
  23029. 8009f1c: f001 fefa bl 800bd14 <pbuf_remove_header>
  23030. 8009f20: b960 cbnz r0, 8009f3c <icmp_input+0xcc>
  23031. if (pbuf_copy(r, p) != ERR_OK) {
  23032. 8009f22: 4629 mov r1, r5
  23033. 8009f24: 4640 mov r0, r8
  23034. 8009f26: f002 f929 bl 800c17c <pbuf_copy>
  23035. 8009f2a: b988 cbnz r0, 8009f50 <icmp_input+0xe0>
  23036. pbuf_free(p);
  23037. 8009f2c: 4628 mov r0, r5
  23038. 8009f2e: f001 ff37 bl 800bda0 <pbuf_free>
  23039. p = r;
  23040. 8009f32: 4645 mov r5, r8
  23041. 8009f34: e015 b.n 8009f62 <icmp_input+0xf2>
  23042. pbuf_free(r);
  23043. 8009f36: f001 ff33 bl 800bda0 <pbuf_free>
  23044. goto icmperr;
  23045. 8009f3a: e7d3 b.n 8009ee4 <icmp_input+0x74>
  23046. LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0);
  23047. 8009f3c: 4b22 ldr r3, [pc, #136] @ (8009fc8 <icmp_input+0x158>)
  23048. 8009f3e: 22b6 movs r2, #182 @ 0xb6
  23049. 8009f40: 4922 ldr r1, [pc, #136] @ (8009fcc <icmp_input+0x15c>)
  23050. 8009f42: 4823 ldr r0, [pc, #140] @ (8009fd0 <icmp_input+0x160>)
  23051. 8009f44: f009 fa60 bl 8013408 <iprintf>
  23052. pbuf_free(r);
  23053. 8009f48: 4640 mov r0, r8
  23054. 8009f4a: f001 ff29 bl 800bda0 <pbuf_free>
  23055. goto icmperr;
  23056. 8009f4e: e7c9 b.n 8009ee4 <icmp_input+0x74>
  23057. pbuf_free(r);
  23058. 8009f50: 4640 mov r0, r8
  23059. 8009f52: f001 ff25 bl 800bda0 <pbuf_free>
  23060. goto icmperr;
  23061. 8009f56: e7c5 b.n 8009ee4 <icmp_input+0x74>
  23062. if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) {
  23063. 8009f58: 4641 mov r1, r8
  23064. 8009f5a: 4628 mov r0, r5
  23065. 8009f5c: f001 feda bl 800bd14 <pbuf_remove_header>
  23066. 8009f60: bb28 cbnz r0, 8009fae <icmp_input+0x13e>
  23067. iecho = (struct icmp_echo_hdr *)p->payload;
  23068. 8009f62: 686e ldr r6, [r5, #4]
  23069. if (pbuf_add_header(p, hlen)) {
  23070. 8009f64: 4621 mov r1, r4
  23071. 8009f66: 4628 mov r0, r5
  23072. 8009f68: f001 fecf bl 800bd0a <pbuf_add_header>
  23073. 8009f6c: b9d8 cbnz r0, 8009fa6 <icmp_input+0x136>
  23074. struct ip_hdr *iphdr = (struct ip_hdr *)p->payload;
  23075. 8009f6e: 6869 ldr r1, [r5, #4]
  23076. ip4_addr_copy(iphdr->src, *src);
  23077. 8009f70: 4b14 ldr r3, [pc, #80] @ (8009fc4 <icmp_input+0x154>)
  23078. 8009f72: 695a ldr r2, [r3, #20]
  23079. 8009f74: 60ca str r2, [r1, #12]
  23080. ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
  23081. 8009f76: 691b ldr r3, [r3, #16]
  23082. 8009f78: 610b str r3, [r1, #16]
  23083. ICMPH_TYPE_SET(iecho, ICMP_ER);
  23084. 8009f7a: 2300 movs r3, #0
  23085. 8009f7c: 7033 strb r3, [r6, #0]
  23086. if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) {
  23087. 8009f7e: 8873 ldrh r3, [r6, #2]
  23088. 8009f80: f64f 72f7 movw r2, #65527 @ 0xfff7
  23089. 8009f84: 4293 cmp r3, r2
  23090. 8009f86: d919 bls.n 8009fbc <icmp_input+0x14c>
  23091. iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS((u16_t)(ICMP_ECHO << 8)) + 1);
  23092. 8009f88: 3309 adds r3, #9
  23093. 8009f8a: 8073 strh r3, [r6, #2]
  23094. IPH_TTL_SET(iphdr, ICMP_TTL);
  23095. 8009f8c: 23ff movs r3, #255 @ 0xff
  23096. 8009f8e: 720b strb r3, [r1, #8]
  23097. IPH_CHKSUM_SET(iphdr, 0);
  23098. 8009f90: 2200 movs r2, #0
  23099. 8009f92: 728a strb r2, [r1, #10]
  23100. 8009f94: 72ca strb r2, [r1, #11]
  23101. ret = ip4_output_if(p, src, LWIP_IP_HDRINCL,
  23102. 8009f96: 9702 str r7, [sp, #8]
  23103. 8009f98: 2101 movs r1, #1
  23104. 8009f9a: 9101 str r1, [sp, #4]
  23105. 8009f9c: 9200 str r2, [sp, #0]
  23106. 8009f9e: 490d ldr r1, [pc, #52] @ (8009fd4 <icmp_input+0x164>)
  23107. 8009fa0: 4628 mov r0, r5
  23108. 8009fa2: f000 fa41 bl 800a428 <ip4_output_if>
  23109. pbuf_free(p);
  23110. 8009fa6: 4628 mov r0, r5
  23111. 8009fa8: f001 fefa bl 800bda0 <pbuf_free>
  23112. return;
  23113. 8009fac: e786 b.n 8009ebc <icmp_input+0x4c>
  23114. LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0);
  23115. 8009fae: 4b06 ldr r3, [pc, #24] @ (8009fc8 <icmp_input+0x158>)
  23116. 8009fb0: 22c7 movs r2, #199 @ 0xc7
  23117. 8009fb2: 4909 ldr r1, [pc, #36] @ (8009fd8 <icmp_input+0x168>)
  23118. 8009fb4: 4806 ldr r0, [pc, #24] @ (8009fd0 <icmp_input+0x160>)
  23119. 8009fb6: f009 fa27 bl 8013408 <iprintf>
  23120. goto icmperr;
  23121. 8009fba: e793 b.n 8009ee4 <icmp_input+0x74>
  23122. iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS(ICMP_ECHO << 8));
  23123. 8009fbc: 3308 adds r3, #8
  23124. 8009fbe: 8073 strh r3, [r6, #2]
  23125. 8009fc0: e7e4 b.n 8009f8c <icmp_input+0x11c>
  23126. 8009fc2: bf00 nop
  23127. 8009fc4: 2401301c .word 0x2401301c
  23128. 8009fc8: 080154c4 .word 0x080154c4
  23129. 8009fcc: 08015554 .word 0x08015554
  23130. 8009fd0: 080144e8 .word 0x080144e8
  23131. 8009fd4: 24013030 .word 0x24013030
  23132. 8009fd8: 0801558c .word 0x0801558c
  23133. 08009fdc <icmp_dest_unreach>:
  23134. {
  23135. 8009fdc: b508 push {r3, lr}
  23136. 8009fde: 460a mov r2, r1
  23137. icmp_send_response(p, ICMP_DUR, t);
  23138. 8009fe0: 2103 movs r1, #3
  23139. 8009fe2: f7ff fee9 bl 8009db8 <icmp_send_response>
  23140. }
  23141. 8009fe6: bd08 pop {r3, pc}
  23142. 08009fe8 <icmp_time_exceeded>:
  23143. {
  23144. 8009fe8: b508 push {r3, lr}
  23145. 8009fea: 460a mov r2, r1
  23146. icmp_send_response(p, ICMP_TE, t);
  23147. 8009fec: 210b movs r1, #11
  23148. 8009fee: f7ff fee3 bl 8009db8 <icmp_send_response>
  23149. }
  23150. 8009ff2: bd08 pop {r3, pc}
  23151. 08009ff4 <lwip_standard_chksum>:
  23152. * @param len length of data to be summed
  23153. * @return host order (!) lwip checksum (non-inverted Internet sum)
  23154. */
  23155. u16_t
  23156. lwip_standard_chksum(const void *dataptr, int len)
  23157. {
  23158. 8009ff4: b410 push {r4}
  23159. const u8_t *pb = (const u8_t *)dataptr;
  23160. const u16_t *ps;
  23161. u16_t t = 0;
  23162. 8009ff6: f04f 0c00 mov.w ip, #0
  23163. u32_t sum = 0;
  23164. int odd = ((mem_ptr_t)pb & 1);
  23165. 8009ffa: f000 0401 and.w r4, r0, #1
  23166. /* Get aligned to u16_t */
  23167. if (odd && len > 0) {
  23168. 8009ffe: 460b mov r3, r1
  23169. 800a000: 4561 cmp r1, ip
  23170. 800a002: bfd4 ite le
  23171. 800a004: 2200 movle r2, #0
  23172. 800a006: f000 0201 andgt.w r2, r0, #1
  23173. 800a00a: b122 cbz r2, 800a016 <lwip_standard_chksum+0x22>
  23174. ((u8_t *)&t)[1] = *pb++;
  23175. 800a00c: f810 2b01 ldrb.w r2, [r0], #1
  23176. 800a010: f362 2c1f bfi ip, r2, #8, #24
  23177. len--;
  23178. 800a014: 1e4b subs r3, r1, #1
  23179. u32_t sum = 0;
  23180. 800a016: 2200 movs r2, #0
  23181. }
  23182. /* Add the bulk of the data */
  23183. ps = (const u16_t *)(const void *)pb;
  23184. while (len > 1) {
  23185. 800a018: e003 b.n 800a022 <lwip_standard_chksum+0x2e>
  23186. sum += *ps++;
  23187. 800a01a: f830 1b02 ldrh.w r1, [r0], #2
  23188. 800a01e: 440a add r2, r1
  23189. len -= 2;
  23190. 800a020: 3b02 subs r3, #2
  23191. while (len > 1) {
  23192. 800a022: 2b01 cmp r3, #1
  23193. 800a024: dcf9 bgt.n 800a01a <lwip_standard_chksum+0x26>
  23194. }
  23195. /* Consume left-over byte, if any */
  23196. if (len > 0) {
  23197. 800a026: 2b00 cmp r3, #0
  23198. 800a028: dd04 ble.n 800a034 <lwip_standard_chksum+0x40>
  23199. ((u8_t *)&t)[0] = *(const u8_t *)ps;
  23200. 800a02a: 7803 ldrb r3, [r0, #0]
  23201. 800a02c: f363 0c07 bfi ip, r3, #0, #8
  23202. 800a030: fa1f fc8c uxth.w ip, ip
  23203. }
  23204. /* Add end bytes */
  23205. sum += t;
  23206. 800a034: 4494 add ip, r2
  23207. /* Fold 32-bit sum to 16 bits
  23208. calling this twice is probably faster than if statements... */
  23209. sum = FOLD_U32T(sum);
  23210. 800a036: fa1f f38c uxth.w r3, ip
  23211. 800a03a: eb03 431c add.w r3, r3, ip, lsr #16
  23212. sum = FOLD_U32T(sum);
  23213. 800a03e: b298 uxth r0, r3
  23214. 800a040: eb00 4013 add.w r0, r0, r3, lsr #16
  23215. /* Swap if alignment was odd */
  23216. if (odd) {
  23217. 800a044: b124 cbz r4, 800a050 <lwip_standard_chksum+0x5c>
  23218. sum = SWAP_BYTES_IN_WORD(sum);
  23219. 800a046: 0203 lsls r3, r0, #8
  23220. 800a048: b29b uxth r3, r3
  23221. 800a04a: f3c0 2007 ubfx r0, r0, #8, #8
  23222. 800a04e: 4318 orrs r0, r3
  23223. }
  23224. return (u16_t)sum;
  23225. }
  23226. 800a050: b280 uxth r0, r0
  23227. 800a052: f85d 4b04 ldr.w r4, [sp], #4
  23228. 800a056: 4770 bx lr
  23229. 0800a058 <inet_chksum>:
  23230. * @return checksum (as u16_t) to be saved directly in the protocol header
  23231. */
  23232. u16_t
  23233. inet_chksum(const void *dataptr, u16_t len)
  23234. {
  23235. 800a058: b508 push {r3, lr}
  23236. return (u16_t)~(unsigned int)LWIP_CHKSUM(dataptr, len);
  23237. 800a05a: f7ff ffcb bl 8009ff4 <lwip_standard_chksum>
  23238. 800a05e: 43c0 mvns r0, r0
  23239. }
  23240. 800a060: b280 uxth r0, r0
  23241. 800a062: bd08 pop {r3, pc}
  23242. 0800a064 <inet_chksum_pbuf>:
  23243. * @param p pbuf chain over that the checksum should be calculated
  23244. * @return checksum (as u16_t) to be saved directly in the protocol header
  23245. */
  23246. u16_t
  23247. inet_chksum_pbuf(struct pbuf *p)
  23248. {
  23249. 800a064: b5f8 push {r3, r4, r5, r6, r7, lr}
  23250. 800a066: 4605 mov r5, r0
  23251. u32_t acc;
  23252. struct pbuf *q;
  23253. int swapped = 0;
  23254. 800a068: 2700 movs r7, #0
  23255. acc = 0;
  23256. 800a06a: 463c mov r4, r7
  23257. for (q = p; q != NULL; q = q->next) {
  23258. 800a06c: e000 b.n 800a070 <inet_chksum_pbuf+0xc>
  23259. 800a06e: 682d ldr r5, [r5, #0]
  23260. 800a070: b19d cbz r5, 800a09a <inet_chksum_pbuf+0x36>
  23261. acc += LWIP_CHKSUM(q->payload, q->len);
  23262. 800a072: 896e ldrh r6, [r5, #10]
  23263. 800a074: 4631 mov r1, r6
  23264. 800a076: 6868 ldr r0, [r5, #4]
  23265. 800a078: f7ff ffbc bl 8009ff4 <lwip_standard_chksum>
  23266. 800a07c: 1903 adds r3, r0, r4
  23267. acc = FOLD_U32T(acc);
  23268. 800a07e: b29c uxth r4, r3
  23269. 800a080: eb04 4413 add.w r4, r4, r3, lsr #16
  23270. if (q->len % 2 != 0) {
  23271. 800a084: f016 0f01 tst.w r6, #1
  23272. 800a088: d0f1 beq.n 800a06e <inet_chksum_pbuf+0xa>
  23273. swapped = !swapped;
  23274. 800a08a: f087 0701 eor.w r7, r7, #1
  23275. acc = SWAP_BYTES_IN_WORD(acc);
  23276. 800a08e: 0223 lsls r3, r4, #8
  23277. 800a090: b29b uxth r3, r3
  23278. 800a092: f3c4 2407 ubfx r4, r4, #8, #8
  23279. 800a096: 431c orrs r4, r3
  23280. 800a098: e7e9 b.n 800a06e <inet_chksum_pbuf+0xa>
  23281. }
  23282. }
  23283. if (swapped) {
  23284. 800a09a: b127 cbz r7, 800a0a6 <inet_chksum_pbuf+0x42>
  23285. acc = SWAP_BYTES_IN_WORD(acc);
  23286. 800a09c: 0223 lsls r3, r4, #8
  23287. 800a09e: b29b uxth r3, r3
  23288. 800a0a0: f3c4 2407 ubfx r4, r4, #8, #8
  23289. 800a0a4: 431c orrs r4, r3
  23290. }
  23291. return (u16_t)~(acc & 0xffffUL);
  23292. 800a0a6: 43e0 mvns r0, r4
  23293. }
  23294. 800a0a8: b280 uxth r0, r0
  23295. 800a0aa: bdf8 pop {r3, r4, r5, r6, r7, pc}
  23296. 0800a0ac <lwip_init>:
  23297. * Initialize all modules.
  23298. * Use this in NO_SYS mode. Use tcpip_init() otherwise.
  23299. */
  23300. void
  23301. lwip_init(void)
  23302. {
  23303. 800a0ac: b508 push {r3, lr}
  23304. #endif
  23305. /* Modules initialization */
  23306. stats_init();
  23307. #if !NO_SYS
  23308. sys_init();
  23309. 800a0ae: f002 ffa7 bl 800d000 <sys_init>
  23310. #endif /* !NO_SYS */
  23311. mem_init();
  23312. 800a0b2: f000 fffb bl 800b0ac <mem_init>
  23313. memp_init();
  23314. 800a0b6: f001 fa7f bl 800b5b8 <memp_init>
  23315. pbuf_init();
  23316. netif_init();
  23317. 800a0ba: f001 fbc5 bl 800b848 <netif_init>
  23318. #endif /* LWIP_IPV4 */
  23319. #if LWIP_RAW
  23320. raw_init();
  23321. #endif /* LWIP_RAW */
  23322. #if LWIP_UDP
  23323. udp_init();
  23324. 800a0be: f007 fbc5 bl 801184c <udp_init>
  23325. #endif /* LWIP_UDP */
  23326. #if LWIP_TCP
  23327. tcp_init();
  23328. 800a0c2: f003 f8d3 bl 800d26c <tcp_init>
  23329. #if PPP_SUPPORT
  23330. ppp_init();
  23331. #endif
  23332. #if LWIP_TIMERS
  23333. sys_timeouts_init();
  23334. 800a0c6: f007 faef bl 80116a8 <sys_timeouts_init>
  23335. #endif /* LWIP_TIMERS */
  23336. }
  23337. 800a0ca: bd08 pop {r3, pc}
  23338. 0800a0cc <ip4_input_accept>:
  23339. #endif /* IP_FORWARD */
  23340. /** Return true if the current input packet should be accepted on this netif */
  23341. static int
  23342. ip4_input_accept(struct netif *netif)
  23343. {
  23344. 800a0cc: b508 push {r3, lr}
  23345. ip4_addr_get_u32(ip4_current_dest_addr()) & ip4_addr_get_u32(netif_ip4_netmask(netif)),
  23346. ip4_addr_get_u32(netif_ip4_addr(netif)) & ip4_addr_get_u32(netif_ip4_netmask(netif)),
  23347. ip4_addr_get_u32(ip4_current_dest_addr()) & ~ip4_addr_get_u32(netif_ip4_netmask(netif))));
  23348. /* interface is up and configured? */
  23349. if ((netif_is_up(netif)) && (!ip4_addr_isany_val(*netif_ip4_addr(netif)))) {
  23350. 800a0ce: f890 3031 ldrb.w r3, [r0, #49] @ 0x31
  23351. 800a0d2: f013 0f01 tst.w r3, #1
  23352. 800a0d6: d00d beq.n 800a0f4 <ip4_input_accept+0x28>
  23353. 800a0d8: 4601 mov r1, r0
  23354. 800a0da: 6843 ldr r3, [r0, #4]
  23355. 800a0dc: b163 cbz r3, 800a0f8 <ip4_input_accept+0x2c>
  23356. /* unicast to this interface address? */
  23357. if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
  23358. 800a0de: 4a07 ldr r2, [pc, #28] @ (800a0fc <ip4_input_accept+0x30>)
  23359. 800a0e0: 6950 ldr r0, [r2, #20]
  23360. 800a0e2: 4283 cmp r3, r0
  23361. 800a0e4: d004 beq.n 800a0f0 <ip4_input_accept+0x24>
  23362. /* or broadcast on this interface network address? */
  23363. ip4_addr_isbroadcast(ip4_current_dest_addr(), netif)
  23364. 800a0e6: f000 f9b4 bl 800a452 <ip4_addr_isbroadcast_u32>
  23365. if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) ||
  23366. 800a0ea: b908 cbnz r0, 800a0f0 <ip4_input_accept+0x24>
  23367. /* accept on this netif */
  23368. return 1;
  23369. }
  23370. #endif /* LWIP_AUTOIP */
  23371. }
  23372. return 0;
  23373. 800a0ec: 2000 movs r0, #0
  23374. 800a0ee: e002 b.n 800a0f6 <ip4_input_accept+0x2a>
  23375. return 1;
  23376. 800a0f0: 2001 movs r0, #1
  23377. 800a0f2: e000 b.n 800a0f6 <ip4_input_accept+0x2a>
  23378. return 0;
  23379. 800a0f4: 2000 movs r0, #0
  23380. }
  23381. 800a0f6: bd08 pop {r3, pc}
  23382. return 0;
  23383. 800a0f8: 2000 movs r0, #0
  23384. 800a0fa: e7fc b.n 800a0f6 <ip4_input_accept+0x2a>
  23385. 800a0fc: 2401301c .word 0x2401301c
  23386. 0800a100 <ip4_route>:
  23387. {
  23388. 800a100: b538 push {r3, r4, r5, lr}
  23389. 800a102: 4604 mov r4, r0
  23390. LWIP_ASSERT_CORE_LOCKED();
  23391. 800a104: f7f9 fd02 bl 8003b0c <sys_check_core_locking>
  23392. NETIF_FOREACH(netif) {
  23393. 800a108: 4b15 ldr r3, [pc, #84] @ (800a160 <ip4_route+0x60>)
  23394. 800a10a: 6818 ldr r0, [r3, #0]
  23395. 800a10c: e000 b.n 800a110 <ip4_route+0x10>
  23396. 800a10e: 6800 ldr r0, [r0, #0]
  23397. 800a110: b1b0 cbz r0, 800a140 <ip4_route+0x40>
  23398. if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) {
  23399. 800a112: f890 3031 ldrb.w r3, [r0, #49] @ 0x31
  23400. 800a116: f013 0f01 tst.w r3, #1
  23401. 800a11a: d0f8 beq.n 800a10e <ip4_route+0xe>
  23402. 800a11c: f013 0f04 tst.w r3, #4
  23403. 800a120: d0f5 beq.n 800a10e <ip4_route+0xe>
  23404. 800a122: 6842 ldr r2, [r0, #4]
  23405. 800a124: 2a00 cmp r2, #0
  23406. 800a126: d0f2 beq.n 800a10e <ip4_route+0xe>
  23407. if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) {
  23408. 800a128: 6821 ldr r1, [r4, #0]
  23409. 800a12a: 404a eors r2, r1
  23410. 800a12c: 6885 ldr r5, [r0, #8]
  23411. 800a12e: 422a tst r2, r5
  23412. 800a130: d015 beq.n 800a15e <ip4_route+0x5e>
  23413. if (((netif->flags & NETIF_FLAG_BROADCAST) == 0) && ip4_addr_cmp(dest, netif_ip4_gw(netif))) {
  23414. 800a132: f013 0f02 tst.w r3, #2
  23415. 800a136: d1ea bne.n 800a10e <ip4_route+0xe>
  23416. 800a138: 68c3 ldr r3, [r0, #12]
  23417. 800a13a: 4299 cmp r1, r3
  23418. 800a13c: d1e7 bne.n 800a10e <ip4_route+0xe>
  23419. 800a13e: e00e b.n 800a15e <ip4_route+0x5e>
  23420. if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
  23421. 800a140: 4b08 ldr r3, [pc, #32] @ (800a164 <ip4_route+0x64>)
  23422. 800a142: 681b ldr r3, [r3, #0]
  23423. 800a144: b15b cbz r3, 800a15e <ip4_route+0x5e>
  23424. 800a146: f893 2031 ldrb.w r2, [r3, #49] @ 0x31
  23425. 800a14a: f002 0205 and.w r2, r2, #5
  23426. 800a14e: 2a05 cmp r2, #5
  23427. 800a150: d105 bne.n 800a15e <ip4_route+0x5e>
  23428. ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
  23429. 800a152: 685a ldr r2, [r3, #4]
  23430. if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) ||
  23431. 800a154: b11a cbz r2, 800a15e <ip4_route+0x5e>
  23432. ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) {
  23433. 800a156: 7822 ldrb r2, [r4, #0]
  23434. 800a158: 2a7f cmp r2, #127 @ 0x7f
  23435. 800a15a: d000 beq.n 800a15e <ip4_route+0x5e>
  23436. return netif_default;
  23437. 800a15c: 4618 mov r0, r3
  23438. }
  23439. 800a15e: bd38 pop {r3, r4, r5, pc}
  23440. 800a160: 24019b80 .word 0x24019b80
  23441. 800a164: 24019b7c .word 0x24019b7c
  23442. 0800a168 <ip4_input>:
  23443. * @return ERR_OK if the packet was processed (could return ERR_* if it wasn't
  23444. * processed, but currently always returns ERR_OK)
  23445. */
  23446. err_t
  23447. ip4_input(struct pbuf *p, struct netif *inp)
  23448. {
  23449. 800a168: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  23450. 800a16c: 4604 mov r4, r0
  23451. 800a16e: 460e mov r6, r1
  23452. #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP */
  23453. #if LWIP_RAW
  23454. raw_input_state_t raw_status;
  23455. #endif /* LWIP_RAW */
  23456. LWIP_ASSERT_CORE_LOCKED();
  23457. 800a170: f7f9 fccc bl 8003b0c <sys_check_core_locking>
  23458. IP_STATS_INC(ip.recv);
  23459. MIB2_STATS_INC(mib2.ipinreceives);
  23460. /* identify the IP header */
  23461. iphdr = (struct ip_hdr *)p->payload;
  23462. 800a174: 6867 ldr r7, [r4, #4]
  23463. if (IPH_V(iphdr) != 4) {
  23464. 800a176: 783b ldrb r3, [r7, #0]
  23465. 800a178: 091a lsrs r2, r3, #4
  23466. 800a17a: 2a04 cmp r2, #4
  23467. 800a17c: d005 beq.n 800a18a <ip4_input+0x22>
  23468. LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_WARNING, ("IP packet dropped due to bad version number %"U16_F"\n", (u16_t)IPH_V(iphdr)));
  23469. ip4_debug_print(p);
  23470. pbuf_free(p);
  23471. 800a17e: 4620 mov r0, r4
  23472. 800a180: f001 fe0e bl 800bda0 <pbuf_free>
  23473. ip_data.current_ip_header_tot_len = 0;
  23474. ip4_addr_set_any(ip4_current_src_addr());
  23475. ip4_addr_set_any(ip4_current_dest_addr());
  23476. return ERR_OK;
  23477. }
  23478. 800a184: 2000 movs r0, #0
  23479. 800a186: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  23480. iphdr_hlen = IPH_HL_BYTES(iphdr);
  23481. 800a18a: f003 030f and.w r3, r3, #15
  23482. 800a18e: 009d lsls r5, r3, #2
  23483. iphdr_len = lwip_ntohs(IPH_LEN(iphdr));
  23484. 800a190: 8878 ldrh r0, [r7, #2]
  23485. 800a192: f7fd fe73 bl 8007e7c <lwip_htons>
  23486. 800a196: 4680 mov r8, r0
  23487. if (iphdr_len < p->tot_len) {
  23488. 800a198: 8923 ldrh r3, [r4, #8]
  23489. 800a19a: 4283 cmp r3, r0
  23490. 800a19c: d81b bhi.n 800a1d6 <ip4_input+0x6e>
  23491. if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) {
  23492. 800a19e: 8963 ldrh r3, [r4, #10]
  23493. 800a1a0: 42ab cmp r3, r5
  23494. 800a1a2: d31d bcc.n 800a1e0 <ip4_input+0x78>
  23495. 800a1a4: 8923 ldrh r3, [r4, #8]
  23496. 800a1a6: 4543 cmp r3, r8
  23497. 800a1a8: d31a bcc.n 800a1e0 <ip4_input+0x78>
  23498. 800a1aa: 2d13 cmp r5, #19
  23499. 800a1ac: d918 bls.n 800a1e0 <ip4_input+0x78>
  23500. ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest);
  23501. 800a1ae: 693b ldr r3, [r7, #16]
  23502. 800a1b0: 4a5a ldr r2, [pc, #360] @ (800a31c <ip4_input+0x1b4>)
  23503. 800a1b2: 6153 str r3, [r2, #20]
  23504. ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src);
  23505. 800a1b4: 68f9 ldr r1, [r7, #12]
  23506. 800a1b6: 6111 str r1, [r2, #16]
  23507. if (ip4_addr_ismulticast(ip4_current_dest_addr())) {
  23508. 800a1b8: f003 03f0 and.w r3, r3, #240 @ 0xf0
  23509. 800a1bc: 2be0 cmp r3, #224 @ 0xe0
  23510. 800a1be: d113 bne.n 800a1e8 <ip4_input+0x80>
  23511. if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) {
  23512. 800a1c0: f896 3031 ldrb.w r3, [r6, #49] @ 0x31
  23513. 800a1c4: f013 0f01 tst.w r3, #1
  23514. 800a1c8: d02c beq.n 800a224 <ip4_input+0xbc>
  23515. 800a1ca: 6873 ldr r3, [r6, #4]
  23516. 800a1cc: 2b00 cmp r3, #0
  23517. 800a1ce: d170 bne.n 800a2b2 <ip4_input+0x14a>
  23518. netif = NULL;
  23519. 800a1d0: f04f 0800 mov.w r8, #0
  23520. 800a1d4: e028 b.n 800a228 <ip4_input+0xc0>
  23521. pbuf_realloc(p, iphdr_len);
  23522. 800a1d6: 4601 mov r1, r0
  23523. 800a1d8: 4620 mov r0, r4
  23524. 800a1da: f001 fef7 bl 800bfcc <pbuf_realloc>
  23525. 800a1de: e7de b.n 800a19e <ip4_input+0x36>
  23526. pbuf_free(p);
  23527. 800a1e0: 4620 mov r0, r4
  23528. 800a1e2: f001 fddd bl 800bda0 <pbuf_free>
  23529. return ERR_OK;
  23530. 800a1e6: e7cd b.n 800a184 <ip4_input+0x1c>
  23531. if (ip4_input_accept(inp)) {
  23532. 800a1e8: 4630 mov r0, r6
  23533. 800a1ea: f7ff ff6f bl 800a0cc <ip4_input_accept>
  23534. 800a1ee: b9a0 cbnz r0, 800a21a <ip4_input+0xb2>
  23535. if (!ip4_addr_isloopback(ip4_current_dest_addr()))
  23536. 800a1f0: 4b4a ldr r3, [pc, #296] @ (800a31c <ip4_input+0x1b4>)
  23537. 800a1f2: 7d1b ldrb r3, [r3, #20]
  23538. 800a1f4: 2b7f cmp r3, #127 @ 0x7f
  23539. 800a1f6: d052 beq.n 800a29e <ip4_input+0x136>
  23540. NETIF_FOREACH(netif) {
  23541. 800a1f8: 4b49 ldr r3, [pc, #292] @ (800a320 <ip4_input+0x1b8>)
  23542. 800a1fa: f8d3 8000 ldr.w r8, [r3]
  23543. 800a1fe: e001 b.n 800a204 <ip4_input+0x9c>
  23544. 800a200: f8d8 8000 ldr.w r8, [r8]
  23545. 800a204: f1b8 0f00 cmp.w r8, #0
  23546. 800a208: d008 beq.n 800a21c <ip4_input+0xb4>
  23547. if (netif == inp) {
  23548. 800a20a: 4546 cmp r6, r8
  23549. 800a20c: d0f8 beq.n 800a200 <ip4_input+0x98>
  23550. if (ip4_input_accept(netif)) {
  23551. 800a20e: 4640 mov r0, r8
  23552. 800a210: f7ff ff5c bl 800a0cc <ip4_input_accept>
  23553. 800a214: 2800 cmp r0, #0
  23554. 800a216: d0f3 beq.n 800a200 <ip4_input+0x98>
  23555. 800a218: e000 b.n 800a21c <ip4_input+0xb4>
  23556. netif = inp;
  23557. 800a21a: 46b0 mov r8, r6
  23558. if (netif == NULL) {
  23559. 800a21c: f1b8 0f00 cmp.w r8, #0
  23560. 800a220: d105 bne.n 800a22e <ip4_input+0xc6>
  23561. 800a222: e001 b.n 800a228 <ip4_input+0xc0>
  23562. netif = NULL;
  23563. 800a224: f04f 0800 mov.w r8, #0
  23564. if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
  23565. 800a228: 7a7b ldrb r3, [r7, #9]
  23566. 800a22a: 2b11 cmp r3, #17
  23567. 800a22c: d03a beq.n 800a2a4 <ip4_input+0x13c>
  23568. && !ip4_addr_isany_val(*ip4_current_src_addr())
  23569. 800a22e: 4b3b ldr r3, [pc, #236] @ (800a31c <ip4_input+0x1b4>)
  23570. 800a230: 6918 ldr r0, [r3, #16]
  23571. 800a232: 2800 cmp r0, #0
  23572. 800a234: d13f bne.n 800a2b6 <ip4_input+0x14e>
  23573. if (netif == NULL) {
  23574. 800a236: f1b8 0f00 cmp.w r8, #0
  23575. 800a23a: d04a beq.n 800a2d2 <ip4_input+0x16a>
  23576. if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) {
  23577. 800a23c: 88fb ldrh r3, [r7, #6]
  23578. 800a23e: f023 03c0 bic.w r3, r3, #192 @ 0xc0
  23579. 800a242: b29b uxth r3, r3
  23580. 800a244: b133 cbz r3, 800a254 <ip4_input+0xec>
  23581. p = ip4_reass(p);
  23582. 800a246: 4620 mov r0, r4
  23583. 800a248: f000 fc6a bl 800ab20 <ip4_reass>
  23584. if (p == NULL) {
  23585. 800a24c: 4604 mov r4, r0
  23586. 800a24e: 2800 cmp r0, #0
  23587. 800a250: d098 beq.n 800a184 <ip4_input+0x1c>
  23588. iphdr = (const struct ip_hdr *)p->payload;
  23589. 800a252: 6847 ldr r7, [r0, #4]
  23590. ip_data.current_netif = netif;
  23591. 800a254: 4a31 ldr r2, [pc, #196] @ (800a31c <ip4_input+0x1b4>)
  23592. 800a256: f8c2 8000 str.w r8, [r2]
  23593. ip_data.current_input_netif = inp;
  23594. 800a25a: 6056 str r6, [r2, #4]
  23595. ip_data.current_ip4_header = iphdr;
  23596. 800a25c: 6097 str r7, [r2, #8]
  23597. ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr);
  23598. 800a25e: 783b ldrb r3, [r7, #0]
  23599. 800a260: f003 030f and.w r3, r3, #15
  23600. 800a264: 009b lsls r3, r3, #2
  23601. 800a266: 8193 strh r3, [r2, #12]
  23602. pbuf_remove_header(p, iphdr_hlen); /* Move to payload, no check necessary. */
  23603. 800a268: 4629 mov r1, r5
  23604. 800a26a: 4620 mov r0, r4
  23605. 800a26c: f001 fd52 bl 800bd14 <pbuf_remove_header>
  23606. switch (IPH_PROTO(iphdr)) {
  23607. 800a270: 7a7b ldrb r3, [r7, #9]
  23608. 800a272: 2b06 cmp r3, #6
  23609. 800a274: d03e beq.n 800a2f4 <ip4_input+0x18c>
  23610. 800a276: 2b11 cmp r3, #17
  23611. 800a278: d02f beq.n 800a2da <ip4_input+0x172>
  23612. 800a27a: 2b01 cmp r3, #1
  23613. 800a27c: d03f beq.n 800a2fe <ip4_input+0x196>
  23614. if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
  23615. 800a27e: 4641 mov r1, r8
  23616. 800a280: 4b26 ldr r3, [pc, #152] @ (800a31c <ip4_input+0x1b4>)
  23617. 800a282: 6958 ldr r0, [r3, #20]
  23618. 800a284: f000 f8e5 bl 800a452 <ip4_addr_isbroadcast_u32>
  23619. 800a288: b928 cbnz r0, 800a296 <ip4_input+0x12e>
  23620. !ip4_addr_ismulticast(ip4_current_dest_addr())) {
  23621. 800a28a: 4b24 ldr r3, [pc, #144] @ (800a31c <ip4_input+0x1b4>)
  23622. 800a28c: 695b ldr r3, [r3, #20]
  23623. 800a28e: f003 03f0 and.w r3, r3, #240 @ 0xf0
  23624. if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) &&
  23625. 800a292: 2be0 cmp r3, #224 @ 0xe0
  23626. 800a294: d138 bne.n 800a308 <ip4_input+0x1a0>
  23627. pbuf_free(p);
  23628. 800a296: 4620 mov r0, r4
  23629. 800a298: f001 fd82 bl 800bda0 <pbuf_free>
  23630. break;
  23631. 800a29c: e021 b.n 800a2e2 <ip4_input+0x17a>
  23632. netif = NULL;
  23633. 800a29e: f04f 0800 mov.w r8, #0
  23634. 800a2a2: e7c1 b.n 800a228 <ip4_input+0xc0>
  23635. const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen);
  23636. 800a2a4: 197b adds r3, r7, r5
  23637. if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) {
  23638. 800a2a6: 885b ldrh r3, [r3, #2]
  23639. 800a2a8: f5b3 4f88 cmp.w r3, #17408 @ 0x4400
  23640. 800a2ac: d1bf bne.n 800a22e <ip4_input+0xc6>
  23641. netif = inp;
  23642. 800a2ae: 46b0 mov r8, r6
  23643. 800a2b0: e7c1 b.n 800a236 <ip4_input+0xce>
  23644. netif = inp;
  23645. 800a2b2: 46b0 mov r8, r6
  23646. 800a2b4: e7bb b.n 800a22e <ip4_input+0xc6>
  23647. if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
  23648. 800a2b6: 4631 mov r1, r6
  23649. 800a2b8: f000 f8cb bl 800a452 <ip4_addr_isbroadcast_u32>
  23650. 800a2bc: b928 cbnz r0, 800a2ca <ip4_input+0x162>
  23651. (ip4_addr_ismulticast(ip4_current_src_addr()))) {
  23652. 800a2be: 4b17 ldr r3, [pc, #92] @ (800a31c <ip4_input+0x1b4>)
  23653. 800a2c0: 691b ldr r3, [r3, #16]
  23654. 800a2c2: f003 03f0 and.w r3, r3, #240 @ 0xf0
  23655. if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) ||
  23656. 800a2c6: 2be0 cmp r3, #224 @ 0xe0
  23657. 800a2c8: d1b5 bne.n 800a236 <ip4_input+0xce>
  23658. pbuf_free(p);
  23659. 800a2ca: 4620 mov r0, r4
  23660. 800a2cc: f001 fd68 bl 800bda0 <pbuf_free>
  23661. return ERR_OK;
  23662. 800a2d0: e758 b.n 800a184 <ip4_input+0x1c>
  23663. pbuf_free(p);
  23664. 800a2d2: 4620 mov r0, r4
  23665. 800a2d4: f001 fd64 bl 800bda0 <pbuf_free>
  23666. return ERR_OK;
  23667. 800a2d8: e754 b.n 800a184 <ip4_input+0x1c>
  23668. udp_input(p, inp);
  23669. 800a2da: 4631 mov r1, r6
  23670. 800a2dc: 4620 mov r0, r4
  23671. 800a2de: f007 fac1 bl 8011864 <udp_input>
  23672. ip_data.current_netif = NULL;
  23673. 800a2e2: 4b0e ldr r3, [pc, #56] @ (800a31c <ip4_input+0x1b4>)
  23674. 800a2e4: 2200 movs r2, #0
  23675. 800a2e6: 601a str r2, [r3, #0]
  23676. ip_data.current_input_netif = NULL;
  23677. 800a2e8: 605a str r2, [r3, #4]
  23678. ip_data.current_ip4_header = NULL;
  23679. 800a2ea: 609a str r2, [r3, #8]
  23680. ip_data.current_ip_header_tot_len = 0;
  23681. 800a2ec: 819a strh r2, [r3, #12]
  23682. ip4_addr_set_any(ip4_current_src_addr());
  23683. 800a2ee: 611a str r2, [r3, #16]
  23684. ip4_addr_set_any(ip4_current_dest_addr());
  23685. 800a2f0: 615a str r2, [r3, #20]
  23686. return ERR_OK;
  23687. 800a2f2: e747 b.n 800a184 <ip4_input+0x1c>
  23688. tcp_input(p, inp);
  23689. 800a2f4: 4631 mov r1, r6
  23690. 800a2f6: 4620 mov r0, r4
  23691. 800a2f8: f005 fa36 bl 800f768 <tcp_input>
  23692. break;
  23693. 800a2fc: e7f1 b.n 800a2e2 <ip4_input+0x17a>
  23694. icmp_input(p, inp);
  23695. 800a2fe: 4631 mov r1, r6
  23696. 800a300: 4620 mov r0, r4
  23697. 800a302: f7ff fdb5 bl 8009e70 <icmp_input>
  23698. break;
  23699. 800a306: e7ec b.n 800a2e2 <ip4_input+0x17a>
  23700. pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */
  23701. 800a308: 4629 mov r1, r5
  23702. 800a30a: 4620 mov r0, r4
  23703. 800a30c: f001 fd42 bl 800bd94 <pbuf_header_force>
  23704. icmp_dest_unreach(p, ICMP_DUR_PROTO);
  23705. 800a310: 2102 movs r1, #2
  23706. 800a312: 4620 mov r0, r4
  23707. 800a314: f7ff fe62 bl 8009fdc <icmp_dest_unreach>
  23708. 800a318: e7bd b.n 800a296 <ip4_input+0x12e>
  23709. 800a31a: bf00 nop
  23710. 800a31c: 2401301c .word 0x2401301c
  23711. 800a320: 24019b80 .word 0x24019b80
  23712. 0800a324 <ip4_output_if_src>:
  23713. */
  23714. err_t
  23715. ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest,
  23716. u8_t ttl, u8_t tos,
  23717. u8_t proto, struct netif *netif)
  23718. {
  23719. 800a324: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
  23720. 800a328: b083 sub sp, #12
  23721. 800a32a: 4604 mov r4, r0
  23722. 800a32c: 460f mov r7, r1
  23723. 800a32e: 4616 mov r6, r2
  23724. 800a330: 4699 mov r9, r3
  23725. 800a332: f8dd 8030 ldr.w r8, [sp, #48] @ 0x30
  23726. ip4_addr_t dest_addr;
  23727. #if CHECKSUM_GEN_IP_INLINE
  23728. u32_t chk_sum = 0;
  23729. #endif /* CHECKSUM_GEN_IP_INLINE */
  23730. LWIP_ASSERT_CORE_LOCKED();
  23731. 800a336: f7f9 fbe9 bl 8003b0c <sys_check_core_locking>
  23732. LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p);
  23733. 800a33a: 7ba2 ldrb r2, [r4, #14]
  23734. 800a33c: 2a01 cmp r2, #1
  23735. 800a33e: d13f bne.n 800a3c0 <ip4_output_if_src+0x9c>
  23736. MIB2_STATS_INC(mib2.ipoutrequests);
  23737. /* Should the IP header be generated or is it already included in p? */
  23738. if (dest != LWIP_IP_HDRINCL) {
  23739. 800a340: 2e00 cmp r6, #0
  23740. 800a342: d051 beq.n 800a3e8 <ip4_output_if_src+0xc4>
  23741. }
  23742. #endif /* CHECKSUM_GEN_IP_INLINE */
  23743. }
  23744. #endif /* IP_OPTIONS_SEND */
  23745. /* generate IP header */
  23746. if (pbuf_add_header(p, IP_HLEN)) {
  23747. 800a344: 2114 movs r1, #20
  23748. 800a346: 4620 mov r0, r4
  23749. 800a348: f001 fcdf bl 800bd0a <pbuf_add_header>
  23750. 800a34c: 2800 cmp r0, #0
  23751. 800a34e: d159 bne.n 800a404 <ip4_output_if_src+0xe0>
  23752. IP_STATS_INC(ip.err);
  23753. MIB2_STATS_INC(mib2.ipoutdiscards);
  23754. return ERR_BUF;
  23755. }
  23756. iphdr = (struct ip_hdr *)p->payload;
  23757. 800a350: 6865 ldr r5, [r4, #4]
  23758. LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
  23759. 800a352: 8963 ldrh r3, [r4, #10]
  23760. 800a354: 2b13 cmp r3, #19
  23761. 800a356: d93b bls.n 800a3d0 <ip4_output_if_src+0xac>
  23762. (p->len >= sizeof(struct ip_hdr)));
  23763. IPH_TTL_SET(iphdr, ttl);
  23764. 800a358: f885 9008 strb.w r9, [r5, #8]
  23765. IPH_PROTO_SET(iphdr, proto);
  23766. 800a35c: f89d 302c ldrb.w r3, [sp, #44] @ 0x2c
  23767. 800a360: 726b strb r3, [r5, #9]
  23768. #if CHECKSUM_GEN_IP_INLINE
  23769. chk_sum += PP_NTOHS(proto | (ttl << 8));
  23770. #endif /* CHECKSUM_GEN_IP_INLINE */
  23771. /* dest cannot be NULL here */
  23772. ip4_addr_copy(iphdr->dest, *dest);
  23773. 800a362: 6833 ldr r3, [r6, #0]
  23774. 800a364: 612b str r3, [r5, #16]
  23775. #if CHECKSUM_GEN_IP_INLINE
  23776. chk_sum += ip4_addr_get_u32(&iphdr->dest) & 0xFFFF;
  23777. chk_sum += ip4_addr_get_u32(&iphdr->dest) >> 16;
  23778. #endif /* CHECKSUM_GEN_IP_INLINE */
  23779. IPH_VHL_SET(iphdr, 4, ip_hlen / 4);
  23780. 800a366: 2345 movs r3, #69 @ 0x45
  23781. 800a368: 702b strb r3, [r5, #0]
  23782. IPH_TOS_SET(iphdr, tos);
  23783. 800a36a: f89d 3028 ldrb.w r3, [sp, #40] @ 0x28
  23784. 800a36e: 706b strb r3, [r5, #1]
  23785. #if CHECKSUM_GEN_IP_INLINE
  23786. chk_sum += PP_NTOHS(tos | (iphdr->_v_hl << 8));
  23787. #endif /* CHECKSUM_GEN_IP_INLINE */
  23788. IPH_LEN_SET(iphdr, lwip_htons(p->tot_len));
  23789. 800a370: 8920 ldrh r0, [r4, #8]
  23790. 800a372: f7fd fd83 bl 8007e7c <lwip_htons>
  23791. 800a376: 8068 strh r0, [r5, #2]
  23792. #if CHECKSUM_GEN_IP_INLINE
  23793. chk_sum += iphdr->_len;
  23794. #endif /* CHECKSUM_GEN_IP_INLINE */
  23795. IPH_OFFSET_SET(iphdr, 0);
  23796. 800a378: 2300 movs r3, #0
  23797. 800a37a: 71ab strb r3, [r5, #6]
  23798. 800a37c: 71eb strb r3, [r5, #7]
  23799. IPH_ID_SET(iphdr, lwip_htons(ip_id));
  23800. 800a37e: f8df 90a4 ldr.w r9, [pc, #164] @ 800a424 <ip4_output_if_src+0x100>
  23801. 800a382: f8b9 0000 ldrh.w r0, [r9]
  23802. 800a386: f7fd fd79 bl 8007e7c <lwip_htons>
  23803. 800a38a: 80a8 strh r0, [r5, #4]
  23804. #if CHECKSUM_GEN_IP_INLINE
  23805. chk_sum += iphdr->_id;
  23806. #endif /* CHECKSUM_GEN_IP_INLINE */
  23807. ++ip_id;
  23808. 800a38c: f8b9 3000 ldrh.w r3, [r9]
  23809. 800a390: 3301 adds r3, #1
  23810. 800a392: f8a9 3000 strh.w r3, [r9]
  23811. if (src == NULL) {
  23812. 800a396: b31f cbz r7, 800a3e0 <ip4_output_if_src+0xbc>
  23813. ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4);
  23814. } else {
  23815. /* src cannot be NULL here */
  23816. ip4_addr_copy(iphdr->src, *src);
  23817. 800a398: 683b ldr r3, [r7, #0]
  23818. 800a39a: 60eb str r3, [r5, #12]
  23819. else {
  23820. IPH_CHKSUM_SET(iphdr, 0);
  23821. }
  23822. #endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/
  23823. #else /* CHECKSUM_GEN_IP_INLINE */
  23824. IPH_CHKSUM_SET(iphdr, 0);
  23825. 800a39c: 2300 movs r3, #0
  23826. 800a39e: 72ab strb r3, [r5, #10]
  23827. 800a3a0: 72eb strb r3, [r5, #11]
  23828. }
  23829. #endif /* LWIP_MULTICAST_TX_OPTIONS */
  23830. #endif /* ENABLE_LOOPBACK */
  23831. #if IP_FRAG
  23832. /* don't fragment if interface has mtu set to 0 [loopif] */
  23833. if (netif->mtu && (p->tot_len > netif->mtu)) {
  23834. 800a3a2: f8b8 3028 ldrh.w r3, [r8, #40] @ 0x28
  23835. 800a3a6: b113 cbz r3, 800a3ae <ip4_output_if_src+0x8a>
  23836. 800a3a8: 8922 ldrh r2, [r4, #8]
  23837. 800a3aa: 4293 cmp r3, r2
  23838. 800a3ac: d324 bcc.n 800a3f8 <ip4_output_if_src+0xd4>
  23839. return ip4_frag(p, netif, dest);
  23840. }
  23841. #endif /* IP_FRAG */
  23842. LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));
  23843. return netif->output(netif, p, dest);
  23844. 800a3ae: f8d8 3014 ldr.w r3, [r8, #20]
  23845. 800a3b2: 4632 mov r2, r6
  23846. 800a3b4: 4621 mov r1, r4
  23847. 800a3b6: 4640 mov r0, r8
  23848. 800a3b8: 4798 blx r3
  23849. }
  23850. 800a3ba: b003 add sp, #12
  23851. 800a3bc: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
  23852. LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p);
  23853. 800a3c0: 4b13 ldr r3, [pc, #76] @ (800a410 <ip4_output_if_src+0xec>)
  23854. 800a3c2: f44f 7255 mov.w r2, #852 @ 0x354
  23855. 800a3c6: 4913 ldr r1, [pc, #76] @ (800a414 <ip4_output_if_src+0xf0>)
  23856. 800a3c8: 4813 ldr r0, [pc, #76] @ (800a418 <ip4_output_if_src+0xf4>)
  23857. 800a3ca: f009 f81d bl 8013408 <iprintf>
  23858. 800a3ce: e7b7 b.n 800a340 <ip4_output_if_src+0x1c>
  23859. LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
  23860. 800a3d0: 4b0f ldr r3, [pc, #60] @ (800a410 <ip4_output_if_src+0xec>)
  23861. 800a3d2: f44f 7262 mov.w r2, #904 @ 0x388
  23862. 800a3d6: 4911 ldr r1, [pc, #68] @ (800a41c <ip4_output_if_src+0xf8>)
  23863. 800a3d8: 480f ldr r0, [pc, #60] @ (800a418 <ip4_output_if_src+0xf4>)
  23864. 800a3da: f009 f815 bl 8013408 <iprintf>
  23865. 800a3de: e7bb b.n 800a358 <ip4_output_if_src+0x34>
  23866. ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4);
  23867. 800a3e0: 4b0f ldr r3, [pc, #60] @ (800a420 <ip4_output_if_src+0xfc>)
  23868. 800a3e2: 681b ldr r3, [r3, #0]
  23869. 800a3e4: 60eb str r3, [r5, #12]
  23870. 800a3e6: e7d9 b.n 800a39c <ip4_output_if_src+0x78>
  23871. if (p->len < IP_HLEN) {
  23872. 800a3e8: 8963 ldrh r3, [r4, #10]
  23873. 800a3ea: 2b13 cmp r3, #19
  23874. 800a3ec: d90d bls.n 800a40a <ip4_output_if_src+0xe6>
  23875. iphdr = (struct ip_hdr *)p->payload;
  23876. 800a3ee: 6863 ldr r3, [r4, #4]
  23877. ip4_addr_copy(dest_addr, iphdr->dest);
  23878. 800a3f0: 691b ldr r3, [r3, #16]
  23879. 800a3f2: 9301 str r3, [sp, #4]
  23880. dest = &dest_addr;
  23881. 800a3f4: ae01 add r6, sp, #4
  23882. 800a3f6: e7d4 b.n 800a3a2 <ip4_output_if_src+0x7e>
  23883. return ip4_frag(p, netif, dest);
  23884. 800a3f8: 4632 mov r2, r6
  23885. 800a3fa: 4641 mov r1, r8
  23886. 800a3fc: 4620 mov r0, r4
  23887. 800a3fe: f000 fc97 bl 800ad30 <ip4_frag>
  23888. 800a402: e7da b.n 800a3ba <ip4_output_if_src+0x96>
  23889. return ERR_BUF;
  23890. 800a404: f06f 0001 mvn.w r0, #1
  23891. 800a408: e7d7 b.n 800a3ba <ip4_output_if_src+0x96>
  23892. return ERR_BUF;
  23893. 800a40a: f06f 0001 mvn.w r0, #1
  23894. 800a40e: e7d4 b.n 800a3ba <ip4_output_if_src+0x96>
  23895. 800a410: 080155c0 .word 0x080155c0
  23896. 800a414: 08015624 .word 0x08015624
  23897. 800a418: 080144e8 .word 0x080144e8
  23898. 800a41c: 08015630 .word 0x08015630
  23899. 800a420: 080156d8 .word 0x080156d8
  23900. 800a424: 24013034 .word 0x24013034
  23901. 0800a428 <ip4_output_if>:
  23902. {
  23903. 800a428: b510 push {r4, lr}
  23904. 800a42a: b084 sub sp, #16
  23905. 800a42c: 9c08 ldr r4, [sp, #32]
  23906. if (dest != LWIP_IP_HDRINCL) {
  23907. 800a42e: 4694 mov ip, r2
  23908. 800a430: b11a cbz r2, 800a43a <ip4_output_if+0x12>
  23909. if (ip4_addr_isany(src)) {
  23910. 800a432: b109 cbz r1, 800a438 <ip4_output_if+0x10>
  23911. 800a434: 680a ldr r2, [r1, #0]
  23912. 800a436: b902 cbnz r2, 800a43a <ip4_output_if+0x12>
  23913. src_used = netif_ip4_addr(netif);
  23914. 800a438: 1d21 adds r1, r4, #4
  23915. return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif);
  23916. 800a43a: 9402 str r4, [sp, #8]
  23917. 800a43c: f89d 201c ldrb.w r2, [sp, #28]
  23918. 800a440: 9201 str r2, [sp, #4]
  23919. 800a442: f89d 2018 ldrb.w r2, [sp, #24]
  23920. 800a446: 9200 str r2, [sp, #0]
  23921. 800a448: 4662 mov r2, ip
  23922. 800a44a: f7ff ff6b bl 800a324 <ip4_output_if_src>
  23923. }
  23924. 800a44e: b004 add sp, #16
  23925. 800a450: bd10 pop {r4, pc}
  23926. 0800a452 <ip4_addr_isbroadcast_u32>:
  23927. * @param netif the network interface against which the address is checked
  23928. * @return returns non-zero if the address is a broadcast address
  23929. */
  23930. u8_t
  23931. ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif)
  23932. {
  23933. 800a452: 4603 mov r3, r0
  23934. ip4_addr_t ipaddr;
  23935. ip4_addr_set_u32(&ipaddr, addr);
  23936. /* all ones (broadcast) or all zeroes (old skool broadcast) */
  23937. if ((~addr == IPADDR_ANY) ||
  23938. 800a454: 1e42 subs r2, r0, #1
  23939. 800a456: f112 0f03 cmn.w r2, #3
  23940. 800a45a: d812 bhi.n 800a482 <ip4_addr_isbroadcast_u32+0x30>
  23941. (addr == IPADDR_ANY)) {
  23942. return 1;
  23943. /* no broadcast support on this network interface? */
  23944. } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) {
  23945. 800a45c: f891 0031 ldrb.w r0, [r1, #49] @ 0x31
  23946. 800a460: f010 0002 ands.w r0, r0, #2
  23947. 800a464: d014 beq.n 800a490 <ip4_addr_isbroadcast_u32+0x3e>
  23948. /* the given address cannot be a broadcast address
  23949. * nor can we check against any broadcast addresses */
  23950. return 0;
  23951. /* address matches network interface address exactly? => no broadcast */
  23952. } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) {
  23953. 800a466: 684a ldr r2, [r1, #4]
  23954. 800a468: 429a cmp r2, r3
  23955. 800a46a: d00c beq.n 800a486 <ip4_addr_isbroadcast_u32+0x34>
  23956. return 0;
  23957. /* on the same (sub) network... */
  23958. } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif))
  23959. 800a46c: 6889 ldr r1, [r1, #8]
  23960. 800a46e: 405a eors r2, r3
  23961. 800a470: 420a tst r2, r1
  23962. 800a472: d10a bne.n 800a48a <ip4_addr_isbroadcast_u32+0x38>
  23963. /* ...and host identifier bits are all ones? =>... */
  23964. && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) ==
  23965. 800a474: 43ca mvns r2, r1
  23966. 800a476: ea23 0301 bic.w r3, r3, r1
  23967. 800a47a: 429a cmp r2, r3
  23968. 800a47c: d007 beq.n 800a48e <ip4_addr_isbroadcast_u32+0x3c>
  23969. (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) {
  23970. /* => network broadcast address */
  23971. return 1;
  23972. } else {
  23973. return 0;
  23974. 800a47e: 2000 movs r0, #0
  23975. 800a480: 4770 bx lr
  23976. return 1;
  23977. 800a482: 2001 movs r0, #1
  23978. 800a484: 4770 bx lr
  23979. return 0;
  23980. 800a486: 2000 movs r0, #0
  23981. 800a488: 4770 bx lr
  23982. return 0;
  23983. 800a48a: 2000 movs r0, #0
  23984. 800a48c: 4770 bx lr
  23985. return 1;
  23986. 800a48e: 2001 movs r0, #1
  23987. }
  23988. }
  23989. 800a490: 4770 bx lr
  23990. ...
  23991. 0800a494 <ip4addr_aton>:
  23992. * @param addr pointer to which to save the ip address in network order
  23993. * @return 1 if cp could be converted to addr, 0 on failure
  23994. */
  23995. int
  23996. ip4addr_aton(const char *cp, ip4_addr_t *addr)
  23997. {
  23998. 800a494: b530 push {r4, r5, lr}
  23999. 800a496: b085 sub sp, #20
  24000. 800a498: 460d mov r5, r1
  24001. u8_t base;
  24002. char c;
  24003. u32_t parts[4];
  24004. u32_t *pp = parts;
  24005. c = *cp;
  24006. 800a49a: 7803 ldrb r3, [r0, #0]
  24007. u32_t *pp = parts;
  24008. 800a49c: 46ec mov ip, sp
  24009. 800a49e: e035 b.n 800a50c <ip4addr_aton+0x78>
  24010. return 0;
  24011. }
  24012. val = 0;
  24013. base = 10;
  24014. if (c == '0') {
  24015. c = *++cp;
  24016. 800a4a0: 1c42 adds r2, r0, #1
  24017. 800a4a2: 7843 ldrb r3, [r0, #1]
  24018. if (c == 'x' || c == 'X') {
  24019. 800a4a4: 2b58 cmp r3, #88 @ 0x58
  24020. 800a4a6: bf18 it ne
  24021. 800a4a8: 2b78 cmpne r3, #120 @ 0x78
  24022. 800a4aa: d103 bne.n 800a4b4 <ip4addr_aton+0x20>
  24023. base = 16;
  24024. c = *++cp;
  24025. 800a4ac: 7883 ldrb r3, [r0, #2]
  24026. 800a4ae: 3002 adds r0, #2
  24027. base = 16;
  24028. 800a4b0: 2110 movs r1, #16
  24029. 800a4b2: e033 b.n 800a51c <ip4addr_aton+0x88>
  24030. c = *++cp;
  24031. 800a4b4: 4610 mov r0, r2
  24032. } else {
  24033. base = 8;
  24034. 800a4b6: 2108 movs r1, #8
  24035. 800a4b8: e030 b.n 800a51c <ip4addr_aton+0x88>
  24036. }
  24037. }
  24038. for (;;) {
  24039. if (lwip_isdigit(c)) {
  24040. val = (val * base) + (u32_t)(c - '0');
  24041. 800a4ba: fb04 3301 mla r3, r4, r1, r3
  24042. 800a4be: f1a3 0430 sub.w r4, r3, #48 @ 0x30
  24043. c = *++cp;
  24044. 800a4c2: f810 3f01 ldrb.w r3, [r0, #1]!
  24045. if (lwip_isdigit(c)) {
  24046. 800a4c6: 4a47 ldr r2, [pc, #284] @ (800a5e4 <ip4addr_aton+0x150>)
  24047. 800a4c8: 5cd2 ldrb r2, [r2, r3]
  24048. 800a4ca: f012 0f04 tst.w r2, #4
  24049. 800a4ce: d1f4 bne.n 800a4ba <ip4addr_aton+0x26>
  24050. } else if (base == 16 && lwip_isxdigit(c)) {
  24051. 800a4d0: 2910 cmp r1, #16
  24052. 800a4d2: d110 bne.n 800a4f6 <ip4addr_aton+0x62>
  24053. 800a4d4: f012 0f44 tst.w r2, #68 @ 0x44
  24054. 800a4d8: d00d beq.n 800a4f6 <ip4addr_aton+0x62>
  24055. val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A'));
  24056. 800a4da: 0124 lsls r4, r4, #4
  24057. 800a4dc: 330a adds r3, #10
  24058. 800a4de: f002 0203 and.w r2, r2, #3
  24059. 800a4e2: 2a02 cmp r2, #2
  24060. 800a4e4: d005 beq.n 800a4f2 <ip4addr_aton+0x5e>
  24061. 800a4e6: 2241 movs r2, #65 @ 0x41
  24062. 800a4e8: 1a9b subs r3, r3, r2
  24063. 800a4ea: 431c orrs r4, r3
  24064. c = *++cp;
  24065. 800a4ec: f810 3f01 ldrb.w r3, [r0, #1]!
  24066. 800a4f0: e7e9 b.n 800a4c6 <ip4addr_aton+0x32>
  24067. val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A'));
  24068. 800a4f2: 2261 movs r2, #97 @ 0x61
  24069. 800a4f4: e7f8 b.n 800a4e8 <ip4addr_aton+0x54>
  24070. } else {
  24071. break;
  24072. }
  24073. }
  24074. if (c == '.') {
  24075. 800a4f6: 2b2e cmp r3, #46 @ 0x2e
  24076. 800a4f8: d112 bne.n 800a520 <ip4addr_aton+0x8c>
  24077. * Internet format:
  24078. * a.b.c.d
  24079. * a.b.c (with c treated as 16 bits)
  24080. * a.b (with b treated as 24 bits)
  24081. */
  24082. if (pp >= parts + 3) {
  24083. 800a4fa: ab03 add r3, sp, #12
  24084. 800a4fc: 459c cmp ip, r3
  24085. 800a4fe: d258 bcs.n 800a5b2 <ip4addr_aton+0x11e>
  24086. return 0;
  24087. }
  24088. *pp++ = val;
  24089. 800a500: 4662 mov r2, ip
  24090. 800a502: f842 4b04 str.w r4, [r2], #4
  24091. c = *++cp;
  24092. 800a506: 7843 ldrb r3, [r0, #1]
  24093. *pp++ = val;
  24094. 800a508: 4694 mov ip, r2
  24095. c = *++cp;
  24096. 800a50a: 3001 adds r0, #1
  24097. if (!lwip_isdigit(c)) {
  24098. 800a50c: 4a35 ldr r2, [pc, #212] @ (800a5e4 <ip4addr_aton+0x150>)
  24099. 800a50e: 5cd2 ldrb r2, [r2, r3]
  24100. 800a510: f012 0f04 tst.w r2, #4
  24101. 800a514: d04b beq.n 800a5ae <ip4addr_aton+0x11a>
  24102. if (c == '0') {
  24103. 800a516: 2b30 cmp r3, #48 @ 0x30
  24104. 800a518: d0c2 beq.n 800a4a0 <ip4addr_aton+0xc>
  24105. base = 10;
  24106. 800a51a: 210a movs r1, #10
  24107. base = 8;
  24108. 800a51c: 2400 movs r4, #0
  24109. 800a51e: e7d2 b.n 800a4c6 <ip4addr_aton+0x32>
  24110. }
  24111. }
  24112. /*
  24113. * Check for trailing characters.
  24114. */
  24115. if (c != '\0' && !lwip_isspace(c)) {
  24116. 800a520: b113 cbz r3, 800a528 <ip4addr_aton+0x94>
  24117. 800a522: f012 0f08 tst.w r2, #8
  24118. 800a526: d047 beq.n 800a5b8 <ip4addr_aton+0x124>
  24119. }
  24120. /*
  24121. * Concoct the address according to
  24122. * the number of parts specified.
  24123. */
  24124. switch (pp - parts + 1) {
  24125. 800a528: 466b mov r3, sp
  24126. 800a52a: ebac 0003 sub.w r0, ip, r3
  24127. 800a52e: 1080 asrs r0, r0, #2
  24128. 800a530: 3001 adds r0, #1
  24129. 800a532: 2804 cmp r0, #4
  24130. 800a534: d834 bhi.n 800a5a0 <ip4addr_aton+0x10c>
  24131. 800a536: e8df f000 tbb [pc, r0]
  24132. 800a53a: 0b3d .short 0x0b3d
  24133. 800a53c: 1303 .short 0x1303
  24134. 800a53e: 21 .byte 0x21
  24135. 800a53f: 00 .byte 0x00
  24136. case 1: /* a -- 32 bits */
  24137. break;
  24138. case 2: /* a.b -- 8.24 bits */
  24139. if (val > 0xffffffUL) {
  24140. 800a540: f1b4 7f80 cmp.w r4, #16777216 @ 0x1000000
  24141. 800a544: d23a bcs.n 800a5bc <ip4addr_aton+0x128>
  24142. return 0;
  24143. }
  24144. if (parts[0] > 0xff) {
  24145. 800a546: 9b00 ldr r3, [sp, #0]
  24146. 800a548: 2bff cmp r3, #255 @ 0xff
  24147. 800a54a: d839 bhi.n 800a5c0 <ip4addr_aton+0x12c>
  24148. return 0;
  24149. }
  24150. val |= parts[0] << 24;
  24151. 800a54c: ea44 6403 orr.w r4, r4, r3, lsl #24
  24152. break;
  24153. default:
  24154. LWIP_ASSERT("unhandled", 0);
  24155. break;
  24156. }
  24157. if (addr) {
  24158. 800a550: 2d00 cmp r5, #0
  24159. 800a552: d045 beq.n 800a5e0 <ip4addr_aton+0x14c>
  24160. ip4_addr_set_u32(addr, lwip_htonl(val));
  24161. 800a554: 4620 mov r0, r4
  24162. 800a556: f7fd fc96 bl 8007e86 <lwip_htonl>
  24163. 800a55a: 6028 str r0, [r5, #0]
  24164. }
  24165. return 1;
  24166. 800a55c: 2001 movs r0, #1
  24167. 800a55e: e029 b.n 800a5b4 <ip4addr_aton+0x120>
  24168. if (val > 0xffff) {
  24169. 800a560: f5b4 3f80 cmp.w r4, #65536 @ 0x10000
  24170. 800a564: d22e bcs.n 800a5c4 <ip4addr_aton+0x130>
  24171. if ((parts[0] > 0xff) || (parts[1] > 0xff)) {
  24172. 800a566: 9a00 ldr r2, [sp, #0]
  24173. 800a568: 2aff cmp r2, #255 @ 0xff
  24174. 800a56a: d82d bhi.n 800a5c8 <ip4addr_aton+0x134>
  24175. 800a56c: 9b01 ldr r3, [sp, #4]
  24176. 800a56e: 2bff cmp r3, #255 @ 0xff
  24177. 800a570: d82c bhi.n 800a5cc <ip4addr_aton+0x138>
  24178. val |= (parts[0] << 24) | (parts[1] << 16);
  24179. 800a572: 041b lsls r3, r3, #16
  24180. 800a574: ea43 6302 orr.w r3, r3, r2, lsl #24
  24181. 800a578: 431c orrs r4, r3
  24182. break;
  24183. 800a57a: e7e9 b.n 800a550 <ip4addr_aton+0xbc>
  24184. if (val > 0xff) {
  24185. 800a57c: 2cff cmp r4, #255 @ 0xff
  24186. 800a57e: d827 bhi.n 800a5d0 <ip4addr_aton+0x13c>
  24187. if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) {
  24188. 800a580: 9900 ldr r1, [sp, #0]
  24189. 800a582: 29ff cmp r1, #255 @ 0xff
  24190. 800a584: d826 bhi.n 800a5d4 <ip4addr_aton+0x140>
  24191. 800a586: 9b01 ldr r3, [sp, #4]
  24192. 800a588: 2bff cmp r3, #255 @ 0xff
  24193. 800a58a: d825 bhi.n 800a5d8 <ip4addr_aton+0x144>
  24194. 800a58c: 9a02 ldr r2, [sp, #8]
  24195. 800a58e: 2aff cmp r2, #255 @ 0xff
  24196. 800a590: d824 bhi.n 800a5dc <ip4addr_aton+0x148>
  24197. val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
  24198. 800a592: 041b lsls r3, r3, #16
  24199. 800a594: ea43 6301 orr.w r3, r3, r1, lsl #24
  24200. 800a598: ea43 2302 orr.w r3, r3, r2, lsl #8
  24201. 800a59c: 431c orrs r4, r3
  24202. break;
  24203. 800a59e: e7d7 b.n 800a550 <ip4addr_aton+0xbc>
  24204. LWIP_ASSERT("unhandled", 0);
  24205. 800a5a0: 4b11 ldr r3, [pc, #68] @ (800a5e8 <ip4addr_aton+0x154>)
  24206. 800a5a2: 22f9 movs r2, #249 @ 0xf9
  24207. 800a5a4: 4911 ldr r1, [pc, #68] @ (800a5ec <ip4addr_aton+0x158>)
  24208. 800a5a6: 4812 ldr r0, [pc, #72] @ (800a5f0 <ip4addr_aton+0x15c>)
  24209. 800a5a8: f008 ff2e bl 8013408 <iprintf>
  24210. break;
  24211. 800a5ac: e7d0 b.n 800a550 <ip4addr_aton+0xbc>
  24212. return 0;
  24213. 800a5ae: 2000 movs r0, #0
  24214. 800a5b0: e000 b.n 800a5b4 <ip4addr_aton+0x120>
  24215. return 0;
  24216. 800a5b2: 2000 movs r0, #0
  24217. }
  24218. 800a5b4: b005 add sp, #20
  24219. 800a5b6: bd30 pop {r4, r5, pc}
  24220. return 0;
  24221. 800a5b8: 2000 movs r0, #0
  24222. 800a5ba: e7fb b.n 800a5b4 <ip4addr_aton+0x120>
  24223. return 0;
  24224. 800a5bc: 2000 movs r0, #0
  24225. 800a5be: e7f9 b.n 800a5b4 <ip4addr_aton+0x120>
  24226. return 0;
  24227. 800a5c0: 2000 movs r0, #0
  24228. 800a5c2: e7f7 b.n 800a5b4 <ip4addr_aton+0x120>
  24229. return 0;
  24230. 800a5c4: 2000 movs r0, #0
  24231. 800a5c6: e7f5 b.n 800a5b4 <ip4addr_aton+0x120>
  24232. return 0;
  24233. 800a5c8: 2000 movs r0, #0
  24234. 800a5ca: e7f3 b.n 800a5b4 <ip4addr_aton+0x120>
  24235. 800a5cc: 2000 movs r0, #0
  24236. 800a5ce: e7f1 b.n 800a5b4 <ip4addr_aton+0x120>
  24237. return 0;
  24238. 800a5d0: 2000 movs r0, #0
  24239. 800a5d2: e7ef b.n 800a5b4 <ip4addr_aton+0x120>
  24240. return 0;
  24241. 800a5d4: 2000 movs r0, #0
  24242. 800a5d6: e7ed b.n 800a5b4 <ip4addr_aton+0x120>
  24243. 800a5d8: 2000 movs r0, #0
  24244. 800a5da: e7eb b.n 800a5b4 <ip4addr_aton+0x120>
  24245. 800a5dc: 2000 movs r0, #0
  24246. 800a5de: e7e9 b.n 800a5b4 <ip4addr_aton+0x120>
  24247. return 1;
  24248. 800a5e0: 2001 movs r0, #1
  24249. 800a5e2: e7e7 b.n 800a5b4 <ip4addr_aton+0x120>
  24250. 800a5e4: 08017f4b .word 0x08017f4b
  24251. 800a5e8: 08015660 .word 0x08015660
  24252. 800a5ec: 080156c8 .word 0x080156c8
  24253. 800a5f0: 080144e8 .word 0x080144e8
  24254. 0800a5f4 <ipaddr_addr>:
  24255. {
  24256. 800a5f4: b500 push {lr}
  24257. 800a5f6: b083 sub sp, #12
  24258. if (ip4addr_aton(cp, &val)) {
  24259. 800a5f8: a901 add r1, sp, #4
  24260. 800a5fa: f7ff ff4b bl 800a494 <ip4addr_aton>
  24261. 800a5fe: b920 cbnz r0, 800a60a <ipaddr_addr+0x16>
  24262. return (IPADDR_NONE);
  24263. 800a600: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  24264. }
  24265. 800a604: b003 add sp, #12
  24266. 800a606: f85d fb04 ldr.w pc, [sp], #4
  24267. return ip4_addr_get_u32(&val);
  24268. 800a60a: 9801 ldr r0, [sp, #4]
  24269. 800a60c: e7fa b.n 800a604 <ipaddr_addr+0x10>
  24270. ...
  24271. 0800a610 <ip4addr_ntoa_r>:
  24272. * @return either pointer to buf which now holds the ASCII
  24273. * representation of addr or NULL if buf was too small
  24274. */
  24275. char *
  24276. ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen)
  24277. {
  24278. 800a610: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  24279. 800a614: b082 sub sp, #8
  24280. 800a616: 4688 mov r8, r1
  24281. u8_t rem;
  24282. u8_t n;
  24283. u8_t i;
  24284. int len = 0;
  24285. s_addr = ip4_addr_get_u32(addr);
  24286. 800a618: 6803 ldr r3, [r0, #0]
  24287. 800a61a: 9301 str r3, [sp, #4]
  24288. rp = buf;
  24289. 800a61c: 460c mov r4, r1
  24290. int len = 0;
  24291. 800a61e: 2600 movs r6, #0
  24292. ap = (u8_t *)&s_addr;
  24293. for (n = 0; n < 4; n++) {
  24294. 800a620: 4630 mov r0, r6
  24295. ap = (u8_t *)&s_addr;
  24296. 800a622: af01 add r7, sp, #4
  24297. for (n = 0; n < 4; n++) {
  24298. 800a624: 2803 cmp r0, #3
  24299. 800a626: d83b bhi.n 800a6a0 <ip4addr_ntoa_r+0x90>
  24300. i = 0;
  24301. 800a628: 2300 movs r3, #0
  24302. do {
  24303. rem = *ap % (u8_t)10;
  24304. 800a62a: 783d ldrb r5, [r7, #0]
  24305. 800a62c: 4920 ldr r1, [pc, #128] @ (800a6b0 <ip4addr_ntoa_r+0xa0>)
  24306. 800a62e: fba1 ce05 umull ip, lr, r1, r5
  24307. 800a632: ea4f 0ede mov.w lr, lr, lsr #3
  24308. 800a636: eb0e 0c8e add.w ip, lr, lr, lsl #2
  24309. 800a63a: eba5 0c4c sub.w ip, r5, ip, lsl #1
  24310. 800a63e: fa5f fc8c uxtb.w ip, ip
  24311. *ap /= (u8_t)10;
  24312. 800a642: f887 e000 strb.w lr, [r7]
  24313. inv[i++] = (char)('0' + rem);
  24314. 800a646: 469e mov lr, r3
  24315. 800a648: 3301 adds r3, #1
  24316. 800a64a: b2db uxtb r3, r3
  24317. 800a64c: f10c 0c30 add.w ip, ip, #48 @ 0x30
  24318. 800a650: f10e 0108 add.w r1, lr, #8
  24319. 800a654: eb0d 0e01 add.w lr, sp, r1
  24320. 800a658: f80e cc08 strb.w ip, [lr, #-8]
  24321. } while (*ap);
  24322. 800a65c: 2d09 cmp r5, #9
  24323. 800a65e: d8e4 bhi.n 800a62a <ip4addr_ntoa_r+0x1a>
  24324. 800a660: e009 b.n 800a676 <ip4addr_ntoa_r+0x66>
  24325. while (i--) {
  24326. if (len++ >= buflen) {
  24327. return NULL;
  24328. }
  24329. *rp++ = inv[i];
  24330. 800a662: f105 0108 add.w r1, r5, #8
  24331. 800a666: eb0d 0601 add.w r6, sp, r1
  24332. 800a66a: f816 6c08 ldrb.w r6, [r6, #-8]
  24333. 800a66e: f804 6b01 strb.w r6, [r4], #1
  24334. if (len++ >= buflen) {
  24335. 800a672: 461e mov r6, r3
  24336. while (i--) {
  24337. 800a674: 462b mov r3, r5
  24338. 800a676: 1e5d subs r5, r3, #1
  24339. 800a678: b2ed uxtb r5, r5
  24340. 800a67a: b133 cbz r3, 800a68a <ip4addr_ntoa_r+0x7a>
  24341. if (len++ >= buflen) {
  24342. 800a67c: 1c73 adds r3, r6, #1
  24343. 800a67e: 4296 cmp r6, r2
  24344. 800a680: dbef blt.n 800a662 <ip4addr_ntoa_r+0x52>
  24345. return NULL;
  24346. 800a682: 2000 movs r0, #0
  24347. *rp++ = '.';
  24348. ap++;
  24349. }
  24350. *--rp = 0;
  24351. return buf;
  24352. }
  24353. 800a684: b002 add sp, #8
  24354. 800a686: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  24355. if (len++ >= buflen) {
  24356. 800a68a: 1c73 adds r3, r6, #1
  24357. 800a68c: 4296 cmp r6, r2
  24358. 800a68e: da0c bge.n 800a6aa <ip4addr_ntoa_r+0x9a>
  24359. *rp++ = '.';
  24360. 800a690: 252e movs r5, #46 @ 0x2e
  24361. 800a692: f804 5b01 strb.w r5, [r4], #1
  24362. ap++;
  24363. 800a696: 3701 adds r7, #1
  24364. for (n = 0; n < 4; n++) {
  24365. 800a698: 3001 adds r0, #1
  24366. 800a69a: b2c0 uxtb r0, r0
  24367. if (len++ >= buflen) {
  24368. 800a69c: 461e mov r6, r3
  24369. 800a69e: e7c1 b.n 800a624 <ip4addr_ntoa_r+0x14>
  24370. *--rp = 0;
  24371. 800a6a0: 2300 movs r3, #0
  24372. 800a6a2: f804 3c01 strb.w r3, [r4, #-1]
  24373. return buf;
  24374. 800a6a6: 4640 mov r0, r8
  24375. 800a6a8: e7ec b.n 800a684 <ip4addr_ntoa_r+0x74>
  24376. return NULL;
  24377. 800a6aa: 2000 movs r0, #0
  24378. 800a6ac: e7ea b.n 800a684 <ip4addr_ntoa_r+0x74>
  24379. 800a6ae: bf00 nop
  24380. 800a6b0: cccccccd .word 0xcccccccd
  24381. 0800a6b4 <ip4addr_ntoa>:
  24382. {
  24383. 800a6b4: b508 push {r3, lr}
  24384. return ip4addr_ntoa_r(addr, str, IP4ADDR_STRLEN_MAX);
  24385. 800a6b6: 2210 movs r2, #16
  24386. 800a6b8: 4901 ldr r1, [pc, #4] @ (800a6c0 <ip4addr_ntoa+0xc>)
  24387. 800a6ba: f7ff ffa9 bl 800a610 <ip4addr_ntoa_r>
  24388. }
  24389. 800a6be: bd08 pop {r3, pc}
  24390. 800a6c0: 24013038 .word 0x24013038
  24391. 0800a6c4 <ip_reass_dequeue_datagram>:
  24392. * Dequeues a datagram from the datagram queue. Doesn't deallocate the pbufs.
  24393. * @param ipr points to the queue entry to dequeue
  24394. */
  24395. static void
  24396. ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev)
  24397. {
  24398. 800a6c4: b538 push {r3, r4, r5, lr}
  24399. 800a6c6: 4604 mov r4, r0
  24400. /* dequeue the reass struct */
  24401. if (reassdatagrams == ipr) {
  24402. 800a6c8: 4b0c ldr r3, [pc, #48] @ (800a6fc <ip_reass_dequeue_datagram+0x38>)
  24403. 800a6ca: 681b ldr r3, [r3, #0]
  24404. 800a6cc: 4283 cmp r3, r0
  24405. 800a6ce: d008 beq.n 800a6e2 <ip_reass_dequeue_datagram+0x1e>
  24406. 800a6d0: 460d mov r5, r1
  24407. /* it was the first in the list */
  24408. reassdatagrams = ipr->next;
  24409. } else {
  24410. /* it wasn't the first, so it must have a valid 'prev' */
  24411. LWIP_ASSERT("sanity check linked list", prev != NULL);
  24412. 800a6d2: b151 cbz r1, 800a6ea <ip_reass_dequeue_datagram+0x26>
  24413. prev->next = ipr->next;
  24414. 800a6d4: 6823 ldr r3, [r4, #0]
  24415. 800a6d6: 602b str r3, [r5, #0]
  24416. }
  24417. /* now we can free the ip_reassdata struct */
  24418. memp_free(MEMP_REASSDATA, ipr);
  24419. 800a6d8: 4621 mov r1, r4
  24420. 800a6da: 2004 movs r0, #4
  24421. 800a6dc: f000 ffc8 bl 800b670 <memp_free>
  24422. }
  24423. 800a6e0: bd38 pop {r3, r4, r5, pc}
  24424. reassdatagrams = ipr->next;
  24425. 800a6e2: 6802 ldr r2, [r0, #0]
  24426. 800a6e4: 4b05 ldr r3, [pc, #20] @ (800a6fc <ip_reass_dequeue_datagram+0x38>)
  24427. 800a6e6: 601a str r2, [r3, #0]
  24428. 800a6e8: e7f6 b.n 800a6d8 <ip_reass_dequeue_datagram+0x14>
  24429. LWIP_ASSERT("sanity check linked list", prev != NULL);
  24430. 800a6ea: 4b05 ldr r3, [pc, #20] @ (800a700 <ip_reass_dequeue_datagram+0x3c>)
  24431. 800a6ec: f240 1245 movw r2, #325 @ 0x145
  24432. 800a6f0: 4904 ldr r1, [pc, #16] @ (800a704 <ip_reass_dequeue_datagram+0x40>)
  24433. 800a6f2: 4805 ldr r0, [pc, #20] @ (800a708 <ip_reass_dequeue_datagram+0x44>)
  24434. 800a6f4: f008 fe88 bl 8013408 <iprintf>
  24435. 800a6f8: e7ec b.n 800a6d4 <ip_reass_dequeue_datagram+0x10>
  24436. 800a6fa: bf00 nop
  24437. 800a6fc: 2401304c .word 0x2401304c
  24438. 800a700: 080156dc .word 0x080156dc
  24439. 800a704: 08015744 .word 0x08015744
  24440. 800a708: 080144e8 .word 0x080144e8
  24441. 0800a70c <ip_reass_free_complete_datagram>:
  24442. {
  24443. 800a70c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  24444. 800a710: 4680 mov r8, r0
  24445. 800a712: 4689 mov r9, r1
  24446. LWIP_ASSERT("prev != ipr", prev != ipr);
  24447. 800a714: 4281 cmp r1, r0
  24448. 800a716: d015 beq.n 800a744 <ip_reass_free_complete_datagram+0x38>
  24449. if (prev != NULL) {
  24450. 800a718: f1b9 0f00 cmp.w r9, #0
  24451. 800a71c: d009 beq.n 800a732 <ip_reass_free_complete_datagram+0x26>
  24452. LWIP_ASSERT("prev->next == ipr", prev->next == ipr);
  24453. 800a71e: f8d9 3000 ldr.w r3, [r9]
  24454. 800a722: 4543 cmp r3, r8
  24455. 800a724: d005 beq.n 800a732 <ip_reass_free_complete_datagram+0x26>
  24456. 800a726: 4b31 ldr r3, [pc, #196] @ (800a7ec <ip_reass_free_complete_datagram+0xe0>)
  24457. 800a728: 22ad movs r2, #173 @ 0xad
  24458. 800a72a: 4931 ldr r1, [pc, #196] @ (800a7f0 <ip_reass_free_complete_datagram+0xe4>)
  24459. 800a72c: 4831 ldr r0, [pc, #196] @ (800a7f4 <ip_reass_free_complete_datagram+0xe8>)
  24460. 800a72e: f008 fe6b bl 8013408 <iprintf>
  24461. iprh = (struct ip_reass_helper *)ipr->p->payload;
  24462. 800a732: f8d8 4004 ldr.w r4, [r8, #4]
  24463. 800a736: 6863 ldr r3, [r4, #4]
  24464. if (iprh->start == 0) {
  24465. 800a738: 889a ldrh r2, [r3, #4]
  24466. 800a73a: b152 cbz r2, 800a752 <ip_reass_free_complete_datagram+0x46>
  24467. u16_t pbufs_freed = 0;
  24468. 800a73c: 2600 movs r6, #0
  24469. p = ipr->p;
  24470. 800a73e: f8d8 5004 ldr.w r5, [r8, #4]
  24471. while (p != NULL) {
  24472. 800a742: e02b b.n 800a79c <ip_reass_free_complete_datagram+0x90>
  24473. LWIP_ASSERT("prev != ipr", prev != ipr);
  24474. 800a744: 4b29 ldr r3, [pc, #164] @ (800a7ec <ip_reass_free_complete_datagram+0xe0>)
  24475. 800a746: 22ab movs r2, #171 @ 0xab
  24476. 800a748: 492b ldr r1, [pc, #172] @ (800a7f8 <ip_reass_free_complete_datagram+0xec>)
  24477. 800a74a: 482a ldr r0, [pc, #168] @ (800a7f4 <ip_reass_free_complete_datagram+0xe8>)
  24478. 800a74c: f008 fe5c bl 8013408 <iprintf>
  24479. 800a750: e7e2 b.n 800a718 <ip_reass_free_complete_datagram+0xc>
  24480. ipr->p = iprh->next_pbuf;
  24481. 800a752: 681b ldr r3, [r3, #0]
  24482. 800a754: f8c8 3004 str.w r3, [r8, #4]
  24483. SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN);
  24484. 800a758: 6863 ldr r3, [r4, #4]
  24485. 800a75a: f8d8 2008 ldr.w r2, [r8, #8]
  24486. 800a75e: f8d8 500c ldr.w r5, [r8, #12]
  24487. 800a762: f8d8 0010 ldr.w r0, [r8, #16]
  24488. 800a766: f8d8 1014 ldr.w r1, [r8, #20]
  24489. 800a76a: 601a str r2, [r3, #0]
  24490. 800a76c: 605d str r5, [r3, #4]
  24491. 800a76e: 6098 str r0, [r3, #8]
  24492. 800a770: 60d9 str r1, [r3, #12]
  24493. 800a772: f8d8 2018 ldr.w r2, [r8, #24]
  24494. 800a776: 611a str r2, [r3, #16]
  24495. icmp_time_exceeded(p, ICMP_TE_FRAG);
  24496. 800a778: 2101 movs r1, #1
  24497. 800a77a: 4620 mov r0, r4
  24498. 800a77c: f7ff fc34 bl 8009fe8 <icmp_time_exceeded>
  24499. clen = pbuf_clen(p);
  24500. 800a780: 4620 mov r0, r4
  24501. 800a782: f001 fc92 bl 800c0aa <pbuf_clen>
  24502. 800a786: 4606 mov r6, r0
  24503. pbuf_free(p);
  24504. 800a788: 4620 mov r0, r4
  24505. 800a78a: f001 fb09 bl 800bda0 <pbuf_free>
  24506. 800a78e: e7d6 b.n 800a73e <ip_reass_free_complete_datagram+0x32>
  24507. pbufs_freed = (u16_t)(pbufs_freed + clen);
  24508. 800a790: 4434 add r4, r6
  24509. 800a792: b2a6 uxth r6, r4
  24510. pbuf_free(pcur);
  24511. 800a794: 4628 mov r0, r5
  24512. 800a796: f001 fb03 bl 800bda0 <pbuf_free>
  24513. p = iprh->next_pbuf;
  24514. 800a79a: 463d mov r5, r7
  24515. while (p != NULL) {
  24516. 800a79c: b185 cbz r5, 800a7c0 <ip_reass_free_complete_datagram+0xb4>
  24517. iprh = (struct ip_reass_helper *)p->payload;
  24518. 800a79e: 686b ldr r3, [r5, #4]
  24519. p = iprh->next_pbuf;
  24520. 800a7a0: 681f ldr r7, [r3, #0]
  24521. clen = pbuf_clen(pcur);
  24522. 800a7a2: 4628 mov r0, r5
  24523. 800a7a4: f001 fc81 bl 800c0aa <pbuf_clen>
  24524. 800a7a8: 4604 mov r4, r0
  24525. LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff);
  24526. 800a7aa: 1833 adds r3, r6, r0
  24527. 800a7ac: f5b3 3f80 cmp.w r3, #65536 @ 0x10000
  24528. 800a7b0: dbee blt.n 800a790 <ip_reass_free_complete_datagram+0x84>
  24529. 800a7b2: 4b0e ldr r3, [pc, #56] @ (800a7ec <ip_reass_free_complete_datagram+0xe0>)
  24530. 800a7b4: 22cc movs r2, #204 @ 0xcc
  24531. 800a7b6: 4911 ldr r1, [pc, #68] @ (800a7fc <ip_reass_free_complete_datagram+0xf0>)
  24532. 800a7b8: 480e ldr r0, [pc, #56] @ (800a7f4 <ip_reass_free_complete_datagram+0xe8>)
  24533. 800a7ba: f008 fe25 bl 8013408 <iprintf>
  24534. 800a7be: e7e7 b.n 800a790 <ip_reass_free_complete_datagram+0x84>
  24535. ip_reass_dequeue_datagram(ipr, prev);
  24536. 800a7c0: 4649 mov r1, r9
  24537. 800a7c2: 4640 mov r0, r8
  24538. 800a7c4: f7ff ff7e bl 800a6c4 <ip_reass_dequeue_datagram>
  24539. LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
  24540. 800a7c8: 4b0d ldr r3, [pc, #52] @ (800a800 <ip_reass_free_complete_datagram+0xf4>)
  24541. 800a7ca: 881b ldrh r3, [r3, #0]
  24542. 800a7cc: 42b3 cmp r3, r6
  24543. 800a7ce: d306 bcc.n 800a7de <ip_reass_free_complete_datagram+0xd2>
  24544. ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed);
  24545. 800a7d0: 4a0b ldr r2, [pc, #44] @ (800a800 <ip_reass_free_complete_datagram+0xf4>)
  24546. 800a7d2: 8813 ldrh r3, [r2, #0]
  24547. 800a7d4: 1b9b subs r3, r3, r6
  24548. 800a7d6: 8013 strh r3, [r2, #0]
  24549. }
  24550. 800a7d8: 4630 mov r0, r6
  24551. 800a7da: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  24552. LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
  24553. 800a7de: 4b03 ldr r3, [pc, #12] @ (800a7ec <ip_reass_free_complete_datagram+0xe0>)
  24554. 800a7e0: 22d2 movs r2, #210 @ 0xd2
  24555. 800a7e2: 4908 ldr r1, [pc, #32] @ (800a804 <ip_reass_free_complete_datagram+0xf8>)
  24556. 800a7e4: 4803 ldr r0, [pc, #12] @ (800a7f4 <ip_reass_free_complete_datagram+0xe8>)
  24557. 800a7e6: f008 fe0f bl 8013408 <iprintf>
  24558. 800a7ea: e7f1 b.n 800a7d0 <ip_reass_free_complete_datagram+0xc4>
  24559. 800a7ec: 080156dc .word 0x080156dc
  24560. 800a7f0: 0801576c .word 0x0801576c
  24561. 800a7f4: 080144e8 .word 0x080144e8
  24562. 800a7f8: 08015760 .word 0x08015760
  24563. 800a7fc: 08015780 .word 0x08015780
  24564. 800a800: 24013048 .word 0x24013048
  24565. 800a804: 080157a0 .word 0x080157a0
  24566. 0800a808 <ip_reass_remove_oldest_datagram>:
  24567. {
  24568. 800a808: b5f8 push {r3, r4, r5, r6, r7, lr}
  24569. 800a80a: 4605 mov r5, r0
  24570. 800a80c: 460f mov r7, r1
  24571. int pbufs_freed = 0, pbufs_freed_current;
  24572. 800a80e: 2600 movs r6, #0
  24573. 800a810: e02e b.n 800a870 <ip_reass_remove_oldest_datagram+0x68>
  24574. if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
  24575. 800a812: 699a ldr r2, [r3, #24]
  24576. 800a814: f8d5 e010 ldr.w lr, [r5, #16]
  24577. 800a818: 4572 cmp r2, lr
  24578. 800a81a: d111 bne.n 800a840 <ip_reass_remove_oldest_datagram+0x38>
  24579. 800a81c: f8b3 e00c ldrh.w lr, [r3, #12]
  24580. 800a820: 88aa ldrh r2, [r5, #4]
  24581. 800a822: 4596 cmp lr, r2
  24582. 800a824: d10c bne.n 800a840 <ip_reass_remove_oldest_datagram+0x38>
  24583. 800a826: e001 b.n 800a82c <ip_reass_remove_oldest_datagram+0x24>
  24584. oldest_prev = prev;
  24585. 800a828: 4661 mov r1, ip
  24586. oldest = r;
  24587. 800a82a: 4618 mov r0, r3
  24588. if (r->next != NULL) {
  24589. 800a82c: 681a ldr r2, [r3, #0]
  24590. 800a82e: b192 cbz r2, 800a856 <ip_reass_remove_oldest_datagram+0x4e>
  24591. 800a830: 469c mov ip, r3
  24592. 800a832: 4613 mov r3, r2
  24593. while (r != NULL) {
  24594. 800a834: b18b cbz r3, 800a85a <ip_reass_remove_oldest_datagram+0x52>
  24595. if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) {
  24596. 800a836: 695a ldr r2, [r3, #20]
  24597. 800a838: f8d5 e00c ldr.w lr, [r5, #12]
  24598. 800a83c: 4572 cmp r2, lr
  24599. 800a83e: d0e8 beq.n 800a812 <ip_reass_remove_oldest_datagram+0xa>
  24600. other_datagrams++;
  24601. 800a840: 3401 adds r4, #1
  24602. if (oldest == NULL) {
  24603. 800a842: 2800 cmp r0, #0
  24604. 800a844: d0f0 beq.n 800a828 <ip_reass_remove_oldest_datagram+0x20>
  24605. } else if (r->timer <= oldest->timer) {
  24606. 800a846: f893 e01f ldrb.w lr, [r3, #31]
  24607. 800a84a: 7fc2 ldrb r2, [r0, #31]
  24608. 800a84c: 4596 cmp lr, r2
  24609. 800a84e: d8ed bhi.n 800a82c <ip_reass_remove_oldest_datagram+0x24>
  24610. oldest_prev = prev;
  24611. 800a850: 4661 mov r1, ip
  24612. oldest = r;
  24613. 800a852: 4618 mov r0, r3
  24614. 800a854: e7ea b.n 800a82c <ip_reass_remove_oldest_datagram+0x24>
  24615. if (r->next != NULL) {
  24616. 800a856: 4663 mov r3, ip
  24617. 800a858: e7ea b.n 800a830 <ip_reass_remove_oldest_datagram+0x28>
  24618. if (oldest != NULL) {
  24619. 800a85a: b110 cbz r0, 800a862 <ip_reass_remove_oldest_datagram+0x5a>
  24620. pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev);
  24621. 800a85c: f7ff ff56 bl 800a70c <ip_reass_free_complete_datagram>
  24622. pbufs_freed += pbufs_freed_current;
  24623. 800a860: 4406 add r6, r0
  24624. } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1));
  24625. 800a862: 2c01 cmp r4, #1
  24626. 800a864: bfd4 ite le
  24627. 800a866: 2400 movle r4, #0
  24628. 800a868: 2401 movgt r4, #1
  24629. 800a86a: 42be cmp r6, r7
  24630. 800a86c: da07 bge.n 800a87e <ip_reass_remove_oldest_datagram+0x76>
  24631. 800a86e: b134 cbz r4, 800a87e <ip_reass_remove_oldest_datagram+0x76>
  24632. r = reassdatagrams;
  24633. 800a870: 4b04 ldr r3, [pc, #16] @ (800a884 <ip_reass_remove_oldest_datagram+0x7c>)
  24634. 800a872: 681b ldr r3, [r3, #0]
  24635. other_datagrams = 0;
  24636. 800a874: 2400 movs r4, #0
  24637. oldest_prev = NULL;
  24638. 800a876: 4621 mov r1, r4
  24639. prev = NULL;
  24640. 800a878: 46a4 mov ip, r4
  24641. oldest = NULL;
  24642. 800a87a: 4620 mov r0, r4
  24643. while (r != NULL) {
  24644. 800a87c: e7da b.n 800a834 <ip_reass_remove_oldest_datagram+0x2c>
  24645. }
  24646. 800a87e: 4630 mov r0, r6
  24647. 800a880: bdf8 pop {r3, r4, r5, r6, r7, pc}
  24648. 800a882: bf00 nop
  24649. 800a884: 2401304c .word 0x2401304c
  24650. 0800a888 <ip_frag_free_pbuf_custom_ref>:
  24651. }
  24652. /** Free a struct pbuf_custom_ref */
  24653. static void
  24654. ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p)
  24655. {
  24656. 800a888: b510 push {r4, lr}
  24657. LWIP_ASSERT("p != NULL", p != NULL);
  24658. 800a88a: 4604 mov r4, r0
  24659. 800a88c: b120 cbz r0, 800a898 <ip_frag_free_pbuf_custom_ref+0x10>
  24660. memp_free(MEMP_FRAG_PBUF, p);
  24661. 800a88e: 4621 mov r1, r4
  24662. 800a890: 2005 movs r0, #5
  24663. 800a892: f000 feed bl 800b670 <memp_free>
  24664. }
  24665. 800a896: bd10 pop {r4, pc}
  24666. LWIP_ASSERT("p != NULL", p != NULL);
  24667. 800a898: 4b03 ldr r3, [pc, #12] @ (800a8a8 <ip_frag_free_pbuf_custom_ref+0x20>)
  24668. 800a89a: f44f 7231 mov.w r2, #708 @ 0x2c4
  24669. 800a89e: 4903 ldr r1, [pc, #12] @ (800a8ac <ip_frag_free_pbuf_custom_ref+0x24>)
  24670. 800a8a0: 4803 ldr r0, [pc, #12] @ (800a8b0 <ip_frag_free_pbuf_custom_ref+0x28>)
  24671. 800a8a2: f008 fdb1 bl 8013408 <iprintf>
  24672. 800a8a6: e7f2 b.n 800a88e <ip_frag_free_pbuf_custom_ref+0x6>
  24673. 800a8a8: 080156dc .word 0x080156dc
  24674. 800a8ac: 08014fc0 .word 0x08014fc0
  24675. 800a8b0: 080144e8 .word 0x080144e8
  24676. 0800a8b4 <ipfrag_free_pbuf_custom>:
  24677. /** Free-callback function to free a 'struct pbuf_custom_ref', called by
  24678. * pbuf_free. */
  24679. static void
  24680. ipfrag_free_pbuf_custom(struct pbuf *p)
  24681. {
  24682. 800a8b4: b510 push {r4, lr}
  24683. struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p;
  24684. LWIP_ASSERT("pcr != NULL", pcr != NULL);
  24685. 800a8b6: 4604 mov r4, r0
  24686. 800a8b8: b138 cbz r0, 800a8ca <ipfrag_free_pbuf_custom+0x16>
  24687. LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p);
  24688. if (pcr->original != NULL) {
  24689. 800a8ba: 6960 ldr r0, [r4, #20]
  24690. 800a8bc: b108 cbz r0, 800a8c2 <ipfrag_free_pbuf_custom+0xe>
  24691. pbuf_free(pcr->original);
  24692. 800a8be: f001 fa6f bl 800bda0 <pbuf_free>
  24693. }
  24694. ip_frag_free_pbuf_custom_ref(pcr);
  24695. 800a8c2: 4620 mov r0, r4
  24696. 800a8c4: f7ff ffe0 bl 800a888 <ip_frag_free_pbuf_custom_ref>
  24697. }
  24698. 800a8c8: bd10 pop {r4, pc}
  24699. LWIP_ASSERT("pcr != NULL", pcr != NULL);
  24700. 800a8ca: 4b04 ldr r3, [pc, #16] @ (800a8dc <ipfrag_free_pbuf_custom+0x28>)
  24701. 800a8cc: f240 22ce movw r2, #718 @ 0x2ce
  24702. 800a8d0: 4903 ldr r1, [pc, #12] @ (800a8e0 <ipfrag_free_pbuf_custom+0x2c>)
  24703. 800a8d2: 4804 ldr r0, [pc, #16] @ (800a8e4 <ipfrag_free_pbuf_custom+0x30>)
  24704. 800a8d4: f008 fd98 bl 8013408 <iprintf>
  24705. 800a8d8: e7ef b.n 800a8ba <ipfrag_free_pbuf_custom+0x6>
  24706. 800a8da: bf00 nop
  24707. 800a8dc: 080156dc .word 0x080156dc
  24708. 800a8e0: 080157c4 .word 0x080157c4
  24709. 800a8e4: 080144e8 .word 0x080144e8
  24710. 0800a8e8 <ip_reass_chain_frag_into_datagram_and_validate>:
  24711. {
  24712. 800a8e8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  24713. 800a8ec: 4680 mov r8, r0
  24714. 800a8ee: 460d mov r5, r1
  24715. 800a8f0: 4691 mov r9, r2
  24716. fraghdr = (struct ip_hdr *)new_p->payload;
  24717. 800a8f2: 684c ldr r4, [r1, #4]
  24718. len = lwip_ntohs(IPH_LEN(fraghdr));
  24719. 800a8f4: 8860 ldrh r0, [r4, #2]
  24720. 800a8f6: f7fd fac1 bl 8007e7c <lwip_htons>
  24721. hlen = IPH_HL_BYTES(fraghdr);
  24722. 800a8fa: 7823 ldrb r3, [r4, #0]
  24723. 800a8fc: f003 030f and.w r3, r3, #15
  24724. if (hlen > len) {
  24725. 800a900: ebb0 0f83 cmp.w r0, r3, lsl #2
  24726. 800a904: d203 bcs.n 800a90e <ip_reass_chain_frag_into_datagram_and_validate+0x26>
  24727. return IP_REASS_VALIDATE_PBUF_DROPPED;
  24728. 800a906: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  24729. }
  24730. 800a90a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  24731. 800a90e: 009a lsls r2, r3, #2
  24732. len = (u16_t)(len - hlen);
  24733. 800a910: 1a80 subs r0, r0, r2
  24734. 800a912: b287 uxth r7, r0
  24735. offset = IPH_OFFSET_BYTES(fraghdr);
  24736. 800a914: 88e0 ldrh r0, [r4, #6]
  24737. 800a916: f7fd fab1 bl 8007e7c <lwip_htons>
  24738. 800a91a: f3c0 0c0c ubfx ip, r0, #0, #13
  24739. 800a91e: ea4f 0ccc mov.w ip, ip, lsl #3
  24740. iprh = (struct ip_reass_helper *)new_p->payload;
  24741. 800a922: 686e ldr r6, [r5, #4]
  24742. iprh->next_pbuf = NULL;
  24743. 800a924: 2300 movs r3, #0
  24744. 800a926: 7033 strb r3, [r6, #0]
  24745. 800a928: 7073 strb r3, [r6, #1]
  24746. 800a92a: 70b3 strb r3, [r6, #2]
  24747. 800a92c: 70f3 strb r3, [r6, #3]
  24748. iprh->start = offset;
  24749. 800a92e: f8a6 c004 strh.w ip, [r6, #4]
  24750. iprh->end = (u16_t)(offset + len);
  24751. 800a932: eb07 000c add.w r0, r7, ip
  24752. 800a936: fa1f fe80 uxth.w lr, r0
  24753. 800a93a: 80f0 strh r0, [r6, #6]
  24754. if (iprh->end < offset) {
  24755. 800a93c: 45e6 cmp lr, ip
  24756. 800a93e: f0c0 8085 bcc.w 800aa4c <ip_reass_chain_frag_into_datagram_and_validate+0x164>
  24757. for (q = ipr->p; q != NULL;) {
  24758. 800a942: f8d8 1004 ldr.w r1, [r8, #4]
  24759. int valid = 1;
  24760. 800a946: 2701 movs r7, #1
  24761. struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL;
  24762. 800a948: 461c mov r4, r3
  24763. for (q = ipr->p; q != NULL;) {
  24764. 800a94a: e01f b.n 800a98c <ip_reass_chain_frag_into_datagram_and_validate+0xa4>
  24765. iprh->next_pbuf = q;
  24766. 800a94c: 6031 str r1, [r6, #0]
  24767. if (iprh_prev != NULL) {
  24768. 800a94e: b1ac cbz r4, 800a97c <ip_reass_chain_frag_into_datagram_and_validate+0x94>
  24769. if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) {
  24770. 800a950: 88e2 ldrh r2, [r4, #6]
  24771. 800a952: 4562 cmp r2, ip
  24772. 800a954: d87d bhi.n 800aa52 <ip_reass_chain_frag_into_datagram_and_validate+0x16a>
  24773. 800a956: 889b ldrh r3, [r3, #4]
  24774. 800a958: 459e cmp lr, r3
  24775. 800a95a: d87d bhi.n 800aa58 <ip_reass_chain_frag_into_datagram_and_validate+0x170>
  24776. iprh_prev->next_pbuf = new_p;
  24777. 800a95c: 6025 str r5, [r4, #0]
  24778. if (iprh_prev->end != iprh->start) {
  24779. 800a95e: 88b3 ldrh r3, [r6, #4]
  24780. 800a960: 429a cmp r2, r3
  24781. 800a962: d000 beq.n 800a966 <ip_reass_chain_frag_into_datagram_and_validate+0x7e>
  24782. valid = 0;
  24783. 800a964: 2700 movs r7, #0
  24784. if (q == NULL) {
  24785. 800a966: b319 cbz r1, 800a9b0 <ip_reass_chain_frag_into_datagram_and_validate+0xc8>
  24786. if (is_last || ((ipr->flags & IP_REASS_FLAG_LASTFRAG) != 0)) {
  24787. 800a968: f1b9 0f00 cmp.w r9, #0
  24788. 800a96c: d141 bne.n 800a9f2 <ip_reass_chain_frag_into_datagram_and_validate+0x10a>
  24789. 800a96e: f898 301e ldrb.w r3, [r8, #30]
  24790. 800a972: f013 0f01 tst.w r3, #1
  24791. 800a976: d13c bne.n 800a9f2 <ip_reass_chain_frag_into_datagram_and_validate+0x10a>
  24792. return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */
  24793. 800a978: 4648 mov r0, r9
  24794. 800a97a: e7c6 b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
  24795. if (iprh->end > iprh_tmp->start) {
  24796. 800a97c: 889b ldrh r3, [r3, #4]
  24797. 800a97e: 459e cmp lr, r3
  24798. 800a980: d86d bhi.n 800aa5e <ip_reass_chain_frag_into_datagram_and_validate+0x176>
  24799. ipr->p = new_p;
  24800. 800a982: f8c8 5004 str.w r5, [r8, #4]
  24801. 800a986: e7ee b.n 800a966 <ip_reass_chain_frag_into_datagram_and_validate+0x7e>
  24802. q = iprh_tmp->next_pbuf;
  24803. 800a988: 6819 ldr r1, [r3, #0]
  24804. iprh_prev = iprh_tmp;
  24805. 800a98a: 461c mov r4, r3
  24806. for (q = ipr->p; q != NULL;) {
  24807. 800a98c: 2900 cmp r1, #0
  24808. 800a98e: d0ea beq.n 800a966 <ip_reass_chain_frag_into_datagram_and_validate+0x7e>
  24809. iprh_tmp = (struct ip_reass_helper *)q->payload;
  24810. 800a990: 684b ldr r3, [r1, #4]
  24811. if (iprh->start < iprh_tmp->start) {
  24812. 800a992: 889a ldrh r2, [r3, #4]
  24813. 800a994: 4562 cmp r2, ip
  24814. 800a996: d8d9 bhi.n 800a94c <ip_reass_chain_frag_into_datagram_and_validate+0x64>
  24815. } else if (iprh->start == iprh_tmp->start) {
  24816. 800a998: 4562 cmp r2, ip
  24817. 800a99a: d063 beq.n 800aa64 <ip_reass_chain_frag_into_datagram_and_validate+0x17c>
  24818. } else if (iprh->start < iprh_tmp->end) {
  24819. 800a99c: 88d9 ldrh r1, [r3, #6]
  24820. 800a99e: 4561 cmp r1, ip
  24821. 800a9a0: d863 bhi.n 800aa6a <ip_reass_chain_frag_into_datagram_and_validate+0x182>
  24822. if (iprh_prev != NULL) {
  24823. 800a9a2: 2c00 cmp r4, #0
  24824. 800a9a4: d0f0 beq.n 800a988 <ip_reass_chain_frag_into_datagram_and_validate+0xa0>
  24825. if (iprh_prev->end != iprh_tmp->start) {
  24826. 800a9a6: 88e1 ldrh r1, [r4, #6]
  24827. 800a9a8: 428a cmp r2, r1
  24828. 800a9aa: d0ed beq.n 800a988 <ip_reass_chain_frag_into_datagram_and_validate+0xa0>
  24829. valid = 0;
  24830. 800a9ac: 2700 movs r7, #0
  24831. 800a9ae: e7eb b.n 800a988 <ip_reass_chain_frag_into_datagram_and_validate+0xa0>
  24832. if (iprh_prev != NULL) {
  24833. 800a9b0: b194 cbz r4, 800a9d8 <ip_reass_chain_frag_into_datagram_and_validate+0xf0>
  24834. LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start);
  24835. 800a9b2: 88e2 ldrh r2, [r4, #6]
  24836. 800a9b4: 88b3 ldrh r3, [r6, #4]
  24837. 800a9b6: 429a cmp r2, r3
  24838. 800a9b8: d806 bhi.n 800a9c8 <ip_reass_chain_frag_into_datagram_and_validate+0xe0>
  24839. iprh_prev->next_pbuf = new_p;
  24840. 800a9ba: 6025 str r5, [r4, #0]
  24841. if (iprh_prev->end != iprh->start) {
  24842. 800a9bc: 88e2 ldrh r2, [r4, #6]
  24843. 800a9be: 88b3 ldrh r3, [r6, #4]
  24844. 800a9c0: 429a cmp r2, r3
  24845. 800a9c2: d0d1 beq.n 800a968 <ip_reass_chain_frag_into_datagram_and_validate+0x80>
  24846. valid = 0;
  24847. 800a9c4: 2700 movs r7, #0
  24848. 800a9c6: e7cf b.n 800a968 <ip_reass_chain_frag_into_datagram_and_validate+0x80>
  24849. LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start);
  24850. 800a9c8: 4b29 ldr r3, [pc, #164] @ (800aa70 <ip_reass_chain_frag_into_datagram_and_validate+0x188>)
  24851. 800a9ca: f44f 72db mov.w r2, #438 @ 0x1b6
  24852. 800a9ce: 4929 ldr r1, [pc, #164] @ (800aa74 <ip_reass_chain_frag_into_datagram_and_validate+0x18c>)
  24853. 800a9d0: 4829 ldr r0, [pc, #164] @ (800aa78 <ip_reass_chain_frag_into_datagram_and_validate+0x190>)
  24854. 800a9d2: f008 fd19 bl 8013408 <iprintf>
  24855. 800a9d6: e7f0 b.n 800a9ba <ip_reass_chain_frag_into_datagram_and_validate+0xd2>
  24856. LWIP_ASSERT("no previous fragment, this must be the first fragment!",
  24857. 800a9d8: f8d8 3004 ldr.w r3, [r8, #4]
  24858. 800a9dc: b133 cbz r3, 800a9ec <ip_reass_chain_frag_into_datagram_and_validate+0x104>
  24859. 800a9de: 4b24 ldr r3, [pc, #144] @ (800aa70 <ip_reass_chain_frag_into_datagram_and_validate+0x188>)
  24860. 800a9e0: f44f 72df mov.w r2, #446 @ 0x1be
  24861. 800a9e4: 4925 ldr r1, [pc, #148] @ (800aa7c <ip_reass_chain_frag_into_datagram_and_validate+0x194>)
  24862. 800a9e6: 4824 ldr r0, [pc, #144] @ (800aa78 <ip_reass_chain_frag_into_datagram_and_validate+0x190>)
  24863. 800a9e8: f008 fd0e bl 8013408 <iprintf>
  24864. ipr->p = new_p;
  24865. 800a9ec: f8c8 5004 str.w r5, [r8, #4]
  24866. 800a9f0: e7ba b.n 800a968 <ip_reass_chain_frag_into_datagram_and_validate+0x80>
  24867. if (valid) {
  24868. 800a9f2: b34f cbz r7, 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
  24869. if ((ipr->p == NULL) || (((struct ip_reass_helper *)ipr->p->payload)->start != 0)) {
  24870. 800a9f4: f8d8 3004 ldr.w r3, [r8, #4]
  24871. 800a9f8: b31b cbz r3, 800aa42 <ip_reass_chain_frag_into_datagram_and_validate+0x15a>
  24872. 800a9fa: 6858 ldr r0, [r3, #4]
  24873. 800a9fc: 8883 ldrh r3, [r0, #4]
  24874. 800a9fe: bb13 cbnz r3, 800aa46 <ip_reass_chain_frag_into_datagram_and_validate+0x15e>
  24875. q = iprh->next_pbuf;
  24876. 800aa00: 6832 ldr r2, [r6, #0]
  24877. while (q != NULL) {
  24878. 800aa02: b14a cbz r2, 800aa18 <ip_reass_chain_frag_into_datagram_and_validate+0x130>
  24879. iprh = (struct ip_reass_helper *)q->payload;
  24880. 800aa04: 6853 ldr r3, [r2, #4]
  24881. if (iprh_prev->end != iprh->start) {
  24882. 800aa06: 88f1 ldrh r1, [r6, #6]
  24883. 800aa08: 889a ldrh r2, [r3, #4]
  24884. 800aa0a: 4291 cmp r1, r2
  24885. 800aa0c: d102 bne.n 800aa14 <ip_reass_chain_frag_into_datagram_and_validate+0x12c>
  24886. q = iprh->next_pbuf;
  24887. 800aa0e: 681a ldr r2, [r3, #0]
  24888. iprh = (struct ip_reass_helper *)q->payload;
  24889. 800aa10: 461e mov r6, r3
  24890. 800aa12: e7f6 b.n 800aa02 <ip_reass_chain_frag_into_datagram_and_validate+0x11a>
  24891. 800aa14: 461e mov r6, r3
  24892. valid = 0;
  24893. 800aa16: 2700 movs r7, #0
  24894. if (valid) {
  24895. 800aa18: b1b7 cbz r7, 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
  24896. LWIP_ASSERT("sanity check",
  24897. 800aa1a: 42b0 cmp r0, r6
  24898. 800aa1c: d009 beq.n 800aa32 <ip_reass_chain_frag_into_datagram_and_validate+0x14a>
  24899. LWIP_ASSERT("validate_datagram:next_pbuf!=NULL",
  24900. 800aa1e: 6833 ldr r3, [r6, #0]
  24901. 800aa20: b193 cbz r3, 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
  24902. 800aa22: 4b13 ldr r3, [pc, #76] @ (800aa70 <ip_reass_chain_frag_into_datagram_and_validate+0x188>)
  24903. 800aa24: f44f 72f1 mov.w r2, #482 @ 0x1e2
  24904. 800aa28: 4915 ldr r1, [pc, #84] @ (800aa80 <ip_reass_chain_frag_into_datagram_and_validate+0x198>)
  24905. 800aa2a: 4813 ldr r0, [pc, #76] @ (800aa78 <ip_reass_chain_frag_into_datagram_and_validate+0x190>)
  24906. 800aa2c: f008 fcec bl 8013408 <iprintf>
  24907. 800aa30: e00a b.n 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
  24908. LWIP_ASSERT("sanity check",
  24909. 800aa32: 4b0f ldr r3, [pc, #60] @ (800aa70 <ip_reass_chain_frag_into_datagram_and_validate+0x188>)
  24910. 800aa34: f44f 72f0 mov.w r2, #480 @ 0x1e0
  24911. 800aa38: 4912 ldr r1, [pc, #72] @ (800aa84 <ip_reass_chain_frag_into_datagram_and_validate+0x19c>)
  24912. 800aa3a: 480f ldr r0, [pc, #60] @ (800aa78 <ip_reass_chain_frag_into_datagram_and_validate+0x190>)
  24913. 800aa3c: f008 fce4 bl 8013408 <iprintf>
  24914. 800aa40: e7ed b.n 800aa1e <ip_reass_chain_frag_into_datagram_and_validate+0x136>
  24915. valid = 0;
  24916. 800aa42: 2700 movs r7, #0
  24917. 800aa44: e000 b.n 800aa48 <ip_reass_chain_frag_into_datagram_and_validate+0x160>
  24918. 800aa46: 2700 movs r7, #0
  24919. return valid ? IP_REASS_VALIDATE_TELEGRAM_FINISHED : IP_REASS_VALIDATE_PBUF_QUEUED;
  24920. 800aa48: 4638 mov r0, r7
  24921. 800aa4a: e75e b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
  24922. return IP_REASS_VALIDATE_PBUF_DROPPED;
  24923. 800aa4c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  24924. 800aa50: e75b b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
  24925. return IP_REASS_VALIDATE_PBUF_DROPPED;
  24926. 800aa52: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  24927. 800aa56: e758 b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
  24928. 800aa58: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  24929. 800aa5c: e755 b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
  24930. return IP_REASS_VALIDATE_PBUF_DROPPED;
  24931. 800aa5e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  24932. 800aa62: e752 b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
  24933. return IP_REASS_VALIDATE_PBUF_DROPPED;
  24934. 800aa64: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  24935. 800aa68: e74f b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
  24936. return IP_REASS_VALIDATE_PBUF_DROPPED;
  24937. 800aa6a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  24938. 800aa6e: e74c b.n 800a90a <ip_reass_chain_frag_into_datagram_and_validate+0x22>
  24939. 800aa70: 080156dc .word 0x080156dc
  24940. 800aa74: 080157d0 .word 0x080157d0
  24941. 800aa78: 080144e8 .word 0x080144e8
  24942. 800aa7c: 080157f0 .word 0x080157f0
  24943. 800aa80: 08015838 .word 0x08015838
  24944. 800aa84: 08015828 .word 0x08015828
  24945. 0800aa88 <ip_frag_alloc_pbuf_custom_ref>:
  24946. {
  24947. 800aa88: b508 push {r3, lr}
  24948. return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF);
  24949. 800aa8a: 2005 movs r0, #5
  24950. 800aa8c: f000 fdba bl 800b604 <memp_malloc>
  24951. }
  24952. 800aa90: bd08 pop {r3, pc}
  24953. ...
  24954. 0800aa94 <ip_reass_enqueue_new_datagram>:
  24955. {
  24956. 800aa94: b570 push {r4, r5, r6, lr}
  24957. 800aa96: 4605 mov r5, r0
  24958. 800aa98: 460e mov r6, r1
  24959. ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
  24960. 800aa9a: 2004 movs r0, #4
  24961. 800aa9c: f000 fdb2 bl 800b604 <memp_malloc>
  24962. if (ipr == NULL) {
  24963. 800aaa0: 4604 mov r4, r0
  24964. 800aaa2: b1b0 cbz r0, 800aad2 <ip_reass_enqueue_new_datagram+0x3e>
  24965. memset(ipr, 0, sizeof(struct ip_reassdata));
  24966. 800aaa4: 2220 movs r2, #32
  24967. 800aaa6: 2100 movs r1, #0
  24968. 800aaa8: 4620 mov r0, r4
  24969. 800aaaa: f008 fe05 bl 80136b8 <memset>
  24970. ipr->timer = IP_REASS_MAXAGE;
  24971. 800aaae: 230f movs r3, #15
  24972. 800aab0: 77e3 strb r3, [r4, #31]
  24973. ipr->next = reassdatagrams;
  24974. 800aab2: 4b0f ldr r3, [pc, #60] @ (800aaf0 <ip_reass_enqueue_new_datagram+0x5c>)
  24975. 800aab4: 681a ldr r2, [r3, #0]
  24976. 800aab6: 6022 str r2, [r4, #0]
  24977. reassdatagrams = ipr;
  24978. 800aab8: 601c str r4, [r3, #0]
  24979. SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN);
  24980. 800aaba: 682b ldr r3, [r5, #0]
  24981. 800aabc: 6868 ldr r0, [r5, #4]
  24982. 800aabe: 68a9 ldr r1, [r5, #8]
  24983. 800aac0: 68ea ldr r2, [r5, #12]
  24984. 800aac2: 60a3 str r3, [r4, #8]
  24985. 800aac4: 60e0 str r0, [r4, #12]
  24986. 800aac6: 6121 str r1, [r4, #16]
  24987. 800aac8: 6162 str r2, [r4, #20]
  24988. 800aaca: 692b ldr r3, [r5, #16]
  24989. 800aacc: 61a3 str r3, [r4, #24]
  24990. }
  24991. 800aace: 4620 mov r0, r4
  24992. 800aad0: bd70 pop {r4, r5, r6, pc}
  24993. if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) {
  24994. 800aad2: 4631 mov r1, r6
  24995. 800aad4: 4628 mov r0, r5
  24996. 800aad6: f7ff fe97 bl 800a808 <ip_reass_remove_oldest_datagram>
  24997. 800aada: 42b0 cmp r0, r6
  24998. 800aadc: da02 bge.n 800aae4 <ip_reass_enqueue_new_datagram+0x50>
  24999. if (ipr == NULL)
  25000. 800aade: 2c00 cmp r4, #0
  25001. 800aae0: d1e0 bne.n 800aaa4 <ip_reass_enqueue_new_datagram+0x10>
  25002. 800aae2: e7f4 b.n 800aace <ip_reass_enqueue_new_datagram+0x3a>
  25003. ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA);
  25004. 800aae4: 2004 movs r0, #4
  25005. 800aae6: f000 fd8d bl 800b604 <memp_malloc>
  25006. 800aaea: 4604 mov r4, r0
  25007. 800aaec: e7f7 b.n 800aade <ip_reass_enqueue_new_datagram+0x4a>
  25008. 800aaee: bf00 nop
  25009. 800aaf0: 2401304c .word 0x2401304c
  25010. 0800aaf4 <ip_reass_tmr>:
  25011. {
  25012. 800aaf4: b538 push {r3, r4, r5, lr}
  25013. r = reassdatagrams;
  25014. 800aaf6: 4b09 ldr r3, [pc, #36] @ (800ab1c <ip_reass_tmr+0x28>)
  25015. 800aaf8: 6818 ldr r0, [r3, #0]
  25016. struct ip_reassdata *r, *prev = NULL;
  25017. 800aafa: 2400 movs r4, #0
  25018. while (r != NULL) {
  25019. 800aafc: e003 b.n 800ab06 <ip_reass_tmr+0x12>
  25020. r->timer--;
  25021. 800aafe: 3b01 subs r3, #1
  25022. 800ab00: 77c3 strb r3, [r0, #31]
  25023. prev = r;
  25024. 800ab02: 4604 mov r4, r0
  25025. r = r->next;
  25026. 800ab04: 6800 ldr r0, [r0, #0]
  25027. while (r != NULL) {
  25028. 800ab06: b140 cbz r0, 800ab1a <ip_reass_tmr+0x26>
  25029. if (r->timer > 0) {
  25030. 800ab08: 7fc3 ldrb r3, [r0, #31]
  25031. 800ab0a: 2b00 cmp r3, #0
  25032. 800ab0c: d1f7 bne.n 800aafe <ip_reass_tmr+0xa>
  25033. r = r->next;
  25034. 800ab0e: 6805 ldr r5, [r0, #0]
  25035. ip_reass_free_complete_datagram(tmp, prev);
  25036. 800ab10: 4621 mov r1, r4
  25037. 800ab12: f7ff fdfb bl 800a70c <ip_reass_free_complete_datagram>
  25038. r = r->next;
  25039. 800ab16: 4628 mov r0, r5
  25040. 800ab18: e7f5 b.n 800ab06 <ip_reass_tmr+0x12>
  25041. }
  25042. 800ab1a: bd38 pop {r3, r4, r5, pc}
  25043. 800ab1c: 2401304c .word 0x2401304c
  25044. 0800ab20 <ip4_reass>:
  25045. {
  25046. 800ab20: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  25047. 800ab24: 4606 mov r6, r0
  25048. fraghdr = (struct ip_hdr *)p->payload;
  25049. 800ab26: 6845 ldr r5, [r0, #4]
  25050. if (IPH_HL_BYTES(fraghdr) != IP_HLEN) {
  25051. 800ab28: 782b ldrb r3, [r5, #0]
  25052. 800ab2a: f003 030f and.w r3, r3, #15
  25053. 800ab2e: 2b05 cmp r3, #5
  25054. 800ab30: f040 80d1 bne.w 800acd6 <ip4_reass+0x1b6>
  25055. offset = IPH_OFFSET_BYTES(fraghdr);
  25056. 800ab34: 88e8 ldrh r0, [r5, #6]
  25057. 800ab36: f7fd f9a1 bl 8007e7c <lwip_htons>
  25058. 800ab3a: f3c0 080c ubfx r8, r0, #0, #13
  25059. 800ab3e: ea4f 08c8 mov.w r8, r8, lsl #3
  25060. len = lwip_ntohs(IPH_LEN(fraghdr));
  25061. 800ab42: 8868 ldrh r0, [r5, #2]
  25062. 800ab44: f7fd f99a bl 8007e7c <lwip_htons>
  25063. hlen = IPH_HL_BYTES(fraghdr);
  25064. 800ab48: 782b ldrb r3, [r5, #0]
  25065. 800ab4a: f003 030f and.w r3, r3, #15
  25066. 800ab4e: 009a lsls r2, r3, #2
  25067. if (hlen > len) {
  25068. 800ab50: ebb0 0f83 cmp.w r0, r3, lsl #2
  25069. 800ab54: f0c0 80bf bcc.w 800acd6 <ip4_reass+0x1b6>
  25070. len = (u16_t)(len - hlen);
  25071. 800ab58: 1a80 subs r0, r0, r2
  25072. 800ab5a: b287 uxth r7, r0
  25073. clen = pbuf_clen(p);
  25074. 800ab5c: 4630 mov r0, r6
  25075. 800ab5e: f001 faa4 bl 800c0aa <pbuf_clen>
  25076. 800ab62: 4681 mov r9, r0
  25077. if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) {
  25078. 800ab64: 4b6b ldr r3, [pc, #428] @ (800ad14 <ip4_reass+0x1f4>)
  25079. 800ab66: 881b ldrh r3, [r3, #0]
  25080. 800ab68: 4403 add r3, r0
  25081. 800ab6a: 2b0a cmp r3, #10
  25082. 800ab6c: dc02 bgt.n 800ab74 <ip4_reass+0x54>
  25083. for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
  25084. 800ab6e: 4b6a ldr r3, [pc, #424] @ (800ad18 <ip4_reass+0x1f8>)
  25085. 800ab70: 681c ldr r4, [r3, #0]
  25086. 800ab72: e00d b.n 800ab90 <ip4_reass+0x70>
  25087. if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
  25088. 800ab74: 4601 mov r1, r0
  25089. 800ab76: 4628 mov r0, r5
  25090. 800ab78: f7ff fe46 bl 800a808 <ip_reass_remove_oldest_datagram>
  25091. 800ab7c: 2800 cmp r0, #0
  25092. 800ab7e: f000 80aa beq.w 800acd6 <ip4_reass+0x1b6>
  25093. ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS))
  25094. 800ab82: 4b64 ldr r3, [pc, #400] @ (800ad14 <ip4_reass+0x1f4>)
  25095. 800ab84: 881b ldrh r3, [r3, #0]
  25096. 800ab86: 444b add r3, r9
  25097. if (!ip_reass_remove_oldest_datagram(fraghdr, clen) ||
  25098. 800ab88: 2b0a cmp r3, #10
  25099. 800ab8a: ddf0 ble.n 800ab6e <ip4_reass+0x4e>
  25100. 800ab8c: e0a3 b.n 800acd6 <ip4_reass+0x1b6>
  25101. for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) {
  25102. 800ab8e: 6824 ldr r4, [r4, #0]
  25103. 800ab90: b15c cbz r4, 800abaa <ip4_reass+0x8a>
  25104. if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) {
  25105. 800ab92: 6962 ldr r2, [r4, #20]
  25106. 800ab94: 68eb ldr r3, [r5, #12]
  25107. 800ab96: 429a cmp r2, r3
  25108. 800ab98: d1f9 bne.n 800ab8e <ip4_reass+0x6e>
  25109. 800ab9a: 69a2 ldr r2, [r4, #24]
  25110. 800ab9c: 692b ldr r3, [r5, #16]
  25111. 800ab9e: 429a cmp r2, r3
  25112. 800aba0: d1f5 bne.n 800ab8e <ip4_reass+0x6e>
  25113. 800aba2: 89a2 ldrh r2, [r4, #12]
  25114. 800aba4: 88ab ldrh r3, [r5, #4]
  25115. 800aba6: 429a cmp r2, r3
  25116. 800aba8: d1f1 bne.n 800ab8e <ip4_reass+0x6e>
  25117. if (ipr == NULL) {
  25118. 800abaa: b374 cbz r4, 800ac0a <ip4_reass+0xea>
  25119. if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
  25120. 800abac: 88e8 ldrh r0, [r5, #6]
  25121. 800abae: f7fd f965 bl 8007e7c <lwip_htons>
  25122. 800abb2: f3c0 000c ubfx r0, r0, #0, #13
  25123. 800abb6: b380 cbz r0, 800ac1a <ip4_reass+0xfa>
  25124. is_last = (IPH_OFFSET(fraghdr) & PP_NTOHS(IP_MF)) == 0;
  25125. 800abb8: 88ed ldrh r5, [r5, #6]
  25126. 800abba: f005 0520 and.w r5, r5, #32
  25127. 800abbe: 2d00 cmp r5, #0
  25128. 800abc0: bf0c ite eq
  25129. 800abc2: 2201 moveq r2, #1
  25130. 800abc4: 2200 movne r2, #0
  25131. if (is_last) {
  25132. 800abc6: d108 bne.n 800abda <ip4_reass+0xba>
  25133. u16_t datagram_len = (u16_t)(offset + len);
  25134. 800abc8: eb08 0307 add.w r3, r8, r7
  25135. 800abcc: b29b uxth r3, r3
  25136. if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) {
  25137. 800abce: f64f 71eb movw r1, #65515 @ 0xffeb
  25138. 800abd2: 428b cmp r3, r1
  25139. 800abd4: bf98 it ls
  25140. 800abd6: 4598 cmpls r8, r3
  25141. 800abd8: d87a bhi.n 800acd0 <ip4_reass+0x1b0>
  25142. valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last);
  25143. 800abda: 4631 mov r1, r6
  25144. 800abdc: 4620 mov r0, r4
  25145. 800abde: f7ff fe83 bl 800a8e8 <ip_reass_chain_frag_into_datagram_and_validate>
  25146. if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) {
  25147. 800abe2: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
  25148. 800abe6: d073 beq.n 800acd0 <ip4_reass+0x1b0>
  25149. ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount + clen);
  25150. 800abe8: 4b4a ldr r3, [pc, #296] @ (800ad14 <ip4_reass+0x1f4>)
  25151. 800abea: 881a ldrh r2, [r3, #0]
  25152. 800abec: 4491 add r9, r2
  25153. 800abee: f8a3 9000 strh.w r9, [r3]
  25154. if (is_last) {
  25155. 800abf2: b935 cbnz r5, 800ac02 <ip4_reass+0xe2>
  25156. u16_t datagram_len = (u16_t)(offset + len);
  25157. 800abf4: 44b8 add r8, r7
  25158. ipr->datagram_len = datagram_len;
  25159. 800abf6: f8a4 801c strh.w r8, [r4, #28]
  25160. ipr->flags |= IP_REASS_FLAG_LASTFRAG;
  25161. 800abfa: 7fa3 ldrb r3, [r4, #30]
  25162. 800abfc: f043 0301 orr.w r3, r3, #1
  25163. 800ac00: 77a3 strb r3, [r4, #30]
  25164. if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) {
  25165. 800ac02: 2801 cmp r0, #1
  25166. 800ac04: d01b beq.n 800ac3e <ip4_reass+0x11e>
  25167. return NULL;
  25168. 800ac06: 2600 movs r6, #0
  25169. 800ac08: e069 b.n 800acde <ip4_reass+0x1be>
  25170. ipr = ip_reass_enqueue_new_datagram(fraghdr, clen);
  25171. 800ac0a: 4649 mov r1, r9
  25172. 800ac0c: 4628 mov r0, r5
  25173. 800ac0e: f7ff ff41 bl 800aa94 <ip_reass_enqueue_new_datagram>
  25174. if (ipr == NULL) {
  25175. 800ac12: 4604 mov r4, r0
  25176. 800ac14: 2800 cmp r0, #0
  25177. 800ac16: d1cf bne.n 800abb8 <ip4_reass+0x98>
  25178. 800ac18: e05d b.n 800acd6 <ip4_reass+0x1b6>
  25179. ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) {
  25180. 800ac1a: 89e0 ldrh r0, [r4, #14]
  25181. 800ac1c: f7fd f92e bl 8007e7c <lwip_htons>
  25182. if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) &&
  25183. 800ac20: f3c0 000c ubfx r0, r0, #0, #13
  25184. 800ac24: 2800 cmp r0, #0
  25185. 800ac26: d0c7 beq.n 800abb8 <ip4_reass+0x98>
  25186. SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN);
  25187. 800ac28: 682b ldr r3, [r5, #0]
  25188. 800ac2a: 6868 ldr r0, [r5, #4]
  25189. 800ac2c: 68a9 ldr r1, [r5, #8]
  25190. 800ac2e: 68ea ldr r2, [r5, #12]
  25191. 800ac30: 60a3 str r3, [r4, #8]
  25192. 800ac32: 60e0 str r0, [r4, #12]
  25193. 800ac34: 6121 str r1, [r4, #16]
  25194. 800ac36: 6162 str r2, [r4, #20]
  25195. 800ac38: 692b ldr r3, [r5, #16]
  25196. 800ac3a: 61a3 str r3, [r4, #24]
  25197. 800ac3c: e7bc b.n 800abb8 <ip4_reass+0x98>
  25198. u16_t datagram_len = (u16_t)(ipr->datagram_len + IP_HLEN);
  25199. 800ac3e: 8ba0 ldrh r0, [r4, #28]
  25200. 800ac40: 3014 adds r0, #20
  25201. r = ((struct ip_reass_helper *)ipr->p->payload)->next_pbuf;
  25202. 800ac42: 6863 ldr r3, [r4, #4]
  25203. 800ac44: 685e ldr r6, [r3, #4]
  25204. 800ac46: 6835 ldr r5, [r6, #0]
  25205. SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN);
  25206. 800ac48: 68a3 ldr r3, [r4, #8]
  25207. 800ac4a: 68e7 ldr r7, [r4, #12]
  25208. 800ac4c: 6921 ldr r1, [r4, #16]
  25209. 800ac4e: 6962 ldr r2, [r4, #20]
  25210. 800ac50: 6033 str r3, [r6, #0]
  25211. 800ac52: 6077 str r7, [r6, #4]
  25212. 800ac54: 60b1 str r1, [r6, #8]
  25213. 800ac56: 60f2 str r2, [r6, #12]
  25214. 800ac58: 69a3 ldr r3, [r4, #24]
  25215. 800ac5a: 6133 str r3, [r6, #16]
  25216. IPH_LEN_SET(fraghdr, lwip_htons(datagram_len));
  25217. 800ac5c: b280 uxth r0, r0
  25218. 800ac5e: f7fd f90d bl 8007e7c <lwip_htons>
  25219. 800ac62: 8070 strh r0, [r6, #2]
  25220. IPH_OFFSET_SET(fraghdr, 0);
  25221. 800ac64: 2300 movs r3, #0
  25222. 800ac66: 71b3 strb r3, [r6, #6]
  25223. 800ac68: 71f3 strb r3, [r6, #7]
  25224. IPH_CHKSUM_SET(fraghdr, 0);
  25225. 800ac6a: 72b3 strb r3, [r6, #10]
  25226. 800ac6c: 72f3 strb r3, [r6, #11]
  25227. p = ipr->p;
  25228. 800ac6e: 6866 ldr r6, [r4, #4]
  25229. while (r != NULL) {
  25230. 800ac70: e009 b.n 800ac86 <ip4_reass+0x166>
  25231. iprh = (struct ip_reass_helper *)r->payload;
  25232. 800ac72: 686f ldr r7, [r5, #4]
  25233. pbuf_remove_header(r, IP_HLEN);
  25234. 800ac74: 2114 movs r1, #20
  25235. 800ac76: 4628 mov r0, r5
  25236. 800ac78: f001 f84c bl 800bd14 <pbuf_remove_header>
  25237. pbuf_cat(p, r);
  25238. 800ac7c: 4629 mov r1, r5
  25239. 800ac7e: 4630 mov r0, r6
  25240. 800ac80: f001 fa38 bl 800c0f4 <pbuf_cat>
  25241. r = iprh->next_pbuf;
  25242. 800ac84: 683d ldr r5, [r7, #0]
  25243. while (r != NULL) {
  25244. 800ac86: 2d00 cmp r5, #0
  25245. 800ac88: d1f3 bne.n 800ac72 <ip4_reass+0x152>
  25246. if (ipr == reassdatagrams) {
  25247. 800ac8a: 4b23 ldr r3, [pc, #140] @ (800ad18 <ip4_reass+0x1f8>)
  25248. 800ac8c: 6819 ldr r1, [r3, #0]
  25249. 800ac8e: 428c cmp r4, r1
  25250. 800ac90: d005 beq.n 800ac9e <ip4_reass+0x17e>
  25251. for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
  25252. 800ac92: b129 cbz r1, 800aca0 <ip4_reass+0x180>
  25253. if (ipr_prev->next == ipr) {
  25254. 800ac94: 680b ldr r3, [r1, #0]
  25255. 800ac96: 429c cmp r4, r3
  25256. 800ac98: d002 beq.n 800aca0 <ip4_reass+0x180>
  25257. for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) {
  25258. 800ac9a: 4619 mov r1, r3
  25259. 800ac9c: e7f9 b.n 800ac92 <ip4_reass+0x172>
  25260. ipr_prev = NULL;
  25261. 800ac9e: 4629 mov r1, r5
  25262. ip_reass_dequeue_datagram(ipr, ipr_prev);
  25263. 800aca0: 4620 mov r0, r4
  25264. 800aca2: f7ff fd0f bl 800a6c4 <ip_reass_dequeue_datagram>
  25265. clen = pbuf_clen(p);
  25266. 800aca6: 4630 mov r0, r6
  25267. 800aca8: f001 f9ff bl 800c0aa <pbuf_clen>
  25268. 800acac: 4604 mov r4, r0
  25269. LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
  25270. 800acae: 4b19 ldr r3, [pc, #100] @ (800ad14 <ip4_reass+0x1f4>)
  25271. 800acb0: 881b ldrh r3, [r3, #0]
  25272. 800acb2: 4283 cmp r3, r0
  25273. 800acb4: d304 bcc.n 800acc0 <ip4_reass+0x1a0>
  25274. ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen);
  25275. 800acb6: 4a17 ldr r2, [pc, #92] @ (800ad14 <ip4_reass+0x1f4>)
  25276. 800acb8: 8813 ldrh r3, [r2, #0]
  25277. 800acba: 1b1b subs r3, r3, r4
  25278. 800acbc: 8013 strh r3, [r2, #0]
  25279. return p;
  25280. 800acbe: e00e b.n 800acde <ip4_reass+0x1be>
  25281. LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
  25282. 800acc0: 4b16 ldr r3, [pc, #88] @ (800ad1c <ip4_reass+0x1fc>)
  25283. 800acc2: f240 229b movw r2, #667 @ 0x29b
  25284. 800acc6: 4916 ldr r1, [pc, #88] @ (800ad20 <ip4_reass+0x200>)
  25285. 800acc8: 4816 ldr r0, [pc, #88] @ (800ad24 <ip4_reass+0x204>)
  25286. 800acca: f008 fb9d bl 8013408 <iprintf>
  25287. 800acce: e7f2 b.n 800acb6 <ip4_reass+0x196>
  25288. LWIP_ASSERT("ipr != NULL", ipr != NULL);
  25289. 800acd0: b144 cbz r4, 800ace4 <ip4_reass+0x1c4>
  25290. if (ipr->p == NULL) {
  25291. 800acd2: 6863 ldr r3, [r4, #4]
  25292. 800acd4: b173 cbz r3, 800acf4 <ip4_reass+0x1d4>
  25293. pbuf_free(p);
  25294. 800acd6: 4630 mov r0, r6
  25295. 800acd8: f001 f862 bl 800bda0 <pbuf_free>
  25296. return NULL;
  25297. 800acdc: 2600 movs r6, #0
  25298. }
  25299. 800acde: 4630 mov r0, r6
  25300. 800ace0: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  25301. LWIP_ASSERT("ipr != NULL", ipr != NULL);
  25302. 800ace4: 4b0d ldr r3, [pc, #52] @ (800ad1c <ip4_reass+0x1fc>)
  25303. 800ace6: f44f 722a mov.w r2, #680 @ 0x2a8
  25304. 800acea: 490f ldr r1, [pc, #60] @ (800ad28 <ip4_reass+0x208>)
  25305. 800acec: 480d ldr r0, [pc, #52] @ (800ad24 <ip4_reass+0x204>)
  25306. 800acee: f008 fb8b bl 8013408 <iprintf>
  25307. 800acf2: e7ee b.n 800acd2 <ip4_reass+0x1b2>
  25308. LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams);
  25309. 800acf4: 4b08 ldr r3, [pc, #32] @ (800ad18 <ip4_reass+0x1f8>)
  25310. 800acf6: 681b ldr r3, [r3, #0]
  25311. 800acf8: 429c cmp r4, r3
  25312. 800acfa: d006 beq.n 800ad0a <ip4_reass+0x1ea>
  25313. 800acfc: 4b07 ldr r3, [pc, #28] @ (800ad1c <ip4_reass+0x1fc>)
  25314. 800acfe: f240 22ab movw r2, #683 @ 0x2ab
  25315. 800ad02: 490a ldr r1, [pc, #40] @ (800ad2c <ip4_reass+0x20c>)
  25316. 800ad04: 4807 ldr r0, [pc, #28] @ (800ad24 <ip4_reass+0x204>)
  25317. 800ad06: f008 fb7f bl 8013408 <iprintf>
  25318. ip_reass_dequeue_datagram(ipr, NULL);
  25319. 800ad0a: 2100 movs r1, #0
  25320. 800ad0c: 4620 mov r0, r4
  25321. 800ad0e: f7ff fcd9 bl 800a6c4 <ip_reass_dequeue_datagram>
  25322. 800ad12: e7e0 b.n 800acd6 <ip4_reass+0x1b6>
  25323. 800ad14: 24013048 .word 0x24013048
  25324. 800ad18: 2401304c .word 0x2401304c
  25325. 800ad1c: 080156dc .word 0x080156dc
  25326. 800ad20: 0801585c .word 0x0801585c
  25327. 800ad24: 080144e8 .word 0x080144e8
  25328. 800ad28: 08015878 .word 0x08015878
  25329. 800ad2c: 08015884 .word 0x08015884
  25330. 0800ad30 <ip4_frag>:
  25331. *
  25332. * @return ERR_OK if sent successfully, err_t otherwise
  25333. */
  25334. err_t
  25335. ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest)
  25336. {
  25337. 800ad30: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  25338. 800ad34: b08b sub sp, #44 @ 0x2c
  25339. 800ad36: 4606 mov r6, r0
  25340. 800ad38: 9107 str r1, [sp, #28]
  25341. 800ad3a: 9208 str r2, [sp, #32]
  25342. u16_t newpbuflen = 0;
  25343. u16_t left_to_copy;
  25344. #endif
  25345. struct ip_hdr *original_iphdr;
  25346. struct ip_hdr *iphdr;
  25347. const u16_t nfb = (u16_t)((netif->mtu - IP_HLEN) / 8);
  25348. 800ad3c: 8d0b ldrh r3, [r1, #40] @ 0x28
  25349. 800ad3e: 3b14 subs r3, #20
  25350. 800ad40: d44e bmi.n 800ade0 <ip4_frag+0xb0>
  25351. 800ad42: f3c3 03cf ubfx r3, r3, #3, #16
  25352. 800ad46: 9305 str r3, [sp, #20]
  25353. int last;
  25354. u16_t poff = IP_HLEN;
  25355. u16_t tmp;
  25356. int mf_set;
  25357. original_iphdr = (struct ip_hdr *)p->payload;
  25358. 800ad48: f8d6 b004 ldr.w fp, [r6, #4]
  25359. iphdr = original_iphdr;
  25360. if (IPH_HL_BYTES(iphdr) != IP_HLEN) {
  25361. 800ad4c: f89b 3000 ldrb.w r3, [fp]
  25362. 800ad50: f003 030f and.w r3, r3, #15
  25363. 800ad54: 2b05 cmp r3, #5
  25364. 800ad56: f040 80da bne.w 800af0e <ip4_frag+0x1de>
  25365. /* ip4_frag() does not support IP options */
  25366. return ERR_VAL;
  25367. }
  25368. LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL);
  25369. 800ad5a: 8973 ldrh r3, [r6, #10]
  25370. 800ad5c: 2b13 cmp r3, #19
  25371. 800ad5e: d941 bls.n 800ade4 <ip4_frag+0xb4>
  25372. /* Save original offset */
  25373. tmp = lwip_ntohs(IPH_OFFSET(iphdr));
  25374. 800ad60: f8bb 0006 ldrh.w r0, [fp, #6]
  25375. 800ad64: f7fd f88a bl 8007e7c <lwip_htons>
  25376. ofo = tmp & IP_OFFMASK;
  25377. 800ad68: f3c0 030c ubfx r3, r0, #0, #13
  25378. 800ad6c: 9306 str r3, [sp, #24]
  25379. /* already fragmented? if so, the last fragment we create must have MF, too */
  25380. mf_set = tmp & IP_MF;
  25381. 800ad6e: f400 5300 and.w r3, r0, #8192 @ 0x2000
  25382. 800ad72: 9309 str r3, [sp, #36] @ 0x24
  25383. left = (u16_t)(p->tot_len - IP_HLEN);
  25384. 800ad74: 8933 ldrh r3, [r6, #8]
  25385. 800ad76: 3b14 subs r3, #20
  25386. 800ad78: fa1f f883 uxth.w r8, r3
  25387. u16_t poff = IP_HLEN;
  25388. 800ad7c: 2714 movs r7, #20
  25389. u16_t newpbuflen = 0;
  25390. 800ad7e: 2400 movs r4, #0
  25391. 800ad80: f8cd 800c str.w r8, [sp, #12]
  25392. while (left) {
  25393. 800ad84: 9b03 ldr r3, [sp, #12]
  25394. 800ad86: 2b00 cmp r3, #0
  25395. 800ad88: f000 80bf beq.w 800af0a <ip4_frag+0x1da>
  25396. /* Fill this fragment */
  25397. fragsize = LWIP_MIN(left, (u16_t)(nfb * 8));
  25398. 800ad8c: 9b05 ldr r3, [sp, #20]
  25399. 800ad8e: 00db lsls r3, r3, #3
  25400. 800ad90: b29b uxth r3, r3
  25401. 800ad92: 9a03 ldr r2, [sp, #12]
  25402. 800ad94: 4293 cmp r3, r2
  25403. 800ad96: bf28 it cs
  25404. 800ad98: 4613 movcs r3, r2
  25405. 800ad9a: 9304 str r3, [sp, #16]
  25406. /* When not using a static buffer, create a chain of pbufs.
  25407. * The first will be a PBUF_RAM holding the link and IP header.
  25408. * The rest will be PBUF_REFs mirroring the pbuf chain to be fragged,
  25409. * but limited to the size of an mtu.
  25410. */
  25411. rambuf = pbuf_alloc(PBUF_LINK, IP_HLEN, PBUF_RAM);
  25412. 800ad9c: f44f 7220 mov.w r2, #640 @ 0x280
  25413. 800ada0: 2114 movs r1, #20
  25414. 800ada2: 200e movs r0, #14
  25415. 800ada4: f001 f864 bl 800be70 <pbuf_alloc>
  25416. if (rambuf == NULL) {
  25417. 800ada8: 4681 mov r9, r0
  25418. 800adaa: 2800 cmp r0, #0
  25419. 800adac: f000 80b2 beq.w 800af14 <ip4_frag+0x1e4>
  25420. goto memerr;
  25421. }
  25422. LWIP_ASSERT("this needs a pbuf in one piece!",
  25423. 800adb0: 8943 ldrh r3, [r0, #10]
  25424. 800adb2: 2b13 cmp r3, #19
  25425. 800adb4: d920 bls.n 800adf8 <ip4_frag+0xc8>
  25426. (rambuf->len >= (IP_HLEN)));
  25427. SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN);
  25428. 800adb6: f8d9 3004 ldr.w r3, [r9, #4]
  25429. 800adba: f8db 2000 ldr.w r2, [fp]
  25430. 800adbe: f8db 5004 ldr.w r5, [fp, #4]
  25431. 800adc2: f8db 0008 ldr.w r0, [fp, #8]
  25432. 800adc6: f8db 100c ldr.w r1, [fp, #12]
  25433. 800adca: 601a str r2, [r3, #0]
  25434. 800adcc: 605d str r5, [r3, #4]
  25435. 800adce: 6098 str r0, [r3, #8]
  25436. 800add0: 60d9 str r1, [r3, #12]
  25437. 800add2: f8db 2010 ldr.w r2, [fp, #16]
  25438. 800add6: 611a str r2, [r3, #16]
  25439. iphdr = (struct ip_hdr *)rambuf->payload;
  25440. 800add8: f8d9 a004 ldr.w sl, [r9, #4]
  25441. left_to_copy = fragsize;
  25442. 800addc: 9d04 ldr r5, [sp, #16]
  25443. while (left_to_copy) {
  25444. 800adde: e03c b.n 800ae5a <ip4_frag+0x12a>
  25445. const u16_t nfb = (u16_t)((netif->mtu - IP_HLEN) / 8);
  25446. 800ade0: 3307 adds r3, #7
  25447. 800ade2: e7ae b.n 800ad42 <ip4_frag+0x12>
  25448. LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL);
  25449. 800ade4: 4b4d ldr r3, [pc, #308] @ (800af1c <ip4_frag+0x1ec>)
  25450. 800ade6: f44f 723f mov.w r2, #764 @ 0x2fc
  25451. 800adea: 494d ldr r1, [pc, #308] @ (800af20 <ip4_frag+0x1f0>)
  25452. 800adec: 484d ldr r0, [pc, #308] @ (800af24 <ip4_frag+0x1f4>)
  25453. 800adee: f008 fb0b bl 8013408 <iprintf>
  25454. 800adf2: f06f 0005 mvn.w r0, #5
  25455. 800adf6: e043 b.n 800ae80 <ip4_frag+0x150>
  25456. LWIP_ASSERT("this needs a pbuf in one piece!",
  25457. 800adf8: 4b48 ldr r3, [pc, #288] @ (800af1c <ip4_frag+0x1ec>)
  25458. 800adfa: f44f 7249 mov.w r2, #804 @ 0x324
  25459. 800adfe: 494a ldr r1, [pc, #296] @ (800af28 <ip4_frag+0x1f8>)
  25460. 800ae00: 4848 ldr r0, [pc, #288] @ (800af24 <ip4_frag+0x1f4>)
  25461. 800ae02: f008 fb01 bl 8013408 <iprintf>
  25462. 800ae06: e7d6 b.n 800adb6 <ip4_frag+0x86>
  25463. struct pbuf_custom_ref *pcr;
  25464. u16_t plen = (u16_t)(p->len - poff);
  25465. LWIP_ASSERT("p->len >= poff", p->len >= poff);
  25466. 800ae08: 4b44 ldr r3, [pc, #272] @ (800af1c <ip4_frag+0x1ec>)
  25467. 800ae0a: f240 322d movw r2, #813 @ 0x32d
  25468. 800ae0e: 4947 ldr r1, [pc, #284] @ (800af2c <ip4_frag+0x1fc>)
  25469. 800ae10: 4844 ldr r0, [pc, #272] @ (800af24 <ip4_frag+0x1f4>)
  25470. 800ae12: f008 faf9 bl 8013408 <iprintf>
  25471. 800ae16: e026 b.n 800ae66 <ip4_frag+0x136>
  25472. if (!newpbuflen) {
  25473. poff = 0;
  25474. p = p->next;
  25475. continue;
  25476. }
  25477. pcr = ip_frag_alloc_pbuf_custom_ref();
  25478. 800ae18: f7ff fe36 bl 800aa88 <ip_frag_alloc_pbuf_custom_ref>
  25479. if (pcr == NULL) {
  25480. 800ae1c: 4680 mov r8, r0
  25481. 800ae1e: b350 cbz r0, 800ae76 <ip4_frag+0x146>
  25482. pbuf_free(rambuf);
  25483. goto memerr;
  25484. }
  25485. /* Mirror this pbuf, although we might not need all of it. */
  25486. newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
  25487. (u8_t *)p->payload + poff, newpbuflen);
  25488. 800ae20: 6873 ldr r3, [r6, #4]
  25489. newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc,
  25490. 800ae22: 9401 str r4, [sp, #4]
  25491. 800ae24: 443b add r3, r7
  25492. 800ae26: 9300 str r3, [sp, #0]
  25493. 800ae28: 4603 mov r3, r0
  25494. 800ae2a: 2241 movs r2, #65 @ 0x41
  25495. 800ae2c: 4621 mov r1, r4
  25496. 800ae2e: 2000 movs r0, #0
  25497. 800ae30: f000 ff4c bl 800bccc <pbuf_alloced_custom>
  25498. if (newpbuf == NULL) {
  25499. 800ae34: 9002 str r0, [sp, #8]
  25500. 800ae36: b330 cbz r0, 800ae86 <ip4_frag+0x156>
  25501. ip_frag_free_pbuf_custom_ref(pcr);
  25502. pbuf_free(rambuf);
  25503. goto memerr;
  25504. }
  25505. pbuf_ref(p);
  25506. 800ae38: 4630 mov r0, r6
  25507. 800ae3a: f001 f93f bl 800c0bc <pbuf_ref>
  25508. pcr->original = p;
  25509. 800ae3e: f8c8 6014 str.w r6, [r8, #20]
  25510. pcr->pc.custom_free_function = ipfrag_free_pbuf_custom;
  25511. 800ae42: 4b3b ldr r3, [pc, #236] @ (800af30 <ip4_frag+0x200>)
  25512. 800ae44: f8c8 3010 str.w r3, [r8, #16]
  25513. /* Add it to end of rambuf's chain, but using pbuf_cat, not pbuf_chain
  25514. * so that it is removed when pbuf_dechain is later called on rambuf.
  25515. */
  25516. pbuf_cat(rambuf, newpbuf);
  25517. 800ae48: 9902 ldr r1, [sp, #8]
  25518. 800ae4a: 4648 mov r0, r9
  25519. 800ae4c: f001 f952 bl 800c0f4 <pbuf_cat>
  25520. left_to_copy = (u16_t)(left_to_copy - newpbuflen);
  25521. 800ae50: 1b2d subs r5, r5, r4
  25522. 800ae52: b2ad uxth r5, r5
  25523. if (left_to_copy) {
  25524. 800ae54: b10d cbz r5, 800ae5a <ip4_frag+0x12a>
  25525. poff = 0;
  25526. p = p->next;
  25527. 800ae56: 6836 ldr r6, [r6, #0]
  25528. poff = 0;
  25529. 800ae58: 2700 movs r7, #0
  25530. while (left_to_copy) {
  25531. 800ae5a: b1ed cbz r5, 800ae98 <ip4_frag+0x168>
  25532. u16_t plen = (u16_t)(p->len - poff);
  25533. 800ae5c: 8973 ldrh r3, [r6, #10]
  25534. 800ae5e: 1bdc subs r4, r3, r7
  25535. 800ae60: b2a4 uxth r4, r4
  25536. LWIP_ASSERT("p->len >= poff", p->len >= poff);
  25537. 800ae62: 42bb cmp r3, r7
  25538. 800ae64: d3d0 bcc.n 800ae08 <ip4_frag+0xd8>
  25539. newpbuflen = LWIP_MIN(left_to_copy, plen);
  25540. 800ae66: 42ac cmp r4, r5
  25541. 800ae68: bf28 it cs
  25542. 800ae6a: 462c movcs r4, r5
  25543. if (!newpbuflen) {
  25544. 800ae6c: 2c00 cmp r4, #0
  25545. 800ae6e: d1d3 bne.n 800ae18 <ip4_frag+0xe8>
  25546. p = p->next;
  25547. 800ae70: 6836 ldr r6, [r6, #0]
  25548. poff = 0;
  25549. 800ae72: 4627 mov r7, r4
  25550. continue;
  25551. 800ae74: e7f1 b.n 800ae5a <ip4_frag+0x12a>
  25552. pbuf_free(rambuf);
  25553. 800ae76: 4648 mov r0, r9
  25554. 800ae78: f000 ff92 bl 800bda0 <pbuf_free>
  25555. }
  25556. MIB2_STATS_INC(mib2.ipfragoks);
  25557. return ERR_OK;
  25558. memerr:
  25559. MIB2_STATS_INC(mib2.ipfragfails);
  25560. return ERR_MEM;
  25561. 800ae7c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  25562. }
  25563. 800ae80: b00b add sp, #44 @ 0x2c
  25564. 800ae82: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  25565. ip_frag_free_pbuf_custom_ref(pcr);
  25566. 800ae86: 4640 mov r0, r8
  25567. 800ae88: f7ff fcfe bl 800a888 <ip_frag_free_pbuf_custom_ref>
  25568. pbuf_free(rambuf);
  25569. 800ae8c: 4648 mov r0, r9
  25570. 800ae8e: f000 ff87 bl 800bda0 <pbuf_free>
  25571. return ERR_MEM;
  25572. 800ae92: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  25573. goto memerr;
  25574. 800ae96: e7f3 b.n 800ae80 <ip4_frag+0x150>
  25575. poff = (u16_t)(poff + newpbuflen);
  25576. 800ae98: 4427 add r7, r4
  25577. 800ae9a: b2bf uxth r7, r7
  25578. last = (left <= netif->mtu - IP_HLEN);
  25579. 800ae9c: 9b07 ldr r3, [sp, #28]
  25580. 800ae9e: 8d1a ldrh r2, [r3, #40] @ 0x28
  25581. 800aea0: 3a13 subs r2, #19
  25582. tmp = (IP_OFFMASK & (ofo));
  25583. 800aea2: 9b06 ldr r3, [sp, #24]
  25584. 800aea4: f3c3 000c ubfx r0, r3, #0, #13
  25585. if (!last || mf_set) {
  25586. 800aea8: 9b09 ldr r3, [sp, #36] @ 0x24
  25587. 800aeaa: 3b00 subs r3, #0
  25588. 800aeac: bf18 it ne
  25589. 800aeae: 2301 movne r3, #1
  25590. 800aeb0: 9903 ldr r1, [sp, #12]
  25591. 800aeb2: 428a cmp r2, r1
  25592. 800aeb4: bfd8 it le
  25593. 800aeb6: f043 0301 orrle.w r3, r3, #1
  25594. 800aeba: b10b cbz r3, 800aec0 <ip4_frag+0x190>
  25595. tmp = tmp | IP_MF;
  25596. 800aebc: f440 5000 orr.w r0, r0, #8192 @ 0x2000
  25597. IPH_OFFSET_SET(iphdr, lwip_htons(tmp));
  25598. 800aec0: f7fc ffdc bl 8007e7c <lwip_htons>
  25599. 800aec4: f8aa 0006 strh.w r0, [sl, #6]
  25600. IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN)));
  25601. 800aec8: 9d04 ldr r5, [sp, #16]
  25602. 800aeca: f105 0014 add.w r0, r5, #20
  25603. 800aece: b280 uxth r0, r0
  25604. 800aed0: f7fc ffd4 bl 8007e7c <lwip_htons>
  25605. 800aed4: f8aa 0002 strh.w r0, [sl, #2]
  25606. IPH_CHKSUM_SET(iphdr, 0);
  25607. 800aed8: 2300 movs r3, #0
  25608. 800aeda: f88a 300a strb.w r3, [sl, #10]
  25609. 800aede: f88a 300b strb.w r3, [sl, #11]
  25610. netif->output(netif, rambuf, dest);
  25611. 800aee2: 9807 ldr r0, [sp, #28]
  25612. 800aee4: 6943 ldr r3, [r0, #20]
  25613. 800aee6: 9a08 ldr r2, [sp, #32]
  25614. 800aee8: 4649 mov r1, r9
  25615. 800aeea: 4798 blx r3
  25616. pbuf_free(rambuf);
  25617. 800aeec: 4648 mov r0, r9
  25618. 800aeee: f000 ff57 bl 800bda0 <pbuf_free>
  25619. left = (u16_t)(left - fragsize);
  25620. 800aef2: 9b03 ldr r3, [sp, #12]
  25621. 800aef4: eba3 0a05 sub.w sl, r3, r5
  25622. 800aef8: fa1f f38a uxth.w r3, sl
  25623. 800aefc: 9303 str r3, [sp, #12]
  25624. ofo = (u16_t)(ofo + nfb);
  25625. 800aefe: 9b06 ldr r3, [sp, #24]
  25626. 800af00: 9a05 ldr r2, [sp, #20]
  25627. 800af02: 4413 add r3, r2
  25628. 800af04: b29b uxth r3, r3
  25629. 800af06: 9306 str r3, [sp, #24]
  25630. 800af08: e73c b.n 800ad84 <ip4_frag+0x54>
  25631. return ERR_OK;
  25632. 800af0a: 2000 movs r0, #0
  25633. 800af0c: e7b8 b.n 800ae80 <ip4_frag+0x150>
  25634. return ERR_VAL;
  25635. 800af0e: f06f 0005 mvn.w r0, #5
  25636. 800af12: e7b5 b.n 800ae80 <ip4_frag+0x150>
  25637. return ERR_MEM;
  25638. 800af14: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  25639. 800af18: e7b2 b.n 800ae80 <ip4_frag+0x150>
  25640. 800af1a: bf00 nop
  25641. 800af1c: 080156dc .word 0x080156dc
  25642. 800af20: 080158a4 .word 0x080158a4
  25643. 800af24: 080144e8 .word 0x080144e8
  25644. 800af28: 080158c0 .word 0x080158c0
  25645. 800af2c: 080158e0 .word 0x080158e0
  25646. 800af30: 0800a8b5 .word 0x0800a8b5
  25647. 0800af34 <ptr_to_mem>:
  25648. #endif /* MEM_OVERFLOW_CHECK */
  25649. static struct mem *
  25650. ptr_to_mem(mem_size_t ptr)
  25651. {
  25652. return (struct mem *)(void *)&ram[ptr];
  25653. 800af34: 4b01 ldr r3, [pc, #4] @ (800af3c <ptr_to_mem+0x8>)
  25654. 800af36: 681b ldr r3, [r3, #0]
  25655. }
  25656. 800af38: 4418 add r0, r3
  25657. 800af3a: 4770 bx lr
  25658. 800af3c: 2401305c .word 0x2401305c
  25659. 0800af40 <mem_to_ptr>:
  25660. static mem_size_t
  25661. mem_to_ptr(void *mem)
  25662. {
  25663. return (mem_size_t)((u8_t *)mem - ram);
  25664. 800af40: 4b01 ldr r3, [pc, #4] @ (800af48 <mem_to_ptr+0x8>)
  25665. 800af42: 681b ldr r3, [r3, #0]
  25666. }
  25667. 800af44: 1ac0 subs r0, r0, r3
  25668. 800af46: 4770 bx lr
  25669. 800af48: 2401305c .word 0x2401305c
  25670. 0800af4c <mem_link_valid>:
  25671. /* Check if a struct mem is correctly linked.
  25672. * If not, double-free is a possible reason.
  25673. */
  25674. static int
  25675. mem_link_valid(struct mem *mem)
  25676. {
  25677. 800af4c: b5f8 push {r3, r4, r5, r6, r7, lr}
  25678. 800af4e: 4604 mov r4, r0
  25679. struct mem *nmem, *pmem;
  25680. mem_size_t rmem_idx;
  25681. rmem_idx = mem_to_ptr(mem);
  25682. 800af50: f7ff fff6 bl 800af40 <mem_to_ptr>
  25683. 800af54: 4605 mov r5, r0
  25684. nmem = ptr_to_mem(mem->next);
  25685. 800af56: 6826 ldr r6, [r4, #0]
  25686. 800af58: 4630 mov r0, r6
  25687. 800af5a: f7ff ffeb bl 800af34 <ptr_to_mem>
  25688. 800af5e: 4607 mov r7, r0
  25689. pmem = ptr_to_mem(mem->prev);
  25690. 800af60: 6864 ldr r4, [r4, #4]
  25691. 800af62: 4620 mov r0, r4
  25692. 800af64: f7ff ffe6 bl 800af34 <ptr_to_mem>
  25693. if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) ||
  25694. 800af68: 4b0e ldr r3, [pc, #56] @ (800afa4 <mem_link_valid+0x58>)
  25695. 800af6a: 429e cmp r6, r3
  25696. 800af6c: d80f bhi.n 800af8e <mem_link_valid+0x42>
  25697. 800af6e: 429c cmp r4, r3
  25698. 800af70: d80f bhi.n 800af92 <mem_link_valid+0x46>
  25699. 800af72: 42ac cmp r4, r5
  25700. 800af74: d002 beq.n 800af7c <mem_link_valid+0x30>
  25701. ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
  25702. 800af76: 6803 ldr r3, [r0, #0]
  25703. 800af78: 42ab cmp r3, r5
  25704. 800af7a: d10c bne.n 800af96 <mem_link_valid+0x4a>
  25705. ((nmem != ram_end) && (nmem->prev != rmem_idx))) {
  25706. 800af7c: 4b0a ldr r3, [pc, #40] @ (800afa8 <mem_link_valid+0x5c>)
  25707. 800af7e: 681b ldr r3, [r3, #0]
  25708. ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) ||
  25709. 800af80: 42bb cmp r3, r7
  25710. 800af82: d00a beq.n 800af9a <mem_link_valid+0x4e>
  25711. ((nmem != ram_end) && (nmem->prev != rmem_idx))) {
  25712. 800af84: 687b ldr r3, [r7, #4]
  25713. 800af86: 42ab cmp r3, r5
  25714. 800af88: d109 bne.n 800af9e <mem_link_valid+0x52>
  25715. return 0;
  25716. }
  25717. return 1;
  25718. 800af8a: 2001 movs r0, #1
  25719. 800af8c: e000 b.n 800af90 <mem_link_valid+0x44>
  25720. return 0;
  25721. 800af8e: 2000 movs r0, #0
  25722. }
  25723. 800af90: bdf8 pop {r3, r4, r5, r6, r7, pc}
  25724. return 0;
  25725. 800af92: 2000 movs r0, #0
  25726. 800af94: e7fc b.n 800af90 <mem_link_valid+0x44>
  25727. 800af96: 2000 movs r0, #0
  25728. 800af98: e7fa b.n 800af90 <mem_link_valid+0x44>
  25729. return 1;
  25730. 800af9a: 2001 movs r0, #1
  25731. 800af9c: e7f8 b.n 800af90 <mem_link_valid+0x44>
  25732. return 0;
  25733. 800af9e: 2000 movs r0, #0
  25734. 800afa0: e7f6 b.n 800af90 <mem_link_valid+0x44>
  25735. 800afa2: bf00 nop
  25736. 800afa4: 0001ffe8 .word 0x0001ffe8
  25737. 800afa8: 24013058 .word 0x24013058
  25738. 0800afac <plug_holes>:
  25739. {
  25740. 800afac: b538 push {r3, r4, r5, lr}
  25741. 800afae: 4604 mov r4, r0
  25742. LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram);
  25743. 800afb0: 4b34 ldr r3, [pc, #208] @ (800b084 <plug_holes+0xd8>)
  25744. 800afb2: 681b ldr r3, [r3, #0]
  25745. 800afb4: 4283 cmp r3, r0
  25746. 800afb6: d83e bhi.n 800b036 <plug_holes+0x8a>
  25747. LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end);
  25748. 800afb8: 4b33 ldr r3, [pc, #204] @ (800b088 <plug_holes+0xdc>)
  25749. 800afba: 681b ldr r3, [r3, #0]
  25750. 800afbc: 42a3 cmp r3, r4
  25751. 800afbe: d942 bls.n 800b046 <plug_holes+0x9a>
  25752. LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0);
  25753. 800afc0: 7a23 ldrb r3, [r4, #8]
  25754. 800afc2: 2b00 cmp r3, #0
  25755. 800afc4: d147 bne.n 800b056 <plug_holes+0xaa>
  25756. LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED);
  25757. 800afc6: 6822 ldr r2, [r4, #0]
  25758. 800afc8: 4b30 ldr r3, [pc, #192] @ (800b08c <plug_holes+0xe0>)
  25759. 800afca: 429a cmp r2, r3
  25760. 800afcc: d84b bhi.n 800b066 <plug_holes+0xba>
  25761. nmem = ptr_to_mem(mem->next);
  25762. 800afce: 6820 ldr r0, [r4, #0]
  25763. 800afd0: f7ff ffb0 bl 800af34 <ptr_to_mem>
  25764. if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) {
  25765. 800afd4: 4284 cmp r4, r0
  25766. 800afd6: d015 beq.n 800b004 <plug_holes+0x58>
  25767. 800afd8: 7a03 ldrb r3, [r0, #8]
  25768. 800afda: b99b cbnz r3, 800b004 <plug_holes+0x58>
  25769. 800afdc: 4b2a ldr r3, [pc, #168] @ (800b088 <plug_holes+0xdc>)
  25770. 800afde: 681b ldr r3, [r3, #0]
  25771. 800afe0: 4283 cmp r3, r0
  25772. 800afe2: d00f beq.n 800b004 <plug_holes+0x58>
  25773. if (lfree == nmem) {
  25774. 800afe4: 4b2a ldr r3, [pc, #168] @ (800b090 <plug_holes+0xe4>)
  25775. 800afe6: 681b ldr r3, [r3, #0]
  25776. 800afe8: 4283 cmp r3, r0
  25777. 800afea: d044 beq.n 800b076 <plug_holes+0xca>
  25778. mem->next = nmem->next;
  25779. 800afec: 6800 ldr r0, [r0, #0]
  25780. 800afee: 6020 str r0, [r4, #0]
  25781. if (nmem->next != MEM_SIZE_ALIGNED) {
  25782. 800aff0: 4b26 ldr r3, [pc, #152] @ (800b08c <plug_holes+0xe0>)
  25783. 800aff2: 4298 cmp r0, r3
  25784. 800aff4: d006 beq.n 800b004 <plug_holes+0x58>
  25785. ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem);
  25786. 800aff6: f7ff ff9d bl 800af34 <ptr_to_mem>
  25787. 800affa: 4605 mov r5, r0
  25788. 800affc: 4620 mov r0, r4
  25789. 800affe: f7ff ff9f bl 800af40 <mem_to_ptr>
  25790. 800b002: 6068 str r0, [r5, #4]
  25791. pmem = ptr_to_mem(mem->prev);
  25792. 800b004: 6860 ldr r0, [r4, #4]
  25793. 800b006: f7ff ff95 bl 800af34 <ptr_to_mem>
  25794. 800b00a: 4605 mov r5, r0
  25795. if (pmem != mem && pmem->used == 0) {
  25796. 800b00c: 4284 cmp r4, r0
  25797. 800b00e: d011 beq.n 800b034 <plug_holes+0x88>
  25798. 800b010: 7a03 ldrb r3, [r0, #8]
  25799. 800b012: b97b cbnz r3, 800b034 <plug_holes+0x88>
  25800. if (lfree == mem) {
  25801. 800b014: 4b1e ldr r3, [pc, #120] @ (800b090 <plug_holes+0xe4>)
  25802. 800b016: 681b ldr r3, [r3, #0]
  25803. 800b018: 42a3 cmp r3, r4
  25804. 800b01a: d02f beq.n 800b07c <plug_holes+0xd0>
  25805. pmem->next = mem->next;
  25806. 800b01c: 6820 ldr r0, [r4, #0]
  25807. 800b01e: 6028 str r0, [r5, #0]
  25808. if (mem->next != MEM_SIZE_ALIGNED) {
  25809. 800b020: 4b1a ldr r3, [pc, #104] @ (800b08c <plug_holes+0xe0>)
  25810. 800b022: 4298 cmp r0, r3
  25811. 800b024: d006 beq.n 800b034 <plug_holes+0x88>
  25812. ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem);
  25813. 800b026: f7ff ff85 bl 800af34 <ptr_to_mem>
  25814. 800b02a: 4604 mov r4, r0
  25815. 800b02c: 4628 mov r0, r5
  25816. 800b02e: f7ff ff87 bl 800af40 <mem_to_ptr>
  25817. 800b032: 6060 str r0, [r4, #4]
  25818. }
  25819. 800b034: bd38 pop {r3, r4, r5, pc}
  25820. LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram);
  25821. 800b036: 4b17 ldr r3, [pc, #92] @ (800b094 <plug_holes+0xe8>)
  25822. 800b038: f240 12df movw r2, #479 @ 0x1df
  25823. 800b03c: 4916 ldr r1, [pc, #88] @ (800b098 <plug_holes+0xec>)
  25824. 800b03e: 4817 ldr r0, [pc, #92] @ (800b09c <plug_holes+0xf0>)
  25825. 800b040: f008 f9e2 bl 8013408 <iprintf>
  25826. 800b044: e7b8 b.n 800afb8 <plug_holes+0xc>
  25827. LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end);
  25828. 800b046: 4b13 ldr r3, [pc, #76] @ (800b094 <plug_holes+0xe8>)
  25829. 800b048: f44f 72f0 mov.w r2, #480 @ 0x1e0
  25830. 800b04c: 4914 ldr r1, [pc, #80] @ (800b0a0 <plug_holes+0xf4>)
  25831. 800b04e: 4813 ldr r0, [pc, #76] @ (800b09c <plug_holes+0xf0>)
  25832. 800b050: f008 f9da bl 8013408 <iprintf>
  25833. 800b054: e7b4 b.n 800afc0 <plug_holes+0x14>
  25834. LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0);
  25835. 800b056: 4b0f ldr r3, [pc, #60] @ (800b094 <plug_holes+0xe8>)
  25836. 800b058: f240 12e1 movw r2, #481 @ 0x1e1
  25837. 800b05c: 4911 ldr r1, [pc, #68] @ (800b0a4 <plug_holes+0xf8>)
  25838. 800b05e: 480f ldr r0, [pc, #60] @ (800b09c <plug_holes+0xf0>)
  25839. 800b060: f008 f9d2 bl 8013408 <iprintf>
  25840. 800b064: e7af b.n 800afc6 <plug_holes+0x1a>
  25841. LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED);
  25842. 800b066: 4b0b ldr r3, [pc, #44] @ (800b094 <plug_holes+0xe8>)
  25843. 800b068: f44f 72f2 mov.w r2, #484 @ 0x1e4
  25844. 800b06c: 490e ldr r1, [pc, #56] @ (800b0a8 <plug_holes+0xfc>)
  25845. 800b06e: 480b ldr r0, [pc, #44] @ (800b09c <plug_holes+0xf0>)
  25846. 800b070: f008 f9ca bl 8013408 <iprintf>
  25847. 800b074: e7ab b.n 800afce <plug_holes+0x22>
  25848. lfree = mem;
  25849. 800b076: 4b06 ldr r3, [pc, #24] @ (800b090 <plug_holes+0xe4>)
  25850. 800b078: 601c str r4, [r3, #0]
  25851. 800b07a: e7b7 b.n 800afec <plug_holes+0x40>
  25852. lfree = pmem;
  25853. 800b07c: 4b04 ldr r3, [pc, #16] @ (800b090 <plug_holes+0xe4>)
  25854. 800b07e: 6018 str r0, [r3, #0]
  25855. 800b080: e7cc b.n 800b01c <plug_holes+0x70>
  25856. 800b082: bf00 nop
  25857. 800b084: 2401305c .word 0x2401305c
  25858. 800b088: 24013058 .word 0x24013058
  25859. 800b08c: 0001ffe8 .word 0x0001ffe8
  25860. 800b090: 24013050 .word 0x24013050
  25861. 800b094: 080158f0 .word 0x080158f0
  25862. 800b098: 08015950 .word 0x08015950
  25863. 800b09c: 080144e8 .word 0x080144e8
  25864. 800b0a0: 08015968 .word 0x08015968
  25865. 800b0a4: 08015984 .word 0x08015984
  25866. 800b0a8: 080159a0 .word 0x080159a0
  25867. 0800b0ac <mem_init>:
  25868. {
  25869. 800b0ac: b538 push {r3, r4, r5, lr}
  25870. ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER);
  25871. 800b0ae: 4d10 ldr r5, [pc, #64] @ (800b0f0 <mem_init+0x44>)
  25872. 800b0b0: 4b10 ldr r3, [pc, #64] @ (800b0f4 <mem_init+0x48>)
  25873. 800b0b2: 602b str r3, [r5, #0]
  25874. mem->next = MEM_SIZE_ALIGNED;
  25875. 800b0b4: 4c10 ldr r4, [pc, #64] @ (800b0f8 <mem_init+0x4c>)
  25876. 800b0b6: 601c str r4, [r3, #0]
  25877. mem->prev = 0;
  25878. 800b0b8: 2200 movs r2, #0
  25879. 800b0ba: 605a str r2, [r3, #4]
  25880. mem->used = 0;
  25881. 800b0bc: 721a strb r2, [r3, #8]
  25882. ram_end = ptr_to_mem(MEM_SIZE_ALIGNED);
  25883. 800b0be: 4620 mov r0, r4
  25884. 800b0c0: f7ff ff38 bl 800af34 <ptr_to_mem>
  25885. 800b0c4: 4b0d ldr r3, [pc, #52] @ (800b0fc <mem_init+0x50>)
  25886. 800b0c6: 6018 str r0, [r3, #0]
  25887. ram_end->used = 1;
  25888. 800b0c8: 2301 movs r3, #1
  25889. 800b0ca: 7203 strb r3, [r0, #8]
  25890. ram_end->next = MEM_SIZE_ALIGNED;
  25891. 800b0cc: 6004 str r4, [r0, #0]
  25892. ram_end->prev = MEM_SIZE_ALIGNED;
  25893. 800b0ce: 6044 str r4, [r0, #4]
  25894. lfree = (struct mem *)(void *)ram;
  25895. 800b0d0: 682a ldr r2, [r5, #0]
  25896. 800b0d2: 4b0b ldr r3, [pc, #44] @ (800b100 <mem_init+0x54>)
  25897. 800b0d4: 601a str r2, [r3, #0]
  25898. if (sys_mutex_new(&mem_mutex) != ERR_OK) {
  25899. 800b0d6: 480b ldr r0, [pc, #44] @ (800b104 <mem_init+0x58>)
  25900. 800b0d8: f001 ff9c bl 800d014 <sys_mutex_new>
  25901. 800b0dc: b900 cbnz r0, 800b0e0 <mem_init+0x34>
  25902. }
  25903. 800b0de: bd38 pop {r3, r4, r5, pc}
  25904. LWIP_ASSERT("failed to create mem_mutex", 0);
  25905. 800b0e0: 4b09 ldr r3, [pc, #36] @ (800b108 <mem_init+0x5c>)
  25906. 800b0e2: f240 221f movw r2, #543 @ 0x21f
  25907. 800b0e6: 4909 ldr r1, [pc, #36] @ (800b10c <mem_init+0x60>)
  25908. 800b0e8: 4809 ldr r0, [pc, #36] @ (800b110 <mem_init+0x64>)
  25909. 800b0ea: f008 f98d bl 8013408 <iprintf>
  25910. }
  25911. 800b0ee: e7f6 b.n 800b0de <mem_init+0x32>
  25912. 800b0f0: 2401305c .word 0x2401305c
  25913. 800b0f4: 30020000 .word 0x30020000
  25914. 800b0f8: 0001ffe8 .word 0x0001ffe8
  25915. 800b0fc: 24013058 .word 0x24013058
  25916. 800b100: 24013050 .word 0x24013050
  25917. 800b104: 24013054 .word 0x24013054
  25918. 800b108: 080158f0 .word 0x080158f0
  25919. 800b10c: 080159cc .word 0x080159cc
  25920. 800b110: 080144e8 .word 0x080144e8
  25921. 0800b114 <mem_free>:
  25922. mem_free(void *rmem)
  25923. {
  25924. struct mem *mem;
  25925. LWIP_MEM_FREE_DECL_PROTECT();
  25926. if (rmem == NULL) {
  25927. 800b114: 2800 cmp r0, #0
  25928. 800b116: d060 beq.n 800b1da <mem_free+0xc6>
  25929. {
  25930. 800b118: b538 push {r3, r4, r5, lr}
  25931. 800b11a: 4604 mov r4, r0
  25932. LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n"));
  25933. return;
  25934. }
  25935. if ((((mem_ptr_t)rmem) & (MEM_ALIGNMENT - 1)) != 0) {
  25936. 800b11c: f010 0f03 tst.w r0, #3
  25937. 800b120: d117 bne.n 800b152 <mem_free+0x3e>
  25938. return;
  25939. }
  25940. /* Get the corresponding struct mem: */
  25941. /* cast through void* to get rid of alignment warnings */
  25942. mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET));
  25943. 800b122: f1a0 050c sub.w r5, r0, #12
  25944. if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) {
  25945. 800b126: 4b2d ldr r3, [pc, #180] @ (800b1dc <mem_free+0xc8>)
  25946. 800b128: 681b ldr r3, [r3, #0]
  25947. 800b12a: 42ab cmp r3, r5
  25948. 800b12c: d805 bhi.n 800b13a <mem_free+0x26>
  25949. 800b12e: f100 030c add.w r3, r0, #12
  25950. 800b132: 4a2b ldr r2, [pc, #172] @ (800b1e0 <mem_free+0xcc>)
  25951. 800b134: 6812 ldr r2, [r2, #0]
  25952. 800b136: 4293 cmp r3, r2
  25953. 800b138: d917 bls.n 800b16a <mem_free+0x56>
  25954. LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory");
  25955. 800b13a: 4b2a ldr r3, [pc, #168] @ (800b1e4 <mem_free+0xd0>)
  25956. 800b13c: f240 227f movw r2, #639 @ 0x27f
  25957. 800b140: 4929 ldr r1, [pc, #164] @ (800b1e8 <mem_free+0xd4>)
  25958. 800b142: 482a ldr r0, [pc, #168] @ (800b1ec <mem_free+0xd8>)
  25959. 800b144: f008 f960 bl 8013408 <iprintf>
  25960. LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n"));
  25961. /* protect mem stats from concurrent access */
  25962. MEM_STATS_INC_LOCKED(illegal);
  25963. 800b148: f001 ff92 bl 800d070 <sys_arch_protect>
  25964. 800b14c: f001 ff9c bl 800d088 <sys_arch_unprotect>
  25965. MEM_SANITY();
  25966. #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
  25967. mem_free_count = 1;
  25968. #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
  25969. LWIP_MEM_FREE_UNPROTECT();
  25970. }
  25971. 800b150: bd38 pop {r3, r4, r5, pc}
  25972. LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment");
  25973. 800b152: 4b24 ldr r3, [pc, #144] @ (800b1e4 <mem_free+0xd0>)
  25974. 800b154: f240 2273 movw r2, #627 @ 0x273
  25975. 800b158: 4925 ldr r1, [pc, #148] @ (800b1f0 <mem_free+0xdc>)
  25976. 800b15a: 4824 ldr r0, [pc, #144] @ (800b1ec <mem_free+0xd8>)
  25977. 800b15c: f008 f954 bl 8013408 <iprintf>
  25978. MEM_STATS_INC_LOCKED(illegal);
  25979. 800b160: f001 ff86 bl 800d070 <sys_arch_protect>
  25980. 800b164: f001 ff90 bl 800d088 <sys_arch_unprotect>
  25981. return;
  25982. 800b168: e7f2 b.n 800b150 <mem_free+0x3c>
  25983. LWIP_MEM_FREE_PROTECT();
  25984. 800b16a: 4822 ldr r0, [pc, #136] @ (800b1f4 <mem_free+0xe0>)
  25985. 800b16c: f001 ff5e bl 800d02c <sys_mutex_lock>
  25986. if (!mem->used) {
  25987. 800b170: f814 3c04 ldrb.w r3, [r4, #-4]
  25988. 800b174: b19b cbz r3, 800b19e <mem_free+0x8a>
  25989. if (!mem_link_valid(mem)) {
  25990. 800b176: 4628 mov r0, r5
  25991. 800b178: f7ff fee8 bl 800af4c <mem_link_valid>
  25992. 800b17c: b1f0 cbz r0, 800b1bc <mem_free+0xa8>
  25993. mem->used = 0;
  25994. 800b17e: 2300 movs r3, #0
  25995. 800b180: f804 3c04 strb.w r3, [r4, #-4]
  25996. if (mem < lfree) {
  25997. 800b184: 4b1c ldr r3, [pc, #112] @ (800b1f8 <mem_free+0xe4>)
  25998. 800b186: 681b ldr r3, [r3, #0]
  25999. 800b188: 42ab cmp r3, r5
  26000. 800b18a: d901 bls.n 800b190 <mem_free+0x7c>
  26001. lfree = mem;
  26002. 800b18c: 4b1a ldr r3, [pc, #104] @ (800b1f8 <mem_free+0xe4>)
  26003. 800b18e: 601d str r5, [r3, #0]
  26004. plug_holes(mem);
  26005. 800b190: 4628 mov r0, r5
  26006. 800b192: f7ff ff0b bl 800afac <plug_holes>
  26007. LWIP_MEM_FREE_UNPROTECT();
  26008. 800b196: 4817 ldr r0, [pc, #92] @ (800b1f4 <mem_free+0xe0>)
  26009. 800b198: f001 ff4f bl 800d03a <sys_mutex_unlock>
  26010. 800b19c: e7d8 b.n 800b150 <mem_free+0x3c>
  26011. LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free");
  26012. 800b19e: 4b11 ldr r3, [pc, #68] @ (800b1e4 <mem_free+0xd0>)
  26013. 800b1a0: f44f 7223 mov.w r2, #652 @ 0x28c
  26014. 800b1a4: 4915 ldr r1, [pc, #84] @ (800b1fc <mem_free+0xe8>)
  26015. 800b1a6: 4811 ldr r0, [pc, #68] @ (800b1ec <mem_free+0xd8>)
  26016. 800b1a8: f008 f92e bl 8013408 <iprintf>
  26017. LWIP_MEM_FREE_UNPROTECT();
  26018. 800b1ac: 4811 ldr r0, [pc, #68] @ (800b1f4 <mem_free+0xe0>)
  26019. 800b1ae: f001 ff44 bl 800d03a <sys_mutex_unlock>
  26020. MEM_STATS_INC_LOCKED(illegal);
  26021. 800b1b2: f001 ff5d bl 800d070 <sys_arch_protect>
  26022. 800b1b6: f001 ff67 bl 800d088 <sys_arch_unprotect>
  26023. return;
  26024. 800b1ba: e7c9 b.n 800b150 <mem_free+0x3c>
  26025. LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free");
  26026. 800b1bc: 4b09 ldr r3, [pc, #36] @ (800b1e4 <mem_free+0xd0>)
  26027. 800b1be: f240 2295 movw r2, #661 @ 0x295
  26028. 800b1c2: 490f ldr r1, [pc, #60] @ (800b200 <mem_free+0xec>)
  26029. 800b1c4: 4809 ldr r0, [pc, #36] @ (800b1ec <mem_free+0xd8>)
  26030. 800b1c6: f008 f91f bl 8013408 <iprintf>
  26031. LWIP_MEM_FREE_UNPROTECT();
  26032. 800b1ca: 480a ldr r0, [pc, #40] @ (800b1f4 <mem_free+0xe0>)
  26033. 800b1cc: f001 ff35 bl 800d03a <sys_mutex_unlock>
  26034. MEM_STATS_INC_LOCKED(illegal);
  26035. 800b1d0: f001 ff4e bl 800d070 <sys_arch_protect>
  26036. 800b1d4: f001 ff58 bl 800d088 <sys_arch_unprotect>
  26037. return;
  26038. 800b1d8: e7ba b.n 800b150 <mem_free+0x3c>
  26039. 800b1da: 4770 bx lr
  26040. 800b1dc: 2401305c .word 0x2401305c
  26041. 800b1e0: 24013058 .word 0x24013058
  26042. 800b1e4: 080158f0 .word 0x080158f0
  26043. 800b1e8: 08015a0c .word 0x08015a0c
  26044. 800b1ec: 080144e8 .word 0x080144e8
  26045. 800b1f0: 080159e8 .word 0x080159e8
  26046. 800b1f4: 24013054 .word 0x24013054
  26047. 800b1f8: 24013050 .word 0x24013050
  26048. 800b1fc: 08015a28 .word 0x08015a28
  26049. 800b200: 08015a50 .word 0x08015a50
  26050. 0800b204 <mem_trim>:
  26051. * or NULL if newsize is > old size, in which case rmem is NOT touched
  26052. * or freed!
  26053. */
  26054. void *
  26055. mem_trim(void *rmem, mem_size_t new_size)
  26056. {
  26057. 800b204: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  26058. 800b208: 4604 mov r4, r0
  26059. /* use the FREE_PROTECT here: it protects with sem OR SYS_ARCH_PROTECT */
  26060. LWIP_MEM_FREE_DECL_PROTECT();
  26061. /* Expand the size of the allocated memory region so that we can
  26062. adjust for alignment. */
  26063. newsize = (mem_size_t)LWIP_MEM_ALIGN_SIZE(new_size);
  26064. 800b20a: 1ccd adds r5, r1, #3
  26065. 800b20c: f025 0503 bic.w r5, r5, #3
  26066. if (newsize < MIN_SIZE_ALIGNED) {
  26067. 800b210: 2d0b cmp r5, #11
  26068. 800b212: d800 bhi.n 800b216 <mem_trim+0x12>
  26069. /* every data block must be at least MIN_SIZE_ALIGNED long */
  26070. newsize = MIN_SIZE_ALIGNED;
  26071. 800b214: 250c movs r5, #12
  26072. }
  26073. #if MEM_OVERFLOW_CHECK
  26074. newsize += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED;
  26075. #endif
  26076. if ((newsize > MEM_SIZE_ALIGNED) || (newsize < new_size)) {
  26077. 800b216: 428d cmp r5, r1
  26078. 800b218: bf2c ite cs
  26079. 800b21a: 2100 movcs r1, #0
  26080. 800b21c: 2101 movcc r1, #1
  26081. 800b21e: 4b53 ldr r3, [pc, #332] @ (800b36c <mem_trim+0x168>)
  26082. 800b220: 429d cmp r5, r3
  26083. 800b222: bf88 it hi
  26084. 800b224: f041 0101 orrhi.w r1, r1, #1
  26085. 800b228: 2900 cmp r1, #0
  26086. 800b22a: f040 8098 bne.w 800b35e <mem_trim+0x15a>
  26087. return NULL;
  26088. }
  26089. LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram &&
  26090. 800b22e: 4b50 ldr r3, [pc, #320] @ (800b370 <mem_trim+0x16c>)
  26091. 800b230: 681b ldr r3, [r3, #0]
  26092. 800b232: 42a3 cmp r3, r4
  26093. 800b234: d803 bhi.n 800b23e <mem_trim+0x3a>
  26094. 800b236: 4b4f ldr r3, [pc, #316] @ (800b374 <mem_trim+0x170>)
  26095. 800b238: 681b ldr r3, [r3, #0]
  26096. 800b23a: 42a3 cmp r3, r4
  26097. 800b23c: d806 bhi.n 800b24c <mem_trim+0x48>
  26098. 800b23e: 4b4e ldr r3, [pc, #312] @ (800b378 <mem_trim+0x174>)
  26099. 800b240: f240 22d1 movw r2, #721 @ 0x2d1
  26100. 800b244: 494d ldr r1, [pc, #308] @ (800b37c <mem_trim+0x178>)
  26101. 800b246: 484e ldr r0, [pc, #312] @ (800b380 <mem_trim+0x17c>)
  26102. 800b248: f008 f8de bl 8013408 <iprintf>
  26103. (u8_t *)rmem < (u8_t *)ram_end);
  26104. if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
  26105. 800b24c: 4b48 ldr r3, [pc, #288] @ (800b370 <mem_trim+0x16c>)
  26106. 800b24e: 681b ldr r3, [r3, #0]
  26107. 800b250: 42a3 cmp r3, r4
  26108. 800b252: d83d bhi.n 800b2d0 <mem_trim+0xcc>
  26109. 800b254: 4b47 ldr r3, [pc, #284] @ (800b374 <mem_trim+0x170>)
  26110. 800b256: 681b ldr r3, [r3, #0]
  26111. 800b258: 42a3 cmp r3, r4
  26112. 800b25a: d939 bls.n 800b2d0 <mem_trim+0xcc>
  26113. mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET));
  26114. #if MEM_OVERFLOW_CHECK
  26115. mem_overflow_check_element(mem);
  26116. #endif
  26117. /* ... and its offset pointer */
  26118. ptr = mem_to_ptr(mem);
  26119. 800b25c: f1a4 000c sub.w r0, r4, #12
  26120. 800b260: f7ff fe6e bl 800af40 <mem_to_ptr>
  26121. 800b264: 4607 mov r7, r0
  26122. size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD));
  26123. 800b266: f854 6c0c ldr.w r6, [r4, #-12]
  26124. 800b26a: 1a36 subs r6, r6, r0
  26125. 800b26c: 3e0c subs r6, #12
  26126. LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size);
  26127. 800b26e: 42b5 cmp r5, r6
  26128. 800b270: d835 bhi.n 800b2de <mem_trim+0xda>
  26129. if (newsize > size) {
  26130. 800b272: 42b5 cmp r5, r6
  26131. 800b274: d875 bhi.n 800b362 <mem_trim+0x15e>
  26132. /* not supported */
  26133. return NULL;
  26134. }
  26135. if (newsize == size) {
  26136. 800b276: d076 beq.n 800b366 <mem_trim+0x162>
  26137. /* No change in size, simply return */
  26138. return rmem;
  26139. }
  26140. /* protect the heap from concurrent access */
  26141. LWIP_MEM_FREE_PROTECT();
  26142. 800b278: 4842 ldr r0, [pc, #264] @ (800b384 <mem_trim+0x180>)
  26143. 800b27a: f001 fed7 bl 800d02c <sys_mutex_lock>
  26144. mem2 = ptr_to_mem(mem->next);
  26145. 800b27e: f854 9c0c ldr.w r9, [r4, #-12]
  26146. 800b282: 4648 mov r0, r9
  26147. 800b284: f7ff fe56 bl 800af34 <ptr_to_mem>
  26148. 800b288: 4680 mov r8, r0
  26149. if (mem2->used == 0) {
  26150. 800b28a: 7a03 ldrb r3, [r0, #8]
  26151. 800b28c: 2b00 cmp r3, #0
  26152. 800b28e: d13c bne.n 800b30a <mem_trim+0x106>
  26153. /* The next struct is unused, we can simply move it at little */
  26154. mem_size_t next;
  26155. LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
  26156. 800b290: 4b36 ldr r3, [pc, #216] @ (800b36c <mem_trim+0x168>)
  26157. 800b292: 4599 cmp r9, r3
  26158. 800b294: d02b beq.n 800b2ee <mem_trim+0xea>
  26159. /* remember the old next pointer */
  26160. next = mem2->next;
  26161. 800b296: f8d8 6000 ldr.w r6, [r8]
  26162. /* create new struct mem which is moved directly after the shrinked mem */
  26163. ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize);
  26164. 800b29a: 443d add r5, r7
  26165. 800b29c: 350c adds r5, #12
  26166. if (lfree == mem2) {
  26167. 800b29e: 4b3a ldr r3, [pc, #232] @ (800b388 <mem_trim+0x184>)
  26168. 800b2a0: 681b ldr r3, [r3, #0]
  26169. 800b2a2: 4543 cmp r3, r8
  26170. 800b2a4: d02b beq.n 800b2fe <mem_trim+0xfa>
  26171. lfree = ptr_to_mem(ptr2);
  26172. }
  26173. mem2 = ptr_to_mem(ptr2);
  26174. 800b2a6: 4628 mov r0, r5
  26175. 800b2a8: f7ff fe44 bl 800af34 <ptr_to_mem>
  26176. mem2->used = 0;
  26177. 800b2ac: 2300 movs r3, #0
  26178. 800b2ae: 7203 strb r3, [r0, #8]
  26179. /* restore the next pointer */
  26180. mem2->next = next;
  26181. 800b2b0: 6006 str r6, [r0, #0]
  26182. /* link it back to mem */
  26183. mem2->prev = ptr;
  26184. 800b2b2: 6047 str r7, [r0, #4]
  26185. /* link mem to it */
  26186. mem->next = ptr2;
  26187. 800b2b4: f844 5c0c str.w r5, [r4, #-12]
  26188. /* last thing to restore linked list: as we have moved mem2,
  26189. * let 'mem2->next->prev' point to mem2 again. but only if mem2->next is not
  26190. * the end of the heap */
  26191. if (mem2->next != MEM_SIZE_ALIGNED) {
  26192. 800b2b8: 6800 ldr r0, [r0, #0]
  26193. 800b2ba: 4b2c ldr r3, [pc, #176] @ (800b36c <mem_trim+0x168>)
  26194. 800b2bc: 4298 cmp r0, r3
  26195. 800b2be: d002 beq.n 800b2c6 <mem_trim+0xc2>
  26196. ptr_to_mem(mem2->next)->prev = ptr2;
  26197. 800b2c0: f7ff fe38 bl 800af34 <ptr_to_mem>
  26198. 800b2c4: 6045 str r5, [r0, #4]
  26199. #endif
  26200. MEM_SANITY();
  26201. #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
  26202. mem_free_count = 1;
  26203. #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
  26204. LWIP_MEM_FREE_UNPROTECT();
  26205. 800b2c6: 482f ldr r0, [pc, #188] @ (800b384 <mem_trim+0x180>)
  26206. 800b2c8: f001 feb7 bl 800d03a <sys_mutex_unlock>
  26207. return rmem;
  26208. 800b2cc: 4620 mov r0, r4
  26209. 800b2ce: e004 b.n 800b2da <mem_trim+0xd6>
  26210. MEM_STATS_INC_LOCKED(illegal);
  26211. 800b2d0: f001 fece bl 800d070 <sys_arch_protect>
  26212. 800b2d4: f001 fed8 bl 800d088 <sys_arch_unprotect>
  26213. return rmem;
  26214. 800b2d8: 4620 mov r0, r4
  26215. }
  26216. 800b2da: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  26217. LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size);
  26218. 800b2de: 4b26 ldr r3, [pc, #152] @ (800b378 <mem_trim+0x174>)
  26219. 800b2e0: f44f 7239 mov.w r2, #740 @ 0x2e4
  26220. 800b2e4: 4929 ldr r1, [pc, #164] @ (800b38c <mem_trim+0x188>)
  26221. 800b2e6: 4826 ldr r0, [pc, #152] @ (800b380 <mem_trim+0x17c>)
  26222. 800b2e8: f008 f88e bl 8013408 <iprintf>
  26223. 800b2ec: e7c1 b.n 800b272 <mem_trim+0x6e>
  26224. LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
  26225. 800b2ee: 4b22 ldr r3, [pc, #136] @ (800b378 <mem_trim+0x174>)
  26226. 800b2f0: f240 22f5 movw r2, #757 @ 0x2f5
  26227. 800b2f4: 4926 ldr r1, [pc, #152] @ (800b390 <mem_trim+0x18c>)
  26228. 800b2f6: 4822 ldr r0, [pc, #136] @ (800b380 <mem_trim+0x17c>)
  26229. 800b2f8: f008 f886 bl 8013408 <iprintf>
  26230. 800b2fc: e7cb b.n 800b296 <mem_trim+0x92>
  26231. lfree = ptr_to_mem(ptr2);
  26232. 800b2fe: 4628 mov r0, r5
  26233. 800b300: f7ff fe18 bl 800af34 <ptr_to_mem>
  26234. 800b304: 4b20 ldr r3, [pc, #128] @ (800b388 <mem_trim+0x184>)
  26235. 800b306: 6018 str r0, [r3, #0]
  26236. 800b308: e7cd b.n 800b2a6 <mem_trim+0xa2>
  26237. } else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) {
  26238. 800b30a: f105 0318 add.w r3, r5, #24
  26239. 800b30e: 42b3 cmp r3, r6
  26240. 800b310: d8d9 bhi.n 800b2c6 <mem_trim+0xc2>
  26241. ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize);
  26242. 800b312: 443d add r5, r7
  26243. 800b314: 350c adds r5, #12
  26244. LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
  26245. 800b316: 4b15 ldr r3, [pc, #84] @ (800b36c <mem_trim+0x168>)
  26246. 800b318: 4599 cmp r9, r3
  26247. 800b31a: d018 beq.n 800b34e <mem_trim+0x14a>
  26248. mem2 = ptr_to_mem(ptr2);
  26249. 800b31c: 4628 mov r0, r5
  26250. 800b31e: f7ff fe09 bl 800af34 <ptr_to_mem>
  26251. if (mem2 < lfree) {
  26252. 800b322: 4b19 ldr r3, [pc, #100] @ (800b388 <mem_trim+0x184>)
  26253. 800b324: 681b ldr r3, [r3, #0]
  26254. 800b326: 4283 cmp r3, r0
  26255. 800b328: d901 bls.n 800b32e <mem_trim+0x12a>
  26256. lfree = mem2;
  26257. 800b32a: 4b17 ldr r3, [pc, #92] @ (800b388 <mem_trim+0x184>)
  26258. 800b32c: 6018 str r0, [r3, #0]
  26259. mem2->used = 0;
  26260. 800b32e: 2300 movs r3, #0
  26261. 800b330: 7203 strb r3, [r0, #8]
  26262. mem2->next = mem->next;
  26263. 800b332: f854 3c0c ldr.w r3, [r4, #-12]
  26264. 800b336: 6003 str r3, [r0, #0]
  26265. mem2->prev = ptr;
  26266. 800b338: 6047 str r7, [r0, #4]
  26267. mem->next = ptr2;
  26268. 800b33a: f844 5c0c str.w r5, [r4, #-12]
  26269. if (mem2->next != MEM_SIZE_ALIGNED) {
  26270. 800b33e: 6800 ldr r0, [r0, #0]
  26271. 800b340: 4b0a ldr r3, [pc, #40] @ (800b36c <mem_trim+0x168>)
  26272. 800b342: 4298 cmp r0, r3
  26273. 800b344: d0bf beq.n 800b2c6 <mem_trim+0xc2>
  26274. ptr_to_mem(mem2->next)->prev = ptr2;
  26275. 800b346: f7ff fdf5 bl 800af34 <ptr_to_mem>
  26276. 800b34a: 6045 str r5, [r0, #4]
  26277. 800b34c: e7bb b.n 800b2c6 <mem_trim+0xc2>
  26278. LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED);
  26279. 800b34e: 4b0a ldr r3, [pc, #40] @ (800b378 <mem_trim+0x174>)
  26280. 800b350: f240 3216 movw r2, #790 @ 0x316
  26281. 800b354: 490e ldr r1, [pc, #56] @ (800b390 <mem_trim+0x18c>)
  26282. 800b356: 480a ldr r0, [pc, #40] @ (800b380 <mem_trim+0x17c>)
  26283. 800b358: f008 f856 bl 8013408 <iprintf>
  26284. 800b35c: e7de b.n 800b31c <mem_trim+0x118>
  26285. return NULL;
  26286. 800b35e: 2000 movs r0, #0
  26287. 800b360: e7bb b.n 800b2da <mem_trim+0xd6>
  26288. return NULL;
  26289. 800b362: 2000 movs r0, #0
  26290. 800b364: e7b9 b.n 800b2da <mem_trim+0xd6>
  26291. return rmem;
  26292. 800b366: 4620 mov r0, r4
  26293. 800b368: e7b7 b.n 800b2da <mem_trim+0xd6>
  26294. 800b36a: bf00 nop
  26295. 800b36c: 0001ffe8 .word 0x0001ffe8
  26296. 800b370: 2401305c .word 0x2401305c
  26297. 800b374: 24013058 .word 0x24013058
  26298. 800b378: 080158f0 .word 0x080158f0
  26299. 800b37c: 08015a84 .word 0x08015a84
  26300. 800b380: 080144e8 .word 0x080144e8
  26301. 800b384: 24013054 .word 0x24013054
  26302. 800b388: 24013050 .word 0x24013050
  26303. 800b38c: 08015a9c .word 0x08015a9c
  26304. 800b390: 08015abc .word 0x08015abc
  26305. 0800b394 <mem_malloc>:
  26306. #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
  26307. u8_t local_mem_free_count = 0;
  26308. #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
  26309. LWIP_MEM_ALLOC_DECL_PROTECT();
  26310. if (size_in == 0) {
  26311. 800b394: 2800 cmp r0, #0
  26312. 800b396: f000 809e beq.w 800b4d6 <mem_malloc+0x142>
  26313. {
  26314. 800b39a: b5f8 push {r3, r4, r5, r6, r7, lr}
  26315. 800b39c: 4603 mov r3, r0
  26316. return NULL;
  26317. }
  26318. /* Expand the size of the allocated memory region so that we can
  26319. adjust for alignment. */
  26320. size = (mem_size_t)LWIP_MEM_ALIGN_SIZE(size_in);
  26321. 800b39e: 1cc6 adds r6, r0, #3
  26322. 800b3a0: f026 0603 bic.w r6, r6, #3
  26323. if (size < MIN_SIZE_ALIGNED) {
  26324. 800b3a4: 2e0b cmp r6, #11
  26325. 800b3a6: d800 bhi.n 800b3aa <mem_malloc+0x16>
  26326. /* every data block must be at least MIN_SIZE_ALIGNED long */
  26327. size = MIN_SIZE_ALIGNED;
  26328. 800b3a8: 260c movs r6, #12
  26329. }
  26330. #if MEM_OVERFLOW_CHECK
  26331. size += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED;
  26332. #endif
  26333. if ((size > MEM_SIZE_ALIGNED) || (size < size_in)) {
  26334. 800b3aa: 429e cmp r6, r3
  26335. 800b3ac: bf2c ite cs
  26336. 800b3ae: 2300 movcs r3, #0
  26337. 800b3b0: 2301 movcc r3, #1
  26338. 800b3b2: 4a4b ldr r2, [pc, #300] @ (800b4e0 <mem_malloc+0x14c>)
  26339. 800b3b4: 4296 cmp r6, r2
  26340. 800b3b6: bf88 it hi
  26341. 800b3b8: f043 0301 orrhi.w r3, r3, #1
  26342. 800b3bc: 2b00 cmp r3, #0
  26343. 800b3be: f040 808c bne.w 800b4da <mem_malloc+0x146>
  26344. return NULL;
  26345. }
  26346. /* protect the heap from concurrent access */
  26347. sys_mutex_lock(&mem_mutex);
  26348. 800b3c2: 4848 ldr r0, [pc, #288] @ (800b4e4 <mem_malloc+0x150>)
  26349. 800b3c4: f001 fe32 bl 800d02c <sys_mutex_lock>
  26350. #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
  26351. /* Scan through the heap searching for a free block that is big enough,
  26352. * beginning with the lowest free block.
  26353. */
  26354. for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
  26355. 800b3c8: 4b47 ldr r3, [pc, #284] @ (800b4e8 <mem_malloc+0x154>)
  26356. 800b3ca: 6818 ldr r0, [r3, #0]
  26357. 800b3cc: f7ff fdb8 bl 800af40 <mem_to_ptr>
  26358. 800b3d0: 4605 mov r5, r0
  26359. 800b3d2: e04f b.n 800b474 <mem_malloc+0xe0>
  26360. * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty
  26361. * region that couldn't hold data, but when mem->next gets freed,
  26362. * the 2 regions would be combined, resulting in more free memory
  26363. */
  26364. ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + size);
  26365. LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED);
  26366. 800b3d4: 4b45 ldr r3, [pc, #276] @ (800b4ec <mem_malloc+0x158>)
  26367. 800b3d6: f240 3287 movw r2, #903 @ 0x387
  26368. 800b3da: 4945 ldr r1, [pc, #276] @ (800b4f0 <mem_malloc+0x15c>)
  26369. 800b3dc: 4845 ldr r0, [pc, #276] @ (800b4f4 <mem_malloc+0x160>)
  26370. 800b3de: f008 f813 bl 8013408 <iprintf>
  26371. 800b3e2: e060 b.n 800b4a6 <mem_malloc+0x112>
  26372. * take care of this).
  26373. * -> near fit or exact fit: do not split, no mem2 creation
  26374. * also can't move mem->next directly behind mem, since mem->next
  26375. * will always be used at this point!
  26376. */
  26377. mem->used = 1;
  26378. 800b3e4: 2301 movs r3, #1
  26379. 800b3e6: 7203 strb r3, [r0, #8]
  26380. MEM_STATS_INC_USED(used, mem->next - mem_to_ptr(mem));
  26381. }
  26382. #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
  26383. mem_malloc_adjust_lfree:
  26384. #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
  26385. if (mem == lfree) {
  26386. 800b3e8: 4b3f ldr r3, [pc, #252] @ (800b4e8 <mem_malloc+0x154>)
  26387. 800b3ea: 6818 ldr r0, [r3, #0]
  26388. 800b3ec: 42a0 cmp r0, r4
  26389. 800b3ee: d012 beq.n 800b416 <mem_malloc+0x82>
  26390. }
  26391. lfree = cur;
  26392. LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
  26393. }
  26394. LWIP_MEM_ALLOC_UNPROTECT();
  26395. sys_mutex_unlock(&mem_mutex);
  26396. 800b3f0: 483c ldr r0, [pc, #240] @ (800b4e4 <mem_malloc+0x150>)
  26397. 800b3f2: f001 fe22 bl 800d03a <sys_mutex_unlock>
  26398. LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
  26399. 800b3f6: 4426 add r6, r4
  26400. 800b3f8: 360c adds r6, #12
  26401. 800b3fa: 4b3f ldr r3, [pc, #252] @ (800b4f8 <mem_malloc+0x164>)
  26402. 800b3fc: 681b ldr r3, [r3, #0]
  26403. 800b3fe: 429e cmp r6, r3
  26404. 800b400: d81f bhi.n 800b442 <mem_malloc+0xae>
  26405. (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end);
  26406. LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
  26407. 800b402: f014 0503 ands.w r5, r4, #3
  26408. 800b406: d124 bne.n 800b452 <mem_malloc+0xbe>
  26409. ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0);
  26410. LWIP_ASSERT("mem_malloc: sanity check alignment",
  26411. 800b408: bb5d cbnz r5, 800b462 <mem_malloc+0xce>
  26412. #if MEM_OVERFLOW_CHECK
  26413. mem_overflow_init_element(mem, size_in);
  26414. #endif
  26415. MEM_SANITY();
  26416. return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET;
  26417. 800b40a: f104 000c add.w r0, r4, #12
  26418. 800b40e: e061 b.n 800b4d4 <mem_malloc+0x140>
  26419. cur = ptr_to_mem(cur->next);
  26420. 800b410: 6800 ldr r0, [r0, #0]
  26421. 800b412: f7ff fd8f bl 800af34 <ptr_to_mem>
  26422. while (cur->used && cur != ram_end) {
  26423. 800b416: 7a03 ldrb r3, [r0, #8]
  26424. 800b418: b11b cbz r3, 800b422 <mem_malloc+0x8e>
  26425. 800b41a: 4a37 ldr r2, [pc, #220] @ (800b4f8 <mem_malloc+0x164>)
  26426. 800b41c: 6812 ldr r2, [r2, #0]
  26427. 800b41e: 4282 cmp r2, r0
  26428. 800b420: d1f6 bne.n 800b410 <mem_malloc+0x7c>
  26429. lfree = cur;
  26430. 800b422: 4a31 ldr r2, [pc, #196] @ (800b4e8 <mem_malloc+0x154>)
  26431. 800b424: 6010 str r0, [r2, #0]
  26432. LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used)));
  26433. 800b426: 4a34 ldr r2, [pc, #208] @ (800b4f8 <mem_malloc+0x164>)
  26434. 800b428: 6812 ldr r2, [r2, #0]
  26435. 800b42a: 4282 cmp r2, r0
  26436. 800b42c: d0e0 beq.n 800b3f0 <mem_malloc+0x5c>
  26437. 800b42e: 2b00 cmp r3, #0
  26438. 800b430: d0de beq.n 800b3f0 <mem_malloc+0x5c>
  26439. 800b432: 4b2e ldr r3, [pc, #184] @ (800b4ec <mem_malloc+0x158>)
  26440. 800b434: f240 32b5 movw r2, #949 @ 0x3b5
  26441. 800b438: 4930 ldr r1, [pc, #192] @ (800b4fc <mem_malloc+0x168>)
  26442. 800b43a: 482e ldr r0, [pc, #184] @ (800b4f4 <mem_malloc+0x160>)
  26443. 800b43c: f007 ffe4 bl 8013408 <iprintf>
  26444. 800b440: e7d6 b.n 800b3f0 <mem_malloc+0x5c>
  26445. LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.",
  26446. 800b442: 4b2a ldr r3, [pc, #168] @ (800b4ec <mem_malloc+0x158>)
  26447. 800b444: f240 32b9 movw r2, #953 @ 0x3b9
  26448. 800b448: 492d ldr r1, [pc, #180] @ (800b500 <mem_malloc+0x16c>)
  26449. 800b44a: 482a ldr r0, [pc, #168] @ (800b4f4 <mem_malloc+0x160>)
  26450. 800b44c: f007 ffdc bl 8013408 <iprintf>
  26451. 800b450: e7d7 b.n 800b402 <mem_malloc+0x6e>
  26452. LWIP_ASSERT("mem_malloc: allocated memory properly aligned.",
  26453. 800b452: 4b26 ldr r3, [pc, #152] @ (800b4ec <mem_malloc+0x158>)
  26454. 800b454: f240 32bb movw r2, #955 @ 0x3bb
  26455. 800b458: 492a ldr r1, [pc, #168] @ (800b504 <mem_malloc+0x170>)
  26456. 800b45a: 4826 ldr r0, [pc, #152] @ (800b4f4 <mem_malloc+0x160>)
  26457. 800b45c: f007 ffd4 bl 8013408 <iprintf>
  26458. 800b460: e7d2 b.n 800b408 <mem_malloc+0x74>
  26459. LWIP_ASSERT("mem_malloc: sanity check alignment",
  26460. 800b462: 4b22 ldr r3, [pc, #136] @ (800b4ec <mem_malloc+0x158>)
  26461. 800b464: f240 32bd movw r2, #957 @ 0x3bd
  26462. 800b468: 4927 ldr r1, [pc, #156] @ (800b508 <mem_malloc+0x174>)
  26463. 800b46a: 4822 ldr r0, [pc, #136] @ (800b4f4 <mem_malloc+0x160>)
  26464. 800b46c: f007 ffcc bl 8013408 <iprintf>
  26465. 800b470: e7cb b.n 800b40a <mem_malloc+0x76>
  26466. ptr = ptr_to_mem(ptr)->next) {
  26467. 800b472: 6825 ldr r5, [r4, #0]
  26468. for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size;
  26469. 800b474: 4b1a ldr r3, [pc, #104] @ (800b4e0 <mem_malloc+0x14c>)
  26470. 800b476: 1b9b subs r3, r3, r6
  26471. 800b478: 42ab cmp r3, r5
  26472. 800b47a: d927 bls.n 800b4cc <mem_malloc+0x138>
  26473. mem = ptr_to_mem(ptr);
  26474. 800b47c: 4628 mov r0, r5
  26475. 800b47e: f7ff fd59 bl 800af34 <ptr_to_mem>
  26476. 800b482: 4604 mov r4, r0
  26477. if ((!mem->used) &&
  26478. 800b484: 7a03 ldrb r3, [r0, #8]
  26479. 800b486: 2b00 cmp r3, #0
  26480. 800b488: d1f3 bne.n 800b472 <mem_malloc+0xde>
  26481. (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) {
  26482. 800b48a: 6803 ldr r3, [r0, #0]
  26483. 800b48c: 1b5b subs r3, r3, r5
  26484. 800b48e: 3b0c subs r3, #12
  26485. if ((!mem->used) &&
  26486. 800b490: 42b3 cmp r3, r6
  26487. 800b492: d3ee bcc.n 800b472 <mem_malloc+0xde>
  26488. if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) {
  26489. 800b494: f106 0218 add.w r2, r6, #24
  26490. 800b498: 4293 cmp r3, r2
  26491. 800b49a: d3a3 bcc.n 800b3e4 <mem_malloc+0x50>
  26492. ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + size);
  26493. 800b49c: 19af adds r7, r5, r6
  26494. 800b49e: 370c adds r7, #12
  26495. LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED);
  26496. 800b4a0: 4b0f ldr r3, [pc, #60] @ (800b4e0 <mem_malloc+0x14c>)
  26497. 800b4a2: 429f cmp r7, r3
  26498. 800b4a4: d096 beq.n 800b3d4 <mem_malloc+0x40>
  26499. mem2 = ptr_to_mem(ptr2);
  26500. 800b4a6: 4638 mov r0, r7
  26501. 800b4a8: f7ff fd44 bl 800af34 <ptr_to_mem>
  26502. mem2->used = 0;
  26503. 800b4ac: 2300 movs r3, #0
  26504. 800b4ae: 7203 strb r3, [r0, #8]
  26505. mem2->next = mem->next;
  26506. 800b4b0: 6823 ldr r3, [r4, #0]
  26507. 800b4b2: 6003 str r3, [r0, #0]
  26508. mem2->prev = ptr;
  26509. 800b4b4: 6045 str r5, [r0, #4]
  26510. mem->next = ptr2;
  26511. 800b4b6: 6027 str r7, [r4, #0]
  26512. mem->used = 1;
  26513. 800b4b8: 2301 movs r3, #1
  26514. 800b4ba: 7223 strb r3, [r4, #8]
  26515. if (mem2->next != MEM_SIZE_ALIGNED) {
  26516. 800b4bc: 6800 ldr r0, [r0, #0]
  26517. 800b4be: 4b08 ldr r3, [pc, #32] @ (800b4e0 <mem_malloc+0x14c>)
  26518. 800b4c0: 4298 cmp r0, r3
  26519. 800b4c2: d091 beq.n 800b3e8 <mem_malloc+0x54>
  26520. ptr_to_mem(mem2->next)->prev = ptr2;
  26521. 800b4c4: f7ff fd36 bl 800af34 <ptr_to_mem>
  26522. 800b4c8: 6047 str r7, [r0, #4]
  26523. 800b4ca: e78d b.n 800b3e8 <mem_malloc+0x54>
  26524. /* if we got interrupted by a mem_free, try again */
  26525. } while (local_mem_free_count != 0);
  26526. #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */
  26527. MEM_STATS_INC(err);
  26528. LWIP_MEM_ALLOC_UNPROTECT();
  26529. sys_mutex_unlock(&mem_mutex);
  26530. 800b4cc: 4805 ldr r0, [pc, #20] @ (800b4e4 <mem_malloc+0x150>)
  26531. 800b4ce: f001 fdb4 bl 800d03a <sys_mutex_unlock>
  26532. LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size));
  26533. return NULL;
  26534. 800b4d2: 2000 movs r0, #0
  26535. }
  26536. 800b4d4: bdf8 pop {r3, r4, r5, r6, r7, pc}
  26537. return NULL;
  26538. 800b4d6: 2000 movs r0, #0
  26539. }
  26540. 800b4d8: 4770 bx lr
  26541. return NULL;
  26542. 800b4da: 2000 movs r0, #0
  26543. 800b4dc: e7fa b.n 800b4d4 <mem_malloc+0x140>
  26544. 800b4de: bf00 nop
  26545. 800b4e0: 0001ffe8 .word 0x0001ffe8
  26546. 800b4e4: 24013054 .word 0x24013054
  26547. 800b4e8: 24013050 .word 0x24013050
  26548. 800b4ec: 080158f0 .word 0x080158f0
  26549. 800b4f0: 08015abc .word 0x08015abc
  26550. 800b4f4: 080144e8 .word 0x080144e8
  26551. 800b4f8: 24013058 .word 0x24013058
  26552. 800b4fc: 08015ad0 .word 0x08015ad0
  26553. 800b500: 08015aec .word 0x08015aec
  26554. 800b504: 08015b1c .word 0x08015b1c
  26555. 800b508: 08015b4c .word 0x08015b4c
  26556. 0800b50c <do_memp_malloc_pool>:
  26557. #if !MEMP_OVERFLOW_CHECK
  26558. do_memp_malloc_pool(const struct memp_desc *desc)
  26559. #else
  26560. do_memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int line)
  26561. #endif
  26562. {
  26563. 800b50c: b538 push {r3, r4, r5, lr}
  26564. 800b50e: 4604 mov r4, r0
  26565. #if MEMP_MEM_MALLOC
  26566. memp = (struct memp *)mem_malloc(MEMP_SIZE + MEMP_ALIGN_SIZE(desc->size));
  26567. SYS_ARCH_PROTECT(old_level);
  26568. #else /* MEMP_MEM_MALLOC */
  26569. SYS_ARCH_PROTECT(old_level);
  26570. 800b510: f001 fdae bl 800d070 <sys_arch_protect>
  26571. 800b514: 4605 mov r5, r0
  26572. memp = *desc->tab;
  26573. 800b516: 68e3 ldr r3, [r4, #12]
  26574. 800b518: 681c ldr r4, [r3, #0]
  26575. #endif /* MEMP_MEM_MALLOC */
  26576. if (memp != NULL) {
  26577. 800b51a: b18c cbz r4, 800b540 <do_memp_malloc_pool+0x34>
  26578. #if !MEMP_MEM_MALLOC
  26579. #if MEMP_OVERFLOW_CHECK == 1
  26580. memp_overflow_check_element(memp, desc);
  26581. #endif /* MEMP_OVERFLOW_CHECK */
  26582. *desc->tab = memp->next;
  26583. 800b51c: 6822 ldr r2, [r4, #0]
  26584. 800b51e: 601a str r2, [r3, #0]
  26585. memp->line = line;
  26586. #if MEMP_MEM_MALLOC
  26587. memp_overflow_init_element(memp, desc);
  26588. #endif /* MEMP_MEM_MALLOC */
  26589. #endif /* MEMP_OVERFLOW_CHECK */
  26590. LWIP_ASSERT("memp_malloc: memp properly aligned",
  26591. 800b520: f014 0f03 tst.w r4, #3
  26592. 800b524: d104 bne.n 800b530 <do_memp_malloc_pool+0x24>
  26593. desc->stats->used++;
  26594. if (desc->stats->used > desc->stats->max) {
  26595. desc->stats->max = desc->stats->used;
  26596. }
  26597. #endif
  26598. SYS_ARCH_UNPROTECT(old_level);
  26599. 800b526: 4628 mov r0, r5
  26600. 800b528: f001 fdae bl 800d088 <sys_arch_unprotect>
  26601. SYS_ARCH_UNPROTECT(old_level);
  26602. LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc));
  26603. }
  26604. return NULL;
  26605. }
  26606. 800b52c: 4620 mov r0, r4
  26607. 800b52e: bd38 pop {r3, r4, r5, pc}
  26608. LWIP_ASSERT("memp_malloc: memp properly aligned",
  26609. 800b530: 4b05 ldr r3, [pc, #20] @ (800b548 <do_memp_malloc_pool+0x3c>)
  26610. 800b532: f44f 728c mov.w r2, #280 @ 0x118
  26611. 800b536: 4905 ldr r1, [pc, #20] @ (800b54c <do_memp_malloc_pool+0x40>)
  26612. 800b538: 4805 ldr r0, [pc, #20] @ (800b550 <do_memp_malloc_pool+0x44>)
  26613. 800b53a: f007 ff65 bl 8013408 <iprintf>
  26614. 800b53e: e7f2 b.n 800b526 <do_memp_malloc_pool+0x1a>
  26615. SYS_ARCH_UNPROTECT(old_level);
  26616. 800b540: f001 fda2 bl 800d088 <sys_arch_unprotect>
  26617. return NULL;
  26618. 800b544: e7f2 b.n 800b52c <do_memp_malloc_pool+0x20>
  26619. 800b546: bf00 nop
  26620. 800b548: 08015b70 .word 0x08015b70
  26621. 800b54c: 08015bd0 .word 0x08015bd0
  26622. 800b550: 080144e8 .word 0x080144e8
  26623. 0800b554 <do_memp_free_pool>:
  26624. return memp;
  26625. }
  26626. static void
  26627. do_memp_free_pool(const struct memp_desc *desc, void *mem)
  26628. {
  26629. 800b554: b538 push {r3, r4, r5, lr}
  26630. 800b556: 4605 mov r5, r0
  26631. 800b558: 460c mov r4, r1
  26632. struct memp *memp;
  26633. SYS_ARCH_DECL_PROTECT(old_level);
  26634. LWIP_ASSERT("memp_free: mem properly aligned",
  26635. 800b55a: f011 0f03 tst.w r1, #3
  26636. 800b55e: d109 bne.n 800b574 <do_memp_free_pool+0x20>
  26637. ((mem_ptr_t)mem % MEM_ALIGNMENT) == 0);
  26638. /* cast through void* to get rid of alignment warnings */
  26639. memp = (struct memp *)(void *)((u8_t *)mem - MEMP_SIZE);
  26640. SYS_ARCH_PROTECT(old_level);
  26641. 800b560: f001 fd86 bl 800d070 <sys_arch_protect>
  26642. #if MEMP_MEM_MALLOC
  26643. LWIP_UNUSED_ARG(desc);
  26644. SYS_ARCH_UNPROTECT(old_level);
  26645. mem_free(memp);
  26646. #else /* MEMP_MEM_MALLOC */
  26647. memp->next = *desc->tab;
  26648. 800b564: 68eb ldr r3, [r5, #12]
  26649. 800b566: 681b ldr r3, [r3, #0]
  26650. 800b568: 6023 str r3, [r4, #0]
  26651. *desc->tab = memp;
  26652. 800b56a: 68eb ldr r3, [r5, #12]
  26653. 800b56c: 601c str r4, [r3, #0]
  26654. #if MEMP_SANITY_CHECK
  26655. LWIP_ASSERT("memp sanity", memp_sanity(desc));
  26656. #endif /* MEMP_SANITY_CHECK */
  26657. SYS_ARCH_UNPROTECT(old_level);
  26658. 800b56e: f001 fd8b bl 800d088 <sys_arch_unprotect>
  26659. #endif /* !MEMP_MEM_MALLOC */
  26660. }
  26661. 800b572: bd38 pop {r3, r4, r5, pc}
  26662. LWIP_ASSERT("memp_free: mem properly aligned",
  26663. 800b574: 4b03 ldr r3, [pc, #12] @ (800b584 <do_memp_free_pool+0x30>)
  26664. 800b576: f44f 72b6 mov.w r2, #364 @ 0x16c
  26665. 800b57a: 4903 ldr r1, [pc, #12] @ (800b588 <do_memp_free_pool+0x34>)
  26666. 800b57c: 4803 ldr r0, [pc, #12] @ (800b58c <do_memp_free_pool+0x38>)
  26667. 800b57e: f007 ff43 bl 8013408 <iprintf>
  26668. 800b582: e7ed b.n 800b560 <do_memp_free_pool+0xc>
  26669. 800b584: 08015b70 .word 0x08015b70
  26670. 800b588: 08015bf4 .word 0x08015bf4
  26671. 800b58c: 080144e8 .word 0x080144e8
  26672. 0800b590 <memp_init_pool>:
  26673. *desc->tab = NULL;
  26674. 800b590: 68c3 ldr r3, [r0, #12]
  26675. 800b592: 2200 movs r2, #0
  26676. 800b594: 601a str r2, [r3, #0]
  26677. memp = (struct memp *)LWIP_MEM_ALIGN(desc->base);
  26678. 800b596: 6883 ldr r3, [r0, #8]
  26679. 800b598: 3303 adds r3, #3
  26680. 800b59a: f023 0303 bic.w r3, r3, #3
  26681. for (i = 0; i < desc->num; ++i) {
  26682. 800b59e: e007 b.n 800b5b0 <memp_init_pool+0x20>
  26683. memp->next = *desc->tab;
  26684. 800b5a0: 68c1 ldr r1, [r0, #12]
  26685. 800b5a2: 6809 ldr r1, [r1, #0]
  26686. 800b5a4: 6019 str r1, [r3, #0]
  26687. *desc->tab = memp;
  26688. 800b5a6: 68c1 ldr r1, [r0, #12]
  26689. 800b5a8: 600b str r3, [r1, #0]
  26690. memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size
  26691. 800b5aa: 8881 ldrh r1, [r0, #4]
  26692. 800b5ac: 440b add r3, r1
  26693. for (i = 0; i < desc->num; ++i) {
  26694. 800b5ae: 3201 adds r2, #1
  26695. 800b5b0: 88c1 ldrh r1, [r0, #6]
  26696. 800b5b2: 4291 cmp r1, r2
  26697. 800b5b4: dcf4 bgt.n 800b5a0 <memp_init_pool+0x10>
  26698. }
  26699. 800b5b6: 4770 bx lr
  26700. 0800b5b8 <memp_init>:
  26701. {
  26702. 800b5b8: b510 push {r4, lr}
  26703. for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
  26704. 800b5ba: 2400 movs r4, #0
  26705. 800b5bc: e006 b.n 800b5cc <memp_init+0x14>
  26706. memp_init_pool(memp_pools[i]);
  26707. 800b5be: 4b05 ldr r3, [pc, #20] @ (800b5d4 <memp_init+0x1c>)
  26708. 800b5c0: f853 0024 ldr.w r0, [r3, r4, lsl #2]
  26709. 800b5c4: f7ff ffe4 bl 800b590 <memp_init_pool>
  26710. for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) {
  26711. 800b5c8: 3401 adds r4, #1
  26712. 800b5ca: b2a4 uxth r4, r4
  26713. 800b5cc: 2c0c cmp r4, #12
  26714. 800b5ce: d9f6 bls.n 800b5be <memp_init+0x6>
  26715. }
  26716. 800b5d0: bd10 pop {r4, pc}
  26717. 800b5d2: bf00 nop
  26718. 800b5d4: 08015c64 .word 0x08015c64
  26719. 0800b5d8 <memp_malloc_pool>:
  26720. {
  26721. 800b5d8: b510 push {r4, lr}
  26722. LWIP_ASSERT("invalid pool desc", desc != NULL);
  26723. 800b5da: 4604 mov r4, r0
  26724. 800b5dc: b110 cbz r0, 800b5e4 <memp_malloc_pool+0xc>
  26725. return do_memp_malloc_pool(desc);
  26726. 800b5de: f7ff ff95 bl 800b50c <do_memp_malloc_pool>
  26727. }
  26728. 800b5e2: bd10 pop {r4, pc}
  26729. LWIP_ASSERT("invalid pool desc", desc != NULL);
  26730. 800b5e4: 4b04 ldr r3, [pc, #16] @ (800b5f8 <memp_malloc_pool+0x20>)
  26731. 800b5e6: f44f 729e mov.w r2, #316 @ 0x13c
  26732. 800b5ea: 4904 ldr r1, [pc, #16] @ (800b5fc <memp_malloc_pool+0x24>)
  26733. 800b5ec: 4804 ldr r0, [pc, #16] @ (800b600 <memp_malloc_pool+0x28>)
  26734. 800b5ee: f007 ff0b bl 8013408 <iprintf>
  26735. return NULL;
  26736. 800b5f2: 4620 mov r0, r4
  26737. 800b5f4: e7f5 b.n 800b5e2 <memp_malloc_pool+0xa>
  26738. 800b5f6: bf00 nop
  26739. 800b5f8: 08015b70 .word 0x08015b70
  26740. 800b5fc: 08015c14 .word 0x08015c14
  26741. 800b600: 080144e8 .word 0x080144e8
  26742. 0800b604 <memp_malloc>:
  26743. {
  26744. 800b604: b508 push {r3, lr}
  26745. LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;);
  26746. 800b606: 280c cmp r0, #12
  26747. 800b608: d805 bhi.n 800b616 <memp_malloc+0x12>
  26748. memp = do_memp_malloc_pool(memp_pools[type]);
  26749. 800b60a: 4b07 ldr r3, [pc, #28] @ (800b628 <memp_malloc+0x24>)
  26750. 800b60c: f853 0020 ldr.w r0, [r3, r0, lsl #2]
  26751. 800b610: f7ff ff7c bl 800b50c <do_memp_malloc_pool>
  26752. }
  26753. 800b614: bd08 pop {r3, pc}
  26754. LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;);
  26755. 800b616: 4b05 ldr r3, [pc, #20] @ (800b62c <memp_malloc+0x28>)
  26756. 800b618: f240 1257 movw r2, #343 @ 0x157
  26757. 800b61c: 4904 ldr r1, [pc, #16] @ (800b630 <memp_malloc+0x2c>)
  26758. 800b61e: 4805 ldr r0, [pc, #20] @ (800b634 <memp_malloc+0x30>)
  26759. 800b620: f007 fef2 bl 8013408 <iprintf>
  26760. 800b624: 2000 movs r0, #0
  26761. 800b626: e7f5 b.n 800b614 <memp_malloc+0x10>
  26762. 800b628: 08015c64 .word 0x08015c64
  26763. 800b62c: 08015b70 .word 0x08015b70
  26764. 800b630: 08015c28 .word 0x08015c28
  26765. 800b634: 080144e8 .word 0x080144e8
  26766. 0800b638 <memp_free_pool>:
  26767. * @param desc the pool where to put mem
  26768. * @param mem the memp element to free
  26769. */
  26770. void
  26771. memp_free_pool(const struct memp_desc *desc, void *mem)
  26772. {
  26773. 800b638: b538 push {r3, r4, r5, lr}
  26774. 800b63a: 460c mov r4, r1
  26775. LWIP_ASSERT("invalid pool desc", desc != NULL);
  26776. 800b63c: 4605 mov r5, r0
  26777. 800b63e: b120 cbz r0, 800b64a <memp_free_pool+0x12>
  26778. if ((desc == NULL) || (mem == NULL)) {
  26779. 800b640: 2c00 cmp r4, #0
  26780. 800b642: bf18 it ne
  26781. 800b644: 2d00 cmpne r5, #0
  26782. 800b646: d108 bne.n 800b65a <memp_free_pool+0x22>
  26783. return;
  26784. }
  26785. do_memp_free_pool(desc, mem);
  26786. }
  26787. 800b648: bd38 pop {r3, r4, r5, pc}
  26788. LWIP_ASSERT("invalid pool desc", desc != NULL);
  26789. 800b64a: 4b06 ldr r3, [pc, #24] @ (800b664 <memp_free_pool+0x2c>)
  26790. 800b64c: f240 1295 movw r2, #405 @ 0x195
  26791. 800b650: 4905 ldr r1, [pc, #20] @ (800b668 <memp_free_pool+0x30>)
  26792. 800b652: 4806 ldr r0, [pc, #24] @ (800b66c <memp_free_pool+0x34>)
  26793. 800b654: f007 fed8 bl 8013408 <iprintf>
  26794. 800b658: e7f2 b.n 800b640 <memp_free_pool+0x8>
  26795. do_memp_free_pool(desc, mem);
  26796. 800b65a: 4621 mov r1, r4
  26797. 800b65c: 4628 mov r0, r5
  26798. 800b65e: f7ff ff79 bl 800b554 <do_memp_free_pool>
  26799. 800b662: e7f1 b.n 800b648 <memp_free_pool+0x10>
  26800. 800b664: 08015b70 .word 0x08015b70
  26801. 800b668: 08015c14 .word 0x08015c14
  26802. 800b66c: 080144e8 .word 0x080144e8
  26803. 0800b670 <memp_free>:
  26804. * @param type the pool where to put mem
  26805. * @param mem the memp element to free
  26806. */
  26807. void
  26808. memp_free(memp_t type, void *mem)
  26809. {
  26810. 800b670: b508 push {r3, lr}
  26811. #ifdef LWIP_HOOK_MEMP_AVAILABLE
  26812. struct memp *old_first;
  26813. #endif
  26814. LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;);
  26815. 800b672: 280c cmp r0, #12
  26816. 800b674: d806 bhi.n 800b684 <memp_free+0x14>
  26817. if (mem == NULL) {
  26818. 800b676: b121 cbz r1, 800b682 <memp_free+0x12>
  26819. #ifdef LWIP_HOOK_MEMP_AVAILABLE
  26820. old_first = *memp_pools[type]->tab;
  26821. #endif
  26822. do_memp_free_pool(memp_pools[type], mem);
  26823. 800b678: 4b06 ldr r3, [pc, #24] @ (800b694 <memp_free+0x24>)
  26824. 800b67a: f853 0020 ldr.w r0, [r3, r0, lsl #2]
  26825. 800b67e: f7ff ff69 bl 800b554 <do_memp_free_pool>
  26826. #ifdef LWIP_HOOK_MEMP_AVAILABLE
  26827. if (old_first == NULL) {
  26828. LWIP_HOOK_MEMP_AVAILABLE(type);
  26829. }
  26830. #endif
  26831. }
  26832. 800b682: bd08 pop {r3, pc}
  26833. LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;);
  26834. 800b684: 4b04 ldr r3, [pc, #16] @ (800b698 <memp_free+0x28>)
  26835. 800b686: f44f 72d5 mov.w r2, #426 @ 0x1aa
  26836. 800b68a: 4904 ldr r1, [pc, #16] @ (800b69c <memp_free+0x2c>)
  26837. 800b68c: 4804 ldr r0, [pc, #16] @ (800b6a0 <memp_free+0x30>)
  26838. 800b68e: f007 febb bl 8013408 <iprintf>
  26839. 800b692: e7f6 b.n 800b682 <memp_free+0x12>
  26840. 800b694: 08015c64 .word 0x08015c64
  26841. 800b698: 08015b70 .word 0x08015b70
  26842. 800b69c: 08015c48 .word 0x08015c48
  26843. 800b6a0: 080144e8 .word 0x080144e8
  26844. 0800b6a4 <netbuf_delete>:
  26845. * @param buf pointer to a netbuf allocated by netbuf_new()
  26846. */
  26847. void
  26848. netbuf_delete(struct netbuf *buf)
  26849. {
  26850. if (buf != NULL) {
  26851. 800b6a4: b168 cbz r0, 800b6c2 <netbuf_delete+0x1e>
  26852. {
  26853. 800b6a6: b510 push {r4, lr}
  26854. 800b6a8: 4604 mov r4, r0
  26855. if (buf->p != NULL) {
  26856. 800b6aa: 6800 ldr r0, [r0, #0]
  26857. 800b6ac: b120 cbz r0, 800b6b8 <netbuf_delete+0x14>
  26858. pbuf_free(buf->p);
  26859. 800b6ae: f000 fb77 bl 800bda0 <pbuf_free>
  26860. buf->p = buf->ptr = NULL;
  26861. 800b6b2: 2300 movs r3, #0
  26862. 800b6b4: 6063 str r3, [r4, #4]
  26863. 800b6b6: 6023 str r3, [r4, #0]
  26864. }
  26865. memp_free(MEMP_NETBUF, buf);
  26866. 800b6b8: 4621 mov r1, r4
  26867. 800b6ba: 2006 movs r0, #6
  26868. 800b6bc: f7ff ffd8 bl 800b670 <memp_free>
  26869. }
  26870. }
  26871. 800b6c0: bd10 pop {r4, pc}
  26872. 800b6c2: 4770 bx lr
  26873. 0800b6c4 <netbuf_free>:
  26874. *
  26875. * @param buf pointer to the netbuf which contains the packet buffer to free
  26876. */
  26877. void
  26878. netbuf_free(struct netbuf *buf)
  26879. {
  26880. 800b6c4: b510 push {r4, lr}
  26881. LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;);
  26882. 800b6c6: b140 cbz r0, 800b6da <netbuf_free+0x16>
  26883. 800b6c8: 4604 mov r4, r0
  26884. if (buf->p != NULL) {
  26885. 800b6ca: 6800 ldr r0, [r0, #0]
  26886. 800b6cc: b108 cbz r0, 800b6d2 <netbuf_free+0xe>
  26887. pbuf_free(buf->p);
  26888. 800b6ce: f000 fb67 bl 800bda0 <pbuf_free>
  26889. }
  26890. buf->p = buf->ptr = NULL;
  26891. 800b6d2: 2300 movs r3, #0
  26892. 800b6d4: 6063 str r3, [r4, #4]
  26893. 800b6d6: 6023 str r3, [r4, #0]
  26894. #if LWIP_CHECKSUM_ON_COPY
  26895. buf->flags = 0;
  26896. buf->toport_chksum = 0;
  26897. #endif /* LWIP_CHECKSUM_ON_COPY */
  26898. }
  26899. 800b6d8: bd10 pop {r4, pc}
  26900. LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;);
  26901. 800b6da: 4b03 ldr r3, [pc, #12] @ (800b6e8 <netbuf_free+0x24>)
  26902. 800b6dc: 2281 movs r2, #129 @ 0x81
  26903. 800b6de: 4903 ldr r1, [pc, #12] @ (800b6ec <netbuf_free+0x28>)
  26904. 800b6e0: 4803 ldr r0, [pc, #12] @ (800b6f0 <netbuf_free+0x2c>)
  26905. 800b6e2: f007 fe91 bl 8013408 <iprintf>
  26906. 800b6e6: e7f7 b.n 800b6d8 <netbuf_free+0x14>
  26907. 800b6e8: 08015e00 .word 0x08015e00
  26908. 800b6ec: 08015ea0 .word 0x08015ea0
  26909. 800b6f0: 080144e8 .word 0x080144e8
  26910. 0800b6f4 <netbuf_ref>:
  26911. * @return ERR_OK if data is referenced
  26912. * ERR_MEM if data couldn't be referenced due to lack of memory
  26913. */
  26914. err_t
  26915. netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size)
  26916. {
  26917. 800b6f4: b570 push {r4, r5, r6, lr}
  26918. LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;);
  26919. 800b6f6: b1b0 cbz r0, 800b726 <netbuf_ref+0x32>
  26920. 800b6f8: 460e mov r6, r1
  26921. 800b6fa: 4615 mov r5, r2
  26922. 800b6fc: 4604 mov r4, r0
  26923. if (buf->p != NULL) {
  26924. 800b6fe: 6800 ldr r0, [r0, #0]
  26925. 800b700: b108 cbz r0, 800b706 <netbuf_ref+0x12>
  26926. pbuf_free(buf->p);
  26927. 800b702: f000 fb4d bl 800bda0 <pbuf_free>
  26928. }
  26929. buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF);
  26930. 800b706: 2241 movs r2, #65 @ 0x41
  26931. 800b708: 2100 movs r1, #0
  26932. 800b70a: 2036 movs r0, #54 @ 0x36
  26933. 800b70c: f000 fbb0 bl 800be70 <pbuf_alloc>
  26934. 800b710: 6020 str r0, [r4, #0]
  26935. if (buf->p == NULL) {
  26936. 800b712: b188 cbz r0, 800b738 <netbuf_ref+0x44>
  26937. buf->ptr = NULL;
  26938. return ERR_MEM;
  26939. }
  26940. ((struct pbuf_rom *)buf->p)->payload = dataptr;
  26941. 800b714: 6046 str r6, [r0, #4]
  26942. buf->p->len = buf->p->tot_len = size;
  26943. 800b716: 6823 ldr r3, [r4, #0]
  26944. 800b718: 811d strh r5, [r3, #8]
  26945. 800b71a: 6823 ldr r3, [r4, #0]
  26946. 800b71c: 815d strh r5, [r3, #10]
  26947. buf->ptr = buf->p;
  26948. 800b71e: 6823 ldr r3, [r4, #0]
  26949. 800b720: 6063 str r3, [r4, #4]
  26950. return ERR_OK;
  26951. 800b722: 2000 movs r0, #0
  26952. }
  26953. 800b724: bd70 pop {r4, r5, r6, pc}
  26954. LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;);
  26955. 800b726: 4b07 ldr r3, [pc, #28] @ (800b744 <netbuf_ref+0x50>)
  26956. 800b728: 2299 movs r2, #153 @ 0x99
  26957. 800b72a: 4907 ldr r1, [pc, #28] @ (800b748 <netbuf_ref+0x54>)
  26958. 800b72c: 4807 ldr r0, [pc, #28] @ (800b74c <netbuf_ref+0x58>)
  26959. 800b72e: f007 fe6b bl 8013408 <iprintf>
  26960. 800b732: f06f 000f mvn.w r0, #15
  26961. 800b736: e7f5 b.n 800b724 <netbuf_ref+0x30>
  26962. buf->ptr = NULL;
  26963. 800b738: 2300 movs r3, #0
  26964. 800b73a: 6063 str r3, [r4, #4]
  26965. return ERR_MEM;
  26966. 800b73c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  26967. 800b740: e7f0 b.n 800b724 <netbuf_ref+0x30>
  26968. 800b742: bf00 nop
  26969. 800b744: 08015e00 .word 0x08015e00
  26970. 800b748: 08015ebc .word 0x08015ebc
  26971. 800b74c: 080144e8 .word 0x080144e8
  26972. 0800b750 <netif_do_set_netmask>:
  26973. static int
  26974. netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm)
  26975. {
  26976. /* address is actually being changed? */
  26977. if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) {
  26978. 800b750: 680b ldr r3, [r1, #0]
  26979. 800b752: 6882 ldr r2, [r0, #8]
  26980. 800b754: 4293 cmp r3, r2
  26981. 800b756: d002 beq.n 800b75e <netif_do_set_netmask+0xe>
  26982. #else
  26983. LWIP_UNUSED_ARG(old_nm);
  26984. #endif
  26985. mib2_remove_route_ip4(0, netif);
  26986. /* set new netmask to netif */
  26987. ip4_addr_set(ip_2_ip4(&netif->netmask), netmask);
  26988. 800b758: 6083 str r3, [r0, #8]
  26989. netif->name[0], netif->name[1],
  26990. ip4_addr1_16(netif_ip4_netmask(netif)),
  26991. ip4_addr2_16(netif_ip4_netmask(netif)),
  26992. ip4_addr3_16(netif_ip4_netmask(netif)),
  26993. ip4_addr4_16(netif_ip4_netmask(netif))));
  26994. return 1; /* netmask changed */
  26995. 800b75a: 2001 movs r0, #1
  26996. 800b75c: 4770 bx lr
  26997. }
  26998. return 0; /* netmask unchanged */
  26999. 800b75e: 2000 movs r0, #0
  27000. }
  27001. 800b760: 4770 bx lr
  27002. 0800b762 <netif_do_set_gw>:
  27003. static int
  27004. netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw)
  27005. {
  27006. /* address is actually being changed? */
  27007. if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) {
  27008. 800b762: 680b ldr r3, [r1, #0]
  27009. 800b764: 68c2 ldr r2, [r0, #12]
  27010. 800b766: 4293 cmp r3, r2
  27011. 800b768: d002 beq.n 800b770 <netif_do_set_gw+0xe>
  27012. ip_addr_copy(*old_gw, *netif_ip_gw4(netif));
  27013. #else
  27014. LWIP_UNUSED_ARG(old_gw);
  27015. #endif
  27016. ip4_addr_set(ip_2_ip4(&netif->gw), gw);
  27017. 800b76a: 60c3 str r3, [r0, #12]
  27018. netif->name[0], netif->name[1],
  27019. ip4_addr1_16(netif_ip4_gw(netif)),
  27020. ip4_addr2_16(netif_ip4_gw(netif)),
  27021. ip4_addr3_16(netif_ip4_gw(netif)),
  27022. ip4_addr4_16(netif_ip4_gw(netif))));
  27023. return 1; /* gateway changed */
  27024. 800b76c: 2001 movs r0, #1
  27025. 800b76e: 4770 bx lr
  27026. }
  27027. return 0; /* gateway unchanged */
  27028. 800b770: 2000 movs r0, #0
  27029. }
  27030. 800b772: 4770 bx lr
  27031. 0800b774 <netif_null_output_ip4>:
  27032. LWIP_UNUSED_ARG(netif);
  27033. LWIP_UNUSED_ARG(p);
  27034. LWIP_UNUSED_ARG(ipaddr);
  27035. return ERR_IF;
  27036. }
  27037. 800b774: f06f 000b mvn.w r0, #11
  27038. 800b778: 4770 bx lr
  27039. 0800b77a <netif_do_ip_addr_changed>:
  27040. {
  27041. 800b77a: b538 push {r3, r4, r5, lr}
  27042. 800b77c: 4604 mov r4, r0
  27043. 800b77e: 460d mov r5, r1
  27044. tcp_netif_ip_addr_changed(old_addr, new_addr);
  27045. 800b780: f002 f956 bl 800da30 <tcp_netif_ip_addr_changed>
  27046. udp_netif_ip_addr_changed(old_addr, new_addr);
  27047. 800b784: 4629 mov r1, r5
  27048. 800b786: 4620 mov r0, r4
  27049. 800b788: f006 fbc4 bl 8011f14 <udp_netif_ip_addr_changed>
  27050. }
  27051. 800b78c: bd38 pop {r3, r4, r5, pc}
  27052. ...
  27053. 0800b790 <netif_issue_reports>:
  27054. {
  27055. 800b790: b538 push {r3, r4, r5, lr}
  27056. 800b792: 460c mov r4, r1
  27057. LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL);
  27058. 800b794: 4605 mov r5, r0
  27059. 800b796: b170 cbz r0, 800b7b6 <netif_issue_reports+0x26>
  27060. if (!(netif->flags & NETIF_FLAG_LINK_UP) ||
  27061. 800b798: f895 3031 ldrb.w r3, [r5, #49] @ 0x31
  27062. 800b79c: f003 0205 and.w r2, r3, #5
  27063. 800b7a0: 2a05 cmp r2, #5
  27064. 800b7a2: d107 bne.n 800b7b4 <netif_issue_reports+0x24>
  27065. if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
  27066. 800b7a4: f014 0f01 tst.w r4, #1
  27067. 800b7a8: d004 beq.n 800b7b4 <netif_issue_reports+0x24>
  27068. !ip4_addr_isany_val(*netif_ip4_addr(netif))) {
  27069. 800b7aa: 686a ldr r2, [r5, #4]
  27070. if ((report_type & NETIF_REPORT_TYPE_IPV4) &&
  27071. 800b7ac: b112 cbz r2, 800b7b4 <netif_issue_reports+0x24>
  27072. if (netif->flags & (NETIF_FLAG_ETHARP)) {
  27073. 800b7ae: f013 0f08 tst.w r3, #8
  27074. 800b7b2: d108 bne.n 800b7c6 <netif_issue_reports+0x36>
  27075. }
  27076. 800b7b4: bd38 pop {r3, r4, r5, pc}
  27077. LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL);
  27078. 800b7b6: 4b06 ldr r3, [pc, #24] @ (800b7d0 <netif_issue_reports+0x40>)
  27079. 800b7b8: f240 326d movw r2, #877 @ 0x36d
  27080. 800b7bc: 4905 ldr r1, [pc, #20] @ (800b7d4 <netif_issue_reports+0x44>)
  27081. 800b7be: 4806 ldr r0, [pc, #24] @ (800b7d8 <netif_issue_reports+0x48>)
  27082. 800b7c0: f007 fe22 bl 8013408 <iprintf>
  27083. 800b7c4: e7e8 b.n 800b798 <netif_issue_reports+0x8>
  27084. etharp_gratuitous(netif);
  27085. 800b7c6: 1d29 adds r1, r5, #4
  27086. 800b7c8: 4628 mov r0, r5
  27087. 800b7ca: f7fe f829 bl 8009820 <etharp_request>
  27088. 800b7ce: e7f1 b.n 800b7b4 <netif_issue_reports+0x24>
  27089. 800b7d0: 08015ed4 .word 0x08015ed4
  27090. 800b7d4: 08015f34 .word 0x08015f34
  27091. 800b7d8: 080144e8 .word 0x080144e8
  27092. 0800b7dc <netif_do_set_ipaddr>:
  27093. {
  27094. 800b7dc: b570 push {r4, r5, r6, lr}
  27095. 800b7de: b082 sub sp, #8
  27096. 800b7e0: 4604 mov r4, r0
  27097. 800b7e2: 4615 mov r5, r2
  27098. LWIP_ASSERT("invalid pointer", ipaddr != NULL);
  27099. 800b7e4: 460e mov r6, r1
  27100. 800b7e6: b139 cbz r1, 800b7f8 <netif_do_set_ipaddr+0x1c>
  27101. LWIP_ASSERT("invalid pointer", old_addr != NULL);
  27102. 800b7e8: b175 cbz r5, 800b808 <netif_do_set_ipaddr+0x2c>
  27103. if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) {
  27104. 800b7ea: 6832 ldr r2, [r6, #0]
  27105. 800b7ec: 6863 ldr r3, [r4, #4]
  27106. 800b7ee: 429a cmp r2, r3
  27107. 800b7f0: d112 bne.n 800b818 <netif_do_set_ipaddr+0x3c>
  27108. return 0; /* address unchanged */
  27109. 800b7f2: 2000 movs r0, #0
  27110. }
  27111. 800b7f4: b002 add sp, #8
  27112. 800b7f6: bd70 pop {r4, r5, r6, pc}
  27113. LWIP_ASSERT("invalid pointer", ipaddr != NULL);
  27114. 800b7f8: 4b10 ldr r3, [pc, #64] @ (800b83c <netif_do_set_ipaddr+0x60>)
  27115. 800b7fa: f240 12cb movw r2, #459 @ 0x1cb
  27116. 800b7fe: 4910 ldr r1, [pc, #64] @ (800b840 <netif_do_set_ipaddr+0x64>)
  27117. 800b800: 4810 ldr r0, [pc, #64] @ (800b844 <netif_do_set_ipaddr+0x68>)
  27118. 800b802: f007 fe01 bl 8013408 <iprintf>
  27119. 800b806: e7ef b.n 800b7e8 <netif_do_set_ipaddr+0xc>
  27120. LWIP_ASSERT("invalid pointer", old_addr != NULL);
  27121. 800b808: 4b0c ldr r3, [pc, #48] @ (800b83c <netif_do_set_ipaddr+0x60>)
  27122. 800b80a: f44f 72e6 mov.w r2, #460 @ 0x1cc
  27123. 800b80e: 490c ldr r1, [pc, #48] @ (800b840 <netif_do_set_ipaddr+0x64>)
  27124. 800b810: 480c ldr r0, [pc, #48] @ (800b844 <netif_do_set_ipaddr+0x68>)
  27125. 800b812: f007 fdf9 bl 8013408 <iprintf>
  27126. 800b816: e7e8 b.n 800b7ea <netif_do_set_ipaddr+0xe>
  27127. *ip_2_ip4(&new_addr) = *ipaddr;
  27128. 800b818: 9201 str r2, [sp, #4]
  27129. ip_addr_copy(*old_addr, *netif_ip_addr4(netif));
  27130. 800b81a: 602b str r3, [r5, #0]
  27131. netif_do_ip_addr_changed(old_addr, &new_addr);
  27132. 800b81c: a901 add r1, sp, #4
  27133. 800b81e: 4628 mov r0, r5
  27134. 800b820: f7ff ffab bl 800b77a <netif_do_ip_addr_changed>
  27135. ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr);
  27136. 800b824: b13e cbz r6, 800b836 <netif_do_set_ipaddr+0x5a>
  27137. 800b826: 6833 ldr r3, [r6, #0]
  27138. 800b828: 6063 str r3, [r4, #4]
  27139. netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4);
  27140. 800b82a: 2101 movs r1, #1
  27141. 800b82c: 4620 mov r0, r4
  27142. 800b82e: f7ff ffaf bl 800b790 <netif_issue_reports>
  27143. return 1; /* address changed */
  27144. 800b832: 2001 movs r0, #1
  27145. 800b834: e7de b.n 800b7f4 <netif_do_set_ipaddr+0x18>
  27146. ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr);
  27147. 800b836: 2300 movs r3, #0
  27148. 800b838: e7f6 b.n 800b828 <netif_do_set_ipaddr+0x4c>
  27149. 800b83a: bf00 nop
  27150. 800b83c: 08015ed4 .word 0x08015ed4
  27151. 800b840: 08015f58 .word 0x08015f58
  27152. 800b844: 080144e8 .word 0x080144e8
  27153. 0800b848 <netif_init>:
  27154. }
  27155. 800b848: 4770 bx lr
  27156. ...
  27157. 0800b84c <netif_set_addr>:
  27158. {
  27159. 800b84c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  27160. 800b850: b082 sub sp, #8
  27161. 800b852: 4605 mov r5, r0
  27162. 800b854: 460c mov r4, r1
  27163. 800b856: 4617 mov r7, r2
  27164. 800b858: 461e mov r6, r3
  27165. LWIP_ASSERT_CORE_LOCKED();
  27166. 800b85a: f7f8 f957 bl 8003b0c <sys_check_core_locking>
  27167. if (ipaddr == NULL) {
  27168. 800b85e: b1dc cbz r4, 800b898 <netif_set_addr+0x4c>
  27169. if (netmask == NULL) {
  27170. 800b860: b1e7 cbz r7, 800b89c <netif_set_addr+0x50>
  27171. if (gw == NULL) {
  27172. 800b862: b1ee cbz r6, 800b8a0 <netif_set_addr+0x54>
  27173. remove = ip4_addr_isany(ipaddr);
  27174. 800b864: b10c cbz r4, 800b86a <netif_set_addr+0x1e>
  27175. 800b866: 6823 ldr r3, [r4, #0]
  27176. 800b868: b9e3 cbnz r3, 800b8a4 <netif_set_addr+0x58>
  27177. if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) {
  27178. 800b86a: aa01 add r2, sp, #4
  27179. 800b86c: 4621 mov r1, r4
  27180. 800b86e: 4628 mov r0, r5
  27181. 800b870: f7ff ffb4 bl 800b7dc <netif_do_set_ipaddr>
  27182. 800b874: f04f 0801 mov.w r8, #1
  27183. if (netif_do_set_netmask(netif, netmask, old_nm)) {
  27184. 800b878: 2200 movs r2, #0
  27185. 800b87a: 4639 mov r1, r7
  27186. 800b87c: 4628 mov r0, r5
  27187. 800b87e: f7ff ff67 bl 800b750 <netif_do_set_netmask>
  27188. if (netif_do_set_gw(netif, gw, old_gw)) {
  27189. 800b882: 2200 movs r2, #0
  27190. 800b884: 4631 mov r1, r6
  27191. 800b886: 4628 mov r0, r5
  27192. 800b888: f7ff ff6b bl 800b762 <netif_do_set_gw>
  27193. if (!remove) {
  27194. 800b88c: f1b8 0f00 cmp.w r8, #0
  27195. 800b890: d00b beq.n 800b8aa <netif_set_addr+0x5e>
  27196. }
  27197. 800b892: b002 add sp, #8
  27198. 800b894: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  27199. ipaddr = IP4_ADDR_ANY4;
  27200. 800b898: 4c07 ldr r4, [pc, #28] @ (800b8b8 <netif_set_addr+0x6c>)
  27201. 800b89a: e7e1 b.n 800b860 <netif_set_addr+0x14>
  27202. netmask = IP4_ADDR_ANY4;
  27203. 800b89c: 4f06 ldr r7, [pc, #24] @ (800b8b8 <netif_set_addr+0x6c>)
  27204. 800b89e: e7e0 b.n 800b862 <netif_set_addr+0x16>
  27205. gw = IP4_ADDR_ANY4;
  27206. 800b8a0: 4e05 ldr r6, [pc, #20] @ (800b8b8 <netif_set_addr+0x6c>)
  27207. 800b8a2: e7df b.n 800b864 <netif_set_addr+0x18>
  27208. remove = ip4_addr_isany(ipaddr);
  27209. 800b8a4: f04f 0800 mov.w r8, #0
  27210. 800b8a8: e7e6 b.n 800b878 <netif_set_addr+0x2c>
  27211. if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) {
  27212. 800b8aa: aa01 add r2, sp, #4
  27213. 800b8ac: 4621 mov r1, r4
  27214. 800b8ae: 4628 mov r0, r5
  27215. 800b8b0: f7ff ff94 bl 800b7dc <netif_do_set_ipaddr>
  27216. }
  27217. 800b8b4: e7ed b.n 800b892 <netif_set_addr+0x46>
  27218. 800b8b6: bf00 nop
  27219. 800b8b8: 080156d8 .word 0x080156d8
  27220. 0800b8bc <netif_add>:
  27221. {
  27222. 800b8bc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  27223. 800b8c0: 4606 mov r6, r0
  27224. 800b8c2: 460c mov r4, r1
  27225. 800b8c4: 4615 mov r5, r2
  27226. 800b8c6: 461f mov r7, r3
  27227. 800b8c8: f8dd 801c ldr.w r8, [sp, #28]
  27228. LWIP_ASSERT_CORE_LOCKED();
  27229. 800b8cc: f7f8 f91e bl 8003b0c <sys_check_core_locking>
  27230. LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL);
  27231. 800b8d0: b33e cbz r6, 800b922 <netif_add+0x66>
  27232. LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL);
  27233. 800b8d2: f1b8 0f00 cmp.w r8, #0
  27234. 800b8d6: d02d beq.n 800b934 <netif_add+0x78>
  27235. if (ipaddr == NULL) {
  27236. 800b8d8: 2c00 cmp r4, #0
  27237. 800b8da: d034 beq.n 800b946 <netif_add+0x8a>
  27238. if (netmask == NULL) {
  27239. 800b8dc: 2d00 cmp r5, #0
  27240. 800b8de: d034 beq.n 800b94a <netif_add+0x8e>
  27241. if (gw == NULL) {
  27242. 800b8e0: 2f00 cmp r7, #0
  27243. 800b8e2: d034 beq.n 800b94e <netif_add+0x92>
  27244. ip_addr_set_zero_ip4(&netif->ip_addr);
  27245. 800b8e4: 2000 movs r0, #0
  27246. 800b8e6: 6070 str r0, [r6, #4]
  27247. ip_addr_set_zero_ip4(&netif->netmask);
  27248. 800b8e8: 60b0 str r0, [r6, #8]
  27249. ip_addr_set_zero_ip4(&netif->gw);
  27250. 800b8ea: 60f0 str r0, [r6, #12]
  27251. netif->output = netif_null_output_ip4;
  27252. 800b8ec: 4b38 ldr r3, [pc, #224] @ (800b9d0 <netif_add+0x114>)
  27253. 800b8ee: 6173 str r3, [r6, #20]
  27254. netif->mtu = 0;
  27255. 800b8f0: 8530 strh r0, [r6, #40] @ 0x28
  27256. netif->flags = 0;
  27257. 800b8f2: f886 0031 strb.w r0, [r6, #49] @ 0x31
  27258. memset(netif->client_data, 0, sizeof(netif->client_data));
  27259. 800b8f6: 6270 str r0, [r6, #36] @ 0x24
  27260. netif->link_callback = NULL;
  27261. 800b8f8: 61f0 str r0, [r6, #28]
  27262. netif->state = state;
  27263. 800b8fa: 9b06 ldr r3, [sp, #24]
  27264. 800b8fc: 6233 str r3, [r6, #32]
  27265. netif->num = netif_num;
  27266. 800b8fe: 4b35 ldr r3, [pc, #212] @ (800b9d4 <netif_add+0x118>)
  27267. 800b900: 781b ldrb r3, [r3, #0]
  27268. 800b902: f886 3034 strb.w r3, [r6, #52] @ 0x34
  27269. netif->input = input;
  27270. 800b906: 9b08 ldr r3, [sp, #32]
  27271. 800b908: 6133 str r3, [r6, #16]
  27272. netif_set_addr(netif, ipaddr, netmask, gw);
  27273. 800b90a: 463b mov r3, r7
  27274. 800b90c: 462a mov r2, r5
  27275. 800b90e: 4621 mov r1, r4
  27276. 800b910: 4630 mov r0, r6
  27277. 800b912: f7ff ff9b bl 800b84c <netif_set_addr>
  27278. if (init(netif) != ERR_OK) {
  27279. 800b916: 4630 mov r0, r6
  27280. 800b918: 47c0 blx r8
  27281. 800b91a: 2800 cmp r0, #0
  27282. 800b91c: d03e beq.n 800b99c <netif_add+0xe0>
  27283. return NULL;
  27284. 800b91e: 2000 movs r0, #0
  27285. 800b920: e050 b.n 800b9c4 <netif_add+0x108>
  27286. LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL);
  27287. 800b922: 4b2d ldr r3, [pc, #180] @ (800b9d8 <netif_add+0x11c>)
  27288. 800b924: f240 1227 movw r2, #295 @ 0x127
  27289. 800b928: 492c ldr r1, [pc, #176] @ (800b9dc <netif_add+0x120>)
  27290. 800b92a: 482d ldr r0, [pc, #180] @ (800b9e0 <netif_add+0x124>)
  27291. 800b92c: f007 fd6c bl 8013408 <iprintf>
  27292. 800b930: 4630 mov r0, r6
  27293. 800b932: e047 b.n 800b9c4 <netif_add+0x108>
  27294. LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL);
  27295. 800b934: 4b28 ldr r3, [pc, #160] @ (800b9d8 <netif_add+0x11c>)
  27296. 800b936: f44f 7294 mov.w r2, #296 @ 0x128
  27297. 800b93a: 492a ldr r1, [pc, #168] @ (800b9e4 <netif_add+0x128>)
  27298. 800b93c: 4828 ldr r0, [pc, #160] @ (800b9e0 <netif_add+0x124>)
  27299. 800b93e: f007 fd63 bl 8013408 <iprintf>
  27300. 800b942: 2000 movs r0, #0
  27301. 800b944: e03e b.n 800b9c4 <netif_add+0x108>
  27302. ipaddr = ip_2_ip4(IP4_ADDR_ANY);
  27303. 800b946: 4c28 ldr r4, [pc, #160] @ (800b9e8 <netif_add+0x12c>)
  27304. 800b948: e7c8 b.n 800b8dc <netif_add+0x20>
  27305. netmask = ip_2_ip4(IP4_ADDR_ANY);
  27306. 800b94a: 4d27 ldr r5, [pc, #156] @ (800b9e8 <netif_add+0x12c>)
  27307. 800b94c: e7c8 b.n 800b8e0 <netif_add+0x24>
  27308. gw = ip_2_ip4(IP4_ADDR_ANY);
  27309. 800b94e: 4f26 ldr r7, [pc, #152] @ (800b9e8 <netif_add+0x12c>)
  27310. 800b950: e7c8 b.n 800b8e4 <netif_add+0x28>
  27311. netif->num = 0;
  27312. 800b952: 2300 movs r3, #0
  27313. 800b954: f886 3034 strb.w r3, [r6, #52] @ 0x34
  27314. 800b958: e024 b.n 800b9a4 <netif_add+0xe8>
  27315. LWIP_ASSERT("netif already added", netif2 != netif);
  27316. 800b95a: 4b1f ldr r3, [pc, #124] @ (800b9d8 <netif_add+0x11c>)
  27317. 800b95c: f240 128b movw r2, #395 @ 0x18b
  27318. 800b960: 4922 ldr r1, [pc, #136] @ (800b9ec <netif_add+0x130>)
  27319. 800b962: 481f ldr r0, [pc, #124] @ (800b9e0 <netif_add+0x124>)
  27320. 800b964: f007 fd50 bl 8013408 <iprintf>
  27321. 800b968: e009 b.n 800b97e <netif_add+0xc2>
  27322. if (netif2->num == netif->num) {
  27323. 800b96a: f894 2034 ldrb.w r2, [r4, #52] @ 0x34
  27324. 800b96e: f896 3034 ldrb.w r3, [r6, #52] @ 0x34
  27325. 800b972: 429a cmp r2, r3
  27326. 800b974: d00e beq.n 800b994 <netif_add+0xd8>
  27327. for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
  27328. 800b976: 6824 ldr r4, [r4, #0]
  27329. 800b978: b17c cbz r4, 800b99a <netif_add+0xde>
  27330. LWIP_ASSERT("netif already added", netif2 != netif);
  27331. 800b97a: 42a6 cmp r6, r4
  27332. 800b97c: d0ed beq.n 800b95a <netif_add+0x9e>
  27333. num_netifs++;
  27334. 800b97e: 3501 adds r5, #1
  27335. LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255);
  27336. 800b980: 2dff cmp r5, #255 @ 0xff
  27337. 800b982: ddf2 ble.n 800b96a <netif_add+0xae>
  27338. 800b984: 4b14 ldr r3, [pc, #80] @ (800b9d8 <netif_add+0x11c>)
  27339. 800b986: f240 128d movw r2, #397 @ 0x18d
  27340. 800b98a: 4919 ldr r1, [pc, #100] @ (800b9f0 <netif_add+0x134>)
  27341. 800b98c: 4814 ldr r0, [pc, #80] @ (800b9e0 <netif_add+0x124>)
  27342. 800b98e: f007 fd3b bl 8013408 <iprintf>
  27343. 800b992: e7ea b.n 800b96a <netif_add+0xae>
  27344. netif->num++;
  27345. 800b994: 3301 adds r3, #1
  27346. 800b996: f886 3034 strb.w r3, [r6, #52] @ 0x34
  27347. } while (netif2 != NULL);
  27348. 800b99a: b13c cbz r4, 800b9ac <netif_add+0xf0>
  27349. if (netif->num == 255) {
  27350. 800b99c: f896 3034 ldrb.w r3, [r6, #52] @ 0x34
  27351. 800b9a0: 2bff cmp r3, #255 @ 0xff
  27352. 800b9a2: d0d6 beq.n 800b952 <netif_add+0x96>
  27353. for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
  27354. 800b9a4: 4b13 ldr r3, [pc, #76] @ (800b9f4 <netif_add+0x138>)
  27355. 800b9a6: 681c ldr r4, [r3, #0]
  27356. num_netifs = 0;
  27357. 800b9a8: 2500 movs r5, #0
  27358. for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
  27359. 800b9aa: e7e5 b.n 800b978 <netif_add+0xbc>
  27360. if (netif->num == 254) {
  27361. 800b9ac: f896 3034 ldrb.w r3, [r6, #52] @ 0x34
  27362. 800b9b0: 2bfe cmp r3, #254 @ 0xfe
  27363. 800b9b2: d009 beq.n 800b9c8 <netif_add+0x10c>
  27364. netif_num = (u8_t)(netif->num + 1);
  27365. 800b9b4: 3301 adds r3, #1
  27366. 800b9b6: 4a07 ldr r2, [pc, #28] @ (800b9d4 <netif_add+0x118>)
  27367. 800b9b8: 7013 strb r3, [r2, #0]
  27368. netif->next = netif_list;
  27369. 800b9ba: 4b0e ldr r3, [pc, #56] @ (800b9f4 <netif_add+0x138>)
  27370. 800b9bc: 681a ldr r2, [r3, #0]
  27371. 800b9be: 6032 str r2, [r6, #0]
  27372. netif_list = netif;
  27373. 800b9c0: 601e str r6, [r3, #0]
  27374. return netif;
  27375. 800b9c2: 4630 mov r0, r6
  27376. }
  27377. 800b9c4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  27378. netif_num = 0;
  27379. 800b9c8: 4b02 ldr r3, [pc, #8] @ (800b9d4 <netif_add+0x118>)
  27380. 800b9ca: 2200 movs r2, #0
  27381. 800b9cc: 701a strb r2, [r3, #0]
  27382. 800b9ce: e7f4 b.n 800b9ba <netif_add+0xfe>
  27383. 800b9d0: 0800b775 .word 0x0800b775
  27384. 800b9d4: 24019b7b .word 0x24019b7b
  27385. 800b9d8: 08015ed4 .word 0x08015ed4
  27386. 800b9dc: 08015f68 .word 0x08015f68
  27387. 800b9e0: 080144e8 .word 0x080144e8
  27388. 800b9e4: 08015f84 .word 0x08015f84
  27389. 800b9e8: 080156d8 .word 0x080156d8
  27390. 800b9ec: 08015fa8 .word 0x08015fa8
  27391. 800b9f0: 08015fbc .word 0x08015fbc
  27392. 800b9f4: 24019b80 .word 0x24019b80
  27393. 0800b9f8 <netif_set_default>:
  27394. {
  27395. 800b9f8: b510 push {r4, lr}
  27396. 800b9fa: 4604 mov r4, r0
  27397. LWIP_ASSERT_CORE_LOCKED();
  27398. 800b9fc: f7f8 f886 bl 8003b0c <sys_check_core_locking>
  27399. netif_default = netif;
  27400. 800ba00: 4b01 ldr r3, [pc, #4] @ (800ba08 <netif_set_default+0x10>)
  27401. 800ba02: 601c str r4, [r3, #0]
  27402. }
  27403. 800ba04: bd10 pop {r4, pc}
  27404. 800ba06: bf00 nop
  27405. 800ba08: 24019b7c .word 0x24019b7c
  27406. 0800ba0c <netif_set_up>:
  27407. {
  27408. 800ba0c: b510 push {r4, lr}
  27409. 800ba0e: 4604 mov r4, r0
  27410. LWIP_ASSERT_CORE_LOCKED();
  27411. 800ba10: f7f8 f87c bl 8003b0c <sys_check_core_locking>
  27412. LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return);
  27413. 800ba14: b12c cbz r4, 800ba22 <netif_set_up+0x16>
  27414. if (!(netif->flags & NETIF_FLAG_UP)) {
  27415. 800ba16: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
  27416. 800ba1a: f013 0f01 tst.w r3, #1
  27417. 800ba1e: d008 beq.n 800ba32 <netif_set_up+0x26>
  27418. }
  27419. 800ba20: bd10 pop {r4, pc}
  27420. LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return);
  27421. 800ba22: 4b08 ldr r3, [pc, #32] @ (800ba44 <netif_set_up+0x38>)
  27422. 800ba24: f44f 7254 mov.w r2, #848 @ 0x350
  27423. 800ba28: 4907 ldr r1, [pc, #28] @ (800ba48 <netif_set_up+0x3c>)
  27424. 800ba2a: 4808 ldr r0, [pc, #32] @ (800ba4c <netif_set_up+0x40>)
  27425. 800ba2c: f007 fcec bl 8013408 <iprintf>
  27426. 800ba30: e7f6 b.n 800ba20 <netif_set_up+0x14>
  27427. netif_set_flags(netif, NETIF_FLAG_UP);
  27428. 800ba32: f043 0301 orr.w r3, r3, #1
  27429. 800ba36: f884 3031 strb.w r3, [r4, #49] @ 0x31
  27430. netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6);
  27431. 800ba3a: 2103 movs r1, #3
  27432. 800ba3c: 4620 mov r0, r4
  27433. 800ba3e: f7ff fea7 bl 800b790 <netif_issue_reports>
  27434. 800ba42: e7ed b.n 800ba20 <netif_set_up+0x14>
  27435. 800ba44: 08015ed4 .word 0x08015ed4
  27436. 800ba48: 08015fec .word 0x08015fec
  27437. 800ba4c: 080144e8 .word 0x080144e8
  27438. 0800ba50 <netif_set_down>:
  27439. {
  27440. 800ba50: b510 push {r4, lr}
  27441. 800ba52: 4604 mov r4, r0
  27442. LWIP_ASSERT_CORE_LOCKED();
  27443. 800ba54: f7f8 f85a bl 8003b0c <sys_check_core_locking>
  27444. LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return);
  27445. 800ba58: b164 cbz r4, 800ba74 <netif_set_down+0x24>
  27446. if (netif->flags & NETIF_FLAG_UP) {
  27447. 800ba5a: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
  27448. 800ba5e: f013 0f01 tst.w r3, #1
  27449. 800ba62: d006 beq.n 800ba72 <netif_set_down+0x22>
  27450. netif_clear_flags(netif, NETIF_FLAG_UP);
  27451. 800ba64: f003 02fe and.w r2, r3, #254 @ 0xfe
  27452. 800ba68: f884 2031 strb.w r2, [r4, #49] @ 0x31
  27453. if (netif->flags & NETIF_FLAG_ETHARP) {
  27454. 800ba6c: f013 0f08 tst.w r3, #8
  27455. 800ba70: d108 bne.n 800ba84 <netif_set_down+0x34>
  27456. }
  27457. 800ba72: bd10 pop {r4, pc}
  27458. LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return);
  27459. 800ba74: 4b05 ldr r3, [pc, #20] @ (800ba8c <netif_set_down+0x3c>)
  27460. 800ba76: f240 329b movw r2, #923 @ 0x39b
  27461. 800ba7a: 4905 ldr r1, [pc, #20] @ (800ba90 <netif_set_down+0x40>)
  27462. 800ba7c: 4805 ldr r0, [pc, #20] @ (800ba94 <netif_set_down+0x44>)
  27463. 800ba7e: f007 fcc3 bl 8013408 <iprintf>
  27464. 800ba82: e7f6 b.n 800ba72 <netif_set_down+0x22>
  27465. etharp_cleanup_netif(netif);
  27466. 800ba84: 4620 mov r0, r4
  27467. 800ba86: f7fd fe49 bl 800971c <etharp_cleanup_netif>
  27468. NETIF_STATUS_CALLBACK(netif);
  27469. 800ba8a: e7f2 b.n 800ba72 <netif_set_down+0x22>
  27470. 800ba8c: 08015ed4 .word 0x08015ed4
  27471. 800ba90: 08016008 .word 0x08016008
  27472. 800ba94: 080144e8 .word 0x080144e8
  27473. 0800ba98 <netif_set_link_up>:
  27474. {
  27475. 800ba98: b510 push {r4, lr}
  27476. 800ba9a: 4604 mov r4, r0
  27477. LWIP_ASSERT_CORE_LOCKED();
  27478. 800ba9c: f7f8 f836 bl 8003b0c <sys_check_core_locking>
  27479. LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return);
  27480. 800baa0: b12c cbz r4, 800baae <netif_set_link_up+0x16>
  27481. if (!(netif->flags & NETIF_FLAG_LINK_UP)) {
  27482. 800baa2: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
  27483. 800baa6: f013 0f04 tst.w r3, #4
  27484. 800baaa: d008 beq.n 800babe <netif_set_link_up+0x26>
  27485. }
  27486. 800baac: bd10 pop {r4, pc}
  27487. LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return);
  27488. 800baae: 4b0c ldr r3, [pc, #48] @ (800bae0 <netif_set_link_up+0x48>)
  27489. 800bab0: f44f 7278 mov.w r2, #992 @ 0x3e0
  27490. 800bab4: 490b ldr r1, [pc, #44] @ (800bae4 <netif_set_link_up+0x4c>)
  27491. 800bab6: 480c ldr r0, [pc, #48] @ (800bae8 <netif_set_link_up+0x50>)
  27492. 800bab8: f007 fca6 bl 8013408 <iprintf>
  27493. 800babc: e7f6 b.n 800baac <netif_set_link_up+0x14>
  27494. netif_set_flags(netif, NETIF_FLAG_LINK_UP);
  27495. 800babe: f043 0304 orr.w r3, r3, #4
  27496. 800bac2: f884 3031 strb.w r3, [r4, #49] @ 0x31
  27497. dhcp_network_changed(netif);
  27498. 800bac6: 4620 mov r0, r4
  27499. 800bac8: f7fd f9fe bl 8008ec8 <dhcp_network_changed>
  27500. netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6);
  27501. 800bacc: 2103 movs r1, #3
  27502. 800bace: 4620 mov r0, r4
  27503. 800bad0: f7ff fe5e bl 800b790 <netif_issue_reports>
  27504. NETIF_LINK_CALLBACK(netif);
  27505. 800bad4: 69e3 ldr r3, [r4, #28]
  27506. 800bad6: 2b00 cmp r3, #0
  27507. 800bad8: d0e8 beq.n 800baac <netif_set_link_up+0x14>
  27508. 800bada: 4620 mov r0, r4
  27509. 800badc: 4798 blx r3
  27510. 800bade: e7e5 b.n 800baac <netif_set_link_up+0x14>
  27511. 800bae0: 08015ed4 .word 0x08015ed4
  27512. 800bae4: 08016028 .word 0x08016028
  27513. 800bae8: 080144e8 .word 0x080144e8
  27514. 0800baec <netif_set_link_down>:
  27515. {
  27516. 800baec: b510 push {r4, lr}
  27517. 800baee: 4604 mov r4, r0
  27518. LWIP_ASSERT_CORE_LOCKED();
  27519. 800baf0: f7f8 f80c bl 8003b0c <sys_check_core_locking>
  27520. LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return);
  27521. 800baf4: b16c cbz r4, 800bb12 <netif_set_link_down+0x26>
  27522. if (netif->flags & NETIF_FLAG_LINK_UP) {
  27523. 800baf6: f894 3031 ldrb.w r3, [r4, #49] @ 0x31
  27524. 800bafa: f013 0f04 tst.w r3, #4
  27525. 800bafe: d007 beq.n 800bb10 <netif_set_link_down+0x24>
  27526. netif_clear_flags(netif, NETIF_FLAG_LINK_UP);
  27527. 800bb00: f003 03fb and.w r3, r3, #251 @ 0xfb
  27528. 800bb04: f884 3031 strb.w r3, [r4, #49] @ 0x31
  27529. NETIF_LINK_CALLBACK(netif);
  27530. 800bb08: 69e3 ldr r3, [r4, #28]
  27531. 800bb0a: b10b cbz r3, 800bb10 <netif_set_link_down+0x24>
  27532. 800bb0c: 4620 mov r0, r4
  27533. 800bb0e: 4798 blx r3
  27534. }
  27535. 800bb10: bd10 pop {r4, pc}
  27536. LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return);
  27537. 800bb12: 4b04 ldr r3, [pc, #16] @ (800bb24 <netif_set_link_down+0x38>)
  27538. 800bb14: f240 4206 movw r2, #1030 @ 0x406
  27539. 800bb18: 4903 ldr r1, [pc, #12] @ (800bb28 <netif_set_link_down+0x3c>)
  27540. 800bb1a: 4804 ldr r0, [pc, #16] @ (800bb2c <netif_set_link_down+0x40>)
  27541. 800bb1c: f007 fc74 bl 8013408 <iprintf>
  27542. 800bb20: e7f6 b.n 800bb10 <netif_set_link_down+0x24>
  27543. 800bb22: bf00 nop
  27544. 800bb24: 08015ed4 .word 0x08015ed4
  27545. 800bb28: 0801604c .word 0x0801604c
  27546. 800bb2c: 080144e8 .word 0x080144e8
  27547. 0800bb30 <netif_set_link_callback>:
  27548. {
  27549. 800bb30: b538 push {r3, r4, r5, lr}
  27550. 800bb32: 4604 mov r4, r0
  27551. 800bb34: 460d mov r5, r1
  27552. LWIP_ASSERT_CORE_LOCKED();
  27553. 800bb36: f7f7 ffe9 bl 8003b0c <sys_check_core_locking>
  27554. if (netif) {
  27555. 800bb3a: b104 cbz r4, 800bb3e <netif_set_link_callback+0xe>
  27556. netif->link_callback = link_callback;
  27557. 800bb3c: 61e5 str r5, [r4, #28]
  27558. }
  27559. 800bb3e: bd38 pop {r3, r4, r5, pc}
  27560. 0800bb40 <netif_get_by_index>:
  27561. *
  27562. * @param idx index of netif to find
  27563. */
  27564. struct netif *
  27565. netif_get_by_index(u8_t idx)
  27566. {
  27567. 800bb40: b510 push {r4, lr}
  27568. 800bb42: 4604 mov r4, r0
  27569. struct netif *netif;
  27570. LWIP_ASSERT_CORE_LOCKED();
  27571. 800bb44: f7f7 ffe2 bl 8003b0c <sys_check_core_locking>
  27572. if (idx != NETIF_NO_INDEX) {
  27573. 800bb48: b154 cbz r4, 800bb60 <netif_get_by_index+0x20>
  27574. NETIF_FOREACH(netif) {
  27575. 800bb4a: 4b06 ldr r3, [pc, #24] @ (800bb64 <netif_get_by_index+0x24>)
  27576. 800bb4c: 6818 ldr r0, [r3, #0]
  27577. 800bb4e: b140 cbz r0, 800bb62 <netif_get_by_index+0x22>
  27578. if (idx == netif_get_index(netif)) {
  27579. 800bb50: f890 3034 ldrb.w r3, [r0, #52] @ 0x34
  27580. 800bb54: 3301 adds r3, #1
  27581. 800bb56: b2db uxtb r3, r3
  27582. 800bb58: 42a3 cmp r3, r4
  27583. 800bb5a: d002 beq.n 800bb62 <netif_get_by_index+0x22>
  27584. NETIF_FOREACH(netif) {
  27585. 800bb5c: 6800 ldr r0, [r0, #0]
  27586. 800bb5e: e7f6 b.n 800bb4e <netif_get_by_index+0xe>
  27587. return netif; /* found! */
  27588. }
  27589. }
  27590. }
  27591. return NULL;
  27592. 800bb60: 2000 movs r0, #0
  27593. }
  27594. 800bb62: bd10 pop {r4, pc}
  27595. 800bb64: 24019b80 .word 0x24019b80
  27596. 0800bb68 <pbuf_init_alloced_pbuf>:
  27597. #endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */
  27598. /* Initialize members of struct pbuf after allocation */
  27599. static void
  27600. pbuf_init_alloced_pbuf(struct pbuf *p, void *payload, u16_t tot_len, u16_t len, pbuf_type type, u8_t flags)
  27601. {
  27602. 800bb68: b410 push {r4}
  27603. p->next = NULL;
  27604. 800bb6a: 2400 movs r4, #0
  27605. 800bb6c: 6004 str r4, [r0, #0]
  27606. p->payload = payload;
  27607. 800bb6e: 6041 str r1, [r0, #4]
  27608. p->tot_len = tot_len;
  27609. 800bb70: 8102 strh r2, [r0, #8]
  27610. p->len = len;
  27611. 800bb72: 8143 strh r3, [r0, #10]
  27612. p->type_internal = (u8_t)type;
  27613. 800bb74: f89d 3004 ldrb.w r3, [sp, #4]
  27614. 800bb78: 7303 strb r3, [r0, #12]
  27615. p->flags = flags;
  27616. 800bb7a: f89d 3008 ldrb.w r3, [sp, #8]
  27617. 800bb7e: 7343 strb r3, [r0, #13]
  27618. p->ref = 1;
  27619. 800bb80: 2301 movs r3, #1
  27620. 800bb82: 7383 strb r3, [r0, #14]
  27621. p->if_idx = NETIF_NO_INDEX;
  27622. 800bb84: 73c4 strb r4, [r0, #15]
  27623. }
  27624. 800bb86: f85d 4b04 ldr.w r4, [sp], #4
  27625. 800bb8a: 4770 bx lr
  27626. 0800bb8c <pbuf_add_header_impl>:
  27627. * @return non-zero on failure, zero on success.
  27628. *
  27629. */
  27630. static u8_t
  27631. pbuf_add_header_impl(struct pbuf *p, size_t header_size_increment, u8_t force)
  27632. {
  27633. 800bb8c: b570 push {r4, r5, r6, lr}
  27634. 800bb8e: 460c mov r4, r1
  27635. 800bb90: 4616 mov r6, r2
  27636. u16_t type_internal;
  27637. void *payload;
  27638. u16_t increment_magnitude;
  27639. LWIP_ASSERT("p != NULL", p != NULL);
  27640. 800bb92: 4605 mov r5, r0
  27641. 800bb94: b1c8 cbz r0, 800bbca <pbuf_add_header_impl+0x3e>
  27642. if ((p == NULL) || (header_size_increment > 0xFFFF)) {
  27643. 800bb96: 2d00 cmp r5, #0
  27644. 800bb98: bf18 it ne
  27645. 800bb9a: f5b4 3f80 cmpne.w r4, #65536 @ 0x10000
  27646. 800bb9e: d224 bcs.n 800bbea <pbuf_add_header_impl+0x5e>
  27647. return 1;
  27648. }
  27649. if (header_size_increment == 0) {
  27650. 800bba0: b32c cbz r4, 800bbee <pbuf_add_header_impl+0x62>
  27651. return 0;
  27652. }
  27653. increment_magnitude = (u16_t)header_size_increment;
  27654. 800bba2: b2a2 uxth r2, r4
  27655. /* Do not allow tot_len to wrap as a result. */
  27656. if ((u16_t)(increment_magnitude + p->tot_len) < increment_magnitude) {
  27657. 800bba4: 892b ldrh r3, [r5, #8]
  27658. 800bba6: 4413 add r3, r2
  27659. 800bba8: b29b uxth r3, r3
  27660. 800bbaa: 4293 cmp r3, r2
  27661. 800bbac: d321 bcc.n 800bbf2 <pbuf_add_header_impl+0x66>
  27662. }
  27663. type_internal = p->type_internal;
  27664. /* pbuf types containing payloads? */
  27665. if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) {
  27666. 800bbae: f995 100c ldrsb.w r1, [r5, #12]
  27667. 800bbb2: 2900 cmp r1, #0
  27668. 800bbb4: db11 blt.n 800bbda <pbuf_add_header_impl+0x4e>
  27669. return 1;
  27670. }
  27671. /* pbuf types referring to external payloads? */
  27672. } else {
  27673. /* hide a header in the payload? */
  27674. if (force) {
  27675. 800bbb6: b1f6 cbz r6, 800bbf6 <pbuf_add_header_impl+0x6a>
  27676. payload = (u8_t *)p->payload - header_size_increment;
  27677. 800bbb8: 6869 ldr r1, [r5, #4]
  27678. 800bbba: 1b0c subs r4, r1, r4
  27679. }
  27680. LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_add_header: old %p new %p (%"U16_F")\n",
  27681. (void *)p->payload, (void *)payload, increment_magnitude));
  27682. /* modify pbuf fields */
  27683. p->payload = payload;
  27684. 800bbbc: 606c str r4, [r5, #4]
  27685. p->len = (u16_t)(p->len + increment_magnitude);
  27686. 800bbbe: 8969 ldrh r1, [r5, #10]
  27687. 800bbc0: 440a add r2, r1
  27688. 800bbc2: 816a strh r2, [r5, #10]
  27689. p->tot_len = (u16_t)(p->tot_len + increment_magnitude);
  27690. 800bbc4: 812b strh r3, [r5, #8]
  27691. return 0;
  27692. 800bbc6: 2000 movs r0, #0
  27693. 800bbc8: e010 b.n 800bbec <pbuf_add_header_impl+0x60>
  27694. LWIP_ASSERT("p != NULL", p != NULL);
  27695. 800bbca: 4b0c ldr r3, [pc, #48] @ (800bbfc <pbuf_add_header_impl+0x70>)
  27696. 800bbcc: f240 12df movw r2, #479 @ 0x1df
  27697. 800bbd0: 490b ldr r1, [pc, #44] @ (800bc00 <pbuf_add_header_impl+0x74>)
  27698. 800bbd2: 480c ldr r0, [pc, #48] @ (800bc04 <pbuf_add_header_impl+0x78>)
  27699. 800bbd4: f007 fc18 bl 8013408 <iprintf>
  27700. 800bbd8: e7dd b.n 800bb96 <pbuf_add_header_impl+0xa>
  27701. payload = (u8_t *)p->payload - header_size_increment;
  27702. 800bbda: 6869 ldr r1, [r5, #4]
  27703. 800bbdc: 1b0c subs r4, r1, r4
  27704. if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) {
  27705. 800bbde: f105 0110 add.w r1, r5, #16
  27706. 800bbe2: 42a1 cmp r1, r4
  27707. 800bbe4: d9ea bls.n 800bbbc <pbuf_add_header_impl+0x30>
  27708. return 1;
  27709. 800bbe6: 2001 movs r0, #1
  27710. 800bbe8: e000 b.n 800bbec <pbuf_add_header_impl+0x60>
  27711. return 1;
  27712. 800bbea: 2001 movs r0, #1
  27713. }
  27714. 800bbec: bd70 pop {r4, r5, r6, pc}
  27715. return 0;
  27716. 800bbee: 2000 movs r0, #0
  27717. 800bbf0: e7fc b.n 800bbec <pbuf_add_header_impl+0x60>
  27718. return 1;
  27719. 800bbf2: 2001 movs r0, #1
  27720. 800bbf4: e7fa b.n 800bbec <pbuf_add_header_impl+0x60>
  27721. return 1;
  27722. 800bbf6: 2001 movs r0, #1
  27723. 800bbf8: e7f8 b.n 800bbec <pbuf_add_header_impl+0x60>
  27724. 800bbfa: bf00 nop
  27725. 800bbfc: 08016070 .word 0x08016070
  27726. 800bc00: 08014fc0 .word 0x08014fc0
  27727. 800bc04: 080144e8 .word 0x080144e8
  27728. 0800bc08 <pbuf_pool_is_empty>:
  27729. {
  27730. 800bc08: b510 push {r4, lr}
  27731. SYS_ARCH_PROTECT(old_level);
  27732. 800bc0a: f001 fa31 bl 800d070 <sys_arch_protect>
  27733. queued = pbuf_free_ooseq_pending;
  27734. 800bc0e: 4b0b ldr r3, [pc, #44] @ (800bc3c <pbuf_pool_is_empty+0x34>)
  27735. 800bc10: 781c ldrb r4, [r3, #0]
  27736. 800bc12: b2e4 uxtb r4, r4
  27737. pbuf_free_ooseq_pending = 1;
  27738. 800bc14: 2201 movs r2, #1
  27739. 800bc16: 701a strb r2, [r3, #0]
  27740. SYS_ARCH_UNPROTECT(old_level);
  27741. 800bc18: f001 fa36 bl 800d088 <sys_arch_unprotect>
  27742. if (!queued) {
  27743. 800bc1c: b104 cbz r4, 800bc20 <pbuf_pool_is_empty+0x18>
  27744. }
  27745. 800bc1e: bd10 pop {r4, pc}
  27746. PBUF_POOL_FREE_OOSEQ_QUEUE_CALL();
  27747. 800bc20: 2100 movs r1, #0
  27748. 800bc22: 4807 ldr r0, [pc, #28] @ (800bc40 <pbuf_pool_is_empty+0x38>)
  27749. 800bc24: f005 fc0e bl 8011444 <tcpip_try_callback>
  27750. 800bc28: 2800 cmp r0, #0
  27751. 800bc2a: d0f8 beq.n 800bc1e <pbuf_pool_is_empty+0x16>
  27752. 800bc2c: f001 fa20 bl 800d070 <sys_arch_protect>
  27753. 800bc30: 4b02 ldr r3, [pc, #8] @ (800bc3c <pbuf_pool_is_empty+0x34>)
  27754. 800bc32: 2200 movs r2, #0
  27755. 800bc34: 701a strb r2, [r3, #0]
  27756. 800bc36: f001 fa27 bl 800d088 <sys_arch_unprotect>
  27757. }
  27758. 800bc3a: e7f0 b.n 800bc1e <pbuf_pool_is_empty+0x16>
  27759. 800bc3c: 24019b84 .word 0x24019b84
  27760. 800bc40: 0800bc75 .word 0x0800bc75
  27761. 0800bc44 <pbuf_free_ooseq>:
  27762. {
  27763. 800bc44: b508 push {r3, lr}
  27764. SYS_ARCH_SET(pbuf_free_ooseq_pending, 0);
  27765. 800bc46: f001 fa13 bl 800d070 <sys_arch_protect>
  27766. 800bc4a: 4b08 ldr r3, [pc, #32] @ (800bc6c <pbuf_free_ooseq+0x28>)
  27767. 800bc4c: 2200 movs r2, #0
  27768. 800bc4e: 701a strb r2, [r3, #0]
  27769. 800bc50: f001 fa1a bl 800d088 <sys_arch_unprotect>
  27770. for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) {
  27771. 800bc54: 4b06 ldr r3, [pc, #24] @ (800bc70 <pbuf_free_ooseq+0x2c>)
  27772. 800bc56: 6818 ldr r0, [r3, #0]
  27773. 800bc58: e000 b.n 800bc5c <pbuf_free_ooseq+0x18>
  27774. 800bc5a: 68c0 ldr r0, [r0, #12]
  27775. 800bc5c: b120 cbz r0, 800bc68 <pbuf_free_ooseq+0x24>
  27776. if (pcb->ooseq != NULL) {
  27777. 800bc5e: 6f43 ldr r3, [r0, #116] @ 0x74
  27778. 800bc60: 2b00 cmp r3, #0
  27779. 800bc62: d0fa beq.n 800bc5a <pbuf_free_ooseq+0x16>
  27780. tcp_free_ooseq(pcb);
  27781. 800bc64: f001 fd4c bl 800d700 <tcp_free_ooseq>
  27782. }
  27783. 800bc68: bd08 pop {r3, pc}
  27784. 800bc6a: bf00 nop
  27785. 800bc6c: 24019b84 .word 0x24019b84
  27786. 800bc70: 24019bd8 .word 0x24019bd8
  27787. 0800bc74 <pbuf_free_ooseq_callback>:
  27788. {
  27789. 800bc74: b508 push {r3, lr}
  27790. pbuf_free_ooseq();
  27791. 800bc76: f7ff ffe5 bl 800bc44 <pbuf_free_ooseq>
  27792. }
  27793. 800bc7a: bd08 pop {r3, pc}
  27794. 0800bc7c <pbuf_alloc_reference>:
  27795. {
  27796. 800bc7c: b5f0 push {r4, r5, r6, r7, lr}
  27797. 800bc7e: b083 sub sp, #12
  27798. 800bc80: 4606 mov r6, r0
  27799. 800bc82: 460d mov r5, r1
  27800. 800bc84: 4614 mov r4, r2
  27801. LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM));
  27802. 800bc86: 2a41 cmp r2, #65 @ 0x41
  27803. 800bc88: bf18 it ne
  27804. 800bc8a: 2a01 cmpne r2, #1
  27805. 800bc8c: d10f bne.n 800bcae <pbuf_alloc_reference+0x32>
  27806. p = (struct pbuf *)memp_malloc(MEMP_PBUF);
  27807. 800bc8e: 200b movs r0, #11
  27808. 800bc90: f7ff fcb8 bl 800b604 <memp_malloc>
  27809. if (p == NULL) {
  27810. 800bc94: 4607 mov r7, r0
  27811. 800bc96: b138 cbz r0, 800bca8 <pbuf_alloc_reference+0x2c>
  27812. pbuf_init_alloced_pbuf(p, payload, length, length, type, 0);
  27813. 800bc98: 2300 movs r3, #0
  27814. 800bc9a: 9301 str r3, [sp, #4]
  27815. 800bc9c: 9400 str r4, [sp, #0]
  27816. 800bc9e: 462b mov r3, r5
  27817. 800bca0: 462a mov r2, r5
  27818. 800bca2: 4631 mov r1, r6
  27819. 800bca4: f7ff ff60 bl 800bb68 <pbuf_init_alloced_pbuf>
  27820. }
  27821. 800bca8: 4638 mov r0, r7
  27822. 800bcaa: b003 add sp, #12
  27823. 800bcac: bdf0 pop {r4, r5, r6, r7, pc}
  27824. LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM));
  27825. 800bcae: 4b04 ldr r3, [pc, #16] @ (800bcc0 <pbuf_alloc_reference+0x44>)
  27826. 800bcb0: f44f 72a5 mov.w r2, #330 @ 0x14a
  27827. 800bcb4: 4903 ldr r1, [pc, #12] @ (800bcc4 <pbuf_alloc_reference+0x48>)
  27828. 800bcb6: 4804 ldr r0, [pc, #16] @ (800bcc8 <pbuf_alloc_reference+0x4c>)
  27829. 800bcb8: f007 fba6 bl 8013408 <iprintf>
  27830. 800bcbc: e7e7 b.n 800bc8e <pbuf_alloc_reference+0x12>
  27831. 800bcbe: bf00 nop
  27832. 800bcc0: 08016070 .word 0x08016070
  27833. 800bcc4: 080160d0 .word 0x080160d0
  27834. 800bcc8: 080144e8 .word 0x080144e8
  27835. 0800bccc <pbuf_alloced_custom>:
  27836. {
  27837. 800bccc: b510 push {r4, lr}
  27838. 800bcce: b082 sub sp, #8
  27839. 800bcd0: 4684 mov ip, r0
  27840. 800bcd2: 468e mov lr, r1
  27841. 800bcd4: 4618 mov r0, r3
  27842. 800bcd6: 9904 ldr r1, [sp, #16]
  27843. if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) {
  27844. 800bcd8: f10c 0c03 add.w ip, ip, #3
  27845. 800bcdc: f02c 0c03 bic.w ip, ip, #3
  27846. 800bce0: eb0e 040c add.w r4, lr, ip
  27847. 800bce4: f8bd 3014 ldrh.w r3, [sp, #20]
  27848. 800bce8: 429c cmp r4, r3
  27849. 800bcea: d80c bhi.n 800bd06 <pbuf_alloced_custom+0x3a>
  27850. if (payload_mem != NULL) {
  27851. 800bcec: b101 cbz r1, 800bcf0 <pbuf_alloced_custom+0x24>
  27852. payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset);
  27853. 800bcee: 4461 add r1, ip
  27854. pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM);
  27855. 800bcf0: 4604 mov r4, r0
  27856. 800bcf2: 2302 movs r3, #2
  27857. 800bcf4: 9301 str r3, [sp, #4]
  27858. 800bcf6: 9200 str r2, [sp, #0]
  27859. 800bcf8: 4673 mov r3, lr
  27860. 800bcfa: 4672 mov r2, lr
  27861. 800bcfc: f7ff ff34 bl 800bb68 <pbuf_init_alloced_pbuf>
  27862. }
  27863. 800bd00: 4620 mov r0, r4
  27864. 800bd02: b002 add sp, #8
  27865. 800bd04: bd10 pop {r4, pc}
  27866. return NULL;
  27867. 800bd06: 2400 movs r4, #0
  27868. 800bd08: e7fa b.n 800bd00 <pbuf_alloced_custom+0x34>
  27869. 0800bd0a <pbuf_add_header>:
  27870. * @return non-zero on failure, zero on success.
  27871. *
  27872. */
  27873. u8_t
  27874. pbuf_add_header(struct pbuf *p, size_t header_size_increment)
  27875. {
  27876. 800bd0a: b508 push {r3, lr}
  27877. return pbuf_add_header_impl(p, header_size_increment, 0);
  27878. 800bd0c: 2200 movs r2, #0
  27879. 800bd0e: f7ff ff3d bl 800bb8c <pbuf_add_header_impl>
  27880. }
  27881. 800bd12: bd08 pop {r3, pc}
  27882. 0800bd14 <pbuf_remove_header>:
  27883. * @return non-zero on failure, zero on success.
  27884. *
  27885. */
  27886. u8_t
  27887. pbuf_remove_header(struct pbuf *p, size_t header_size_decrement)
  27888. {
  27889. 800bd14: b538 push {r3, r4, r5, lr}
  27890. 800bd16: 460c mov r4, r1
  27891. void *payload;
  27892. u16_t increment_magnitude;
  27893. LWIP_ASSERT("p != NULL", p != NULL);
  27894. 800bd18: 4605 mov r5, r0
  27895. 800bd1a: b198 cbz r0, 800bd44 <pbuf_remove_header+0x30>
  27896. if ((p == NULL) || (header_size_decrement > 0xFFFF)) {
  27897. 800bd1c: 2d00 cmp r5, #0
  27898. 800bd1e: bf18 it ne
  27899. 800bd20: f5b4 3f80 cmpne.w r4, #65536 @ 0x10000
  27900. 800bd24: d21f bcs.n 800bd66 <pbuf_remove_header+0x52>
  27901. return 1;
  27902. }
  27903. if (header_size_decrement == 0) {
  27904. 800bd26: b304 cbz r4, 800bd6a <pbuf_remove_header+0x56>
  27905. return 0;
  27906. }
  27907. increment_magnitude = (u16_t)header_size_decrement;
  27908. 800bd28: b2a2 uxth r2, r4
  27909. /* Check that we aren't going to move off the end of the pbuf */
  27910. LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;);
  27911. 800bd2a: 896b ldrh r3, [r5, #10]
  27912. 800bd2c: 4293 cmp r3, r2
  27913. 800bd2e: d311 bcc.n 800bd54 <pbuf_remove_header+0x40>
  27914. /* remember current payload pointer */
  27915. payload = p->payload;
  27916. 800bd30: 6869 ldr r1, [r5, #4]
  27917. LWIP_UNUSED_ARG(payload); /* only used in LWIP_DEBUGF below */
  27918. /* increase payload pointer (guarded by length check above) */
  27919. p->payload = (u8_t *)p->payload + header_size_decrement;
  27920. 800bd32: 4421 add r1, r4
  27921. 800bd34: 6069 str r1, [r5, #4]
  27922. /* modify pbuf length fields */
  27923. p->len = (u16_t)(p->len - increment_magnitude);
  27924. 800bd36: 1a9b subs r3, r3, r2
  27925. 800bd38: 816b strh r3, [r5, #10]
  27926. p->tot_len = (u16_t)(p->tot_len - increment_magnitude);
  27927. 800bd3a: 892b ldrh r3, [r5, #8]
  27928. 800bd3c: 1a9b subs r3, r3, r2
  27929. 800bd3e: 812b strh r3, [r5, #8]
  27930. LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_remove_header: old %p new %p (%"U16_F")\n",
  27931. (void *)payload, (void *)p->payload, increment_magnitude));
  27932. return 0;
  27933. 800bd40: 2000 movs r0, #0
  27934. }
  27935. 800bd42: bd38 pop {r3, r4, r5, pc}
  27936. LWIP_ASSERT("p != NULL", p != NULL);
  27937. 800bd44: 4b0a ldr r3, [pc, #40] @ (800bd70 <pbuf_remove_header+0x5c>)
  27938. 800bd46: f240 224b movw r2, #587 @ 0x24b
  27939. 800bd4a: 490a ldr r1, [pc, #40] @ (800bd74 <pbuf_remove_header+0x60>)
  27940. 800bd4c: 480a ldr r0, [pc, #40] @ (800bd78 <pbuf_remove_header+0x64>)
  27941. 800bd4e: f007 fb5b bl 8013408 <iprintf>
  27942. 800bd52: e7e3 b.n 800bd1c <pbuf_remove_header+0x8>
  27943. LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;);
  27944. 800bd54: 4b06 ldr r3, [pc, #24] @ (800bd70 <pbuf_remove_header+0x5c>)
  27945. 800bd56: f240 2255 movw r2, #597 @ 0x255
  27946. 800bd5a: 4908 ldr r1, [pc, #32] @ (800bd7c <pbuf_remove_header+0x68>)
  27947. 800bd5c: 4806 ldr r0, [pc, #24] @ (800bd78 <pbuf_remove_header+0x64>)
  27948. 800bd5e: f007 fb53 bl 8013408 <iprintf>
  27949. 800bd62: 2001 movs r0, #1
  27950. 800bd64: e7ed b.n 800bd42 <pbuf_remove_header+0x2e>
  27951. return 1;
  27952. 800bd66: 2001 movs r0, #1
  27953. 800bd68: e7eb b.n 800bd42 <pbuf_remove_header+0x2e>
  27954. return 0;
  27955. 800bd6a: 2000 movs r0, #0
  27956. 800bd6c: e7e9 b.n 800bd42 <pbuf_remove_header+0x2e>
  27957. 800bd6e: bf00 nop
  27958. 800bd70: 08016070 .word 0x08016070
  27959. 800bd74: 08014fc0 .word 0x08014fc0
  27960. 800bd78: 080144e8 .word 0x080144e8
  27961. 800bd7c: 080160e4 .word 0x080160e4
  27962. 0800bd80 <pbuf_header_impl>:
  27963. static u8_t
  27964. pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force)
  27965. {
  27966. 800bd80: b508 push {r3, lr}
  27967. if (header_size_increment < 0) {
  27968. 800bd82: 2900 cmp r1, #0
  27969. 800bd84: db02 blt.n 800bd8c <pbuf_header_impl+0xc>
  27970. return pbuf_remove_header(p, (size_t) - header_size_increment);
  27971. } else {
  27972. return pbuf_add_header_impl(p, (size_t)header_size_increment, force);
  27973. 800bd86: f7ff ff01 bl 800bb8c <pbuf_add_header_impl>
  27974. }
  27975. }
  27976. 800bd8a: bd08 pop {r3, pc}
  27977. return pbuf_remove_header(p, (size_t) - header_size_increment);
  27978. 800bd8c: 4249 negs r1, r1
  27979. 800bd8e: f7ff ffc1 bl 800bd14 <pbuf_remove_header>
  27980. 800bd92: e7fa b.n 800bd8a <pbuf_header_impl+0xa>
  27981. 0800bd94 <pbuf_header_force>:
  27982. * Same as pbuf_header but does not check if 'header_size > 0' is allowed.
  27983. * This is used internally only, to allow PBUF_REF for RX.
  27984. */
  27985. u8_t
  27986. pbuf_header_force(struct pbuf *p, s16_t header_size_increment)
  27987. {
  27988. 800bd94: b508 push {r3, lr}
  27989. return pbuf_header_impl(p, header_size_increment, 1);
  27990. 800bd96: 2201 movs r2, #1
  27991. 800bd98: f7ff fff2 bl 800bd80 <pbuf_header_impl>
  27992. }
  27993. 800bd9c: bd08 pop {r3, pc}
  27994. ...
  27995. 0800bda0 <pbuf_free>:
  27996. * 1->1->1 becomes .......
  27997. *
  27998. */
  27999. u8_t
  28000. pbuf_free(struct pbuf *p)
  28001. {
  28002. 800bda0: b5f8 push {r3, r4, r5, r6, r7, lr}
  28003. u8_t alloc_src;
  28004. struct pbuf *q;
  28005. u8_t count;
  28006. if (p == NULL) {
  28007. 800bda2: b110 cbz r0, 800bdaa <pbuf_free+0xa>
  28008. 800bda4: 4604 mov r4, r0
  28009. }
  28010. LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p));
  28011. PERF_START;
  28012. count = 0;
  28013. 800bda6: 2600 movs r6, #0
  28014. 800bda8: e017 b.n 800bdda <pbuf_free+0x3a>
  28015. LWIP_ASSERT("p != NULL", p != NULL);
  28016. 800bdaa: 4b2b ldr r3, [pc, #172] @ (800be58 <pbuf_free+0xb8>)
  28017. 800bdac: f44f 7237 mov.w r2, #732 @ 0x2dc
  28018. 800bdb0: 492a ldr r1, [pc, #168] @ (800be5c <pbuf_free+0xbc>)
  28019. 800bdb2: 482b ldr r0, [pc, #172] @ (800be60 <pbuf_free+0xc0>)
  28020. 800bdb4: f007 fb28 bl 8013408 <iprintf>
  28021. return 0;
  28022. 800bdb8: 2600 movs r6, #0
  28023. }
  28024. }
  28025. PERF_STOP("pbuf_free");
  28026. /* return number of de-allocated pbufs */
  28027. return count;
  28028. }
  28029. 800bdba: 4630 mov r0, r6
  28030. 800bdbc: bdf8 pop {r3, r4, r5, r6, r7, pc}
  28031. LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);
  28032. 800bdbe: 4b26 ldr r3, [pc, #152] @ (800be58 <pbuf_free+0xb8>)
  28033. 800bdc0: f240 22f1 movw r2, #753 @ 0x2f1
  28034. 800bdc4: 4927 ldr r1, [pc, #156] @ (800be64 <pbuf_free+0xc4>)
  28035. 800bdc6: 4826 ldr r0, [pc, #152] @ (800be60 <pbuf_free+0xc0>)
  28036. 800bdc8: f007 fb1e bl 8013408 <iprintf>
  28037. 800bdcc: e00d b.n 800bdea <pbuf_free+0x4a>
  28038. pc->custom_free_function(p);
  28039. 800bdce: 6923 ldr r3, [r4, #16]
  28040. 800bdd0: 4620 mov r0, r4
  28041. 800bdd2: 4798 blx r3
  28042. count++;
  28043. 800bdd4: 3601 adds r6, #1
  28044. 800bdd6: b2f6 uxtb r6, r6
  28045. p = q;
  28046. 800bdd8: 462c mov r4, r5
  28047. while (p != NULL) {
  28048. 800bdda: 2c00 cmp r4, #0
  28049. 800bddc: d0ed beq.n 800bdba <pbuf_free+0x1a>
  28050. SYS_ARCH_PROTECT(old_level);
  28051. 800bdde: f001 f947 bl 800d070 <sys_arch_protect>
  28052. 800bde2: 4607 mov r7, r0
  28053. LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);
  28054. 800bde4: 7ba3 ldrb r3, [r4, #14]
  28055. 800bde6: 2b00 cmp r3, #0
  28056. 800bde8: d0e9 beq.n 800bdbe <pbuf_free+0x1e>
  28057. ref = --(p->ref);
  28058. 800bdea: 7ba5 ldrb r5, [r4, #14]
  28059. 800bdec: 3d01 subs r5, #1
  28060. 800bdee: b2ed uxtb r5, r5
  28061. 800bdf0: 73a5 strb r5, [r4, #14]
  28062. SYS_ARCH_UNPROTECT(old_level);
  28063. 800bdf2: 4638 mov r0, r7
  28064. 800bdf4: f001 f948 bl 800d088 <sys_arch_unprotect>
  28065. if (ref == 0) {
  28066. 800bdf8: 2d00 cmp r5, #0
  28067. 800bdfa: d1de bne.n 800bdba <pbuf_free+0x1a>
  28068. q = p->next;
  28069. 800bdfc: 6825 ldr r5, [r4, #0]
  28070. alloc_src = pbuf_get_allocsrc(p);
  28071. 800bdfe: 7b23 ldrb r3, [r4, #12]
  28072. 800be00: f003 030f and.w r3, r3, #15
  28073. if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) {
  28074. 800be04: 7b62 ldrb r2, [r4, #13]
  28075. 800be06: f012 0f02 tst.w r2, #2
  28076. 800be0a: d00a beq.n 800be22 <pbuf_free+0x82>
  28077. LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL);
  28078. 800be0c: 6923 ldr r3, [r4, #16]
  28079. 800be0e: 2b00 cmp r3, #0
  28080. 800be10: d1dd bne.n 800bdce <pbuf_free+0x2e>
  28081. 800be12: 4b11 ldr r3, [pc, #68] @ (800be58 <pbuf_free+0xb8>)
  28082. 800be14: f240 22ff movw r2, #767 @ 0x2ff
  28083. 800be18: 4913 ldr r1, [pc, #76] @ (800be68 <pbuf_free+0xc8>)
  28084. 800be1a: 4811 ldr r0, [pc, #68] @ (800be60 <pbuf_free+0xc0>)
  28085. 800be1c: f007 faf4 bl 8013408 <iprintf>
  28086. 800be20: e7d5 b.n 800bdce <pbuf_free+0x2e>
  28087. if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL) {
  28088. 800be22: 2b02 cmp r3, #2
  28089. 800be24: d006 beq.n 800be34 <pbuf_free+0x94>
  28090. } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) {
  28091. 800be26: 2b01 cmp r3, #1
  28092. 800be28: d009 beq.n 800be3e <pbuf_free+0x9e>
  28093. } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) {
  28094. 800be2a: b96b cbnz r3, 800be48 <pbuf_free+0xa8>
  28095. mem_free(p);
  28096. 800be2c: 4620 mov r0, r4
  28097. 800be2e: f7ff f971 bl 800b114 <mem_free>
  28098. 800be32: e7cf b.n 800bdd4 <pbuf_free+0x34>
  28099. memp_free(MEMP_PBUF_POOL, p);
  28100. 800be34: 4621 mov r1, r4
  28101. 800be36: 200c movs r0, #12
  28102. 800be38: f7ff fc1a bl 800b670 <memp_free>
  28103. 800be3c: e7ca b.n 800bdd4 <pbuf_free+0x34>
  28104. memp_free(MEMP_PBUF, p);
  28105. 800be3e: 4621 mov r1, r4
  28106. 800be40: 200b movs r0, #11
  28107. 800be42: f7ff fc15 bl 800b670 <memp_free>
  28108. 800be46: e7c5 b.n 800bdd4 <pbuf_free+0x34>
  28109. LWIP_ASSERT("invalid pbuf type", 0);
  28110. 800be48: 4b03 ldr r3, [pc, #12] @ (800be58 <pbuf_free+0xb8>)
  28111. 800be4a: f240 320f movw r2, #783 @ 0x30f
  28112. 800be4e: 4907 ldr r1, [pc, #28] @ (800be6c <pbuf_free+0xcc>)
  28113. 800be50: 4803 ldr r0, [pc, #12] @ (800be60 <pbuf_free+0xc0>)
  28114. 800be52: f007 fad9 bl 8013408 <iprintf>
  28115. 800be56: e7bd b.n 800bdd4 <pbuf_free+0x34>
  28116. 800be58: 08016070 .word 0x08016070
  28117. 800be5c: 08014fc0 .word 0x08014fc0
  28118. 800be60: 080144e8 .word 0x080144e8
  28119. 800be64: 08016104 .word 0x08016104
  28120. 800be68: 0801611c .word 0x0801611c
  28121. 800be6c: 08016140 .word 0x08016140
  28122. 0800be70 <pbuf_alloc>:
  28123. {
  28124. 800be70: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  28125. 800be74: b082 sub sp, #8
  28126. 800be76: 460e mov r6, r1
  28127. 800be78: 4690 mov r8, r2
  28128. switch (type) {
  28129. 800be7a: f5b2 7fc1 cmp.w r2, #386 @ 0x182
  28130. 800be7e: d044 beq.n 800bf0a <pbuf_alloc+0x9a>
  28131. 800be80: 4604 mov r4, r0
  28132. 800be82: d80e bhi.n 800bea2 <pbuf_alloc+0x32>
  28133. 800be84: 2a01 cmp r2, #1
  28134. 800be86: d002 beq.n 800be8e <pbuf_alloc+0x1e>
  28135. 800be88: 2a41 cmp r2, #65 @ 0x41
  28136. 800be8a: f040 8084 bne.w 800bf96 <pbuf_alloc+0x126>
  28137. p = pbuf_alloc_reference(NULL, length, type);
  28138. 800be8e: 4642 mov r2, r8
  28139. 800be90: 4631 mov r1, r6
  28140. 800be92: 2000 movs r0, #0
  28141. 800be94: f7ff fef2 bl 800bc7c <pbuf_alloc_reference>
  28142. 800be98: 4681 mov r9, r0
  28143. }
  28144. 800be9a: 4648 mov r0, r9
  28145. 800be9c: b002 add sp, #8
  28146. 800be9e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  28147. switch (type) {
  28148. 800bea2: f5b2 7f20 cmp.w r2, #640 @ 0x280
  28149. 800bea6: d176 bne.n 800bf96 <pbuf_alloc+0x126>
  28150. u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length));
  28151. 800bea8: 1cc1 adds r1, r0, #3
  28152. 800beaa: f401 71fe and.w r1, r1, #508 @ 0x1fc
  28153. 800beae: 1cf2 adds r2, r6, #3
  28154. 800beb0: b293 uxth r3, r2
  28155. 800beb2: f023 0303 bic.w r3, r3, #3
  28156. 800beb6: 440b add r3, r1
  28157. 800beb8: b29b uxth r3, r3
  28158. mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len);
  28159. 800beba: f103 0010 add.w r0, r3, #16
  28160. if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) ||
  28161. 800bebe: f022 0203 bic.w r2, r2, #3
  28162. 800bec2: 4293 cmp r3, r2
  28163. 800bec4: d371 bcc.n 800bfaa <pbuf_alloc+0x13a>
  28164. 800bec6: 4282 cmp r2, r0
  28165. 800bec8: d872 bhi.n 800bfb0 <pbuf_alloc+0x140>
  28166. p = (struct pbuf *)mem_malloc(alloc_len);
  28167. 800beca: f7ff fa63 bl 800b394 <mem_malloc>
  28168. if (p == NULL) {
  28169. 800bece: 4681 mov r9, r0
  28170. 800bed0: 2800 cmp r0, #0
  28171. 800bed2: d0e2 beq.n 800be9a <pbuf_alloc+0x2a>
  28172. pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)),
  28173. 800bed4: f104 0110 add.w r1, r4, #16
  28174. 800bed8: 4401 add r1, r0
  28175. 800beda: 3103 adds r1, #3
  28176. 800bedc: 2300 movs r3, #0
  28177. 800bede: 9301 str r3, [sp, #4]
  28178. 800bee0: f8cd 8000 str.w r8, [sp]
  28179. 800bee4: 4633 mov r3, r6
  28180. 800bee6: 4632 mov r2, r6
  28181. 800bee8: f021 0103 bic.w r1, r1, #3
  28182. 800beec: f7ff fe3c bl 800bb68 <pbuf_init_alloced_pbuf>
  28183. LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned",
  28184. 800bef0: f8d9 3004 ldr.w r3, [r9, #4]
  28185. 800bef4: f013 0f03 tst.w r3, #3
  28186. 800bef8: d0cf beq.n 800be9a <pbuf_alloc+0x2a>
  28187. 800befa: 4b2f ldr r3, [pc, #188] @ (800bfb8 <pbuf_alloc+0x148>)
  28188. 800befc: f44f 7291 mov.w r2, #290 @ 0x122
  28189. 800bf00: 492e ldr r1, [pc, #184] @ (800bfbc <pbuf_alloc+0x14c>)
  28190. 800bf02: 482f ldr r0, [pc, #188] @ (800bfc0 <pbuf_alloc+0x150>)
  28191. 800bf04: f007 fa80 bl 8013408 <iprintf>
  28192. 800bf08: e7c7 b.n 800be9a <pbuf_alloc+0x2a>
  28193. 800bf0a: 4605 mov r5, r0
  28194. switch (type) {
  28195. 800bf0c: 2700 movs r7, #0
  28196. 800bf0e: 46b9 mov r9, r7
  28197. 800bf10: e013 b.n 800bf3a <pbuf_alloc+0xca>
  28198. PBUF_POOL_IS_EMPTY();
  28199. 800bf12: f7ff fe79 bl 800bc08 <pbuf_pool_is_empty>
  28200. if (p) {
  28201. 800bf16: f1b9 0f00 cmp.w r9, #0
  28202. 800bf1a: d002 beq.n 800bf22 <pbuf_alloc+0xb2>
  28203. pbuf_free(p);
  28204. 800bf1c: 4648 mov r0, r9
  28205. 800bf1e: f7ff ff3f bl 800bda0 <pbuf_free>
  28206. return NULL;
  28207. 800bf22: 46b9 mov r9, r7
  28208. 800bf24: e7b9 b.n 800be9a <pbuf_alloc+0x2a>
  28209. if (p == NULL) {
  28210. 800bf26: f1b9 0f00 cmp.w r9, #0
  28211. 800bf2a: d032 beq.n 800bf92 <pbuf_alloc+0x122>
  28212. last->next = q;
  28213. 800bf2c: f8ca 7000 str.w r7, [sl]
  28214. rem_len = (u16_t)(rem_len - qlen);
  28215. 800bf30: 1b34 subs r4, r6, r4
  28216. 800bf32: b2a6 uxth r6, r4
  28217. offset = 0;
  28218. 800bf34: 2500 movs r5, #0
  28219. } while (rem_len > 0);
  28220. 800bf36: 2e00 cmp r6, #0
  28221. 800bf38: d0af beq.n 800be9a <pbuf_alloc+0x2a>
  28222. q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL);
  28223. 800bf3a: 46ba mov sl, r7
  28224. 800bf3c: 200c movs r0, #12
  28225. 800bf3e: f7ff fb61 bl 800b604 <memp_malloc>
  28226. if (q == NULL) {
  28227. 800bf42: 4607 mov r7, r0
  28228. 800bf44: 2800 cmp r0, #0
  28229. 800bf46: d0e4 beq.n 800bf12 <pbuf_alloc+0xa2>
  28230. qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)));
  28231. 800bf48: 1ceb adds r3, r5, #3
  28232. 800bf4a: f023 0303 bic.w r3, r3, #3
  28233. 800bf4e: b29b uxth r3, r3
  28234. 800bf50: f240 54ec movw r4, #1516 @ 0x5ec
  28235. 800bf54: 1ae4 subs r4, r4, r3
  28236. 800bf56: b2a4 uxth r4, r4
  28237. 800bf58: 42b4 cmp r4, r6
  28238. 800bf5a: bf28 it cs
  28239. 800bf5c: 4634 movcs r4, r6
  28240. pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)),
  28241. 800bf5e: f105 0110 add.w r1, r5, #16
  28242. 800bf62: 4401 add r1, r0
  28243. 800bf64: 3103 adds r1, #3
  28244. 800bf66: 2300 movs r3, #0
  28245. 800bf68: 9301 str r3, [sp, #4]
  28246. 800bf6a: f8cd 8000 str.w r8, [sp]
  28247. 800bf6e: 4623 mov r3, r4
  28248. 800bf70: 4632 mov r2, r6
  28249. 800bf72: f021 0103 bic.w r1, r1, #3
  28250. 800bf76: f7ff fdf7 bl 800bb68 <pbuf_init_alloced_pbuf>
  28251. LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned",
  28252. 800bf7a: 687b ldr r3, [r7, #4]
  28253. 800bf7c: f013 0f03 tst.w r3, #3
  28254. 800bf80: d0d1 beq.n 800bf26 <pbuf_alloc+0xb6>
  28255. 800bf82: 4b0d ldr r3, [pc, #52] @ (800bfb8 <pbuf_alloc+0x148>)
  28256. 800bf84: f44f 7280 mov.w r2, #256 @ 0x100
  28257. 800bf88: 490e ldr r1, [pc, #56] @ (800bfc4 <pbuf_alloc+0x154>)
  28258. 800bf8a: 480d ldr r0, [pc, #52] @ (800bfc0 <pbuf_alloc+0x150>)
  28259. 800bf8c: f007 fa3c bl 8013408 <iprintf>
  28260. LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT",
  28261. 800bf90: e7c9 b.n 800bf26 <pbuf_alloc+0xb6>
  28262. p = q;
  28263. 800bf92: 46b9 mov r9, r7
  28264. 800bf94: e7cc b.n 800bf30 <pbuf_alloc+0xc0>
  28265. LWIP_ASSERT("pbuf_alloc: erroneous type", 0);
  28266. 800bf96: 4b08 ldr r3, [pc, #32] @ (800bfb8 <pbuf_alloc+0x148>)
  28267. 800bf98: f240 1227 movw r2, #295 @ 0x127
  28268. 800bf9c: 490a ldr r1, [pc, #40] @ (800bfc8 <pbuf_alloc+0x158>)
  28269. 800bf9e: 4808 ldr r0, [pc, #32] @ (800bfc0 <pbuf_alloc+0x150>)
  28270. 800bfa0: f007 fa32 bl 8013408 <iprintf>
  28271. return NULL;
  28272. 800bfa4: f04f 0900 mov.w r9, #0
  28273. 800bfa8: e777 b.n 800be9a <pbuf_alloc+0x2a>
  28274. return NULL;
  28275. 800bfaa: f04f 0900 mov.w r9, #0
  28276. 800bfae: e774 b.n 800be9a <pbuf_alloc+0x2a>
  28277. 800bfb0: f04f 0900 mov.w r9, #0
  28278. 800bfb4: e771 b.n 800be9a <pbuf_alloc+0x2a>
  28279. 800bfb6: bf00 nop
  28280. 800bfb8: 08016070 .word 0x08016070
  28281. 800bfbc: 080161b8 .word 0x080161b8
  28282. 800bfc0: 080144e8 .word 0x080144e8
  28283. 800bfc4: 08016154 .word 0x08016154
  28284. 800bfc8: 080161e4 .word 0x080161e4
  28285. 0800bfcc <pbuf_realloc>:
  28286. {
  28287. 800bfcc: b5f8 push {r3, r4, r5, r6, r7, lr}
  28288. 800bfce: 460e mov r6, r1
  28289. LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL);
  28290. 800bfd0: 4604 mov r4, r0
  28291. 800bfd2: b1b8 cbz r0, 800c004 <pbuf_realloc+0x38>
  28292. if (new_len >= p->tot_len) {
  28293. 800bfd4: 8927 ldrh r7, [r4, #8]
  28294. 800bfd6: 42b7 cmp r7, r6
  28295. 800bfd8: d92e bls.n 800c038 <pbuf_realloc+0x6c>
  28296. rem_len = new_len;
  28297. 800bfda: 4635 mov r5, r6
  28298. while (rem_len > q->len) {
  28299. 800bfdc: 8963 ldrh r3, [r4, #10]
  28300. 800bfde: 42ab cmp r3, r5
  28301. 800bfe0: d218 bcs.n 800c014 <pbuf_realloc+0x48>
  28302. rem_len = (u16_t)(rem_len - q->len);
  28303. 800bfe2: 1aeb subs r3, r5, r3
  28304. 800bfe4: b29d uxth r5, r3
  28305. q->tot_len = (u16_t)(q->tot_len - shrink);
  28306. 800bfe6: 8923 ldrh r3, [r4, #8]
  28307. 800bfe8: 1bf2 subs r2, r6, r7
  28308. 800bfea: 4413 add r3, r2
  28309. 800bfec: 8123 strh r3, [r4, #8]
  28310. q = q->next;
  28311. 800bfee: 6824 ldr r4, [r4, #0]
  28312. LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL);
  28313. 800bff0: 2c00 cmp r4, #0
  28314. 800bff2: d1f3 bne.n 800bfdc <pbuf_realloc+0x10>
  28315. 800bff4: 4b19 ldr r3, [pc, #100] @ (800c05c <pbuf_realloc+0x90>)
  28316. 800bff6: f240 12af movw r2, #431 @ 0x1af
  28317. 800bffa: 4919 ldr r1, [pc, #100] @ (800c060 <pbuf_realloc+0x94>)
  28318. 800bffc: 4819 ldr r0, [pc, #100] @ (800c064 <pbuf_realloc+0x98>)
  28319. 800bffe: f007 fa03 bl 8013408 <iprintf>
  28320. 800c002: e7eb b.n 800bfdc <pbuf_realloc+0x10>
  28321. LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL);
  28322. 800c004: 4b15 ldr r3, [pc, #84] @ (800c05c <pbuf_realloc+0x90>)
  28323. 800c006: f44f 72cc mov.w r2, #408 @ 0x198
  28324. 800c00a: 4917 ldr r1, [pc, #92] @ (800c068 <pbuf_realloc+0x9c>)
  28325. 800c00c: 4815 ldr r0, [pc, #84] @ (800c064 <pbuf_realloc+0x98>)
  28326. 800c00e: f007 f9fb bl 8013408 <iprintf>
  28327. 800c012: e7df b.n 800bfd4 <pbuf_realloc+0x8>
  28328. if (pbuf_match_allocsrc(q, PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) && (rem_len != q->len)
  28329. 800c014: 7b22 ldrb r2, [r4, #12]
  28330. 800c016: f012 0f0f tst.w r2, #15
  28331. 800c01a: d105 bne.n 800c028 <pbuf_realloc+0x5c>
  28332. 800c01c: 42ab cmp r3, r5
  28333. 800c01e: d003 beq.n 800c028 <pbuf_realloc+0x5c>
  28334. && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0)
  28335. 800c020: 7b63 ldrb r3, [r4, #13]
  28336. 800c022: f013 0f02 tst.w r3, #2
  28337. 800c026: d008 beq.n 800c03a <pbuf_realloc+0x6e>
  28338. q->len = rem_len;
  28339. 800c028: 8165 strh r5, [r4, #10]
  28340. q->tot_len = q->len;
  28341. 800c02a: 8125 strh r5, [r4, #8]
  28342. if (q->next != NULL) {
  28343. 800c02c: 6820 ldr r0, [r4, #0]
  28344. 800c02e: b108 cbz r0, 800c034 <pbuf_realloc+0x68>
  28345. pbuf_free(q->next);
  28346. 800c030: f7ff feb6 bl 800bda0 <pbuf_free>
  28347. q->next = NULL;
  28348. 800c034: 2300 movs r3, #0
  28349. 800c036: 6023 str r3, [r4, #0]
  28350. }
  28351. 800c038: bdf8 pop {r3, r4, r5, r6, r7, pc}
  28352. q = (struct pbuf *)mem_trim(q, (mem_size_t)(((u8_t *)q->payload - (u8_t *)q) + rem_len));
  28353. 800c03a: 6863 ldr r3, [r4, #4]
  28354. 800c03c: 1b1b subs r3, r3, r4
  28355. 800c03e: 18e9 adds r1, r5, r3
  28356. 800c040: 4620 mov r0, r4
  28357. 800c042: f7ff f8df bl 800b204 <mem_trim>
  28358. LWIP_ASSERT("mem_trim returned q == NULL", q != NULL);
  28359. 800c046: 4604 mov r4, r0
  28360. 800c048: 2800 cmp r0, #0
  28361. 800c04a: d1ed bne.n 800c028 <pbuf_realloc+0x5c>
  28362. 800c04c: 4b03 ldr r3, [pc, #12] @ (800c05c <pbuf_realloc+0x90>)
  28363. 800c04e: f240 12bd movw r2, #445 @ 0x1bd
  28364. 800c052: 4906 ldr r1, [pc, #24] @ (800c06c <pbuf_realloc+0xa0>)
  28365. 800c054: 4803 ldr r0, [pc, #12] @ (800c064 <pbuf_realloc+0x98>)
  28366. 800c056: f007 f9d7 bl 8013408 <iprintf>
  28367. 800c05a: e7e5 b.n 800c028 <pbuf_realloc+0x5c>
  28368. 800c05c: 08016070 .word 0x08016070
  28369. 800c060: 08016218 .word 0x08016218
  28370. 800c064: 080144e8 .word 0x080144e8
  28371. 800c068: 08016200 .word 0x08016200
  28372. 800c06c: 08016230 .word 0x08016230
  28373. 0800c070 <pbuf_free_header>:
  28374. {
  28375. 800c070: b570 push {r4, r5, r6, lr}
  28376. 800c072: 4605 mov r5, r0
  28377. 800c074: 460c mov r4, r1
  28378. while (free_left && p) {
  28379. 800c076: e004 b.n 800c082 <pbuf_free_header+0x12>
  28380. pbuf_remove_header(p, free_left);
  28381. 800c078: 4621 mov r1, r4
  28382. 800c07a: 4628 mov r0, r5
  28383. 800c07c: f7ff fe4a bl 800bd14 <pbuf_remove_header>
  28384. free_left = 0;
  28385. 800c080: 2400 movs r4, #0
  28386. while (free_left && p) {
  28387. 800c082: 1e23 subs r3, r4, #0
  28388. 800c084: bf18 it ne
  28389. 800c086: 2301 movne r3, #1
  28390. 800c088: b16d cbz r5, 800c0a6 <pbuf_free_header+0x36>
  28391. 800c08a: b163 cbz r3, 800c0a6 <pbuf_free_header+0x36>
  28392. if (free_left >= p->len) {
  28393. 800c08c: 896b ldrh r3, [r5, #10]
  28394. 800c08e: 42a3 cmp r3, r4
  28395. 800c090: d8f2 bhi.n 800c078 <pbuf_free_header+0x8>
  28396. free_left = (u16_t)(free_left - p->len);
  28397. 800c092: 1ae4 subs r4, r4, r3
  28398. 800c094: b2a4 uxth r4, r4
  28399. p = p->next;
  28400. 800c096: 682e ldr r6, [r5, #0]
  28401. f->next = 0;
  28402. 800c098: 2300 movs r3, #0
  28403. 800c09a: 602b str r3, [r5, #0]
  28404. pbuf_free(f);
  28405. 800c09c: 4628 mov r0, r5
  28406. 800c09e: f7ff fe7f bl 800bda0 <pbuf_free>
  28407. p = p->next;
  28408. 800c0a2: 4635 mov r5, r6
  28409. 800c0a4: e7ed b.n 800c082 <pbuf_free_header+0x12>
  28410. }
  28411. 800c0a6: 4628 mov r0, r5
  28412. 800c0a8: bd70 pop {r4, r5, r6, pc}
  28413. 0800c0aa <pbuf_clen>:
  28414. * @param p first pbuf of chain
  28415. * @return the number of pbufs in a chain
  28416. */
  28417. u16_t
  28418. pbuf_clen(const struct pbuf *p)
  28419. {
  28420. 800c0aa: 4603 mov r3, r0
  28421. u16_t len;
  28422. len = 0;
  28423. 800c0ac: 2000 movs r0, #0
  28424. while (p != NULL) {
  28425. 800c0ae: e002 b.n 800c0b6 <pbuf_clen+0xc>
  28426. ++len;
  28427. 800c0b0: 3001 adds r0, #1
  28428. 800c0b2: b280 uxth r0, r0
  28429. p = p->next;
  28430. 800c0b4: 681b ldr r3, [r3, #0]
  28431. while (p != NULL) {
  28432. 800c0b6: 2b00 cmp r3, #0
  28433. 800c0b8: d1fa bne.n 800c0b0 <pbuf_clen+0x6>
  28434. }
  28435. return len;
  28436. }
  28437. 800c0ba: 4770 bx lr
  28438. 0800c0bc <pbuf_ref>:
  28439. */
  28440. void
  28441. pbuf_ref(struct pbuf *p)
  28442. {
  28443. /* pbuf given? */
  28444. if (p != NULL) {
  28445. 800c0bc: b198 cbz r0, 800c0e6 <pbuf_ref+0x2a>
  28446. {
  28447. 800c0be: b510 push {r4, lr}
  28448. 800c0c0: 4604 mov r4, r0
  28449. SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1));
  28450. 800c0c2: f000 ffd5 bl 800d070 <sys_arch_protect>
  28451. 800c0c6: 7ba3 ldrb r3, [r4, #14]
  28452. 800c0c8: 3301 adds r3, #1
  28453. 800c0ca: 73a3 strb r3, [r4, #14]
  28454. 800c0cc: f000 ffdc bl 800d088 <sys_arch_unprotect>
  28455. LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
  28456. 800c0d0: 7ba3 ldrb r3, [r4, #14]
  28457. 800c0d2: b103 cbz r3, 800c0d6 <pbuf_ref+0x1a>
  28458. }
  28459. }
  28460. 800c0d4: bd10 pop {r4, pc}
  28461. LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
  28462. 800c0d6: 4b04 ldr r3, [pc, #16] @ (800c0e8 <pbuf_ref+0x2c>)
  28463. 800c0d8: f240 3242 movw r2, #834 @ 0x342
  28464. 800c0dc: 4903 ldr r1, [pc, #12] @ (800c0ec <pbuf_ref+0x30>)
  28465. 800c0de: 4804 ldr r0, [pc, #16] @ (800c0f0 <pbuf_ref+0x34>)
  28466. 800c0e0: f007 f992 bl 8013408 <iprintf>
  28467. }
  28468. 800c0e4: e7f6 b.n 800c0d4 <pbuf_ref+0x18>
  28469. 800c0e6: 4770 bx lr
  28470. 800c0e8: 08016070 .word 0x08016070
  28471. 800c0ec: 0801624c .word 0x0801624c
  28472. 800c0f0: 080144e8 .word 0x080144e8
  28473. 0800c0f4 <pbuf_cat>:
  28474. *
  28475. * @see pbuf_chain()
  28476. */
  28477. void
  28478. pbuf_cat(struct pbuf *h, struct pbuf *t)
  28479. {
  28480. 800c0f4: b538 push {r3, r4, r5, lr}
  28481. struct pbuf *p;
  28482. LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)",
  28483. 800c0f6: 4604 mov r4, r0
  28484. 800c0f8: 460d mov r5, r1
  28485. 800c0fa: 2900 cmp r1, #0
  28486. 800c0fc: bf18 it ne
  28487. 800c0fe: 2800 cmpne r0, #0
  28488. 800c100: d10c bne.n 800c11c <pbuf_cat+0x28>
  28489. 800c102: 4b15 ldr r3, [pc, #84] @ (800c158 <pbuf_cat+0x64>)
  28490. 800c104: f240 3259 movw r2, #857 @ 0x359
  28491. 800c108: 4914 ldr r1, [pc, #80] @ (800c15c <pbuf_cat+0x68>)
  28492. 800c10a: 4815 ldr r0, [pc, #84] @ (800c160 <pbuf_cat+0x6c>)
  28493. 800c10c: f007 f97c bl 8013408 <iprintf>
  28494. 800c110: e019 b.n 800c146 <pbuf_cat+0x52>
  28495. ((h != NULL) && (t != NULL)), return;);
  28496. /* proceed to last pbuf of chain */
  28497. for (p = h; p->next != NULL; p = p->next) {
  28498. /* add total length of second chain to all totals of first chain */
  28499. p->tot_len = (u16_t)(p->tot_len + t->tot_len);
  28500. 800c112: 8923 ldrh r3, [r4, #8]
  28501. 800c114: 8929 ldrh r1, [r5, #8]
  28502. 800c116: 440b add r3, r1
  28503. 800c118: 8123 strh r3, [r4, #8]
  28504. for (p = h; p->next != NULL; p = p->next) {
  28505. 800c11a: 4614 mov r4, r2
  28506. 800c11c: 6822 ldr r2, [r4, #0]
  28507. 800c11e: 2a00 cmp r2, #0
  28508. 800c120: d1f7 bne.n 800c112 <pbuf_cat+0x1e>
  28509. }
  28510. /* { p is last pbuf of first h chain, p->next == NULL } */
  28511. LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len);
  28512. 800c122: 8922 ldrh r2, [r4, #8]
  28513. 800c124: 8963 ldrh r3, [r4, #10]
  28514. 800c126: 429a cmp r2, r3
  28515. 800c128: d10e bne.n 800c148 <pbuf_cat+0x54>
  28516. LWIP_ASSERT("p->next == NULL", p->next == NULL);
  28517. 800c12a: 6823 ldr r3, [r4, #0]
  28518. 800c12c: b133 cbz r3, 800c13c <pbuf_cat+0x48>
  28519. 800c12e: 4b0a ldr r3, [pc, #40] @ (800c158 <pbuf_cat+0x64>)
  28520. 800c130: f240 3263 movw r2, #867 @ 0x363
  28521. 800c134: 490b ldr r1, [pc, #44] @ (800c164 <pbuf_cat+0x70>)
  28522. 800c136: 480a ldr r0, [pc, #40] @ (800c160 <pbuf_cat+0x6c>)
  28523. 800c138: f007 f966 bl 8013408 <iprintf>
  28524. /* add total length of second chain to last pbuf total of first chain */
  28525. p->tot_len = (u16_t)(p->tot_len + t->tot_len);
  28526. 800c13c: 8923 ldrh r3, [r4, #8]
  28527. 800c13e: 892a ldrh r2, [r5, #8]
  28528. 800c140: 4413 add r3, r2
  28529. 800c142: 8123 strh r3, [r4, #8]
  28530. /* chain last pbuf of head (p) with first of tail (t) */
  28531. p->next = t;
  28532. 800c144: 6025 str r5, [r4, #0]
  28533. /* p->next now references t, but the caller will drop its reference to t,
  28534. * so netto there is no change to the reference count of t.
  28535. */
  28536. }
  28537. 800c146: bd38 pop {r3, r4, r5, pc}
  28538. LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len);
  28539. 800c148: 4b03 ldr r3, [pc, #12] @ (800c158 <pbuf_cat+0x64>)
  28540. 800c14a: f240 3262 movw r2, #866 @ 0x362
  28541. 800c14e: 4906 ldr r1, [pc, #24] @ (800c168 <pbuf_cat+0x74>)
  28542. 800c150: 4803 ldr r0, [pc, #12] @ (800c160 <pbuf_cat+0x6c>)
  28543. 800c152: f007 f959 bl 8013408 <iprintf>
  28544. 800c156: e7e8 b.n 800c12a <pbuf_cat+0x36>
  28545. 800c158: 08016070 .word 0x08016070
  28546. 800c15c: 08016260 .word 0x08016260
  28547. 800c160: 080144e8 .word 0x080144e8
  28548. 800c164: 080162c8 .word 0x080162c8
  28549. 800c168: 08016298 .word 0x08016298
  28550. 0800c16c <pbuf_chain>:
  28551. * The ->ref field of the first pbuf of the tail chain is adjusted.
  28552. *
  28553. */
  28554. void
  28555. pbuf_chain(struct pbuf *h, struct pbuf *t)
  28556. {
  28557. 800c16c: b510 push {r4, lr}
  28558. 800c16e: 460c mov r4, r1
  28559. pbuf_cat(h, t);
  28560. 800c170: f7ff ffc0 bl 800c0f4 <pbuf_cat>
  28561. /* t is now referenced by h */
  28562. pbuf_ref(t);
  28563. 800c174: 4620 mov r0, r4
  28564. 800c176: f7ff ffa1 bl 800c0bc <pbuf_ref>
  28565. LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t));
  28566. }
  28567. 800c17a: bd10 pop {r4, pc}
  28568. 0800c17c <pbuf_copy>:
  28569. * ERR_ARG if one of the pbufs is NULL or p_to is not big
  28570. * enough to hold p_from
  28571. */
  28572. err_t
  28573. pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from)
  28574. {
  28575. 800c17c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  28576. LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy(%p, %p)\n",
  28577. (const void *)p_to, (const void *)p_from));
  28578. /* is the target big enough to hold the source? */
  28579. LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) &&
  28580. 800c180: 2900 cmp r1, #0
  28581. 800c182: bf18 it ne
  28582. 800c184: 2800 cmpne r0, #0
  28583. 800c186: d008 beq.n 800c19a <pbuf_copy+0x1e>
  28584. 800c188: 4605 mov r5, r0
  28585. 800c18a: 460c mov r4, r1
  28586. 800c18c: 8902 ldrh r2, [r0, #8]
  28587. 800c18e: 890b ldrh r3, [r1, #8]
  28588. 800c190: 429a cmp r2, r3
  28589. 800c192: d302 bcc.n 800c19a <pbuf_copy+0x1e>
  28590. size_t offset_to = 0, offset_from = 0, len;
  28591. 800c194: 2700 movs r7, #0
  28592. 800c196: 46b8 mov r8, r7
  28593. 800c198: e03c b.n 800c214 <pbuf_copy+0x98>
  28594. LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) &&
  28595. 800c19a: 4b3b ldr r3, [pc, #236] @ (800c288 <pbuf_copy+0x10c>)
  28596. 800c19c: f240 32c9 movw r2, #969 @ 0x3c9
  28597. 800c1a0: 493a ldr r1, [pc, #232] @ (800c28c <pbuf_copy+0x110>)
  28598. 800c1a2: 483b ldr r0, [pc, #236] @ (800c290 <pbuf_copy+0x114>)
  28599. 800c1a4: f007 f930 bl 8013408 <iprintf>
  28600. 800c1a8: f06f 000f mvn.w r0, #15
  28601. 800c1ac: e06a b.n 800c284 <pbuf_copy+0x108>
  28602. len = p_to->len - offset_to;
  28603. }
  28604. MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len);
  28605. offset_to += len;
  28606. offset_from += len;
  28607. LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
  28608. 800c1ae: 4b36 ldr r3, [pc, #216] @ (800c288 <pbuf_copy+0x10c>)
  28609. 800c1b0: f240 32d9 movw r2, #985 @ 0x3d9
  28610. 800c1b4: 4937 ldr r1, [pc, #220] @ (800c294 <pbuf_copy+0x118>)
  28611. 800c1b6: 4836 ldr r0, [pc, #216] @ (800c290 <pbuf_copy+0x114>)
  28612. 800c1b8: f007 f926 bl 8013408 <iprintf>
  28613. 800c1bc: e03e b.n 800c23c <pbuf_copy+0xc0>
  28614. LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
  28615. 800c1be: 4b32 ldr r3, [pc, #200] @ (800c288 <pbuf_copy+0x10c>)
  28616. 800c1c0: f240 32da movw r2, #986 @ 0x3da
  28617. 800c1c4: 4934 ldr r1, [pc, #208] @ (800c298 <pbuf_copy+0x11c>)
  28618. 800c1c6: 4832 ldr r0, [pc, #200] @ (800c290 <pbuf_copy+0x114>)
  28619. 800c1c8: f007 f91e bl 8013408 <iprintf>
  28620. 800c1cc: e039 b.n 800c242 <pbuf_copy+0xc6>
  28621. p_from = p_from->next;
  28622. }
  28623. if (offset_to == p_to->len) {
  28624. /* on to next p_to (if any) */
  28625. offset_to = 0;
  28626. p_to = p_to->next;
  28627. 800c1ce: 682d ldr r5, [r5, #0]
  28628. LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;);
  28629. 800c1d0: fab5 f385 clz r3, r5
  28630. 800c1d4: 095b lsrs r3, r3, #5
  28631. 800c1d6: 2c00 cmp r4, #0
  28632. 800c1d8: bf08 it eq
  28633. 800c1da: 2300 moveq r3, #0
  28634. 800c1dc: b913 cbnz r3, 800c1e4 <pbuf_copy+0x68>
  28635. offset_to = 0;
  28636. 800c1de: f04f 0800 mov.w r8, #0
  28637. 800c1e2: e036 b.n 800c252 <pbuf_copy+0xd6>
  28638. LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;);
  28639. 800c1e4: 4b28 ldr r3, [pc, #160] @ (800c288 <pbuf_copy+0x10c>)
  28640. 800c1e6: f44f 7279 mov.w r2, #996 @ 0x3e4
  28641. 800c1ea: 492c ldr r1, [pc, #176] @ (800c29c <pbuf_copy+0x120>)
  28642. 800c1ec: 4828 ldr r0, [pc, #160] @ (800c290 <pbuf_copy+0x114>)
  28643. 800c1ee: f007 f90b bl 8013408 <iprintf>
  28644. 800c1f2: f06f 000f mvn.w r0, #15
  28645. 800c1f6: e045 b.n 800c284 <pbuf_copy+0x108>
  28646. }
  28647. if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
  28648. /* don't copy more than one packet! */
  28649. LWIP_ERROR("pbuf_copy() does not allow packet queues!",
  28650. 800c1f8: 6823 ldr r3, [r4, #0]
  28651. 800c1fa: b37b cbz r3, 800c25c <pbuf_copy+0xe0>
  28652. 800c1fc: 4b22 ldr r3, [pc, #136] @ (800c288 <pbuf_copy+0x10c>)
  28653. 800c1fe: f240 32e9 movw r2, #1001 @ 0x3e9
  28654. 800c202: 4927 ldr r1, [pc, #156] @ (800c2a0 <pbuf_copy+0x124>)
  28655. 800c204: 4822 ldr r0, [pc, #136] @ (800c290 <pbuf_copy+0x114>)
  28656. 800c206: f007 f8ff bl 8013408 <iprintf>
  28657. 800c20a: f06f 0005 mvn.w r0, #5
  28658. 800c20e: e039 b.n 800c284 <pbuf_copy+0x108>
  28659. if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
  28660. /* don't copy more than one packet! */
  28661. LWIP_ERROR("pbuf_copy() does not allow packet queues!",
  28662. (p_to->next == NULL), return ERR_VAL;);
  28663. }
  28664. } while (p_from);
  28665. 800c210: 2c00 cmp r4, #0
  28666. 800c212: d036 beq.n 800c282 <pbuf_copy+0x106>
  28667. if ((p_to->len - offset_to) >= (p_from->len - offset_from)) {
  28668. 800c214: 896e ldrh r6, [r5, #10]
  28669. 800c216: eba6 0608 sub.w r6, r6, r8
  28670. 800c21a: 8963 ldrh r3, [r4, #10]
  28671. 800c21c: 1bdb subs r3, r3, r7
  28672. 800c21e: 429e cmp r6, r3
  28673. 800c220: d300 bcc.n 800c224 <pbuf_copy+0xa8>
  28674. len = p_from->len - offset_from;
  28675. 800c222: 461e mov r6, r3
  28676. MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len);
  28677. 800c224: 6868 ldr r0, [r5, #4]
  28678. 800c226: 6861 ldr r1, [r4, #4]
  28679. 800c228: 4632 mov r2, r6
  28680. 800c22a: 4439 add r1, r7
  28681. 800c22c: 4440 add r0, r8
  28682. 800c22e: f007 fb28 bl 8013882 <memcpy>
  28683. offset_to += len;
  28684. 800c232: 44b0 add r8, r6
  28685. offset_from += len;
  28686. 800c234: 4437 add r7, r6
  28687. LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len);
  28688. 800c236: 896b ldrh r3, [r5, #10]
  28689. 800c238: 4543 cmp r3, r8
  28690. 800c23a: d3b8 bcc.n 800c1ae <pbuf_copy+0x32>
  28691. LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
  28692. 800c23c: 8963 ldrh r3, [r4, #10]
  28693. 800c23e: 42bb cmp r3, r7
  28694. 800c240: d3bd bcc.n 800c1be <pbuf_copy+0x42>
  28695. if (offset_from >= p_from->len) {
  28696. 800c242: 8963 ldrh r3, [r4, #10]
  28697. 800c244: 42bb cmp r3, r7
  28698. 800c246: d801 bhi.n 800c24c <pbuf_copy+0xd0>
  28699. p_from = p_from->next;
  28700. 800c248: 6824 ldr r4, [r4, #0]
  28701. offset_from = 0;
  28702. 800c24a: 2700 movs r7, #0
  28703. if (offset_to == p_to->len) {
  28704. 800c24c: 896b ldrh r3, [r5, #10]
  28705. 800c24e: 4543 cmp r3, r8
  28706. 800c250: d0bd beq.n 800c1ce <pbuf_copy+0x52>
  28707. if ((p_from != NULL) && (p_from->len == p_from->tot_len)) {
  28708. 800c252: b11c cbz r4, 800c25c <pbuf_copy+0xe0>
  28709. 800c254: 8962 ldrh r2, [r4, #10]
  28710. 800c256: 8923 ldrh r3, [r4, #8]
  28711. 800c258: 429a cmp r2, r3
  28712. 800c25a: d0cd beq.n 800c1f8 <pbuf_copy+0x7c>
  28713. if ((p_to != NULL) && (p_to->len == p_to->tot_len)) {
  28714. 800c25c: 2d00 cmp r5, #0
  28715. 800c25e: d0d7 beq.n 800c210 <pbuf_copy+0x94>
  28716. 800c260: 896a ldrh r2, [r5, #10]
  28717. 800c262: 892b ldrh r3, [r5, #8]
  28718. 800c264: 429a cmp r2, r3
  28719. 800c266: d1d3 bne.n 800c210 <pbuf_copy+0x94>
  28720. LWIP_ERROR("pbuf_copy() does not allow packet queues!",
  28721. 800c268: 682b ldr r3, [r5, #0]
  28722. 800c26a: 2b00 cmp r3, #0
  28723. 800c26c: d0d0 beq.n 800c210 <pbuf_copy+0x94>
  28724. 800c26e: 4b06 ldr r3, [pc, #24] @ (800c288 <pbuf_copy+0x10c>)
  28725. 800c270: f240 32ee movw r2, #1006 @ 0x3ee
  28726. 800c274: 490a ldr r1, [pc, #40] @ (800c2a0 <pbuf_copy+0x124>)
  28727. 800c276: 4806 ldr r0, [pc, #24] @ (800c290 <pbuf_copy+0x114>)
  28728. 800c278: f007 f8c6 bl 8013408 <iprintf>
  28729. 800c27c: f06f 0005 mvn.w r0, #5
  28730. 800c280: e000 b.n 800c284 <pbuf_copy+0x108>
  28731. LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n"));
  28732. return ERR_OK;
  28733. 800c282: 2000 movs r0, #0
  28734. }
  28735. 800c284: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  28736. 800c288: 08016070 .word 0x08016070
  28737. 800c28c: 080162d8 .word 0x080162d8
  28738. 800c290: 080144e8 .word 0x080144e8
  28739. 800c294: 08016308 .word 0x08016308
  28740. 800c298: 08016320 .word 0x08016320
  28741. 800c29c: 0801633c .word 0x0801633c
  28742. 800c2a0: 0801634c .word 0x0801634c
  28743. 0800c2a4 <pbuf_copy_partial>:
  28744. * @param offset offset into the packet buffer from where to begin copying len bytes
  28745. * @return the number of bytes copied, or 0 on failure
  28746. */
  28747. u16_t
  28748. pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset)
  28749. {
  28750. 800c2a4: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  28751. const struct pbuf *p;
  28752. u16_t left = 0;
  28753. u16_t buf_copy_len;
  28754. u16_t copied_total = 0;
  28755. LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;);
  28756. 800c2a8: b130 cbz r0, 800c2b8 <pbuf_copy_partial+0x14>
  28757. 800c2aa: 4688 mov r8, r1
  28758. 800c2ac: 4691 mov r9, r2
  28759. 800c2ae: 4605 mov r5, r0
  28760. LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;);
  28761. 800c2b0: b169 cbz r1, 800c2ce <pbuf_copy_partial+0x2a>
  28762. u16_t copied_total = 0;
  28763. 800c2b2: 2700 movs r7, #0
  28764. u16_t left = 0;
  28765. 800c2b4: 463e mov r6, r7
  28766. 800c2b6: e02a b.n 800c30e <pbuf_copy_partial+0x6a>
  28767. LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;);
  28768. 800c2b8: 4b1d ldr r3, [pc, #116] @ (800c330 <pbuf_copy_partial+0x8c>)
  28769. 800c2ba: f240 420a movw r2, #1034 @ 0x40a
  28770. 800c2be: 491d ldr r1, [pc, #116] @ (800c334 <pbuf_copy_partial+0x90>)
  28771. 800c2c0: 481d ldr r0, [pc, #116] @ (800c338 <pbuf_copy_partial+0x94>)
  28772. 800c2c2: f007 f8a1 bl 8013408 <iprintf>
  28773. 800c2c6: 2700 movs r7, #0
  28774. len = (u16_t)(len - buf_copy_len);
  28775. offset = 0;
  28776. }
  28777. }
  28778. return copied_total;
  28779. }
  28780. 800c2c8: 4638 mov r0, r7
  28781. 800c2ca: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  28782. LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;);
  28783. 800c2ce: 4b18 ldr r3, [pc, #96] @ (800c330 <pbuf_copy_partial+0x8c>)
  28784. 800c2d0: f240 420b movw r2, #1035 @ 0x40b
  28785. 800c2d4: 4919 ldr r1, [pc, #100] @ (800c33c <pbuf_copy_partial+0x98>)
  28786. 800c2d6: 4818 ldr r0, [pc, #96] @ (800c338 <pbuf_copy_partial+0x94>)
  28787. 800c2d8: f007 f896 bl 8013408 <iprintf>
  28788. 800c2dc: 2700 movs r7, #0
  28789. 800c2de: e7f3 b.n 800c2c8 <pbuf_copy_partial+0x24>
  28790. buf_copy_len = (u16_t)(p->len - offset);
  28791. 800c2e0: 896c ldrh r4, [r5, #10]
  28792. 800c2e2: 1ae4 subs r4, r4, r3
  28793. 800c2e4: b2a4 uxth r4, r4
  28794. if (buf_copy_len > len) {
  28795. 800c2e6: 45a1 cmp r9, r4
  28796. 800c2e8: d200 bcs.n 800c2ec <pbuf_copy_partial+0x48>
  28797. buf_copy_len = len;
  28798. 800c2ea: 464c mov r4, r9
  28799. MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len);
  28800. 800c2ec: 6869 ldr r1, [r5, #4]
  28801. 800c2ee: 4622 mov r2, r4
  28802. 800c2f0: 4419 add r1, r3
  28803. 800c2f2: eb08 0006 add.w r0, r8, r6
  28804. 800c2f6: f007 fac4 bl 8013882 <memcpy>
  28805. copied_total = (u16_t)(copied_total + buf_copy_len);
  28806. 800c2fa: 4427 add r7, r4
  28807. 800c2fc: b2bf uxth r7, r7
  28808. left = (u16_t)(left + buf_copy_len);
  28809. 800c2fe: 4426 add r6, r4
  28810. 800c300: b2b6 uxth r6, r6
  28811. len = (u16_t)(len - buf_copy_len);
  28812. 800c302: eba9 0404 sub.w r4, r9, r4
  28813. 800c306: fa1f f984 uxth.w r9, r4
  28814. offset = 0;
  28815. 800c30a: 2300 movs r3, #0
  28816. for (p = buf; len != 0 && p != NULL; p = p->next) {
  28817. 800c30c: 682d ldr r5, [r5, #0]
  28818. 800c30e: 1e2a subs r2, r5, #0
  28819. 800c310: bf18 it ne
  28820. 800c312: 2201 movne r2, #1
  28821. 800c314: f1b9 0f00 cmp.w r9, #0
  28822. 800c318: d0d6 beq.n 800c2c8 <pbuf_copy_partial+0x24>
  28823. 800c31a: 2a00 cmp r2, #0
  28824. 800c31c: d0d4 beq.n 800c2c8 <pbuf_copy_partial+0x24>
  28825. if ((offset != 0) && (offset >= p->len)) {
  28826. 800c31e: 2b00 cmp r3, #0
  28827. 800c320: d0de beq.n 800c2e0 <pbuf_copy_partial+0x3c>
  28828. 800c322: 896a ldrh r2, [r5, #10]
  28829. 800c324: 429a cmp r2, r3
  28830. 800c326: d8db bhi.n 800c2e0 <pbuf_copy_partial+0x3c>
  28831. offset = (u16_t)(offset - p->len);
  28832. 800c328: 1a9b subs r3, r3, r2
  28833. 800c32a: b29b uxth r3, r3
  28834. 800c32c: e7ee b.n 800c30c <pbuf_copy_partial+0x68>
  28835. 800c32e: bf00 nop
  28836. 800c330: 08016070 .word 0x08016070
  28837. 800c334: 08016378 .word 0x08016378
  28838. 800c338: 080144e8 .word 0x080144e8
  28839. 800c33c: 08016398 .word 0x08016398
  28840. 0800c340 <pbuf_clone>:
  28841. *
  28842. * @return a new pbuf or NULL if allocation fails
  28843. */
  28844. struct pbuf *
  28845. pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p)
  28846. {
  28847. 800c340: b538 push {r3, r4, r5, lr}
  28848. 800c342: 4614 mov r4, r2
  28849. struct pbuf *q;
  28850. err_t err;
  28851. q = pbuf_alloc(layer, p->tot_len, type);
  28852. 800c344: 460a mov r2, r1
  28853. 800c346: 8921 ldrh r1, [r4, #8]
  28854. 800c348: f7ff fd92 bl 800be70 <pbuf_alloc>
  28855. if (q == NULL) {
  28856. 800c34c: 4605 mov r5, r0
  28857. 800c34e: b118 cbz r0, 800c358 <pbuf_clone+0x18>
  28858. return NULL;
  28859. }
  28860. err = pbuf_copy(q, p);
  28861. 800c350: 4621 mov r1, r4
  28862. 800c352: f7ff ff13 bl 800c17c <pbuf_copy>
  28863. LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */
  28864. LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
  28865. 800c356: b908 cbnz r0, 800c35c <pbuf_clone+0x1c>
  28866. return q;
  28867. }
  28868. 800c358: 4628 mov r0, r5
  28869. 800c35a: bd38 pop {r3, r4, r5, pc}
  28870. LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
  28871. 800c35c: 4b03 ldr r3, [pc, #12] @ (800c36c <pbuf_clone+0x2c>)
  28872. 800c35e: f240 5224 movw r2, #1316 @ 0x524
  28873. 800c362: 4903 ldr r1, [pc, #12] @ (800c370 <pbuf_clone+0x30>)
  28874. 800c364: 4803 ldr r0, [pc, #12] @ (800c374 <pbuf_clone+0x34>)
  28875. 800c366: f007 f84f bl 8013408 <iprintf>
  28876. 800c36a: e7f5 b.n 800c358 <pbuf_clone+0x18>
  28877. 800c36c: 08016070 .word 0x08016070
  28878. 800c370: 080163bc .word 0x080163bc
  28879. 800c374: 080144e8 .word 0x080144e8
  28880. 0800c378 <tryget_socket_unconn_nouse>:
  28881. /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */
  28882. static struct lwip_sock *
  28883. tryget_socket_unconn_nouse(int fd)
  28884. {
  28885. int s = fd - LWIP_SOCKET_OFFSET;
  28886. if ((s < 0) || (s >= NUM_SOCKETS)) {
  28887. 800c378: 2803 cmp r0, #3
  28888. 800c37a: d803 bhi.n 800c384 <tryget_socket_unconn_nouse+0xc>
  28889. LWIP_DEBUGF(SOCKETS_DEBUG, ("tryget_socket_unconn(%d): invalid\n", fd));
  28890. return NULL;
  28891. }
  28892. return &sockets[s];
  28893. 800c37c: 4b02 ldr r3, [pc, #8] @ (800c388 <tryget_socket_unconn_nouse+0x10>)
  28894. 800c37e: eb03 1000 add.w r0, r3, r0, lsl #4
  28895. 800c382: 4770 bx lr
  28896. return NULL;
  28897. 800c384: 2000 movs r0, #0
  28898. }
  28899. 800c386: 4770 bx lr
  28900. 800c388: 24019b8c .word 0x24019b8c
  28901. 0800c38c <tryget_socket_unconn>:
  28902. }
  28903. /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */
  28904. static struct lwip_sock *
  28905. tryget_socket_unconn(int fd)
  28906. {
  28907. 800c38c: b508 push {r3, lr}
  28908. struct lwip_sock *ret = tryget_socket_unconn_nouse(fd);
  28909. 800c38e: f7ff fff3 bl 800c378 <tryget_socket_unconn_nouse>
  28910. if (!sock_inc_used(ret)) {
  28911. return NULL;
  28912. }
  28913. }
  28914. return ret;
  28915. }
  28916. 800c392: bd08 pop {r3, pc}
  28917. 0800c394 <tryget_socket>:
  28918. * @param fd externally used socket index
  28919. * @return struct lwip_sock for the socket or NULL if not found
  28920. */
  28921. static struct lwip_sock *
  28922. tryget_socket(int fd)
  28923. {
  28924. 800c394: b508 push {r3, lr}
  28925. struct lwip_sock *sock = tryget_socket_unconn(fd);
  28926. 800c396: f7ff fff9 bl 800c38c <tryget_socket_unconn>
  28927. if (sock != NULL) {
  28928. 800c39a: 4603 mov r3, r0
  28929. 800c39c: b108 cbz r0, 800c3a2 <tryget_socket+0xe>
  28930. if (sock->conn) {
  28931. 800c39e: 6802 ldr r2, [r0, #0]
  28932. 800c3a0: b10a cbz r2, 800c3a6 <tryget_socket+0x12>
  28933. return sock;
  28934. }
  28935. done_socket(sock);
  28936. }
  28937. return NULL;
  28938. }
  28939. 800c3a2: 4618 mov r0, r3
  28940. 800c3a4: bd08 pop {r3, pc}
  28941. return NULL;
  28942. 800c3a6: 4613 mov r3, r2
  28943. 800c3a8: e7fb b.n 800c3a2 <tryget_socket+0xe>
  28944. ...
  28945. 0800c3ac <get_socket>:
  28946. * @param fd externally used socket index
  28947. * @return struct lwip_sock for the socket or NULL if not found
  28948. */
  28949. static struct lwip_sock *
  28950. get_socket(int fd)
  28951. {
  28952. 800c3ac: b508 push {r3, lr}
  28953. struct lwip_sock *sock = tryget_socket(fd);
  28954. 800c3ae: f7ff fff1 bl 800c394 <tryget_socket>
  28955. if (!sock) {
  28956. 800c3b2: b100 cbz r0, 800c3b6 <get_socket+0xa>
  28957. }
  28958. set_errno(EBADF);
  28959. return NULL;
  28960. }
  28961. return sock;
  28962. }
  28963. 800c3b4: bd08 pop {r3, pc}
  28964. set_errno(EBADF);
  28965. 800c3b6: 4b02 ldr r3, [pc, #8] @ (800c3c0 <get_socket+0x14>)
  28966. 800c3b8: 2209 movs r2, #9
  28967. 800c3ba: 601a str r2, [r3, #0]
  28968. return NULL;
  28969. 800c3bc: e7fa b.n 800c3b4 <get_socket+0x8>
  28970. 800c3be: bf00 nop
  28971. 800c3c0: 24019d8c .word 0x24019d8c
  28972. 0800c3c4 <free_socket_locked>:
  28973. }
  28974. #else /* LWIP_NETCONN_FULLDUPLEX */
  28975. LWIP_UNUSED_ARG(is_tcp);
  28976. #endif /* LWIP_NETCONN_FULLDUPLEX */
  28977. *lastdata = sock->lastdata;
  28978. 800c3c4: 6841 ldr r1, [r0, #4]
  28979. 800c3c6: 6019 str r1, [r3, #0]
  28980. sock->lastdata.pbuf = NULL;
  28981. 800c3c8: 2300 movs r3, #0
  28982. 800c3ca: 6043 str r3, [r0, #4]
  28983. *conn = sock->conn;
  28984. 800c3cc: 6801 ldr r1, [r0, #0]
  28985. 800c3ce: 6011 str r1, [r2, #0]
  28986. sock->conn = NULL;
  28987. 800c3d0: 6003 str r3, [r0, #0]
  28988. return 1;
  28989. }
  28990. 800c3d2: 2001 movs r0, #1
  28991. 800c3d4: 4770 bx lr
  28992. 0800c3d6 <lwip_poll_should_wake>:
  28993. * Check whether event_callback should wake up a thread waiting in
  28994. * lwip_poll.
  28995. */
  28996. static int
  28997. lwip_poll_should_wake(const struct lwip_select_cb *scb, int fd, int has_recvevent, int has_sendevent, int has_errevent)
  28998. {
  28999. 800c3d6: b530 push {r4, r5, lr}
  29000. 800c3d8: 9d03 ldr r5, [sp, #12]
  29001. nfds_t fdi;
  29002. for (fdi = 0; fdi < scb->poll_nfds; fdi++) {
  29003. 800c3da: f04f 0c00 mov.w ip, #0
  29004. 800c3de: e002 b.n 800c3e6 <lwip_poll_should_wake+0x10>
  29005. return 1;
  29006. }
  29007. if (has_sendevent && (pollfd->events & POLLOUT) != 0) {
  29008. return 1;
  29009. }
  29010. if (has_errevent) {
  29011. 800c3e0: b9f5 cbnz r5, 800c420 <lwip_poll_should_wake+0x4a>
  29012. for (fdi = 0; fdi < scb->poll_nfds; fdi++) {
  29013. 800c3e2: f10c 0c01 add.w ip, ip, #1
  29014. 800c3e6: 6984 ldr r4, [r0, #24]
  29015. 800c3e8: 4564 cmp r4, ip
  29016. 800c3ea: d915 bls.n 800c418 <lwip_poll_should_wake+0x42>
  29017. const struct pollfd *pollfd = &scb->poll_fds[fdi];
  29018. 800c3ec: 6944 ldr r4, [r0, #20]
  29019. 800c3ee: eb04 0ecc add.w lr, r4, ip, lsl #3
  29020. if (pollfd->fd == fd) {
  29021. 800c3f2: f854 403c ldr.w r4, [r4, ip, lsl #3]
  29022. 800c3f6: 428c cmp r4, r1
  29023. 800c3f8: d1f3 bne.n 800c3e2 <lwip_poll_should_wake+0xc>
  29024. if (has_recvevent && (pollfd->events & POLLIN) != 0) {
  29025. 800c3fa: b122 cbz r2, 800c406 <lwip_poll_should_wake+0x30>
  29026. 800c3fc: f9be 4004 ldrsh.w r4, [lr, #4]
  29027. 800c400: f014 0f01 tst.w r4, #1
  29028. 800c404: d10a bne.n 800c41c <lwip_poll_should_wake+0x46>
  29029. if (has_sendevent && (pollfd->events & POLLOUT) != 0) {
  29030. 800c406: 2b00 cmp r3, #0
  29031. 800c408: d0ea beq.n 800c3e0 <lwip_poll_should_wake+0xa>
  29032. 800c40a: f9be 4004 ldrsh.w r4, [lr, #4]
  29033. 800c40e: f014 0f02 tst.w r4, #2
  29034. 800c412: d0e5 beq.n 800c3e0 <lwip_poll_should_wake+0xa>
  29035. return 1;
  29036. 800c414: 2001 movs r0, #1
  29037. 800c416: e000 b.n 800c41a <lwip_poll_should_wake+0x44>
  29038. /* POLLERR is output only. */
  29039. return 1;
  29040. }
  29041. }
  29042. }
  29043. return 0;
  29044. 800c418: 2000 movs r0, #0
  29045. }
  29046. 800c41a: bd30 pop {r4, r5, pc}
  29047. return 1;
  29048. 800c41c: 2001 movs r0, #1
  29049. 800c41e: e7fc b.n 800c41a <lwip_poll_should_wake+0x44>
  29050. return 1;
  29051. 800c420: 2001 movs r0, #1
  29052. 800c422: e7fa b.n 800c41a <lwip_poll_should_wake+0x44>
  29053. 0800c424 <alloc_socket>:
  29054. {
  29055. 800c424: b5f8 push {r3, r4, r5, r6, r7, lr}
  29056. 800c426: 4606 mov r6, r0
  29057. 800c428: 460d mov r5, r1
  29058. for (i = 0; i < NUM_SOCKETS; ++i) {
  29059. 800c42a: 2400 movs r4, #0
  29060. 800c42c: 2c03 cmp r4, #3
  29061. 800c42e: dc31 bgt.n 800c494 <alloc_socket+0x70>
  29062. SYS_ARCH_PROTECT(lev);
  29063. 800c430: f000 fe1e bl 800d070 <sys_arch_protect>
  29064. if (!sockets[i].conn) {
  29065. 800c434: 0123 lsls r3, r4, #4
  29066. 800c436: 4a19 ldr r2, [pc, #100] @ (800c49c <alloc_socket+0x78>)
  29067. 800c438: 58d3 ldr r3, [r2, r3]
  29068. 800c43a: b11b cbz r3, 800c444 <alloc_socket+0x20>
  29069. SYS_ARCH_UNPROTECT(lev);
  29070. 800c43c: f000 fe24 bl 800d088 <sys_arch_unprotect>
  29071. for (i = 0; i < NUM_SOCKETS; ++i) {
  29072. 800c440: 3401 adds r4, #1
  29073. 800c442: e7f3 b.n 800c42c <alloc_socket+0x8>
  29074. sockets[i].conn = newconn;
  29075. 800c444: 0123 lsls r3, r4, #4
  29076. 800c446: eb02 1704 add.w r7, r2, r4, lsl #4
  29077. 800c44a: 50d6 str r6, [r2, r3]
  29078. SYS_ARCH_UNPROTECT(lev);
  29079. 800c44c: f000 fe1c bl 800d088 <sys_arch_unprotect>
  29080. sockets[i].lastdata.pbuf = NULL;
  29081. 800c450: 2300 movs r3, #0
  29082. 800c452: 607b str r3, [r7, #4]
  29083. LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0);
  29084. 800c454: 7bbb ldrb r3, [r7, #14]
  29085. 800c456: b98b cbnz r3, 800c47c <alloc_socket+0x58>
  29086. sockets[i].rcvevent = 0;
  29087. 800c458: 4b10 ldr r3, [pc, #64] @ (800c49c <alloc_socket+0x78>)
  29088. 800c45a: eb03 1304 add.w r3, r3, r4, lsl #4
  29089. 800c45e: 2200 movs r2, #0
  29090. 800c460: 811a strh r2, [r3, #8]
  29091. sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1);
  29092. 800c462: 7833 ldrb r3, [r6, #0]
  29093. 800c464: f003 03f0 and.w r3, r3, #240 @ 0xf0
  29094. 800c468: 2b10 cmp r3, #16
  29095. 800c46a: d00f beq.n 800c48c <alloc_socket+0x68>
  29096. 800c46c: 2501 movs r5, #1
  29097. 800c46e: 4b0b ldr r3, [pc, #44] @ (800c49c <alloc_socket+0x78>)
  29098. 800c470: eb03 1304 add.w r3, r3, r4, lsl #4
  29099. 800c474: 815d strh r5, [r3, #10]
  29100. sockets[i].errevent = 0;
  29101. 800c476: 2200 movs r2, #0
  29102. 800c478: 819a strh r2, [r3, #12]
  29103. return i + LWIP_SOCKET_OFFSET;
  29104. 800c47a: e00d b.n 800c498 <alloc_socket+0x74>
  29105. LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0);
  29106. 800c47c: 4b08 ldr r3, [pc, #32] @ (800c4a0 <alloc_socket+0x7c>)
  29107. 800c47e: f240 220e movw r2, #526 @ 0x20e
  29108. 800c482: 4908 ldr r1, [pc, #32] @ (800c4a4 <alloc_socket+0x80>)
  29109. 800c484: 4808 ldr r0, [pc, #32] @ (800c4a8 <alloc_socket+0x84>)
  29110. 800c486: f006 ffbf bl 8013408 <iprintf>
  29111. 800c48a: e7e5 b.n 800c458 <alloc_socket+0x34>
  29112. sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1);
  29113. 800c48c: 2d00 cmp r5, #0
  29114. 800c48e: d0ee beq.n 800c46e <alloc_socket+0x4a>
  29115. 800c490: 2501 movs r5, #1
  29116. 800c492: e7ec b.n 800c46e <alloc_socket+0x4a>
  29117. return -1;
  29118. 800c494: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  29119. }
  29120. 800c498: 4620 mov r0, r4
  29121. 800c49a: bdf8 pop {r3, r4, r5, r6, r7, pc}
  29122. 800c49c: 24019b8c .word 0x24019b8c
  29123. 800c4a0: 080163d0 .word 0x080163d0
  29124. 800c4a4: 0801644c .word 0x0801644c
  29125. 800c4a8: 080144e8 .word 0x080144e8
  29126. 0800c4ac <lwip_sock_make_addr>:
  29127. {
  29128. 800c4ac: b5f0 push {r4, r5, r6, r7, lr}
  29129. 800c4ae: b085 sub sp, #20
  29130. 800c4b0: 4616 mov r6, r2
  29131. 800c4b2: 461c mov r4, r3
  29132. 800c4b4: 9d0a ldr r5, [sp, #40] @ 0x28
  29133. LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL);
  29134. 800c4b6: 460f mov r7, r1
  29135. 800c4b8: b1d1 cbz r1, 800c4f0 <lwip_sock_make_addr+0x44>
  29136. LWIP_ASSERT("from != NULL", from != NULL);
  29137. 800c4ba: b30c cbz r4, 800c500 <lwip_sock_make_addr+0x54>
  29138. LWIP_ASSERT("fromlen != NULL", fromlen != NULL);
  29139. 800c4bc: b345 cbz r5, 800c510 <lwip_sock_make_addr+0x64>
  29140. IPADDR_PORT_TO_SOCKADDR(&saddr, fromaddr, port);
  29141. 800c4be: 2310 movs r3, #16
  29142. 800c4c0: f88d 3000 strb.w r3, [sp]
  29143. 800c4c4: 2302 movs r3, #2
  29144. 800c4c6: f88d 3001 strb.w r3, [sp, #1]
  29145. 800c4ca: 4630 mov r0, r6
  29146. 800c4cc: f7fb fcd6 bl 8007e7c <lwip_htons>
  29147. 800c4d0: f8ad 0002 strh.w r0, [sp, #2]
  29148. 800c4d4: 683b ldr r3, [r7, #0]
  29149. 800c4d6: 9301 str r3, [sp, #4]
  29150. 800c4d8: 2300 movs r3, #0
  29151. 800c4da: 9302 str r3, [sp, #8]
  29152. 800c4dc: 9303 str r3, [sp, #12]
  29153. if (*fromlen < saddr.sa.sa_len) {
  29154. 800c4de: 682a ldr r2, [r5, #0]
  29155. 800c4e0: f89d 3000 ldrb.w r3, [sp]
  29156. 800c4e4: 429a cmp r2, r3
  29157. 800c4e6: d31b bcc.n 800c520 <lwip_sock_make_addr+0x74>
  29158. } else if (*fromlen > saddr.sa.sa_len) {
  29159. 800c4e8: d923 bls.n 800c532 <lwip_sock_make_addr+0x86>
  29160. *fromlen = saddr.sa.sa_len;
  29161. 800c4ea: 602b str r3, [r5, #0]
  29162. int truncated = 0;
  29163. 800c4ec: 2600 movs r6, #0
  29164. 800c4ee: e018 b.n 800c522 <lwip_sock_make_addr+0x76>
  29165. LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL);
  29166. 800c4f0: 4b11 ldr r3, [pc, #68] @ (800c538 <lwip_sock_make_addr+0x8c>)
  29167. 800c4f2: f240 4207 movw r2, #1031 @ 0x407
  29168. 800c4f6: 4911 ldr r1, [pc, #68] @ (800c53c <lwip_sock_make_addr+0x90>)
  29169. 800c4f8: 4811 ldr r0, [pc, #68] @ (800c540 <lwip_sock_make_addr+0x94>)
  29170. 800c4fa: f006 ff85 bl 8013408 <iprintf>
  29171. 800c4fe: e7dc b.n 800c4ba <lwip_sock_make_addr+0xe>
  29172. LWIP_ASSERT("from != NULL", from != NULL);
  29173. 800c500: 4b0d ldr r3, [pc, #52] @ (800c538 <lwip_sock_make_addr+0x8c>)
  29174. 800c502: f44f 6281 mov.w r2, #1032 @ 0x408
  29175. 800c506: 490f ldr r1, [pc, #60] @ (800c544 <lwip_sock_make_addr+0x98>)
  29176. 800c508: 480d ldr r0, [pc, #52] @ (800c540 <lwip_sock_make_addr+0x94>)
  29177. 800c50a: f006 ff7d bl 8013408 <iprintf>
  29178. 800c50e: e7d5 b.n 800c4bc <lwip_sock_make_addr+0x10>
  29179. LWIP_ASSERT("fromlen != NULL", fromlen != NULL);
  29180. 800c510: 4b09 ldr r3, [pc, #36] @ (800c538 <lwip_sock_make_addr+0x8c>)
  29181. 800c512: f240 4209 movw r2, #1033 @ 0x409
  29182. 800c516: 490c ldr r1, [pc, #48] @ (800c548 <lwip_sock_make_addr+0x9c>)
  29183. 800c518: 4809 ldr r0, [pc, #36] @ (800c540 <lwip_sock_make_addr+0x94>)
  29184. 800c51a: f006 ff75 bl 8013408 <iprintf>
  29185. 800c51e: e7ce b.n 800c4be <lwip_sock_make_addr+0x12>
  29186. truncated = 1;
  29187. 800c520: 2601 movs r6, #1
  29188. MEMCPY(from, &saddr, *fromlen);
  29189. 800c522: 682a ldr r2, [r5, #0]
  29190. 800c524: 4669 mov r1, sp
  29191. 800c526: 4620 mov r0, r4
  29192. 800c528: f007 f9ab bl 8013882 <memcpy>
  29193. }
  29194. 800c52c: 4630 mov r0, r6
  29195. 800c52e: b005 add sp, #20
  29196. 800c530: bdf0 pop {r4, r5, r6, r7, pc}
  29197. int truncated = 0;
  29198. 800c532: 2600 movs r6, #0
  29199. 800c534: e7f5 b.n 800c522 <lwip_sock_make_addr+0x76>
  29200. 800c536: bf00 nop
  29201. 800c538: 080163d0 .word 0x080163d0
  29202. 800c53c: 0801646c .word 0x0801646c
  29203. 800c540: 080144e8 .word 0x080144e8
  29204. 800c544: 08016480 .word 0x08016480
  29205. 800c548: 08016490 .word 0x08016490
  29206. 0800c54c <lwip_recv_tcp_from>:
  29207. if (sock == NULL) {
  29208. 800c54c: b1d8 cbz r0, 800c586 <lwip_recv_tcp_from+0x3a>
  29209. {
  29210. 800c54e: b570 push {r4, r5, r6, lr}
  29211. 800c550: b084 sub sp, #16
  29212. 800c552: 460c mov r4, r1
  29213. 800c554: 4615 mov r5, r2
  29214. 800c556: 4606 mov r6, r0
  29215. if (from && fromlen)
  29216. 800c558: 2900 cmp r1, #0
  29217. 800c55a: bf18 it ne
  29218. 800c55c: 2a00 cmpne r2, #0
  29219. 800c55e: d102 bne.n 800c566 <lwip_recv_tcp_from+0x1a>
  29220. return 0;
  29221. 800c560: 2000 movs r0, #0
  29222. }
  29223. 800c562: b004 add sp, #16
  29224. 800c564: bd70 pop {r4, r5, r6, pc}
  29225. netconn_getaddr(sock->conn, &tmpaddr, &port, 0);
  29226. 800c566: 2300 movs r3, #0
  29227. 800c568: f10d 020a add.w r2, sp, #10
  29228. 800c56c: a903 add r1, sp, #12
  29229. 800c56e: 6800 ldr r0, [r0, #0]
  29230. 800c570: f7fa f91e bl 80067b0 <netconn_getaddr>
  29231. return lwip_sock_make_addr(sock->conn, &tmpaddr, port, from, fromlen);
  29232. 800c574: 9500 str r5, [sp, #0]
  29233. 800c576: 4623 mov r3, r4
  29234. 800c578: f8bd 200a ldrh.w r2, [sp, #10]
  29235. 800c57c: a903 add r1, sp, #12
  29236. 800c57e: 6830 ldr r0, [r6, #0]
  29237. 800c580: f7ff ff94 bl 800c4ac <lwip_sock_make_addr>
  29238. 800c584: e7ed b.n 800c562 <lwip_recv_tcp_from+0x16>
  29239. return 0;
  29240. 800c586: 2000 movs r0, #0
  29241. }
  29242. 800c588: 4770 bx lr
  29243. 0800c58a <free_socket_free_elements>:
  29244. {
  29245. 800c58a: b510 push {r4, lr}
  29246. 800c58c: 4603 mov r3, r0
  29247. 800c58e: 460c mov r4, r1
  29248. if (lastdata->pbuf != NULL) {
  29249. 800c590: 6810 ldr r0, [r2, #0]
  29250. 800c592: b110 cbz r0, 800c59a <free_socket_free_elements+0x10>
  29251. if (is_tcp) {
  29252. 800c594: b133 cbz r3, 800c5a4 <free_socket_free_elements+0x1a>
  29253. pbuf_free(lastdata->pbuf);
  29254. 800c596: f7ff fc03 bl 800bda0 <pbuf_free>
  29255. if (conn != NULL) {
  29256. 800c59a: b114 cbz r4, 800c5a2 <free_socket_free_elements+0x18>
  29257. netconn_delete(conn);
  29258. 800c59c: 4620 mov r0, r4
  29259. 800c59e: f7fa f8f7 bl 8006790 <netconn_delete>
  29260. }
  29261. 800c5a2: bd10 pop {r4, pc}
  29262. netbuf_delete(lastdata->netbuf);
  29263. 800c5a4: f7ff f87e bl 800b6a4 <netbuf_delete>
  29264. 800c5a8: e7f7 b.n 800c59a <free_socket_free_elements+0x10>
  29265. 0800c5aa <free_socket>:
  29266. {
  29267. 800c5aa: b570 push {r4, r5, r6, lr}
  29268. 800c5ac: b082 sub sp, #8
  29269. 800c5ae: 4605 mov r5, r0
  29270. 800c5b0: 460c mov r4, r1
  29271. SYS_ARCH_PROTECT(lev);
  29272. 800c5b2: f000 fd5d bl 800d070 <sys_arch_protect>
  29273. 800c5b6: 4606 mov r6, r0
  29274. freed = free_socket_locked(sock, is_tcp, &conn, &lastdata);
  29275. 800c5b8: 466b mov r3, sp
  29276. 800c5ba: aa01 add r2, sp, #4
  29277. 800c5bc: 4621 mov r1, r4
  29278. 800c5be: 4628 mov r0, r5
  29279. 800c5c0: f7ff ff00 bl 800c3c4 <free_socket_locked>
  29280. 800c5c4: 4605 mov r5, r0
  29281. SYS_ARCH_UNPROTECT(lev);
  29282. 800c5c6: 4630 mov r0, r6
  29283. 800c5c8: f000 fd5e bl 800d088 <sys_arch_unprotect>
  29284. if (freed) {
  29285. 800c5cc: b90d cbnz r5, 800c5d2 <free_socket+0x28>
  29286. }
  29287. 800c5ce: b002 add sp, #8
  29288. 800c5d0: bd70 pop {r4, r5, r6, pc}
  29289. free_socket_free_elements(is_tcp, conn, &lastdata);
  29290. 800c5d2: 466a mov r2, sp
  29291. 800c5d4: 9901 ldr r1, [sp, #4]
  29292. 800c5d6: 4620 mov r0, r4
  29293. 800c5d8: f7ff ffd7 bl 800c58a <free_socket_free_elements>
  29294. }
  29295. 800c5dc: e7f7 b.n 800c5ce <free_socket+0x24>
  29296. ...
  29297. 0800c5e0 <lwip_recv_tcp>:
  29298. {
  29299. 800c5e0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  29300. 800c5e4: b085 sub sp, #20
  29301. 800c5e6: 4681 mov r9, r0
  29302. 800c5e8: 9101 str r1, [sp, #4]
  29303. 800c5ea: 4698 mov r8, r3
  29304. ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX;
  29305. 800c5ec: 4615 mov r5, r2
  29306. 800c5ee: 2a00 cmp r2, #0
  29307. 800c5f0: db10 blt.n 800c614 <lwip_recv_tcp+0x34>
  29308. LWIP_ASSERT("no socket given", sock != NULL);
  29309. 800c5f2: f1b9 0f00 cmp.w r9, #0
  29310. 800c5f6: d010 beq.n 800c61a <lwip_recv_tcp+0x3a>
  29311. LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP);
  29312. 800c5f8: f8d9 3000 ldr.w r3, [r9]
  29313. 800c5fc: 781b ldrb r3, [r3, #0]
  29314. 800c5fe: f003 03f0 and.w r3, r3, #240 @ 0xf0
  29315. 800c602: 2b10 cmp r3, #16
  29316. 800c604: d111 bne.n 800c62a <lwip_recv_tcp+0x4a>
  29317. if (flags & MSG_DONTWAIT) {
  29318. 800c606: f018 0f08 tst.w r8, #8
  29319. 800c60a: d116 bne.n 800c63a <lwip_recv_tcp+0x5a>
  29320. u8_t apiflags = NETCONN_NOAUTORCVD;
  29321. 800c60c: f04f 0a08 mov.w sl, #8
  29322. apiflags |= NETCONN_DONTBLOCK;
  29323. 800c610: 2600 movs r6, #0
  29324. 800c612: e055 b.n 800c6c0 <lwip_recv_tcp+0xe0>
  29325. ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX;
  29326. 800c614: f06f 4500 mvn.w r5, #2147483648 @ 0x80000000
  29327. 800c618: e7eb b.n 800c5f2 <lwip_recv_tcp+0x12>
  29328. LWIP_ASSERT("no socket given", sock != NULL);
  29329. 800c61a: 4b47 ldr r3, [pc, #284] @ (800c738 <lwip_recv_tcp+0x158>)
  29330. 800c61c: f240 329e movw r2, #926 @ 0x39e
  29331. 800c620: 4946 ldr r1, [pc, #280] @ (800c73c <lwip_recv_tcp+0x15c>)
  29332. 800c622: 4847 ldr r0, [pc, #284] @ (800c740 <lwip_recv_tcp+0x160>)
  29333. 800c624: f006 fef0 bl 8013408 <iprintf>
  29334. 800c628: e7e6 b.n 800c5f8 <lwip_recv_tcp+0x18>
  29335. LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP);
  29336. 800c62a: 4b43 ldr r3, [pc, #268] @ (800c738 <lwip_recv_tcp+0x158>)
  29337. 800c62c: f240 329f movw r2, #927 @ 0x39f
  29338. 800c630: 4944 ldr r1, [pc, #272] @ (800c744 <lwip_recv_tcp+0x164>)
  29339. 800c632: 4843 ldr r0, [pc, #268] @ (800c740 <lwip_recv_tcp+0x160>)
  29340. 800c634: f006 fee8 bl 8013408 <iprintf>
  29341. 800c638: e7e5 b.n 800c606 <lwip_recv_tcp+0x26>
  29342. apiflags |= NETCONN_DONTBLOCK;
  29343. 800c63a: f04f 0a0c mov.w sl, #12
  29344. 800c63e: e7e7 b.n 800c610 <lwip_recv_tcp+0x30>
  29345. err = netconn_recv_tcp_pbuf_flags(sock->conn, &p, apiflags);
  29346. 800c640: 4652 mov r2, sl
  29347. 800c642: a903 add r1, sp, #12
  29348. 800c644: f8d9 0000 ldr.w r0, [r9]
  29349. 800c648: f7fa fb14 bl 8006c74 <netconn_recv_tcp_pbuf_flags>
  29350. if (err != ERR_OK) {
  29351. 800c64c: 4604 mov r4, r0
  29352. 800c64e: b928 cbnz r0, 800c65c <lwip_recv_tcp+0x7c>
  29353. LWIP_ASSERT("p != NULL", p != NULL);
  29354. 800c650: 9b03 ldr r3, [sp, #12]
  29355. 800c652: b193 cbz r3, 800c67a <lwip_recv_tcp+0x9a>
  29356. sock->lastdata.pbuf = p;
  29357. 800c654: 9b03 ldr r3, [sp, #12]
  29358. 800c656: f8c9 3004 str.w r3, [r9, #4]
  29359. 800c65a: e036 b.n 800c6ca <lwip_recv_tcp+0xea>
  29360. if (recvd > 0) {
  29361. 800c65c: 2e00 cmp r6, #0
  29362. 800c65e: dd01 ble.n 800c664 <lwip_recv_tcp+0x84>
  29363. goto lwip_recv_tcp_done;
  29364. 800c660: 46b3 mov fp, r6
  29365. 800c662: e05b b.n 800c71c <lwip_recv_tcp+0x13c>
  29366. sock_set_errno(sock, err_to_errno(err));
  29367. 800c664: f7fc fe68 bl 8009338 <err_to_errno>
  29368. 800c668: b108 cbz r0, 800c66e <lwip_recv_tcp+0x8e>
  29369. 800c66a: 4a37 ldr r2, [pc, #220] @ (800c748 <lwip_recv_tcp+0x168>)
  29370. 800c66c: 6010 str r0, [r2, #0]
  29371. if (err == ERR_CLSD) {
  29372. 800c66e: f114 0f0f cmn.w r4, #15
  29373. 800c672: d04d beq.n 800c710 <lwip_recv_tcp+0x130>
  29374. return -1;
  29375. 800c674: f04f 3bff mov.w fp, #4294967295 @ 0xffffffff
  29376. 800c678: e053 b.n 800c722 <lwip_recv_tcp+0x142>
  29377. LWIP_ASSERT("p != NULL", p != NULL);
  29378. 800c67a: 4b2f ldr r3, [pc, #188] @ (800c738 <lwip_recv_tcp+0x158>)
  29379. 800c67c: f240 32c5 movw r2, #965 @ 0x3c5
  29380. 800c680: 4932 ldr r1, [pc, #200] @ (800c74c <lwip_recv_tcp+0x16c>)
  29381. 800c682: 482f ldr r0, [pc, #188] @ (800c740 <lwip_recv_tcp+0x160>)
  29382. 800c684: f006 fec0 bl 8013408 <iprintf>
  29383. 800c688: e7e4 b.n 800c654 <lwip_recv_tcp+0x74>
  29384. LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen);
  29385. 800c68a: 4b2b ldr r3, [pc, #172] @ (800c738 <lwip_recv_tcp+0x158>)
  29386. 800c68c: f240 32dd movw r2, #989 @ 0x3dd
  29387. 800c690: 492f ldr r1, [pc, #188] @ (800c750 <lwip_recv_tcp+0x170>)
  29388. 800c692: 482b ldr r0, [pc, #172] @ (800c740 <lwip_recv_tcp+0x160>)
  29389. 800c694: f006 feb8 bl 8013408 <iprintf>
  29390. 800c698: e027 b.n 800c6ea <lwip_recv_tcp+0x10a>
  29391. LWIP_ASSERT("invalid copylen", p->tot_len >= copylen);
  29392. 800c69a: 4b27 ldr r3, [pc, #156] @ (800c738 <lwip_recv_tcp+0x158>)
  29393. 800c69c: f240 32e3 movw r2, #995 @ 0x3e3
  29394. 800c6a0: 492c ldr r1, [pc, #176] @ (800c754 <lwip_recv_tcp+0x174>)
  29395. 800c6a2: 4827 ldr r0, [pc, #156] @ (800c740 <lwip_recv_tcp+0x160>)
  29396. 800c6a4: f006 feb0 bl 8013408 <iprintf>
  29397. 800c6a8: e027 b.n 800c6fa <lwip_recv_tcp+0x11a>
  29398. sock->lastdata.pbuf = NULL;
  29399. 800c6aa: 2300 movs r3, #0
  29400. 800c6ac: f8c9 3004 str.w r3, [r9, #4]
  29401. pbuf_free(p);
  29402. 800c6b0: f7ff fb76 bl 800bda0 <pbuf_free>
  29403. apiflags |= NETCONN_DONTBLOCK | NETCONN_NOFIN;
  29404. 800c6b4: f04a 0a14 orr.w sl, sl, #20
  29405. } while ((recv_left > 0) && !(flags & MSG_PEEK));
  29406. 800c6b8: 2d00 cmp r5, #0
  29407. 800c6ba: dd2c ble.n 800c716 <lwip_recv_tcp+0x136>
  29408. 800c6bc: bb5e cbnz r6, 800c716 <lwip_recv_tcp+0x136>
  29409. recvd += copylen;
  29410. 800c6be: 465e mov r6, fp
  29411. if (sock->lastdata.pbuf) {
  29412. 800c6c0: f8d9 3004 ldr.w r3, [r9, #4]
  29413. 800c6c4: 2b00 cmp r3, #0
  29414. 800c6c6: d0bb beq.n 800c640 <lwip_recv_tcp+0x60>
  29415. p = sock->lastdata.pbuf;
  29416. 800c6c8: 9303 str r3, [sp, #12]
  29417. if (recv_left > p->tot_len) {
  29418. 800c6ca: 9803 ldr r0, [sp, #12]
  29419. 800c6cc: 8904 ldrh r4, [r0, #8]
  29420. 800c6ce: 42a5 cmp r5, r4
  29421. 800c6d0: dc00 bgt.n 800c6d4 <lwip_recv_tcp+0xf4>
  29422. copylen = (u16_t)recv_left;
  29423. 800c6d2: b2ac uxth r4, r5
  29424. if (recvd + copylen < recvd) {
  29425. 800c6d4: 4627 mov r7, r4
  29426. 800c6d6: eb04 0b06 add.w fp, r4, r6
  29427. pbuf_copy_partial(p, (u8_t *)mem + recvd, copylen, 0);
  29428. 800c6da: 2300 movs r3, #0
  29429. 800c6dc: 4622 mov r2, r4
  29430. 800c6de: 9901 ldr r1, [sp, #4]
  29431. 800c6e0: 4431 add r1, r6
  29432. 800c6e2: f7ff fddf bl 800c2a4 <pbuf_copy_partial>
  29433. LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen);
  29434. 800c6e6: 42a5 cmp r5, r4
  29435. 800c6e8: dbcf blt.n 800c68a <lwip_recv_tcp+0xaa>
  29436. recv_left -= copylen;
  29437. 800c6ea: 1bed subs r5, r5, r7
  29438. if ((flags & MSG_PEEK) == 0) {
  29439. 800c6ec: f018 0601 ands.w r6, r8, #1
  29440. 800c6f0: d1e0 bne.n 800c6b4 <lwip_recv_tcp+0xd4>
  29441. LWIP_ASSERT("invalid copylen", p->tot_len >= copylen);
  29442. 800c6f2: 9b03 ldr r3, [sp, #12]
  29443. 800c6f4: 891b ldrh r3, [r3, #8]
  29444. 800c6f6: 429c cmp r4, r3
  29445. 800c6f8: d8cf bhi.n 800c69a <lwip_recv_tcp+0xba>
  29446. if (p->tot_len - copylen > 0) {
  29447. 800c6fa: 9803 ldr r0, [sp, #12]
  29448. 800c6fc: 8903 ldrh r3, [r0, #8]
  29449. 800c6fe: 1bdb subs r3, r3, r7
  29450. 800c700: 2b00 cmp r3, #0
  29451. 800c702: ddd2 ble.n 800c6aa <lwip_recv_tcp+0xca>
  29452. sock->lastdata.pbuf = pbuf_free_header(p, copylen);
  29453. 800c704: 4621 mov r1, r4
  29454. 800c706: f7ff fcb3 bl 800c070 <pbuf_free_header>
  29455. 800c70a: f8c9 0004 str.w r0, [r9, #4]
  29456. LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: lastdata now pbuf=%p\n", (void *)sock->lastdata.pbuf));
  29457. 800c70e: e7d1 b.n 800c6b4 <lwip_recv_tcp+0xd4>
  29458. return 0;
  29459. 800c710: f04f 0b00 mov.w fp, #0
  29460. 800c714: e005 b.n 800c722 <lwip_recv_tcp+0x142>
  29461. if ((recvd > 0) && !(flags & MSG_PEEK)) {
  29462. 800c716: f1bb 0f00 cmp.w fp, #0
  29463. 800c71a: dd02 ble.n 800c722 <lwip_recv_tcp+0x142>
  29464. 800c71c: f018 0f01 tst.w r8, #1
  29465. 800c720: d003 beq.n 800c72a <lwip_recv_tcp+0x14a>
  29466. }
  29467. 800c722: 4658 mov r0, fp
  29468. 800c724: b005 add sp, #20
  29469. 800c726: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  29470. netconn_tcp_recvd(sock->conn, (size_t)recvd);
  29471. 800c72a: 4659 mov r1, fp
  29472. 800c72c: f8d9 0000 ldr.w r0, [r9]
  29473. 800c730: f7fa f8bc bl 80068ac <netconn_tcp_recvd>
  29474. 800c734: e7f5 b.n 800c722 <lwip_recv_tcp+0x142>
  29475. 800c736: bf00 nop
  29476. 800c738: 080163d0 .word 0x080163d0
  29477. 800c73c: 080164a0 .word 0x080164a0
  29478. 800c740: 080144e8 .word 0x080144e8
  29479. 800c744: 080164b0 .word 0x080164b0
  29480. 800c748: 24019d8c .word 0x24019d8c
  29481. 800c74c: 08014fc0 .word 0x08014fc0
  29482. 800c750: 080164d4 .word 0x080164d4
  29483. 800c754: 080164fc .word 0x080164fc
  29484. 0800c758 <lwip_recvfrom_udp_raw>:
  29485. {
  29486. 800c758: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  29487. 800c75c: b085 sub sp, #20
  29488. 800c75e: 4681 mov r9, r0
  29489. 800c760: 4688 mov r8, r1
  29490. 800c762: 4616 mov r6, r2
  29491. 800c764: 469a mov sl, r3
  29492. LWIP_ERROR("lwip_recvfrom_udp_raw: invalid arguments", (msg->msg_iov != NULL) || (msg->msg_iovlen <= 0), return ERR_ARG;);
  29493. 800c766: 6893 ldr r3, [r2, #8]
  29494. 800c768: b16b cbz r3, 800c786 <lwip_recvfrom_udp_raw+0x2e>
  29495. if (flags & MSG_DONTWAIT) {
  29496. 800c76a: f018 0f08 tst.w r8, #8
  29497. 800c76e: d017 beq.n 800c7a0 <lwip_recvfrom_udp_raw+0x48>
  29498. apiflags = NETCONN_DONTBLOCK;
  29499. 800c770: 2204 movs r2, #4
  29500. buf = sock->lastdata.netbuf;
  29501. 800c772: f8d9 3004 ldr.w r3, [r9, #4]
  29502. 800c776: 9303 str r3, [sp, #12]
  29503. if (buf == NULL) {
  29504. 800c778: b1a3 cbz r3, 800c7a4 <lwip_recvfrom_udp_raw+0x4c>
  29505. buflen = buf->p->tot_len;
  29506. 800c77a: 9b03 ldr r3, [sp, #12]
  29507. 800c77c: 681b ldr r3, [r3, #0]
  29508. 800c77e: 891f ldrh r7, [r3, #8]
  29509. for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) {
  29510. 800c780: 2500 movs r5, #0
  29511. copied = 0;
  29512. 800c782: 46ab mov fp, r5
  29513. for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) {
  29514. 800c784: e02e b.n 800c7e4 <lwip_recvfrom_udp_raw+0x8c>
  29515. LWIP_ERROR("lwip_recvfrom_udp_raw: invalid arguments", (msg->msg_iov != NULL) || (msg->msg_iovlen <= 0), return ERR_ARG;);
  29516. 800c786: 68d3 ldr r3, [r2, #12]
  29517. 800c788: 2b00 cmp r3, #0
  29518. 800c78a: ddee ble.n 800c76a <lwip_recvfrom_udp_raw+0x12>
  29519. 800c78c: 4b32 ldr r3, [pc, #200] @ (800c858 <lwip_recvfrom_udp_raw+0x100>)
  29520. 800c78e: f240 4249 movw r2, #1097 @ 0x449
  29521. 800c792: 4932 ldr r1, [pc, #200] @ (800c85c <lwip_recvfrom_udp_raw+0x104>)
  29522. 800c794: 4832 ldr r0, [pc, #200] @ (800c860 <lwip_recvfrom_udp_raw+0x108>)
  29523. 800c796: f006 fe37 bl 8013408 <iprintf>
  29524. 800c79a: f06f 000f mvn.w r0, #15
  29525. 800c79e: e045 b.n 800c82c <lwip_recvfrom_udp_raw+0xd4>
  29526. apiflags = 0;
  29527. 800c7a0: 2200 movs r2, #0
  29528. 800c7a2: e7e6 b.n 800c772 <lwip_recvfrom_udp_raw+0x1a>
  29529. err = netconn_recv_udp_raw_netbuf_flags(sock->conn, &buf, apiflags);
  29530. 800c7a4: a903 add r1, sp, #12
  29531. 800c7a6: f8d9 0000 ldr.w r0, [r9]
  29532. 800c7aa: f7fa f9f3 bl 8006b94 <netconn_recv_udp_raw_netbuf_flags>
  29533. if (err != ERR_OK) {
  29534. 800c7ae: 2800 cmp r0, #0
  29535. 800c7b0: d13c bne.n 800c82c <lwip_recvfrom_udp_raw+0xd4>
  29536. LWIP_ASSERT("buf != NULL", buf != NULL);
  29537. 800c7b2: 9b03 ldr r3, [sp, #12]
  29538. 800c7b4: b11b cbz r3, 800c7be <lwip_recvfrom_udp_raw+0x66>
  29539. sock->lastdata.netbuf = buf;
  29540. 800c7b6: 9b03 ldr r3, [sp, #12]
  29541. 800c7b8: f8c9 3004 str.w r3, [r9, #4]
  29542. 800c7bc: e7dd b.n 800c77a <lwip_recvfrom_udp_raw+0x22>
  29543. LWIP_ASSERT("buf != NULL", buf != NULL);
  29544. 800c7be: 4b26 ldr r3, [pc, #152] @ (800c858 <lwip_recvfrom_udp_raw+0x100>)
  29545. 800c7c0: f240 425e movw r2, #1118 @ 0x45e
  29546. 800c7c4: 4927 ldr r1, [pc, #156] @ (800c864 <lwip_recvfrom_udp_raw+0x10c>)
  29547. 800c7c6: 4826 ldr r0, [pc, #152] @ (800c860 <lwip_recvfrom_udp_raw+0x108>)
  29548. 800c7c8: f006 fe1e bl 8013408 <iprintf>
  29549. 800c7cc: e7f3 b.n 800c7b6 <lwip_recvfrom_udp_raw+0x5e>
  29550. pbuf_copy_partial(buf->p, (u8_t *)msg->msg_iov[i].iov_base, copylen, copied);
  29551. 800c7ce: 465b mov r3, fp
  29552. 800c7d0: 4622 mov r2, r4
  29553. 800c7d2: 5809 ldr r1, [r1, r0]
  29554. 800c7d4: 9803 ldr r0, [sp, #12]
  29555. 800c7d6: 6800 ldr r0, [r0, #0]
  29556. 800c7d8: f7ff fd64 bl 800c2a4 <pbuf_copy_partial>
  29557. copied = (u16_t)(copied + copylen);
  29558. 800c7dc: 445c add r4, fp
  29559. 800c7de: fa1f fb84 uxth.w fp, r4
  29560. for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) {
  29561. 800c7e2: 3501 adds r5, #1
  29562. 800c7e4: 68f3 ldr r3, [r6, #12]
  29563. 800c7e6: 42ab cmp r3, r5
  29564. 800c7e8: dd0d ble.n 800c806 <lwip_recvfrom_udp_raw+0xae>
  29565. 800c7ea: 45bb cmp fp, r7
  29566. 800c7ec: d20b bcs.n 800c806 <lwip_recvfrom_udp_raw+0xae>
  29567. u16_t len_left = (u16_t)(buflen - copied);
  29568. 800c7ee: eba7 040b sub.w r4, r7, fp
  29569. 800c7f2: b2a4 uxth r4, r4
  29570. if (msg->msg_iov[i].iov_len > len_left) {
  29571. 800c7f4: 68b1 ldr r1, [r6, #8]
  29572. 800c7f6: 00e8 lsls r0, r5, #3
  29573. 800c7f8: eb01 03c5 add.w r3, r1, r5, lsl #3
  29574. 800c7fc: 685b ldr r3, [r3, #4]
  29575. 800c7fe: 42a3 cmp r3, r4
  29576. 800c800: d8e5 bhi.n 800c7ce <lwip_recvfrom_udp_raw+0x76>
  29577. copylen = (u16_t)msg->msg_iov[i].iov_len;
  29578. 800c802: b29c uxth r4, r3
  29579. 800c804: e7e3 b.n 800c7ce <lwip_recvfrom_udp_raw+0x76>
  29580. if (msg->msg_name && msg->msg_namelen)
  29581. 800c806: 6833 ldr r3, [r6, #0]
  29582. 800c808: b10b cbz r3, 800c80e <lwip_recvfrom_udp_raw+0xb6>
  29583. 800c80a: 6872 ldr r2, [r6, #4]
  29584. 800c80c: b98a cbnz r2, 800c832 <lwip_recvfrom_udp_raw+0xda>
  29585. msg->msg_flags = 0;
  29586. 800c80e: 2300 movs r3, #0
  29587. 800c810: 61b3 str r3, [r6, #24]
  29588. if (msg->msg_control) {
  29589. 800c812: 6933 ldr r3, [r6, #16]
  29590. 800c814: b10b cbz r3, 800c81a <lwip_recvfrom_udp_raw+0xc2>
  29591. msg->msg_controllen = 0;
  29592. 800c816: 2300 movs r3, #0
  29593. 800c818: 6173 str r3, [r6, #20]
  29594. if ((flags & MSG_PEEK) == 0) {
  29595. 800c81a: f018 0f01 tst.w r8, #1
  29596. 800c81e: d012 beq.n 800c846 <lwip_recvfrom_udp_raw+0xee>
  29597. if (datagram_len) {
  29598. 800c820: f1ba 0f00 cmp.w sl, #0
  29599. 800c824: d016 beq.n 800c854 <lwip_recvfrom_udp_raw+0xfc>
  29600. *datagram_len = buflen;
  29601. 800c826: f8aa 7000 strh.w r7, [sl]
  29602. return ERR_OK;
  29603. 800c82a: 2000 movs r0, #0
  29604. }
  29605. 800c82c: b005 add sp, #20
  29606. 800c82e: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  29607. lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf),
  29608. 800c832: 9903 ldr r1, [sp, #12]
  29609. 800c834: 898a ldrh r2, [r1, #12]
  29610. 800c836: 1d30 adds r0, r6, #4
  29611. 800c838: 9000 str r0, [sp, #0]
  29612. 800c83a: 3108 adds r1, #8
  29613. 800c83c: f8d9 0000 ldr.w r0, [r9]
  29614. 800c840: f7ff fe34 bl 800c4ac <lwip_sock_make_addr>
  29615. 800c844: e7e3 b.n 800c80e <lwip_recvfrom_udp_raw+0xb6>
  29616. sock->lastdata.netbuf = NULL;
  29617. 800c846: 2300 movs r3, #0
  29618. 800c848: f8c9 3004 str.w r3, [r9, #4]
  29619. netbuf_delete(buf);
  29620. 800c84c: 9803 ldr r0, [sp, #12]
  29621. 800c84e: f7fe ff29 bl 800b6a4 <netbuf_delete>
  29622. 800c852: e7e5 b.n 800c820 <lwip_recvfrom_udp_raw+0xc8>
  29623. return ERR_OK;
  29624. 800c854: 2000 movs r0, #0
  29625. 800c856: e7e9 b.n 800c82c <lwip_recvfrom_udp_raw+0xd4>
  29626. 800c858: 080163d0 .word 0x080163d0
  29627. 800c85c: 0801650c .word 0x0801650c
  29628. 800c860: 080144e8 .word 0x080144e8
  29629. 800c864: 080148e4 .word 0x080148e4
  29630. 0800c868 <select_check_waiters>:
  29631. * of the loop, thus creating a possibility where a thread could modify the
  29632. * select_cb_list during our UNPROTECT/PROTECT. We use a generational counter to
  29633. * detect this change and restart the list walk. The list is expected to be small
  29634. */
  29635. static void select_check_waiters(int s, int has_recvevent, int has_sendevent, int has_errevent)
  29636. {
  29637. 800c868: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  29638. 800c86c: b082 sub sp, #8
  29639. 800c86e: 4605 mov r5, r0
  29640. 800c870: 460e mov r6, r1
  29641. 800c872: 4690 mov r8, r2
  29642. 800c874: 461f mov r7, r3
  29643. #if !LWIP_TCPIP_CORE_LOCKING
  29644. int last_select_cb_ctr;
  29645. SYS_ARCH_DECL_PROTECT(lev);
  29646. #endif /* !LWIP_TCPIP_CORE_LOCKING */
  29647. LWIP_ASSERT_CORE_LOCKED();
  29648. 800c876: f7f7 f949 bl 8003b0c <sys_check_core_locking>
  29649. SYS_ARCH_PROTECT(lev);
  29650. again:
  29651. /* remember the state of select_cb_list to detect changes */
  29652. last_select_cb_ctr = select_cb_ctr;
  29653. #endif /* !LWIP_TCPIP_CORE_LOCKING */
  29654. for (scb = select_cb_list; scb != NULL; scb = scb->next) {
  29655. 800c87a: 4b2e ldr r3, [pc, #184] @ (800c934 <select_check_waiters+0xcc>)
  29656. 800c87c: 681c ldr r4, [r3, #0]
  29657. 800c87e: e03e b.n 800c8fe <select_check_waiters+0x96>
  29658. else
  29659. #endif /* LWIP_SOCKET_SELECT && LWIP_SOCKET_POLL */
  29660. #if LWIP_SOCKET_SELECT
  29661. {
  29662. /* Test this select call for our socket */
  29663. if (has_recvevent) {
  29664. 800c880: b196 cbz r6, 800c8a8 <select_check_waiters+0x40>
  29665. if (scb->readset && FD_ISSET(s, scb->readset)) {
  29666. 800c882: 68a2 ldr r2, [r4, #8]
  29667. 800c884: b18a cbz r2, 800c8aa <select_check_waiters+0x42>
  29668. 800c886: 462b mov r3, r5
  29669. 800c888: 2d00 cmp r5, #0
  29670. 800c88a: db0a blt.n 800c8a2 <select_check_waiters+0x3a>
  29671. 800c88c: 115b asrs r3, r3, #5
  29672. 800c88e: f852 3023 ldr.w r3, [r2, r3, lsl #2]
  29673. 800c892: f005 021f and.w r2, r5, #31
  29674. 800c896: 40d3 lsrs r3, r2
  29675. 800c898: f013 0f01 tst.w r3, #1
  29676. 800c89c: d005 beq.n 800c8aa <select_check_waiters+0x42>
  29677. do_signal = 1;
  29678. 800c89e: 2001 movs r0, #1
  29679. 800c8a0: e003 b.n 800c8aa <select_check_waiters+0x42>
  29680. if (scb->readset && FD_ISSET(s, scb->readset)) {
  29681. 800c8a2: f105 031f add.w r3, r5, #31
  29682. 800c8a6: e7f1 b.n 800c88c <select_check_waiters+0x24>
  29683. int do_signal = 0;
  29684. 800c8a8: 4630 mov r0, r6
  29685. }
  29686. }
  29687. if (has_sendevent) {
  29688. 800c8aa: f1b8 0f00 cmp.w r8, #0
  29689. 800c8ae: d00f beq.n 800c8d0 <select_check_waiters+0x68>
  29690. if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) {
  29691. 800c8b0: b970 cbnz r0, 800c8d0 <select_check_waiters+0x68>
  29692. 800c8b2: 68e2 ldr r2, [r4, #12]
  29693. 800c8b4: b162 cbz r2, 800c8d0 <select_check_waiters+0x68>
  29694. 800c8b6: 462b mov r3, r5
  29695. 800c8b8: 2d00 cmp r5, #0
  29696. 800c8ba: db31 blt.n 800c920 <select_check_waiters+0xb8>
  29697. 800c8bc: 115b asrs r3, r3, #5
  29698. 800c8be: f852 3023 ldr.w r3, [r2, r3, lsl #2]
  29699. 800c8c2: f005 021f and.w r2, r5, #31
  29700. 800c8c6: 40d3 lsrs r3, r2
  29701. 800c8c8: f013 0f01 tst.w r3, #1
  29702. 800c8cc: d000 beq.n 800c8d0 <select_check_waiters+0x68>
  29703. do_signal = 1;
  29704. 800c8ce: 2001 movs r0, #1
  29705. }
  29706. }
  29707. if (has_errevent) {
  29708. 800c8d0: b31f cbz r7, 800c91a <select_check_waiters+0xb2>
  29709. if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) {
  29710. 800c8d2: b968 cbnz r0, 800c8f0 <select_check_waiters+0x88>
  29711. 800c8d4: 6922 ldr r2, [r4, #16]
  29712. 800c8d6: b302 cbz r2, 800c91a <select_check_waiters+0xb2>
  29713. 800c8d8: 462b mov r3, r5
  29714. 800c8da: 2d00 cmp r5, #0
  29715. 800c8dc: db23 blt.n 800c926 <select_check_waiters+0xbe>
  29716. 800c8de: 115b asrs r3, r3, #5
  29717. 800c8e0: f852 3023 ldr.w r3, [r2, r3, lsl #2]
  29718. 800c8e4: f005 021f and.w r2, r5, #31
  29719. 800c8e8: 40d3 lsrs r3, r2
  29720. 800c8ea: f013 0f01 tst.w r3, #1
  29721. 800c8ee: d014 beq.n 800c91a <select_check_waiters+0xb2>
  29722. }
  29723. }
  29724. }
  29725. #endif /* LWIP_SOCKET_SELECT */
  29726. if (do_signal) {
  29727. scb->sem_signalled = 1;
  29728. 800c8f0: 2301 movs r3, #1
  29729. 800c8f2: 61e3 str r3, [r4, #28]
  29730. /* For !LWIP_TCPIP_CORE_LOCKING, we don't call SYS_ARCH_UNPROTECT() before signaling
  29731. the semaphore, as this might lead to the select thread taking itself off the list,
  29732. invalidating the semaphore. */
  29733. sys_sem_signal(SELECT_SEM_PTR(scb->sem));
  29734. 800c8f4: f104 0020 add.w r0, r4, #32
  29735. 800c8f8: f000 fb6f bl 800cfda <sys_sem_signal>
  29736. for (scb = select_cb_list; scb != NULL; scb = scb->next) {
  29737. 800c8fc: 6824 ldr r4, [r4, #0]
  29738. 800c8fe: b1ac cbz r4, 800c92c <select_check_waiters+0xc4>
  29739. if (scb->sem_signalled == 0) {
  29740. 800c900: 69e0 ldr r0, [r4, #28]
  29741. 800c902: 2800 cmp r0, #0
  29742. 800c904: d1fa bne.n 800c8fc <select_check_waiters+0x94>
  29743. if (scb->poll_fds != NULL) {
  29744. 800c906: 6963 ldr r3, [r4, #20]
  29745. 800c908: 2b00 cmp r3, #0
  29746. 800c90a: d0b9 beq.n 800c880 <select_check_waiters+0x18>
  29747. do_signal = lwip_poll_should_wake(scb, s, has_recvevent, has_sendevent, has_errevent);
  29748. 800c90c: 9700 str r7, [sp, #0]
  29749. 800c90e: 4643 mov r3, r8
  29750. 800c910: 4632 mov r2, r6
  29751. 800c912: 4629 mov r1, r5
  29752. 800c914: 4620 mov r0, r4
  29753. 800c916: f7ff fd5e bl 800c3d6 <lwip_poll_should_wake>
  29754. if (do_signal) {
  29755. 800c91a: 2800 cmp r0, #0
  29756. 800c91c: d0ee beq.n 800c8fc <select_check_waiters+0x94>
  29757. 800c91e: e7e7 b.n 800c8f0 <select_check_waiters+0x88>
  29758. if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) {
  29759. 800c920: f105 031f add.w r3, r5, #31
  29760. 800c924: e7ca b.n 800c8bc <select_check_waiters+0x54>
  29761. if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) {
  29762. 800c926: f105 031f add.w r3, r5, #31
  29763. 800c92a: e7d8 b.n 800c8de <select_check_waiters+0x76>
  29764. /* remember the state of select_cb_list to detect changes */
  29765. last_select_cb_ctr = select_cb_ctr;
  29766. }
  29767. SYS_ARCH_UNPROTECT(lev);
  29768. #endif
  29769. }
  29770. 800c92c: b002 add sp, #8
  29771. 800c92e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  29772. 800c932: bf00 nop
  29773. 800c934: 24019b88 .word 0x24019b88
  29774. 0800c938 <event_callback>:
  29775. if (conn) {
  29776. 800c938: 2800 cmp r0, #0
  29777. 800c93a: d06d beq.n 800ca18 <event_callback+0xe0>
  29778. {
  29779. 800c93c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  29780. 800c940: 460c mov r4, r1
  29781. 800c942: 4605 mov r5, r0
  29782. s = conn->socket;
  29783. 800c944: 6986 ldr r6, [r0, #24]
  29784. if (s < 0) {
  29785. 800c946: 2e00 cmp r6, #0
  29786. 800c948: db0e blt.n 800c968 <event_callback+0x30>
  29787. sock = get_socket(s);
  29788. 800c94a: 4630 mov r0, r6
  29789. 800c94c: f7ff fd2e bl 800c3ac <get_socket>
  29790. if (!sock) {
  29791. 800c950: 4605 mov r5, r0
  29792. 800c952: b368 cbz r0, 800c9b0 <event_callback+0x78>
  29793. SYS_ARCH_PROTECT(lev);
  29794. 800c954: f000 fb8c bl 800d070 <sys_arch_protect>
  29795. 800c958: 4607 mov r7, r0
  29796. switch (evt) {
  29797. 800c95a: 2c04 cmp r4, #4
  29798. 800c95c: d838 bhi.n 800c9d0 <event_callback+0x98>
  29799. 800c95e: e8df f004 tbb [pc, r4]
  29800. 800c962: 1c11 .short 0x1c11
  29801. 800c964: 3129 .short 0x3129
  29802. 800c966: 34 .byte 0x34
  29803. 800c967: 00 .byte 0x00
  29804. SYS_ARCH_PROTECT(lev);
  29805. 800c968: f000 fb82 bl 800d070 <sys_arch_protect>
  29806. if (conn->socket < 0) {
  29807. 800c96c: 69ae ldr r6, [r5, #24]
  29808. 800c96e: 2e00 cmp r6, #0
  29809. 800c970: db02 blt.n 800c978 <event_callback+0x40>
  29810. SYS_ARCH_UNPROTECT(lev);
  29811. 800c972: f000 fb89 bl 800d088 <sys_arch_unprotect>
  29812. 800c976: e7e8 b.n 800c94a <event_callback+0x12>
  29813. if (evt == NETCONN_EVT_RCVPLUS) {
  29814. 800c978: b90c cbnz r4, 800c97e <event_callback+0x46>
  29815. conn->socket--;
  29816. 800c97a: 3e01 subs r6, #1
  29817. 800c97c: 61ae str r6, [r5, #24]
  29818. SYS_ARCH_UNPROTECT(lev);
  29819. 800c97e: f000 fb83 bl 800d088 <sys_arch_unprotect>
  29820. return;
  29821. 800c982: e015 b.n 800c9b0 <event_callback+0x78>
  29822. sock->rcvevent++;
  29823. 800c984: f9b5 3008 ldrsh.w r3, [r5, #8]
  29824. 800c988: 3301 adds r3, #1
  29825. 800c98a: b21b sxth r3, r3
  29826. 800c98c: 812b strh r3, [r5, #8]
  29827. if (sock->rcvevent > 1) {
  29828. 800c98e: 2b01 cmp r3, #1
  29829. 800c990: dd01 ble.n 800c996 <event_callback+0x5e>
  29830. check_waiters = 0;
  29831. 800c992: 2300 movs r3, #0
  29832. 800c994: e006 b.n 800c9a4 <event_callback+0x6c>
  29833. check_waiters = 1;
  29834. 800c996: 2301 movs r3, #1
  29835. 800c998: e004 b.n 800c9a4 <event_callback+0x6c>
  29836. sock->rcvevent--;
  29837. 800c99a: f9b5 3008 ldrsh.w r3, [r5, #8]
  29838. 800c99e: 3b01 subs r3, #1
  29839. 800c9a0: 812b strh r3, [r5, #8]
  29840. check_waiters = 0;
  29841. 800c9a2: 2300 movs r3, #0
  29842. if (sock->select_waiting && check_waiters) {
  29843. 800c9a4: 7baa ldrb r2, [r5, #14]
  29844. 800c9a6: b102 cbz r2, 800c9aa <event_callback+0x72>
  29845. 800c9a8: b9db cbnz r3, 800c9e2 <event_callback+0xaa>
  29846. SYS_ARCH_UNPROTECT(lev);
  29847. 800c9aa: 4638 mov r0, r7
  29848. 800c9ac: f000 fb6c bl 800d088 <sys_arch_unprotect>
  29849. }
  29850. 800c9b0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  29851. if (sock->sendevent) {
  29852. 800c9b4: 896b ldrh r3, [r5, #10]
  29853. 800c9b6: b91b cbnz r3, 800c9c0 <event_callback+0x88>
  29854. check_waiters = 1;
  29855. 800c9b8: 2301 movs r3, #1
  29856. sock->sendevent = 1;
  29857. 800c9ba: 2201 movs r2, #1
  29858. 800c9bc: 816a strh r2, [r5, #10]
  29859. break;
  29860. 800c9be: e7f1 b.n 800c9a4 <event_callback+0x6c>
  29861. check_waiters = 0;
  29862. 800c9c0: 2300 movs r3, #0
  29863. 800c9c2: e7fa b.n 800c9ba <event_callback+0x82>
  29864. sock->sendevent = 0;
  29865. 800c9c4: 2300 movs r3, #0
  29866. 800c9c6: 816b strh r3, [r5, #10]
  29867. break;
  29868. 800c9c8: e7ec b.n 800c9a4 <event_callback+0x6c>
  29869. sock->errevent = 1;
  29870. 800c9ca: 2301 movs r3, #1
  29871. 800c9cc: 81ab strh r3, [r5, #12]
  29872. break;
  29873. 800c9ce: e7e9 b.n 800c9a4 <event_callback+0x6c>
  29874. LWIP_ASSERT("unknown event", 0);
  29875. 800c9d0: 4b12 ldr r3, [pc, #72] @ (800ca1c <event_callback+0xe4>)
  29876. 800c9d2: f44f 621f mov.w r2, #2544 @ 0x9f0
  29877. 800c9d6: 4912 ldr r1, [pc, #72] @ (800ca20 <event_callback+0xe8>)
  29878. 800c9d8: 4812 ldr r0, [pc, #72] @ (800ca24 <event_callback+0xec>)
  29879. 800c9da: f006 fd15 bl 8013408 <iprintf>
  29880. check_waiters = 1;
  29881. 800c9de: 2301 movs r3, #1
  29882. break;
  29883. 800c9e0: e7e0 b.n 800c9a4 <event_callback+0x6c>
  29884. has_recvevent = sock->rcvevent > 0;
  29885. 800c9e2: f9b5 4008 ldrsh.w r4, [r5, #8]
  29886. 800c9e6: 2c00 cmp r4, #0
  29887. 800c9e8: bfd4 ite le
  29888. 800c9ea: 2400 movle r4, #0
  29889. 800c9ec: 2401 movgt r4, #1
  29890. has_sendevent = sock->sendevent != 0;
  29891. 800c9ee: f8b5 800a ldrh.w r8, [r5, #10]
  29892. 800c9f2: f1b8 0800 subs.w r8, r8, #0
  29893. 800c9f6: bf18 it ne
  29894. 800c9f8: f04f 0801 movne.w r8, #1
  29895. has_errevent = sock->errevent != 0;
  29896. 800c9fc: 89ad ldrh r5, [r5, #12]
  29897. 800c9fe: 3d00 subs r5, #0
  29898. 800ca00: bf18 it ne
  29899. 800ca02: 2501 movne r5, #1
  29900. SYS_ARCH_UNPROTECT(lev);
  29901. 800ca04: 4638 mov r0, r7
  29902. 800ca06: f000 fb3f bl 800d088 <sys_arch_unprotect>
  29903. select_check_waiters(s, has_recvevent, has_sendevent, has_errevent);
  29904. 800ca0a: 462b mov r3, r5
  29905. 800ca0c: 4642 mov r2, r8
  29906. 800ca0e: 4621 mov r1, r4
  29907. 800ca10: 4630 mov r0, r6
  29908. 800ca12: f7ff ff29 bl 800c868 <select_check_waiters>
  29909. if (sock->select_waiting && check_waiters) {
  29910. 800ca16: e7cb b.n 800c9b0 <event_callback+0x78>
  29911. 800ca18: 4770 bx lr
  29912. 800ca1a: bf00 nop
  29913. 800ca1c: 080163d0 .word 0x080163d0
  29914. 800ca20: 08016538 .word 0x08016538
  29915. 800ca24: 080144e8 .word 0x080144e8
  29916. 0800ca28 <lwip_close>:
  29917. {
  29918. 800ca28: b538 push {r3, r4, r5, lr}
  29919. sock = get_socket(s);
  29920. 800ca2a: f7ff fcbf bl 800c3ac <get_socket>
  29921. if (!sock) {
  29922. 800ca2e: b340 cbz r0, 800ca82 <lwip_close+0x5a>
  29923. 800ca30: 4605 mov r5, r0
  29924. if (sock->conn != NULL) {
  29925. 800ca32: 6803 ldr r3, [r0, #0]
  29926. 800ca34: b183 cbz r3, 800ca58 <lwip_close+0x30>
  29927. is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP;
  29928. 800ca36: 781c ldrb r4, [r3, #0]
  29929. 800ca38: f004 04f0 and.w r4, r4, #240 @ 0xf0
  29930. 800ca3c: 2c10 cmp r4, #16
  29931. 800ca3e: bf14 ite ne
  29932. 800ca40: 2400 movne r4, #0
  29933. 800ca42: 2401 moveq r4, #1
  29934. err = netconn_prepare_delete(sock->conn);
  29935. 800ca44: 6828 ldr r0, [r5, #0]
  29936. 800ca46: f7f9 fe91 bl 800676c <netconn_prepare_delete>
  29937. if (err != ERR_OK) {
  29938. 800ca4a: b990 cbnz r0, 800ca72 <lwip_close+0x4a>
  29939. free_socket(sock, is_tcp);
  29940. 800ca4c: 4621 mov r1, r4
  29941. 800ca4e: 4628 mov r0, r5
  29942. 800ca50: f7ff fdab bl 800c5aa <free_socket>
  29943. return 0;
  29944. 800ca54: 2000 movs r0, #0
  29945. }
  29946. 800ca56: bd38 pop {r3, r4, r5, pc}
  29947. LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata.pbuf == NULL);
  29948. 800ca58: 6843 ldr r3, [r0, #4]
  29949. 800ca5a: b143 cbz r3, 800ca6e <lwip_close+0x46>
  29950. 800ca5c: 4b0a ldr r3, [pc, #40] @ (800ca88 <lwip_close+0x60>)
  29951. 800ca5e: f44f 7245 mov.w r2, #788 @ 0x314
  29952. 800ca62: 490a ldr r1, [pc, #40] @ (800ca8c <lwip_close+0x64>)
  29953. 800ca64: 480a ldr r0, [pc, #40] @ (800ca90 <lwip_close+0x68>)
  29954. 800ca66: f006 fccf bl 8013408 <iprintf>
  29955. int is_tcp = 0;
  29956. 800ca6a: 2400 movs r4, #0
  29957. 800ca6c: e7ea b.n 800ca44 <lwip_close+0x1c>
  29958. 800ca6e: 2400 movs r4, #0
  29959. 800ca70: e7e8 b.n 800ca44 <lwip_close+0x1c>
  29960. sock_set_errno(sock, err_to_errno(err));
  29961. 800ca72: f7fc fc61 bl 8009338 <err_to_errno>
  29962. 800ca76: b108 cbz r0, 800ca7c <lwip_close+0x54>
  29963. 800ca78: 4a06 ldr r2, [pc, #24] @ (800ca94 <lwip_close+0x6c>)
  29964. 800ca7a: 6010 str r0, [r2, #0]
  29965. return -1;
  29966. 800ca7c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  29967. 800ca80: e7e9 b.n 800ca56 <lwip_close+0x2e>
  29968. return -1;
  29969. 800ca82: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  29970. 800ca86: e7e6 b.n 800ca56 <lwip_close+0x2e>
  29971. 800ca88: 080163d0 .word 0x080163d0
  29972. 800ca8c: 08016548 .word 0x08016548
  29973. 800ca90: 080144e8 .word 0x080144e8
  29974. 800ca94: 24019d8c .word 0x24019d8c
  29975. 0800ca98 <lwip_connect>:
  29976. {
  29977. 800ca98: b570 push {r4, r5, r6, lr}
  29978. 800ca9a: b082 sub sp, #8
  29979. 800ca9c: 460c mov r4, r1
  29980. 800ca9e: 4615 mov r5, r2
  29981. sock = get_socket(s);
  29982. 800caa0: f7ff fc84 bl 800c3ac <get_socket>
  29983. if (!sock) {
  29984. 800caa4: 2800 cmp r0, #0
  29985. 800caa6: d034 beq.n 800cb12 <lwip_connect+0x7a>
  29986. 800caa8: 4606 mov r6, r0
  29987. if (name->sa_family == AF_UNSPEC) {
  29988. 800caaa: 7863 ldrb r3, [r4, #1]
  29989. 800caac: b1a3 cbz r3, 800cad8 <lwip_connect+0x40>
  29990. LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) &&
  29991. 800caae: 2d10 cmp r5, #16
  29992. 800cab0: d116 bne.n 800cae0 <lwip_connect+0x48>
  29993. 800cab2: 2b02 cmp r3, #2
  29994. 800cab4: d114 bne.n 800cae0 <lwip_connect+0x48>
  29995. 800cab6: f014 0f03 tst.w r4, #3
  29996. 800caba: d111 bne.n 800cae0 <lwip_connect+0x48>
  29997. SOCKADDR_TO_IPADDR_PORT(name, &remote_addr, remote_port);
  29998. 800cabc: 6863 ldr r3, [r4, #4]
  29999. 800cabe: 9301 str r3, [sp, #4]
  30000. 800cac0: 8860 ldrh r0, [r4, #2]
  30001. 800cac2: f7fb f9db bl 8007e7c <lwip_htons>
  30002. 800cac6: 4602 mov r2, r0
  30003. err = netconn_connect(sock->conn, &remote_addr, remote_port);
  30004. 800cac8: a901 add r1, sp, #4
  30005. 800caca: 6830 ldr r0, [r6, #0]
  30006. 800cacc: f7f9 feaa bl 8006824 <netconn_connect>
  30007. if (err != ERR_OK) {
  30008. 800cad0: b9b8 cbnz r0, 800cb02 <lwip_connect+0x6a>
  30009. return 0;
  30010. 800cad2: 2000 movs r0, #0
  30011. }
  30012. 800cad4: b002 add sp, #8
  30013. 800cad6: bd70 pop {r4, r5, r6, pc}
  30014. err = netconn_disconnect(sock->conn);
  30015. 800cad8: 6800 ldr r0, [r0, #0]
  30016. 800cada: f7f9 fec9 bl 8006870 <netconn_disconnect>
  30017. 800cade: e7f7 b.n 800cad0 <lwip_connect+0x38>
  30018. LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) &&
  30019. 800cae0: 4b0d ldr r3, [pc, #52] @ (800cb18 <lwip_connect+0x80>)
  30020. 800cae2: f240 3247 movw r2, #839 @ 0x347
  30021. 800cae6: 490d ldr r1, [pc, #52] @ (800cb1c <lwip_connect+0x84>)
  30022. 800cae8: 480d ldr r0, [pc, #52] @ (800cb20 <lwip_connect+0x88>)
  30023. 800caea: f006 fc8d bl 8013408 <iprintf>
  30024. 800caee: f06f 000f mvn.w r0, #15
  30025. 800caf2: f7fc fc21 bl 8009338 <err_to_errno>
  30026. 800caf6: b108 cbz r0, 800cafc <lwip_connect+0x64>
  30027. 800caf8: 4a0a ldr r2, [pc, #40] @ (800cb24 <lwip_connect+0x8c>)
  30028. 800cafa: 6010 str r0, [r2, #0]
  30029. 800cafc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30030. 800cb00: e7e8 b.n 800cad4 <lwip_connect+0x3c>
  30031. sock_set_errno(sock, err_to_errno(err));
  30032. 800cb02: f7fc fc19 bl 8009338 <err_to_errno>
  30033. 800cb06: b108 cbz r0, 800cb0c <lwip_connect+0x74>
  30034. 800cb08: 4a06 ldr r2, [pc, #24] @ (800cb24 <lwip_connect+0x8c>)
  30035. 800cb0a: 6010 str r0, [r2, #0]
  30036. return -1;
  30037. 800cb0c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30038. 800cb10: e7e0 b.n 800cad4 <lwip_connect+0x3c>
  30039. return -1;
  30040. 800cb12: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30041. 800cb16: e7dd b.n 800cad4 <lwip_connect+0x3c>
  30042. 800cb18: 080163d0 .word 0x080163d0
  30043. 800cb1c: 08016560 .word 0x08016560
  30044. 800cb20: 080144e8 .word 0x080144e8
  30045. 800cb24: 24019d8c .word 0x24019d8c
  30046. 0800cb28 <lwip_recvfrom>:
  30047. {
  30048. 800cb28: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
  30049. 800cb2c: b08d sub sp, #52 @ 0x34
  30050. 800cb2e: 4607 mov r7, r0
  30051. 800cb30: 4689 mov r9, r1
  30052. 800cb32: 4614 mov r4, r2
  30053. 800cb34: 461e mov r6, r3
  30054. 800cb36: 9d15 ldr r5, [sp, #84] @ 0x54
  30055. sock = get_socket(s);
  30056. 800cb38: f7ff fc38 bl 800c3ac <get_socket>
  30057. if (!sock) {
  30058. 800cb3c: 2800 cmp r0, #0
  30059. 800cb3e: d04e beq.n 800cbde <lwip_recvfrom+0xb6>
  30060. 800cb40: 4680 mov r8, r0
  30061. if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) {
  30062. 800cb42: 6803 ldr r3, [r0, #0]
  30063. 800cb44: 781b ldrb r3, [r3, #0]
  30064. 800cb46: f003 03f0 and.w r3, r3, #240 @ 0xf0
  30065. 800cb4a: 2b10 cmp r3, #16
  30066. 800cb4c: d025 beq.n 800cb9a <lwip_recvfrom+0x72>
  30067. u16_t datagram_len = 0;
  30068. 800cb4e: 2200 movs r2, #0
  30069. 800cb50: f8ad 200a strh.w r2, [sp, #10]
  30070. vec.iov_base = mem;
  30071. 800cb54: f8cd 900c str.w r9, [sp, #12]
  30072. vec.iov_len = len;
  30073. 800cb58: 9404 str r4, [sp, #16]
  30074. msg.msg_control = NULL;
  30075. 800cb5a: 9209 str r2, [sp, #36] @ 0x24
  30076. msg.msg_controllen = 0;
  30077. 800cb5c: 920a str r2, [sp, #40] @ 0x28
  30078. msg.msg_flags = 0;
  30079. 800cb5e: 920b str r2, [sp, #44] @ 0x2c
  30080. msg.msg_iov = &vec;
  30081. 800cb60: ab03 add r3, sp, #12
  30082. 800cb62: 9307 str r3, [sp, #28]
  30083. msg.msg_iovlen = 1;
  30084. 800cb64: 2301 movs r3, #1
  30085. 800cb66: 9308 str r3, [sp, #32]
  30086. msg.msg_name = from;
  30087. 800cb68: 9b14 ldr r3, [sp, #80] @ 0x50
  30088. 800cb6a: 9305 str r3, [sp, #20]
  30089. msg.msg_namelen = (fromlen ? *fromlen : 0);
  30090. 800cb6c: b325 cbz r5, 800cbb8 <lwip_recvfrom+0x90>
  30091. 800cb6e: 682b ldr r3, [r5, #0]
  30092. 800cb70: 9306 str r3, [sp, #24]
  30093. err = lwip_recvfrom_udp_raw(sock, flags, &msg, &datagram_len, s);
  30094. 800cb72: 9700 str r7, [sp, #0]
  30095. 800cb74: f10d 030a add.w r3, sp, #10
  30096. 800cb78: aa05 add r2, sp, #20
  30097. 800cb7a: 4631 mov r1, r6
  30098. 800cb7c: 4640 mov r0, r8
  30099. 800cb7e: f7ff fdeb bl 800c758 <lwip_recvfrom_udp_raw>
  30100. if (err != ERR_OK) {
  30101. 800cb82: b9d8 cbnz r0, 800cbbc <lwip_recvfrom+0x94>
  30102. ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX);
  30103. 800cb84: f8bd 000a ldrh.w r0, [sp, #10]
  30104. 800cb88: 42a0 cmp r0, r4
  30105. 800cb8a: bf28 it cs
  30106. 800cb8c: 4620 movcs r0, r4
  30107. 800cb8e: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000
  30108. 800cb92: 4298 cmp r0, r3
  30109. 800cb94: d21a bcs.n 800cbcc <lwip_recvfrom+0xa4>
  30110. 800cb96: 4604 mov r4, r0
  30111. 800cb98: e01a b.n 800cbd0 <lwip_recvfrom+0xa8>
  30112. ret = lwip_recv_tcp(sock, mem, len, flags);
  30113. 800cb9a: 4633 mov r3, r6
  30114. 800cb9c: 4622 mov r2, r4
  30115. 800cb9e: 4649 mov r1, r9
  30116. 800cba0: f7ff fd1e bl 800c5e0 <lwip_recv_tcp>
  30117. 800cba4: 4604 mov r4, r0
  30118. lwip_recv_tcp_from(sock, from, fromlen, "lwip_recvfrom", s, ret);
  30119. 800cba6: 9001 str r0, [sp, #4]
  30120. 800cba8: 9700 str r7, [sp, #0]
  30121. 800cbaa: 4b0e ldr r3, [pc, #56] @ (800cbe4 <lwip_recvfrom+0xbc>)
  30122. 800cbac: 462a mov r2, r5
  30123. 800cbae: 9914 ldr r1, [sp, #80] @ 0x50
  30124. 800cbb0: 4640 mov r0, r8
  30125. 800cbb2: f7ff fccb bl 800c54c <lwip_recv_tcp_from>
  30126. return ret;
  30127. 800cbb6: e00e b.n 800cbd6 <lwip_recvfrom+0xae>
  30128. msg.msg_namelen = (fromlen ? *fromlen : 0);
  30129. 800cbb8: 2300 movs r3, #0
  30130. 800cbba: e7d9 b.n 800cb70 <lwip_recvfrom+0x48>
  30131. sock_set_errno(sock, err_to_errno(err));
  30132. 800cbbc: f7fc fbbc bl 8009338 <err_to_errno>
  30133. 800cbc0: b108 cbz r0, 800cbc6 <lwip_recvfrom+0x9e>
  30134. 800cbc2: 4a09 ldr r2, [pc, #36] @ (800cbe8 <lwip_recvfrom+0xc0>)
  30135. 800cbc4: 6010 str r0, [r2, #0]
  30136. return -1;
  30137. 800cbc6: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  30138. 800cbca: e004 b.n 800cbd6 <lwip_recvfrom+0xae>
  30139. ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX);
  30140. 800cbcc: f06f 4400 mvn.w r4, #2147483648 @ 0x80000000
  30141. if (fromlen) {
  30142. 800cbd0: b10d cbz r5, 800cbd6 <lwip_recvfrom+0xae>
  30143. *fromlen = msg.msg_namelen;
  30144. 800cbd2: 9b06 ldr r3, [sp, #24]
  30145. 800cbd4: 602b str r3, [r5, #0]
  30146. }
  30147. 800cbd6: 4620 mov r0, r4
  30148. 800cbd8: b00d add sp, #52 @ 0x34
  30149. 800cbda: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
  30150. return -1;
  30151. 800cbde: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  30152. 800cbe2: e7f8 b.n 800cbd6 <lwip_recvfrom+0xae>
  30153. 800cbe4: 08016580 .word 0x08016580
  30154. 800cbe8: 24019d8c .word 0x24019d8c
  30155. 0800cbec <lwip_recv>:
  30156. {
  30157. 800cbec: b510 push {r4, lr}
  30158. 800cbee: b082 sub sp, #8
  30159. return lwip_recvfrom(s, mem, len, flags, NULL, NULL);
  30160. 800cbf0: 2400 movs r4, #0
  30161. 800cbf2: 9401 str r4, [sp, #4]
  30162. 800cbf4: 9400 str r4, [sp, #0]
  30163. 800cbf6: f7ff ff97 bl 800cb28 <lwip_recvfrom>
  30164. }
  30165. 800cbfa: b002 add sp, #8
  30166. 800cbfc: bd10 pop {r4, pc}
  30167. ...
  30168. 0800cc00 <lwip_sendto>:
  30169. {
  30170. 800cc00: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  30171. 800cc04: b084 sub sp, #16
  30172. 800cc06: 4607 mov r7, r0
  30173. 800cc08: 460e mov r6, r1
  30174. 800cc0a: 4614 mov r4, r2
  30175. 800cc0c: 4698 mov r8, r3
  30176. 800cc0e: 9d0c ldr r5, [sp, #48] @ 0x30
  30177. 800cc10: f8dd 9034 ldr.w r9, [sp, #52] @ 0x34
  30178. sock = get_socket(s);
  30179. 800cc14: f7ff fbca bl 800c3ac <get_socket>
  30180. if (!sock) {
  30181. 800cc18: 2800 cmp r0, #0
  30182. 800cc1a: d068 beq.n 800ccee <lwip_sendto+0xee>
  30183. 800cc1c: 4682 mov sl, r0
  30184. if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) {
  30185. 800cc1e: 6803 ldr r3, [r0, #0]
  30186. 800cc20: 781a ldrb r2, [r3, #0]
  30187. 800cc22: f002 02f0 and.w r2, r2, #240 @ 0xf0
  30188. 800cc26: 2a10 cmp r2, #16
  30189. 800cc28: d039 beq.n 800cc9e <lwip_sendto+0x9e>
  30190. if (size > LWIP_MIN(0xFFFF, SSIZE_MAX)) {
  30191. 800cc2a: f5b4 3f80 cmp.w r4, #65536 @ 0x10000
  30192. 800cc2e: d23d bcs.n 800ccac <lwip_sendto+0xac>
  30193. short_size = (u16_t)size;
  30194. 800cc30: b2a7 uxth r7, r4
  30195. LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) ||
  30196. 800cc32: f1b9 0f00 cmp.w r9, #0
  30197. 800cc36: bf08 it eq
  30198. 800cc38: 2d00 cmpeq r5, #0
  30199. 800cc3a: d00f beq.n 800cc5c <lwip_sendto+0x5c>
  30200. 800cc3c: fab5 f385 clz r3, r5
  30201. 800cc40: 095b lsrs r3, r3, #5
  30202. 800cc42: f1b9 0f10 cmp.w r9, #16
  30203. 800cc46: bf18 it ne
  30204. 800cc48: f043 0301 orrne.w r3, r3, #1
  30205. 800cc4c: 2b00 cmp r3, #0
  30206. 800cc4e: d133 bne.n 800ccb8 <lwip_sendto+0xb8>
  30207. 800cc50: 786b ldrb r3, [r5, #1]
  30208. 800cc52: 2b02 cmp r3, #2
  30209. 800cc54: d130 bne.n 800ccb8 <lwip_sendto+0xb8>
  30210. 800cc56: f015 0f03 tst.w r5, #3
  30211. 800cc5a: d12d bne.n 800ccb8 <lwip_sendto+0xb8>
  30212. buf.p = buf.ptr = NULL;
  30213. 800cc5c: 2300 movs r3, #0
  30214. 800cc5e: 9301 str r3, [sp, #4]
  30215. 800cc60: 9300 str r3, [sp, #0]
  30216. if (to) {
  30217. 800cc62: 2d00 cmp r5, #0
  30218. 800cc64: d039 beq.n 800ccda <lwip_sendto+0xda>
  30219. SOCKADDR_TO_IPADDR_PORT(to, &buf.addr, remote_port);
  30220. 800cc66: 686b ldr r3, [r5, #4]
  30221. 800cc68: 9302 str r3, [sp, #8]
  30222. 800cc6a: 8868 ldrh r0, [r5, #2]
  30223. 800cc6c: f7fb f906 bl 8007e7c <lwip_htons>
  30224. netbuf_fromport(&buf) = remote_port;
  30225. 800cc70: f8ad 000c strh.w r0, [sp, #12]
  30226. err = netbuf_ref(&buf, data, short_size);
  30227. 800cc74: 463a mov r2, r7
  30228. 800cc76: 4631 mov r1, r6
  30229. 800cc78: 4668 mov r0, sp
  30230. 800cc7a: f7fe fd3b bl 800b6f4 <netbuf_ref>
  30231. if (err == ERR_OK) {
  30232. 800cc7e: 4605 mov r5, r0
  30233. 800cc80: b370 cbz r0, 800cce0 <lwip_sendto+0xe0>
  30234. netbuf_free(&buf);
  30235. 800cc82: 4668 mov r0, sp
  30236. 800cc84: f7fe fd1e bl 800b6c4 <netbuf_free>
  30237. sock_set_errno(sock, err_to_errno(err));
  30238. 800cc88: 4628 mov r0, r5
  30239. 800cc8a: f7fc fb55 bl 8009338 <err_to_errno>
  30240. 800cc8e: b108 cbz r0, 800cc94 <lwip_sendto+0x94>
  30241. 800cc90: 4a1a ldr r2, [pc, #104] @ (800ccfc <lwip_sendto+0xfc>)
  30242. 800cc92: 6010 str r0, [r2, #0]
  30243. return (err == ERR_OK ? short_size : -1);
  30244. 800cc94: bb75 cbnz r5, 800ccf4 <lwip_sendto+0xf4>
  30245. 800cc96: b2a0 uxth r0, r4
  30246. }
  30247. 800cc98: b004 add sp, #16
  30248. 800cc9a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  30249. return lwip_send(s, data, size, flags);
  30250. 800cc9e: 4643 mov r3, r8
  30251. 800cca0: 4622 mov r2, r4
  30252. 800cca2: 4631 mov r1, r6
  30253. 800cca4: 4638 mov r0, r7
  30254. 800cca6: f000 f831 bl 800cd0c <lwip_send>
  30255. 800ccaa: e7f5 b.n 800cc98 <lwip_sendto+0x98>
  30256. sock_set_errno(sock, EMSGSIZE);
  30257. 800ccac: 4b13 ldr r3, [pc, #76] @ (800ccfc <lwip_sendto+0xfc>)
  30258. 800ccae: 225a movs r2, #90 @ 0x5a
  30259. 800ccb0: 601a str r2, [r3, #0]
  30260. return -1;
  30261. 800ccb2: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30262. 800ccb6: e7ef b.n 800cc98 <lwip_sendto+0x98>
  30263. LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) ||
  30264. 800ccb8: 4b11 ldr r3, [pc, #68] @ (800cd00 <lwip_sendto+0x100>)
  30265. 800ccba: f240 6252 movw r2, #1618 @ 0x652
  30266. 800ccbe: 4911 ldr r1, [pc, #68] @ (800cd04 <lwip_sendto+0x104>)
  30267. 800ccc0: 4811 ldr r0, [pc, #68] @ (800cd08 <lwip_sendto+0x108>)
  30268. 800ccc2: f006 fba1 bl 8013408 <iprintf>
  30269. 800ccc6: f06f 000f mvn.w r0, #15
  30270. 800ccca: f7fc fb35 bl 8009338 <err_to_errno>
  30271. 800ccce: b108 cbz r0, 800ccd4 <lwip_sendto+0xd4>
  30272. 800ccd0: 4a0a ldr r2, [pc, #40] @ (800ccfc <lwip_sendto+0xfc>)
  30273. 800ccd2: 6010 str r0, [r2, #0]
  30274. 800ccd4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30275. 800ccd8: e7de b.n 800cc98 <lwip_sendto+0x98>
  30276. ip_addr_set_any(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)), &buf.addr);
  30277. 800ccda: 2000 movs r0, #0
  30278. 800ccdc: 9002 str r0, [sp, #8]
  30279. 800ccde: e7c7 b.n 800cc70 <lwip_sendto+0x70>
  30280. err = netconn_send(sock->conn, &buf);
  30281. 800cce0: 4669 mov r1, sp
  30282. 800cce2: f8da 0000 ldr.w r0, [sl]
  30283. 800cce6: f7f9 fdff bl 80068e8 <netconn_send>
  30284. 800ccea: 4605 mov r5, r0
  30285. 800ccec: e7c9 b.n 800cc82 <lwip_sendto+0x82>
  30286. return -1;
  30287. 800ccee: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30288. 800ccf2: e7d1 b.n 800cc98 <lwip_sendto+0x98>
  30289. return (err == ERR_OK ? short_size : -1);
  30290. 800ccf4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30291. 800ccf8: e7ce b.n 800cc98 <lwip_sendto+0x98>
  30292. 800ccfa: bf00 nop
  30293. 800ccfc: 24019d8c .word 0x24019d8c
  30294. 800cd00: 080163d0 .word 0x080163d0
  30295. 800cd04: 08016590 .word 0x08016590
  30296. 800cd08: 080144e8 .word 0x080144e8
  30297. 0800cd0c <lwip_send>:
  30298. {
  30299. 800cd0c: b5f0 push {r4, r5, r6, r7, lr}
  30300. 800cd0e: b085 sub sp, #20
  30301. 800cd10: 4607 mov r7, r0
  30302. 800cd12: 460d mov r5, r1
  30303. 800cd14: 4616 mov r6, r2
  30304. 800cd16: 461c mov r4, r3
  30305. sock = get_socket(s);
  30306. 800cd18: f7ff fb48 bl 800c3ac <get_socket>
  30307. if (!sock) {
  30308. 800cd1c: b368 cbz r0, 800cd7a <lwip_send+0x6e>
  30309. 800cd1e: 4602 mov r2, r0
  30310. if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) {
  30311. 800cd20: 6803 ldr r3, [r0, #0]
  30312. 800cd22: 781b ldrb r3, [r3, #0]
  30313. 800cd24: f003 03f0 and.w r3, r3, #240 @ 0xf0
  30314. 800cd28: 2b10 cmp r3, #16
  30315. 800cd2a: d11a bne.n 800cd62 <lwip_send+0x56>
  30316. write_flags = (u8_t)(NETCONN_COPY |
  30317. 800cd2c: f014 0f10 tst.w r4, #16
  30318. 800cd30: d021 beq.n 800cd76 <lwip_send+0x6a>
  30319. 800cd32: 2303 movs r3, #3
  30320. ((flags & MSG_MORE) ? NETCONN_MORE : 0) |
  30321. 800cd34: 1064 asrs r4, r4, #1
  30322. 800cd36: f004 0404 and.w r4, r4, #4
  30323. written = 0;
  30324. 800cd3a: 2100 movs r1, #0
  30325. 800cd3c: 9103 str r1, [sp, #12]
  30326. err = netconn_write_partly(sock->conn, data, size, write_flags, &written);
  30327. 800cd3e: 6810 ldr r0, [r2, #0]
  30328. 800cd40: aa03 add r2, sp, #12
  30329. 800cd42: 9200 str r2, [sp, #0]
  30330. 800cd44: 4323 orrs r3, r4
  30331. 800cd46: 4632 mov r2, r6
  30332. 800cd48: 4629 mov r1, r5
  30333. 800cd4a: f7f9 fe67 bl 8006a1c <netconn_write_partly>
  30334. 800cd4e: 4604 mov r4, r0
  30335. sock_set_errno(sock, err_to_errno(err));
  30336. 800cd50: f7fc faf2 bl 8009338 <err_to_errno>
  30337. 800cd54: b108 cbz r0, 800cd5a <lwip_send+0x4e>
  30338. 800cd56: 4a0c ldr r2, [pc, #48] @ (800cd88 <lwip_send+0x7c>)
  30339. 800cd58: 6010 str r0, [r2, #0]
  30340. return (err == ERR_OK ? (ssize_t)written : -1);
  30341. 800cd5a: b98c cbnz r4, 800cd80 <lwip_send+0x74>
  30342. 800cd5c: 9803 ldr r0, [sp, #12]
  30343. }
  30344. 800cd5e: b005 add sp, #20
  30345. 800cd60: bdf0 pop {r4, r5, r6, r7, pc}
  30346. return lwip_sendto(s, data, size, flags, NULL, 0);
  30347. 800cd62: 2300 movs r3, #0
  30348. 800cd64: 9301 str r3, [sp, #4]
  30349. 800cd66: 9300 str r3, [sp, #0]
  30350. 800cd68: 4623 mov r3, r4
  30351. 800cd6a: 4632 mov r2, r6
  30352. 800cd6c: 4629 mov r1, r5
  30353. 800cd6e: 4638 mov r0, r7
  30354. 800cd70: f7ff ff46 bl 800cc00 <lwip_sendto>
  30355. 800cd74: e7f3 b.n 800cd5e <lwip_send+0x52>
  30356. write_flags = (u8_t)(NETCONN_COPY |
  30357. 800cd76: 2301 movs r3, #1
  30358. 800cd78: e7dc b.n 800cd34 <lwip_send+0x28>
  30359. return -1;
  30360. 800cd7a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30361. 800cd7e: e7ee b.n 800cd5e <lwip_send+0x52>
  30362. return (err == ERR_OK ? (ssize_t)written : -1);
  30363. 800cd80: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30364. 800cd84: e7eb b.n 800cd5e <lwip_send+0x52>
  30365. 800cd86: bf00 nop
  30366. 800cd88: 24019d8c .word 0x24019d8c
  30367. 0800cd8c <lwip_socket>:
  30368. {
  30369. 800cd8c: b538 push {r3, r4, r5, lr}
  30370. 800cd8e: 4613 mov r3, r2
  30371. switch (type) {
  30372. 800cd90: 2902 cmp r1, #2
  30373. 800cd92: d01b beq.n 800cdcc <lwip_socket+0x40>
  30374. 800cd94: 2903 cmp r1, #3
  30375. 800cd96: d007 beq.n 800cda8 <lwip_socket+0x1c>
  30376. 800cd98: 2901 cmp r1, #1
  30377. 800cd9a: d022 beq.n 800cde2 <lwip_socket+0x56>
  30378. set_errno(EINVAL);
  30379. 800cd9c: 4b1b ldr r3, [pc, #108] @ (800ce0c <lwip_socket+0x80>)
  30380. 800cd9e: 2216 movs r2, #22
  30381. 800cda0: 601a str r2, [r3, #0]
  30382. return -1;
  30383. 800cda2: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  30384. 800cda6: e00f b.n 800cdc8 <lwip_socket+0x3c>
  30385. conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW),
  30386. 800cda8: 4a19 ldr r2, [pc, #100] @ (800ce10 <lwip_socket+0x84>)
  30387. 800cdaa: b2d9 uxtb r1, r3
  30388. 800cdac: 2040 movs r0, #64 @ 0x40
  30389. 800cdae: f7f9 fc81 bl 80066b4 <netconn_new_with_proto_and_callback>
  30390. 800cdb2: 4605 mov r5, r0
  30391. if (!conn) {
  30392. 800cdb4: b1e5 cbz r5, 800cdf0 <lwip_socket+0x64>
  30393. i = alloc_socket(conn, 0);
  30394. 800cdb6: 2100 movs r1, #0
  30395. 800cdb8: 4628 mov r0, r5
  30396. 800cdba: f7ff fb33 bl 800c424 <alloc_socket>
  30397. 800cdbe: 4604 mov r4, r0
  30398. if (i == -1) {
  30399. 800cdc0: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
  30400. 800cdc4: d01a beq.n 800cdfc <lwip_socket+0x70>
  30401. conn->socket = i;
  30402. 800cdc6: 61a8 str r0, [r5, #24]
  30403. }
  30404. 800cdc8: 4620 mov r0, r4
  30405. 800cdca: bd38 pop {r3, r4, r5, pc}
  30406. conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain,
  30407. 800cdcc: 2a88 cmp r2, #136 @ 0x88
  30408. 800cdce: d006 beq.n 800cdde <lwip_socket+0x52>
  30409. 800cdd0: 2020 movs r0, #32
  30410. 800cdd2: 4a0f ldr r2, [pc, #60] @ (800ce10 <lwip_socket+0x84>)
  30411. 800cdd4: 2100 movs r1, #0
  30412. 800cdd6: f7f9 fc6d bl 80066b4 <netconn_new_with_proto_and_callback>
  30413. 800cdda: 4605 mov r5, r0
  30414. break;
  30415. 800cddc: e7ea b.n 800cdb4 <lwip_socket+0x28>
  30416. conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain,
  30417. 800cdde: 2021 movs r0, #33 @ 0x21
  30418. 800cde0: e7f7 b.n 800cdd2 <lwip_socket+0x46>
  30419. conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), DEFAULT_SOCKET_EVENTCB);
  30420. 800cde2: 4a0b ldr r2, [pc, #44] @ (800ce10 <lwip_socket+0x84>)
  30421. 800cde4: 2100 movs r1, #0
  30422. 800cde6: 2010 movs r0, #16
  30423. 800cde8: f7f9 fc64 bl 80066b4 <netconn_new_with_proto_and_callback>
  30424. 800cdec: 4605 mov r5, r0
  30425. break;
  30426. 800cdee: e7e1 b.n 800cdb4 <lwip_socket+0x28>
  30427. set_errno(ENOBUFS);
  30428. 800cdf0: 4b06 ldr r3, [pc, #24] @ (800ce0c <lwip_socket+0x80>)
  30429. 800cdf2: 2269 movs r2, #105 @ 0x69
  30430. 800cdf4: 601a str r2, [r3, #0]
  30431. return -1;
  30432. 800cdf6: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  30433. 800cdfa: e7e5 b.n 800cdc8 <lwip_socket+0x3c>
  30434. netconn_delete(conn);
  30435. 800cdfc: 4628 mov r0, r5
  30436. 800cdfe: f7f9 fcc7 bl 8006790 <netconn_delete>
  30437. set_errno(ENFILE);
  30438. 800ce02: 4b02 ldr r3, [pc, #8] @ (800ce0c <lwip_socket+0x80>)
  30439. 800ce04: 2217 movs r2, #23
  30440. 800ce06: 601a str r2, [r3, #0]
  30441. return -1;
  30442. 800ce08: e7de b.n 800cdc8 <lwip_socket+0x3c>
  30443. 800ce0a: bf00 nop
  30444. 800ce0c: 24019d8c .word 0x24019d8c
  30445. 800ce10: 0800c939 .word 0x0800c939
  30446. 0800ce14 <lwip_ioctl>:
  30447. return err;
  30448. }
  30449. int
  30450. lwip_ioctl(int s, long cmd, void *argp)
  30451. {
  30452. 800ce14: b570 push {r4, r5, r6, lr}
  30453. 800ce16: 460c mov r4, r1
  30454. 800ce18: 4615 mov r5, r2
  30455. struct lwip_sock *sock = get_socket(s);
  30456. 800ce1a: f7ff fac7 bl 800c3ac <get_socket>
  30457. u8_t val;
  30458. #if LWIP_SO_RCVBUF
  30459. int recv_avail;
  30460. #endif /* LWIP_SO_RCVBUF */
  30461. if (!sock) {
  30462. 800ce1e: 2800 cmp r0, #0
  30463. 800ce20: d045 beq.n 800ceae <lwip_ioctl+0x9a>
  30464. 800ce22: 4606 mov r6, r0
  30465. return -1;
  30466. }
  30467. switch (cmd) {
  30468. 800ce24: 4b23 ldr r3, [pc, #140] @ (800ceb4 <lwip_ioctl+0xa0>)
  30469. 800ce26: 429c cmp r4, r3
  30470. 800ce28: d026 beq.n 800ce78 <lwip_ioctl+0x64>
  30471. 800ce2a: f103 4340 add.w r3, r3, #3221225472 @ 0xc0000000
  30472. 800ce2e: 3301 adds r3, #1
  30473. 800ce30: 429c cmp r4, r3
  30474. 800ce32: d136 bne.n 800cea2 <lwip_ioctl+0x8e>
  30475. #if LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE
  30476. case FIONREAD:
  30477. if (!argp) {
  30478. 800ce34: b1ad cbz r5, 800ce62 <lwip_ioctl+0x4e>
  30479. }
  30480. #endif /* LWIP_FIONREAD_LINUXMODE */
  30481. #if LWIP_SO_RCVBUF
  30482. /* we come here if either LWIP_FIONREAD_LINUXMODE==0 or this is a TCP socket */
  30483. SYS_ARCH_GET(sock->conn->recv_avail, recv_avail);
  30484. 800ce36: f000 f91b bl 800d070 <sys_arch_protect>
  30485. 800ce3a: 6833 ldr r3, [r6, #0]
  30486. 800ce3c: 6a5c ldr r4, [r3, #36] @ 0x24
  30487. 800ce3e: f000 f923 bl 800d088 <sys_arch_unprotect>
  30488. if (recv_avail < 0) {
  30489. 800ce42: 2c00 cmp r4, #0
  30490. 800ce44: db13 blt.n 800ce6e <lwip_ioctl+0x5a>
  30491. recv_avail = 0;
  30492. }
  30493. /* Check if there is data left from the last recv operation. /maq 041215 */
  30494. if (sock->lastdata.netbuf) {
  30495. 800ce46: 6872 ldr r2, [r6, #4]
  30496. 800ce48: b142 cbz r2, 800ce5c <lwip_ioctl+0x48>
  30497. if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) {
  30498. 800ce4a: 6833 ldr r3, [r6, #0]
  30499. 800ce4c: 781b ldrb r3, [r3, #0]
  30500. 800ce4e: f003 03f0 and.w r3, r3, #240 @ 0xf0
  30501. 800ce52: 2b10 cmp r3, #16
  30502. 800ce54: d00d beq.n 800ce72 <lwip_ioctl+0x5e>
  30503. recv_avail += sock->lastdata.pbuf->tot_len;
  30504. } else {
  30505. recv_avail += sock->lastdata.netbuf->p->tot_len;
  30506. 800ce56: 6813 ldr r3, [r2, #0]
  30507. 800ce58: 891b ldrh r3, [r3, #8]
  30508. 800ce5a: 441c add r4, r3
  30509. }
  30510. }
  30511. *((int *)argp) = recv_avail;
  30512. 800ce5c: 602c str r4, [r5, #0]
  30513. LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONREAD, %p) = %"U16_F"\n", s, argp, *((u16_t *)argp)));
  30514. sock_set_errno(sock, 0);
  30515. done_socket(sock);
  30516. return 0;
  30517. 800ce5e: 2000 movs r0, #0
  30518. 800ce60: e024 b.n 800ceac <lwip_ioctl+0x98>
  30519. sock_set_errno(sock, EINVAL);
  30520. 800ce62: 4b15 ldr r3, [pc, #84] @ (800ceb8 <lwip_ioctl+0xa4>)
  30521. 800ce64: 2216 movs r2, #22
  30522. 800ce66: 601a str r2, [r3, #0]
  30523. return -1;
  30524. 800ce68: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30525. 800ce6c: e01e b.n 800ceac <lwip_ioctl+0x98>
  30526. recv_avail = 0;
  30527. 800ce6e: 2400 movs r4, #0
  30528. 800ce70: e7e9 b.n 800ce46 <lwip_ioctl+0x32>
  30529. recv_avail += sock->lastdata.pbuf->tot_len;
  30530. 800ce72: 8913 ldrh r3, [r2, #8]
  30531. 800ce74: 441c add r4, r3
  30532. 800ce76: e7f1 b.n 800ce5c <lwip_ioctl+0x48>
  30533. #endif /* LWIP_SO_RCVBUF */
  30534. #endif /* LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE */
  30535. case (long)FIONBIO:
  30536. val = 0;
  30537. if (argp && *(int *)argp) {
  30538. 800ce78: b155 cbz r5, 800ce90 <lwip_ioctl+0x7c>
  30539. 800ce7a: 682b ldr r3, [r5, #0]
  30540. 800ce7c: b143 cbz r3, 800ce90 <lwip_ioctl+0x7c>
  30541. val = 1;
  30542. }
  30543. netconn_set_nonblocking(sock->conn, val);
  30544. 800ce7e: 6802 ldr r2, [r0, #0]
  30545. 800ce80: f892 3028 ldrb.w r3, [r2, #40] @ 0x28
  30546. 800ce84: f043 0302 orr.w r3, r3, #2
  30547. 800ce88: f882 3028 strb.w r3, [r2, #40] @ 0x28
  30548. LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONBIO, %d)\n", s, val));
  30549. sock_set_errno(sock, 0);
  30550. done_socket(sock);
  30551. return 0;
  30552. 800ce8c: 2000 movs r0, #0
  30553. 800ce8e: e00d b.n 800ceac <lwip_ioctl+0x98>
  30554. netconn_set_nonblocking(sock->conn, val);
  30555. 800ce90: 6832 ldr r2, [r6, #0]
  30556. 800ce92: f892 3028 ldrb.w r3, [r2, #40] @ 0x28
  30557. 800ce96: f003 03fd and.w r3, r3, #253 @ 0xfd
  30558. 800ce9a: f882 3028 strb.w r3, [r2, #40] @ 0x28
  30559. return 0;
  30560. 800ce9e: 2000 movs r0, #0
  30561. 800cea0: e004 b.n 800ceac <lwip_ioctl+0x98>
  30562. default:
  30563. break;
  30564. } /* switch (cmd) */
  30565. LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, UNIMPL: 0x%lx, %p)\n", s, cmd, argp));
  30566. sock_set_errno(sock, ENOSYS); /* not yet implemented */
  30567. 800cea2: 4b05 ldr r3, [pc, #20] @ (800ceb8 <lwip_ioctl+0xa4>)
  30568. 800cea4: 2226 movs r2, #38 @ 0x26
  30569. 800cea6: 601a str r2, [r3, #0]
  30570. done_socket(sock);
  30571. return -1;
  30572. 800cea8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30573. }
  30574. 800ceac: bd70 pop {r4, r5, r6, pc}
  30575. return -1;
  30576. 800ceae: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30577. 800ceb2: e7fb b.n 800ceac <lwip_ioctl+0x98>
  30578. 800ceb4: 8004667e .word 0x8004667e
  30579. 800ceb8: 24019d8c .word 0x24019d8c
  30580. 0800cebc <sys_mbox_new>:
  30581. #endif
  30582. /*-----------------------------------------------------------------------------------*/
  30583. // Creates an empty mailbox.
  30584. err_t sys_mbox_new(sys_mbox_t *mbox, int size)
  30585. {
  30586. 800cebc: b510 push {r4, lr}
  30587. 800cebe: 4604 mov r4, r0
  30588. 800cec0: 4608 mov r0, r1
  30589. #if (osCMSIS < 0x20000U)
  30590. osMessageQDef(QUEUE, size, void *);
  30591. *mbox = osMessageCreate(osMessageQ(QUEUE), NULL);
  30592. #else
  30593. *mbox = osMessageQueueNew(size, sizeof(void *), NULL);
  30594. 800cec2: 2200 movs r2, #0
  30595. 800cec4: 2104 movs r1, #4
  30596. 800cec6: f7f7 f96d bl 80041a4 <osMessageQueueNew>
  30597. 800ceca: 6020 str r0, [r4, #0]
  30598. if(lwip_stats.sys.mbox.max < lwip_stats.sys.mbox.used)
  30599. {
  30600. lwip_stats.sys.mbox.max = lwip_stats.sys.mbox.used;
  30601. }
  30602. #endif /* SYS_STATS */
  30603. if(*mbox == NULL)
  30604. 800cecc: b108 cbz r0, 800ced2 <sys_mbox_new+0x16>
  30605. return ERR_MEM;
  30606. return ERR_OK;
  30607. 800cece: 2000 movs r0, #0
  30608. }
  30609. 800ced0: bd10 pop {r4, pc}
  30610. return ERR_MEM;
  30611. 800ced2: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30612. 800ced6: e7fb b.n 800ced0 <sys_mbox_new+0x14>
  30613. 0800ced8 <sys_mbox_free>:
  30614. Deallocates a mailbox. If there are messages still present in the
  30615. mailbox when the mailbox is deallocated, it is an indication of a
  30616. programming error in lwIP and the developer should be notified.
  30617. */
  30618. void sys_mbox_free(sys_mbox_t *mbox)
  30619. {
  30620. 800ced8: b510 push {r4, lr}
  30621. 800ceda: 4604 mov r4, r0
  30622. #if (osCMSIS < 0x20000U)
  30623. if(osMessageWaiting(*mbox))
  30624. #else
  30625. if(osMessageQueueGetCount(*mbox))
  30626. 800cedc: 6800 ldr r0, [r0, #0]
  30627. 800cede: f7f7 fa2c bl 800433a <osMessageQueueGetCount>
  30628. }
  30629. #if (osCMSIS < 0x20000U)
  30630. osMessageDelete(*mbox);
  30631. #else
  30632. osMessageQueueDelete(*mbox);
  30633. 800cee2: 6820 ldr r0, [r4, #0]
  30634. 800cee4: f7f7 fa36 bl 8004354 <osMessageQueueDelete>
  30635. #endif
  30636. #if SYS_STATS
  30637. --lwip_stats.sys.mbox.used;
  30638. #endif /* SYS_STATS */
  30639. }
  30640. 800cee8: bd10 pop {r4, pc}
  30641. 0800ceea <sys_mbox_trypost>:
  30642. /*-----------------------------------------------------------------------------------*/
  30643. // Try to post the "msg" to the mailbox.
  30644. err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
  30645. {
  30646. 800ceea: b500 push {lr}
  30647. 800ceec: b083 sub sp, #12
  30648. 800ceee: 9101 str r1, [sp, #4]
  30649. err_t result;
  30650. #if (osCMSIS < 0x20000U)
  30651. if(osMessagePut(*mbox, (uint32_t)msg, 0) == osOK)
  30652. #else
  30653. if(osMessageQueuePut(*mbox, &msg, 0, 0) == osOK)
  30654. 800cef0: 2300 movs r3, #0
  30655. 800cef2: 461a mov r2, r3
  30656. 800cef4: a901 add r1, sp, #4
  30657. 800cef6: 6800 ldr r0, [r0, #0]
  30658. 800cef8: f7f7 f9a0 bl 800423c <osMessageQueuePut>
  30659. 800cefc: b910 cbnz r0, 800cf04 <sys_mbox_trypost+0x1a>
  30660. lwip_stats.sys.mbox.err++;
  30661. #endif /* SYS_STATS */
  30662. }
  30663. return result;
  30664. }
  30665. 800cefe: b003 add sp, #12
  30666. 800cf00: f85d fb04 ldr.w pc, [sp], #4
  30667. result = ERR_MEM;
  30668. 800cf04: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30669. 800cf08: e7f9 b.n 800cefe <sys_mbox_trypost+0x14>
  30670. 0800cf0a <sys_arch_mbox_fetch>:
  30671. Note that a function with a similar name, sys_mbox_fetch(), is
  30672. implemented by lwIP.
  30673. */
  30674. u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout)
  30675. {
  30676. 800cf0a: b5f8 push {r3, r4, r5, r6, r7, lr}
  30677. 800cf0c: 4606 mov r6, r0
  30678. 800cf0e: 460f mov r7, r1
  30679. 800cf10: 4615 mov r5, r2
  30680. #if (osCMSIS < 0x20000U)
  30681. osEvent event;
  30682. uint32_t starttime = osKernelSysTick();
  30683. #else
  30684. osStatus_t status;
  30685. uint32_t starttime = osKernelGetTickCount();
  30686. 800cf12: f7f6 ff57 bl 8003dc4 <osKernelGetTickCount>
  30687. 800cf16: 4604 mov r4, r0
  30688. #endif
  30689. if(timeout != 0)
  30690. 800cf18: b16d cbz r5, 800cf36 <sys_arch_mbox_fetch+0x2c>
  30691. {
  30692. *msg = (void *)event.value.v;
  30693. return (osKernelSysTick() - starttime);
  30694. }
  30695. #else
  30696. status = osMessageQueueGet(*mbox, msg, 0, timeout);
  30697. 800cf1a: 462b mov r3, r5
  30698. 800cf1c: 2200 movs r2, #0
  30699. 800cf1e: 4639 mov r1, r7
  30700. 800cf20: 6830 ldr r0, [r6, #0]
  30701. 800cf22: f7f7 f9cb bl 80042bc <osMessageQueueGet>
  30702. if (status == osOK)
  30703. 800cf26: b110 cbz r0, 800cf2e <sys_arch_mbox_fetch+0x24>
  30704. return (osKernelGetTickCount() - starttime);
  30705. }
  30706. #endif
  30707. else
  30708. {
  30709. return SYS_ARCH_TIMEOUT;
  30710. 800cf28: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30711. #else
  30712. osMessageQueueGet(*mbox, msg, 0, osWaitForever );
  30713. return (osKernelGetTickCount() - starttime);
  30714. #endif
  30715. }
  30716. }
  30717. 800cf2c: bdf8 pop {r3, r4, r5, r6, r7, pc}
  30718. return (osKernelGetTickCount() - starttime);
  30719. 800cf2e: f7f6 ff49 bl 8003dc4 <osKernelGetTickCount>
  30720. 800cf32: 1b00 subs r0, r0, r4
  30721. 800cf34: e7fa b.n 800cf2c <sys_arch_mbox_fetch+0x22>
  30722. osMessageQueueGet(*mbox, msg, 0, osWaitForever );
  30723. 800cf36: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
  30724. 800cf3a: 2200 movs r2, #0
  30725. 800cf3c: 4639 mov r1, r7
  30726. 800cf3e: 6830 ldr r0, [r6, #0]
  30727. 800cf40: f7f7 f9bc bl 80042bc <osMessageQueueGet>
  30728. return (osKernelGetTickCount() - starttime);
  30729. 800cf44: f7f6 ff3e bl 8003dc4 <osKernelGetTickCount>
  30730. 800cf48: 1b00 subs r0, r0, r4
  30731. 800cf4a: e7ef b.n 800cf2c <sys_arch_mbox_fetch+0x22>
  30732. 0800cf4c <sys_arch_mbox_tryfetch>:
  30733. /*
  30734. Similar to sys_arch_mbox_fetch, but if message is not ready immediately, we'll
  30735. return with SYS_MBOX_EMPTY. On success, 0 is returned.
  30736. */
  30737. u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
  30738. {
  30739. 800cf4c: b508 push {r3, lr}
  30740. if(event.status == osEventMessage)
  30741. {
  30742. *msg = (void *)event.value.v;
  30743. #else
  30744. if (osMessageQueueGet(*mbox, msg, 0, 0) == osOK)
  30745. 800cf4e: 2300 movs r3, #0
  30746. 800cf50: 461a mov r2, r3
  30747. 800cf52: 6800 ldr r0, [r0, #0]
  30748. 800cf54: f7f7 f9b2 bl 80042bc <osMessageQueueGet>
  30749. 800cf58: b900 cbnz r0, 800cf5c <sys_arch_mbox_tryfetch+0x10>
  30750. }
  30751. else
  30752. {
  30753. return SYS_MBOX_EMPTY;
  30754. }
  30755. }
  30756. 800cf5a: bd08 pop {r3, pc}
  30757. return SYS_MBOX_EMPTY;
  30758. 800cf5c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30759. 800cf60: e7fb b.n 800cf5a <sys_arch_mbox_tryfetch+0xe>
  30760. 0800cf62 <sys_mbox_valid>:
  30761. /*----------------------------------------------------------------------------------*/
  30762. int sys_mbox_valid(sys_mbox_t *mbox)
  30763. {
  30764. if (*mbox == SYS_MBOX_NULL)
  30765. 800cf62: 6803 ldr r3, [r0, #0]
  30766. 800cf64: b10b cbz r3, 800cf6a <sys_mbox_valid+0x8>
  30767. return 0;
  30768. else
  30769. return 1;
  30770. 800cf66: 2001 movs r0, #1
  30771. }
  30772. 800cf68: 4770 bx lr
  30773. return 0;
  30774. 800cf6a: 2000 movs r0, #0
  30775. 800cf6c: 4770 bx lr
  30776. 0800cf6e <sys_mbox_set_invalid>:
  30777. /*-----------------------------------------------------------------------------------*/
  30778. void sys_mbox_set_invalid(sys_mbox_t *mbox)
  30779. {
  30780. *mbox = SYS_MBOX_NULL;
  30781. 800cf6e: 2300 movs r3, #0
  30782. 800cf70: 6003 str r3, [r0, #0]
  30783. }
  30784. 800cf72: 4770 bx lr
  30785. 0800cf74 <sys_sem_new>:
  30786. /*-----------------------------------------------------------------------------------*/
  30787. // Creates a new semaphore. The "count" argument specifies
  30788. // the initial state of the semaphore.
  30789. err_t sys_sem_new(sys_sem_t *sem, u8_t count)
  30790. {
  30791. 800cf74: b538 push {r3, r4, r5, lr}
  30792. 800cf76: 4604 mov r4, r0
  30793. 800cf78: 460d mov r5, r1
  30794. #if (osCMSIS < 0x20000U)
  30795. osSemaphoreDef(SEM);
  30796. *sem = osSemaphoreCreate (osSemaphore(SEM), 1);
  30797. #else
  30798. *sem = osSemaphoreNew(UINT16_MAX, count, NULL);
  30799. 800cf7a: 2200 movs r2, #0
  30800. 800cf7c: f64f 70ff movw r0, #65535 @ 0xffff
  30801. 800cf80: f7f7 f83e bl 8004000 <osSemaphoreNew>
  30802. 800cf84: 6020 str r0, [r4, #0]
  30803. #endif
  30804. if(*sem == NULL)
  30805. 800cf86: b138 cbz r0, 800cf98 <sys_sem_new+0x24>
  30806. ++lwip_stats.sys.sem.err;
  30807. #endif /* SYS_STATS */
  30808. return ERR_MEM;
  30809. }
  30810. if(count == 0) // Means it can't be taken
  30811. 800cf88: b10d cbz r5, 800cf8e <sys_sem_new+0x1a>
  30812. if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) {
  30813. lwip_stats.sys.sem.max = lwip_stats.sys.sem.used;
  30814. }
  30815. #endif /* SYS_STATS */
  30816. return ERR_OK;
  30817. 800cf8a: 2000 movs r0, #0
  30818. }
  30819. 800cf8c: bd38 pop {r3, r4, r5, pc}
  30820. osSemaphoreAcquire(*sem, 0);
  30821. 800cf8e: 2100 movs r1, #0
  30822. 800cf90: f7f7 f892 bl 80040b8 <osSemaphoreAcquire>
  30823. return ERR_OK;
  30824. 800cf94: 2000 movs r0, #0
  30825. 800cf96: e7f9 b.n 800cf8c <sys_sem_new+0x18>
  30826. return ERR_MEM;
  30827. 800cf98: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30828. 800cf9c: e7f6 b.n 800cf8c <sys_sem_new+0x18>
  30829. 0800cf9e <sys_arch_sem_wait>:
  30830. Notice that lwIP implements a function with a similar name,
  30831. sys_sem_wait(), that uses the sys_arch_sem_wait() function.
  30832. */
  30833. u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
  30834. {
  30835. 800cf9e: b570 push {r4, r5, r6, lr}
  30836. 800cfa0: 4604 mov r4, r0
  30837. 800cfa2: 460e mov r6, r1
  30838. #if (osCMSIS < 0x20000U)
  30839. uint32_t starttime = osKernelSysTick();
  30840. #else
  30841. uint32_t starttime = osKernelGetTickCount();
  30842. 800cfa4: f7f6 ff0e bl 8003dc4 <osKernelGetTickCount>
  30843. 800cfa8: 4605 mov r5, r0
  30844. #endif
  30845. if(timeout != 0)
  30846. 800cfaa: b956 cbnz r6, 800cfc2 <sys_arch_sem_wait+0x24>
  30847. {
  30848. #if (osCMSIS < 0x20000U)
  30849. while(osSemaphoreWait (*sem, osWaitForever) != osOK);
  30850. return (osKernelSysTick() - starttime);
  30851. #else
  30852. while(osSemaphoreAcquire(*sem, osWaitForever) != osOK);
  30853. 800cfac: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
  30854. 800cfb0: 6820 ldr r0, [r4, #0]
  30855. 800cfb2: f7f7 f881 bl 80040b8 <osSemaphoreAcquire>
  30856. 800cfb6: 2800 cmp r0, #0
  30857. 800cfb8: d1f8 bne.n 800cfac <sys_arch_sem_wait+0xe>
  30858. return (osKernelGetTickCount() - starttime);
  30859. 800cfba: f7f6 ff03 bl 8003dc4 <osKernelGetTickCount>
  30860. 800cfbe: 1b40 subs r0, r0, r5
  30861. #endif
  30862. }
  30863. }
  30864. 800cfc0: bd70 pop {r4, r5, r6, pc}
  30865. if(osSemaphoreAcquire(*sem, timeout) == osOK)
  30866. 800cfc2: 4631 mov r1, r6
  30867. 800cfc4: 6820 ldr r0, [r4, #0]
  30868. 800cfc6: f7f7 f877 bl 80040b8 <osSemaphoreAcquire>
  30869. 800cfca: b110 cbz r0, 800cfd2 <sys_arch_sem_wait+0x34>
  30870. return SYS_ARCH_TIMEOUT;
  30871. 800cfcc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30872. 800cfd0: e7f6 b.n 800cfc0 <sys_arch_sem_wait+0x22>
  30873. return (osKernelGetTickCount() - starttime);
  30874. 800cfd2: f7f6 fef7 bl 8003dc4 <osKernelGetTickCount>
  30875. 800cfd6: 1b40 subs r0, r0, r5
  30876. 800cfd8: e7f2 b.n 800cfc0 <sys_arch_sem_wait+0x22>
  30877. 0800cfda <sys_sem_signal>:
  30878. /*-----------------------------------------------------------------------------------*/
  30879. // Signals a semaphore
  30880. void sys_sem_signal(sys_sem_t *sem)
  30881. {
  30882. 800cfda: b508 push {r3, lr}
  30883. osSemaphoreRelease(*sem);
  30884. 800cfdc: 6800 ldr r0, [r0, #0]
  30885. 800cfde: f7f7 f89f bl 8004120 <osSemaphoreRelease>
  30886. }
  30887. 800cfe2: bd08 pop {r3, pc}
  30888. 0800cfe4 <sys_sem_free>:
  30889. /*-----------------------------------------------------------------------------------*/
  30890. // Deallocates a semaphore
  30891. void sys_sem_free(sys_sem_t *sem)
  30892. {
  30893. 800cfe4: b508 push {r3, lr}
  30894. #if SYS_STATS
  30895. --lwip_stats.sys.sem.used;
  30896. #endif /* SYS_STATS */
  30897. osSemaphoreDelete(*sem);
  30898. 800cfe6: 6800 ldr r0, [r0, #0]
  30899. 800cfe8: f7f7 f8c9 bl 800417e <osSemaphoreDelete>
  30900. }
  30901. 800cfec: bd08 pop {r3, pc}
  30902. 0800cfee <sys_sem_valid>:
  30903. /*-----------------------------------------------------------------------------------*/
  30904. int sys_sem_valid(sys_sem_t *sem)
  30905. {
  30906. if (*sem == SYS_SEM_NULL)
  30907. 800cfee: 6803 ldr r3, [r0, #0]
  30908. 800cff0: b10b cbz r3, 800cff6 <sys_sem_valid+0x8>
  30909. return 0;
  30910. else
  30911. return 1;
  30912. 800cff2: 2001 movs r0, #1
  30913. }
  30914. 800cff4: 4770 bx lr
  30915. return 0;
  30916. 800cff6: 2000 movs r0, #0
  30917. 800cff8: 4770 bx lr
  30918. 0800cffa <sys_sem_set_invalid>:
  30919. /*-----------------------------------------------------------------------------------*/
  30920. void sys_sem_set_invalid(sys_sem_t *sem)
  30921. {
  30922. *sem = SYS_SEM_NULL;
  30923. 800cffa: 2300 movs r3, #0
  30924. 800cffc: 6003 str r3, [r0, #0]
  30925. }
  30926. 800cffe: 4770 bx lr
  30927. 0800d000 <sys_init>:
  30928. #else
  30929. osMutexId_t lwip_sys_mutex;
  30930. #endif
  30931. // Initialize sys arch
  30932. void sys_init(void)
  30933. {
  30934. 800d000: b508 push {r3, lr}
  30935. #if (osCMSIS < 0x20000U)
  30936. lwip_sys_mutex = osMutexCreate(osMutex(lwip_sys_mutex));
  30937. #else
  30938. lwip_sys_mutex = osMutexNew(NULL);
  30939. 800d002: 2000 movs r0, #0
  30940. 800d004: f7f6 ff58 bl 8003eb8 <osMutexNew>
  30941. 800d008: 4b01 ldr r3, [pc, #4] @ (800d010 <sys_init+0x10>)
  30942. 800d00a: 6018 str r0, [r3, #0]
  30943. #endif
  30944. }
  30945. 800d00c: bd08 pop {r3, pc}
  30946. 800d00e: bf00 nop
  30947. 800d010: 24019bcc .word 0x24019bcc
  30948. 0800d014 <sys_mutex_new>:
  30949. /* Mutexes*/
  30950. /*-----------------------------------------------------------------------------------*/
  30951. /*-----------------------------------------------------------------------------------*/
  30952. #if LWIP_COMPAT_MUTEX == 0
  30953. /* Create a new mutex*/
  30954. err_t sys_mutex_new(sys_mutex_t *mutex) {
  30955. 800d014: b510 push {r4, lr}
  30956. 800d016: 4604 mov r4, r0
  30957. #if (osCMSIS < 0x20000U)
  30958. osMutexDef(MUTEX);
  30959. *mutex = osMutexCreate(osMutex(MUTEX));
  30960. #else
  30961. *mutex = osMutexNew(NULL);
  30962. 800d018: 2000 movs r0, #0
  30963. 800d01a: f7f6 ff4d bl 8003eb8 <osMutexNew>
  30964. 800d01e: 6020 str r0, [r4, #0]
  30965. #endif
  30966. if(*mutex == NULL)
  30967. 800d020: b108 cbz r0, 800d026 <sys_mutex_new+0x12>
  30968. ++lwip_stats.sys.mutex.used;
  30969. if (lwip_stats.sys.mutex.max < lwip_stats.sys.mutex.used) {
  30970. lwip_stats.sys.mutex.max = lwip_stats.sys.mutex.used;
  30971. }
  30972. #endif /* SYS_STATS */
  30973. return ERR_OK;
  30974. 800d022: 2000 movs r0, #0
  30975. }
  30976. 800d024: bd10 pop {r4, pc}
  30977. return ERR_MEM;
  30978. 800d026: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  30979. 800d02a: e7fb b.n 800d024 <sys_mutex_new+0x10>
  30980. 0800d02c <sys_mutex_lock>:
  30981. osMutexDelete(*mutex);
  30982. }
  30983. /*-----------------------------------------------------------------------------------*/
  30984. /* Lock a mutex*/
  30985. void sys_mutex_lock(sys_mutex_t *mutex)
  30986. {
  30987. 800d02c: b508 push {r3, lr}
  30988. #if (osCMSIS < 0x20000U)
  30989. osMutexWait(*mutex, osWaitForever);
  30990. #else
  30991. osMutexAcquire(*mutex, osWaitForever);
  30992. 800d02e: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
  30993. 800d032: 6800 ldr r0, [r0, #0]
  30994. 800d034: f7f6 ff8e bl 8003f54 <osMutexAcquire>
  30995. #endif
  30996. }
  30997. 800d038: bd08 pop {r3, pc}
  30998. 0800d03a <sys_mutex_unlock>:
  30999. /*-----------------------------------------------------------------------------------*/
  31000. /* Unlock a mutex*/
  31001. void sys_mutex_unlock(sys_mutex_t *mutex)
  31002. {
  31003. 800d03a: b508 push {r3, lr}
  31004. osMutexRelease(*mutex);
  31005. 800d03c: 6800 ldr r0, [r0, #0]
  31006. 800d03e: f7f6 ffb8 bl 8003fb2 <osMutexRelease>
  31007. }
  31008. 800d042: bd08 pop {r3, pc}
  31009. 0800d044 <sys_thread_new>:
  31010. function "thread()". The "arg" argument will be passed as an argument to the
  31011. thread() function. The id of the new thread is returned. Both the id and
  31012. the priority are system dependent.
  31013. */
  31014. sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread , void *arg, int stacksize, int prio)
  31015. {
  31016. 800d044: b5f0 push {r4, r5, r6, r7, lr}
  31017. 800d046: b08b sub sp, #44 @ 0x2c
  31018. 800d048: 4607 mov r7, r0
  31019. 800d04a: 460c mov r4, r1
  31020. 800d04c: 4615 mov r5, r2
  31021. 800d04e: 461e mov r6, r3
  31022. #if (osCMSIS < 0x20000U)
  31023. const osThreadDef_t os_thread_def = { (char *)name, (os_pthread)thread, (osPriority)prio, 0, stacksize};
  31024. return osThreadCreate(&os_thread_def, arg);
  31025. #else
  31026. const osThreadAttr_t attributes = {
  31027. 800d050: 2224 movs r2, #36 @ 0x24
  31028. 800d052: 2100 movs r1, #0
  31029. 800d054: a801 add r0, sp, #4
  31030. 800d056: f006 fb2f bl 80136b8 <memset>
  31031. 800d05a: 9701 str r7, [sp, #4]
  31032. 800d05c: 9606 str r6, [sp, #24]
  31033. 800d05e: 9b10 ldr r3, [sp, #64] @ 0x40
  31034. 800d060: 9307 str r3, [sp, #28]
  31035. .name = name,
  31036. .stack_size = stacksize,
  31037. .priority = (osPriority_t)prio,
  31038. };
  31039. return osThreadNew(thread, arg, &attributes);
  31040. 800d062: aa01 add r2, sp, #4
  31041. 800d064: 4629 mov r1, r5
  31042. 800d066: 4620 mov r0, r4
  31043. 800d068: f7f6 feb6 bl 8003dd8 <osThreadNew>
  31044. #endif
  31045. }
  31046. 800d06c: b00b add sp, #44 @ 0x2c
  31047. 800d06e: bdf0 pop {r4, r5, r6, r7, pc}
  31048. 0800d070 <sys_arch_protect>:
  31049. Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS
  31050. API is available
  31051. */
  31052. sys_prot_t sys_arch_protect(void)
  31053. {
  31054. 800d070: b508 push {r3, lr}
  31055. #if (osCMSIS < 0x20000U)
  31056. osMutexWait(lwip_sys_mutex, osWaitForever);
  31057. #else
  31058. osMutexAcquire(lwip_sys_mutex, osWaitForever);
  31059. 800d072: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
  31060. 800d076: 4b03 ldr r3, [pc, #12] @ (800d084 <sys_arch_protect+0x14>)
  31061. 800d078: 6818 ldr r0, [r3, #0]
  31062. 800d07a: f7f6 ff6b bl 8003f54 <osMutexAcquire>
  31063. #endif
  31064. return (sys_prot_t)1;
  31065. }
  31066. 800d07e: 2001 movs r0, #1
  31067. 800d080: bd08 pop {r3, pc}
  31068. 800d082: bf00 nop
  31069. 800d084: 24019bcc .word 0x24019bcc
  31070. 0800d088 <sys_arch_unprotect>:
  31071. Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS
  31072. API is available
  31073. */
  31074. void sys_arch_unprotect(sys_prot_t pval)
  31075. {
  31076. 800d088: b508 push {r3, lr}
  31077. ( void ) pval;
  31078. osMutexRelease(lwip_sys_mutex);
  31079. 800d08a: 4b02 ldr r3, [pc, #8] @ (800d094 <sys_arch_unprotect+0xc>)
  31080. 800d08c: 6818 ldr r0, [r3, #0]
  31081. 800d08e: f7f6 ff90 bl 8003fb2 <osMutexRelease>
  31082. }
  31083. 800d092: bd08 pop {r3, pc}
  31084. 800d094: 24019bcc .word 0x24019bcc
  31085. 0800d098 <tcp_new_port>:
  31086. */
  31087. static u16_t
  31088. tcp_new_port(void)
  31089. {
  31090. u8_t i;
  31091. u16_t n = 0;
  31092. 800d098: f04f 0c00 mov.w ip, #0
  31093. 800d09c: e00b b.n 800d0b6 <tcp_new_port+0x1e>
  31094. struct tcp_pcb *pcb;
  31095. again:
  31096. tcp_port++;
  31097. if (tcp_port == TCP_LOCAL_PORT_RANGE_END) {
  31098. tcp_port = TCP_LOCAL_PORT_RANGE_START;
  31099. 800d09e: 4b16 ldr r3, [pc, #88] @ (800d0f8 <tcp_new_port+0x60>)
  31100. 800d0a0: f44f 4240 mov.w r2, #49152 @ 0xc000
  31101. 800d0a4: 801a strh r2, [r3, #0]
  31102. 800d0a6: e00f b.n 800d0c8 <tcp_new_port+0x30>
  31103. }
  31104. /* Check all PCB lists. */
  31105. for (i = 0; i < NUM_TCP_PCB_LISTS; i++) {
  31106. for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) {
  31107. if (pcb->local_port == tcp_port) {
  31108. n++;
  31109. 800d0a8: f10c 0c01 add.w ip, ip, #1
  31110. 800d0ac: fa1f fc8c uxth.w ip, ip
  31111. if (n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) {
  31112. 800d0b0: f5bc 4f80 cmp.w ip, #16384 @ 0x4000
  31113. 800d0b4: d21d bcs.n 800d0f2 <tcp_new_port+0x5a>
  31114. tcp_port++;
  31115. 800d0b6: 4a10 ldr r2, [pc, #64] @ (800d0f8 <tcp_new_port+0x60>)
  31116. 800d0b8: 8813 ldrh r3, [r2, #0]
  31117. 800d0ba: 3301 adds r3, #1
  31118. 800d0bc: b29b uxth r3, r3
  31119. 800d0be: 8013 strh r3, [r2, #0]
  31120. if (tcp_port == TCP_LOCAL_PORT_RANGE_END) {
  31121. 800d0c0: f64f 72ff movw r2, #65535 @ 0xffff
  31122. 800d0c4: 4293 cmp r3, r2
  31123. 800d0c6: d0ea beq.n 800d09e <tcp_new_port+0x6>
  31124. for (i = 0; i < NUM_TCP_PCB_LISTS; i++) {
  31125. 800d0c8: 2000 movs r0, #0
  31126. 800d0ca: 2803 cmp r0, #3
  31127. 800d0cc: d80e bhi.n 800d0ec <tcp_new_port+0x54>
  31128. for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) {
  31129. 800d0ce: 4b0b ldr r3, [pc, #44] @ (800d0fc <tcp_new_port+0x64>)
  31130. 800d0d0: f853 3020 ldr.w r3, [r3, r0, lsl #2]
  31131. 800d0d4: 681b ldr r3, [r3, #0]
  31132. 800d0d6: b133 cbz r3, 800d0e6 <tcp_new_port+0x4e>
  31133. if (pcb->local_port == tcp_port) {
  31134. 800d0d8: 8ad9 ldrh r1, [r3, #22]
  31135. 800d0da: 4a07 ldr r2, [pc, #28] @ (800d0f8 <tcp_new_port+0x60>)
  31136. 800d0dc: 8812 ldrh r2, [r2, #0]
  31137. 800d0de: 4291 cmp r1, r2
  31138. 800d0e0: d0e2 beq.n 800d0a8 <tcp_new_port+0x10>
  31139. for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) {
  31140. 800d0e2: 68db ldr r3, [r3, #12]
  31141. 800d0e4: e7f7 b.n 800d0d6 <tcp_new_port+0x3e>
  31142. for (i = 0; i < NUM_TCP_PCB_LISTS; i++) {
  31143. 800d0e6: 3001 adds r0, #1
  31144. 800d0e8: b2c0 uxtb r0, r0
  31145. 800d0ea: e7ee b.n 800d0ca <tcp_new_port+0x32>
  31146. }
  31147. goto again;
  31148. }
  31149. }
  31150. }
  31151. return tcp_port;
  31152. 800d0ec: 4b02 ldr r3, [pc, #8] @ (800d0f8 <tcp_new_port+0x60>)
  31153. 800d0ee: 8818 ldrh r0, [r3, #0]
  31154. 800d0f0: 4770 bx lr
  31155. return 0;
  31156. 800d0f2: 2000 movs r0, #0
  31157. }
  31158. 800d0f4: 4770 bx lr
  31159. 800d0f6: bf00 nop
  31160. 800d0f8: 2400002c .word 0x2400002c
  31161. 800d0fc: 08016c3c .word 0x08016c3c
  31162. 0800d100 <tcp_remove_listener>:
  31163. {
  31164. 800d100: b538 push {r3, r4, r5, lr}
  31165. 800d102: 4604 mov r4, r0
  31166. LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL);
  31167. 800d104: 460d mov r5, r1
  31168. 800d106: b939 cbnz r1, 800d118 <tcp_remove_listener+0x18>
  31169. 800d108: 4b07 ldr r3, [pc, #28] @ (800d128 <tcp_remove_listener+0x28>)
  31170. 800d10a: 22ff movs r2, #255 @ 0xff
  31171. 800d10c: 4907 ldr r1, [pc, #28] @ (800d12c <tcp_remove_listener+0x2c>)
  31172. 800d10e: 4808 ldr r0, [pc, #32] @ (800d130 <tcp_remove_listener+0x30>)
  31173. 800d110: f006 f97a bl 8013408 <iprintf>
  31174. 800d114: e000 b.n 800d118 <tcp_remove_listener+0x18>
  31175. for (pcb = list; pcb != NULL; pcb = pcb->next) {
  31176. 800d116: 68e4 ldr r4, [r4, #12]
  31177. 800d118: b12c cbz r4, 800d126 <tcp_remove_listener+0x26>
  31178. if (pcb->listener == lpcb) {
  31179. 800d11a: 6fe3 ldr r3, [r4, #124] @ 0x7c
  31180. 800d11c: 42ab cmp r3, r5
  31181. 800d11e: d1fa bne.n 800d116 <tcp_remove_listener+0x16>
  31182. pcb->listener = NULL;
  31183. 800d120: 2300 movs r3, #0
  31184. 800d122: 67e3 str r3, [r4, #124] @ 0x7c
  31185. 800d124: e7f7 b.n 800d116 <tcp_remove_listener+0x16>
  31186. }
  31187. 800d126: bd38 pop {r3, r4, r5, pc}
  31188. 800d128: 080165b0 .word 0x080165b0
  31189. 800d12c: 08016610 .word 0x08016610
  31190. 800d130: 080144e8 .word 0x080144e8
  31191. 0800d134 <tcp_listen_closed>:
  31192. {
  31193. 800d134: b538 push {r3, r4, r5, lr}
  31194. LWIP_ASSERT("pcb != NULL", pcb != NULL);
  31195. 800d136: 4605 mov r5, r0
  31196. 800d138: b120 cbz r0, 800d144 <tcp_listen_closed+0x10>
  31197. LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
  31198. 800d13a: 7d2b ldrb r3, [r5, #20]
  31199. 800d13c: 2b01 cmp r3, #1
  31200. 800d13e: d109 bne.n 800d154 <tcp_listen_closed+0x20>
  31201. {
  31202. 800d140: 2401 movs r4, #1
  31203. 800d142: e017 b.n 800d174 <tcp_listen_closed+0x40>
  31204. LWIP_ASSERT("pcb != NULL", pcb != NULL);
  31205. 800d144: 4b0d ldr r3, [pc, #52] @ (800d17c <tcp_listen_closed+0x48>)
  31206. 800d146: f240 1211 movw r2, #273 @ 0x111
  31207. 800d14a: 490d ldr r1, [pc, #52] @ (800d180 <tcp_listen_closed+0x4c>)
  31208. 800d14c: 480d ldr r0, [pc, #52] @ (800d184 <tcp_listen_closed+0x50>)
  31209. 800d14e: f006 f95b bl 8013408 <iprintf>
  31210. 800d152: e7f2 b.n 800d13a <tcp_listen_closed+0x6>
  31211. LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN);
  31212. 800d154: 4b09 ldr r3, [pc, #36] @ (800d17c <tcp_listen_closed+0x48>)
  31213. 800d156: f44f 7289 mov.w r2, #274 @ 0x112
  31214. 800d15a: 490b ldr r1, [pc, #44] @ (800d188 <tcp_listen_closed+0x54>)
  31215. 800d15c: 4809 ldr r0, [pc, #36] @ (800d184 <tcp_listen_closed+0x50>)
  31216. 800d15e: f006 f953 bl 8013408 <iprintf>
  31217. 800d162: e7ed b.n 800d140 <tcp_listen_closed+0xc>
  31218. tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb);
  31219. 800d164: 4b09 ldr r3, [pc, #36] @ (800d18c <tcp_listen_closed+0x58>)
  31220. 800d166: f853 3024 ldr.w r3, [r3, r4, lsl #2]
  31221. 800d16a: 4629 mov r1, r5
  31222. 800d16c: 6818 ldr r0, [r3, #0]
  31223. 800d16e: f7ff ffc7 bl 800d100 <tcp_remove_listener>
  31224. for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) {
  31225. 800d172: 3401 adds r4, #1
  31226. 800d174: 2c03 cmp r4, #3
  31227. 800d176: d9f5 bls.n 800d164 <tcp_listen_closed+0x30>
  31228. }
  31229. 800d178: bd38 pop {r3, r4, r5, pc}
  31230. 800d17a: bf00 nop
  31231. 800d17c: 080165b0 .word 0x080165b0
  31232. 800d180: 08016638 .word 0x08016638
  31233. 800d184: 080144e8 .word 0x080144e8
  31234. 800d188: 08016644 .word 0x08016644
  31235. 800d18c: 08016c3c .word 0x08016c3c
  31236. 0800d190 <tcp_free_listen>:
  31237. {
  31238. 800d190: b510 push {r4, lr}
  31239. 800d192: 4604 mov r4, r0
  31240. LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
  31241. 800d194: 7d03 ldrb r3, [r0, #20]
  31242. 800d196: 2b01 cmp r3, #1
  31243. 800d198: d004 beq.n 800d1a4 <tcp_free_listen+0x14>
  31244. memp_free(MEMP_TCP_PCB_LISTEN, pcb);
  31245. 800d19a: 4621 mov r1, r4
  31246. 800d19c: 2002 movs r0, #2
  31247. 800d19e: f7fe fa67 bl 800b670 <memp_free>
  31248. }
  31249. 800d1a2: bd10 pop {r4, pc}
  31250. LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN);
  31251. 800d1a4: 4b03 ldr r3, [pc, #12] @ (800d1b4 <tcp_free_listen+0x24>)
  31252. 800d1a6: 22df movs r2, #223 @ 0xdf
  31253. 800d1a8: 4903 ldr r1, [pc, #12] @ (800d1b8 <tcp_free_listen+0x28>)
  31254. 800d1aa: 4804 ldr r0, [pc, #16] @ (800d1bc <tcp_free_listen+0x2c>)
  31255. 800d1ac: f006 f92c bl 8013408 <iprintf>
  31256. 800d1b0: e7f3 b.n 800d19a <tcp_free_listen+0xa>
  31257. 800d1b2: bf00 nop
  31258. 800d1b4: 080165b0 .word 0x080165b0
  31259. 800d1b8: 0801665c .word 0x0801665c
  31260. 800d1bc: 080144e8 .word 0x080144e8
  31261. 0800d1c0 <tcp_close_shutdown_fin>:
  31262. {
  31263. 800d1c0: b538 push {r3, r4, r5, lr}
  31264. LWIP_ASSERT("pcb != NULL", pcb != NULL);
  31265. 800d1c2: 4604 mov r4, r0
  31266. 800d1c4: b148 cbz r0, 800d1da <tcp_close_shutdown_fin+0x1a>
  31267. switch (pcb->state) {
  31268. 800d1c6: 7d23 ldrb r3, [r4, #20]
  31269. 800d1c8: 2b04 cmp r3, #4
  31270. 800d1ca: d019 beq.n 800d200 <tcp_close_shutdown_fin+0x40>
  31271. 800d1cc: 2b07 cmp r3, #7
  31272. 800d1ce: d01f beq.n 800d210 <tcp_close_shutdown_fin+0x50>
  31273. 800d1d0: 2b03 cmp r3, #3
  31274. 800d1d2: d00a beq.n 800d1ea <tcp_close_shutdown_fin+0x2a>
  31275. 800d1d4: 2500 movs r5, #0
  31276. }
  31277. 800d1d6: 4628 mov r0, r5
  31278. 800d1d8: bd38 pop {r3, r4, r5, pc}
  31279. LWIP_ASSERT("pcb != NULL", pcb != NULL);
  31280. 800d1da: 4b16 ldr r3, [pc, #88] @ (800d234 <tcp_close_shutdown_fin+0x74>)
  31281. 800d1dc: f44f 72ce mov.w r2, #412 @ 0x19c
  31282. 800d1e0: 4915 ldr r1, [pc, #84] @ (800d238 <tcp_close_shutdown_fin+0x78>)
  31283. 800d1e2: 4816 ldr r0, [pc, #88] @ (800d23c <tcp_close_shutdown_fin+0x7c>)
  31284. 800d1e4: f006 f910 bl 8013408 <iprintf>
  31285. 800d1e8: e7ed b.n 800d1c6 <tcp_close_shutdown_fin+0x6>
  31286. err = tcp_send_fin(pcb);
  31287. 800d1ea: 4620 mov r0, r4
  31288. 800d1ec: f003 fcb4 bl 8010b58 <tcp_send_fin>
  31289. if (err == ERR_OK) {
  31290. 800d1f0: 4605 mov r5, r0
  31291. 800d1f2: b9a8 cbnz r0, 800d220 <tcp_close_shutdown_fin+0x60>
  31292. pcb->state = FIN_WAIT_1;
  31293. 800d1f4: 2305 movs r3, #5
  31294. 800d1f6: 7523 strb r3, [r4, #20]
  31295. tcp_output(pcb);
  31296. 800d1f8: 4620 mov r0, r4
  31297. 800d1fa: f003 fe33 bl 8010e64 <tcp_output>
  31298. 800d1fe: e7ea b.n 800d1d6 <tcp_close_shutdown_fin+0x16>
  31299. err = tcp_send_fin(pcb);
  31300. 800d200: 4620 mov r0, r4
  31301. 800d202: f003 fca9 bl 8010b58 <tcp_send_fin>
  31302. if (err == ERR_OK) {
  31303. 800d206: 4605 mov r5, r0
  31304. 800d208: b950 cbnz r0, 800d220 <tcp_close_shutdown_fin+0x60>
  31305. pcb->state = FIN_WAIT_1;
  31306. 800d20a: 2305 movs r3, #5
  31307. 800d20c: 7523 strb r3, [r4, #20]
  31308. if (err == ERR_OK) {
  31309. 800d20e: e7f3 b.n 800d1f8 <tcp_close_shutdown_fin+0x38>
  31310. err = tcp_send_fin(pcb);
  31311. 800d210: 4620 mov r0, r4
  31312. 800d212: f003 fca1 bl 8010b58 <tcp_send_fin>
  31313. if (err == ERR_OK) {
  31314. 800d216: 4605 mov r5, r0
  31315. 800d218: b910 cbnz r0, 800d220 <tcp_close_shutdown_fin+0x60>
  31316. pcb->state = LAST_ACK;
  31317. 800d21a: 2309 movs r3, #9
  31318. 800d21c: 7523 strb r3, [r4, #20]
  31319. if (err == ERR_OK) {
  31320. 800d21e: e7eb b.n 800d1f8 <tcp_close_shutdown_fin+0x38>
  31321. } else if (err == ERR_MEM) {
  31322. 800d220: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff
  31323. 800d224: d1d7 bne.n 800d1d6 <tcp_close_shutdown_fin+0x16>
  31324. tcp_set_flags(pcb, TF_CLOSEPEND);
  31325. 800d226: 8b63 ldrh r3, [r4, #26]
  31326. 800d228: f043 0308 orr.w r3, r3, #8
  31327. 800d22c: 8363 strh r3, [r4, #26]
  31328. return ERR_OK;
  31329. 800d22e: 2500 movs r5, #0
  31330. 800d230: e7d1 b.n 800d1d6 <tcp_close_shutdown_fin+0x16>
  31331. 800d232: bf00 nop
  31332. 800d234: 080165b0 .word 0x080165b0
  31333. 800d238: 08016638 .word 0x08016638
  31334. 800d23c: 080144e8 .word 0x080144e8
  31335. 0800d240 <tcp_handle_closepend>:
  31336. * OK for us to now free it.
  31337. */
  31338. static void
  31339. tcp_handle_closepend(void)
  31340. {
  31341. struct tcp_pcb *pcb = tcp_active_pcbs;
  31342. 800d240: 4b09 ldr r3, [pc, #36] @ (800d268 <tcp_handle_closepend+0x28>)
  31343. 800d242: 6818 ldr r0, [r3, #0]
  31344. while (pcb != NULL) {
  31345. 800d244: b178 cbz r0, 800d266 <tcp_handle_closepend+0x26>
  31346. {
  31347. 800d246: b510 push {r4, lr}
  31348. 800d248: e001 b.n 800d24e <tcp_handle_closepend+0xe>
  31349. 800d24a: 4620 mov r0, r4
  31350. while (pcb != NULL) {
  31351. 800d24c: b154 cbz r4, 800d264 <tcp_handle_closepend+0x24>
  31352. struct tcp_pcb *next = pcb->next;
  31353. 800d24e: 68c4 ldr r4, [r0, #12]
  31354. /* send pending FIN */
  31355. if (pcb->flags & TF_CLOSEPEND) {
  31356. 800d250: 8b43 ldrh r3, [r0, #26]
  31357. 800d252: f013 0f08 tst.w r3, #8
  31358. 800d256: d0f8 beq.n 800d24a <tcp_handle_closepend+0xa>
  31359. LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n"));
  31360. tcp_clear_flags(pcb, TF_CLOSEPEND);
  31361. 800d258: f023 0308 bic.w r3, r3, #8
  31362. 800d25c: 8343 strh r3, [r0, #26]
  31363. tcp_close_shutdown_fin(pcb);
  31364. 800d25e: f7ff ffaf bl 800d1c0 <tcp_close_shutdown_fin>
  31365. 800d262: e7f2 b.n 800d24a <tcp_handle_closepend+0xa>
  31366. }
  31367. pcb = next;
  31368. }
  31369. }
  31370. 800d264: bd10 pop {r4, pc}
  31371. 800d266: 4770 bx lr
  31372. 800d268: 24019bd8 .word 0x24019bd8
  31373. 0800d26c <tcp_init>:
  31374. {
  31375. 800d26c: b508 push {r3, lr}
  31376. tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
  31377. 800d26e: f005 ff1f bl 80130b0 <rand>
  31378. 800d272: 4b02 ldr r3, [pc, #8] @ (800d27c <tcp_init+0x10>)
  31379. 800d274: 4303 orrs r3, r0
  31380. 800d276: 4a02 ldr r2, [pc, #8] @ (800d280 <tcp_init+0x14>)
  31381. 800d278: 8013 strh r3, [r2, #0]
  31382. }
  31383. 800d27a: bd08 pop {r3, pc}
  31384. 800d27c: ffffc000 .word 0xffffc000
  31385. 800d280: 2400002c .word 0x2400002c
  31386. 0800d284 <tcp_free>:
  31387. {
  31388. 800d284: b510 push {r4, lr}
  31389. 800d286: 4604 mov r4, r0
  31390. LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
  31391. 800d288: 7d03 ldrb r3, [r0, #20]
  31392. 800d28a: 2b01 cmp r3, #1
  31393. 800d28c: d004 beq.n 800d298 <tcp_free+0x14>
  31394. memp_free(MEMP_TCP_PCB, pcb);
  31395. 800d28e: 4621 mov r1, r4
  31396. 800d290: 2001 movs r0, #1
  31397. 800d292: f7fe f9ed bl 800b670 <memp_free>
  31398. }
  31399. 800d296: bd10 pop {r4, pc}
  31400. LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN);
  31401. 800d298: 4b03 ldr r3, [pc, #12] @ (800d2a8 <tcp_free+0x24>)
  31402. 800d29a: 22d4 movs r2, #212 @ 0xd4
  31403. 800d29c: 4903 ldr r1, [pc, #12] @ (800d2ac <tcp_free+0x28>)
  31404. 800d29e: 4804 ldr r0, [pc, #16] @ (800d2b0 <tcp_free+0x2c>)
  31405. 800d2a0: f006 f8b2 bl 8013408 <iprintf>
  31406. 800d2a4: e7f3 b.n 800d28e <tcp_free+0xa>
  31407. 800d2a6: bf00 nop
  31408. 800d2a8: 080165b0 .word 0x080165b0
  31409. 800d2ac: 08016678 .word 0x08016678
  31410. 800d2b0: 080144e8 .word 0x080144e8
  31411. 0800d2b4 <tcp_update_rcv_ann_wnd>:
  31412. {
  31413. 800d2b4: b538 push {r3, r4, r5, lr}
  31414. LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
  31415. 800d2b6: 4604 mov r4, r0
  31416. 800d2b8: b198 cbz r0, 800d2e2 <tcp_update_rcv_ann_wnd+0x2e>
  31417. new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd;
  31418. 800d2ba: 6a65 ldr r5, [r4, #36] @ 0x24
  31419. 800d2bc: 8d21 ldrh r1, [r4, #40] @ 0x28
  31420. 800d2be: 1868 adds r0, r5, r1
  31421. if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) {
  31422. 800d2c0: 6ae2 ldr r2, [r4, #44] @ 0x2c
  31423. 800d2c2: f8b4 e032 ldrh.w lr, [r4, #50] @ 0x32
  31424. 800d2c6: f640 3c68 movw ip, #2920 @ 0xb68
  31425. 800d2ca: 45e6 cmp lr, ip
  31426. 800d2cc: bf94 ite ls
  31427. 800d2ce: eb02 030e addls.w r3, r2, lr
  31428. 800d2d2: eb02 030c addhi.w r3, r2, ip
  31429. 800d2d6: 1ac3 subs r3, r0, r3
  31430. 800d2d8: 2b00 cmp r3, #0
  31431. 800d2da: db0a blt.n 800d2f2 <tcp_update_rcv_ann_wnd+0x3e>
  31432. pcb->rcv_ann_wnd = pcb->rcv_wnd;
  31433. 800d2dc: 8561 strh r1, [r4, #42] @ 0x2a
  31434. return new_right_edge - pcb->rcv_ann_right_edge;
  31435. 800d2de: 1a80 subs r0, r0, r2
  31436. }
  31437. 800d2e0: bd38 pop {r3, r4, r5, pc}
  31438. LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL);
  31439. 800d2e2: 4b0e ldr r3, [pc, #56] @ (800d31c <tcp_update_rcv_ann_wnd+0x68>)
  31440. 800d2e4: f240 32a6 movw r2, #934 @ 0x3a6
  31441. 800d2e8: 490d ldr r1, [pc, #52] @ (800d320 <tcp_update_rcv_ann_wnd+0x6c>)
  31442. 800d2ea: 480e ldr r0, [pc, #56] @ (800d324 <tcp_update_rcv_ann_wnd+0x70>)
  31443. 800d2ec: f006 f88c bl 8013408 <iprintf>
  31444. 800d2f0: e7e3 b.n 800d2ba <tcp_update_rcv_ann_wnd+0x6>
  31445. if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) {
  31446. 800d2f2: 1aab subs r3, r5, r2
  31447. 800d2f4: 2b00 cmp r3, #0
  31448. 800d2f6: dd03 ble.n 800d300 <tcp_update_rcv_ann_wnd+0x4c>
  31449. pcb->rcv_ann_wnd = 0;
  31450. 800d2f8: 2300 movs r3, #0
  31451. 800d2fa: 8563 strh r3, [r4, #42] @ 0x2a
  31452. return 0;
  31453. 800d2fc: 2000 movs r0, #0
  31454. 800d2fe: e7ef b.n 800d2e0 <tcp_update_rcv_ann_wnd+0x2c>
  31455. u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt;
  31456. 800d300: 1b55 subs r5, r2, r5
  31457. LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
  31458. 800d302: f5b5 3f80 cmp.w r5, #65536 @ 0x10000
  31459. 800d306: d201 bcs.n 800d30c <tcp_update_rcv_ann_wnd+0x58>
  31460. pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd;
  31461. 800d308: 8565 strh r5, [r4, #42] @ 0x2a
  31462. 800d30a: e7f7 b.n 800d2fc <tcp_update_rcv_ann_wnd+0x48>
  31463. LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff);
  31464. 800d30c: 4b03 ldr r3, [pc, #12] @ (800d31c <tcp_update_rcv_ann_wnd+0x68>)
  31465. 800d30e: f240 32b6 movw r2, #950 @ 0x3b6
  31466. 800d312: 4905 ldr r1, [pc, #20] @ (800d328 <tcp_update_rcv_ann_wnd+0x74>)
  31467. 800d314: 4803 ldr r0, [pc, #12] @ (800d324 <tcp_update_rcv_ann_wnd+0x70>)
  31468. 800d316: f006 f877 bl 8013408 <iprintf>
  31469. 800d31a: e7f5 b.n 800d308 <tcp_update_rcv_ann_wnd+0x54>
  31470. 800d31c: 080165b0 .word 0x080165b0
  31471. 800d320: 0801668c .word 0x0801668c
  31472. 800d324: 080144e8 .word 0x080144e8
  31473. 800d328: 080166b0 .word 0x080166b0
  31474. 0800d32c <tcp_recved>:
  31475. {
  31476. 800d32c: b538 push {r3, r4, r5, lr}
  31477. 800d32e: 4604 mov r4, r0
  31478. 800d330: 460d mov r5, r1
  31479. LWIP_ASSERT_CORE_LOCKED();
  31480. 800d332: f7f6 fbeb bl 8003b0c <sys_check_core_locking>
  31481. LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return);
  31482. 800d336: b1b4 cbz r4, 800d366 <tcp_recved+0x3a>
  31483. LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
  31484. 800d338: 7d23 ldrb r3, [r4, #20]
  31485. 800d33a: 2b01 cmp r3, #1
  31486. 800d33c: d01b beq.n 800d376 <tcp_recved+0x4a>
  31487. rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len);
  31488. 800d33e: 8d23 ldrh r3, [r4, #40] @ 0x28
  31489. 800d340: 1959 adds r1, r3, r5
  31490. 800d342: b289 uxth r1, r1
  31491. if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) {
  31492. 800d344: f241 62d0 movw r2, #5840 @ 0x16d0
  31493. 800d348: 4291 cmp r1, r2
  31494. 800d34a: d801 bhi.n 800d350 <tcp_recved+0x24>
  31495. 800d34c: 428b cmp r3, r1
  31496. 800d34e: d91a bls.n 800d386 <tcp_recved+0x5a>
  31497. pcb->rcv_wnd = TCP_WND_MAX(pcb);
  31498. 800d350: f241 63d0 movw r3, #5840 @ 0x16d0
  31499. 800d354: 8523 strh r3, [r4, #40] @ 0x28
  31500. wnd_inflation = tcp_update_rcv_ann_wnd(pcb);
  31501. 800d356: 4620 mov r0, r4
  31502. 800d358: f7ff ffac bl 800d2b4 <tcp_update_rcv_ann_wnd>
  31503. if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) {
  31504. 800d35c: f240 53b3 movw r3, #1459 @ 0x5b3
  31505. 800d360: 4298 cmp r0, r3
  31506. 800d362: d812 bhi.n 800d38a <tcp_recved+0x5e>
  31507. }
  31508. 800d364: bd38 pop {r3, r4, r5, pc}
  31509. LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return);
  31510. 800d366: 4b0d ldr r3, [pc, #52] @ (800d39c <tcp_recved+0x70>)
  31511. 800d368: f240 32cf movw r2, #975 @ 0x3cf
  31512. 800d36c: 490c ldr r1, [pc, #48] @ (800d3a0 <tcp_recved+0x74>)
  31513. 800d36e: 480d ldr r0, [pc, #52] @ (800d3a4 <tcp_recved+0x78>)
  31514. 800d370: f006 f84a bl 8013408 <iprintf>
  31515. 800d374: e7f6 b.n 800d364 <tcp_recved+0x38>
  31516. LWIP_ASSERT("don't call tcp_recved for listen-pcbs",
  31517. 800d376: 4b09 ldr r3, [pc, #36] @ (800d39c <tcp_recved+0x70>)
  31518. 800d378: f240 32d2 movw r2, #978 @ 0x3d2
  31519. 800d37c: 490a ldr r1, [pc, #40] @ (800d3a8 <tcp_recved+0x7c>)
  31520. 800d37e: 4809 ldr r0, [pc, #36] @ (800d3a4 <tcp_recved+0x78>)
  31521. 800d380: f006 f842 bl 8013408 <iprintf>
  31522. 800d384: e7db b.n 800d33e <tcp_recved+0x12>
  31523. pcb->rcv_wnd = rcv_wnd;
  31524. 800d386: 8521 strh r1, [r4, #40] @ 0x28
  31525. 800d388: e7e5 b.n 800d356 <tcp_recved+0x2a>
  31526. tcp_ack_now(pcb);
  31527. 800d38a: 8b63 ldrh r3, [r4, #26]
  31528. 800d38c: f043 0302 orr.w r3, r3, #2
  31529. 800d390: 8363 strh r3, [r4, #26]
  31530. tcp_output(pcb);
  31531. 800d392: 4620 mov r0, r4
  31532. 800d394: f003 fd66 bl 8010e64 <tcp_output>
  31533. LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n",
  31534. 800d398: e7e4 b.n 800d364 <tcp_recved+0x38>
  31535. 800d39a: bf00 nop
  31536. 800d39c: 080165b0 .word 0x080165b0
  31537. 800d3a0: 080166cc .word 0x080166cc
  31538. 800d3a4: 080144e8 .word 0x080144e8
  31539. 800d3a8: 080166e4 .word 0x080166e4
  31540. 0800d3ac <tcp_seg_free>:
  31541. if (seg != NULL) {
  31542. 800d3ac: b150 cbz r0, 800d3c4 <tcp_seg_free+0x18>
  31543. {
  31544. 800d3ae: b510 push {r4, lr}
  31545. 800d3b0: 4604 mov r4, r0
  31546. if (seg->p != NULL) {
  31547. 800d3b2: 6840 ldr r0, [r0, #4]
  31548. 800d3b4: b108 cbz r0, 800d3ba <tcp_seg_free+0xe>
  31549. pbuf_free(seg->p);
  31550. 800d3b6: f7fe fcf3 bl 800bda0 <pbuf_free>
  31551. memp_free(MEMP_TCP_SEG, seg);
  31552. 800d3ba: 4621 mov r1, r4
  31553. 800d3bc: 2003 movs r0, #3
  31554. 800d3be: f7fe f957 bl 800b670 <memp_free>
  31555. }
  31556. 800d3c2: bd10 pop {r4, pc}
  31557. 800d3c4: 4770 bx lr
  31558. 0800d3c6 <tcp_segs_free>:
  31559. while (seg != NULL) {
  31560. 800d3c6: b138 cbz r0, 800d3d8 <tcp_segs_free+0x12>
  31561. {
  31562. 800d3c8: b510 push {r4, lr}
  31563. struct tcp_seg *next = seg->next;
  31564. 800d3ca: 6804 ldr r4, [r0, #0]
  31565. tcp_seg_free(seg);
  31566. 800d3cc: f7ff ffee bl 800d3ac <tcp_seg_free>
  31567. seg = next;
  31568. 800d3d0: 4620 mov r0, r4
  31569. while (seg != NULL) {
  31570. 800d3d2: 2c00 cmp r4, #0
  31571. 800d3d4: d1f9 bne.n 800d3ca <tcp_segs_free+0x4>
  31572. }
  31573. 800d3d6: bd10 pop {r4, pc}
  31574. 800d3d8: 4770 bx lr
  31575. ...
  31576. 0800d3dc <tcp_seg_copy>:
  31577. {
  31578. 800d3dc: b538 push {r3, r4, r5, lr}
  31579. LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);
  31580. 800d3de: 4605 mov r5, r0
  31581. 800d3e0: b198 cbz r0, 800d40a <tcp_seg_copy+0x2e>
  31582. cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG);
  31583. 800d3e2: 2003 movs r0, #3
  31584. 800d3e4: f7fe f90e bl 800b604 <memp_malloc>
  31585. if (cseg == NULL) {
  31586. 800d3e8: 4604 mov r4, r0
  31587. 800d3ea: b160 cbz r0, 800d406 <tcp_seg_copy+0x2a>
  31588. SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg));
  31589. 800d3ec: 682b ldr r3, [r5, #0]
  31590. 800d3ee: 6868 ldr r0, [r5, #4]
  31591. 800d3f0: 68a9 ldr r1, [r5, #8]
  31592. 800d3f2: 68ea ldr r2, [r5, #12]
  31593. 800d3f4: 6023 str r3, [r4, #0]
  31594. 800d3f6: 6060 str r0, [r4, #4]
  31595. 800d3f8: 60a1 str r1, [r4, #8]
  31596. 800d3fa: 60e2 str r2, [r4, #12]
  31597. 800d3fc: 692b ldr r3, [r5, #16]
  31598. 800d3fe: 6123 str r3, [r4, #16]
  31599. pbuf_ref(cseg->p);
  31600. 800d400: 6860 ldr r0, [r4, #4]
  31601. 800d402: f7fe fe5b bl 800c0bc <pbuf_ref>
  31602. }
  31603. 800d406: 4620 mov r0, r4
  31604. 800d408: bd38 pop {r3, r4, r5, pc}
  31605. LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL);
  31606. 800d40a: 4b04 ldr r3, [pc, #16] @ (800d41c <tcp_seg_copy+0x40>)
  31607. 800d40c: f240 6282 movw r2, #1666 @ 0x682
  31608. 800d410: 4903 ldr r1, [pc, #12] @ (800d420 <tcp_seg_copy+0x44>)
  31609. 800d412: 4804 ldr r0, [pc, #16] @ (800d424 <tcp_seg_copy+0x48>)
  31610. 800d414: f005 fff8 bl 8013408 <iprintf>
  31611. 800d418: e7e3 b.n 800d3e2 <tcp_seg_copy+0x6>
  31612. 800d41a: bf00 nop
  31613. 800d41c: 080165b0 .word 0x080165b0
  31614. 800d420: 0801670c .word 0x0801670c
  31615. 800d424: 080144e8 .word 0x080144e8
  31616. 0800d428 <tcp_arg>:
  31617. * @param pcb tcp_pcb to set the callback argument
  31618. * @param arg void pointer argument to pass to callback functions
  31619. */
  31620. void
  31621. tcp_arg(struct tcp_pcb *pcb, void *arg)
  31622. {
  31623. 800d428: b538 push {r3, r4, r5, lr}
  31624. 800d42a: 4604 mov r4, r0
  31625. 800d42c: 460d mov r5, r1
  31626. LWIP_ASSERT_CORE_LOCKED();
  31627. 800d42e: f7f6 fb6d bl 8003b0c <sys_check_core_locking>
  31628. /* This function is allowed to be called for both listen pcbs and
  31629. connection pcbs. */
  31630. if (pcb != NULL) {
  31631. 800d432: b104 cbz r4, 800d436 <tcp_arg+0xe>
  31632. pcb->callback_arg = arg;
  31633. 800d434: 6125 str r5, [r4, #16]
  31634. }
  31635. }
  31636. 800d436: bd38 pop {r3, r4, r5, pc}
  31637. 0800d438 <tcp_recv>:
  31638. * @param pcb tcp_pcb to set the recv callback
  31639. * @param recv callback function to call for this pcb when data is received
  31640. */
  31641. void
  31642. tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv)
  31643. {
  31644. 800d438: b538 push {r3, r4, r5, lr}
  31645. 800d43a: 4604 mov r4, r0
  31646. 800d43c: 460d mov r5, r1
  31647. LWIP_ASSERT_CORE_LOCKED();
  31648. 800d43e: f7f6 fb65 bl 8003b0c <sys_check_core_locking>
  31649. if (pcb != NULL) {
  31650. 800d442: b124 cbz r4, 800d44e <tcp_recv+0x16>
  31651. LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN);
  31652. 800d444: 7d23 ldrb r3, [r4, #20]
  31653. 800d446: 2b01 cmp r3, #1
  31654. 800d448: d002 beq.n 800d450 <tcp_recv+0x18>
  31655. pcb->recv = recv;
  31656. 800d44a: f8c4 5084 str.w r5, [r4, #132] @ 0x84
  31657. }
  31658. }
  31659. 800d44e: bd38 pop {r3, r4, r5, pc}
  31660. LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN);
  31661. 800d450: 4b03 ldr r3, [pc, #12] @ (800d460 <tcp_recv+0x28>)
  31662. 800d452: f240 72df movw r2, #2015 @ 0x7df
  31663. 800d456: 4903 ldr r1, [pc, #12] @ (800d464 <tcp_recv+0x2c>)
  31664. 800d458: 4803 ldr r0, [pc, #12] @ (800d468 <tcp_recv+0x30>)
  31665. 800d45a: f005 ffd5 bl 8013408 <iprintf>
  31666. 800d45e: e7f4 b.n 800d44a <tcp_recv+0x12>
  31667. 800d460: 080165b0 .word 0x080165b0
  31668. 800d464: 08016728 .word 0x08016728
  31669. 800d468: 080144e8 .word 0x080144e8
  31670. 0800d46c <tcp_sent>:
  31671. * @param pcb tcp_pcb to set the sent callback
  31672. * @param sent callback function to call for this pcb when data is successfully sent
  31673. */
  31674. void
  31675. tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent)
  31676. {
  31677. 800d46c: b538 push {r3, r4, r5, lr}
  31678. 800d46e: 4604 mov r4, r0
  31679. 800d470: 460d mov r5, r1
  31680. LWIP_ASSERT_CORE_LOCKED();
  31681. 800d472: f7f6 fb4b bl 8003b0c <sys_check_core_locking>
  31682. if (pcb != NULL) {
  31683. 800d476: b124 cbz r4, 800d482 <tcp_sent+0x16>
  31684. LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN);
  31685. 800d478: 7d23 ldrb r3, [r4, #20]
  31686. 800d47a: 2b01 cmp r3, #1
  31687. 800d47c: d002 beq.n 800d484 <tcp_sent+0x18>
  31688. pcb->sent = sent;
  31689. 800d47e: f8c4 5080 str.w r5, [r4, #128] @ 0x80
  31690. }
  31691. }
  31692. 800d482: bd38 pop {r3, r4, r5, pc}
  31693. LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN);
  31694. 800d484: 4b03 ldr r3, [pc, #12] @ (800d494 <tcp_sent+0x28>)
  31695. 800d486: f240 72f3 movw r2, #2035 @ 0x7f3
  31696. 800d48a: 4903 ldr r1, [pc, #12] @ (800d498 <tcp_sent+0x2c>)
  31697. 800d48c: 4803 ldr r0, [pc, #12] @ (800d49c <tcp_sent+0x30>)
  31698. 800d48e: f005 ffbb bl 8013408 <iprintf>
  31699. 800d492: e7f4 b.n 800d47e <tcp_sent+0x12>
  31700. 800d494: 080165b0 .word 0x080165b0
  31701. 800d498: 08016750 .word 0x08016750
  31702. 800d49c: 080144e8 .word 0x080144e8
  31703. 0800d4a0 <tcp_err>:
  31704. * @param err callback function to call for this pcb when a fatal error
  31705. * has occurred on the connection
  31706. */
  31707. void
  31708. tcp_err(struct tcp_pcb *pcb, tcp_err_fn err)
  31709. {
  31710. 800d4a0: b538 push {r3, r4, r5, lr}
  31711. 800d4a2: 4604 mov r4, r0
  31712. 800d4a4: 460d mov r5, r1
  31713. LWIP_ASSERT_CORE_LOCKED();
  31714. 800d4a6: f7f6 fb31 bl 8003b0c <sys_check_core_locking>
  31715. if (pcb != NULL) {
  31716. 800d4aa: b124 cbz r4, 800d4b6 <tcp_err+0x16>
  31717. LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN);
  31718. 800d4ac: 7d23 ldrb r3, [r4, #20]
  31719. 800d4ae: 2b01 cmp r3, #1
  31720. 800d4b0: d002 beq.n 800d4b8 <tcp_err+0x18>
  31721. pcb->errf = err;
  31722. 800d4b2: f8c4 5090 str.w r5, [r4, #144] @ 0x90
  31723. }
  31724. }
  31725. 800d4b6: bd38 pop {r3, r4, r5, pc}
  31726. LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN);
  31727. 800d4b8: 4b03 ldr r3, [pc, #12] @ (800d4c8 <tcp_err+0x28>)
  31728. 800d4ba: f640 020d movw r2, #2061 @ 0x80d
  31729. 800d4be: 4903 ldr r1, [pc, #12] @ (800d4cc <tcp_err+0x2c>)
  31730. 800d4c0: 4803 ldr r0, [pc, #12] @ (800d4d0 <tcp_err+0x30>)
  31731. 800d4c2: f005 ffa1 bl 8013408 <iprintf>
  31732. 800d4c6: e7f4 b.n 800d4b2 <tcp_err+0x12>
  31733. 800d4c8: 080165b0 .word 0x080165b0
  31734. 800d4cc: 08016778 .word 0x08016778
  31735. 800d4d0: 080144e8 .word 0x080144e8
  31736. 0800d4d4 <tcp_accept>:
  31737. * @param accept callback function to call for this pcb when LISTENing
  31738. * connection has been connected to another host
  31739. */
  31740. void
  31741. tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept)
  31742. {
  31743. 800d4d4: b538 push {r3, r4, r5, lr}
  31744. 800d4d6: 4604 mov r4, r0
  31745. 800d4d8: 460d mov r5, r1
  31746. LWIP_ASSERT_CORE_LOCKED();
  31747. 800d4da: f7f6 fb17 bl 8003b0c <sys_check_core_locking>
  31748. if ((pcb != NULL) && (pcb->state == LISTEN)) {
  31749. 800d4de: b114 cbz r4, 800d4e6 <tcp_accept+0x12>
  31750. 800d4e0: 7d23 ldrb r3, [r4, #20]
  31751. 800d4e2: 2b01 cmp r3, #1
  31752. 800d4e4: d000 beq.n 800d4e8 <tcp_accept+0x14>
  31753. struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen *)pcb;
  31754. lpcb->accept = accept;
  31755. }
  31756. }
  31757. 800d4e6: bd38 pop {r3, r4, r5, pc}
  31758. lpcb->accept = accept;
  31759. 800d4e8: 61a5 str r5, [r4, #24]
  31760. }
  31761. 800d4ea: e7fc b.n 800d4e6 <tcp_accept+0x12>
  31762. 0800d4ec <tcp_poll>:
  31763. * the application may use the polling functionality to call tcp_write()
  31764. * again when the connection has been idle for a while.
  31765. */
  31766. void
  31767. tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval)
  31768. {
  31769. 800d4ec: b570 push {r4, r5, r6, lr}
  31770. 800d4ee: 4604 mov r4, r0
  31771. 800d4f0: 460e mov r6, r1
  31772. 800d4f2: 4615 mov r5, r2
  31773. LWIP_ASSERT_CORE_LOCKED();
  31774. 800d4f4: f7f6 fb0a bl 8003b0c <sys_check_core_locking>
  31775. LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return);
  31776. 800d4f8: b134 cbz r4, 800d508 <tcp_poll+0x1c>
  31777. LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN);
  31778. 800d4fa: 7d23 ldrb r3, [r4, #20]
  31779. 800d4fc: 2b01 cmp r3, #1
  31780. 800d4fe: d00b beq.n 800d518 <tcp_poll+0x2c>
  31781. #if LWIP_CALLBACK_API
  31782. pcb->poll = poll;
  31783. 800d500: f8c4 608c str.w r6, [r4, #140] @ 0x8c
  31784. #else /* LWIP_CALLBACK_API */
  31785. LWIP_UNUSED_ARG(poll);
  31786. #endif /* LWIP_CALLBACK_API */
  31787. pcb->pollinterval = interval;
  31788. 800d504: 7765 strb r5, [r4, #29]
  31789. }
  31790. 800d506: bd70 pop {r4, r5, r6, pc}
  31791. LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return);
  31792. 800d508: 4b07 ldr r3, [pc, #28] @ (800d528 <tcp_poll+0x3c>)
  31793. 800d50a: f640 023d movw r2, #2109 @ 0x83d
  31794. 800d50e: 4907 ldr r1, [pc, #28] @ (800d52c <tcp_poll+0x40>)
  31795. 800d510: 4807 ldr r0, [pc, #28] @ (800d530 <tcp_poll+0x44>)
  31796. 800d512: f005 ff79 bl 8013408 <iprintf>
  31797. 800d516: e7f6 b.n 800d506 <tcp_poll+0x1a>
  31798. LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN);
  31799. 800d518: 4b03 ldr r3, [pc, #12] @ (800d528 <tcp_poll+0x3c>)
  31800. 800d51a: f640 023e movw r2, #2110 @ 0x83e
  31801. 800d51e: 4905 ldr r1, [pc, #20] @ (800d534 <tcp_poll+0x48>)
  31802. 800d520: 4803 ldr r0, [pc, #12] @ (800d530 <tcp_poll+0x44>)
  31803. 800d522: f005 ff71 bl 8013408 <iprintf>
  31804. 800d526: e7eb b.n 800d500 <tcp_poll+0x14>
  31805. 800d528: 080165b0 .word 0x080165b0
  31806. 800d52c: 080167a0 .word 0x080167a0
  31807. 800d530: 080144e8 .word 0x080144e8
  31808. 800d534: 080167b8 .word 0x080167b8
  31809. 0800d538 <tcp_next_iss>:
  31810. *
  31811. * @return u32_t pseudo random sequence number
  31812. */
  31813. u32_t
  31814. tcp_next_iss(struct tcp_pcb *pcb)
  31815. {
  31816. 800d538: b508 push {r3, lr}
  31817. LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
  31818. return LWIP_HOOK_TCP_ISN(&pcb->local_ip, pcb->local_port, &pcb->remote_ip, pcb->remote_port);
  31819. #else /* LWIP_HOOK_TCP_ISN */
  31820. static u32_t iss = 6510;
  31821. LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
  31822. 800d53a: b130 cbz r0, 800d54a <tcp_next_iss+0x12>
  31823. LWIP_UNUSED_ARG(pcb);
  31824. iss += tcp_ticks; /* XXX */
  31825. 800d53c: 4b07 ldr r3, [pc, #28] @ (800d55c <tcp_next_iss+0x24>)
  31826. 800d53e: 6818 ldr r0, [r3, #0]
  31827. 800d540: 4a07 ldr r2, [pc, #28] @ (800d560 <tcp_next_iss+0x28>)
  31828. 800d542: 6812 ldr r2, [r2, #0]
  31829. 800d544: 4410 add r0, r2
  31830. 800d546: 6018 str r0, [r3, #0]
  31831. return iss;
  31832. #endif /* LWIP_HOOK_TCP_ISN */
  31833. }
  31834. 800d548: bd08 pop {r3, pc}
  31835. LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL);
  31836. 800d54a: 4b06 ldr r3, [pc, #24] @ (800d564 <tcp_next_iss+0x2c>)
  31837. 800d54c: f640 02af movw r2, #2223 @ 0x8af
  31838. 800d550: 4905 ldr r1, [pc, #20] @ (800d568 <tcp_next_iss+0x30>)
  31839. 800d552: 4806 ldr r0, [pc, #24] @ (800d56c <tcp_next_iss+0x34>)
  31840. 800d554: f005 ff58 bl 8013408 <iprintf>
  31841. 800d558: e7f0 b.n 800d53c <tcp_next_iss+0x4>
  31842. 800d55a: bf00 nop
  31843. 800d55c: 24000028 .word 0x24000028
  31844. 800d560: 24019be4 .word 0x24019be4
  31845. 800d564: 080165b0 .word 0x080165b0
  31846. 800d568: 080167d8 .word 0x080167d8
  31847. 800d56c: 080144e8 .word 0x080144e8
  31848. 0800d570 <tcp_eff_send_mss_netif>:
  31849. * by calculating the minimum of TCP_MSS and the mtu (if set) of the target
  31850. * netif (if not NULL).
  31851. */
  31852. u16_t
  31853. tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest)
  31854. {
  31855. 800d570: b538 push {r3, r4, r5, lr}
  31856. 800d572: 4605 mov r5, r0
  31857. 800d574: 460c mov r4, r1
  31858. u16_t mss_s;
  31859. u16_t mtu;
  31860. LWIP_UNUSED_ARG(dest); /* in case IPv6 is disabled */
  31861. LWIP_ASSERT("tcp_eff_send_mss_netif: invalid dst_ip", dest != NULL);
  31862. 800d576: b15a cbz r2, 800d590 <tcp_eff_send_mss_netif+0x20>
  31863. else
  31864. #endif /* LWIP_IPV4 */
  31865. #endif /* LWIP_IPV6 */
  31866. #if LWIP_IPV4
  31867. {
  31868. if (outif == NULL) {
  31869. 800d578: b144 cbz r4, 800d58c <tcp_eff_send_mss_netif+0x1c>
  31870. return sendmss;
  31871. }
  31872. mtu = outif->mtu;
  31873. 800d57a: 8d23 ldrh r3, [r4, #40] @ 0x28
  31874. }
  31875. #endif /* LWIP_IPV4 */
  31876. if (mtu != 0) {
  31877. 800d57c: b133 cbz r3, 800d58c <tcp_eff_send_mss_netif+0x1c>
  31878. #if LWIP_IPV4
  31879. {
  31880. offset = IP_HLEN + TCP_HLEN;
  31881. }
  31882. #endif /* LWIP_IPV4 */
  31883. mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0;
  31884. 800d57e: 2b28 cmp r3, #40 @ 0x28
  31885. 800d580: d90e bls.n 800d5a0 <tcp_eff_send_mss_netif+0x30>
  31886. 800d582: 3b28 subs r3, #40 @ 0x28
  31887. 800d584: b29b uxth r3, r3
  31888. /* RFC 1122, chap 4.2.2.6:
  31889. * Eff.snd.MSS = min(SendMSS+20, MMS_S) - TCPhdrsize - IPoptionsize
  31890. * We correct for TCP options in tcp_write(), and don't support IP options.
  31891. */
  31892. sendmss = LWIP_MIN(sendmss, mss_s);
  31893. 800d586: 429d cmp r5, r3
  31894. 800d588: bf28 it cs
  31895. 800d58a: 461d movcs r5, r3
  31896. }
  31897. return sendmss;
  31898. }
  31899. 800d58c: 4628 mov r0, r5
  31900. 800d58e: bd38 pop {r3, r4, r5, pc}
  31901. LWIP_ASSERT("tcp_eff_send_mss_netif: invalid dst_ip", dest != NULL);
  31902. 800d590: 4b04 ldr r3, [pc, #16] @ (800d5a4 <tcp_eff_send_mss_netif+0x34>)
  31903. 800d592: f640 02c5 movw r2, #2245 @ 0x8c5
  31904. 800d596: 4904 ldr r1, [pc, #16] @ (800d5a8 <tcp_eff_send_mss_netif+0x38>)
  31905. 800d598: 4804 ldr r0, [pc, #16] @ (800d5ac <tcp_eff_send_mss_netif+0x3c>)
  31906. 800d59a: f005 ff35 bl 8013408 <iprintf>
  31907. 800d59e: e7eb b.n 800d578 <tcp_eff_send_mss_netif+0x8>
  31908. mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0;
  31909. 800d5a0: 2300 movs r3, #0
  31910. 800d5a2: e7f0 b.n 800d586 <tcp_eff_send_mss_netif+0x16>
  31911. 800d5a4: 080165b0 .word 0x080165b0
  31912. 800d5a8: 080167f4 .word 0x080167f4
  31913. 800d5ac: 080144e8 .word 0x080144e8
  31914. 0800d5b0 <tcp_connect>:
  31915. {
  31916. 800d5b0: b5f8 push {r3, r4, r5, r6, r7, lr}
  31917. 800d5b2: 4604 mov r4, r0
  31918. 800d5b4: 460d mov r5, r1
  31919. 800d5b6: 4616 mov r6, r2
  31920. 800d5b8: 461f mov r7, r3
  31921. LWIP_ASSERT_CORE_LOCKED();
  31922. 800d5ba: f7f6 faa7 bl 8003b0c <sys_check_core_locking>
  31923. LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
  31924. 800d5be: 2c00 cmp r4, #0
  31925. 800d5c0: d04e beq.n 800d660 <tcp_connect+0xb0>
  31926. LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
  31927. 800d5c2: 2d00 cmp r5, #0
  31928. 800d5c4: d056 beq.n 800d674 <tcp_connect+0xc4>
  31929. LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN);
  31930. 800d5c6: 7d23 ldrb r3, [r4, #20]
  31931. 800d5c8: 2b00 cmp r3, #0
  31932. 800d5ca: d15d bne.n 800d688 <tcp_connect+0xd8>
  31933. ip_addr_set(&pcb->remote_ip, ipaddr);
  31934. 800d5cc: 682b ldr r3, [r5, #0]
  31935. 800d5ce: 6063 str r3, [r4, #4]
  31936. pcb->remote_port = port;
  31937. 800d5d0: 8326 strh r6, [r4, #24]
  31938. if (pcb->netif_idx != NETIF_NO_INDEX) {
  31939. 800d5d2: 7a20 ldrb r0, [r4, #8]
  31940. 800d5d4: 2800 cmp r0, #0
  31941. 800d5d6: d061 beq.n 800d69c <tcp_connect+0xec>
  31942. netif = netif_get_by_index(pcb->netif_idx);
  31943. 800d5d8: f7fe fab2 bl 800bb40 <netif_get_by_index>
  31944. 800d5dc: 4605 mov r5, r0
  31945. if (netif == NULL) {
  31946. 800d5de: 2d00 cmp r5, #0
  31947. 800d5e0: d077 beq.n 800d6d2 <tcp_connect+0x122>
  31948. if (ip_addr_isany(&pcb->local_ip)) {
  31949. 800d5e2: b10c cbz r4, 800d5e8 <tcp_connect+0x38>
  31950. 800d5e4: 6823 ldr r3, [r4, #0]
  31951. 800d5e6: b90b cbnz r3, 800d5ec <tcp_connect+0x3c>
  31952. ip_addr_copy(pcb->local_ip, *local_ip);
  31953. 800d5e8: 686b ldr r3, [r5, #4]
  31954. 800d5ea: 6023 str r3, [r4, #0]
  31955. old_local_port = pcb->local_port;
  31956. 800d5ec: 8ae6 ldrh r6, [r4, #22]
  31957. if (pcb->local_port == 0) {
  31958. 800d5ee: b926 cbnz r6, 800d5fa <tcp_connect+0x4a>
  31959. pcb->local_port = tcp_new_port();
  31960. 800d5f0: f7ff fd52 bl 800d098 <tcp_new_port>
  31961. 800d5f4: 82e0 strh r0, [r4, #22]
  31962. if (pcb->local_port == 0) {
  31963. 800d5f6: 2800 cmp r0, #0
  31964. 800d5f8: d06e beq.n 800d6d8 <tcp_connect+0x128>
  31965. iss = tcp_next_iss(pcb);
  31966. 800d5fa: 4620 mov r0, r4
  31967. 800d5fc: f7ff ff9c bl 800d538 <tcp_next_iss>
  31968. pcb->rcv_nxt = 0;
  31969. 800d600: 2100 movs r1, #0
  31970. 800d602: 6261 str r1, [r4, #36] @ 0x24
  31971. pcb->snd_nxt = iss;
  31972. 800d604: 6520 str r0, [r4, #80] @ 0x50
  31973. pcb->lastack = iss - 1;
  31974. 800d606: 3801 subs r0, #1
  31975. 800d608: 6460 str r0, [r4, #68] @ 0x44
  31976. pcb->snd_wl2 = iss - 1;
  31977. 800d60a: 65a0 str r0, [r4, #88] @ 0x58
  31978. pcb->snd_lbb = iss - 1;
  31979. 800d60c: 65e0 str r0, [r4, #92] @ 0x5c
  31980. pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND);
  31981. 800d60e: f241 63d0 movw r3, #5840 @ 0x16d0
  31982. 800d612: 8563 strh r3, [r4, #42] @ 0x2a
  31983. 800d614: 8523 strh r3, [r4, #40] @ 0x28
  31984. pcb->rcv_ann_right_edge = pcb->rcv_nxt;
  31985. 800d616: 62e1 str r1, [r4, #44] @ 0x2c
  31986. pcb->snd_wnd = TCP_WND;
  31987. 800d618: f8a4 3060 strh.w r3, [r4, #96] @ 0x60
  31988. pcb->mss = INITIAL_MSS;
  31989. 800d61c: f44f 7006 mov.w r0, #536 @ 0x218
  31990. 800d620: 8660 strh r0, [r4, #50] @ 0x32
  31991. pcb->mss = tcp_eff_send_mss_netif(pcb->mss, netif, &pcb->remote_ip);
  31992. 800d622: 1d22 adds r2, r4, #4
  31993. 800d624: 4629 mov r1, r5
  31994. 800d626: f7ff ffa3 bl 800d570 <tcp_eff_send_mss_netif>
  31995. 800d62a: 8660 strh r0, [r4, #50] @ 0x32
  31996. pcb->cwnd = 1;
  31997. 800d62c: 2301 movs r3, #1
  31998. 800d62e: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
  31999. pcb->connected = connected;
  32000. 800d632: f8c4 7088 str.w r7, [r4, #136] @ 0x88
  32001. ret = tcp_enqueue_flags(pcb, TCP_SYN);
  32002. 800d636: 2102 movs r1, #2
  32003. 800d638: 4620 mov r0, r4
  32004. 800d63a: f003 f9dd bl 80109f8 <tcp_enqueue_flags>
  32005. if (ret == ERR_OK) {
  32006. 800d63e: 4605 mov r5, r0
  32007. 800d640: 2800 cmp r0, #0
  32008. 800d642: d144 bne.n 800d6ce <tcp_connect+0x11e>
  32009. pcb->state = SYN_SENT;
  32010. 800d644: 2302 movs r3, #2
  32011. 800d646: 7523 strb r3, [r4, #20]
  32012. if (old_local_port != 0) {
  32013. 800d648: 2e00 cmp r6, #0
  32014. 800d64a: d034 beq.n 800d6b6 <tcp_connect+0x106>
  32015. TCP_RMV(&tcp_bound_pcbs, pcb);
  32016. 800d64c: 4b24 ldr r3, [pc, #144] @ (800d6e0 <tcp_connect+0x130>)
  32017. 800d64e: 681b ldr r3, [r3, #0]
  32018. 800d650: 42a3 cmp r3, r4
  32019. 800d652: d028 beq.n 800d6a6 <tcp_connect+0xf6>
  32020. 800d654: b36b cbz r3, 800d6b2 <tcp_connect+0x102>
  32021. 800d656: 68da ldr r2, [r3, #12]
  32022. 800d658: 42a2 cmp r2, r4
  32023. 800d65a: d028 beq.n 800d6ae <tcp_connect+0xfe>
  32024. 800d65c: 4613 mov r3, r2
  32025. 800d65e: e7f9 b.n 800d654 <tcp_connect+0xa4>
  32026. LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
  32027. 800d660: 4b20 ldr r3, [pc, #128] @ (800d6e4 <tcp_connect+0x134>)
  32028. 800d662: f240 4235 movw r2, #1077 @ 0x435
  32029. 800d666: 4920 ldr r1, [pc, #128] @ (800d6e8 <tcp_connect+0x138>)
  32030. 800d668: 4820 ldr r0, [pc, #128] @ (800d6ec <tcp_connect+0x13c>)
  32031. 800d66a: f005 fecd bl 8013408 <iprintf>
  32032. 800d66e: f06f 050f mvn.w r5, #15
  32033. 800d672: e02c b.n 800d6ce <tcp_connect+0x11e>
  32034. LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
  32035. 800d674: 4b1b ldr r3, [pc, #108] @ (800d6e4 <tcp_connect+0x134>)
  32036. 800d676: f240 4236 movw r2, #1078 @ 0x436
  32037. 800d67a: 491d ldr r1, [pc, #116] @ (800d6f0 <tcp_connect+0x140>)
  32038. 800d67c: 481b ldr r0, [pc, #108] @ (800d6ec <tcp_connect+0x13c>)
  32039. 800d67e: f005 fec3 bl 8013408 <iprintf>
  32040. 800d682: f06f 050f mvn.w r5, #15
  32041. 800d686: e022 b.n 800d6ce <tcp_connect+0x11e>
  32042. LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN);
  32043. 800d688: 4b16 ldr r3, [pc, #88] @ (800d6e4 <tcp_connect+0x134>)
  32044. 800d68a: f44f 6287 mov.w r2, #1080 @ 0x438
  32045. 800d68e: 4919 ldr r1, [pc, #100] @ (800d6f4 <tcp_connect+0x144>)
  32046. 800d690: 4816 ldr r0, [pc, #88] @ (800d6ec <tcp_connect+0x13c>)
  32047. 800d692: f005 feb9 bl 8013408 <iprintf>
  32048. 800d696: f06f 0509 mvn.w r5, #9
  32049. 800d69a: e018 b.n 800d6ce <tcp_connect+0x11e>
  32050. netif = ip_route(&pcb->local_ip, &pcb->remote_ip);
  32051. 800d69c: 1d20 adds r0, r4, #4
  32052. 800d69e: f7fc fd2f bl 800a100 <ip4_route>
  32053. 800d6a2: 4605 mov r5, r0
  32054. 800d6a4: e79b b.n 800d5de <tcp_connect+0x2e>
  32055. TCP_RMV(&tcp_bound_pcbs, pcb);
  32056. 800d6a6: 68da ldr r2, [r3, #12]
  32057. 800d6a8: 4b0d ldr r3, [pc, #52] @ (800d6e0 <tcp_connect+0x130>)
  32058. 800d6aa: 601a str r2, [r3, #0]
  32059. 800d6ac: e001 b.n 800d6b2 <tcp_connect+0x102>
  32060. 800d6ae: 68e2 ldr r2, [r4, #12]
  32061. 800d6b0: 60da str r2, [r3, #12]
  32062. 800d6b2: 2300 movs r3, #0
  32063. 800d6b4: 60e3 str r3, [r4, #12]
  32064. TCP_REG_ACTIVE(pcb);
  32065. 800d6b6: 4b10 ldr r3, [pc, #64] @ (800d6f8 <tcp_connect+0x148>)
  32066. 800d6b8: 681a ldr r2, [r3, #0]
  32067. 800d6ba: 60e2 str r2, [r4, #12]
  32068. 800d6bc: 601c str r4, [r3, #0]
  32069. 800d6be: f003 ffb7 bl 8011630 <tcp_timer_needed>
  32070. 800d6c2: 4b0e ldr r3, [pc, #56] @ (800d6fc <tcp_connect+0x14c>)
  32071. 800d6c4: 2201 movs r2, #1
  32072. 800d6c6: 701a strb r2, [r3, #0]
  32073. tcp_output(pcb);
  32074. 800d6c8: 4620 mov r0, r4
  32075. 800d6ca: f003 fbcb bl 8010e64 <tcp_output>
  32076. }
  32077. 800d6ce: 4628 mov r0, r5
  32078. 800d6d0: bdf8 pop {r3, r4, r5, r6, r7, pc}
  32079. return ERR_RTE;
  32080. 800d6d2: f06f 0503 mvn.w r5, #3
  32081. 800d6d6: e7fa b.n 800d6ce <tcp_connect+0x11e>
  32082. return ERR_BUF;
  32083. 800d6d8: f06f 0501 mvn.w r5, #1
  32084. 800d6dc: e7f7 b.n 800d6ce <tcp_connect+0x11e>
  32085. 800d6de: bf00 nop
  32086. 800d6e0: 24019be0 .word 0x24019be0
  32087. 800d6e4: 080165b0 .word 0x080165b0
  32088. 800d6e8: 0801681c .word 0x0801681c
  32089. 800d6ec: 080144e8 .word 0x080144e8
  32090. 800d6f0: 08016838 .word 0x08016838
  32091. 800d6f4: 08016854 .word 0x08016854
  32092. 800d6f8: 24019bd8 .word 0x24019bd8
  32093. 800d6fc: 24019bd2 .word 0x24019bd2
  32094. 0800d700 <tcp_free_ooseq>:
  32095. #if TCP_QUEUE_OOSEQ
  32096. /* Free all ooseq pbufs (and possibly reset SACK state) */
  32097. void
  32098. tcp_free_ooseq(struct tcp_pcb *pcb)
  32099. {
  32100. 800d700: b510 push {r4, lr}
  32101. 800d702: 4604 mov r4, r0
  32102. if (pcb->ooseq) {
  32103. 800d704: 6f40 ldr r0, [r0, #116] @ 0x74
  32104. 800d706: b118 cbz r0, 800d710 <tcp_free_ooseq+0x10>
  32105. tcp_segs_free(pcb->ooseq);
  32106. 800d708: f7ff fe5d bl 800d3c6 <tcp_segs_free>
  32107. pcb->ooseq = NULL;
  32108. 800d70c: 2300 movs r3, #0
  32109. 800d70e: 6763 str r3, [r4, #116] @ 0x74
  32110. #if LWIP_TCP_SACK_OUT
  32111. memset(pcb->rcv_sacks, 0, sizeof(pcb->rcv_sacks));
  32112. #endif /* LWIP_TCP_SACK_OUT */
  32113. }
  32114. }
  32115. 800d710: bd10 pop {r4, pc}
  32116. ...
  32117. 0800d714 <tcp_pcb_purge>:
  32118. {
  32119. 800d714: b510 push {r4, lr}
  32120. LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);
  32121. 800d716: b308 cbz r0, 800d75c <tcp_pcb_purge+0x48>
  32122. 800d718: 4604 mov r4, r0
  32123. if (pcb->state != CLOSED &&
  32124. 800d71a: 7d03 ldrb r3, [r0, #20]
  32125. 800d71c: 2b00 cmp r3, #0
  32126. 800d71e: bf18 it ne
  32127. 800d720: 2b0a cmpne r3, #10
  32128. 800d722: d01a beq.n 800d75a <tcp_pcb_purge+0x46>
  32129. pcb->state != TIME_WAIT &&
  32130. 800d724: 2b01 cmp r3, #1
  32131. 800d726: d018 beq.n 800d75a <tcp_pcb_purge+0x46>
  32132. if (pcb->refused_data != NULL) {
  32133. 800d728: 6f80 ldr r0, [r0, #120] @ 0x78
  32134. 800d72a: b118 cbz r0, 800d734 <tcp_pcb_purge+0x20>
  32135. pbuf_free(pcb->refused_data);
  32136. 800d72c: f7fe fb38 bl 800bda0 <pbuf_free>
  32137. pcb->refused_data = NULL;
  32138. 800d730: 2300 movs r3, #0
  32139. 800d732: 67a3 str r3, [r4, #120] @ 0x78
  32140. if (pcb->ooseq != NULL) {
  32141. 800d734: 6f63 ldr r3, [r4, #116] @ 0x74
  32142. 800d736: b113 cbz r3, 800d73e <tcp_pcb_purge+0x2a>
  32143. tcp_free_ooseq(pcb);
  32144. 800d738: 4620 mov r0, r4
  32145. 800d73a: f7ff ffe1 bl 800d700 <tcp_free_ooseq>
  32146. pcb->rtime = -1;
  32147. 800d73e: f64f 73ff movw r3, #65535 @ 0xffff
  32148. 800d742: 8623 strh r3, [r4, #48] @ 0x30
  32149. tcp_segs_free(pcb->unsent);
  32150. 800d744: 6ee0 ldr r0, [r4, #108] @ 0x6c
  32151. 800d746: f7ff fe3e bl 800d3c6 <tcp_segs_free>
  32152. tcp_segs_free(pcb->unacked);
  32153. 800d74a: 6f20 ldr r0, [r4, #112] @ 0x70
  32154. 800d74c: f7ff fe3b bl 800d3c6 <tcp_segs_free>
  32155. pcb->unacked = pcb->unsent = NULL;
  32156. 800d750: 2300 movs r3, #0
  32157. 800d752: 66e3 str r3, [r4, #108] @ 0x6c
  32158. 800d754: 6723 str r3, [r4, #112] @ 0x70
  32159. pcb->unsent_oversize = 0;
  32160. 800d756: f8a4 3068 strh.w r3, [r4, #104] @ 0x68
  32161. }
  32162. 800d75a: bd10 pop {r4, pc}
  32163. LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return);
  32164. 800d75c: 4b03 ldr r3, [pc, #12] @ (800d76c <tcp_pcb_purge+0x58>)
  32165. 800d75e: f640 0251 movw r2, #2129 @ 0x851
  32166. 800d762: 4903 ldr r1, [pc, #12] @ (800d770 <tcp_pcb_purge+0x5c>)
  32167. 800d764: 4803 ldr r0, [pc, #12] @ (800d774 <tcp_pcb_purge+0x60>)
  32168. 800d766: f005 fe4f bl 8013408 <iprintf>
  32169. 800d76a: e7f6 b.n 800d75a <tcp_pcb_purge+0x46>
  32170. 800d76c: 080165b0 .word 0x080165b0
  32171. 800d770: 08016884 .word 0x08016884
  32172. 800d774: 080144e8 .word 0x080144e8
  32173. 0800d778 <tcp_pcb_remove>:
  32174. {
  32175. 800d778: b538 push {r3, r4, r5, lr}
  32176. 800d77a: 4605 mov r5, r0
  32177. LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL);
  32178. 800d77c: 460c mov r4, r1
  32179. 800d77e: b149 cbz r1, 800d794 <tcp_pcb_remove+0x1c>
  32180. LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL);
  32181. 800d780: b185 cbz r5, 800d7a4 <tcp_pcb_remove+0x2c>
  32182. TCP_RMV(pcblist, pcb);
  32183. 800d782: 682b ldr r3, [r5, #0]
  32184. 800d784: 42a3 cmp r3, r4
  32185. 800d786: d015 beq.n 800d7b4 <tcp_pcb_remove+0x3c>
  32186. 800d788: b1cb cbz r3, 800d7be <tcp_pcb_remove+0x46>
  32187. 800d78a: 68da ldr r2, [r3, #12]
  32188. 800d78c: 42a2 cmp r2, r4
  32189. 800d78e: d014 beq.n 800d7ba <tcp_pcb_remove+0x42>
  32190. 800d790: 4613 mov r3, r2
  32191. 800d792: e7f9 b.n 800d788 <tcp_pcb_remove+0x10>
  32192. LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL);
  32193. 800d794: 4b25 ldr r3, [pc, #148] @ (800d82c <tcp_pcb_remove+0xb4>)
  32194. 800d796: f640 0283 movw r2, #2179 @ 0x883
  32195. 800d79a: 4925 ldr r1, [pc, #148] @ (800d830 <tcp_pcb_remove+0xb8>)
  32196. 800d79c: 4825 ldr r0, [pc, #148] @ (800d834 <tcp_pcb_remove+0xbc>)
  32197. 800d79e: f005 fe33 bl 8013408 <iprintf>
  32198. 800d7a2: e7ed b.n 800d780 <tcp_pcb_remove+0x8>
  32199. LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL);
  32200. 800d7a4: 4b21 ldr r3, [pc, #132] @ (800d82c <tcp_pcb_remove+0xb4>)
  32201. 800d7a6: f640 0284 movw r2, #2180 @ 0x884
  32202. 800d7aa: 4923 ldr r1, [pc, #140] @ (800d838 <tcp_pcb_remove+0xc0>)
  32203. 800d7ac: 4821 ldr r0, [pc, #132] @ (800d834 <tcp_pcb_remove+0xbc>)
  32204. 800d7ae: f005 fe2b bl 8013408 <iprintf>
  32205. 800d7b2: e7e6 b.n 800d782 <tcp_pcb_remove+0xa>
  32206. TCP_RMV(pcblist, pcb);
  32207. 800d7b4: 68db ldr r3, [r3, #12]
  32208. 800d7b6: 602b str r3, [r5, #0]
  32209. 800d7b8: e001 b.n 800d7be <tcp_pcb_remove+0x46>
  32210. 800d7ba: 68e2 ldr r2, [r4, #12]
  32211. 800d7bc: 60da str r2, [r3, #12]
  32212. 800d7be: 2300 movs r3, #0
  32213. 800d7c0: 60e3 str r3, [r4, #12]
  32214. tcp_pcb_purge(pcb);
  32215. 800d7c2: 4620 mov r0, r4
  32216. 800d7c4: f7ff ffa6 bl 800d714 <tcp_pcb_purge>
  32217. if ((pcb->state != TIME_WAIT) &&
  32218. 800d7c8: 7d23 ldrb r3, [r4, #20]
  32219. 800d7ca: 2b0a cmp r3, #10
  32220. 800d7cc: bf18 it ne
  32221. 800d7ce: 2b01 cmpne r3, #1
  32222. 800d7d0: d003 beq.n 800d7da <tcp_pcb_remove+0x62>
  32223. (pcb->flags & TF_ACK_DELAY)) {
  32224. 800d7d2: 8b63 ldrh r3, [r4, #26]
  32225. (pcb->state != LISTEN) &&
  32226. 800d7d4: f013 0f01 tst.w r3, #1
  32227. 800d7d8: d121 bne.n 800d81e <tcp_pcb_remove+0xa6>
  32228. if (pcb->state != LISTEN) {
  32229. 800d7da: 7d23 ldrb r3, [r4, #20]
  32230. 800d7dc: 2b01 cmp r3, #1
  32231. 800d7de: d01a beq.n 800d816 <tcp_pcb_remove+0x9e>
  32232. LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL);
  32233. 800d7e0: 6ee3 ldr r3, [r4, #108] @ 0x6c
  32234. 800d7e2: b133 cbz r3, 800d7f2 <tcp_pcb_remove+0x7a>
  32235. 800d7e4: 4b11 ldr r3, [pc, #68] @ (800d82c <tcp_pcb_remove+0xb4>)
  32236. 800d7e6: f640 0293 movw r2, #2195 @ 0x893
  32237. 800d7ea: 4914 ldr r1, [pc, #80] @ (800d83c <tcp_pcb_remove+0xc4>)
  32238. 800d7ec: 4811 ldr r0, [pc, #68] @ (800d834 <tcp_pcb_remove+0xbc>)
  32239. 800d7ee: f005 fe0b bl 8013408 <iprintf>
  32240. LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL);
  32241. 800d7f2: 6f23 ldr r3, [r4, #112] @ 0x70
  32242. 800d7f4: b133 cbz r3, 800d804 <tcp_pcb_remove+0x8c>
  32243. 800d7f6: 4b0d ldr r3, [pc, #52] @ (800d82c <tcp_pcb_remove+0xb4>)
  32244. 800d7f8: f640 0294 movw r2, #2196 @ 0x894
  32245. 800d7fc: 4910 ldr r1, [pc, #64] @ (800d840 <tcp_pcb_remove+0xc8>)
  32246. 800d7fe: 480d ldr r0, [pc, #52] @ (800d834 <tcp_pcb_remove+0xbc>)
  32247. 800d800: f005 fe02 bl 8013408 <iprintf>
  32248. LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL);
  32249. 800d804: 6f63 ldr r3, [r4, #116] @ 0x74
  32250. 800d806: b133 cbz r3, 800d816 <tcp_pcb_remove+0x9e>
  32251. 800d808: 4b08 ldr r3, [pc, #32] @ (800d82c <tcp_pcb_remove+0xb4>)
  32252. 800d80a: f640 0296 movw r2, #2198 @ 0x896
  32253. 800d80e: 490d ldr r1, [pc, #52] @ (800d844 <tcp_pcb_remove+0xcc>)
  32254. 800d810: 4808 ldr r0, [pc, #32] @ (800d834 <tcp_pcb_remove+0xbc>)
  32255. 800d812: f005 fdf9 bl 8013408 <iprintf>
  32256. pcb->state = CLOSED;
  32257. 800d816: 2300 movs r3, #0
  32258. 800d818: 7523 strb r3, [r4, #20]
  32259. pcb->local_port = 0;
  32260. 800d81a: 82e3 strh r3, [r4, #22]
  32261. }
  32262. 800d81c: bd38 pop {r3, r4, r5, pc}
  32263. tcp_ack_now(pcb);
  32264. 800d81e: f043 0302 orr.w r3, r3, #2
  32265. 800d822: 8363 strh r3, [r4, #26]
  32266. tcp_output(pcb);
  32267. 800d824: 4620 mov r0, r4
  32268. 800d826: f003 fb1d bl 8010e64 <tcp_output>
  32269. 800d82a: e7d6 b.n 800d7da <tcp_pcb_remove+0x62>
  32270. 800d82c: 080165b0 .word 0x080165b0
  32271. 800d830: 080168a0 .word 0x080168a0
  32272. 800d834: 080144e8 .word 0x080144e8
  32273. 800d838: 080168bc .word 0x080168bc
  32274. 800d83c: 080168dc .word 0x080168dc
  32275. 800d840: 080168f4 .word 0x080168f4
  32276. 800d844: 08016910 .word 0x08016910
  32277. 0800d848 <tcp_abandon>:
  32278. {
  32279. 800d848: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  32280. 800d84c: b084 sub sp, #16
  32281. 800d84e: 4604 mov r4, r0
  32282. 800d850: 460d mov r5, r1
  32283. LWIP_ASSERT_CORE_LOCKED();
  32284. 800d852: f7f6 f95b bl 8003b0c <sys_check_core_locking>
  32285. LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return);
  32286. 800d856: b1ec cbz r4, 800d894 <tcp_abandon+0x4c>
  32287. LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs",
  32288. 800d858: 7d23 ldrb r3, [r4, #20]
  32289. 800d85a: 2b01 cmp r3, #1
  32290. 800d85c: d022 beq.n 800d8a4 <tcp_abandon+0x5c>
  32291. if (pcb->state == TIME_WAIT) {
  32292. 800d85e: 7d23 ldrb r3, [r4, #20]
  32293. 800d860: 2b0a cmp r3, #10
  32294. 800d862: d027 beq.n 800d8b4 <tcp_abandon+0x6c>
  32295. seqno = pcb->snd_nxt;
  32296. 800d864: f8d4 8050 ldr.w r8, [r4, #80] @ 0x50
  32297. ackno = pcb->rcv_nxt;
  32298. 800d868: f8d4 9024 ldr.w r9, [r4, #36] @ 0x24
  32299. errf = pcb->errf;
  32300. 800d86c: f8d4 6090 ldr.w r6, [r4, #144] @ 0x90
  32301. errf_arg = pcb->callback_arg;
  32302. 800d870: 6927 ldr r7, [r4, #16]
  32303. if (pcb->state == CLOSED) {
  32304. 800d872: 2b00 cmp r3, #0
  32305. 800d874: d147 bne.n 800d906 <tcp_abandon+0xbe>
  32306. if (pcb->local_port != 0) {
  32307. 800d876: f8b4 a016 ldrh.w sl, [r4, #22]
  32308. 800d87a: f1ba 0f00 cmp.w sl, #0
  32309. 800d87e: d04c beq.n 800d91a <tcp_abandon+0xd2>
  32310. TCP_RMV(&tcp_bound_pcbs, pcb);
  32311. 800d880: 4b2d ldr r3, [pc, #180] @ (800d938 <tcp_abandon+0xf0>)
  32312. 800d882: 681b ldr r3, [r3, #0]
  32313. 800d884: 42a3 cmp r3, r4
  32314. 800d886: d01d beq.n 800d8c4 <tcp_abandon+0x7c>
  32315. 800d888: b313 cbz r3, 800d8d0 <tcp_abandon+0x88>
  32316. 800d88a: 68da ldr r2, [r3, #12]
  32317. 800d88c: 42a2 cmp r2, r4
  32318. 800d88e: d01d beq.n 800d8cc <tcp_abandon+0x84>
  32319. 800d890: 4613 mov r3, r2
  32320. 800d892: e7f9 b.n 800d888 <tcp_abandon+0x40>
  32321. LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return);
  32322. 800d894: 4b29 ldr r3, [pc, #164] @ (800d93c <tcp_abandon+0xf4>)
  32323. 800d896: f240 223d movw r2, #573 @ 0x23d
  32324. 800d89a: 4929 ldr r1, [pc, #164] @ (800d940 <tcp_abandon+0xf8>)
  32325. 800d89c: 4829 ldr r0, [pc, #164] @ (800d944 <tcp_abandon+0xfc>)
  32326. 800d89e: f005 fdb3 bl 8013408 <iprintf>
  32327. 800d8a2: e02d b.n 800d900 <tcp_abandon+0xb8>
  32328. LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs",
  32329. 800d8a4: 4b25 ldr r3, [pc, #148] @ (800d93c <tcp_abandon+0xf4>)
  32330. 800d8a6: f44f 7210 mov.w r2, #576 @ 0x240
  32331. 800d8aa: 4927 ldr r1, [pc, #156] @ (800d948 <tcp_abandon+0x100>)
  32332. 800d8ac: 4825 ldr r0, [pc, #148] @ (800d944 <tcp_abandon+0xfc>)
  32333. 800d8ae: f005 fdab bl 8013408 <iprintf>
  32334. 800d8b2: e7d4 b.n 800d85e <tcp_abandon+0x16>
  32335. tcp_pcb_remove(&tcp_tw_pcbs, pcb);
  32336. 800d8b4: 4621 mov r1, r4
  32337. 800d8b6: 4825 ldr r0, [pc, #148] @ (800d94c <tcp_abandon+0x104>)
  32338. 800d8b8: f7ff ff5e bl 800d778 <tcp_pcb_remove>
  32339. tcp_free(pcb);
  32340. 800d8bc: 4620 mov r0, r4
  32341. 800d8be: f7ff fce1 bl 800d284 <tcp_free>
  32342. 800d8c2: e01d b.n 800d900 <tcp_abandon+0xb8>
  32343. TCP_RMV(&tcp_bound_pcbs, pcb);
  32344. 800d8c4: 68da ldr r2, [r3, #12]
  32345. 800d8c6: 4b1c ldr r3, [pc, #112] @ (800d938 <tcp_abandon+0xf0>)
  32346. 800d8c8: 601a str r2, [r3, #0]
  32347. 800d8ca: e001 b.n 800d8d0 <tcp_abandon+0x88>
  32348. 800d8cc: 68e2 ldr r2, [r4, #12]
  32349. 800d8ce: 60da str r2, [r3, #12]
  32350. 800d8d0: 2500 movs r5, #0
  32351. 800d8d2: 60e5 str r5, [r4, #12]
  32352. u16_t local_port = 0;
  32353. 800d8d4: 46aa mov sl, r5
  32354. if (pcb->unacked != NULL) {
  32355. 800d8d6: 6f20 ldr r0, [r4, #112] @ 0x70
  32356. 800d8d8: b108 cbz r0, 800d8de <tcp_abandon+0x96>
  32357. tcp_segs_free(pcb->unacked);
  32358. 800d8da: f7ff fd74 bl 800d3c6 <tcp_segs_free>
  32359. if (pcb->unsent != NULL) {
  32360. 800d8de: 6ee0 ldr r0, [r4, #108] @ 0x6c
  32361. 800d8e0: b108 cbz r0, 800d8e6 <tcp_abandon+0x9e>
  32362. tcp_segs_free(pcb->unsent);
  32363. 800d8e2: f7ff fd70 bl 800d3c6 <tcp_segs_free>
  32364. if (pcb->ooseq != NULL) {
  32365. 800d8e6: 6f60 ldr r0, [r4, #116] @ 0x74
  32366. 800d8e8: b108 cbz r0, 800d8ee <tcp_abandon+0xa6>
  32367. tcp_segs_free(pcb->ooseq);
  32368. 800d8ea: f7ff fd6c bl 800d3c6 <tcp_segs_free>
  32369. if (send_rst) {
  32370. 800d8ee: b9b5 cbnz r5, 800d91e <tcp_abandon+0xd6>
  32371. tcp_free(pcb);
  32372. 800d8f0: 4620 mov r0, r4
  32373. 800d8f2: f7ff fcc7 bl 800d284 <tcp_free>
  32374. TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT);
  32375. 800d8f6: b11e cbz r6, 800d900 <tcp_abandon+0xb8>
  32376. 800d8f8: f06f 010c mvn.w r1, #12
  32377. 800d8fc: 4638 mov r0, r7
  32378. 800d8fe: 47b0 blx r6
  32379. }
  32380. 800d900: b004 add sp, #16
  32381. 800d902: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  32382. local_port = pcb->local_port;
  32383. 800d906: f8b4 a016 ldrh.w sl, [r4, #22]
  32384. TCP_PCB_REMOVE_ACTIVE(pcb);
  32385. 800d90a: 4621 mov r1, r4
  32386. 800d90c: 4810 ldr r0, [pc, #64] @ (800d950 <tcp_abandon+0x108>)
  32387. 800d90e: f7ff ff33 bl 800d778 <tcp_pcb_remove>
  32388. 800d912: 4b10 ldr r3, [pc, #64] @ (800d954 <tcp_abandon+0x10c>)
  32389. 800d914: 2201 movs r2, #1
  32390. 800d916: 701a strb r2, [r3, #0]
  32391. 800d918: e7dd b.n 800d8d6 <tcp_abandon+0x8e>
  32392. int send_rst = 0;
  32393. 800d91a: 2500 movs r5, #0
  32394. 800d91c: e7db b.n 800d8d6 <tcp_abandon+0x8e>
  32395. tcp_rst(pcb, seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port);
  32396. 800d91e: 1d23 adds r3, r4, #4
  32397. 800d920: 8b22 ldrh r2, [r4, #24]
  32398. 800d922: 9202 str r2, [sp, #8]
  32399. 800d924: f8cd a004 str.w sl, [sp, #4]
  32400. 800d928: 9300 str r3, [sp, #0]
  32401. 800d92a: 4623 mov r3, r4
  32402. 800d92c: 464a mov r2, r9
  32403. 800d92e: 4641 mov r1, r8
  32404. 800d930: 4620 mov r0, r4
  32405. 800d932: f003 fa15 bl 8010d60 <tcp_rst>
  32406. 800d936: e7db b.n 800d8f0 <tcp_abandon+0xa8>
  32407. 800d938: 24019be0 .word 0x24019be0
  32408. 800d93c: 080165b0 .word 0x080165b0
  32409. 800d940: 08016928 .word 0x08016928
  32410. 800d944: 080144e8 .word 0x080144e8
  32411. 800d948: 08016944 .word 0x08016944
  32412. 800d94c: 24019bd4 .word 0x24019bd4
  32413. 800d950: 24019bd8 .word 0x24019bd8
  32414. 800d954: 24019bd2 .word 0x24019bd2
  32415. 0800d958 <tcp_abort>:
  32416. {
  32417. 800d958: b508 push {r3, lr}
  32418. tcp_abandon(pcb, 1);
  32419. 800d95a: 2101 movs r1, #1
  32420. 800d95c: f7ff ff74 bl 800d848 <tcp_abandon>
  32421. }
  32422. 800d960: bd08 pop {r3, pc}
  32423. ...
  32424. 0800d964 <tcp_kill_timewait>:
  32425. {
  32426. 800d964: b508 push {r3, lr}
  32427. for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
  32428. 800d966: 4b0a ldr r3, [pc, #40] @ (800d990 <tcp_kill_timewait+0x2c>)
  32429. 800d968: 681b ldr r3, [r3, #0]
  32430. inactivity = 0;
  32431. 800d96a: f04f 0c00 mov.w ip, #0
  32432. inactive = NULL;
  32433. 800d96e: 4660 mov r0, ip
  32434. for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
  32435. 800d970: e000 b.n 800d974 <tcp_kill_timewait+0x10>
  32436. 800d972: 68db ldr r3, [r3, #12]
  32437. 800d974: b143 cbz r3, 800d988 <tcp_kill_timewait+0x24>
  32438. if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
  32439. 800d976: 6a19 ldr r1, [r3, #32]
  32440. 800d978: 4a06 ldr r2, [pc, #24] @ (800d994 <tcp_kill_timewait+0x30>)
  32441. 800d97a: 6812 ldr r2, [r2, #0]
  32442. 800d97c: 1a52 subs r2, r2, r1
  32443. 800d97e: 4562 cmp r2, ip
  32444. 800d980: d3f7 bcc.n 800d972 <tcp_kill_timewait+0xe>
  32445. inactivity = tcp_ticks - pcb->tmr;
  32446. 800d982: 4694 mov ip, r2
  32447. inactive = pcb;
  32448. 800d984: 4618 mov r0, r3
  32449. 800d986: e7f4 b.n 800d972 <tcp_kill_timewait+0xe>
  32450. if (inactive != NULL) {
  32451. 800d988: b108 cbz r0, 800d98e <tcp_kill_timewait+0x2a>
  32452. tcp_abort(inactive);
  32453. 800d98a: f7ff ffe5 bl 800d958 <tcp_abort>
  32454. }
  32455. 800d98e: bd08 pop {r3, pc}
  32456. 800d990: 24019bd4 .word 0x24019bd4
  32457. 800d994: 24019be4 .word 0x24019be4
  32458. 0800d998 <tcp_kill_prio>:
  32459. mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
  32460. 800d998: f010 0f80 tst.w r0, #128 @ 0x80
  32461. 800d99c: d101 bne.n 800d9a2 <tcp_kill_prio+0xa>
  32462. if (mprio == 0) {
  32463. 800d99e: b908 cbnz r0, 800d9a4 <tcp_kill_prio+0xc>
  32464. 800d9a0: 4770 bx lr
  32465. mprio = LWIP_MIN(TCP_PRIO_MAX, prio);
  32466. 800d9a2: 207f movs r0, #127 @ 0x7f
  32467. {
  32468. 800d9a4: b538 push {r3, r4, r5, lr}
  32469. mprio--;
  32470. 800d9a6: 3801 subs r0, #1
  32471. 800d9a8: b2c2 uxtb r2, r0
  32472. for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
  32473. 800d9aa: 4b0f ldr r3, [pc, #60] @ (800d9e8 <tcp_kill_prio+0x50>)
  32474. 800d9ac: 681b ldr r3, [r3, #0]
  32475. inactivity = 0;
  32476. 800d9ae: f04f 0c00 mov.w ip, #0
  32477. inactive = NULL;
  32478. 800d9b2: 4660 mov r0, ip
  32479. for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
  32480. 800d9b4: e007 b.n 800d9c6 <tcp_kill_prio+0x2e>
  32481. inactivity = tcp_ticks - pcb->tmr;
  32482. 800d9b6: 4a0d ldr r2, [pc, #52] @ (800d9ec <tcp_kill_prio+0x54>)
  32483. 800d9b8: 6812 ldr r2, [r2, #0]
  32484. 800d9ba: 6a18 ldr r0, [r3, #32]
  32485. 800d9bc: eba2 0c00 sub.w ip, r2, r0
  32486. mprio = pcb->prio;
  32487. 800d9c0: 460a mov r2, r1
  32488. inactive = pcb;
  32489. 800d9c2: 4618 mov r0, r3
  32490. for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
  32491. 800d9c4: 68db ldr r3, [r3, #12]
  32492. 800d9c6: b15b cbz r3, 800d9e0 <tcp_kill_prio+0x48>
  32493. if ((pcb->prio < mprio) ||
  32494. 800d9c8: 7d59 ldrb r1, [r3, #21]
  32495. 800d9ca: 4291 cmp r1, r2
  32496. 800d9cc: d3f3 bcc.n 800d9b6 <tcp_kill_prio+0x1e>
  32497. 800d9ce: d1f9 bne.n 800d9c4 <tcp_kill_prio+0x2c>
  32498. ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) {
  32499. 800d9d0: 4c06 ldr r4, [pc, #24] @ (800d9ec <tcp_kill_prio+0x54>)
  32500. 800d9d2: 6824 ldr r4, [r4, #0]
  32501. 800d9d4: 6a1d ldr r5, [r3, #32]
  32502. 800d9d6: eba4 0e05 sub.w lr, r4, r5
  32503. 800d9da: 45e6 cmp lr, ip
  32504. 800d9dc: d3f2 bcc.n 800d9c4 <tcp_kill_prio+0x2c>
  32505. 800d9de: e7ea b.n 800d9b6 <tcp_kill_prio+0x1e>
  32506. if (inactive != NULL) {
  32507. 800d9e0: b108 cbz r0, 800d9e6 <tcp_kill_prio+0x4e>
  32508. tcp_abort(inactive);
  32509. 800d9e2: f7ff ffb9 bl 800d958 <tcp_abort>
  32510. }
  32511. 800d9e6: bd38 pop {r3, r4, r5, pc}
  32512. 800d9e8: 24019bd8 .word 0x24019bd8
  32513. 800d9ec: 24019be4 .word 0x24019be4
  32514. 0800d9f0 <tcp_netif_ip_addr_changed_pcblist>:
  32515. {
  32516. 800d9f0: b570 push {r4, r5, r6, lr}
  32517. 800d9f2: 460c mov r4, r1
  32518. LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL);
  32519. 800d9f4: 4605 mov r5, r0
  32520. 800d9f6: b960 cbnz r0, 800da12 <tcp_netif_ip_addr_changed_pcblist+0x22>
  32521. 800d9f8: 4b0a ldr r3, [pc, #40] @ (800da24 <tcp_netif_ip_addr_changed_pcblist+0x34>)
  32522. 800d9fa: f44f 6210 mov.w r2, #2304 @ 0x900
  32523. 800d9fe: 490a ldr r1, [pc, #40] @ (800da28 <tcp_netif_ip_addr_changed_pcblist+0x38>)
  32524. 800da00: 480a ldr r0, [pc, #40] @ (800da2c <tcp_netif_ip_addr_changed_pcblist+0x3c>)
  32525. 800da02: f005 fd01 bl 8013408 <iprintf>
  32526. 800da06: e004 b.n 800da12 <tcp_netif_ip_addr_changed_pcblist+0x22>
  32527. struct tcp_pcb *next = pcb->next;
  32528. 800da08: 68e6 ldr r6, [r4, #12]
  32529. tcp_abort(pcb);
  32530. 800da0a: 4620 mov r0, r4
  32531. 800da0c: f7ff ffa4 bl 800d958 <tcp_abort>
  32532. pcb = next;
  32533. 800da10: 4634 mov r4, r6
  32534. while (pcb != NULL) {
  32535. 800da12: b12c cbz r4, 800da20 <tcp_netif_ip_addr_changed_pcblist+0x30>
  32536. if (ip_addr_cmp(&pcb->local_ip, old_addr)
  32537. 800da14: 6822 ldr r2, [r4, #0]
  32538. 800da16: 682b ldr r3, [r5, #0]
  32539. 800da18: 429a cmp r2, r3
  32540. 800da1a: d0f5 beq.n 800da08 <tcp_netif_ip_addr_changed_pcblist+0x18>
  32541. pcb = pcb->next;
  32542. 800da1c: 68e4 ldr r4, [r4, #12]
  32543. 800da1e: e7f8 b.n 800da12 <tcp_netif_ip_addr_changed_pcblist+0x22>
  32544. }
  32545. 800da20: bd70 pop {r4, r5, r6, pc}
  32546. 800da22: bf00 nop
  32547. 800da24: 080165b0 .word 0x080165b0
  32548. 800da28: 08016978 .word 0x08016978
  32549. 800da2c: 080144e8 .word 0x080144e8
  32550. 0800da30 <tcp_netif_ip_addr_changed>:
  32551. if (!ip_addr_isany(old_addr)) {
  32552. 800da30: b300 cbz r0, 800da74 <tcp_netif_ip_addr_changed+0x44>
  32553. {
  32554. 800da32: b538 push {r3, r4, r5, lr}
  32555. 800da34: 460d mov r5, r1
  32556. 800da36: 4604 mov r4, r0
  32557. if (!ip_addr_isany(old_addr)) {
  32558. 800da38: 6803 ldr r3, [r0, #0]
  32559. 800da3a: b903 cbnz r3, 800da3e <tcp_netif_ip_addr_changed+0xe>
  32560. }
  32561. 800da3c: bd38 pop {r3, r4, r5, pc}
  32562. tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs);
  32563. 800da3e: 4b0e ldr r3, [pc, #56] @ (800da78 <tcp_netif_ip_addr_changed+0x48>)
  32564. 800da40: 6819 ldr r1, [r3, #0]
  32565. 800da42: f7ff ffd5 bl 800d9f0 <tcp_netif_ip_addr_changed_pcblist>
  32566. tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs);
  32567. 800da46: 4b0d ldr r3, [pc, #52] @ (800da7c <tcp_netif_ip_addr_changed+0x4c>)
  32568. 800da48: 6819 ldr r1, [r3, #0]
  32569. 800da4a: 4620 mov r0, r4
  32570. 800da4c: f7ff ffd0 bl 800d9f0 <tcp_netif_ip_addr_changed_pcblist>
  32571. if (!ip_addr_isany(new_addr)) {
  32572. 800da50: 2d00 cmp r5, #0
  32573. 800da52: d0f3 beq.n 800da3c <tcp_netif_ip_addr_changed+0xc>
  32574. 800da54: 682b ldr r3, [r5, #0]
  32575. 800da56: 2b00 cmp r3, #0
  32576. 800da58: d0f0 beq.n 800da3c <tcp_netif_ip_addr_changed+0xc>
  32577. for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
  32578. 800da5a: 4b09 ldr r3, [pc, #36] @ (800da80 <tcp_netif_ip_addr_changed+0x50>)
  32579. 800da5c: 681b ldr r3, [r3, #0]
  32580. 800da5e: e000 b.n 800da62 <tcp_netif_ip_addr_changed+0x32>
  32581. 800da60: 68db ldr r3, [r3, #12]
  32582. 800da62: 2b00 cmp r3, #0
  32583. 800da64: d0ea beq.n 800da3c <tcp_netif_ip_addr_changed+0xc>
  32584. if (ip_addr_cmp(&lpcb->local_ip, old_addr)) {
  32585. 800da66: 6819 ldr r1, [r3, #0]
  32586. 800da68: 6822 ldr r2, [r4, #0]
  32587. 800da6a: 4291 cmp r1, r2
  32588. 800da6c: d1f8 bne.n 800da60 <tcp_netif_ip_addr_changed+0x30>
  32589. ip_addr_copy(lpcb->local_ip, *new_addr);
  32590. 800da6e: 682a ldr r2, [r5, #0]
  32591. 800da70: 601a str r2, [r3, #0]
  32592. 800da72: e7f5 b.n 800da60 <tcp_netif_ip_addr_changed+0x30>
  32593. 800da74: 4770 bx lr
  32594. 800da76: bf00 nop
  32595. 800da78: 24019bd8 .word 0x24019bd8
  32596. 800da7c: 24019be0 .word 0x24019be0
  32597. 800da80: 24019bdc .word 0x24019bdc
  32598. 0800da84 <tcp_kill_state>:
  32599. {
  32600. 800da84: b538 push {r3, r4, r5, lr}
  32601. 800da86: 4604 mov r4, r0
  32602. LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
  32603. 800da88: f1a0 0308 sub.w r3, r0, #8
  32604. 800da8c: b2db uxtb r3, r3
  32605. 800da8e: 2b01 cmp r3, #1
  32606. 800da90: d804 bhi.n 800da9c <tcp_kill_state+0x18>
  32607. for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
  32608. 800da92: 4b10 ldr r3, [pc, #64] @ (800dad4 <tcp_kill_state+0x50>)
  32609. 800da94: 681b ldr r3, [r3, #0]
  32610. inactivity = 0;
  32611. 800da96: 2100 movs r1, #0
  32612. inactive = NULL;
  32613. 800da98: 4608 mov r0, r1
  32614. for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
  32615. 800da9a: e008 b.n 800daae <tcp_kill_state+0x2a>
  32616. LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK));
  32617. 800da9c: 4b0e ldr r3, [pc, #56] @ (800dad8 <tcp_kill_state+0x54>)
  32618. 800da9e: f240 62dd movw r2, #1757 @ 0x6dd
  32619. 800daa2: 490e ldr r1, [pc, #56] @ (800dadc <tcp_kill_state+0x58>)
  32620. 800daa4: 480e ldr r0, [pc, #56] @ (800dae0 <tcp_kill_state+0x5c>)
  32621. 800daa6: f005 fcaf bl 8013408 <iprintf>
  32622. 800daaa: e7f2 b.n 800da92 <tcp_kill_state+0xe>
  32623. for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
  32624. 800daac: 68db ldr r3, [r3, #12]
  32625. 800daae: b15b cbz r3, 800dac8 <tcp_kill_state+0x44>
  32626. if (pcb->state == state) {
  32627. 800dab0: 7d1a ldrb r2, [r3, #20]
  32628. 800dab2: 42a2 cmp r2, r4
  32629. 800dab4: d1fa bne.n 800daac <tcp_kill_state+0x28>
  32630. if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) {
  32631. 800dab6: 4a0b ldr r2, [pc, #44] @ (800dae4 <tcp_kill_state+0x60>)
  32632. 800dab8: 6812 ldr r2, [r2, #0]
  32633. 800daba: 6a1d ldr r5, [r3, #32]
  32634. 800dabc: 1b52 subs r2, r2, r5
  32635. 800dabe: 428a cmp r2, r1
  32636. 800dac0: d3f4 bcc.n 800daac <tcp_kill_state+0x28>
  32637. inactivity = tcp_ticks - pcb->tmr;
  32638. 800dac2: 4611 mov r1, r2
  32639. inactive = pcb;
  32640. 800dac4: 4618 mov r0, r3
  32641. 800dac6: e7f1 b.n 800daac <tcp_kill_state+0x28>
  32642. if (inactive != NULL) {
  32643. 800dac8: b110 cbz r0, 800dad0 <tcp_kill_state+0x4c>
  32644. tcp_abandon(inactive, 0);
  32645. 800daca: 2100 movs r1, #0
  32646. 800dacc: f7ff febc bl 800d848 <tcp_abandon>
  32647. }
  32648. 800dad0: bd38 pop {r3, r4, r5, pc}
  32649. 800dad2: bf00 nop
  32650. 800dad4: 24019bd8 .word 0x24019bd8
  32651. 800dad8: 080165b0 .word 0x080165b0
  32652. 800dadc: 080169ac .word 0x080169ac
  32653. 800dae0: 080144e8 .word 0x080144e8
  32654. 800dae4: 24019be4 .word 0x24019be4
  32655. 0800dae8 <tcp_alloc>:
  32656. {
  32657. 800dae8: b538 push {r3, r4, r5, lr}
  32658. 800daea: 4605 mov r5, r0
  32659. LWIP_ASSERT_CORE_LOCKED();
  32660. 800daec: f7f6 f80e bl 8003b0c <sys_check_core_locking>
  32661. pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
  32662. 800daf0: 2001 movs r0, #1
  32663. 800daf2: f7fd fd87 bl 800b604 <memp_malloc>
  32664. if (pcb == NULL) {
  32665. 800daf6: 4604 mov r4, r0
  32666. 800daf8: b350 cbz r0, 800db50 <tcp_alloc+0x68>
  32667. memset(pcb, 0, sizeof(struct tcp_pcb));
  32668. 800dafa: 229c movs r2, #156 @ 0x9c
  32669. 800dafc: 2100 movs r1, #0
  32670. 800dafe: 4620 mov r0, r4
  32671. 800db00: f005 fdda bl 80136b8 <memset>
  32672. pcb->prio = prio;
  32673. 800db04: 7565 strb r5, [r4, #21]
  32674. pcb->snd_buf = TCP_SND_BUF;
  32675. 800db06: f241 63d0 movw r3, #5840 @ 0x16d0
  32676. 800db0a: f8a4 3064 strh.w r3, [r4, #100] @ 0x64
  32677. pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND);
  32678. 800db0e: 8563 strh r3, [r4, #42] @ 0x2a
  32679. 800db10: 8523 strh r3, [r4, #40] @ 0x28
  32680. pcb->ttl = TCP_TTL;
  32681. 800db12: 22ff movs r2, #255 @ 0xff
  32682. 800db14: 72e2 strb r2, [r4, #11]
  32683. pcb->mss = INITIAL_MSS;
  32684. 800db16: f44f 7206 mov.w r2, #536 @ 0x218
  32685. 800db1a: 8662 strh r2, [r4, #50] @ 0x32
  32686. pcb->rto = 3000 / TCP_SLOW_INTERVAL;
  32687. 800db1c: 2206 movs r2, #6
  32688. 800db1e: f8a4 2040 strh.w r2, [r4, #64] @ 0x40
  32689. pcb->sv = 3000 / TCP_SLOW_INTERVAL;
  32690. 800db22: 87e2 strh r2, [r4, #62] @ 0x3e
  32691. pcb->rtime = -1;
  32692. 800db24: f64f 72ff movw r2, #65535 @ 0xffff
  32693. 800db28: 8622 strh r2, [r4, #48] @ 0x30
  32694. pcb->cwnd = 1;
  32695. 800db2a: 2201 movs r2, #1
  32696. 800db2c: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
  32697. pcb->tmr = tcp_ticks;
  32698. 800db30: 4a1a ldr r2, [pc, #104] @ (800db9c <tcp_alloc+0xb4>)
  32699. 800db32: 6812 ldr r2, [r2, #0]
  32700. 800db34: 6222 str r2, [r4, #32]
  32701. pcb->last_timer = tcp_timer_ctr;
  32702. 800db36: 4a1a ldr r2, [pc, #104] @ (800dba0 <tcp_alloc+0xb8>)
  32703. 800db38: 7812 ldrb r2, [r2, #0]
  32704. 800db3a: 77a2 strb r2, [r4, #30]
  32705. pcb->ssthresh = TCP_SND_BUF;
  32706. 800db3c: f8a4 304a strh.w r3, [r4, #74] @ 0x4a
  32707. pcb->recv = tcp_recv_null;
  32708. 800db40: 4b18 ldr r3, [pc, #96] @ (800dba4 <tcp_alloc+0xbc>)
  32709. 800db42: f8c4 3084 str.w r3, [r4, #132] @ 0x84
  32710. pcb->keep_idle = TCP_KEEPIDLE_DEFAULT;
  32711. 800db46: 4b18 ldr r3, [pc, #96] @ (800dba8 <tcp_alloc+0xc0>)
  32712. 800db48: f8c4 3094 str.w r3, [r4, #148] @ 0x94
  32713. }
  32714. 800db4c: 4620 mov r0, r4
  32715. 800db4e: bd38 pop {r3, r4, r5, pc}
  32716. tcp_handle_closepend();
  32717. 800db50: f7ff fb76 bl 800d240 <tcp_handle_closepend>
  32718. tcp_kill_timewait();
  32719. 800db54: f7ff ff06 bl 800d964 <tcp_kill_timewait>
  32720. pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
  32721. 800db58: 2001 movs r0, #1
  32722. 800db5a: f7fd fd53 bl 800b604 <memp_malloc>
  32723. if (pcb == NULL) {
  32724. 800db5e: 4604 mov r4, r0
  32725. 800db60: 2800 cmp r0, #0
  32726. 800db62: d1ca bne.n 800dafa <tcp_alloc+0x12>
  32727. tcp_kill_state(LAST_ACK);
  32728. 800db64: 2009 movs r0, #9
  32729. 800db66: f7ff ff8d bl 800da84 <tcp_kill_state>
  32730. pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
  32731. 800db6a: 2001 movs r0, #1
  32732. 800db6c: f7fd fd4a bl 800b604 <memp_malloc>
  32733. if (pcb == NULL) {
  32734. 800db70: 4604 mov r4, r0
  32735. 800db72: 2800 cmp r0, #0
  32736. 800db74: d1c1 bne.n 800dafa <tcp_alloc+0x12>
  32737. tcp_kill_state(CLOSING);
  32738. 800db76: 2008 movs r0, #8
  32739. 800db78: f7ff ff84 bl 800da84 <tcp_kill_state>
  32740. pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
  32741. 800db7c: 2001 movs r0, #1
  32742. 800db7e: f7fd fd41 bl 800b604 <memp_malloc>
  32743. if (pcb == NULL) {
  32744. 800db82: 4604 mov r4, r0
  32745. 800db84: 2800 cmp r0, #0
  32746. 800db86: d1b8 bne.n 800dafa <tcp_alloc+0x12>
  32747. tcp_kill_prio(prio);
  32748. 800db88: 4628 mov r0, r5
  32749. 800db8a: f7ff ff05 bl 800d998 <tcp_kill_prio>
  32750. pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB);
  32751. 800db8e: 2001 movs r0, #1
  32752. 800db90: f7fd fd38 bl 800b604 <memp_malloc>
  32753. if (pcb != NULL) {
  32754. 800db94: 4604 mov r4, r0
  32755. 800db96: 2800 cmp r0, #0
  32756. 800db98: d1af bne.n 800dafa <tcp_alloc+0x12>
  32757. 800db9a: e7d7 b.n 800db4c <tcp_alloc+0x64>
  32758. 800db9c: 24019be4 .word 0x24019be4
  32759. 800dba0: 24019bd0 .word 0x24019bd0
  32760. 800dba4: 0800dd49 .word 0x0800dd49
  32761. 800dba8: 006ddd00 .word 0x006ddd00
  32762. 0800dbac <tcp_new_ip_type>:
  32763. {
  32764. 800dbac: b508 push {r3, lr}
  32765. pcb = tcp_alloc(TCP_PRIO_NORMAL);
  32766. 800dbae: 2040 movs r0, #64 @ 0x40
  32767. 800dbb0: f7ff ff9a bl 800dae8 <tcp_alloc>
  32768. }
  32769. 800dbb4: bd08 pop {r3, pc}
  32770. ...
  32771. 0800dbb8 <tcp_close_shutdown>:
  32772. {
  32773. 800dbb8: b530 push {r4, r5, lr}
  32774. 800dbba: b085 sub sp, #20
  32775. 800dbbc: 460d mov r5, r1
  32776. LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL);
  32777. 800dbbe: 4604 mov r4, r0
  32778. 800dbc0: b328 cbz r0, 800dc0e <tcp_close_shutdown+0x56>
  32779. if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) {
  32780. 800dbc2: 2d00 cmp r5, #0
  32781. 800dbc4: d030 beq.n 800dc28 <tcp_close_shutdown+0x70>
  32782. 800dbc6: 7d23 ldrb r3, [r4, #20]
  32783. 800dbc8: 2b07 cmp r3, #7
  32784. 800dbca: bf18 it ne
  32785. 800dbcc: 2b04 cmpne r3, #4
  32786. 800dbce: d12b bne.n 800dc28 <tcp_close_shutdown+0x70>
  32787. if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) {
  32788. 800dbd0: 6fa3 ldr r3, [r4, #120] @ 0x78
  32789. 800dbd2: b323 cbz r3, 800dc1e <tcp_close_shutdown+0x66>
  32790. LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED);
  32791. 800dbd4: 8b63 ldrh r3, [r4, #26]
  32792. 800dbd6: f013 0f10 tst.w r3, #16
  32793. 800dbda: d02f beq.n 800dc3c <tcp_close_shutdown+0x84>
  32794. tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
  32795. 800dbdc: 1d23 adds r3, r4, #4
  32796. 800dbde: 8b22 ldrh r2, [r4, #24]
  32797. 800dbe0: 9202 str r2, [sp, #8]
  32798. 800dbe2: 8ae2 ldrh r2, [r4, #22]
  32799. 800dbe4: 9201 str r2, [sp, #4]
  32800. 800dbe6: 9300 str r3, [sp, #0]
  32801. 800dbe8: 4623 mov r3, r4
  32802. 800dbea: 6a62 ldr r2, [r4, #36] @ 0x24
  32803. 800dbec: 6d21 ldr r1, [r4, #80] @ 0x50
  32804. 800dbee: 4620 mov r0, r4
  32805. 800dbf0: f003 f8b6 bl 8010d60 <tcp_rst>
  32806. tcp_pcb_purge(pcb);
  32807. 800dbf4: 4620 mov r0, r4
  32808. 800dbf6: f7ff fd8d bl 800d714 <tcp_pcb_purge>
  32809. TCP_RMV_ACTIVE(pcb);
  32810. 800dbfa: 4b39 ldr r3, [pc, #228] @ (800dce0 <tcp_close_shutdown+0x128>)
  32811. 800dbfc: 681b ldr r3, [r3, #0]
  32812. 800dbfe: 42a3 cmp r3, r4
  32813. 800dc00: d024 beq.n 800dc4c <tcp_close_shutdown+0x94>
  32814. 800dc02: b34b cbz r3, 800dc58 <tcp_close_shutdown+0xa0>
  32815. 800dc04: 68da ldr r2, [r3, #12]
  32816. 800dc06: 42a2 cmp r2, r4
  32817. 800dc08: d024 beq.n 800dc54 <tcp_close_shutdown+0x9c>
  32818. 800dc0a: 4613 mov r3, r2
  32819. 800dc0c: e7f9 b.n 800dc02 <tcp_close_shutdown+0x4a>
  32820. LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL);
  32821. 800dc0e: 4b35 ldr r3, [pc, #212] @ (800dce4 <tcp_close_shutdown+0x12c>)
  32822. 800dc10: f44f 72af mov.w r2, #350 @ 0x15e
  32823. 800dc14: 4934 ldr r1, [pc, #208] @ (800dce8 <tcp_close_shutdown+0x130>)
  32824. 800dc16: 4835 ldr r0, [pc, #212] @ (800dcec <tcp_close_shutdown+0x134>)
  32825. 800dc18: f005 fbf6 bl 8013408 <iprintf>
  32826. 800dc1c: e7d1 b.n 800dbc2 <tcp_close_shutdown+0xa>
  32827. if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) {
  32828. 800dc1e: 8d22 ldrh r2, [r4, #40] @ 0x28
  32829. 800dc20: f241 63d0 movw r3, #5840 @ 0x16d0
  32830. 800dc24: 429a cmp r2, r3
  32831. 800dc26: d1d5 bne.n 800dbd4 <tcp_close_shutdown+0x1c>
  32832. switch (pcb->state) {
  32833. 800dc28: 7d23 ldrb r3, [r4, #20]
  32834. 800dc2a: 2b01 cmp r3, #1
  32835. 800dc2c: d03f beq.n 800dcae <tcp_close_shutdown+0xf6>
  32836. 800dc2e: 2b02 cmp r3, #2
  32837. 800dc30: d049 beq.n 800dcc6 <tcp_close_shutdown+0x10e>
  32838. 800dc32: b313 cbz r3, 800dc7a <tcp_close_shutdown+0xc2>
  32839. return tcp_close_shutdown_fin(pcb);
  32840. 800dc34: 4620 mov r0, r4
  32841. 800dc36: f7ff fac3 bl 800d1c0 <tcp_close_shutdown_fin>
  32842. 800dc3a: e036 b.n 800dcaa <tcp_close_shutdown+0xf2>
  32843. LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED);
  32844. 800dc3c: 4b29 ldr r3, [pc, #164] @ (800dce4 <tcp_close_shutdown+0x12c>)
  32845. 800dc3e: f44f 72b2 mov.w r2, #356 @ 0x164
  32846. 800dc42: 492b ldr r1, [pc, #172] @ (800dcf0 <tcp_close_shutdown+0x138>)
  32847. 800dc44: 4829 ldr r0, [pc, #164] @ (800dcec <tcp_close_shutdown+0x134>)
  32848. 800dc46: f005 fbdf bl 8013408 <iprintf>
  32849. 800dc4a: e7c7 b.n 800dbdc <tcp_close_shutdown+0x24>
  32850. TCP_RMV_ACTIVE(pcb);
  32851. 800dc4c: 68da ldr r2, [r3, #12]
  32852. 800dc4e: 4b24 ldr r3, [pc, #144] @ (800dce0 <tcp_close_shutdown+0x128>)
  32853. 800dc50: 601a str r2, [r3, #0]
  32854. 800dc52: e001 b.n 800dc58 <tcp_close_shutdown+0xa0>
  32855. 800dc54: 68e2 ldr r2, [r4, #12]
  32856. 800dc56: 60da str r2, [r3, #12]
  32857. 800dc58: 2300 movs r3, #0
  32858. 800dc5a: 60e3 str r3, [r4, #12]
  32859. 800dc5c: 4b25 ldr r3, [pc, #148] @ (800dcf4 <tcp_close_shutdown+0x13c>)
  32860. 800dc5e: 2201 movs r2, #1
  32861. 800dc60: 701a strb r2, [r3, #0]
  32862. if (tcp_input_pcb == pcb) {
  32863. 800dc62: 4b25 ldr r3, [pc, #148] @ (800dcf8 <tcp_close_shutdown+0x140>)
  32864. 800dc64: 681b ldr r3, [r3, #0]
  32865. 800dc66: 42a3 cmp r3, r4
  32866. 800dc68: d004 beq.n 800dc74 <tcp_close_shutdown+0xbc>
  32867. tcp_free(pcb);
  32868. 800dc6a: 4620 mov r0, r4
  32869. 800dc6c: f7ff fb0a bl 800d284 <tcp_free>
  32870. return ERR_OK;
  32871. 800dc70: 2000 movs r0, #0
  32872. 800dc72: e01a b.n 800dcaa <tcp_close_shutdown+0xf2>
  32873. tcp_trigger_input_pcb_close();
  32874. 800dc74: f002 f83e bl 800fcf4 <tcp_trigger_input_pcb_close>
  32875. 800dc78: e7fa b.n 800dc70 <tcp_close_shutdown+0xb8>
  32876. if (pcb->local_port != 0) {
  32877. 800dc7a: 8ae3 ldrh r3, [r4, #22]
  32878. 800dc7c: b18b cbz r3, 800dca2 <tcp_close_shutdown+0xea>
  32879. TCP_RMV(&tcp_bound_pcbs, pcb);
  32880. 800dc7e: 4b1f ldr r3, [pc, #124] @ (800dcfc <tcp_close_shutdown+0x144>)
  32881. 800dc80: 681b ldr r3, [r3, #0]
  32882. 800dc82: 42a3 cmp r3, r4
  32883. 800dc84: d005 beq.n 800dc92 <tcp_close_shutdown+0xda>
  32884. 800dc86: b153 cbz r3, 800dc9e <tcp_close_shutdown+0xe6>
  32885. 800dc88: 68da ldr r2, [r3, #12]
  32886. 800dc8a: 42a2 cmp r2, r4
  32887. 800dc8c: d005 beq.n 800dc9a <tcp_close_shutdown+0xe2>
  32888. 800dc8e: 4613 mov r3, r2
  32889. 800dc90: e7f9 b.n 800dc86 <tcp_close_shutdown+0xce>
  32890. 800dc92: 68da ldr r2, [r3, #12]
  32891. 800dc94: 4b19 ldr r3, [pc, #100] @ (800dcfc <tcp_close_shutdown+0x144>)
  32892. 800dc96: 601a str r2, [r3, #0]
  32893. 800dc98: e001 b.n 800dc9e <tcp_close_shutdown+0xe6>
  32894. 800dc9a: 68e2 ldr r2, [r4, #12]
  32895. 800dc9c: 60da str r2, [r3, #12]
  32896. 800dc9e: 2300 movs r3, #0
  32897. 800dca0: 60e3 str r3, [r4, #12]
  32898. tcp_free(pcb);
  32899. 800dca2: 4620 mov r0, r4
  32900. 800dca4: f7ff faee bl 800d284 <tcp_free>
  32901. return ERR_OK;
  32902. 800dca8: 2000 movs r0, #0
  32903. }
  32904. 800dcaa: b005 add sp, #20
  32905. 800dcac: bd30 pop {r4, r5, pc}
  32906. tcp_listen_closed(pcb);
  32907. 800dcae: 4620 mov r0, r4
  32908. 800dcb0: f7ff fa40 bl 800d134 <tcp_listen_closed>
  32909. tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb);
  32910. 800dcb4: 4621 mov r1, r4
  32911. 800dcb6: 4812 ldr r0, [pc, #72] @ (800dd00 <tcp_close_shutdown+0x148>)
  32912. 800dcb8: f7ff fd5e bl 800d778 <tcp_pcb_remove>
  32913. tcp_free_listen(pcb);
  32914. 800dcbc: 4620 mov r0, r4
  32915. 800dcbe: f7ff fa67 bl 800d190 <tcp_free_listen>
  32916. return ERR_OK;
  32917. 800dcc2: 2000 movs r0, #0
  32918. break;
  32919. 800dcc4: e7f1 b.n 800dcaa <tcp_close_shutdown+0xf2>
  32920. TCP_PCB_REMOVE_ACTIVE(pcb);
  32921. 800dcc6: 4621 mov r1, r4
  32922. 800dcc8: 4805 ldr r0, [pc, #20] @ (800dce0 <tcp_close_shutdown+0x128>)
  32923. 800dcca: f7ff fd55 bl 800d778 <tcp_pcb_remove>
  32924. 800dcce: 4b09 ldr r3, [pc, #36] @ (800dcf4 <tcp_close_shutdown+0x13c>)
  32925. 800dcd0: 2201 movs r2, #1
  32926. 800dcd2: 701a strb r2, [r3, #0]
  32927. tcp_free(pcb);
  32928. 800dcd4: 4620 mov r0, r4
  32929. 800dcd6: f7ff fad5 bl 800d284 <tcp_free>
  32930. return ERR_OK;
  32931. 800dcda: 2000 movs r0, #0
  32932. break;
  32933. 800dcdc: e7e5 b.n 800dcaa <tcp_close_shutdown+0xf2>
  32934. 800dcde: bf00 nop
  32935. 800dce0: 24019bd8 .word 0x24019bd8
  32936. 800dce4: 080165b0 .word 0x080165b0
  32937. 800dce8: 080169bc .word 0x080169bc
  32938. 800dcec: 080144e8 .word 0x080144e8
  32939. 800dcf0: 080169dc .word 0x080169dc
  32940. 800dcf4: 24019bd2 .word 0x24019bd2
  32941. 800dcf8: 24019be8 .word 0x24019be8
  32942. 800dcfc: 24019be0 .word 0x24019be0
  32943. 800dd00: 24019bdc .word 0x24019bdc
  32944. 0800dd04 <tcp_close>:
  32945. {
  32946. 800dd04: b510 push {r4, lr}
  32947. 800dd06: 4604 mov r4, r0
  32948. LWIP_ASSERT_CORE_LOCKED();
  32949. 800dd08: f7f5 ff00 bl 8003b0c <sys_check_core_locking>
  32950. LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG);
  32951. 800dd0c: b15c cbz r4, 800dd26 <tcp_close+0x22>
  32952. if (pcb->state != LISTEN) {
  32953. 800dd0e: 7d23 ldrb r3, [r4, #20]
  32954. 800dd10: 2b01 cmp r3, #1
  32955. 800dd12: d003 beq.n 800dd1c <tcp_close+0x18>
  32956. tcp_set_flags(pcb, TF_RXCLOSED);
  32957. 800dd14: 8b63 ldrh r3, [r4, #26]
  32958. 800dd16: f043 0310 orr.w r3, r3, #16
  32959. 800dd1a: 8363 strh r3, [r4, #26]
  32960. return tcp_close_shutdown(pcb, 1);
  32961. 800dd1c: 2101 movs r1, #1
  32962. 800dd1e: 4620 mov r0, r4
  32963. 800dd20: f7ff ff4a bl 800dbb8 <tcp_close_shutdown>
  32964. }
  32965. 800dd24: bd10 pop {r4, pc}
  32966. LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG);
  32967. 800dd26: 4b05 ldr r3, [pc, #20] @ (800dd3c <tcp_close+0x38>)
  32968. 800dd28: f44f 72f4 mov.w r2, #488 @ 0x1e8
  32969. 800dd2c: 4904 ldr r1, [pc, #16] @ (800dd40 <tcp_close+0x3c>)
  32970. 800dd2e: 4805 ldr r0, [pc, #20] @ (800dd44 <tcp_close+0x40>)
  32971. 800dd30: f005 fb6a bl 8013408 <iprintf>
  32972. 800dd34: f06f 000f mvn.w r0, #15
  32973. 800dd38: e7f4 b.n 800dd24 <tcp_close+0x20>
  32974. 800dd3a: bf00 nop
  32975. 800dd3c: 080165b0 .word 0x080165b0
  32976. 800dd40: 080169f8 .word 0x080169f8
  32977. 800dd44: 080144e8 .word 0x080144e8
  32978. 0800dd48 <tcp_recv_null>:
  32979. {
  32980. 800dd48: b510 push {r4, lr}
  32981. LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);
  32982. 800dd4a: b151 cbz r1, 800dd62 <tcp_recv_null+0x1a>
  32983. 800dd4c: 4614 mov r4, r2
  32984. 800dd4e: 4608 mov r0, r1
  32985. if (p != NULL) {
  32986. 800dd50: b18a cbz r2, 800dd76 <tcp_recv_null+0x2e>
  32987. tcp_recved(pcb, p->tot_len);
  32988. 800dd52: 8911 ldrh r1, [r2, #8]
  32989. 800dd54: f7ff faea bl 800d32c <tcp_recved>
  32990. pbuf_free(p);
  32991. 800dd58: 4620 mov r0, r4
  32992. 800dd5a: f7fe f821 bl 800bda0 <pbuf_free>
  32993. return ERR_OK;
  32994. 800dd5e: 2000 movs r0, #0
  32995. }
  32996. 800dd60: bd10 pop {r4, pc}
  32997. LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG);
  32998. 800dd62: 4b08 ldr r3, [pc, #32] @ (800dd84 <tcp_recv_null+0x3c>)
  32999. 800dd64: f44f 62d3 mov.w r2, #1688 @ 0x698
  33000. 800dd68: 4907 ldr r1, [pc, #28] @ (800dd88 <tcp_recv_null+0x40>)
  33001. 800dd6a: 4808 ldr r0, [pc, #32] @ (800dd8c <tcp_recv_null+0x44>)
  33002. 800dd6c: f005 fb4c bl 8013408 <iprintf>
  33003. 800dd70: f06f 000f mvn.w r0, #15
  33004. 800dd74: e7f4 b.n 800dd60 <tcp_recv_null+0x18>
  33005. } else if (err == ERR_OK) {
  33006. 800dd76: b10b cbz r3, 800dd7c <tcp_recv_null+0x34>
  33007. return ERR_OK;
  33008. 800dd78: 2000 movs r0, #0
  33009. 800dd7a: e7f1 b.n 800dd60 <tcp_recv_null+0x18>
  33010. return tcp_close(pcb);
  33011. 800dd7c: f7ff ffc2 bl 800dd04 <tcp_close>
  33012. 800dd80: e7ee b.n 800dd60 <tcp_recv_null+0x18>
  33013. 800dd82: bf00 nop
  33014. 800dd84: 080165b0 .word 0x080165b0
  33015. 800dd88: 08016a10 .word 0x08016a10
  33016. 800dd8c: 080144e8 .word 0x080144e8
  33017. 0800dd90 <tcp_process_refused_data>:
  33018. {
  33019. 800dd90: b5f8 push {r3, r4, r5, r6, r7, lr}
  33020. LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG);
  33021. 800dd92: b320 cbz r0, 800ddde <tcp_process_refused_data+0x4e>
  33022. 800dd94: 4604 mov r4, r0
  33023. u8_t refused_flags = pcb->refused_data->flags;
  33024. 800dd96: 6f86 ldr r6, [r0, #120] @ 0x78
  33025. 800dd98: 7b77 ldrb r7, [r6, #13]
  33026. pcb->refused_data = NULL;
  33027. 800dd9a: 2300 movs r3, #0
  33028. 800dd9c: 6783 str r3, [r0, #120] @ 0x78
  33029. TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err);
  33030. 800dd9e: f8d0 5084 ldr.w r5, [r0, #132] @ 0x84
  33031. 800dda2: b335 cbz r5, 800ddf2 <tcp_process_refused_data+0x62>
  33032. 800dda4: 4632 mov r2, r6
  33033. 800dda6: 4601 mov r1, r0
  33034. 800dda8: 6900 ldr r0, [r0, #16]
  33035. 800ddaa: 47a8 blx r5
  33036. 800ddac: 4605 mov r5, r0
  33037. if (err == ERR_OK) {
  33038. 800ddae: bb45 cbnz r5, 800de02 <tcp_process_refused_data+0x72>
  33039. if ((refused_flags & PBUF_FLAG_TCP_FIN)
  33040. 800ddb0: f017 0f20 tst.w r7, #32
  33041. 800ddb4: d02b beq.n 800de0e <tcp_process_refused_data+0x7e>
  33042. if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) {
  33043. 800ddb6: 8d23 ldrh r3, [r4, #40] @ 0x28
  33044. 800ddb8: f241 62d0 movw r2, #5840 @ 0x16d0
  33045. 800ddbc: 4293 cmp r3, r2
  33046. 800ddbe: d001 beq.n 800ddc4 <tcp_process_refused_data+0x34>
  33047. pcb->rcv_wnd++;
  33048. 800ddc0: 3301 adds r3, #1
  33049. 800ddc2: 8523 strh r3, [r4, #40] @ 0x28
  33050. TCP_EVENT_CLOSED(pcb, err);
  33051. 800ddc4: f8d4 6084 ldr.w r6, [r4, #132] @ 0x84
  33052. 800ddc8: b30e cbz r6, 800de0e <tcp_process_refused_data+0x7e>
  33053. 800ddca: 2300 movs r3, #0
  33054. 800ddcc: 461a mov r2, r3
  33055. 800ddce: 4621 mov r1, r4
  33056. 800ddd0: 6920 ldr r0, [r4, #16]
  33057. 800ddd2: 47b0 blx r6
  33058. if (err == ERR_ABRT) {
  33059. 800ddd4: f110 0f0d cmn.w r0, #13
  33060. 800ddd8: d119 bne.n 800de0e <tcp_process_refused_data+0x7e>
  33061. return ERR_ABRT;
  33062. 800ddda: 4605 mov r5, r0
  33063. 800dddc: e017 b.n 800de0e <tcp_process_refused_data+0x7e>
  33064. LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG);
  33065. 800ddde: 4b0d ldr r3, [pc, #52] @ (800de14 <tcp_process_refused_data+0x84>)
  33066. 800dde0: f240 6209 movw r2, #1545 @ 0x609
  33067. 800dde4: 490c ldr r1, [pc, #48] @ (800de18 <tcp_process_refused_data+0x88>)
  33068. 800dde6: 480d ldr r0, [pc, #52] @ (800de1c <tcp_process_refused_data+0x8c>)
  33069. 800dde8: f005 fb0e bl 8013408 <iprintf>
  33070. 800ddec: f06f 050f mvn.w r5, #15
  33071. 800ddf0: e00d b.n 800de0e <tcp_process_refused_data+0x7e>
  33072. TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err);
  33073. 800ddf2: 2300 movs r3, #0
  33074. 800ddf4: 4632 mov r2, r6
  33075. 800ddf6: 4601 mov r1, r0
  33076. 800ddf8: 4618 mov r0, r3
  33077. 800ddfa: f7ff ffa5 bl 800dd48 <tcp_recv_null>
  33078. 800ddfe: 4605 mov r5, r0
  33079. 800de00: e7d5 b.n 800ddae <tcp_process_refused_data+0x1e>
  33080. } else if (err == ERR_ABRT) {
  33081. 800de02: f115 0f0d cmn.w r5, #13
  33082. 800de06: d002 beq.n 800de0e <tcp_process_refused_data+0x7e>
  33083. pcb->refused_data = refused_data;
  33084. 800de08: 67a6 str r6, [r4, #120] @ 0x78
  33085. return ERR_INPROGRESS;
  33086. 800de0a: f06f 0504 mvn.w r5, #4
  33087. }
  33088. 800de0e: 4628 mov r0, r5
  33089. 800de10: bdf8 pop {r3, r4, r5, r6, r7, pc}
  33090. 800de12: bf00 nop
  33091. 800de14: 080165b0 .word 0x080165b0
  33092. 800de18: 08016a2c .word 0x08016a2c
  33093. 800de1c: 080144e8 .word 0x080144e8
  33094. 0800de20 <tcp_fasttmr>:
  33095. {
  33096. 800de20: b570 push {r4, r5, r6, lr}
  33097. ++tcp_timer_ctr;
  33098. 800de22: 4a1c ldr r2, [pc, #112] @ (800de94 <tcp_fasttmr+0x74>)
  33099. 800de24: 7813 ldrb r3, [r2, #0]
  33100. 800de26: 3301 adds r3, #1
  33101. 800de28: 7013 strb r3, [r2, #0]
  33102. pcb = tcp_active_pcbs;
  33103. 800de2a: 4b1b ldr r3, [pc, #108] @ (800de98 <tcp_fasttmr+0x78>)
  33104. 800de2c: 681c ldr r4, [r3, #0]
  33105. while (pcb != NULL) {
  33106. 800de2e: e013 b.n 800de58 <tcp_fasttmr+0x38>
  33107. tcp_ack_now(pcb);
  33108. 800de30: f043 0302 orr.w r3, r3, #2
  33109. 800de34: 8363 strh r3, [r4, #26]
  33110. tcp_output(pcb);
  33111. 800de36: 4620 mov r0, r4
  33112. 800de38: f003 f814 bl 8010e64 <tcp_output>
  33113. tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
  33114. 800de3c: 8b63 ldrh r3, [r4, #26]
  33115. 800de3e: f023 0303 bic.w r3, r3, #3
  33116. 800de42: 8363 strh r3, [r4, #26]
  33117. 800de44: e013 b.n 800de6e <tcp_fasttmr+0x4e>
  33118. tcp_clear_flags(pcb, TF_CLOSEPEND);
  33119. 800de46: f023 0308 bic.w r3, r3, #8
  33120. 800de4a: 8363 strh r3, [r4, #26]
  33121. tcp_close_shutdown_fin(pcb);
  33122. 800de4c: 4620 mov r0, r4
  33123. 800de4e: f7ff f9b7 bl 800d1c0 <tcp_close_shutdown_fin>
  33124. 800de52: e010 b.n 800de76 <tcp_fasttmr+0x56>
  33125. pcb = pcb->next;
  33126. 800de54: 68e5 ldr r5, [r4, #12]
  33127. {
  33128. 800de56: 462c mov r4, r5
  33129. while (pcb != NULL) {
  33130. 800de58: b1dc cbz r4, 800de92 <tcp_fasttmr+0x72>
  33131. if (pcb->last_timer != tcp_timer_ctr) {
  33132. 800de5a: 7fa2 ldrb r2, [r4, #30]
  33133. 800de5c: 4b0d ldr r3, [pc, #52] @ (800de94 <tcp_fasttmr+0x74>)
  33134. 800de5e: 781b ldrb r3, [r3, #0]
  33135. 800de60: 429a cmp r2, r3
  33136. 800de62: d0f7 beq.n 800de54 <tcp_fasttmr+0x34>
  33137. pcb->last_timer = tcp_timer_ctr;
  33138. 800de64: 77a3 strb r3, [r4, #30]
  33139. if (pcb->flags & TF_ACK_DELAY) {
  33140. 800de66: 8b63 ldrh r3, [r4, #26]
  33141. 800de68: f013 0f01 tst.w r3, #1
  33142. 800de6c: d1e0 bne.n 800de30 <tcp_fasttmr+0x10>
  33143. if (pcb->flags & TF_CLOSEPEND) {
  33144. 800de6e: 8b63 ldrh r3, [r4, #26]
  33145. 800de70: f013 0f08 tst.w r3, #8
  33146. 800de74: d1e7 bne.n 800de46 <tcp_fasttmr+0x26>
  33147. next = pcb->next;
  33148. 800de76: 68e5 ldr r5, [r4, #12]
  33149. if (pcb->refused_data != NULL) {
  33150. 800de78: 6fa3 ldr r3, [r4, #120] @ 0x78
  33151. 800de7a: 2b00 cmp r3, #0
  33152. 800de7c: d0eb beq.n 800de56 <tcp_fasttmr+0x36>
  33153. tcp_active_pcbs_changed = 0;
  33154. 800de7e: 4e07 ldr r6, [pc, #28] @ (800de9c <tcp_fasttmr+0x7c>)
  33155. 800de80: 2300 movs r3, #0
  33156. 800de82: 7033 strb r3, [r6, #0]
  33157. tcp_process_refused_data(pcb);
  33158. 800de84: 4620 mov r0, r4
  33159. 800de86: f7ff ff83 bl 800dd90 <tcp_process_refused_data>
  33160. if (tcp_active_pcbs_changed) {
  33161. 800de8a: 7833 ldrb r3, [r6, #0]
  33162. 800de8c: 2b00 cmp r3, #0
  33163. 800de8e: d0e2 beq.n 800de56 <tcp_fasttmr+0x36>
  33164. 800de90: e7cb b.n 800de2a <tcp_fasttmr+0xa>
  33165. }
  33166. 800de92: bd70 pop {r4, r5, r6, pc}
  33167. 800de94: 24019bd0 .word 0x24019bd0
  33168. 800de98: 24019bd8 .word 0x24019bd8
  33169. 800de9c: 24019bd2 .word 0x24019bd2
  33170. 0800dea0 <tcp_shutdown>:
  33171. {
  33172. 800dea0: b570 push {r4, r5, r6, lr}
  33173. 800dea2: 4604 mov r4, r0
  33174. 800dea4: 460d mov r5, r1
  33175. 800dea6: 4616 mov r6, r2
  33176. LWIP_ASSERT_CORE_LOCKED();
  33177. 800dea8: f7f5 fe30 bl 8003b0c <sys_check_core_locking>
  33178. LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG);
  33179. 800deac: b1bc cbz r4, 800dede <tcp_shutdown+0x3e>
  33180. if (pcb->state == LISTEN) {
  33181. 800deae: 7d23 ldrb r3, [r4, #20]
  33182. 800deb0: 2b01 cmp r3, #1
  33183. 800deb2: d02a beq.n 800df0a <tcp_shutdown+0x6a>
  33184. if (shut_rx) {
  33185. 800deb4: b155 cbz r5, 800decc <tcp_shutdown+0x2c>
  33186. tcp_set_flags(pcb, TF_RXCLOSED);
  33187. 800deb6: 8b63 ldrh r3, [r4, #26]
  33188. 800deb8: f043 0310 orr.w r3, r3, #16
  33189. 800debc: 8363 strh r3, [r4, #26]
  33190. if (shut_tx) {
  33191. 800debe: b9c6 cbnz r6, 800def2 <tcp_shutdown+0x52>
  33192. if (pcb->refused_data != NULL) {
  33193. 800dec0: 6fa0 ldr r0, [r4, #120] @ 0x78
  33194. 800dec2: b118 cbz r0, 800decc <tcp_shutdown+0x2c>
  33195. pbuf_free(pcb->refused_data);
  33196. 800dec4: f7fd ff6c bl 800bda0 <pbuf_free>
  33197. pcb->refused_data = NULL;
  33198. 800dec8: 2300 movs r3, #0
  33199. 800deca: 67a3 str r3, [r4, #120] @ 0x78
  33200. if (shut_tx) {
  33201. 800decc: b306 cbz r6, 800df10 <tcp_shutdown+0x70>
  33202. switch (pcb->state) {
  33203. 800dece: 7d23 ldrb r3, [r4, #20]
  33204. 800ded0: 2b04 cmp r3, #4
  33205. 800ded2: d813 bhi.n 800defc <tcp_shutdown+0x5c>
  33206. 800ded4: 2b03 cmp r3, #3
  33207. 800ded6: d213 bcs.n 800df00 <tcp_shutdown+0x60>
  33208. 800ded8: f06f 000a mvn.w r0, #10
  33209. 800dedc: e019 b.n 800df12 <tcp_shutdown+0x72>
  33210. LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG);
  33211. 800dede: 4b0f ldr r3, [pc, #60] @ (800df1c <tcp_shutdown+0x7c>)
  33212. 800dee0: f240 2207 movw r2, #519 @ 0x207
  33213. 800dee4: 490e ldr r1, [pc, #56] @ (800df20 <tcp_shutdown+0x80>)
  33214. 800dee6: 480f ldr r0, [pc, #60] @ (800df24 <tcp_shutdown+0x84>)
  33215. 800dee8: f005 fa8e bl 8013408 <iprintf>
  33216. 800deec: f06f 000f mvn.w r0, #15
  33217. 800def0: e00f b.n 800df12 <tcp_shutdown+0x72>
  33218. return tcp_close_shutdown(pcb, 1);
  33219. 800def2: 2101 movs r1, #1
  33220. 800def4: 4620 mov r0, r4
  33221. 800def6: f7ff fe5f bl 800dbb8 <tcp_close_shutdown>
  33222. 800defa: e00a b.n 800df12 <tcp_shutdown+0x72>
  33223. switch (pcb->state) {
  33224. 800defc: 2b07 cmp r3, #7
  33225. 800defe: d109 bne.n 800df14 <tcp_shutdown+0x74>
  33226. return tcp_close_shutdown(pcb, (u8_t)shut_rx);
  33227. 800df00: b2e9 uxtb r1, r5
  33228. 800df02: 4620 mov r0, r4
  33229. 800df04: f7ff fe58 bl 800dbb8 <tcp_close_shutdown>
  33230. 800df08: e003 b.n 800df12 <tcp_shutdown+0x72>
  33231. return ERR_CONN;
  33232. 800df0a: f06f 000a mvn.w r0, #10
  33233. 800df0e: e000 b.n 800df12 <tcp_shutdown+0x72>
  33234. return ERR_OK;
  33235. 800df10: 2000 movs r0, #0
  33236. }
  33237. 800df12: bd70 pop {r4, r5, r6, pc}
  33238. switch (pcb->state) {
  33239. 800df14: f06f 000a mvn.w r0, #10
  33240. 800df18: e7fb b.n 800df12 <tcp_shutdown+0x72>
  33241. 800df1a: bf00 nop
  33242. 800df1c: 080165b0 .word 0x080165b0
  33243. 800df20: 08016a54 .word 0x08016a54
  33244. 800df24: 080144e8 .word 0x080144e8
  33245. 0800df28 <tcp_slowtmr>:
  33246. {
  33247. 800df28: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  33248. 800df2c: b084 sub sp, #16
  33249. ++tcp_ticks;
  33250. 800df2e: 4a99 ldr r2, [pc, #612] @ (800e194 <tcp_slowtmr+0x26c>)
  33251. 800df30: 6813 ldr r3, [r2, #0]
  33252. 800df32: 3301 adds r3, #1
  33253. 800df34: 6013 str r3, [r2, #0]
  33254. ++tcp_timer_ctr;
  33255. 800df36: 4a98 ldr r2, [pc, #608] @ (800e198 <tcp_slowtmr+0x270>)
  33256. 800df38: 7813 ldrb r3, [r2, #0]
  33257. 800df3a: 3301 adds r3, #1
  33258. 800df3c: 7013 strb r3, [r2, #0]
  33259. pcb = tcp_active_pcbs;
  33260. 800df3e: 4b97 ldr r3, [pc, #604] @ (800e19c <tcp_slowtmr+0x274>)
  33261. 800df40: 681c ldr r4, [r3, #0]
  33262. prev = NULL;
  33263. 800df42: 2500 movs r5, #0
  33264. 800df44: e193 b.n 800e26e <tcp_slowtmr+0x346>
  33265. LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED);
  33266. 800df46: 4b96 ldr r3, [pc, #600] @ (800e1a0 <tcp_slowtmr+0x278>)
  33267. 800df48: f240 42be movw r2, #1214 @ 0x4be
  33268. 800df4c: 4995 ldr r1, [pc, #596] @ (800e1a4 <tcp_slowtmr+0x27c>)
  33269. 800df4e: 4896 ldr r0, [pc, #600] @ (800e1a8 <tcp_slowtmr+0x280>)
  33270. 800df50: f005 fa5a bl 8013408 <iprintf>
  33271. 800df54: e191 b.n 800e27a <tcp_slowtmr+0x352>
  33272. LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
  33273. 800df56: 4b92 ldr r3, [pc, #584] @ (800e1a0 <tcp_slowtmr+0x278>)
  33274. 800df58: f240 42bf movw r2, #1215 @ 0x4bf
  33275. 800df5c: 4993 ldr r1, [pc, #588] @ (800e1ac <tcp_slowtmr+0x284>)
  33276. 800df5e: 4892 ldr r0, [pc, #584] @ (800e1a8 <tcp_slowtmr+0x280>)
  33277. 800df60: f005 fa52 bl 8013408 <iprintf>
  33278. 800df64: e18d b.n 800e282 <tcp_slowtmr+0x35a>
  33279. LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
  33280. 800df66: 4b8e ldr r3, [pc, #568] @ (800e1a0 <tcp_slowtmr+0x278>)
  33281. 800df68: f44f 6298 mov.w r2, #1216 @ 0x4c0
  33282. 800df6c: 4990 ldr r1, [pc, #576] @ (800e1b0 <tcp_slowtmr+0x288>)
  33283. 800df6e: 488e ldr r0, [pc, #568] @ (800e1a8 <tcp_slowtmr+0x280>)
  33284. 800df70: f005 fa4a bl 8013408 <iprintf>
  33285. 800df74: e189 b.n 800e28a <tcp_slowtmr+0x362>
  33286. prev = pcb;
  33287. 800df76: 4625 mov r5, r4
  33288. pcb = pcb->next;
  33289. 800df78: 68e4 ldr r4, [r4, #12]
  33290. continue;
  33291. 800df7a: e178 b.n 800e26e <tcp_slowtmr+0x346>
  33292. if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
  33293. 800df7c: f894 3042 ldrb.w r3, [r4, #66] @ 0x42
  33294. 800df80: 2b05 cmp r3, #5
  33295. 800df82: f240 818d bls.w 800e2a0 <tcp_slowtmr+0x378>
  33296. ++pcb_remove;
  33297. 800df86: 2601 movs r6, #1
  33298. 800df88: e06e b.n 800e068 <tcp_slowtmr+0x140>
  33299. LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL);
  33300. 800df8a: 4b85 ldr r3, [pc, #532] @ (800e1a0 <tcp_slowtmr+0x278>)
  33301. 800df8c: f240 42d5 movw r2, #1237 @ 0x4d5
  33302. 800df90: 4988 ldr r1, [pc, #544] @ (800e1b4 <tcp_slowtmr+0x28c>)
  33303. 800df92: 4885 ldr r0, [pc, #532] @ (800e1a8 <tcp_slowtmr+0x280>)
  33304. 800df94: f005 fa38 bl 8013408 <iprintf>
  33305. 800df98: e199 b.n 800e2ce <tcp_slowtmr+0x3a6>
  33306. if (tcp_split_unsent_seg(pcb, (u16_t)pcb->snd_wnd) == ERR_OK) {
  33307. 800df9a: 4620 mov r0, r4
  33308. 800df9c: f002 fc4e bl 801083c <tcp_split_unsent_seg>
  33309. 800dfa0: b158 cbz r0, 800dfba <tcp_slowtmr+0x92>
  33310. pcb->persist_cnt = 0;
  33311. 800dfa2: 2300 movs r3, #0
  33312. 800dfa4: f884 3098 strb.w r3, [r4, #152] @ 0x98
  33313. if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) {
  33314. 800dfa8: f894 3099 ldrb.w r3, [r4, #153] @ 0x99
  33315. 800dfac: 2b06 cmp r3, #6
  33316. 800dfae: d87c bhi.n 800e0aa <tcp_slowtmr+0x182>
  33317. pcb->persist_backoff++;
  33318. 800dfb0: 3301 adds r3, #1
  33319. 800dfb2: f884 3099 strb.w r3, [r4, #153] @ 0x99
  33320. pcb_remove = 0;
  33321. 800dfb6: 2600 movs r6, #0
  33322. 800dfb8: e056 b.n 800e068 <tcp_slowtmr+0x140>
  33323. if (tcp_output(pcb) == ERR_OK) {
  33324. 800dfba: 4620 mov r0, r4
  33325. 800dfbc: f002 ff52 bl 8010e64 <tcp_output>
  33326. 800dfc0: 2800 cmp r0, #0
  33327. 800dfc2: d1ee bne.n 800dfa2 <tcp_slowtmr+0x7a>
  33328. pcb_remove = 0;
  33329. 800dfc4: 2600 movs r6, #0
  33330. 800dfc6: e04f b.n 800e068 <tcp_slowtmr+0x140>
  33331. if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) {
  33332. 800dfc8: f9b4 3030 ldrsh.w r3, [r4, #48] @ 0x30
  33333. 800dfcc: b29b uxth r3, r3
  33334. 800dfce: f647 72fe movw r2, #32766 @ 0x7ffe
  33335. 800dfd2: 4293 cmp r3, r2
  33336. 800dfd4: d801 bhi.n 800dfda <tcp_slowtmr+0xb2>
  33337. ++pcb->rtime;
  33338. 800dfd6: 3301 adds r3, #1
  33339. 800dfd8: 8623 strh r3, [r4, #48] @ 0x30
  33340. if (pcb->rtime >= pcb->rto) {
  33341. 800dfda: f9b4 2030 ldrsh.w r2, [r4, #48] @ 0x30
  33342. 800dfde: f9b4 3040 ldrsh.w r3, [r4, #64] @ 0x40
  33343. 800dfe2: 429a cmp r2, r3
  33344. 800dfe4: db40 blt.n 800e068 <tcp_slowtmr+0x140>
  33345. if ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) {
  33346. 800dfe6: 4620 mov r0, r4
  33347. 800dfe8: f002 fde8 bl 8010bbc <tcp_rexmit_rto_prepare>
  33348. 800dfec: b120 cbz r0, 800dff8 <tcp_slowtmr+0xd0>
  33349. 800dfee: 6f23 ldr r3, [r4, #112] @ 0x70
  33350. 800dff0: 2b00 cmp r3, #0
  33351. 800dff2: d139 bne.n 800e068 <tcp_slowtmr+0x140>
  33352. 800dff4: 6ee3 ldr r3, [r4, #108] @ 0x6c
  33353. 800dff6: b3bb cbz r3, 800e068 <tcp_slowtmr+0x140>
  33354. if (pcb->state != SYN_SENT) {
  33355. 800dff8: 7d23 ldrb r3, [r4, #20]
  33356. 800dffa: 2b02 cmp r3, #2
  33357. 800dffc: d014 beq.n 800e028 <tcp_slowtmr+0x100>
  33358. u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1);
  33359. 800dffe: f894 2042 ldrb.w r2, [r4, #66] @ 0x42
  33360. 800e002: 2a0c cmp r2, #12
  33361. 800e004: bf28 it cs
  33362. 800e006: 220c movcs r2, #12
  33363. int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx];
  33364. 800e008: f9b4 103c ldrsh.w r1, [r4, #60] @ 0x3c
  33365. 800e00c: f9b4 303e ldrsh.w r3, [r4, #62] @ 0x3e
  33366. 800e010: eb03 03e1 add.w r3, r3, r1, asr #3
  33367. 800e014: 4968 ldr r1, [pc, #416] @ (800e1b8 <tcp_slowtmr+0x290>)
  33368. 800e016: 5c8a ldrb r2, [r1, r2]
  33369. 800e018: 4093 lsls r3, r2
  33370. pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF);
  33371. 800e01a: f647 72fe movw r2, #32766 @ 0x7ffe
  33372. 800e01e: 4293 cmp r3, r2
  33373. 800e020: dc1e bgt.n 800e060 <tcp_slowtmr+0x138>
  33374. 800e022: b21b sxth r3, r3
  33375. 800e024: f8a4 3040 strh.w r3, [r4, #64] @ 0x40
  33376. pcb->rtime = 0;
  33377. 800e028: 2300 movs r3, #0
  33378. 800e02a: 8623 strh r3, [r4, #48] @ 0x30
  33379. eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
  33380. 800e02c: f8b4 3060 ldrh.w r3, [r4, #96] @ 0x60
  33381. 800e030: f8b4 2048 ldrh.w r2, [r4, #72] @ 0x48
  33382. 800e034: 4293 cmp r3, r2
  33383. 800e036: bf28 it cs
  33384. 800e038: 4613 movcs r3, r2
  33385. pcb->ssthresh = eff_wnd >> 1;
  33386. 800e03a: 085b lsrs r3, r3, #1
  33387. 800e03c: f8a4 304a strh.w r3, [r4, #74] @ 0x4a
  33388. if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) {
  33389. 800e040: 8e61 ldrh r1, [r4, #50] @ 0x32
  33390. 800e042: 004a lsls r2, r1, #1
  33391. 800e044: b292 uxth r2, r2
  33392. 800e046: 4293 cmp r3, r2
  33393. 800e048: d201 bcs.n 800e04e <tcp_slowtmr+0x126>
  33394. pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1);
  33395. 800e04a: f8a4 204a strh.w r2, [r4, #74] @ 0x4a
  33396. pcb->cwnd = pcb->mss;
  33397. 800e04e: f8a4 1048 strh.w r1, [r4, #72] @ 0x48
  33398. pcb->bytes_acked = 0;
  33399. 800e052: 2300 movs r3, #0
  33400. 800e054: f8a4 306a strh.w r3, [r4, #106] @ 0x6a
  33401. tcp_rexmit_rto_commit(pcb);
  33402. 800e058: 4620 mov r0, r4
  33403. 800e05a: f003 f859 bl 8011110 <tcp_rexmit_rto_commit>
  33404. 800e05e: e003 b.n 800e068 <tcp_slowtmr+0x140>
  33405. pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF);
  33406. 800e060: f647 73ff movw r3, #32767 @ 0x7fff
  33407. 800e064: e7de b.n 800e024 <tcp_slowtmr+0xfc>
  33408. ++pcb_remove;
  33409. 800e066: 2601 movs r6, #1
  33410. if (pcb->state == FIN_WAIT_2) {
  33411. 800e068: 7d23 ldrb r3, [r4, #20]
  33412. 800e06a: 2b06 cmp r3, #6
  33413. 800e06c: d01f beq.n 800e0ae <tcp_slowtmr+0x186>
  33414. if (ip_get_option(pcb, SOF_KEEPALIVE) &&
  33415. 800e06e: 7a62 ldrb r2, [r4, #9]
  33416. 800e070: f012 0708 ands.w r7, r2, #8
  33417. 800e074: d042 beq.n 800e0fc <tcp_slowtmr+0x1d4>
  33418. 800e076: 2b07 cmp r3, #7
  33419. 800e078: bf18 it ne
  33420. 800e07a: 2b04 cmpne r3, #4
  33421. 800e07c: d13d bne.n 800e0fa <tcp_slowtmr+0x1d2>
  33422. if ((u32_t)(tcp_ticks - pcb->tmr) >
  33423. 800e07e: 4b45 ldr r3, [pc, #276] @ (800e194 <tcp_slowtmr+0x26c>)
  33424. 800e080: 681a ldr r2, [r3, #0]
  33425. 800e082: 6a23 ldr r3, [r4, #32]
  33426. 800e084: 1ad2 subs r2, r2, r3
  33427. (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) {
  33428. 800e086: f8d4 1094 ldr.w r1, [r4, #148] @ 0x94
  33429. 800e08a: 4b4c ldr r3, [pc, #304] @ (800e1bc <tcp_slowtmr+0x294>)
  33430. 800e08c: 440b add r3, r1
  33431. 800e08e: 484c ldr r0, [pc, #304] @ (800e1c0 <tcp_slowtmr+0x298>)
  33432. 800e090: fba0 0303 umull r0, r3, r0, r3
  33433. if ((u32_t)(tcp_ticks - pcb->tmr) >
  33434. 800e094: ebb2 1f53 cmp.w r2, r3, lsr #5
  33435. 800e098: d916 bls.n 800e0c8 <tcp_slowtmr+0x1a0>
  33436. ++pcb_remove;
  33437. 800e09a: 3601 adds r6, #1
  33438. 800e09c: b2f6 uxtb r6, r6
  33439. ++pcb_reset;
  33440. 800e09e: 2701 movs r7, #1
  33441. 800e0a0: e02c b.n 800e0fc <tcp_slowtmr+0x1d4>
  33442. ++pcb_remove; /* max probes reached */
  33443. 800e0a2: 2601 movs r6, #1
  33444. 800e0a4: e7e0 b.n 800e068 <tcp_slowtmr+0x140>
  33445. pcb_remove = 0;
  33446. 800e0a6: 2600 movs r6, #0
  33447. 800e0a8: e7de b.n 800e068 <tcp_slowtmr+0x140>
  33448. 800e0aa: 2600 movs r6, #0
  33449. 800e0ac: e7dc b.n 800e068 <tcp_slowtmr+0x140>
  33450. if (pcb->flags & TF_RXCLOSED) {
  33451. 800e0ae: 8b62 ldrh r2, [r4, #26]
  33452. 800e0b0: f012 0f10 tst.w r2, #16
  33453. 800e0b4: d0db beq.n 800e06e <tcp_slowtmr+0x146>
  33454. if ((u32_t)(tcp_ticks - pcb->tmr) >
  33455. 800e0b6: 6a21 ldr r1, [r4, #32]
  33456. 800e0b8: 4a36 ldr r2, [pc, #216] @ (800e194 <tcp_slowtmr+0x26c>)
  33457. 800e0ba: 6812 ldr r2, [r2, #0]
  33458. 800e0bc: 1a52 subs r2, r2, r1
  33459. 800e0be: 2a28 cmp r2, #40 @ 0x28
  33460. 800e0c0: d9d5 bls.n 800e06e <tcp_slowtmr+0x146>
  33461. ++pcb_remove;
  33462. 800e0c2: 3601 adds r6, #1
  33463. 800e0c4: b2f6 uxtb r6, r6
  33464. LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in FIN-WAIT-2\n"));
  33465. 800e0c6: e7d2 b.n 800e06e <tcp_slowtmr+0x146>
  33466. (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb))
  33467. 800e0c8: f894 309b ldrb.w r3, [r4, #155] @ 0x9b
  33468. 800e0cc: 483d ldr r0, [pc, #244] @ (800e1c4 <tcp_slowtmr+0x29c>)
  33469. 800e0ce: fb00 1103 mla r1, r0, r3, r1
  33470. / TCP_SLOW_INTERVAL) {
  33471. 800e0d2: 4b3b ldr r3, [pc, #236] @ (800e1c0 <tcp_slowtmr+0x298>)
  33472. 800e0d4: fba3 3101 umull r3, r1, r3, r1
  33473. } else if ((u32_t)(tcp_ticks - pcb->tmr) >
  33474. 800e0d8: ebb2 1f51 cmp.w r2, r1, lsr #5
  33475. 800e0dc: d801 bhi.n 800e0e2 <tcp_slowtmr+0x1ba>
  33476. pcb_reset = 0;
  33477. 800e0de: 2700 movs r7, #0
  33478. 800e0e0: e00c b.n 800e0fc <tcp_slowtmr+0x1d4>
  33479. err = tcp_keepalive(pcb);
  33480. 800e0e2: 4620 mov r0, r4
  33481. 800e0e4: f003 f84a bl 801117c <tcp_keepalive>
  33482. if (err == ERR_OK) {
  33483. 800e0e8: 2800 cmp r0, #0
  33484. 800e0ea: d13b bne.n 800e164 <tcp_slowtmr+0x23c>
  33485. pcb->keep_cnt_sent++;
  33486. 800e0ec: f894 309b ldrb.w r3, [r4, #155] @ 0x9b
  33487. 800e0f0: 3301 adds r3, #1
  33488. 800e0f2: f884 309b strb.w r3, [r4, #155] @ 0x9b
  33489. pcb_reset = 0;
  33490. 800e0f6: 2700 movs r7, #0
  33491. 800e0f8: e000 b.n 800e0fc <tcp_slowtmr+0x1d4>
  33492. 800e0fa: 2700 movs r7, #0
  33493. if (pcb->ooseq != NULL &&
  33494. 800e0fc: 6f63 ldr r3, [r4, #116] @ 0x74
  33495. 800e0fe: b153 cbz r3, 800e116 <tcp_slowtmr+0x1ee>
  33496. (tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) {
  33497. 800e100: 6a23 ldr r3, [r4, #32]
  33498. 800e102: 4a24 ldr r2, [pc, #144] @ (800e194 <tcp_slowtmr+0x26c>)
  33499. 800e104: 6812 ldr r2, [r2, #0]
  33500. 800e106: 1ad2 subs r2, r2, r3
  33501. 800e108: f9b4 3040 ldrsh.w r3, [r4, #64] @ 0x40
  33502. 800e10c: eb03 0343 add.w r3, r3, r3, lsl #1
  33503. if (pcb->ooseq != NULL &&
  33504. 800e110: ebb2 0f43 cmp.w r2, r3, lsl #1
  33505. 800e114: d228 bcs.n 800e168 <tcp_slowtmr+0x240>
  33506. if (pcb->state == SYN_RCVD) {
  33507. 800e116: 7d23 ldrb r3, [r4, #20]
  33508. 800e118: 2b03 cmp r3, #3
  33509. 800e11a: d029 beq.n 800e170 <tcp_slowtmr+0x248>
  33510. if (pcb->state == LAST_ACK) {
  33511. 800e11c: 2b09 cmp r3, #9
  33512. 800e11e: d030 beq.n 800e182 <tcp_slowtmr+0x25a>
  33513. if (pcb_remove) {
  33514. 800e120: 2e00 cmp r6, #0
  33515. 800e122: d153 bne.n 800e1cc <tcp_slowtmr+0x2a4>
  33516. pcb = pcb->next;
  33517. 800e124: 68e6 ldr r6, [r4, #12]
  33518. ++prev->polltmr;
  33519. 800e126: 7f23 ldrb r3, [r4, #28]
  33520. 800e128: 3301 adds r3, #1
  33521. 800e12a: b2db uxtb r3, r3
  33522. 800e12c: 7723 strb r3, [r4, #28]
  33523. if (prev->polltmr >= prev->pollinterval) {
  33524. 800e12e: 7f62 ldrb r2, [r4, #29]
  33525. 800e130: 4293 cmp r3, r2
  33526. 800e132: f0c0 809a bcc.w 800e26a <tcp_slowtmr+0x342>
  33527. prev->polltmr = 0;
  33528. 800e136: 2300 movs r3, #0
  33529. 800e138: 7723 strb r3, [r4, #28]
  33530. tcp_active_pcbs_changed = 0;
  33531. 800e13a: 4a23 ldr r2, [pc, #140] @ (800e1c8 <tcp_slowtmr+0x2a0>)
  33532. 800e13c: 7013 strb r3, [r2, #0]
  33533. TCP_EVENT_POLL(prev, err);
  33534. 800e13e: f8d4 308c ldr.w r3, [r4, #140] @ 0x8c
  33535. 800e142: 2b00 cmp r3, #0
  33536. 800e144: f000 8089 beq.w 800e25a <tcp_slowtmr+0x332>
  33537. 800e148: 4621 mov r1, r4
  33538. 800e14a: 6920 ldr r0, [r4, #16]
  33539. 800e14c: 4798 blx r3
  33540. if (tcp_active_pcbs_changed) {
  33541. 800e14e: 4b1e ldr r3, [pc, #120] @ (800e1c8 <tcp_slowtmr+0x2a0>)
  33542. 800e150: 781b ldrb r3, [r3, #0]
  33543. 800e152: 2b00 cmp r3, #0
  33544. 800e154: f47f aef3 bne.w 800df3e <tcp_slowtmr+0x16>
  33545. if (err == ERR_OK) {
  33546. 800e158: 2800 cmp r0, #0
  33547. 800e15a: f000 8080 beq.w 800e25e <tcp_slowtmr+0x336>
  33548. prev = pcb;
  33549. 800e15e: 4625 mov r5, r4
  33550. pcb = pcb->next;
  33551. 800e160: 4634 mov r4, r6
  33552. 800e162: e084 b.n 800e26e <tcp_slowtmr+0x346>
  33553. pcb_reset = 0;
  33554. 800e164: 2700 movs r7, #0
  33555. 800e166: e7c9 b.n 800e0fc <tcp_slowtmr+0x1d4>
  33556. tcp_free_ooseq(pcb);
  33557. 800e168: 4620 mov r0, r4
  33558. 800e16a: f7ff fac9 bl 800d700 <tcp_free_ooseq>
  33559. 800e16e: e7d2 b.n 800e116 <tcp_slowtmr+0x1ee>
  33560. if ((u32_t)(tcp_ticks - pcb->tmr) >
  33561. 800e170: 6a21 ldr r1, [r4, #32]
  33562. 800e172: 4a08 ldr r2, [pc, #32] @ (800e194 <tcp_slowtmr+0x26c>)
  33563. 800e174: 6812 ldr r2, [r2, #0]
  33564. 800e176: 1a52 subs r2, r2, r1
  33565. 800e178: 2a28 cmp r2, #40 @ 0x28
  33566. 800e17a: d9cf bls.n 800e11c <tcp_slowtmr+0x1f4>
  33567. ++pcb_remove;
  33568. 800e17c: 3601 adds r6, #1
  33569. 800e17e: b2f6 uxtb r6, r6
  33570. LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n"));
  33571. 800e180: e7cc b.n 800e11c <tcp_slowtmr+0x1f4>
  33572. if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
  33573. 800e182: 6a22 ldr r2, [r4, #32]
  33574. 800e184: 4b03 ldr r3, [pc, #12] @ (800e194 <tcp_slowtmr+0x26c>)
  33575. 800e186: 681b ldr r3, [r3, #0]
  33576. 800e188: 1a9b subs r3, r3, r2
  33577. 800e18a: 2bf0 cmp r3, #240 @ 0xf0
  33578. 800e18c: d9c8 bls.n 800e120 <tcp_slowtmr+0x1f8>
  33579. ++pcb_remove;
  33580. 800e18e: 3601 adds r6, #1
  33581. 800e190: b2f6 uxtb r6, r6
  33582. LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n"));
  33583. 800e192: e7c5 b.n 800e120 <tcp_slowtmr+0x1f8>
  33584. 800e194: 24019be4 .word 0x24019be4
  33585. 800e198: 24019bd0 .word 0x24019bd0
  33586. 800e19c: 24019bd8 .word 0x24019bd8
  33587. 800e1a0: 080165b0 .word 0x080165b0
  33588. 800e1a4: 08016a70 .word 0x08016a70
  33589. 800e1a8: 080144e8 .word 0x080144e8
  33590. 800e1ac: 08016a9c .word 0x08016a9c
  33591. 800e1b0: 08016ac8 .word 0x08016ac8
  33592. 800e1b4: 08016b2c .word 0x08016b2c
  33593. 800e1b8: 08016c54 .word 0x08016c54
  33594. 800e1bc: 000a4cb8 .word 0x000a4cb8
  33595. 800e1c0: 10624dd3 .word 0x10624dd3
  33596. 800e1c4: 000124f8 .word 0x000124f8
  33597. 800e1c8: 24019bd2 .word 0x24019bd2
  33598. tcp_err_fn err_fn = pcb->errf;
  33599. 800e1cc: f8d4 8090 ldr.w r8, [r4, #144] @ 0x90
  33600. tcp_pcb_purge(pcb);
  33601. 800e1d0: 4620 mov r0, r4
  33602. 800e1d2: f7ff fa9f bl 800d714 <tcp_pcb_purge>
  33603. if (prev != NULL) {
  33604. 800e1d6: b325 cbz r5, 800e222 <tcp_slowtmr+0x2fa>
  33605. LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs);
  33606. 800e1d8: 4b6f ldr r3, [pc, #444] @ (800e398 <tcp_slowtmr+0x470>)
  33607. 800e1da: 681b ldr r3, [r3, #0]
  33608. 800e1dc: 429c cmp r4, r3
  33609. 800e1de: d018 beq.n 800e212 <tcp_slowtmr+0x2ea>
  33610. prev->next = pcb->next;
  33611. 800e1e0: 68e3 ldr r3, [r4, #12]
  33612. 800e1e2: 60eb str r3, [r5, #12]
  33613. if (pcb_reset) {
  33614. 800e1e4: bb67 cbnz r7, 800e240 <tcp_slowtmr+0x318>
  33615. err_arg = pcb->callback_arg;
  33616. 800e1e6: 6926 ldr r6, [r4, #16]
  33617. pcb = pcb->next;
  33618. 800e1e8: 68e7 ldr r7, [r4, #12]
  33619. tcp_free(pcb2);
  33620. 800e1ea: 4620 mov r0, r4
  33621. 800e1ec: f7ff f84a bl 800d284 <tcp_free>
  33622. tcp_active_pcbs_changed = 0;
  33623. 800e1f0: 4b6a ldr r3, [pc, #424] @ (800e39c <tcp_slowtmr+0x474>)
  33624. 800e1f2: 2200 movs r2, #0
  33625. 800e1f4: 701a strb r2, [r3, #0]
  33626. TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT);
  33627. 800e1f6: f1b8 0f00 cmp.w r8, #0
  33628. 800e1fa: d003 beq.n 800e204 <tcp_slowtmr+0x2dc>
  33629. 800e1fc: f06f 010c mvn.w r1, #12
  33630. 800e200: 4630 mov r0, r6
  33631. 800e202: 47c0 blx r8
  33632. if (tcp_active_pcbs_changed) {
  33633. 800e204: 4b65 ldr r3, [pc, #404] @ (800e39c <tcp_slowtmr+0x474>)
  33634. 800e206: 781b ldrb r3, [r3, #0]
  33635. 800e208: 2b00 cmp r3, #0
  33636. 800e20a: f47f ae98 bne.w 800df3e <tcp_slowtmr+0x16>
  33637. pcb = pcb->next;
  33638. 800e20e: 463c mov r4, r7
  33639. 800e210: e02d b.n 800e26e <tcp_slowtmr+0x346>
  33640. LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs);
  33641. 800e212: 4b63 ldr r3, [pc, #396] @ (800e3a0 <tcp_slowtmr+0x478>)
  33642. 800e214: f240 526d movw r2, #1389 @ 0x56d
  33643. 800e218: 4962 ldr r1, [pc, #392] @ (800e3a4 <tcp_slowtmr+0x47c>)
  33644. 800e21a: 4863 ldr r0, [pc, #396] @ (800e3a8 <tcp_slowtmr+0x480>)
  33645. 800e21c: f005 f8f4 bl 8013408 <iprintf>
  33646. 800e220: e7de b.n 800e1e0 <tcp_slowtmr+0x2b8>
  33647. LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb);
  33648. 800e222: 4b5d ldr r3, [pc, #372] @ (800e398 <tcp_slowtmr+0x470>)
  33649. 800e224: 681b ldr r3, [r3, #0]
  33650. 800e226: 429c cmp r4, r3
  33651. 800e228: d006 beq.n 800e238 <tcp_slowtmr+0x310>
  33652. 800e22a: 4b5d ldr r3, [pc, #372] @ (800e3a0 <tcp_slowtmr+0x478>)
  33653. 800e22c: f240 5271 movw r2, #1393 @ 0x571
  33654. 800e230: 495e ldr r1, [pc, #376] @ (800e3ac <tcp_slowtmr+0x484>)
  33655. 800e232: 485d ldr r0, [pc, #372] @ (800e3a8 <tcp_slowtmr+0x480>)
  33656. 800e234: f005 f8e8 bl 8013408 <iprintf>
  33657. tcp_active_pcbs = pcb->next;
  33658. 800e238: 68e2 ldr r2, [r4, #12]
  33659. 800e23a: 4b57 ldr r3, [pc, #348] @ (800e398 <tcp_slowtmr+0x470>)
  33660. 800e23c: 601a str r2, [r3, #0]
  33661. 800e23e: e7d1 b.n 800e1e4 <tcp_slowtmr+0x2bc>
  33662. tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
  33663. 800e240: 1d23 adds r3, r4, #4
  33664. 800e242: 6a62 ldr r2, [r4, #36] @ 0x24
  33665. 800e244: 6d21 ldr r1, [r4, #80] @ 0x50
  33666. 800e246: 8b20 ldrh r0, [r4, #24]
  33667. 800e248: 9002 str r0, [sp, #8]
  33668. 800e24a: 8ae0 ldrh r0, [r4, #22]
  33669. 800e24c: 9001 str r0, [sp, #4]
  33670. 800e24e: 9300 str r3, [sp, #0]
  33671. 800e250: 4623 mov r3, r4
  33672. 800e252: 4620 mov r0, r4
  33673. 800e254: f002 fd84 bl 8010d60 <tcp_rst>
  33674. 800e258: e7c5 b.n 800e1e6 <tcp_slowtmr+0x2be>
  33675. TCP_EVENT_POLL(prev, err);
  33676. 800e25a: 2000 movs r0, #0
  33677. 800e25c: e777 b.n 800e14e <tcp_slowtmr+0x226>
  33678. tcp_output(prev);
  33679. 800e25e: 4620 mov r0, r4
  33680. 800e260: f002 fe00 bl 8010e64 <tcp_output>
  33681. prev = pcb;
  33682. 800e264: 4625 mov r5, r4
  33683. pcb = pcb->next;
  33684. 800e266: 4634 mov r4, r6
  33685. 800e268: e001 b.n 800e26e <tcp_slowtmr+0x346>
  33686. prev = pcb;
  33687. 800e26a: 4625 mov r5, r4
  33688. pcb = pcb->next;
  33689. 800e26c: 4634 mov r4, r6
  33690. while (pcb != NULL) {
  33691. 800e26e: 2c00 cmp r4, #0
  33692. 800e270: d050 beq.n 800e314 <tcp_slowtmr+0x3ec>
  33693. LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED);
  33694. 800e272: 7d23 ldrb r3, [r4, #20]
  33695. 800e274: 2b00 cmp r3, #0
  33696. 800e276: f43f ae66 beq.w 800df46 <tcp_slowtmr+0x1e>
  33697. LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN);
  33698. 800e27a: 7d23 ldrb r3, [r4, #20]
  33699. 800e27c: 2b01 cmp r3, #1
  33700. 800e27e: f43f ae6a beq.w 800df56 <tcp_slowtmr+0x2e>
  33701. LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT);
  33702. 800e282: 7d23 ldrb r3, [r4, #20]
  33703. 800e284: 2b0a cmp r3, #10
  33704. 800e286: f43f ae6e beq.w 800df66 <tcp_slowtmr+0x3e>
  33705. if (pcb->last_timer == tcp_timer_ctr) {
  33706. 800e28a: 7fa2 ldrb r2, [r4, #30]
  33707. 800e28c: 4b48 ldr r3, [pc, #288] @ (800e3b0 <tcp_slowtmr+0x488>)
  33708. 800e28e: 781b ldrb r3, [r3, #0]
  33709. 800e290: 429a cmp r2, r3
  33710. 800e292: f43f ae70 beq.w 800df76 <tcp_slowtmr+0x4e>
  33711. pcb->last_timer = tcp_timer_ctr;
  33712. 800e296: 77a3 strb r3, [r4, #30]
  33713. if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) {
  33714. 800e298: 7d23 ldrb r3, [r4, #20]
  33715. 800e29a: 2b02 cmp r3, #2
  33716. 800e29c: f43f ae6e beq.w 800df7c <tcp_slowtmr+0x54>
  33717. } else if (pcb->nrtx >= TCP_MAXRTX) {
  33718. 800e2a0: f894 3042 ldrb.w r3, [r4, #66] @ 0x42
  33719. 800e2a4: 2b0b cmp r3, #11
  33720. 800e2a6: f63f aede bhi.w 800e066 <tcp_slowtmr+0x13e>
  33721. if (pcb->persist_backoff > 0) {
  33722. 800e2aa: f894 6099 ldrb.w r6, [r4, #153] @ 0x99
  33723. 800e2ae: 2e00 cmp r6, #0
  33724. 800e2b0: f43f ae8a beq.w 800dfc8 <tcp_slowtmr+0xa0>
  33725. LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL);
  33726. 800e2b4: 6f23 ldr r3, [r4, #112] @ 0x70
  33727. 800e2b6: b133 cbz r3, 800e2c6 <tcp_slowtmr+0x39e>
  33728. 800e2b8: 4b39 ldr r3, [pc, #228] @ (800e3a0 <tcp_slowtmr+0x478>)
  33729. 800e2ba: f240 42d4 movw r2, #1236 @ 0x4d4
  33730. 800e2be: 493d ldr r1, [pc, #244] @ (800e3b4 <tcp_slowtmr+0x48c>)
  33731. 800e2c0: 4839 ldr r0, [pc, #228] @ (800e3a8 <tcp_slowtmr+0x480>)
  33732. 800e2c2: f005 f8a1 bl 8013408 <iprintf>
  33733. LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL);
  33734. 800e2c6: 6ee3 ldr r3, [r4, #108] @ 0x6c
  33735. 800e2c8: 2b00 cmp r3, #0
  33736. 800e2ca: f43f ae5e beq.w 800df8a <tcp_slowtmr+0x62>
  33737. if (pcb->persist_probe >= TCP_MAXRTX) {
  33738. 800e2ce: f894 309a ldrb.w r3, [r4, #154] @ 0x9a
  33739. 800e2d2: 2b0b cmp r3, #11
  33740. 800e2d4: f63f aee5 bhi.w 800e0a2 <tcp_slowtmr+0x17a>
  33741. u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1];
  33742. 800e2d8: f894 3099 ldrb.w r3, [r4, #153] @ 0x99
  33743. 800e2dc: 3b01 subs r3, #1
  33744. 800e2de: 4a36 ldr r2, [pc, #216] @ (800e3b8 <tcp_slowtmr+0x490>)
  33745. 800e2e0: 5cd2 ldrb r2, [r2, r3]
  33746. if (pcb->persist_cnt < backoff_cnt) {
  33747. 800e2e2: f894 3098 ldrb.w r3, [r4, #152] @ 0x98
  33748. 800e2e6: 4293 cmp r3, r2
  33749. 800e2e8: d202 bcs.n 800e2f0 <tcp_slowtmr+0x3c8>
  33750. pcb->persist_cnt++;
  33751. 800e2ea: 3301 adds r3, #1
  33752. 800e2ec: f884 3098 strb.w r3, [r4, #152] @ 0x98
  33753. if (pcb->persist_cnt >= backoff_cnt) {
  33754. 800e2f0: f894 3098 ldrb.w r3, [r4, #152] @ 0x98
  33755. 800e2f4: 4293 cmp r3, r2
  33756. 800e2f6: f4ff aed6 bcc.w 800e0a6 <tcp_slowtmr+0x17e>
  33757. if (pcb->snd_wnd == 0) {
  33758. 800e2fa: f8b4 1060 ldrh.w r1, [r4, #96] @ 0x60
  33759. 800e2fe: 2900 cmp r1, #0
  33760. 800e300: f47f ae4b bne.w 800df9a <tcp_slowtmr+0x72>
  33761. if (tcp_zero_window_probe(pcb) != ERR_OK) {
  33762. 800e304: 4620 mov r0, r4
  33763. 800e306: f002 ff67 bl 80111d8 <tcp_zero_window_probe>
  33764. 800e30a: 2800 cmp r0, #0
  33765. 800e30c: f43f ae49 beq.w 800dfa2 <tcp_slowtmr+0x7a>
  33766. pcb_remove = 0;
  33767. 800e310: 2600 movs r6, #0
  33768. 800e312: e6a9 b.n 800e068 <tcp_slowtmr+0x140>
  33769. pcb = tcp_tw_pcbs;
  33770. 800e314: 4b29 ldr r3, [pc, #164] @ (800e3bc <tcp_slowtmr+0x494>)
  33771. 800e316: 681d ldr r5, [r3, #0]
  33772. while (pcb != NULL) {
  33773. 800e318: e007 b.n 800e32a <tcp_slowtmr+0x402>
  33774. if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
  33775. 800e31a: 6a2a ldr r2, [r5, #32]
  33776. 800e31c: 4b28 ldr r3, [pc, #160] @ (800e3c0 <tcp_slowtmr+0x498>)
  33777. 800e31e: 681b ldr r3, [r3, #0]
  33778. 800e320: 1a9b subs r3, r3, r2
  33779. 800e322: 2bf0 cmp r3, #240 @ 0xf0
  33780. 800e324: d80e bhi.n 800e344 <tcp_slowtmr+0x41c>
  33781. prev = pcb;
  33782. 800e326: 462c mov r4, r5
  33783. pcb = pcb->next;
  33784. 800e328: 68ed ldr r5, [r5, #12]
  33785. while (pcb != NULL) {
  33786. 800e32a: 2d00 cmp r5, #0
  33787. 800e32c: d031 beq.n 800e392 <tcp_slowtmr+0x46a>
  33788. LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
  33789. 800e32e: 7d2b ldrb r3, [r5, #20]
  33790. 800e330: 2b0a cmp r3, #10
  33791. 800e332: d0f2 beq.n 800e31a <tcp_slowtmr+0x3f2>
  33792. 800e334: 4b1a ldr r3, [pc, #104] @ (800e3a0 <tcp_slowtmr+0x478>)
  33793. 800e336: f240 52a1 movw r2, #1441 @ 0x5a1
  33794. 800e33a: 4922 ldr r1, [pc, #136] @ (800e3c4 <tcp_slowtmr+0x49c>)
  33795. 800e33c: 481a ldr r0, [pc, #104] @ (800e3a8 <tcp_slowtmr+0x480>)
  33796. 800e33e: f005 f863 bl 8013408 <iprintf>
  33797. 800e342: e7ea b.n 800e31a <tcp_slowtmr+0x3f2>
  33798. tcp_pcb_purge(pcb);
  33799. 800e344: 4628 mov r0, r5
  33800. 800e346: f7ff f9e5 bl 800d714 <tcp_pcb_purge>
  33801. if (prev != NULL) {
  33802. 800e34a: b19c cbz r4, 800e374 <tcp_slowtmr+0x44c>
  33803. LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs);
  33804. 800e34c: 4b1b ldr r3, [pc, #108] @ (800e3bc <tcp_slowtmr+0x494>)
  33805. 800e34e: 681b ldr r3, [r3, #0]
  33806. 800e350: 429d cmp r5, r3
  33807. 800e352: d007 beq.n 800e364 <tcp_slowtmr+0x43c>
  33808. prev->next = pcb->next;
  33809. 800e354: 68eb ldr r3, [r5, #12]
  33810. 800e356: 60e3 str r3, [r4, #12]
  33811. pcb = pcb->next;
  33812. 800e358: 68ee ldr r6, [r5, #12]
  33813. tcp_free(pcb2);
  33814. 800e35a: 4628 mov r0, r5
  33815. 800e35c: f7fe ff92 bl 800d284 <tcp_free>
  33816. pcb = pcb->next;
  33817. 800e360: 4635 mov r5, r6
  33818. 800e362: e7e2 b.n 800e32a <tcp_slowtmr+0x402>
  33819. LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs);
  33820. 800e364: 4b0e ldr r3, [pc, #56] @ (800e3a0 <tcp_slowtmr+0x478>)
  33821. 800e366: f240 52af movw r2, #1455 @ 0x5af
  33822. 800e36a: 4917 ldr r1, [pc, #92] @ (800e3c8 <tcp_slowtmr+0x4a0>)
  33823. 800e36c: 480e ldr r0, [pc, #56] @ (800e3a8 <tcp_slowtmr+0x480>)
  33824. 800e36e: f005 f84b bl 8013408 <iprintf>
  33825. 800e372: e7ef b.n 800e354 <tcp_slowtmr+0x42c>
  33826. LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb);
  33827. 800e374: 4b11 ldr r3, [pc, #68] @ (800e3bc <tcp_slowtmr+0x494>)
  33828. 800e376: 681b ldr r3, [r3, #0]
  33829. 800e378: 429d cmp r5, r3
  33830. 800e37a: d006 beq.n 800e38a <tcp_slowtmr+0x462>
  33831. 800e37c: 4b08 ldr r3, [pc, #32] @ (800e3a0 <tcp_slowtmr+0x478>)
  33832. 800e37e: f240 52b3 movw r2, #1459 @ 0x5b3
  33833. 800e382: 4912 ldr r1, [pc, #72] @ (800e3cc <tcp_slowtmr+0x4a4>)
  33834. 800e384: 4808 ldr r0, [pc, #32] @ (800e3a8 <tcp_slowtmr+0x480>)
  33835. 800e386: f005 f83f bl 8013408 <iprintf>
  33836. tcp_tw_pcbs = pcb->next;
  33837. 800e38a: 68ea ldr r2, [r5, #12]
  33838. 800e38c: 4b0b ldr r3, [pc, #44] @ (800e3bc <tcp_slowtmr+0x494>)
  33839. 800e38e: 601a str r2, [r3, #0]
  33840. 800e390: e7e2 b.n 800e358 <tcp_slowtmr+0x430>
  33841. }
  33842. 800e392: b004 add sp, #16
  33843. 800e394: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  33844. 800e398: 24019bd8 .word 0x24019bd8
  33845. 800e39c: 24019bd2 .word 0x24019bd2
  33846. 800e3a0: 080165b0 .word 0x080165b0
  33847. 800e3a4: 08016b64 .word 0x08016b64
  33848. 800e3a8: 080144e8 .word 0x080144e8
  33849. 800e3ac: 08016b90 .word 0x08016b90
  33850. 800e3b0: 24019bd0 .word 0x24019bd0
  33851. 800e3b4: 08016af8 .word 0x08016af8
  33852. 800e3b8: 08016c4c .word 0x08016c4c
  33853. 800e3bc: 24019bd4 .word 0x24019bd4
  33854. 800e3c0: 24019be4 .word 0x24019be4
  33855. 800e3c4: 08016bbc .word 0x08016bbc
  33856. 800e3c8: 08016bec .word 0x08016bec
  33857. 800e3cc: 08016c14 .word 0x08016c14
  33858. 0800e3d0 <tcp_tmr>:
  33859. {
  33860. 800e3d0: b508 push {r3, lr}
  33861. tcp_fasttmr();
  33862. 800e3d2: f7ff fd25 bl 800de20 <tcp_fasttmr>
  33863. if (++tcp_timer & 1) {
  33864. 800e3d6: 4a06 ldr r2, [pc, #24] @ (800e3f0 <tcp_tmr+0x20>)
  33865. 800e3d8: 7813 ldrb r3, [r2, #0]
  33866. 800e3da: 3301 adds r3, #1
  33867. 800e3dc: b2db uxtb r3, r3
  33868. 800e3de: 7013 strb r3, [r2, #0]
  33869. 800e3e0: f013 0f01 tst.w r3, #1
  33870. 800e3e4: d100 bne.n 800e3e8 <tcp_tmr+0x18>
  33871. }
  33872. 800e3e6: bd08 pop {r3, pc}
  33873. tcp_slowtmr();
  33874. 800e3e8: f7ff fd9e bl 800df28 <tcp_slowtmr>
  33875. }
  33876. 800e3ec: e7fb b.n 800e3e6 <tcp_tmr+0x16>
  33877. 800e3ee: bf00 nop
  33878. 800e3f0: 24019bd1 .word 0x24019bd1
  33879. 0800e3f4 <tcp_get_next_optbyte>:
  33880. }
  33881. static u8_t
  33882. tcp_get_next_optbyte(void)
  33883. {
  33884. u16_t optidx = tcp_optidx++;
  33885. 800e3f4: 4a0a ldr r2, [pc, #40] @ (800e420 <tcp_get_next_optbyte+0x2c>)
  33886. 800e3f6: 8813 ldrh r3, [r2, #0]
  33887. 800e3f8: 1c59 adds r1, r3, #1
  33888. 800e3fa: 8011 strh r1, [r2, #0]
  33889. if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) {
  33890. 800e3fc: 4a09 ldr r2, [pc, #36] @ (800e424 <tcp_get_next_optbyte+0x30>)
  33891. 800e3fe: 6811 ldr r1, [r2, #0]
  33892. 800e400: b119 cbz r1, 800e40a <tcp_get_next_optbyte+0x16>
  33893. 800e402: 4a09 ldr r2, [pc, #36] @ (800e428 <tcp_get_next_optbyte+0x34>)
  33894. 800e404: 8812 ldrh r2, [r2, #0]
  33895. 800e406: 4293 cmp r3, r2
  33896. 800e408: d204 bcs.n 800e414 <tcp_get_next_optbyte+0x20>
  33897. u8_t *opts = (u8_t *)tcphdr + TCP_HLEN;
  33898. 800e40a: 4a08 ldr r2, [pc, #32] @ (800e42c <tcp_get_next_optbyte+0x38>)
  33899. 800e40c: 6812 ldr r2, [r2, #0]
  33900. return opts[optidx];
  33901. 800e40e: 4413 add r3, r2
  33902. 800e410: 7d18 ldrb r0, [r3, #20]
  33903. 800e412: 4770 bx lr
  33904. } else {
  33905. u8_t idx = (u8_t)(optidx - tcphdr_opt1len);
  33906. 800e414: b2db uxtb r3, r3
  33907. 800e416: b2d2 uxtb r2, r2
  33908. 800e418: 1a9b subs r3, r3, r2
  33909. 800e41a: b2db uxtb r3, r3
  33910. return tcphdr_opt2[idx];
  33911. 800e41c: 5cc8 ldrb r0, [r1, r3]
  33912. }
  33913. }
  33914. 800e41e: 4770 bx lr
  33915. 800e420: 24019c00 .word 0x24019c00
  33916. 800e424: 24019c04 .word 0x24019c04
  33917. 800e428: 24019c08 .word 0x24019c08
  33918. 800e42c: 24019c0c .word 0x24019c0c
  33919. 0800e430 <tcp_parseopt>:
  33920. *
  33921. * @param pcb the tcp_pcb for which a segment arrived
  33922. */
  33923. static void
  33924. tcp_parseopt(struct tcp_pcb *pcb)
  33925. {
  33926. 800e430: b538 push {r3, r4, r5, lr}
  33927. u16_t mss;
  33928. #if LWIP_TCP_TIMESTAMPS
  33929. u32_t tsval;
  33930. #endif
  33931. LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL);
  33932. 800e432: 4604 mov r4, r0
  33933. 800e434: b1e8 cbz r0, 800e472 <tcp_parseopt+0x42>
  33934. /* Parse the TCP MSS option, if present. */
  33935. if (tcphdr_optlen != 0) {
  33936. 800e436: 4b22 ldr r3, [pc, #136] @ (800e4c0 <tcp_parseopt+0x90>)
  33937. 800e438: 881b ldrh r3, [r3, #0]
  33938. 800e43a: 2b00 cmp r3, #0
  33939. 800e43c: d03e beq.n 800e4bc <tcp_parseopt+0x8c>
  33940. for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) {
  33941. 800e43e: 4b21 ldr r3, [pc, #132] @ (800e4c4 <tcp_parseopt+0x94>)
  33942. 800e440: 2200 movs r2, #0
  33943. 800e442: 801a strh r2, [r3, #0]
  33944. 800e444: 4b1f ldr r3, [pc, #124] @ (800e4c4 <tcp_parseopt+0x94>)
  33945. 800e446: 881a ldrh r2, [r3, #0]
  33946. 800e448: 4b1d ldr r3, [pc, #116] @ (800e4c0 <tcp_parseopt+0x90>)
  33947. 800e44a: 881b ldrh r3, [r3, #0]
  33948. 800e44c: 429a cmp r2, r3
  33949. 800e44e: d235 bcs.n 800e4bc <tcp_parseopt+0x8c>
  33950. u8_t opt = tcp_get_next_optbyte();
  33951. 800e450: f7ff ffd0 bl 800e3f4 <tcp_get_next_optbyte>
  33952. switch (opt) {
  33953. 800e454: 2801 cmp r0, #1
  33954. 800e456: d0f5 beq.n 800e444 <tcp_parseopt+0x14>
  33955. 800e458: 2802 cmp r0, #2
  33956. 800e45a: d012 beq.n 800e482 <tcp_parseopt+0x52>
  33957. 800e45c: b370 cbz r0, 800e4bc <tcp_parseopt+0x8c>
  33958. }
  33959. break;
  33960. #endif /* LWIP_TCP_SACK_OUT */
  33961. default:
  33962. LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n"));
  33963. data = tcp_get_next_optbyte();
  33964. 800e45e: f7ff ffc9 bl 800e3f4 <tcp_get_next_optbyte>
  33965. if (data < 2) {
  33966. 800e462: 2801 cmp r0, #1
  33967. 800e464: d92a bls.n 800e4bc <tcp_parseopt+0x8c>
  33968. and we don't process them further. */
  33969. return;
  33970. }
  33971. /* All other options have a length field, so that we easily
  33972. can skip past them. */
  33973. tcp_optidx += data - 2;
  33974. 800e466: 4b17 ldr r3, [pc, #92] @ (800e4c4 <tcp_parseopt+0x94>)
  33975. 800e468: 881a ldrh r2, [r3, #0]
  33976. 800e46a: 4410 add r0, r2
  33977. 800e46c: 3802 subs r0, #2
  33978. 800e46e: 8018 strh r0, [r3, #0]
  33979. 800e470: e7e8 b.n 800e444 <tcp_parseopt+0x14>
  33980. LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL);
  33981. 800e472: 4b15 ldr r3, [pc, #84] @ (800e4c8 <tcp_parseopt+0x98>)
  33982. 800e474: f240 727d movw r2, #1917 @ 0x77d
  33983. 800e478: 4914 ldr r1, [pc, #80] @ (800e4cc <tcp_parseopt+0x9c>)
  33984. 800e47a: 4815 ldr r0, [pc, #84] @ (800e4d0 <tcp_parseopt+0xa0>)
  33985. 800e47c: f004 ffc4 bl 8013408 <iprintf>
  33986. 800e480: e7d9 b.n 800e436 <tcp_parseopt+0x6>
  33987. if (tcp_get_next_optbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) {
  33988. 800e482: f7ff ffb7 bl 800e3f4 <tcp_get_next_optbyte>
  33989. 800e486: 2804 cmp r0, #4
  33990. 800e488: d118 bne.n 800e4bc <tcp_parseopt+0x8c>
  33991. 800e48a: 4b0e ldr r3, [pc, #56] @ (800e4c4 <tcp_parseopt+0x94>)
  33992. 800e48c: 881b ldrh r3, [r3, #0]
  33993. 800e48e: 3301 adds r3, #1
  33994. 800e490: 4a0b ldr r2, [pc, #44] @ (800e4c0 <tcp_parseopt+0x90>)
  33995. 800e492: 8812 ldrh r2, [r2, #0]
  33996. 800e494: 4293 cmp r3, r2
  33997. 800e496: da11 bge.n 800e4bc <tcp_parseopt+0x8c>
  33998. mss = (u16_t)(tcp_get_next_optbyte() << 8);
  33999. 800e498: f7ff ffac bl 800e3f4 <tcp_get_next_optbyte>
  34000. 800e49c: 0205 lsls r5, r0, #8
  34001. 800e49e: b2ad uxth r5, r5
  34002. mss |= tcp_get_next_optbyte();
  34003. 800e4a0: f7ff ffa8 bl 800e3f4 <tcp_get_next_optbyte>
  34004. 800e4a4: 4328 orrs r0, r5
  34005. 800e4a6: b280 uxth r0, r0
  34006. pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss;
  34007. 800e4a8: 1e43 subs r3, r0, #1
  34008. 800e4aa: b29b uxth r3, r3
  34009. 800e4ac: f240 52b3 movw r2, #1459 @ 0x5b3
  34010. 800e4b0: 4293 cmp r3, r2
  34011. 800e4b2: d901 bls.n 800e4b8 <tcp_parseopt+0x88>
  34012. 800e4b4: f240 50b4 movw r0, #1460 @ 0x5b4
  34013. 800e4b8: 8660 strh r0, [r4, #50] @ 0x32
  34014. break;
  34015. 800e4ba: e7c3 b.n 800e444 <tcp_parseopt+0x14>
  34016. }
  34017. }
  34018. }
  34019. }
  34020. 800e4bc: bd38 pop {r3, r4, r5, pc}
  34021. 800e4be: bf00 nop
  34022. 800e4c0: 24019c0a .word 0x24019c0a
  34023. 800e4c4: 24019c00 .word 0x24019c00
  34024. 800e4c8: 08016c64 .word 0x08016c64
  34025. 800e4cc: 08016cc8 .word 0x08016cc8
  34026. 800e4d0: 080144e8 .word 0x080144e8
  34027. 0800e4d4 <tcp_input_delayed_close>:
  34028. {
  34029. 800e4d4: b510 push {r4, lr}
  34030. LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);
  34031. 800e4d6: 4604 mov r4, r0
  34032. 800e4d8: b130 cbz r0, 800e4e8 <tcp_input_delayed_close+0x14>
  34033. if (recv_flags & TF_CLOSED) {
  34034. 800e4da: 4b11 ldr r3, [pc, #68] @ (800e520 <tcp_input_delayed_close+0x4c>)
  34035. 800e4dc: 781b ldrb r3, [r3, #0]
  34036. 800e4de: f013 0f10 tst.w r3, #16
  34037. 800e4e2: d109 bne.n 800e4f8 <tcp_input_delayed_close+0x24>
  34038. return 0;
  34039. 800e4e4: 2000 movs r0, #0
  34040. }
  34041. 800e4e6: bd10 pop {r4, pc}
  34042. LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL);
  34043. 800e4e8: 4b0e ldr r3, [pc, #56] @ (800e524 <tcp_input_delayed_close+0x50>)
  34044. 800e4ea: f240 225a movw r2, #602 @ 0x25a
  34045. 800e4ee: 490e ldr r1, [pc, #56] @ (800e528 <tcp_input_delayed_close+0x54>)
  34046. 800e4f0: 480e ldr r0, [pc, #56] @ (800e52c <tcp_input_delayed_close+0x58>)
  34047. 800e4f2: f004 ff89 bl 8013408 <iprintf>
  34048. 800e4f6: e7f0 b.n 800e4da <tcp_input_delayed_close+0x6>
  34049. if (!(pcb->flags & TF_RXCLOSED)) {
  34050. 800e4f8: 8b63 ldrh r3, [r4, #26]
  34051. 800e4fa: f013 0f10 tst.w r3, #16
  34052. 800e4fe: d106 bne.n 800e50e <tcp_input_delayed_close+0x3a>
  34053. TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD);
  34054. 800e500: f8d4 3090 ldr.w r3, [r4, #144] @ 0x90
  34055. 800e504: b11b cbz r3, 800e50e <tcp_input_delayed_close+0x3a>
  34056. 800e506: f06f 010e mvn.w r1, #14
  34057. 800e50a: 6920 ldr r0, [r4, #16]
  34058. 800e50c: 4798 blx r3
  34059. tcp_pcb_remove(&tcp_active_pcbs, pcb);
  34060. 800e50e: 4621 mov r1, r4
  34061. 800e510: 4807 ldr r0, [pc, #28] @ (800e530 <tcp_input_delayed_close+0x5c>)
  34062. 800e512: f7ff f931 bl 800d778 <tcp_pcb_remove>
  34063. tcp_free(pcb);
  34064. 800e516: 4620 mov r0, r4
  34065. 800e518: f7fe feb4 bl 800d284 <tcp_free>
  34066. return 1;
  34067. 800e51c: 2001 movs r0, #1
  34068. 800e51e: e7e2 b.n 800e4e6 <tcp_input_delayed_close+0x12>
  34069. 800e520: 24019bf0 .word 0x24019bf0
  34070. 800e524: 08016c64 .word 0x08016c64
  34071. 800e528: 08016ce4 .word 0x08016ce4
  34072. 800e52c: 080144e8 .word 0x080144e8
  34073. 800e530: 24019bd8 .word 0x24019bd8
  34074. 0800e534 <tcp_timewait_input>:
  34075. if (flags & TCP_RST) {
  34076. 800e534: 4b23 ldr r3, [pc, #140] @ (800e5c4 <tcp_timewait_input+0x90>)
  34077. 800e536: 781b ldrb r3, [r3, #0]
  34078. 800e538: f013 0f04 tst.w r3, #4
  34079. 800e53c: d141 bne.n 800e5c2 <tcp_timewait_input+0x8e>
  34080. {
  34081. 800e53e: b530 push {r4, r5, lr}
  34082. 800e540: b085 sub sp, #20
  34083. 800e542: 4604 mov r4, r0
  34084. LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);
  34085. 800e544: b1a0 cbz r0, 800e570 <tcp_timewait_input+0x3c>
  34086. if (flags & TCP_SYN) {
  34087. 800e546: 4b1f ldr r3, [pc, #124] @ (800e5c4 <tcp_timewait_input+0x90>)
  34088. 800e548: 781b ldrb r3, [r3, #0]
  34089. 800e54a: f013 0f02 tst.w r3, #2
  34090. 800e54e: d029 beq.n 800e5a4 <tcp_timewait_input+0x70>
  34091. if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) {
  34092. 800e550: 4b1d ldr r3, [pc, #116] @ (800e5c8 <tcp_timewait_input+0x94>)
  34093. 800e552: 681a ldr r2, [r3, #0]
  34094. 800e554: 6a63 ldr r3, [r4, #36] @ 0x24
  34095. 800e556: 1ad1 subs r1, r2, r3
  34096. 800e558: 2900 cmp r1, #0
  34097. 800e55a: db04 blt.n 800e566 <tcp_timewait_input+0x32>
  34098. 800e55c: 8d21 ldrh r1, [r4, #40] @ 0x28
  34099. 800e55e: 440b add r3, r1
  34100. 800e560: 1ad3 subs r3, r2, r3
  34101. 800e562: 2b00 cmp r3, #0
  34102. 800e564: dd0c ble.n 800e580 <tcp_timewait_input+0x4c>
  34103. if ((tcplen > 0)) {
  34104. 800e566: 4b19 ldr r3, [pc, #100] @ (800e5cc <tcp_timewait_input+0x98>)
  34105. 800e568: 881b ldrh r3, [r3, #0]
  34106. 800e56a: bb13 cbnz r3, 800e5b2 <tcp_timewait_input+0x7e>
  34107. }
  34108. 800e56c: b005 add sp, #20
  34109. 800e56e: bd30 pop {r4, r5, pc}
  34110. LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL);
  34111. 800e570: 4b17 ldr r3, [pc, #92] @ (800e5d0 <tcp_timewait_input+0x9c>)
  34112. 800e572: f240 22ee movw r2, #750 @ 0x2ee
  34113. 800e576: 4917 ldr r1, [pc, #92] @ (800e5d4 <tcp_timewait_input+0xa0>)
  34114. 800e578: 4817 ldr r0, [pc, #92] @ (800e5d8 <tcp_timewait_input+0xa4>)
  34115. 800e57a: f004 ff45 bl 8013408 <iprintf>
  34116. 800e57e: e7e2 b.n 800e546 <tcp_timewait_input+0x12>
  34117. ip_current_src_addr(), tcphdr->dest, tcphdr->src);
  34118. 800e580: 4b16 ldr r3, [pc, #88] @ (800e5dc <tcp_timewait_input+0xa8>)
  34119. 800e582: 6819 ldr r1, [r3, #0]
  34120. tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
  34121. 800e584: 4b16 ldr r3, [pc, #88] @ (800e5e0 <tcp_timewait_input+0xac>)
  34122. 800e586: 4811 ldr r0, [pc, #68] @ (800e5cc <tcp_timewait_input+0x98>)
  34123. 800e588: 8800 ldrh r0, [r0, #0]
  34124. 800e58a: 880d ldrh r5, [r1, #0]
  34125. 800e58c: 9502 str r5, [sp, #8]
  34126. 800e58e: 8849 ldrh r1, [r1, #2]
  34127. 800e590: 9101 str r1, [sp, #4]
  34128. 800e592: 1f19 subs r1, r3, #4
  34129. 800e594: 9100 str r1, [sp, #0]
  34130. 800e596: 4402 add r2, r0
  34131. 800e598: 4912 ldr r1, [pc, #72] @ (800e5e4 <tcp_timewait_input+0xb0>)
  34132. 800e59a: 6809 ldr r1, [r1, #0]
  34133. 800e59c: 4620 mov r0, r4
  34134. 800e59e: f002 fbdf bl 8010d60 <tcp_rst>
  34135. return;
  34136. 800e5a2: e7e3 b.n 800e56c <tcp_timewait_input+0x38>
  34137. } else if (flags & TCP_FIN) {
  34138. 800e5a4: f013 0f01 tst.w r3, #1
  34139. 800e5a8: d0dd beq.n 800e566 <tcp_timewait_input+0x32>
  34140. pcb->tmr = tcp_ticks;
  34141. 800e5aa: 4b0f ldr r3, [pc, #60] @ (800e5e8 <tcp_timewait_input+0xb4>)
  34142. 800e5ac: 681b ldr r3, [r3, #0]
  34143. 800e5ae: 6223 str r3, [r4, #32]
  34144. 800e5b0: e7d9 b.n 800e566 <tcp_timewait_input+0x32>
  34145. tcp_ack_now(pcb);
  34146. 800e5b2: 8b63 ldrh r3, [r4, #26]
  34147. 800e5b4: f043 0302 orr.w r3, r3, #2
  34148. 800e5b8: 8363 strh r3, [r4, #26]
  34149. tcp_output(pcb);
  34150. 800e5ba: 4620 mov r0, r4
  34151. 800e5bc: f002 fc52 bl 8010e64 <tcp_output>
  34152. 800e5c0: e7d4 b.n 800e56c <tcp_timewait_input+0x38>
  34153. 800e5c2: 4770 bx lr
  34154. 800e5c4: 24019bf1 .word 0x24019bf1
  34155. 800e5c8: 24019bfc .word 0x24019bfc
  34156. 800e5cc: 24019bf2 .word 0x24019bf2
  34157. 800e5d0: 08016c64 .word 0x08016c64
  34158. 800e5d4: 08016d0c .word 0x08016d0c
  34159. 800e5d8: 080144e8 .word 0x080144e8
  34160. 800e5dc: 24019c0c .word 0x24019c0c
  34161. 800e5e0: 24013030 .word 0x24013030
  34162. 800e5e4: 24019bf8 .word 0x24019bf8
  34163. 800e5e8: 24019be4 .word 0x24019be4
  34164. 0800e5ec <tcp_listen_input>:
  34165. if (flags & TCP_RST) {
  34166. 800e5ec: 4b47 ldr r3, [pc, #284] @ (800e70c <tcp_listen_input+0x120>)
  34167. 800e5ee: 781b ldrb r3, [r3, #0]
  34168. 800e5f0: f013 0f04 tst.w r3, #4
  34169. 800e5f4: f040 8088 bne.w 800e708 <tcp_listen_input+0x11c>
  34170. {
  34171. 800e5f8: b5f0 push {r4, r5, r6, r7, lr}
  34172. 800e5fa: b085 sub sp, #20
  34173. 800e5fc: 4604 mov r4, r0
  34174. LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL);
  34175. 800e5fe: b148 cbz r0, 800e614 <tcp_listen_input+0x28>
  34176. if (flags & TCP_ACK) {
  34177. 800e600: 4b42 ldr r3, [pc, #264] @ (800e70c <tcp_listen_input+0x120>)
  34178. 800e602: 781b ldrb r3, [r3, #0]
  34179. 800e604: f013 0f10 tst.w r3, #16
  34180. 800e608: d10c bne.n 800e624 <tcp_listen_input+0x38>
  34181. } else if (flags & TCP_SYN) {
  34182. 800e60a: f013 0f02 tst.w r3, #2
  34183. 800e60e: d11d bne.n 800e64c <tcp_listen_input+0x60>
  34184. }
  34185. 800e610: b005 add sp, #20
  34186. 800e612: bdf0 pop {r4, r5, r6, r7, pc}
  34187. LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL);
  34188. 800e614: 4b3e ldr r3, [pc, #248] @ (800e710 <tcp_listen_input+0x124>)
  34189. 800e616: f240 2281 movw r2, #641 @ 0x281
  34190. 800e61a: 493e ldr r1, [pc, #248] @ (800e714 <tcp_listen_input+0x128>)
  34191. 800e61c: 483e ldr r0, [pc, #248] @ (800e718 <tcp_listen_input+0x12c>)
  34192. 800e61e: f004 fef3 bl 8013408 <iprintf>
  34193. 800e622: e7ed b.n 800e600 <tcp_listen_input+0x14>
  34194. ip_current_src_addr(), tcphdr->dest, tcphdr->src);
  34195. 800e624: 4b3d ldr r3, [pc, #244] @ (800e71c <tcp_listen_input+0x130>)
  34196. 800e626: 6819 ldr r1, [r3, #0]
  34197. tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
  34198. 800e628: 4b3d ldr r3, [pc, #244] @ (800e720 <tcp_listen_input+0x134>)
  34199. 800e62a: 4a3e ldr r2, [pc, #248] @ (800e724 <tcp_listen_input+0x138>)
  34200. 800e62c: 8810 ldrh r0, [r2, #0]
  34201. 800e62e: 4a3e ldr r2, [pc, #248] @ (800e728 <tcp_listen_input+0x13c>)
  34202. 800e630: 6812 ldr r2, [r2, #0]
  34203. 800e632: 880d ldrh r5, [r1, #0]
  34204. 800e634: 9502 str r5, [sp, #8]
  34205. 800e636: 8849 ldrh r1, [r1, #2]
  34206. 800e638: 9101 str r1, [sp, #4]
  34207. 800e63a: 1f19 subs r1, r3, #4
  34208. 800e63c: 9100 str r1, [sp, #0]
  34209. 800e63e: 4402 add r2, r0
  34210. 800e640: 493a ldr r1, [pc, #232] @ (800e72c <tcp_listen_input+0x140>)
  34211. 800e642: 6809 ldr r1, [r1, #0]
  34212. 800e644: 4620 mov r0, r4
  34213. 800e646: f002 fb8b bl 8010d60 <tcp_rst>
  34214. 800e64a: e7e1 b.n 800e610 <tcp_listen_input+0x24>
  34215. npcb = tcp_alloc(pcb->prio);
  34216. 800e64c: 7d60 ldrb r0, [r4, #21]
  34217. 800e64e: f7ff fa4b bl 800dae8 <tcp_alloc>
  34218. if (npcb == NULL) {
  34219. 800e652: 4605 mov r5, r0
  34220. 800e654: 2800 cmp r0, #0
  34221. 800e656: d049 beq.n 800e6ec <tcp_listen_input+0x100>
  34222. ip_addr_copy(npcb->local_ip, *ip_current_dest_addr());
  34223. 800e658: 4b35 ldr r3, [pc, #212] @ (800e730 <tcp_listen_input+0x144>)
  34224. 800e65a: 695a ldr r2, [r3, #20]
  34225. 800e65c: 6002 str r2, [r0, #0]
  34226. ip_addr_copy(npcb->remote_ip, *ip_current_src_addr());
  34227. 800e65e: 691b ldr r3, [r3, #16]
  34228. 800e660: 6043 str r3, [r0, #4]
  34229. npcb->local_port = pcb->local_port;
  34230. 800e662: 8ae3 ldrh r3, [r4, #22]
  34231. 800e664: 82c3 strh r3, [r0, #22]
  34232. npcb->remote_port = tcphdr->src;
  34233. 800e666: 4e2d ldr r6, [pc, #180] @ (800e71c <tcp_listen_input+0x130>)
  34234. 800e668: 6833 ldr r3, [r6, #0]
  34235. 800e66a: 881b ldrh r3, [r3, #0]
  34236. 800e66c: 8303 strh r3, [r0, #24]
  34237. npcb->state = SYN_RCVD;
  34238. 800e66e: 2303 movs r3, #3
  34239. 800e670: 7503 strb r3, [r0, #20]
  34240. npcb->rcv_nxt = seqno + 1;
  34241. 800e672: 4f2d ldr r7, [pc, #180] @ (800e728 <tcp_listen_input+0x13c>)
  34242. 800e674: 683b ldr r3, [r7, #0]
  34243. 800e676: 3301 adds r3, #1
  34244. 800e678: 6243 str r3, [r0, #36] @ 0x24
  34245. npcb->rcv_ann_right_edge = npcb->rcv_nxt;
  34246. 800e67a: 62c3 str r3, [r0, #44] @ 0x2c
  34247. iss = tcp_next_iss(npcb);
  34248. 800e67c: f7fe ff5c bl 800d538 <tcp_next_iss>
  34249. npcb->snd_wl2 = iss;
  34250. 800e680: 65a8 str r0, [r5, #88] @ 0x58
  34251. npcb->snd_nxt = iss;
  34252. 800e682: 6528 str r0, [r5, #80] @ 0x50
  34253. npcb->lastack = iss;
  34254. 800e684: 6468 str r0, [r5, #68] @ 0x44
  34255. npcb->snd_lbb = iss;
  34256. 800e686: 65e8 str r0, [r5, #92] @ 0x5c
  34257. npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */
  34258. 800e688: 683b ldr r3, [r7, #0]
  34259. 800e68a: 3b01 subs r3, #1
  34260. 800e68c: 656b str r3, [r5, #84] @ 0x54
  34261. npcb->callback_arg = pcb->callback_arg;
  34262. 800e68e: 6923 ldr r3, [r4, #16]
  34263. 800e690: 612b str r3, [r5, #16]
  34264. npcb->listener = pcb;
  34265. 800e692: 67ec str r4, [r5, #124] @ 0x7c
  34266. npcb->so_options = pcb->so_options & SOF_INHERITED;
  34267. 800e694: 7a63 ldrb r3, [r4, #9]
  34268. 800e696: f003 030c and.w r3, r3, #12
  34269. 800e69a: 726b strb r3, [r5, #9]
  34270. npcb->netif_idx = pcb->netif_idx;
  34271. 800e69c: 7a23 ldrb r3, [r4, #8]
  34272. 800e69e: 722b strb r3, [r5, #8]
  34273. TCP_REG_ACTIVE(npcb);
  34274. 800e6a0: 4b24 ldr r3, [pc, #144] @ (800e734 <tcp_listen_input+0x148>)
  34275. 800e6a2: 681a ldr r2, [r3, #0]
  34276. 800e6a4: 60ea str r2, [r5, #12]
  34277. 800e6a6: 601d str r5, [r3, #0]
  34278. 800e6a8: f002 ffc2 bl 8011630 <tcp_timer_needed>
  34279. 800e6ac: 4b22 ldr r3, [pc, #136] @ (800e738 <tcp_listen_input+0x14c>)
  34280. 800e6ae: 2201 movs r2, #1
  34281. 800e6b0: 701a strb r2, [r3, #0]
  34282. tcp_parseopt(npcb);
  34283. 800e6b2: 4628 mov r0, r5
  34284. 800e6b4: f7ff febc bl 800e430 <tcp_parseopt>
  34285. npcb->snd_wnd = tcphdr->wnd;
  34286. 800e6b8: 6833 ldr r3, [r6, #0]
  34287. 800e6ba: 89db ldrh r3, [r3, #14]
  34288. 800e6bc: f8a5 3060 strh.w r3, [r5, #96] @ 0x60
  34289. npcb->snd_wnd_max = npcb->snd_wnd;
  34290. 800e6c0: f8a5 3062 strh.w r3, [r5, #98] @ 0x62
  34291. npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip);
  34292. 800e6c4: 8e6e ldrh r6, [r5, #50] @ 0x32
  34293. 800e6c6: 1d2c adds r4, r5, #4
  34294. 800e6c8: 4620 mov r0, r4
  34295. 800e6ca: f7fb fd19 bl 800a100 <ip4_route>
  34296. 800e6ce: 4601 mov r1, r0
  34297. 800e6d0: 4622 mov r2, r4
  34298. 800e6d2: 4630 mov r0, r6
  34299. 800e6d4: f7fe ff4c bl 800d570 <tcp_eff_send_mss_netif>
  34300. 800e6d8: 8668 strh r0, [r5, #50] @ 0x32
  34301. rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK);
  34302. 800e6da: 2112 movs r1, #18
  34303. 800e6dc: 4628 mov r0, r5
  34304. 800e6de: f002 f98b bl 80109f8 <tcp_enqueue_flags>
  34305. if (rc != ERR_OK) {
  34306. 800e6e2: b960 cbnz r0, 800e6fe <tcp_listen_input+0x112>
  34307. tcp_output(npcb);
  34308. 800e6e4: 4628 mov r0, r5
  34309. 800e6e6: f002 fbbd bl 8010e64 <tcp_output>
  34310. 800e6ea: e791 b.n 800e610 <tcp_listen_input+0x24>
  34311. TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err);
  34312. 800e6ec: 69a3 ldr r3, [r4, #24]
  34313. 800e6ee: 2b00 cmp r3, #0
  34314. 800e6f0: d08e beq.n 800e610 <tcp_listen_input+0x24>
  34315. 800e6f2: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
  34316. 800e6f6: 2100 movs r1, #0
  34317. 800e6f8: 6920 ldr r0, [r4, #16]
  34318. 800e6fa: 4798 blx r3
  34319. return;
  34320. 800e6fc: e788 b.n 800e610 <tcp_listen_input+0x24>
  34321. tcp_abandon(npcb, 0);
  34322. 800e6fe: 2100 movs r1, #0
  34323. 800e700: 4628 mov r0, r5
  34324. 800e702: f7ff f8a1 bl 800d848 <tcp_abandon>
  34325. return;
  34326. 800e706: e783 b.n 800e610 <tcp_listen_input+0x24>
  34327. 800e708: 4770 bx lr
  34328. 800e70a: bf00 nop
  34329. 800e70c: 24019bf1 .word 0x24019bf1
  34330. 800e710: 08016c64 .word 0x08016c64
  34331. 800e714: 08016d2c .word 0x08016d2c
  34332. 800e718: 080144e8 .word 0x080144e8
  34333. 800e71c: 24019c0c .word 0x24019c0c
  34334. 800e720: 24013030 .word 0x24013030
  34335. 800e724: 24019bf2 .word 0x24019bf2
  34336. 800e728: 24019bfc .word 0x24019bfc
  34337. 800e72c: 24019bf8 .word 0x24019bf8
  34338. 800e730: 2401301c .word 0x2401301c
  34339. 800e734: 24019bd8 .word 0x24019bd8
  34340. 800e738: 24019bd2 .word 0x24019bd2
  34341. 0800e73c <tcp_free_acked_segments>:
  34342. {
  34343. 800e73c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  34344. 800e740: 4606 mov r6, r0
  34345. 800e742: 460c mov r4, r1
  34346. 800e744: 461f mov r7, r3
  34347. while (seg_list != NULL &&
  34348. 800e746: e008 b.n 800e75a <tcp_free_acked_segments+0x1e>
  34349. LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen));
  34350. 800e748: 4b26 ldr r3, [pc, #152] @ (800e7e4 <tcp_free_acked_segments+0xa8>)
  34351. 800e74a: f240 4257 movw r2, #1111 @ 0x457
  34352. 800e74e: 4926 ldr r1, [pc, #152] @ (800e7e8 <tcp_free_acked_segments+0xac>)
  34353. 800e750: 4826 ldr r0, [pc, #152] @ (800e7ec <tcp_free_acked_segments+0xb0>)
  34354. 800e752: f004 fe59 bl 8013408 <iprintf>
  34355. 800e756: e022 b.n 800e79e <tcp_free_acked_segments+0x62>
  34356. {
  34357. 800e758: 4644 mov r4, r8
  34358. while (seg_list != NULL &&
  34359. 800e75a: 2c00 cmp r4, #0
  34360. 800e75c: d03f beq.n 800e7de <tcp_free_acked_segments+0xa2>
  34361. TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) +
  34362. 800e75e: 6923 ldr r3, [r4, #16]
  34363. 800e760: 6858 ldr r0, [r3, #4]
  34364. 800e762: f7f9 fb90 bl 8007e86 <lwip_htonl>
  34365. 800e766: 4605 mov r5, r0
  34366. 800e768: f8b4 8008 ldrh.w r8, [r4, #8]
  34367. 800e76c: 6923 ldr r3, [r4, #16]
  34368. 800e76e: 8998 ldrh r0, [r3, #12]
  34369. 800e770: f7f9 fb84 bl 8007e7c <lwip_htons>
  34370. 800e774: f010 0f03 tst.w r0, #3
  34371. 800e778: d02f beq.n 800e7da <tcp_free_acked_segments+0x9e>
  34372. 800e77a: 2301 movs r3, #1
  34373. 800e77c: 4443 add r3, r8
  34374. 800e77e: 441d add r5, r3
  34375. 800e780: 4b1b ldr r3, [pc, #108] @ (800e7f0 <tcp_free_acked_segments+0xb4>)
  34376. 800e782: 681b ldr r3, [r3, #0]
  34377. 800e784: 1aed subs r5, r5, r3
  34378. while (seg_list != NULL &&
  34379. 800e786: 2d00 cmp r5, #0
  34380. 800e788: dc29 bgt.n 800e7de <tcp_free_acked_segments+0xa2>
  34381. seg_list = seg_list->next;
  34382. 800e78a: f8d4 8000 ldr.w r8, [r4]
  34383. clen = pbuf_clen(next->p);
  34384. 800e78e: 6860 ldr r0, [r4, #4]
  34385. 800e790: f7fd fc8b bl 800c0aa <pbuf_clen>
  34386. 800e794: 4605 mov r5, r0
  34387. LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen));
  34388. 800e796: f8b6 3066 ldrh.w r3, [r6, #102] @ 0x66
  34389. 800e79a: 4298 cmp r0, r3
  34390. 800e79c: d8d4 bhi.n 800e748 <tcp_free_acked_segments+0xc>
  34391. pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen);
  34392. 800e79e: f8b6 3066 ldrh.w r3, [r6, #102] @ 0x66
  34393. 800e7a2: 1b5b subs r3, r3, r5
  34394. 800e7a4: f8a6 3066 strh.w r3, [r6, #102] @ 0x66
  34395. recv_acked = (tcpwnd_size_t)(recv_acked + next->len);
  34396. 800e7a8: 8923 ldrh r3, [r4, #8]
  34397. 800e7aa: 4a12 ldr r2, [pc, #72] @ (800e7f4 <tcp_free_acked_segments+0xb8>)
  34398. 800e7ac: 8811 ldrh r1, [r2, #0]
  34399. 800e7ae: 440b add r3, r1
  34400. 800e7b0: 8013 strh r3, [r2, #0]
  34401. tcp_seg_free(next);
  34402. 800e7b2: 4620 mov r0, r4
  34403. 800e7b4: f7fe fdfa bl 800d3ac <tcp_seg_free>
  34404. if (pcb->snd_queuelen != 0) {
  34405. 800e7b8: f8b6 3066 ldrh.w r3, [r6, #102] @ 0x66
  34406. 800e7bc: 2b00 cmp r3, #0
  34407. 800e7be: d0cb beq.n 800e758 <tcp_free_acked_segments+0x1c>
  34408. LWIP_ASSERT("tcp_receive: valid queue length",
  34409. 800e7c0: f1b8 0f00 cmp.w r8, #0
  34410. 800e7c4: bf08 it eq
  34411. 800e7c6: 2f00 cmpeq r7, #0
  34412. 800e7c8: d1c6 bne.n 800e758 <tcp_free_acked_segments+0x1c>
  34413. 800e7ca: 4b06 ldr r3, [pc, #24] @ (800e7e4 <tcp_free_acked_segments+0xa8>)
  34414. 800e7cc: f240 4261 movw r2, #1121 @ 0x461
  34415. 800e7d0: 4909 ldr r1, [pc, #36] @ (800e7f8 <tcp_free_acked_segments+0xbc>)
  34416. 800e7d2: 4806 ldr r0, [pc, #24] @ (800e7ec <tcp_free_acked_segments+0xb0>)
  34417. 800e7d4: f004 fe18 bl 8013408 <iprintf>
  34418. 800e7d8: e7be b.n 800e758 <tcp_free_acked_segments+0x1c>
  34419. TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) +
  34420. 800e7da: 2300 movs r3, #0
  34421. 800e7dc: e7ce b.n 800e77c <tcp_free_acked_segments+0x40>
  34422. }
  34423. 800e7de: 4620 mov r0, r4
  34424. 800e7e0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  34425. 800e7e4: 08016c64 .word 0x08016c64
  34426. 800e7e8: 08016d4c .word 0x08016d4c
  34427. 800e7ec: 080144e8 .word 0x080144e8
  34428. 800e7f0: 24019bf8 .word 0x24019bf8
  34429. 800e7f4: 24019bf4 .word 0x24019bf4
  34430. 800e7f8: 08016d74 .word 0x08016d74
  34431. 0800e7fc <tcp_oos_insert_segment>:
  34432. {
  34433. 800e7fc: b570 push {r4, r5, r6, lr}
  34434. 800e7fe: 460c mov r4, r1
  34435. LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL);
  34436. 800e800: 4605 mov r5, r0
  34437. 800e802: b160 cbz r0, 800e81e <tcp_oos_insert_segment+0x22>
  34438. if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
  34439. 800e804: 692b ldr r3, [r5, #16]
  34440. 800e806: 8998 ldrh r0, [r3, #12]
  34441. 800e808: f7f9 fb38 bl 8007e7c <lwip_htons>
  34442. 800e80c: f010 0f01 tst.w r0, #1
  34443. 800e810: d012 beq.n 800e838 <tcp_oos_insert_segment+0x3c>
  34444. tcp_segs_free(next);
  34445. 800e812: 4620 mov r0, r4
  34446. 800e814: f7fe fdd7 bl 800d3c6 <tcp_segs_free>
  34447. next = NULL;
  34448. 800e818: 2400 movs r4, #0
  34449. cseg->next = next;
  34450. 800e81a: 602c str r4, [r5, #0]
  34451. }
  34452. 800e81c: bd70 pop {r4, r5, r6, pc}
  34453. LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL);
  34454. 800e81e: 4b1d ldr r3, [pc, #116] @ (800e894 <tcp_oos_insert_segment+0x98>)
  34455. 800e820: f240 421f movw r2, #1055 @ 0x41f
  34456. 800e824: 491c ldr r1, [pc, #112] @ (800e898 <tcp_oos_insert_segment+0x9c>)
  34457. 800e826: 481d ldr r0, [pc, #116] @ (800e89c <tcp_oos_insert_segment+0xa0>)
  34458. 800e828: f004 fdee bl 8013408 <iprintf>
  34459. 800e82c: e7ea b.n 800e804 <tcp_oos_insert_segment+0x8>
  34460. next = next->next;
  34461. 800e82e: 6826 ldr r6, [r4, #0]
  34462. tcp_seg_free(old_seg);
  34463. 800e830: 4620 mov r0, r4
  34464. 800e832: f7fe fdbb bl 800d3ac <tcp_seg_free>
  34465. next = next->next;
  34466. 800e836: 4634 mov r4, r6
  34467. while (next &&
  34468. 800e838: b1cc cbz r4, 800e86e <tcp_oos_insert_segment+0x72>
  34469. TCP_SEQ_GEQ((seqno + cseg->len),
  34470. 800e83a: 892b ldrh r3, [r5, #8]
  34471. 800e83c: 4a18 ldr r2, [pc, #96] @ (800e8a0 <tcp_oos_insert_segment+0xa4>)
  34472. 800e83e: 6812 ldr r2, [r2, #0]
  34473. 800e840: 4413 add r3, r2
  34474. 800e842: 6921 ldr r1, [r4, #16]
  34475. 800e844: 684a ldr r2, [r1, #4]
  34476. 800e846: 8920 ldrh r0, [r4, #8]
  34477. 800e848: 4402 add r2, r0
  34478. 800e84a: 1a9b subs r3, r3, r2
  34479. while (next &&
  34480. 800e84c: 2b00 cmp r3, #0
  34481. 800e84e: db0e blt.n 800e86e <tcp_oos_insert_segment+0x72>
  34482. if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
  34483. 800e850: 8988 ldrh r0, [r1, #12]
  34484. 800e852: f7f9 fb13 bl 8007e7c <lwip_htons>
  34485. 800e856: f010 0f01 tst.w r0, #1
  34486. 800e85a: d0e8 beq.n 800e82e <tcp_oos_insert_segment+0x32>
  34487. TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN);
  34488. 800e85c: 692b ldr r3, [r5, #16]
  34489. 800e85e: 899e ldrh r6, [r3, #12]
  34490. 800e860: 2001 movs r0, #1
  34491. 800e862: f7f9 fb0b bl 8007e7c <lwip_htons>
  34492. 800e866: 692b ldr r3, [r5, #16]
  34493. 800e868: 4306 orrs r6, r0
  34494. 800e86a: 819e strh r6, [r3, #12]
  34495. 800e86c: e7df b.n 800e82e <tcp_oos_insert_segment+0x32>
  34496. if (next &&
  34497. 800e86e: 2c00 cmp r4, #0
  34498. 800e870: d0d3 beq.n 800e81a <tcp_oos_insert_segment+0x1e>
  34499. TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) {
  34500. 800e872: 892b ldrh r3, [r5, #8]
  34501. 800e874: 4a0a ldr r2, [pc, #40] @ (800e8a0 <tcp_oos_insert_segment+0xa4>)
  34502. 800e876: 6811 ldr r1, [r2, #0]
  34503. 800e878: 440b add r3, r1
  34504. 800e87a: 6922 ldr r2, [r4, #16]
  34505. 800e87c: 6852 ldr r2, [r2, #4]
  34506. 800e87e: 1a9b subs r3, r3, r2
  34507. if (next &&
  34508. 800e880: 2b00 cmp r3, #0
  34509. 800e882: ddca ble.n 800e81a <tcp_oos_insert_segment+0x1e>
  34510. cseg->len = (u16_t)(next->tcphdr->seqno - seqno);
  34511. 800e884: 1a52 subs r2, r2, r1
  34512. 800e886: b291 uxth r1, r2
  34513. 800e888: 8129 strh r1, [r5, #8]
  34514. pbuf_realloc(cseg->p, cseg->len);
  34515. 800e88a: 6868 ldr r0, [r5, #4]
  34516. 800e88c: f7fd fb9e bl 800bfcc <pbuf_realloc>
  34517. 800e890: e7c3 b.n 800e81a <tcp_oos_insert_segment+0x1e>
  34518. 800e892: bf00 nop
  34519. 800e894: 08016c64 .word 0x08016c64
  34520. 800e898: 08016d94 .word 0x08016d94
  34521. 800e89c: 080144e8 .word 0x080144e8
  34522. 800e8a0: 24019bfc .word 0x24019bfc
  34523. 0800e8a4 <tcp_receive>:
  34524. {
  34525. 800e8a4: b5f8 push {r3, r4, r5, r6, r7, lr}
  34526. LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
  34527. 800e8a6: 4604 mov r4, r0
  34528. 800e8a8: 2800 cmp r0, #0
  34529. 800e8aa: d06f beq.n 800e98c <tcp_receive+0xe8>
  34530. LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
  34531. 800e8ac: 7d23 ldrb r3, [r4, #20]
  34532. 800e8ae: 2b03 cmp r3, #3
  34533. 800e8b0: d974 bls.n 800e99c <tcp_receive+0xf8>
  34534. if (flags & TCP_ACK) {
  34535. 800e8b2: 4ba8 ldr r3, [pc, #672] @ (800eb54 <tcp_receive+0x2b0>)
  34536. 800e8b4: 781b ldrb r3, [r3, #0]
  34537. 800e8b6: f013 0f10 tst.w r3, #16
  34538. 800e8ba: d03c beq.n 800e936 <tcp_receive+0x92>
  34539. right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2;
  34540. 800e8bc: f8b4 0060 ldrh.w r0, [r4, #96] @ 0x60
  34541. 800e8c0: 6da2 ldr r2, [r4, #88] @ 0x58
  34542. 800e8c2: 1886 adds r6, r0, r2
  34543. if (TCP_SEQ_LT(pcb->snd_wl1, seqno) ||
  34544. 800e8c4: 6d61 ldr r1, [r4, #84] @ 0x54
  34545. 800e8c6: 4ba4 ldr r3, [pc, #656] @ (800eb58 <tcp_receive+0x2b4>)
  34546. 800e8c8: 681b ldr r3, [r3, #0]
  34547. 800e8ca: 1acd subs r5, r1, r3
  34548. 800e8cc: 2d00 cmp r5, #0
  34549. 800e8ce: db0a blt.n 800e8e6 <tcp_receive+0x42>
  34550. 800e8d0: 4299 cmp r1, r3
  34551. 800e8d2: d06b beq.n 800e9ac <tcp_receive+0x108>
  34552. (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
  34553. 800e8d4: 49a1 ldr r1, [pc, #644] @ (800eb5c <tcp_receive+0x2b8>)
  34554. 800e8d6: 6809 ldr r1, [r1, #0]
  34555. (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
  34556. 800e8d8: 428a cmp r2, r1
  34557. 800e8da: d114 bne.n 800e906 <tcp_receive+0x62>
  34558. (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) {
  34559. 800e8dc: 4aa0 ldr r2, [pc, #640] @ (800eb60 <tcp_receive+0x2bc>)
  34560. 800e8de: 6812 ldr r2, [r2, #0]
  34561. 800e8e0: 89d2 ldrh r2, [r2, #14]
  34562. 800e8e2: 4290 cmp r0, r2
  34563. 800e8e4: d20f bcs.n 800e906 <tcp_receive+0x62>
  34564. pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd);
  34565. 800e8e6: 4a9e ldr r2, [pc, #632] @ (800eb60 <tcp_receive+0x2bc>)
  34566. 800e8e8: 6812 ldr r2, [r2, #0]
  34567. 800e8ea: 89d2 ldrh r2, [r2, #14]
  34568. 800e8ec: b290 uxth r0, r2
  34569. 800e8ee: f8a4 2060 strh.w r2, [r4, #96] @ 0x60
  34570. if (pcb->snd_wnd_max < pcb->snd_wnd) {
  34571. 800e8f2: f8b4 1062 ldrh.w r1, [r4, #98] @ 0x62
  34572. 800e8f6: 4288 cmp r0, r1
  34573. 800e8f8: d901 bls.n 800e8fe <tcp_receive+0x5a>
  34574. pcb->snd_wnd_max = pcb->snd_wnd;
  34575. 800e8fa: f8a4 2062 strh.w r2, [r4, #98] @ 0x62
  34576. pcb->snd_wl1 = seqno;
  34577. 800e8fe: 6563 str r3, [r4, #84] @ 0x54
  34578. pcb->snd_wl2 = ackno;
  34579. 800e900: 4b96 ldr r3, [pc, #600] @ (800eb5c <tcp_receive+0x2b8>)
  34580. 800e902: 681b ldr r3, [r3, #0]
  34581. 800e904: 65a3 str r3, [r4, #88] @ 0x58
  34582. if (TCP_SEQ_LEQ(ackno, pcb->lastack)) {
  34583. 800e906: 4b95 ldr r3, [pc, #596] @ (800eb5c <tcp_receive+0x2b8>)
  34584. 800e908: 681b ldr r3, [r3, #0]
  34585. 800e90a: 6c61 ldr r1, [r4, #68] @ 0x44
  34586. 800e90c: 1a5a subs r2, r3, r1
  34587. 800e90e: 2a00 cmp r2, #0
  34588. 800e910: dd52 ble.n 800e9b8 <tcp_receive+0x114>
  34589. } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
  34590. 800e912: 2a01 cmp r2, #1
  34591. 800e914: d403 bmi.n 800e91e <tcp_receive+0x7a>
  34592. 800e916: 6d22 ldr r2, [r4, #80] @ 0x50
  34593. 800e918: 1a9a subs r2, r3, r2
  34594. 800e91a: 2a00 cmp r2, #0
  34595. 800e91c: dd7e ble.n 800ea1c <tcp_receive+0x178>
  34596. tcp_send_empty_ack(pcb);
  34597. 800e91e: 4620 mov r0, r4
  34598. 800e920: f002 fa66 bl 8010df0 <tcp_send_empty_ack>
  34599. if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) {
  34600. 800e924: 6b63 ldr r3, [r4, #52] @ 0x34
  34601. 800e926: b133 cbz r3, 800e936 <tcp_receive+0x92>
  34602. 800e928: 6ba2 ldr r2, [r4, #56] @ 0x38
  34603. 800e92a: 498c ldr r1, [pc, #560] @ (800eb5c <tcp_receive+0x2b8>)
  34604. 800e92c: 6809 ldr r1, [r1, #0]
  34605. 800e92e: 1a52 subs r2, r2, r1
  34606. 800e930: 2a00 cmp r2, #0
  34607. 800e932: f2c0 8136 blt.w 800eba2 <tcp_receive+0x2fe>
  34608. if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) {
  34609. 800e936: 4b8b ldr r3, [pc, #556] @ (800eb64 <tcp_receive+0x2c0>)
  34610. 800e938: 881b ldrh r3, [r3, #0]
  34611. 800e93a: 2b00 cmp r3, #0
  34612. 800e93c: f000 8435 beq.w 800f1aa <tcp_receive+0x906>
  34613. 800e940: 7d22 ldrb r2, [r4, #20]
  34614. 800e942: 2a06 cmp r2, #6
  34615. 800e944: f200 8431 bhi.w 800f1aa <tcp_receive+0x906>
  34616. if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
  34617. 800e948: 6a61 ldr r1, [r4, #36] @ 0x24
  34618. 800e94a: 4a83 ldr r2, [pc, #524] @ (800eb58 <tcp_receive+0x2b4>)
  34619. 800e94c: 6812 ldr r2, [r2, #0]
  34620. 800e94e: 1a8e subs r6, r1, r2
  34621. 800e950: 2e01 cmp r6, #1
  34622. 800e952: d405 bmi.n 800e960 <tcp_receive+0xbc>
  34623. 800e954: 4413 add r3, r2
  34624. 800e956: 1acb subs r3, r1, r3
  34625. 800e958: 3301 adds r3, #1
  34626. 800e95a: 2b00 cmp r3, #0
  34627. 800e95c: f340 8147 ble.w 800ebee <tcp_receive+0x34a>
  34628. if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) {
  34629. 800e960: 1a52 subs r2, r2, r1
  34630. 800e962: 2a00 cmp r2, #0
  34631. 800e964: f2c0 8185 blt.w 800ec72 <tcp_receive+0x3ce>
  34632. if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
  34633. 800e968: 4b7b ldr r3, [pc, #492] @ (800eb58 <tcp_receive+0x2b4>)
  34634. 800e96a: 681b ldr r3, [r3, #0]
  34635. 800e96c: 6a61 ldr r1, [r4, #36] @ 0x24
  34636. 800e96e: 1a5a subs r2, r3, r1
  34637. 800e970: 2a00 cmp r2, #0
  34638. 800e972: db06 blt.n 800e982 <tcp_receive+0xde>
  34639. 800e974: 8d22 ldrh r2, [r4, #40] @ 0x28
  34640. 800e976: 440a add r2, r1
  34641. 800e978: 1a9a subs r2, r3, r2
  34642. 800e97a: 3201 adds r2, #1
  34643. 800e97c: 2a00 cmp r2, #0
  34644. 800e97e: f340 817d ble.w 800ec7c <tcp_receive+0x3d8>
  34645. tcp_send_empty_ack(pcb);
  34646. 800e982: 4620 mov r0, r4
  34647. 800e984: f002 fa34 bl 8010df0 <tcp_send_empty_ack>
  34648. 800e988: f000 bc1f b.w 800f1ca <tcp_receive+0x926>
  34649. LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL);
  34650. 800e98c: 4b76 ldr r3, [pc, #472] @ (800eb68 <tcp_receive+0x2c4>)
  34651. 800e98e: f240 427b movw r2, #1147 @ 0x47b
  34652. 800e992: 4976 ldr r1, [pc, #472] @ (800eb6c <tcp_receive+0x2c8>)
  34653. 800e994: 4876 ldr r0, [pc, #472] @ (800eb70 <tcp_receive+0x2cc>)
  34654. 800e996: f004 fd37 bl 8013408 <iprintf>
  34655. 800e99a: e787 b.n 800e8ac <tcp_receive+0x8>
  34656. LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED);
  34657. 800e99c: 4b72 ldr r3, [pc, #456] @ (800eb68 <tcp_receive+0x2c4>)
  34658. 800e99e: f240 427c movw r2, #1148 @ 0x47c
  34659. 800e9a2: 4974 ldr r1, [pc, #464] @ (800eb74 <tcp_receive+0x2d0>)
  34660. 800e9a4: 4872 ldr r0, [pc, #456] @ (800eb70 <tcp_receive+0x2cc>)
  34661. 800e9a6: f004 fd2f bl 8013408 <iprintf>
  34662. 800e9aa: e782 b.n 800e8b2 <tcp_receive+0xe>
  34663. (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) ||
  34664. 800e9ac: 496b ldr r1, [pc, #428] @ (800eb5c <tcp_receive+0x2b8>)
  34665. 800e9ae: 6809 ldr r1, [r1, #0]
  34666. 800e9b0: 1a51 subs r1, r2, r1
  34667. 800e9b2: 2900 cmp r1, #0
  34668. 800e9b4: da8e bge.n 800e8d4 <tcp_receive+0x30>
  34669. 800e9b6: e796 b.n 800e8e6 <tcp_receive+0x42>
  34670. if (tcplen == 0) {
  34671. 800e9b8: 4a6a ldr r2, [pc, #424] @ (800eb64 <tcp_receive+0x2c0>)
  34672. 800e9ba: 8812 ldrh r2, [r2, #0]
  34673. 800e9bc: b92a cbnz r2, 800e9ca <tcp_receive+0x126>
  34674. if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) {
  34675. 800e9be: 6da2 ldr r2, [r4, #88] @ 0x58
  34676. 800e9c0: f8b4 0060 ldrh.w r0, [r4, #96] @ 0x60
  34677. 800e9c4: 4402 add r2, r0
  34678. 800e9c6: 42b2 cmp r2, r6
  34679. 800e9c8: d003 beq.n 800e9d2 <tcp_receive+0x12e>
  34680. pcb->dupacks = 0;
  34681. 800e9ca: 2300 movs r3, #0
  34682. 800e9cc: f884 3043 strb.w r3, [r4, #67] @ 0x43
  34683. 800e9d0: e7a8 b.n 800e924 <tcp_receive+0x80>
  34684. if (pcb->rtime >= 0) {
  34685. 800e9d2: f9b4 2030 ldrsh.w r2, [r4, #48] @ 0x30
  34686. 800e9d6: 2a00 cmp r2, #0
  34687. 800e9d8: dbf7 blt.n 800e9ca <tcp_receive+0x126>
  34688. if (pcb->lastack == ackno) {
  34689. 800e9da: 428b cmp r3, r1
  34690. 800e9dc: d1f5 bne.n 800e9ca <tcp_receive+0x126>
  34691. if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) {
  34692. 800e9de: f894 3043 ldrb.w r3, [r4, #67] @ 0x43
  34693. 800e9e2: 2bff cmp r3, #255 @ 0xff
  34694. 800e9e4: d002 beq.n 800e9ec <tcp_receive+0x148>
  34695. ++pcb->dupacks;
  34696. 800e9e6: 3301 adds r3, #1
  34697. 800e9e8: f884 3043 strb.w r3, [r4, #67] @ 0x43
  34698. if (pcb->dupacks > 3) {
  34699. 800e9ec: f894 3043 ldrb.w r3, [r4, #67] @ 0x43
  34700. 800e9f0: 2b03 cmp r3, #3
  34701. 800e9f2: d908 bls.n 800ea06 <tcp_receive+0x162>
  34702. TCP_WND_INC(pcb->cwnd, pcb->mss);
  34703. 800e9f4: f8b4 1048 ldrh.w r1, [r4, #72] @ 0x48
  34704. 800e9f8: 8e62 ldrh r2, [r4, #50] @ 0x32
  34705. 800e9fa: 440a add r2, r1
  34706. 800e9fc: b292 uxth r2, r2
  34707. 800e9fe: 4291 cmp r1, r2
  34708. 800ea00: d807 bhi.n 800ea12 <tcp_receive+0x16e>
  34709. 800ea02: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
  34710. if (pcb->dupacks >= 3) {
  34711. 800ea06: 2b02 cmp r3, #2
  34712. 800ea08: d98c bls.n 800e924 <tcp_receive+0x80>
  34713. tcp_rexmit_fast(pcb);
  34714. 800ea0a: 4620 mov r0, r4
  34715. 800ea0c: f002 f96a bl 8010ce4 <tcp_rexmit_fast>
  34716. if (!found_dupack) {
  34717. 800ea10: e788 b.n 800e924 <tcp_receive+0x80>
  34718. TCP_WND_INC(pcb->cwnd, pcb->mss);
  34719. 800ea12: f64f 72ff movw r2, #65535 @ 0xffff
  34720. 800ea16: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
  34721. 800ea1a: e7f4 b.n 800ea06 <tcp_receive+0x162>
  34722. if (pcb->flags & TF_INFR) {
  34723. 800ea1c: 8b62 ldrh r2, [r4, #26]
  34724. 800ea1e: f012 0f04 tst.w r2, #4
  34725. 800ea22: d009 beq.n 800ea38 <tcp_receive+0x194>
  34726. tcp_clear_flags(pcb, TF_INFR);
  34727. 800ea24: f022 0204 bic.w r2, r2, #4
  34728. 800ea28: 8362 strh r2, [r4, #26]
  34729. pcb->cwnd = pcb->ssthresh;
  34730. 800ea2a: f8b4 204a ldrh.w r2, [r4, #74] @ 0x4a
  34731. 800ea2e: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
  34732. pcb->bytes_acked = 0;
  34733. 800ea32: 2200 movs r2, #0
  34734. 800ea34: f8a4 206a strh.w r2, [r4, #106] @ 0x6a
  34735. pcb->nrtx = 0;
  34736. 800ea38: 2000 movs r0, #0
  34737. 800ea3a: f884 0042 strb.w r0, [r4, #66] @ 0x42
  34738. pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
  34739. 800ea3e: f9b4 503c ldrsh.w r5, [r4, #60] @ 0x3c
  34740. 800ea42: 8fe2 ldrh r2, [r4, #62] @ 0x3e
  34741. 800ea44: eb02 02e5 add.w r2, r2, r5, asr #3
  34742. 800ea48: f8a4 2040 strh.w r2, [r4, #64] @ 0x40
  34743. acked = (tcpwnd_size_t)(ackno - pcb->lastack);
  34744. 800ea4c: b29a uxth r2, r3
  34745. 800ea4e: b289 uxth r1, r1
  34746. 800ea50: 1a52 subs r2, r2, r1
  34747. 800ea52: b292 uxth r2, r2
  34748. pcb->dupacks = 0;
  34749. 800ea54: f884 0043 strb.w r0, [r4, #67] @ 0x43
  34750. pcb->lastack = ackno;
  34751. 800ea58: 6463 str r3, [r4, #68] @ 0x44
  34752. if (pcb->state >= ESTABLISHED) {
  34753. 800ea5a: 7d23 ldrb r3, [r4, #20]
  34754. 800ea5c: 2b03 cmp r3, #3
  34755. 800ea5e: d917 bls.n 800ea90 <tcp_receive+0x1ec>
  34756. if (pcb->cwnd < pcb->ssthresh) {
  34757. 800ea60: f8b4 3048 ldrh.w r3, [r4, #72] @ 0x48
  34758. 800ea64: f8b4 104a ldrh.w r1, [r4, #74] @ 0x4a
  34759. 800ea68: 428b cmp r3, r1
  34760. 800ea6a: d24b bcs.n 800eb04 <tcp_receive+0x260>
  34761. u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2;
  34762. 800ea6c: 8b61 ldrh r1, [r4, #26]
  34763. 800ea6e: f411 6f00 tst.w r1, #2048 @ 0x800
  34764. 800ea72: d040 beq.n 800eaf6 <tcp_receive+0x252>
  34765. 800ea74: 2101 movs r1, #1
  34766. increase = LWIP_MIN(acked, (tcpwnd_size_t)(num_seg * pcb->mss));
  34767. 800ea76: 8e60 ldrh r0, [r4, #50] @ 0x32
  34768. 800ea78: fb11 f100 smulbb r1, r1, r0
  34769. 800ea7c: b289 uxth r1, r1
  34770. TCP_WND_INC(pcb->cwnd, increase);
  34771. 800ea7e: 4291 cmp r1, r2
  34772. 800ea80: bf94 ite ls
  34773. 800ea82: 1858 addls r0, r3, r1
  34774. 800ea84: 1898 addhi r0, r3, r2
  34775. 800ea86: b282 uxth r2, r0
  34776. 800ea88: 4293 cmp r3, r2
  34777. 800ea8a: d836 bhi.n 800eafa <tcp_receive+0x256>
  34778. 800ea8c: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
  34779. pcb->unacked = tcp_free_acked_segments(pcb, pcb->unacked, "unacked", pcb->unsent);
  34780. 800ea90: 6ee3 ldr r3, [r4, #108] @ 0x6c
  34781. 800ea92: 4a39 ldr r2, [pc, #228] @ (800eb78 <tcp_receive+0x2d4>)
  34782. 800ea94: 6f21 ldr r1, [r4, #112] @ 0x70
  34783. 800ea96: 4620 mov r0, r4
  34784. 800ea98: f7ff fe50 bl 800e73c <tcp_free_acked_segments>
  34785. 800ea9c: 4603 mov r3, r0
  34786. 800ea9e: 6720 str r0, [r4, #112] @ 0x70
  34787. pcb->unsent = tcp_free_acked_segments(pcb, pcb->unsent, "unsent", pcb->unacked);
  34788. 800eaa0: 4a36 ldr r2, [pc, #216] @ (800eb7c <tcp_receive+0x2d8>)
  34789. 800eaa2: 6ee1 ldr r1, [r4, #108] @ 0x6c
  34790. 800eaa4: 4620 mov r0, r4
  34791. 800eaa6: f7ff fe49 bl 800e73c <tcp_free_acked_segments>
  34792. 800eaaa: 66e0 str r0, [r4, #108] @ 0x6c
  34793. if (pcb->unacked == NULL) {
  34794. 800eaac: 6f22 ldr r2, [r4, #112] @ 0x70
  34795. 800eaae: 2a00 cmp r2, #0
  34796. 800eab0: d049 beq.n 800eb46 <tcp_receive+0x2a2>
  34797. pcb->rtime = 0;
  34798. 800eab2: 2300 movs r3, #0
  34799. 800eab4: 8623 strh r3, [r4, #48] @ 0x30
  34800. pcb->polltmr = 0;
  34801. 800eab6: 2300 movs r3, #0
  34802. 800eab8: 7723 strb r3, [r4, #28]
  34803. if (pcb->unsent == NULL) {
  34804. 800eaba: 2800 cmp r0, #0
  34805. 800eabc: d047 beq.n 800eb4e <tcp_receive+0x2aa>
  34806. pcb->snd_buf = (tcpwnd_size_t)(pcb->snd_buf + recv_acked);
  34807. 800eabe: f8b4 3064 ldrh.w r3, [r4, #100] @ 0x64
  34808. 800eac2: 492f ldr r1, [pc, #188] @ (800eb80 <tcp_receive+0x2dc>)
  34809. 800eac4: 8809 ldrh r1, [r1, #0]
  34810. 800eac6: 440b add r3, r1
  34811. 800eac8: f8a4 3064 strh.w r3, [r4, #100] @ 0x64
  34812. if (pcb->flags & TF_RTO) {
  34813. 800eacc: 8b63 ldrh r3, [r4, #26]
  34814. 800eace: f413 6f00 tst.w r3, #2048 @ 0x800
  34815. 800ead2: f43f af27 beq.w 800e924 <tcp_receive+0x80>
  34816. if (pcb->unacked == NULL) {
  34817. 800ead6: 2a00 cmp r2, #0
  34818. 800ead8: d054 beq.n 800eb84 <tcp_receive+0x2e0>
  34819. } else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) {
  34820. 800eada: 6ce5 ldr r5, [r4, #76] @ 0x4c
  34821. 800eadc: 6913 ldr r3, [r2, #16]
  34822. 800eade: 6858 ldr r0, [r3, #4]
  34823. 800eae0: f7f9 f9d1 bl 8007e86 <lwip_htonl>
  34824. 800eae4: 1a2d subs r5, r5, r0
  34825. 800eae6: 2d00 cmp r5, #0
  34826. 800eae8: f73f af1c bgt.w 800e924 <tcp_receive+0x80>
  34827. tcp_clear_flags(pcb, TF_RTO);
  34828. 800eaec: 8b63 ldrh r3, [r4, #26]
  34829. 800eaee: f423 6300 bic.w r3, r3, #2048 @ 0x800
  34830. 800eaf2: 8363 strh r3, [r4, #26]
  34831. 800eaf4: e716 b.n 800e924 <tcp_receive+0x80>
  34832. u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2;
  34833. 800eaf6: 2102 movs r1, #2
  34834. 800eaf8: e7bd b.n 800ea76 <tcp_receive+0x1d2>
  34835. TCP_WND_INC(pcb->cwnd, increase);
  34836. 800eafa: f64f 73ff movw r3, #65535 @ 0xffff
  34837. 800eafe: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
  34838. 800eb02: e7c5 b.n 800ea90 <tcp_receive+0x1ec>
  34839. TCP_WND_INC(pcb->bytes_acked, acked);
  34840. 800eb04: f8b4 106a ldrh.w r1, [r4, #106] @ 0x6a
  34841. 800eb08: 440a add r2, r1
  34842. 800eb0a: b292 uxth r2, r2
  34843. 800eb0c: 4291 cmp r1, r2
  34844. 800eb0e: d810 bhi.n 800eb32 <tcp_receive+0x28e>
  34845. 800eb10: f8a4 206a strh.w r2, [r4, #106] @ 0x6a
  34846. if (pcb->bytes_acked >= pcb->cwnd) {
  34847. 800eb14: f8b4 206a ldrh.w r2, [r4, #106] @ 0x6a
  34848. 800eb18: 4293 cmp r3, r2
  34849. 800eb1a: d8b9 bhi.n 800ea90 <tcp_receive+0x1ec>
  34850. pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd);
  34851. 800eb1c: 1ad2 subs r2, r2, r3
  34852. 800eb1e: f8a4 206a strh.w r2, [r4, #106] @ 0x6a
  34853. TCP_WND_INC(pcb->cwnd, pcb->mss);
  34854. 800eb22: 8e62 ldrh r2, [r4, #50] @ 0x32
  34855. 800eb24: 441a add r2, r3
  34856. 800eb26: b292 uxth r2, r2
  34857. 800eb28: 4293 cmp r3, r2
  34858. 800eb2a: d807 bhi.n 800eb3c <tcp_receive+0x298>
  34859. 800eb2c: f8a4 2048 strh.w r2, [r4, #72] @ 0x48
  34860. 800eb30: e7ae b.n 800ea90 <tcp_receive+0x1ec>
  34861. TCP_WND_INC(pcb->bytes_acked, acked);
  34862. 800eb32: f64f 72ff movw r2, #65535 @ 0xffff
  34863. 800eb36: f8a4 206a strh.w r2, [r4, #106] @ 0x6a
  34864. 800eb3a: e7eb b.n 800eb14 <tcp_receive+0x270>
  34865. TCP_WND_INC(pcb->cwnd, pcb->mss);
  34866. 800eb3c: f64f 73ff movw r3, #65535 @ 0xffff
  34867. 800eb40: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
  34868. 800eb44: e7a4 b.n 800ea90 <tcp_receive+0x1ec>
  34869. pcb->rtime = -1;
  34870. 800eb46: f64f 73ff movw r3, #65535 @ 0xffff
  34871. 800eb4a: 8623 strh r3, [r4, #48] @ 0x30
  34872. 800eb4c: e7b3 b.n 800eab6 <tcp_receive+0x212>
  34873. pcb->unsent_oversize = 0;
  34874. 800eb4e: f8a4 3068 strh.w r3, [r4, #104] @ 0x68
  34875. 800eb52: e7b4 b.n 800eabe <tcp_receive+0x21a>
  34876. 800eb54: 24019bf1 .word 0x24019bf1
  34877. 800eb58: 24019bfc .word 0x24019bfc
  34878. 800eb5c: 24019bf8 .word 0x24019bf8
  34879. 800eb60: 24019c0c .word 0x24019c0c
  34880. 800eb64: 24019bf2 .word 0x24019bf2
  34881. 800eb68: 08016c64 .word 0x08016c64
  34882. 800eb6c: 08016dbc .word 0x08016dbc
  34883. 800eb70: 080144e8 .word 0x080144e8
  34884. 800eb74: 08016dd8 .word 0x08016dd8
  34885. 800eb78: 08016df4 .word 0x08016df4
  34886. 800eb7c: 08016dfc .word 0x08016dfc
  34887. 800eb80: 24019bf4 .word 0x24019bf4
  34888. if ((pcb->unsent == NULL) ||
  34889. 800eb84: b140 cbz r0, 800eb98 <tcp_receive+0x2f4>
  34890. (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) {
  34891. 800eb86: 6ce5 ldr r5, [r4, #76] @ 0x4c
  34892. 800eb88: 6903 ldr r3, [r0, #16]
  34893. 800eb8a: 6858 ldr r0, [r3, #4]
  34894. 800eb8c: f7f9 f97b bl 8007e86 <lwip_htonl>
  34895. 800eb90: 1a2d subs r5, r5, r0
  34896. if ((pcb->unsent == NULL) ||
  34897. 800eb92: 2d00 cmp r5, #0
  34898. 800eb94: f73f aec6 bgt.w 800e924 <tcp_receive+0x80>
  34899. tcp_clear_flags(pcb, TF_RTO);
  34900. 800eb98: 8b63 ldrh r3, [r4, #26]
  34901. 800eb9a: f423 6300 bic.w r3, r3, #2048 @ 0x800
  34902. 800eb9e: 8363 strh r3, [r4, #26]
  34903. 800eba0: e6c0 b.n 800e924 <tcp_receive+0x80>
  34904. m = (s16_t)(tcp_ticks - pcb->rttest);
  34905. 800eba2: 4a88 ldr r2, [pc, #544] @ (800edc4 <tcp_receive+0x520>)
  34906. 800eba4: 8816 ldrh r6, [r2, #0]
  34907. 800eba6: b29b uxth r3, r3
  34908. 800eba8: 1af2 subs r2, r6, r3
  34909. 800ebaa: b292 uxth r2, r2
  34910. m = (s16_t)(m - (pcb->sa >> 3));
  34911. 800ebac: f9b4 003c ldrsh.w r0, [r4, #60] @ 0x3c
  34912. 800ebb0: f3c0 05cf ubfx r5, r0, #3, #16
  34913. 800ebb4: 1b52 subs r2, r2, r5
  34914. 800ebb6: b211 sxth r1, r2
  34915. pcb->sa = (s16_t)(pcb->sa + m);
  34916. 800ebb8: b280 uxth r0, r0
  34917. 800ebba: fa10 f282 uxtah r2, r0, r2
  34918. 800ebbe: b212 sxth r2, r2
  34919. 800ebc0: 87a2 strh r2, [r4, #60] @ 0x3c
  34920. if (m < 0) {
  34921. 800ebc2: 2900 cmp r1, #0
  34922. 800ebc4: db0f blt.n 800ebe6 <tcp_receive+0x342>
  34923. m = (s16_t)(m - (pcb->sv >> 2));
  34924. 800ebc6: f9b4 303e ldrsh.w r3, [r4, #62] @ 0x3e
  34925. 800ebca: eba1 01a3 sub.w r1, r1, r3, asr #2
  34926. pcb->sv = (s16_t)(pcb->sv + m);
  34927. 800ebce: b29b uxth r3, r3
  34928. 800ebd0: fa13 f181 uxtah r1, r3, r1
  34929. 800ebd4: 87e1 strh r1, [r4, #62] @ 0x3e
  34930. pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv);
  34931. 800ebd6: 10d2 asrs r2, r2, #3
  34932. 800ebd8: fa12 f181 uxtah r1, r2, r1
  34933. 800ebdc: f8a4 1040 strh.w r1, [r4, #64] @ 0x40
  34934. pcb->rttest = 0;
  34935. 800ebe0: 2300 movs r3, #0
  34936. 800ebe2: 6363 str r3, [r4, #52] @ 0x34
  34937. 800ebe4: e6a7 b.n 800e936 <tcp_receive+0x92>
  34938. m = (s16_t) - m;
  34939. 800ebe6: 1b9b subs r3, r3, r6
  34940. 800ebe8: 441d add r5, r3
  34941. 800ebea: b229 sxth r1, r5
  34942. 800ebec: e7eb b.n 800ebc6 <tcp_receive+0x322>
  34943. struct pbuf *p = inseg.p;
  34944. 800ebee: 4b76 ldr r3, [pc, #472] @ (800edc8 <tcp_receive+0x524>)
  34945. 800ebf0: 685d ldr r5, [r3, #4]
  34946. LWIP_ASSERT("inseg.p != NULL", inseg.p);
  34947. 800ebf2: b1dd cbz r5, 800ec2c <tcp_receive+0x388>
  34948. LWIP_ASSERT("insane offset!", (off32 < 0xffff));
  34949. 800ebf4: f64f 73fe movw r3, #65534 @ 0xfffe
  34950. 800ebf8: 429e cmp r6, r3
  34951. 800ebfa: d81f bhi.n 800ec3c <tcp_receive+0x398>
  34952. off = (u16_t)off32;
  34953. 800ebfc: b2b6 uxth r6, r6
  34954. LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
  34955. 800ebfe: 4b72 ldr r3, [pc, #456] @ (800edc8 <tcp_receive+0x524>)
  34956. 800ec00: 685b ldr r3, [r3, #4]
  34957. 800ec02: 891b ldrh r3, [r3, #8]
  34958. 800ec04: 42b3 cmp r3, r6
  34959. 800ec06: d321 bcc.n 800ec4c <tcp_receive+0x3a8>
  34960. inseg.len -= off;
  34961. 800ec08: 4b6f ldr r3, [pc, #444] @ (800edc8 <tcp_receive+0x524>)
  34962. 800ec0a: 891a ldrh r2, [r3, #8]
  34963. 800ec0c: 1b92 subs r2, r2, r6
  34964. 800ec0e: 811a strh r2, [r3, #8]
  34965. new_tot_len = (u16_t)(inseg.p->tot_len - off);
  34966. 800ec10: 685b ldr r3, [r3, #4]
  34967. 800ec12: 891a ldrh r2, [r3, #8]
  34968. 800ec14: 1b92 subs r2, r2, r6
  34969. 800ec16: b292 uxth r2, r2
  34970. while (p->len < off) {
  34971. 800ec18: 896b ldrh r3, [r5, #10]
  34972. 800ec1a: 42b3 cmp r3, r6
  34973. 800ec1c: d21e bcs.n 800ec5c <tcp_receive+0x3b8>
  34974. off -= p->len;
  34975. 800ec1e: 1af3 subs r3, r6, r3
  34976. 800ec20: b29e uxth r6, r3
  34977. p->tot_len = new_tot_len;
  34978. 800ec22: 812a strh r2, [r5, #8]
  34979. p->len = 0;
  34980. 800ec24: 2300 movs r3, #0
  34981. 800ec26: 816b strh r3, [r5, #10]
  34982. p = p->next;
  34983. 800ec28: 682d ldr r5, [r5, #0]
  34984. 800ec2a: e7f5 b.n 800ec18 <tcp_receive+0x374>
  34985. LWIP_ASSERT("inseg.p != NULL", inseg.p);
  34986. 800ec2c: 4b67 ldr r3, [pc, #412] @ (800edcc <tcp_receive+0x528>)
  34987. 800ec2e: f240 5294 movw r2, #1428 @ 0x594
  34988. 800ec32: 4967 ldr r1, [pc, #412] @ (800edd0 <tcp_receive+0x52c>)
  34989. 800ec34: 4867 ldr r0, [pc, #412] @ (800edd4 <tcp_receive+0x530>)
  34990. 800ec36: f004 fbe7 bl 8013408 <iprintf>
  34991. 800ec3a: e7db b.n 800ebf4 <tcp_receive+0x350>
  34992. LWIP_ASSERT("insane offset!", (off32 < 0xffff));
  34993. 800ec3c: 4b63 ldr r3, [pc, #396] @ (800edcc <tcp_receive+0x528>)
  34994. 800ec3e: f240 5295 movw r2, #1429 @ 0x595
  34995. 800ec42: 4965 ldr r1, [pc, #404] @ (800edd8 <tcp_receive+0x534>)
  34996. 800ec44: 4863 ldr r0, [pc, #396] @ (800edd4 <tcp_receive+0x530>)
  34997. 800ec46: f004 fbdf bl 8013408 <iprintf>
  34998. 800ec4a: e7d7 b.n 800ebfc <tcp_receive+0x358>
  34999. LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off));
  35000. 800ec4c: 4b5f ldr r3, [pc, #380] @ (800edcc <tcp_receive+0x528>)
  35001. 800ec4e: f240 5297 movw r2, #1431 @ 0x597
  35002. 800ec52: 4962 ldr r1, [pc, #392] @ (800eddc <tcp_receive+0x538>)
  35003. 800ec54: 485f ldr r0, [pc, #380] @ (800edd4 <tcp_receive+0x530>)
  35004. 800ec56: f004 fbd7 bl 8013408 <iprintf>
  35005. 800ec5a: e7d5 b.n 800ec08 <tcp_receive+0x364>
  35006. pbuf_remove_header(p, off);
  35007. 800ec5c: 4631 mov r1, r6
  35008. 800ec5e: 4628 mov r0, r5
  35009. 800ec60: f7fd f858 bl 800bd14 <pbuf_remove_header>
  35010. inseg.tcphdr->seqno = seqno = pcb->rcv_nxt;
  35011. 800ec64: 6a63 ldr r3, [r4, #36] @ 0x24
  35012. 800ec66: 4a5e ldr r2, [pc, #376] @ (800ede0 <tcp_receive+0x53c>)
  35013. 800ec68: 6013 str r3, [r2, #0]
  35014. 800ec6a: 4a57 ldr r2, [pc, #348] @ (800edc8 <tcp_receive+0x524>)
  35015. 800ec6c: 6912 ldr r2, [r2, #16]
  35016. 800ec6e: 6053 str r3, [r2, #4]
  35017. if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) {
  35018. 800ec70: e67a b.n 800e968 <tcp_receive+0xc4>
  35019. tcp_ack_now(pcb);
  35020. 800ec72: 8b63 ldrh r3, [r4, #26]
  35021. 800ec74: f043 0302 orr.w r3, r3, #2
  35022. 800ec78: 8363 strh r3, [r4, #26]
  35023. 800ec7a: e675 b.n 800e968 <tcp_receive+0xc4>
  35024. if (pcb->rcv_nxt == seqno) {
  35025. 800ec7c: 428b cmp r3, r1
  35026. 800ec7e: d005 beq.n 800ec8c <tcp_receive+0x3e8>
  35027. if (pcb->ooseq == NULL) {
  35028. 800ec80: 6f65 ldr r5, [r4, #116] @ 0x74
  35029. 800ec82: 2d00 cmp r5, #0
  35030. 800ec84: f000 81aa beq.w 800efdc <tcp_receive+0x738>
  35031. struct tcp_seg *next, *prev = NULL;
  35032. 800ec88: 2600 movs r6, #0
  35033. 800ec8a: e1cc b.n 800f026 <tcp_receive+0x782>
  35034. tcplen = TCP_TCPLEN(&inseg);
  35035. 800ec8c: 4b4e ldr r3, [pc, #312] @ (800edc8 <tcp_receive+0x524>)
  35036. 800ec8e: 891d ldrh r5, [r3, #8]
  35037. 800ec90: 691b ldr r3, [r3, #16]
  35038. 800ec92: 8998 ldrh r0, [r3, #12]
  35039. 800ec94: f7f9 f8f2 bl 8007e7c <lwip_htons>
  35040. 800ec98: f010 0f03 tst.w r0, #3
  35041. 800ec9c: d014 beq.n 800ecc8 <tcp_receive+0x424>
  35042. 800ec9e: 2301 movs r3, #1
  35043. 800eca0: 442b add r3, r5
  35044. 800eca2: b29b uxth r3, r3
  35045. 800eca4: 4a4f ldr r2, [pc, #316] @ (800ede4 <tcp_receive+0x540>)
  35046. 800eca6: 8013 strh r3, [r2, #0]
  35047. if (tcplen > pcb->rcv_wnd) {
  35048. 800eca8: 8d22 ldrh r2, [r4, #40] @ 0x28
  35049. 800ecaa: 4293 cmp r3, r2
  35050. 800ecac: d80e bhi.n 800eccc <tcp_receive+0x428>
  35051. if (pcb->ooseq != NULL) {
  35052. 800ecae: 6f63 ldr r3, [r4, #116] @ 0x74
  35053. 800ecb0: 2b00 cmp r3, #0
  35054. 800ecb2: d05d beq.n 800ed70 <tcp_receive+0x4cc>
  35055. if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
  35056. 800ecb4: 4b44 ldr r3, [pc, #272] @ (800edc8 <tcp_receive+0x524>)
  35057. 800ecb6: 691b ldr r3, [r3, #16]
  35058. 800ecb8: 8998 ldrh r0, [r3, #12]
  35059. 800ecba: f7f9 f8df bl 8007e7c <lwip_htons>
  35060. 800ecbe: f010 0f01 tst.w r0, #1
  35061. 800ecc2: d152 bne.n 800ed6a <tcp_receive+0x4c6>
  35062. struct tcp_seg *next = pcb->ooseq;
  35063. 800ecc4: 6f65 ldr r5, [r4, #116] @ 0x74
  35064. while (next &&
  35065. 800ecc6: e09e b.n 800ee06 <tcp_receive+0x562>
  35066. tcplen = TCP_TCPLEN(&inseg);
  35067. 800ecc8: 2300 movs r3, #0
  35068. 800ecca: e7e9 b.n 800eca0 <tcp_receive+0x3fc>
  35069. if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
  35070. 800eccc: 4b3e ldr r3, [pc, #248] @ (800edc8 <tcp_receive+0x524>)
  35071. 800ecce: 691b ldr r3, [r3, #16]
  35072. 800ecd0: 8998 ldrh r0, [r3, #12]
  35073. 800ecd2: f7f9 f8d3 bl 8007e7c <lwip_htons>
  35074. 800ecd6: f010 0f01 tst.w r0, #1
  35075. 800ecda: d12f bne.n 800ed3c <tcp_receive+0x498>
  35076. inseg.len = (u16_t)pcb->rcv_wnd;
  35077. 800ecdc: 8d22 ldrh r2, [r4, #40] @ 0x28
  35078. 800ecde: 4b3a ldr r3, [pc, #232] @ (800edc8 <tcp_receive+0x524>)
  35079. 800ece0: 811a strh r2, [r3, #8]
  35080. if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
  35081. 800ece2: 691b ldr r3, [r3, #16]
  35082. 800ece4: 8998 ldrh r0, [r3, #12]
  35083. 800ece6: f7f9 f8c9 bl 8007e7c <lwip_htons>
  35084. 800ecea: f010 0f02 tst.w r0, #2
  35085. 800ecee: d003 beq.n 800ecf8 <tcp_receive+0x454>
  35086. inseg.len -= 1;
  35087. 800ecf0: 4a35 ldr r2, [pc, #212] @ (800edc8 <tcp_receive+0x524>)
  35088. 800ecf2: 8913 ldrh r3, [r2, #8]
  35089. 800ecf4: 3b01 subs r3, #1
  35090. 800ecf6: 8113 strh r3, [r2, #8]
  35091. pbuf_realloc(inseg.p, inseg.len);
  35092. 800ecf8: 4d33 ldr r5, [pc, #204] @ (800edc8 <tcp_receive+0x524>)
  35093. 800ecfa: 8929 ldrh r1, [r5, #8]
  35094. 800ecfc: 6868 ldr r0, [r5, #4]
  35095. 800ecfe: f7fd f965 bl 800bfcc <pbuf_realloc>
  35096. tcplen = TCP_TCPLEN(&inseg);
  35097. 800ed02: 892e ldrh r6, [r5, #8]
  35098. 800ed04: 692b ldr r3, [r5, #16]
  35099. 800ed06: 8998 ldrh r0, [r3, #12]
  35100. 800ed08: f7f9 f8b8 bl 8007e7c <lwip_htons>
  35101. 800ed0c: f010 0f03 tst.w r0, #3
  35102. 800ed10: d025 beq.n 800ed5e <tcp_receive+0x4ba>
  35103. 800ed12: 2301 movs r3, #1
  35104. 800ed14: 4433 add r3, r6
  35105. 800ed16: b29b uxth r3, r3
  35106. 800ed18: 4a32 ldr r2, [pc, #200] @ (800ede4 <tcp_receive+0x540>)
  35107. 800ed1a: 8013 strh r3, [r2, #0]
  35108. LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
  35109. 800ed1c: 4a30 ldr r2, [pc, #192] @ (800ede0 <tcp_receive+0x53c>)
  35110. 800ed1e: 6812 ldr r2, [r2, #0]
  35111. 800ed20: 4413 add r3, r2
  35112. 800ed22: 6a62 ldr r2, [r4, #36] @ 0x24
  35113. 800ed24: 8d21 ldrh r1, [r4, #40] @ 0x28
  35114. 800ed26: 440a add r2, r1
  35115. 800ed28: 4293 cmp r3, r2
  35116. 800ed2a: d0c0 beq.n 800ecae <tcp_receive+0x40a>
  35117. 800ed2c: 4b27 ldr r3, [pc, #156] @ (800edcc <tcp_receive+0x528>)
  35118. 800ed2e: f240 52cb movw r2, #1483 @ 0x5cb
  35119. 800ed32: 492d ldr r1, [pc, #180] @ (800ede8 <tcp_receive+0x544>)
  35120. 800ed34: 4827 ldr r0, [pc, #156] @ (800edd4 <tcp_receive+0x530>)
  35121. 800ed36: f004 fb67 bl 8013408 <iprintf>
  35122. 800ed3a: e7b8 b.n 800ecae <tcp_receive+0x40a>
  35123. TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) & ~(unsigned int)TCP_FIN);
  35124. 800ed3c: 4e22 ldr r6, [pc, #136] @ (800edc8 <tcp_receive+0x524>)
  35125. 800ed3e: 6933 ldr r3, [r6, #16]
  35126. 800ed40: 899d ldrh r5, [r3, #12]
  35127. 800ed42: 4628 mov r0, r5
  35128. 800ed44: f7f9 f89a bl 8007e7c <lwip_htons>
  35129. 800ed48: f000 003e and.w r0, r0, #62 @ 0x3e
  35130. 800ed4c: f7f9 f896 bl 8007e7c <lwip_htons>
  35131. 800ed50: 6932 ldr r2, [r6, #16]
  35132. 800ed52: f425 557c bic.w r5, r5, #16128 @ 0x3f00
  35133. 800ed56: ea40 0305 orr.w r3, r0, r5
  35134. 800ed5a: 8193 strh r3, [r2, #12]
  35135. 800ed5c: e7be b.n 800ecdc <tcp_receive+0x438>
  35136. tcplen = TCP_TCPLEN(&inseg);
  35137. 800ed5e: 2300 movs r3, #0
  35138. 800ed60: e7d8 b.n 800ed14 <tcp_receive+0x470>
  35139. pcb->ooseq = pcb->ooseq->next;
  35140. 800ed62: 6803 ldr r3, [r0, #0]
  35141. 800ed64: 6763 str r3, [r4, #116] @ 0x74
  35142. tcp_seg_free(old_ooseq);
  35143. 800ed66: f7fe fb21 bl 800d3ac <tcp_seg_free>
  35144. while (pcb->ooseq != NULL) {
  35145. 800ed6a: 6f60 ldr r0, [r4, #116] @ 0x74
  35146. 800ed6c: 2800 cmp r0, #0
  35147. 800ed6e: d1f8 bne.n 800ed62 <tcp_receive+0x4be>
  35148. pcb->rcv_nxt = seqno + tcplen;
  35149. 800ed70: 4b1c ldr r3, [pc, #112] @ (800ede4 <tcp_receive+0x540>)
  35150. 800ed72: 881a ldrh r2, [r3, #0]
  35151. 800ed74: 4b1a ldr r3, [pc, #104] @ (800ede0 <tcp_receive+0x53c>)
  35152. 800ed76: 681b ldr r3, [r3, #0]
  35153. 800ed78: 4413 add r3, r2
  35154. 800ed7a: 6263 str r3, [r4, #36] @ 0x24
  35155. LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen);
  35156. 800ed7c: 8d23 ldrh r3, [r4, #40] @ 0x28
  35157. 800ed7e: 429a cmp r2, r3
  35158. 800ed80: f200 80ad bhi.w 800eede <tcp_receive+0x63a>
  35159. pcb->rcv_wnd -= tcplen;
  35160. 800ed84: 8d23 ldrh r3, [r4, #40] @ 0x28
  35161. 800ed86: 4a17 ldr r2, [pc, #92] @ (800ede4 <tcp_receive+0x540>)
  35162. 800ed88: 8812 ldrh r2, [r2, #0]
  35163. 800ed8a: 1a9b subs r3, r3, r2
  35164. 800ed8c: 8523 strh r3, [r4, #40] @ 0x28
  35165. tcp_update_rcv_ann_wnd(pcb);
  35166. 800ed8e: 4620 mov r0, r4
  35167. 800ed90: f7fe fa90 bl 800d2b4 <tcp_update_rcv_ann_wnd>
  35168. if (inseg.p->tot_len > 0) {
  35169. 800ed94: 4b0c ldr r3, [pc, #48] @ (800edc8 <tcp_receive+0x524>)
  35170. 800ed96: 685b ldr r3, [r3, #4]
  35171. 800ed98: 891a ldrh r2, [r3, #8]
  35172. 800ed9a: b122 cbz r2, 800eda6 <tcp_receive+0x502>
  35173. recv_data = inseg.p;
  35174. 800ed9c: 4a13 ldr r2, [pc, #76] @ (800edec <tcp_receive+0x548>)
  35175. 800ed9e: 6013 str r3, [r2, #0]
  35176. inseg.p = NULL;
  35177. 800eda0: 4b09 ldr r3, [pc, #36] @ (800edc8 <tcp_receive+0x524>)
  35178. 800eda2: 2200 movs r2, #0
  35179. 800eda4: 605a str r2, [r3, #4]
  35180. if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
  35181. 800eda6: 4b08 ldr r3, [pc, #32] @ (800edc8 <tcp_receive+0x524>)
  35182. 800eda8: 691b ldr r3, [r3, #16]
  35183. 800edaa: 8998 ldrh r0, [r3, #12]
  35184. 800edac: f7f9 f866 bl 8007e7c <lwip_htons>
  35185. 800edb0: f010 0f01 tst.w r0, #1
  35186. 800edb4: f000 80c1 beq.w 800ef3a <tcp_receive+0x696>
  35187. recv_flags |= TF_GOT_FIN;
  35188. 800edb8: 4a0d ldr r2, [pc, #52] @ (800edf0 <tcp_receive+0x54c>)
  35189. 800edba: 7813 ldrb r3, [r2, #0]
  35190. 800edbc: f043 0320 orr.w r3, r3, #32
  35191. 800edc0: 7013 strb r3, [r2, #0]
  35192. 800edc2: e0ba b.n 800ef3a <tcp_receive+0x696>
  35193. 800edc4: 24019be4 .word 0x24019be4
  35194. 800edc8: 24019c10 .word 0x24019c10
  35195. 800edcc: 08016c64 .word 0x08016c64
  35196. 800edd0: 08016e04 .word 0x08016e04
  35197. 800edd4: 080144e8 .word 0x080144e8
  35198. 800edd8: 08016e14 .word 0x08016e14
  35199. 800eddc: 08016e24 .word 0x08016e24
  35200. 800ede0: 24019bfc .word 0x24019bfc
  35201. 800ede4: 24019bf2 .word 0x24019bf2
  35202. 800ede8: 08016e34 .word 0x08016e34
  35203. 800edec: 24019bec .word 0x24019bec
  35204. 800edf0: 24019bf0 .word 0x24019bf0
  35205. tcplen = TCP_TCPLEN(&inseg);
  35206. 800edf4: 2300 movs r3, #0
  35207. 800edf6: 443b add r3, r7
  35208. 800edf8: 4a9e ldr r2, [pc, #632] @ (800f074 <tcp_receive+0x7d0>)
  35209. 800edfa: 8013 strh r3, [r2, #0]
  35210. next = next->next;
  35211. 800edfc: 682e ldr r6, [r5, #0]
  35212. tcp_seg_free(tmp);
  35213. 800edfe: 4628 mov r0, r5
  35214. 800ee00: f7fe fad4 bl 800d3ac <tcp_seg_free>
  35215. next = next->next;
  35216. 800ee04: 4635 mov r5, r6
  35217. while (next &&
  35218. 800ee06: b365 cbz r5, 800ee62 <tcp_receive+0x5be>
  35219. TCP_SEQ_GEQ(seqno + tcplen,
  35220. 800ee08: 4b9a ldr r3, [pc, #616] @ (800f074 <tcp_receive+0x7d0>)
  35221. 800ee0a: 881b ldrh r3, [r3, #0]
  35222. 800ee0c: 4a9a ldr r2, [pc, #616] @ (800f078 <tcp_receive+0x7d4>)
  35223. 800ee0e: 6812 ldr r2, [r2, #0]
  35224. 800ee10: 4413 add r3, r2
  35225. 800ee12: 6929 ldr r1, [r5, #16]
  35226. 800ee14: 684a ldr r2, [r1, #4]
  35227. 800ee16: 8928 ldrh r0, [r5, #8]
  35228. 800ee18: 4402 add r2, r0
  35229. 800ee1a: 1a9b subs r3, r3, r2
  35230. while (next &&
  35231. 800ee1c: 2b00 cmp r3, #0
  35232. 800ee1e: db20 blt.n 800ee62 <tcp_receive+0x5be>
  35233. if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
  35234. 800ee20: 8988 ldrh r0, [r1, #12]
  35235. 800ee22: f7f9 f82b bl 8007e7c <lwip_htons>
  35236. 800ee26: f010 0f01 tst.w r0, #1
  35237. 800ee2a: d0e7 beq.n 800edfc <tcp_receive+0x558>
  35238. (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) {
  35239. 800ee2c: 4b93 ldr r3, [pc, #588] @ (800f07c <tcp_receive+0x7d8>)
  35240. 800ee2e: 691b ldr r3, [r3, #16]
  35241. 800ee30: 8998 ldrh r0, [r3, #12]
  35242. 800ee32: f7f9 f823 bl 8007e7c <lwip_htons>
  35243. if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 &&
  35244. 800ee36: f010 0f02 tst.w r0, #2
  35245. 800ee3a: d1df bne.n 800edfc <tcp_receive+0x558>
  35246. TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN);
  35247. 800ee3c: 4e8f ldr r6, [pc, #572] @ (800f07c <tcp_receive+0x7d8>)
  35248. 800ee3e: 6933 ldr r3, [r6, #16]
  35249. 800ee40: 899f ldrh r7, [r3, #12]
  35250. 800ee42: 2001 movs r0, #1
  35251. 800ee44: f7f9 f81a bl 8007e7c <lwip_htons>
  35252. 800ee48: 6933 ldr r3, [r6, #16]
  35253. 800ee4a: 4307 orrs r7, r0
  35254. 800ee4c: 819f strh r7, [r3, #12]
  35255. tcplen = TCP_TCPLEN(&inseg);
  35256. 800ee4e: 8937 ldrh r7, [r6, #8]
  35257. 800ee50: 6933 ldr r3, [r6, #16]
  35258. 800ee52: 8998 ldrh r0, [r3, #12]
  35259. 800ee54: f7f9 f812 bl 8007e7c <lwip_htons>
  35260. 800ee58: f010 0f03 tst.w r0, #3
  35261. 800ee5c: d0ca beq.n 800edf4 <tcp_receive+0x550>
  35262. 800ee5e: 2301 movs r3, #1
  35263. 800ee60: e7c9 b.n 800edf6 <tcp_receive+0x552>
  35264. if (next &&
  35265. 800ee62: b14d cbz r5, 800ee78 <tcp_receive+0x5d4>
  35266. TCP_SEQ_GT(seqno + tcplen,
  35267. 800ee64: 4b84 ldr r3, [pc, #528] @ (800f078 <tcp_receive+0x7d4>)
  35268. 800ee66: 6819 ldr r1, [r3, #0]
  35269. 800ee68: 4b82 ldr r3, [pc, #520] @ (800f074 <tcp_receive+0x7d0>)
  35270. 800ee6a: 881b ldrh r3, [r3, #0]
  35271. 800ee6c: 440b add r3, r1
  35272. 800ee6e: 692a ldr r2, [r5, #16]
  35273. 800ee70: 6852 ldr r2, [r2, #4]
  35274. 800ee72: 1a9b subs r3, r3, r2
  35275. if (next &&
  35276. 800ee74: 2b00 cmp r3, #0
  35277. 800ee76: dc01 bgt.n 800ee7c <tcp_receive+0x5d8>
  35278. pcb->ooseq = next;
  35279. 800ee78: 6765 str r5, [r4, #116] @ 0x74
  35280. 800ee7a: e779 b.n 800ed70 <tcp_receive+0x4cc>
  35281. inseg.len = (u16_t)(next->tcphdr->seqno - seqno);
  35282. 800ee7c: 1a52 subs r2, r2, r1
  35283. 800ee7e: 4b7f ldr r3, [pc, #508] @ (800f07c <tcp_receive+0x7d8>)
  35284. 800ee80: 811a strh r2, [r3, #8]
  35285. if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
  35286. 800ee82: 691b ldr r3, [r3, #16]
  35287. 800ee84: 8998 ldrh r0, [r3, #12]
  35288. 800ee86: f7f8 fff9 bl 8007e7c <lwip_htons>
  35289. 800ee8a: f010 0f02 tst.w r0, #2
  35290. 800ee8e: d003 beq.n 800ee98 <tcp_receive+0x5f4>
  35291. inseg.len -= 1;
  35292. 800ee90: 4a7a ldr r2, [pc, #488] @ (800f07c <tcp_receive+0x7d8>)
  35293. 800ee92: 8913 ldrh r3, [r2, #8]
  35294. 800ee94: 3b01 subs r3, #1
  35295. 800ee96: 8113 strh r3, [r2, #8]
  35296. pbuf_realloc(inseg.p, inseg.len);
  35297. 800ee98: 4e78 ldr r6, [pc, #480] @ (800f07c <tcp_receive+0x7d8>)
  35298. 800ee9a: 8931 ldrh r1, [r6, #8]
  35299. 800ee9c: 6870 ldr r0, [r6, #4]
  35300. 800ee9e: f7fd f895 bl 800bfcc <pbuf_realloc>
  35301. tcplen = TCP_TCPLEN(&inseg);
  35302. 800eea2: 8937 ldrh r7, [r6, #8]
  35303. 800eea4: 6933 ldr r3, [r6, #16]
  35304. 800eea6: 8998 ldrh r0, [r3, #12]
  35305. 800eea8: f7f8 ffe8 bl 8007e7c <lwip_htons>
  35306. 800eeac: f010 0f03 tst.w r0, #3
  35307. 800eeb0: d013 beq.n 800eeda <tcp_receive+0x636>
  35308. 800eeb2: 2301 movs r3, #1
  35309. 800eeb4: 443b add r3, r7
  35310. 800eeb6: b29b uxth r3, r3
  35311. 800eeb8: 4a6e ldr r2, [pc, #440] @ (800f074 <tcp_receive+0x7d0>)
  35312. 800eeba: 8013 strh r3, [r2, #0]
  35313. LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n",
  35314. 800eebc: 4a6e ldr r2, [pc, #440] @ (800f078 <tcp_receive+0x7d4>)
  35315. 800eebe: 6812 ldr r2, [r2, #0]
  35316. 800eec0: 4413 add r3, r2
  35317. 800eec2: 692a ldr r2, [r5, #16]
  35318. 800eec4: 6852 ldr r2, [r2, #4]
  35319. 800eec6: 4293 cmp r3, r2
  35320. 800eec8: d0d6 beq.n 800ee78 <tcp_receive+0x5d4>
  35321. 800eeca: 4b6d ldr r3, [pc, #436] @ (800f080 <tcp_receive+0x7dc>)
  35322. 800eecc: f240 52fc movw r2, #1532 @ 0x5fc
  35323. 800eed0: 496c ldr r1, [pc, #432] @ (800f084 <tcp_receive+0x7e0>)
  35324. 800eed2: 486d ldr r0, [pc, #436] @ (800f088 <tcp_receive+0x7e4>)
  35325. 800eed4: f004 fa98 bl 8013408 <iprintf>
  35326. 800eed8: e7ce b.n 800ee78 <tcp_receive+0x5d4>
  35327. tcplen = TCP_TCPLEN(&inseg);
  35328. 800eeda: 2300 movs r3, #0
  35329. 800eedc: e7ea b.n 800eeb4 <tcp_receive+0x610>
  35330. LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen);
  35331. 800eede: 4b68 ldr r3, [pc, #416] @ (800f080 <tcp_receive+0x7dc>)
  35332. 800eee0: f240 6207 movw r2, #1543 @ 0x607
  35333. 800eee4: 4969 ldr r1, [pc, #420] @ (800f08c <tcp_receive+0x7e8>)
  35334. 800eee6: 4868 ldr r0, [pc, #416] @ (800f088 <tcp_receive+0x7e4>)
  35335. 800eee8: f004 fa8e bl 8013408 <iprintf>
  35336. 800eeec: e74a b.n 800ed84 <tcp_receive+0x4e0>
  35337. pcb->rcv_nxt += TCP_TCPLEN(cseg);
  35338. 800eeee: 2200 movs r2, #0
  35339. 800eef0: e035 b.n 800ef5e <tcp_receive+0x6ba>
  35340. LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n",
  35341. 800eef2: 2300 movs r3, #0
  35342. 800eef4: e041 b.n 800ef7a <tcp_receive+0x6d6>
  35343. 800eef6: 4b62 ldr r3, [pc, #392] @ (800f080 <tcp_receive+0x7dc>)
  35344. 800eef8: f240 622b movw r2, #1579 @ 0x62b
  35345. 800eefc: 4964 ldr r1, [pc, #400] @ (800f090 <tcp_receive+0x7ec>)
  35346. 800eefe: 4862 ldr r0, [pc, #392] @ (800f088 <tcp_receive+0x7e4>)
  35347. 800ef00: f004 fa82 bl 8013408 <iprintf>
  35348. 800ef04: e03c b.n 800ef80 <tcp_receive+0x6dc>
  35349. pcb->rcv_wnd -= TCP_TCPLEN(cseg);
  35350. 800ef06: 2200 movs r2, #0
  35351. 800ef08: e043 b.n 800ef92 <tcp_receive+0x6ee>
  35352. recv_data = cseg->p;
  35353. 800ef0a: 4b62 ldr r3, [pc, #392] @ (800f094 <tcp_receive+0x7f0>)
  35354. 800ef0c: 6019 str r1, [r3, #0]
  35355. cseg->p = NULL;
  35356. 800ef0e: 2300 movs r3, #0
  35357. 800ef10: 606b str r3, [r5, #4]
  35358. if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
  35359. 800ef12: 692b ldr r3, [r5, #16]
  35360. 800ef14: 8998 ldrh r0, [r3, #12]
  35361. 800ef16: f7f8 ffb1 bl 8007e7c <lwip_htons>
  35362. 800ef1a: f010 0f01 tst.w r0, #1
  35363. 800ef1e: d007 beq.n 800ef30 <tcp_receive+0x68c>
  35364. recv_flags |= TF_GOT_FIN;
  35365. 800ef20: 4a5d ldr r2, [pc, #372] @ (800f098 <tcp_receive+0x7f4>)
  35366. 800ef22: 7813 ldrb r3, [r2, #0]
  35367. 800ef24: f043 0320 orr.w r3, r3, #32
  35368. 800ef28: 7013 strb r3, [r2, #0]
  35369. if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */
  35370. 800ef2a: 7d23 ldrb r3, [r4, #20]
  35371. 800ef2c: 2b04 cmp r3, #4
  35372. 800ef2e: d042 beq.n 800efb6 <tcp_receive+0x712>
  35373. pcb->ooseq = cseg->next;
  35374. 800ef30: 682b ldr r3, [r5, #0]
  35375. 800ef32: 6763 str r3, [r4, #116] @ 0x74
  35376. tcp_seg_free(cseg);
  35377. 800ef34: 4628 mov r0, r5
  35378. 800ef36: f7fe fa39 bl 800d3ac <tcp_seg_free>
  35379. while (pcb->ooseq != NULL &&
  35380. 800ef3a: 6f65 ldr r5, [r4, #116] @ 0x74
  35381. 800ef3c: 2d00 cmp r5, #0
  35382. 800ef3e: d03d beq.n 800efbc <tcp_receive+0x718>
  35383. pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) {
  35384. 800ef40: 692a ldr r2, [r5, #16]
  35385. 800ef42: 6853 ldr r3, [r2, #4]
  35386. 800ef44: 6a61 ldr r1, [r4, #36] @ 0x24
  35387. while (pcb->ooseq != NULL &&
  35388. 800ef46: 428b cmp r3, r1
  35389. 800ef48: d138 bne.n 800efbc <tcp_receive+0x718>
  35390. seqno = pcb->ooseq->tcphdr->seqno;
  35391. 800ef4a: 494b ldr r1, [pc, #300] @ (800f078 <tcp_receive+0x7d4>)
  35392. 800ef4c: 600b str r3, [r1, #0]
  35393. pcb->rcv_nxt += TCP_TCPLEN(cseg);
  35394. 800ef4e: 892e ldrh r6, [r5, #8]
  35395. 800ef50: 8990 ldrh r0, [r2, #12]
  35396. 800ef52: f7f8 ff93 bl 8007e7c <lwip_htons>
  35397. 800ef56: f010 0f03 tst.w r0, #3
  35398. 800ef5a: d0c8 beq.n 800eeee <tcp_receive+0x64a>
  35399. 800ef5c: 2201 movs r2, #1
  35400. 800ef5e: 4432 add r2, r6
  35401. 800ef60: 6a63 ldr r3, [r4, #36] @ 0x24
  35402. 800ef62: 4413 add r3, r2
  35403. 800ef64: 6263 str r3, [r4, #36] @ 0x24
  35404. LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n",
  35405. 800ef66: 8d26 ldrh r6, [r4, #40] @ 0x28
  35406. 800ef68: 892f ldrh r7, [r5, #8]
  35407. 800ef6a: 692b ldr r3, [r5, #16]
  35408. 800ef6c: 8998 ldrh r0, [r3, #12]
  35409. 800ef6e: f7f8 ff85 bl 8007e7c <lwip_htons>
  35410. 800ef72: f010 0f03 tst.w r0, #3
  35411. 800ef76: d0bc beq.n 800eef2 <tcp_receive+0x64e>
  35412. 800ef78: 2301 movs r3, #1
  35413. 800ef7a: 443b add r3, r7
  35414. 800ef7c: 429e cmp r6, r3
  35415. 800ef7e: d3ba bcc.n 800eef6 <tcp_receive+0x652>
  35416. pcb->rcv_wnd -= TCP_TCPLEN(cseg);
  35417. 800ef80: 892e ldrh r6, [r5, #8]
  35418. 800ef82: 692b ldr r3, [r5, #16]
  35419. 800ef84: 8998 ldrh r0, [r3, #12]
  35420. 800ef86: f7f8 ff79 bl 8007e7c <lwip_htons>
  35421. 800ef8a: f010 0f03 tst.w r0, #3
  35422. 800ef8e: d0ba beq.n 800ef06 <tcp_receive+0x662>
  35423. 800ef90: 2201 movs r2, #1
  35424. 800ef92: 4432 add r2, r6
  35425. 800ef94: 8d23 ldrh r3, [r4, #40] @ 0x28
  35426. 800ef96: 1a9b subs r3, r3, r2
  35427. 800ef98: 8523 strh r3, [r4, #40] @ 0x28
  35428. tcp_update_rcv_ann_wnd(pcb);
  35429. 800ef9a: 4620 mov r0, r4
  35430. 800ef9c: f7fe f98a bl 800d2b4 <tcp_update_rcv_ann_wnd>
  35431. if (cseg->p->tot_len > 0) {
  35432. 800efa0: 6869 ldr r1, [r5, #4]
  35433. 800efa2: 890b ldrh r3, [r1, #8]
  35434. 800efa4: 2b00 cmp r3, #0
  35435. 800efa6: d0b4 beq.n 800ef12 <tcp_receive+0x66e>
  35436. if (recv_data) {
  35437. 800efa8: 4b3a ldr r3, [pc, #232] @ (800f094 <tcp_receive+0x7f0>)
  35438. 800efaa: 6818 ldr r0, [r3, #0]
  35439. 800efac: 2800 cmp r0, #0
  35440. 800efae: d0ac beq.n 800ef0a <tcp_receive+0x666>
  35441. pbuf_cat(recv_data, cseg->p);
  35442. 800efb0: f7fd f8a0 bl 800c0f4 <pbuf_cat>
  35443. 800efb4: e7ab b.n 800ef0e <tcp_receive+0x66a>
  35444. pcb->state = CLOSE_WAIT;
  35445. 800efb6: 2307 movs r3, #7
  35446. 800efb8: 7523 strb r3, [r4, #20]
  35447. 800efba: e7b9 b.n 800ef30 <tcp_receive+0x68c>
  35448. tcp_ack(pcb);
  35449. 800efbc: 8b63 ldrh r3, [r4, #26]
  35450. 800efbe: f013 0f01 tst.w r3, #1
  35451. 800efc2: d007 beq.n 800efd4 <tcp_receive+0x730>
  35452. 800efc4: f023 0301 bic.w r3, r3, #1
  35453. 800efc8: b29b uxth r3, r3
  35454. 800efca: 8363 strh r3, [r4, #26]
  35455. 800efcc: f043 0302 orr.w r3, r3, #2
  35456. 800efd0: 8363 strh r3, [r4, #26]
  35457. 800efd2: e0fa b.n 800f1ca <tcp_receive+0x926>
  35458. 800efd4: f043 0301 orr.w r3, r3, #1
  35459. 800efd8: 8363 strh r3, [r4, #26]
  35460. 800efda: e0f6 b.n 800f1ca <tcp_receive+0x926>
  35461. pcb->ooseq = tcp_seg_copy(&inseg);
  35462. 800efdc: 4827 ldr r0, [pc, #156] @ (800f07c <tcp_receive+0x7d8>)
  35463. 800efde: f7fe f9fd bl 800d3dc <tcp_seg_copy>
  35464. 800efe2: 6760 str r0, [r4, #116] @ 0x74
  35465. 800efe4: e004 b.n 800eff0 <tcp_receive+0x74c>
  35466. if (inseg.len > next->len) {
  35467. 800efe6: 4b25 ldr r3, [pc, #148] @ (800f07c <tcp_receive+0x7d8>)
  35468. 800efe8: 891a ldrh r2, [r3, #8]
  35469. 800efea: 892b ldrh r3, [r5, #8]
  35470. 800efec: 429a cmp r2, r3
  35471. 800efee: d803 bhi.n 800eff8 <tcp_receive+0x754>
  35472. tcp_send_empty_ack(pcb);
  35473. 800eff0: 4620 mov r0, r4
  35474. 800eff2: f001 fefd bl 8010df0 <tcp_send_empty_ack>
  35475. 800eff6: e0e8 b.n 800f1ca <tcp_receive+0x926>
  35476. struct tcp_seg *cseg = tcp_seg_copy(&inseg);
  35477. 800eff8: 4820 ldr r0, [pc, #128] @ (800f07c <tcp_receive+0x7d8>)
  35478. 800effa: f7fe f9ef bl 800d3dc <tcp_seg_copy>
  35479. if (cseg != NULL) {
  35480. 800effe: 4603 mov r3, r0
  35481. 800f000: 2800 cmp r0, #0
  35482. 800f002: d0f5 beq.n 800eff0 <tcp_receive+0x74c>
  35483. if (prev != NULL) {
  35484. 800f004: b12e cbz r6, 800f012 <tcp_receive+0x76e>
  35485. prev->next = cseg;
  35486. 800f006: 6030 str r0, [r6, #0]
  35487. tcp_oos_insert_segment(cseg, next);
  35488. 800f008: 4629 mov r1, r5
  35489. 800f00a: 4618 mov r0, r3
  35490. 800f00c: f7ff fbf6 bl 800e7fc <tcp_oos_insert_segment>
  35491. 800f010: e7ee b.n 800eff0 <tcp_receive+0x74c>
  35492. pcb->ooseq = cseg;
  35493. 800f012: 6760 str r0, [r4, #116] @ 0x74
  35494. 800f014: e7f8 b.n 800f008 <tcp_receive+0x764>
  35495. if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) {
  35496. 800f016: 1a99 subs r1, r3, r2
  35497. 800f018: 2900 cmp r1, #0
  35498. 800f01a: db3f blt.n 800f09c <tcp_receive+0x7f8>
  35499. if (next->next == NULL &&
  35500. 800f01c: 6829 ldr r1, [r5, #0]
  35501. 800f01e: 462e mov r6, r5
  35502. 800f020: 2900 cmp r1, #0
  35503. 800f022: d04c beq.n 800f0be <tcp_receive+0x81a>
  35504. 800f024: 460d mov r5, r1
  35505. for (next = pcb->ooseq; next != NULL; next = next->next) {
  35506. 800f026: 2d00 cmp r5, #0
  35507. 800f028: d0e2 beq.n 800eff0 <tcp_receive+0x74c>
  35508. if (seqno == next->tcphdr->seqno) {
  35509. 800f02a: 6928 ldr r0, [r5, #16]
  35510. 800f02c: 6842 ldr r2, [r0, #4]
  35511. 800f02e: 4293 cmp r3, r2
  35512. 800f030: d0d9 beq.n 800efe6 <tcp_receive+0x742>
  35513. if (prev == NULL) {
  35514. 800f032: 2e00 cmp r6, #0
  35515. 800f034: d0ef beq.n 800f016 <tcp_receive+0x772>
  35516. if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno + 1, next->tcphdr->seqno - 1)) {
  35517. 800f036: 6931 ldr r1, [r6, #16]
  35518. 800f038: 6849 ldr r1, [r1, #4]
  35519. 800f03a: 1a59 subs r1, r3, r1
  35520. 800f03c: 2901 cmp r1, #1
  35521. 800f03e: d4ed bmi.n 800f01c <tcp_receive+0x778>
  35522. 800f040: 1a99 subs r1, r3, r2
  35523. 800f042: 3101 adds r1, #1
  35524. 800f044: 2900 cmp r1, #0
  35525. 800f046: dce9 bgt.n 800f01c <tcp_receive+0x778>
  35526. struct tcp_seg *cseg = tcp_seg_copy(&inseg);
  35527. 800f048: 480c ldr r0, [pc, #48] @ (800f07c <tcp_receive+0x7d8>)
  35528. 800f04a: f7fe f9c7 bl 800d3dc <tcp_seg_copy>
  35529. if (cseg != NULL) {
  35530. 800f04e: 4607 mov r7, r0
  35531. 800f050: 2800 cmp r0, #0
  35532. 800f052: d0cd beq.n 800eff0 <tcp_receive+0x74c>
  35533. if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) {
  35534. 800f054: 6933 ldr r3, [r6, #16]
  35535. 800f056: 6859 ldr r1, [r3, #4]
  35536. 800f058: 8933 ldrh r3, [r6, #8]
  35537. 800f05a: 440b add r3, r1
  35538. 800f05c: 4a06 ldr r2, [pc, #24] @ (800f078 <tcp_receive+0x7d4>)
  35539. 800f05e: 6812 ldr r2, [r2, #0]
  35540. 800f060: 1a9b subs r3, r3, r2
  35541. 800f062: 2b00 cmp r3, #0
  35542. 800f064: dc24 bgt.n 800f0b0 <tcp_receive+0x80c>
  35543. prev->next = cseg;
  35544. 800f066: 6037 str r7, [r6, #0]
  35545. tcp_oos_insert_segment(cseg, next);
  35546. 800f068: 4629 mov r1, r5
  35547. 800f06a: 4638 mov r0, r7
  35548. 800f06c: f7ff fbc6 bl 800e7fc <tcp_oos_insert_segment>
  35549. 800f070: e7be b.n 800eff0 <tcp_receive+0x74c>
  35550. 800f072: bf00 nop
  35551. 800f074: 24019bf2 .word 0x24019bf2
  35552. 800f078: 24019bfc .word 0x24019bfc
  35553. 800f07c: 24019c10 .word 0x24019c10
  35554. 800f080: 08016c64 .word 0x08016c64
  35555. 800f084: 08016e6c .word 0x08016e6c
  35556. 800f088: 080144e8 .word 0x080144e8
  35557. 800f08c: 08016ea8 .word 0x08016ea8
  35558. 800f090: 08016ec8 .word 0x08016ec8
  35559. 800f094: 24019bec .word 0x24019bec
  35560. 800f098: 24019bf0 .word 0x24019bf0
  35561. struct tcp_seg *cseg = tcp_seg_copy(&inseg);
  35562. 800f09c: 484b ldr r0, [pc, #300] @ (800f1cc <tcp_receive+0x928>)
  35563. 800f09e: f7fe f99d bl 800d3dc <tcp_seg_copy>
  35564. if (cseg != NULL) {
  35565. 800f0a2: 2800 cmp r0, #0
  35566. 800f0a4: d0a4 beq.n 800eff0 <tcp_receive+0x74c>
  35567. pcb->ooseq = cseg;
  35568. 800f0a6: 6760 str r0, [r4, #116] @ 0x74
  35569. tcp_oos_insert_segment(cseg, next);
  35570. 800f0a8: 4629 mov r1, r5
  35571. 800f0aa: f7ff fba7 bl 800e7fc <tcp_oos_insert_segment>
  35572. 800f0ae: e79f b.n 800eff0 <tcp_receive+0x74c>
  35573. prev->len = (u16_t)(seqno - prev->tcphdr->seqno);
  35574. 800f0b0: 1a52 subs r2, r2, r1
  35575. 800f0b2: b291 uxth r1, r2
  35576. 800f0b4: 8131 strh r1, [r6, #8]
  35577. pbuf_realloc(prev->p, prev->len);
  35578. 800f0b6: 6870 ldr r0, [r6, #4]
  35579. 800f0b8: f7fc ff88 bl 800bfcc <pbuf_realloc>
  35580. 800f0bc: e7d3 b.n 800f066 <tcp_receive+0x7c2>
  35581. TCP_SEQ_GT(seqno, next->tcphdr->seqno)) {
  35582. 800f0be: 1a9a subs r2, r3, r2
  35583. if (next->next == NULL &&
  35584. 800f0c0: 2a00 cmp r2, #0
  35585. 800f0c2: dc01 bgt.n 800f0c8 <tcp_receive+0x824>
  35586. 800f0c4: 460d mov r5, r1
  35587. 800f0c6: e7ae b.n 800f026 <tcp_receive+0x782>
  35588. if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) {
  35589. 800f0c8: 8980 ldrh r0, [r0, #12]
  35590. 800f0ca: f7f8 fed7 bl 8007e7c <lwip_htons>
  35591. 800f0ce: f010 0f01 tst.w r0, #1
  35592. 800f0d2: d18d bne.n 800eff0 <tcp_receive+0x74c>
  35593. next->next = tcp_seg_copy(&inseg);
  35594. 800f0d4: 483d ldr r0, [pc, #244] @ (800f1cc <tcp_receive+0x928>)
  35595. 800f0d6: f7fe f981 bl 800d3dc <tcp_seg_copy>
  35596. 800f0da: 6028 str r0, [r5, #0]
  35597. if (next->next != NULL) {
  35598. 800f0dc: 2800 cmp r0, #0
  35599. 800f0de: d087 beq.n 800eff0 <tcp_receive+0x74c>
  35600. if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) {
  35601. 800f0e0: 692b ldr r3, [r5, #16]
  35602. 800f0e2: 6859 ldr r1, [r3, #4]
  35603. 800f0e4: 892a ldrh r2, [r5, #8]
  35604. 800f0e6: 440a add r2, r1
  35605. 800f0e8: 4b39 ldr r3, [pc, #228] @ (800f1d0 <tcp_receive+0x92c>)
  35606. 800f0ea: 681b ldr r3, [r3, #0]
  35607. 800f0ec: 1ad2 subs r2, r2, r3
  35608. 800f0ee: 2a00 cmp r2, #0
  35609. 800f0f0: dc40 bgt.n 800f174 <tcp_receive+0x8d0>
  35610. if (TCP_SEQ_GT((u32_t)tcplen + seqno, pcb->rcv_nxt + (u32_t)pcb->rcv_wnd)) {
  35611. 800f0f2: 4b38 ldr r3, [pc, #224] @ (800f1d4 <tcp_receive+0x930>)
  35612. 800f0f4: 881b ldrh r3, [r3, #0]
  35613. 800f0f6: 4a36 ldr r2, [pc, #216] @ (800f1d0 <tcp_receive+0x92c>)
  35614. 800f0f8: 6812 ldr r2, [r2, #0]
  35615. 800f0fa: 4413 add r3, r2
  35616. 800f0fc: 6a62 ldr r2, [r4, #36] @ 0x24
  35617. 800f0fe: 8d21 ldrh r1, [r4, #40] @ 0x28
  35618. 800f100: 440a add r2, r1
  35619. 800f102: 1a9b subs r3, r3, r2
  35620. 800f104: 2b00 cmp r3, #0
  35621. 800f106: f77f af73 ble.w 800eff0 <tcp_receive+0x74c>
  35622. if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) {
  35623. 800f10a: 682b ldr r3, [r5, #0]
  35624. 800f10c: 691b ldr r3, [r3, #16]
  35625. 800f10e: 8998 ldrh r0, [r3, #12]
  35626. 800f110: f7f8 feb4 bl 8007e7c <lwip_htons>
  35627. 800f114: f010 0f01 tst.w r0, #1
  35628. 800f118: d133 bne.n 800f182 <tcp_receive+0x8de>
  35629. next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno);
  35630. 800f11a: 6a62 ldr r2, [r4, #36] @ 0x24
  35631. 800f11c: 8d23 ldrh r3, [r4, #40] @ 0x28
  35632. 800f11e: 4413 add r3, r2
  35633. 800f120: b29b uxth r3, r3
  35634. 800f122: 682a ldr r2, [r5, #0]
  35635. 800f124: 492a ldr r1, [pc, #168] @ (800f1d0 <tcp_receive+0x92c>)
  35636. 800f126: 6809 ldr r1, [r1, #0]
  35637. 800f128: 1a5b subs r3, r3, r1
  35638. 800f12a: 8113 strh r3, [r2, #8]
  35639. pbuf_realloc(next->next->p, next->next->len);
  35640. 800f12c: 682b ldr r3, [r5, #0]
  35641. 800f12e: 8919 ldrh r1, [r3, #8]
  35642. 800f130: 6858 ldr r0, [r3, #4]
  35643. 800f132: f7fc ff4b bl 800bfcc <pbuf_realloc>
  35644. tcplen = TCP_TCPLEN(next->next);
  35645. 800f136: 682b ldr r3, [r5, #0]
  35646. 800f138: 891d ldrh r5, [r3, #8]
  35647. 800f13a: 691b ldr r3, [r3, #16]
  35648. 800f13c: 8998 ldrh r0, [r3, #12]
  35649. 800f13e: f7f8 fe9d bl 8007e7c <lwip_htons>
  35650. 800f142: f010 0f03 tst.w r0, #3
  35651. 800f146: d02e beq.n 800f1a6 <tcp_receive+0x902>
  35652. 800f148: 2301 movs r3, #1
  35653. 800f14a: 442b add r3, r5
  35654. 800f14c: b29b uxth r3, r3
  35655. 800f14e: 4a21 ldr r2, [pc, #132] @ (800f1d4 <tcp_receive+0x930>)
  35656. 800f150: 8013 strh r3, [r2, #0]
  35657. LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n",
  35658. 800f152: 4a1f ldr r2, [pc, #124] @ (800f1d0 <tcp_receive+0x92c>)
  35659. 800f154: 6812 ldr r2, [r2, #0]
  35660. 800f156: 4413 add r3, r2
  35661. 800f158: 6a62 ldr r2, [r4, #36] @ 0x24
  35662. 800f15a: 8d21 ldrh r1, [r4, #40] @ 0x28
  35663. 800f15c: 440a add r2, r1
  35664. 800f15e: 4293 cmp r3, r2
  35665. 800f160: f43f af46 beq.w 800eff0 <tcp_receive+0x74c>
  35666. 800f164: 4b1c ldr r3, [pc, #112] @ (800f1d8 <tcp_receive+0x934>)
  35667. 800f166: f44f 62df mov.w r2, #1784 @ 0x6f8
  35668. 800f16a: 491c ldr r1, [pc, #112] @ (800f1dc <tcp_receive+0x938>)
  35669. 800f16c: 481c ldr r0, [pc, #112] @ (800f1e0 <tcp_receive+0x93c>)
  35670. 800f16e: f004 f94b bl 8013408 <iprintf>
  35671. 800f172: e73d b.n 800eff0 <tcp_receive+0x74c>
  35672. next->len = (u16_t)(seqno - next->tcphdr->seqno);
  35673. 800f174: 1a5b subs r3, r3, r1
  35674. 800f176: b299 uxth r1, r3
  35675. 800f178: 8129 strh r1, [r5, #8]
  35676. pbuf_realloc(next->p, next->len);
  35677. 800f17a: 6868 ldr r0, [r5, #4]
  35678. 800f17c: f7fc ff26 bl 800bfcc <pbuf_realloc>
  35679. 800f180: e7b7 b.n 800f0f2 <tcp_receive+0x84e>
  35680. TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) & ~TCP_FIN);
  35681. 800f182: 682b ldr r3, [r5, #0]
  35682. 800f184: 691b ldr r3, [r3, #16]
  35683. 800f186: 899e ldrh r6, [r3, #12]
  35684. 800f188: 4630 mov r0, r6
  35685. 800f18a: f7f8 fe77 bl 8007e7c <lwip_htons>
  35686. 800f18e: f000 003e and.w r0, r0, #62 @ 0x3e
  35687. 800f192: f7f8 fe73 bl 8007e7c <lwip_htons>
  35688. 800f196: 682b ldr r3, [r5, #0]
  35689. 800f198: 691a ldr r2, [r3, #16]
  35690. 800f19a: f426 567c bic.w r6, r6, #16128 @ 0x3f00
  35691. 800f19e: ea40 0306 orr.w r3, r0, r6
  35692. 800f1a2: 8193 strh r3, [r2, #12]
  35693. 800f1a4: e7b9 b.n 800f11a <tcp_receive+0x876>
  35694. tcplen = TCP_TCPLEN(next->next);
  35695. 800f1a6: 2300 movs r3, #0
  35696. 800f1a8: e7cf b.n 800f14a <tcp_receive+0x8a6>
  35697. if (!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd - 1)) {
  35698. 800f1aa: 4b09 ldr r3, [pc, #36] @ (800f1d0 <tcp_receive+0x92c>)
  35699. 800f1ac: 681b ldr r3, [r3, #0]
  35700. 800f1ae: 6a62 ldr r2, [r4, #36] @ 0x24
  35701. 800f1b0: 1a99 subs r1, r3, r2
  35702. 800f1b2: 2900 cmp r1, #0
  35703. 800f1b4: db05 blt.n 800f1c2 <tcp_receive+0x91e>
  35704. 800f1b6: 8d21 ldrh r1, [r4, #40] @ 0x28
  35705. 800f1b8: 440a add r2, r1
  35706. 800f1ba: 1a9b subs r3, r3, r2
  35707. 800f1bc: 3301 adds r3, #1
  35708. 800f1be: 2b00 cmp r3, #0
  35709. 800f1c0: dd03 ble.n 800f1ca <tcp_receive+0x926>
  35710. tcp_ack_now(pcb);
  35711. 800f1c2: 8b63 ldrh r3, [r4, #26]
  35712. 800f1c4: f043 0302 orr.w r3, r3, #2
  35713. 800f1c8: 8363 strh r3, [r4, #26]
  35714. }
  35715. 800f1ca: bdf8 pop {r3, r4, r5, r6, r7, pc}
  35716. 800f1cc: 24019c10 .word 0x24019c10
  35717. 800f1d0: 24019bfc .word 0x24019bfc
  35718. 800f1d4: 24019bf2 .word 0x24019bf2
  35719. 800f1d8: 08016c64 .word 0x08016c64
  35720. 800f1dc: 08016e34 .word 0x08016e34
  35721. 800f1e0: 080144e8 .word 0x080144e8
  35722. 0800f1e4 <tcp_process>:
  35723. {
  35724. 800f1e4: b570 push {r4, r5, r6, lr}
  35725. 800f1e6: b084 sub sp, #16
  35726. LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);
  35727. 800f1e8: 4604 mov r4, r0
  35728. 800f1ea: b1c8 cbz r0, 800f220 <tcp_process+0x3c>
  35729. if (flags & TCP_RST) {
  35730. 800f1ec: 4b99 ldr r3, [pc, #612] @ (800f454 <tcp_process+0x270>)
  35731. 800f1ee: 781b ldrb r3, [r3, #0]
  35732. 800f1f0: f013 0f04 tst.w r3, #4
  35733. 800f1f4: d03a beq.n 800f26c <tcp_process+0x88>
  35734. if (pcb->state == SYN_SENT) {
  35735. 800f1f6: 7d21 ldrb r1, [r4, #20]
  35736. 800f1f8: 2902 cmp r1, #2
  35737. 800f1fa: d019 beq.n 800f230 <tcp_process+0x4c>
  35738. if (seqno == pcb->rcv_nxt) {
  35739. 800f1fc: 6a62 ldr r2, [r4, #36] @ 0x24
  35740. 800f1fe: 4b96 ldr r3, [pc, #600] @ (800f458 <tcp_process+0x274>)
  35741. 800f200: 681b ldr r3, [r3, #0]
  35742. 800f202: 429a cmp r2, r3
  35743. 800f204: d01d beq.n 800f242 <tcp_process+0x5e>
  35744. } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
  35745. 800f206: 1a99 subs r1, r3, r2
  35746. 800f208: 2900 cmp r1, #0
  35747. 800f20a: db16 blt.n 800f23a <tcp_process+0x56>
  35748. 800f20c: 8d21 ldrh r1, [r4, #40] @ 0x28
  35749. 800f20e: 440a add r2, r1
  35750. 800f210: 1a9b subs r3, r3, r2
  35751. 800f212: 2b00 cmp r3, #0
  35752. 800f214: dc11 bgt.n 800f23a <tcp_process+0x56>
  35753. tcp_ack_now(pcb);
  35754. 800f216: 8b63 ldrh r3, [r4, #26]
  35755. 800f218: f043 0302 orr.w r3, r3, #2
  35756. 800f21c: 8363 strh r3, [r4, #26]
  35757. if (acceptable) {
  35758. 800f21e: e00c b.n 800f23a <tcp_process+0x56>
  35759. LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL);
  35760. 800f220: 4b8e ldr r3, [pc, #568] @ (800f45c <tcp_process+0x278>)
  35761. 800f222: f44f 7247 mov.w r2, #796 @ 0x31c
  35762. 800f226: 498e ldr r1, [pc, #568] @ (800f460 <tcp_process+0x27c>)
  35763. 800f228: 488e ldr r0, [pc, #568] @ (800f464 <tcp_process+0x280>)
  35764. 800f22a: f004 f8ed bl 8013408 <iprintf>
  35765. 800f22e: e7dd b.n 800f1ec <tcp_process+0x8>
  35766. if (ackno == pcb->snd_nxt) {
  35767. 800f230: 6d22 ldr r2, [r4, #80] @ 0x50
  35768. 800f232: 4b8d ldr r3, [pc, #564] @ (800f468 <tcp_process+0x284>)
  35769. 800f234: 681b ldr r3, [r3, #0]
  35770. 800f236: 429a cmp r2, r3
  35771. 800f238: d003 beq.n 800f242 <tcp_process+0x5e>
  35772. return ERR_OK;
  35773. 800f23a: 2500 movs r5, #0
  35774. }
  35775. 800f23c: 4628 mov r0, r5
  35776. 800f23e: b004 add sp, #16
  35777. 800f240: bd70 pop {r4, r5, r6, pc}
  35778. LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
  35779. 800f242: b159 cbz r1, 800f25c <tcp_process+0x78>
  35780. recv_flags |= TF_RESET;
  35781. 800f244: 4a89 ldr r2, [pc, #548] @ (800f46c <tcp_process+0x288>)
  35782. 800f246: 7813 ldrb r3, [r2, #0]
  35783. 800f248: f043 0308 orr.w r3, r3, #8
  35784. 800f24c: 7013 strb r3, [r2, #0]
  35785. tcp_clear_flags(pcb, TF_ACK_DELAY);
  35786. 800f24e: 8b63 ldrh r3, [r4, #26]
  35787. 800f250: f023 0301 bic.w r3, r3, #1
  35788. 800f254: 8363 strh r3, [r4, #26]
  35789. return ERR_RST;
  35790. 800f256: f06f 050d mvn.w r5, #13
  35791. 800f25a: e7ef b.n 800f23c <tcp_process+0x58>
  35792. LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED);
  35793. 800f25c: 4b7f ldr r3, [pc, #508] @ (800f45c <tcp_process+0x278>)
  35794. 800f25e: f44f 724e mov.w r2, #824 @ 0x338
  35795. 800f262: 4983 ldr r1, [pc, #524] @ (800f470 <tcp_process+0x28c>)
  35796. 800f264: 487f ldr r0, [pc, #508] @ (800f464 <tcp_process+0x280>)
  35797. 800f266: f004 f8cf bl 8013408 <iprintf>
  35798. 800f26a: e7eb b.n 800f244 <tcp_process+0x60>
  35799. if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) {
  35800. 800f26c: f013 0f02 tst.w r3, #2
  35801. 800f270: d004 beq.n 800f27c <tcp_process+0x98>
  35802. 800f272: 7d23 ldrb r3, [r4, #20]
  35803. 800f274: 3b02 subs r3, #2
  35804. 800f276: b2db uxtb r3, r3
  35805. 800f278: 2b01 cmp r3, #1
  35806. 800f27a: d81d bhi.n 800f2b8 <tcp_process+0xd4>
  35807. if ((pcb->flags & TF_RXCLOSED) == 0) {
  35808. 800f27c: 8b63 ldrh r3, [r4, #26]
  35809. 800f27e: f013 0f10 tst.w r3, #16
  35810. 800f282: d102 bne.n 800f28a <tcp_process+0xa6>
  35811. pcb->tmr = tcp_ticks;
  35812. 800f284: 4b7b ldr r3, [pc, #492] @ (800f474 <tcp_process+0x290>)
  35813. 800f286: 681b ldr r3, [r3, #0]
  35814. 800f288: 6223 str r3, [r4, #32]
  35815. pcb->keep_cnt_sent = 0;
  35816. 800f28a: 2300 movs r3, #0
  35817. 800f28c: f884 309b strb.w r3, [r4, #155] @ 0x9b
  35818. pcb->persist_probe = 0;
  35819. 800f290: f884 309a strb.w r3, [r4, #154] @ 0x9a
  35820. tcp_parseopt(pcb);
  35821. 800f294: 4620 mov r0, r4
  35822. 800f296: f7ff f8cb bl 800e430 <tcp_parseopt>
  35823. switch (pcb->state) {
  35824. 800f29a: 7d23 ldrb r3, [r4, #20]
  35825. 800f29c: 3b02 subs r3, #2
  35826. 800f29e: 2b07 cmp r3, #7
  35827. 800f2a0: f200 8240 bhi.w 800f724 <tcp_process+0x540>
  35828. 800f2a4: e8df f013 tbh [pc, r3, lsl #1]
  35829. 800f2a8: 00b2000e .word 0x00b2000e
  35830. 800f2ac: 016a0159 .word 0x016a0159
  35831. 800f2b0: 015901c1 .word 0x015901c1
  35832. 800f2b4: 022401f0 .word 0x022401f0
  35833. tcp_ack_now(pcb);
  35834. 800f2b8: 8b63 ldrh r3, [r4, #26]
  35835. 800f2ba: f043 0302 orr.w r3, r3, #2
  35836. 800f2be: 8363 strh r3, [r4, #26]
  35837. return ERR_OK;
  35838. 800f2c0: 2500 movs r5, #0
  35839. 800f2c2: e7bb b.n 800f23c <tcp_process+0x58>
  35840. if ((flags & TCP_ACK) && (flags & TCP_SYN)
  35841. 800f2c4: 4b63 ldr r3, [pc, #396] @ (800f454 <tcp_process+0x270>)
  35842. 800f2c6: 781b ldrb r3, [r3, #0]
  35843. 800f2c8: f003 0212 and.w r2, r3, #18
  35844. 800f2cc: 2a12 cmp r2, #18
  35845. 800f2ce: d004 beq.n 800f2da <tcp_process+0xf6>
  35846. else if (flags & TCP_ACK) {
  35847. 800f2d0: f013 0f10 tst.w r3, #16
  35848. 800f2d4: d17b bne.n 800f3ce <tcp_process+0x1ea>
  35849. return ERR_OK;
  35850. 800f2d6: 2500 movs r5, #0
  35851. 800f2d8: e7b0 b.n 800f23c <tcp_process+0x58>
  35852. && (ackno == pcb->lastack + 1)) {
  35853. 800f2da: 6c62 ldr r2, [r4, #68] @ 0x44
  35854. 800f2dc: 3201 adds r2, #1
  35855. 800f2de: 4962 ldr r1, [pc, #392] @ (800f468 <tcp_process+0x284>)
  35856. 800f2e0: 6809 ldr r1, [r1, #0]
  35857. 800f2e2: 428a cmp r2, r1
  35858. 800f2e4: d1f4 bne.n 800f2d0 <tcp_process+0xec>
  35859. pcb->rcv_nxt = seqno + 1;
  35860. 800f2e6: 4b5c ldr r3, [pc, #368] @ (800f458 <tcp_process+0x274>)
  35861. 800f2e8: 681b ldr r3, [r3, #0]
  35862. 800f2ea: 1c5a adds r2, r3, #1
  35863. 800f2ec: 6262 str r2, [r4, #36] @ 0x24
  35864. pcb->rcv_ann_right_edge = pcb->rcv_nxt;
  35865. 800f2ee: 62e2 str r2, [r4, #44] @ 0x2c
  35866. pcb->lastack = ackno;
  35867. 800f2f0: 6461 str r1, [r4, #68] @ 0x44
  35868. pcb->snd_wnd = tcphdr->wnd;
  35869. 800f2f2: 4a61 ldr r2, [pc, #388] @ (800f478 <tcp_process+0x294>)
  35870. 800f2f4: 6812 ldr r2, [r2, #0]
  35871. 800f2f6: 89d2 ldrh r2, [r2, #14]
  35872. 800f2f8: f8a4 2060 strh.w r2, [r4, #96] @ 0x60
  35873. pcb->snd_wnd_max = pcb->snd_wnd;
  35874. 800f2fc: f8a4 2062 strh.w r2, [r4, #98] @ 0x62
  35875. pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
  35876. 800f300: 3b01 subs r3, #1
  35877. 800f302: 6563 str r3, [r4, #84] @ 0x54
  35878. pcb->state = ESTABLISHED;
  35879. 800f304: 2304 movs r3, #4
  35880. 800f306: 7523 strb r3, [r4, #20]
  35881. pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip);
  35882. 800f308: 8e66 ldrh r6, [r4, #50] @ 0x32
  35883. 800f30a: 18e5 adds r5, r4, r3
  35884. 800f30c: 4628 mov r0, r5
  35885. 800f30e: f7fa fef7 bl 800a100 <ip4_route>
  35886. 800f312: 4601 mov r1, r0
  35887. 800f314: 462a mov r2, r5
  35888. 800f316: 4630 mov r0, r6
  35889. 800f318: f7fe f92a bl 800d570 <tcp_eff_send_mss_netif>
  35890. 800f31c: 8660 strh r0, [r4, #50] @ 0x32
  35891. pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
  35892. 800f31e: 0042 lsls r2, r0, #1
  35893. 800f320: f241 131c movw r3, #4380 @ 0x111c
  35894. 800f324: 4293 cmp r3, r2
  35895. 800f326: bf38 it cc
  35896. 800f328: 4613 movcc r3, r2
  35897. 800f32a: ebb3 0f80 cmp.w r3, r0, lsl #2
  35898. 800f32e: d92b bls.n 800f388 <tcp_process+0x1a4>
  35899. 800f330: 0083 lsls r3, r0, #2
  35900. 800f332: b29b uxth r3, r3
  35901. 800f334: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
  35902. LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0));
  35903. 800f338: f8b4 3066 ldrh.w r3, [r4, #102] @ 0x66
  35904. 800f33c: b373 cbz r3, 800f39c <tcp_process+0x1b8>
  35905. --pcb->snd_queuelen;
  35906. 800f33e: f8b4 3066 ldrh.w r3, [r4, #102] @ 0x66
  35907. 800f342: 3b01 subs r3, #1
  35908. 800f344: f8a4 3066 strh.w r3, [r4, #102] @ 0x66
  35909. rseg = pcb->unacked;
  35910. 800f348: 6f25 ldr r5, [r4, #112] @ 0x70
  35911. if (rseg == NULL) {
  35912. 800f34a: b37d cbz r5, 800f3ac <tcp_process+0x1c8>
  35913. pcb->unacked = rseg->next;
  35914. 800f34c: 682b ldr r3, [r5, #0]
  35915. 800f34e: 6723 str r3, [r4, #112] @ 0x70
  35916. tcp_seg_free(rseg);
  35917. 800f350: 4628 mov r0, r5
  35918. 800f352: f7fe f82b bl 800d3ac <tcp_seg_free>
  35919. if (pcb->unacked == NULL) {
  35920. 800f356: 6f23 ldr r3, [r4, #112] @ 0x70
  35921. 800f358: 2b00 cmp r3, #0
  35922. 800f35a: d034 beq.n 800f3c6 <tcp_process+0x1e2>
  35923. pcb->rtime = 0;
  35924. 800f35c: 2300 movs r3, #0
  35925. 800f35e: 8623 strh r3, [r4, #48] @ 0x30
  35926. pcb->nrtx = 0;
  35927. 800f360: f884 3042 strb.w r3, [r4, #66] @ 0x42
  35928. TCP_EVENT_CONNECTED(pcb, ERR_OK, err);
  35929. 800f364: f8d4 3088 ldr.w r3, [r4, #136] @ 0x88
  35930. 800f368: b143 cbz r3, 800f37c <tcp_process+0x198>
  35931. 800f36a: 2200 movs r2, #0
  35932. 800f36c: 4621 mov r1, r4
  35933. 800f36e: 6920 ldr r0, [r4, #16]
  35934. 800f370: 4798 blx r3
  35935. 800f372: 4605 mov r5, r0
  35936. if (err == ERR_ABRT) {
  35937. 800f374: f110 0f0d cmn.w r0, #13
  35938. 800f378: f43f af60 beq.w 800f23c <tcp_process+0x58>
  35939. tcp_ack_now(pcb);
  35940. 800f37c: 8b63 ldrh r3, [r4, #26]
  35941. 800f37e: f043 0302 orr.w r3, r3, #2
  35942. 800f382: 8363 strh r3, [r4, #26]
  35943. return ERR_OK;
  35944. 800f384: 2500 movs r5, #0
  35945. tcp_ack_now(pcb);
  35946. 800f386: e759 b.n 800f23c <tcp_process+0x58>
  35947. pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
  35948. 800f388: f241 131c movw r3, #4380 @ 0x111c
  35949. 800f38c: 429a cmp r2, r3
  35950. 800f38e: d902 bls.n 800f396 <tcp_process+0x1b2>
  35951. 800f390: 0043 lsls r3, r0, #1
  35952. 800f392: b29b uxth r3, r3
  35953. 800f394: e7ce b.n 800f334 <tcp_process+0x150>
  35954. 800f396: f241 131c movw r3, #4380 @ 0x111c
  35955. 800f39a: e7cb b.n 800f334 <tcp_process+0x150>
  35956. LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0));
  35957. 800f39c: 4b2f ldr r3, [pc, #188] @ (800f45c <tcp_process+0x278>)
  35958. 800f39e: f44f 725b mov.w r2, #876 @ 0x36c
  35959. 800f3a2: 4936 ldr r1, [pc, #216] @ (800f47c <tcp_process+0x298>)
  35960. 800f3a4: 482f ldr r0, [pc, #188] @ (800f464 <tcp_process+0x280>)
  35961. 800f3a6: f004 f82f bl 8013408 <iprintf>
  35962. 800f3aa: e7c8 b.n 800f33e <tcp_process+0x15a>
  35963. rseg = pcb->unsent;
  35964. 800f3ac: 6ee5 ldr r5, [r4, #108] @ 0x6c
  35965. LWIP_ASSERT("no segment to free", rseg != NULL);
  35966. 800f3ae: b115 cbz r5, 800f3b6 <tcp_process+0x1d2>
  35967. pcb->unsent = rseg->next;
  35968. 800f3b0: 682b ldr r3, [r5, #0]
  35969. 800f3b2: 66e3 str r3, [r4, #108] @ 0x6c
  35970. 800f3b4: e7cc b.n 800f350 <tcp_process+0x16c>
  35971. LWIP_ASSERT("no segment to free", rseg != NULL);
  35972. 800f3b6: 4b29 ldr r3, [pc, #164] @ (800f45c <tcp_process+0x278>)
  35973. 800f3b8: f44f 725d mov.w r2, #884 @ 0x374
  35974. 800f3bc: 4930 ldr r1, [pc, #192] @ (800f480 <tcp_process+0x29c>)
  35975. 800f3be: 4829 ldr r0, [pc, #164] @ (800f464 <tcp_process+0x280>)
  35976. 800f3c0: f004 f822 bl 8013408 <iprintf>
  35977. 800f3c4: e7f4 b.n 800f3b0 <tcp_process+0x1cc>
  35978. pcb->rtime = -1;
  35979. 800f3c6: f64f 73ff movw r3, #65535 @ 0xffff
  35980. 800f3ca: 8623 strh r3, [r4, #48] @ 0x30
  35981. 800f3cc: e7ca b.n 800f364 <tcp_process+0x180>
  35982. ip_current_src_addr(), tcphdr->dest, tcphdr->src);
  35983. 800f3ce: 4b2a ldr r3, [pc, #168] @ (800f478 <tcp_process+0x294>)
  35984. 800f3d0: 6819 ldr r1, [r3, #0]
  35985. tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
  35986. 800f3d2: 4b2c ldr r3, [pc, #176] @ (800f484 <tcp_process+0x2a0>)
  35987. 800f3d4: 4a2c ldr r2, [pc, #176] @ (800f488 <tcp_process+0x2a4>)
  35988. 800f3d6: 8810 ldrh r0, [r2, #0]
  35989. 800f3d8: 4a1f ldr r2, [pc, #124] @ (800f458 <tcp_process+0x274>)
  35990. 800f3da: 6812 ldr r2, [r2, #0]
  35991. 800f3dc: 880d ldrh r5, [r1, #0]
  35992. 800f3de: 9502 str r5, [sp, #8]
  35993. 800f3e0: 8849 ldrh r1, [r1, #2]
  35994. 800f3e2: 9101 str r1, [sp, #4]
  35995. 800f3e4: 1f19 subs r1, r3, #4
  35996. 800f3e6: 9100 str r1, [sp, #0]
  35997. 800f3e8: 4402 add r2, r0
  35998. 800f3ea: 491f ldr r1, [pc, #124] @ (800f468 <tcp_process+0x284>)
  35999. 800f3ec: 6809 ldr r1, [r1, #0]
  36000. 800f3ee: 4620 mov r0, r4
  36001. 800f3f0: f001 fcb6 bl 8010d60 <tcp_rst>
  36002. if (pcb->nrtx < TCP_SYNMAXRTX) {
  36003. 800f3f4: f894 3042 ldrb.w r3, [r4, #66] @ 0x42
  36004. 800f3f8: 2b05 cmp r3, #5
  36005. 800f3fa: d901 bls.n 800f400 <tcp_process+0x21c>
  36006. return ERR_OK;
  36007. 800f3fc: 2500 movs r5, #0
  36008. 800f3fe: e71d b.n 800f23c <tcp_process+0x58>
  36009. pcb->rtime = 0;
  36010. 800f400: 2500 movs r5, #0
  36011. 800f402: 8625 strh r5, [r4, #48] @ 0x30
  36012. tcp_rexmit_rto(pcb);
  36013. 800f404: 4620 mov r0, r4
  36014. 800f406: f001 fe9f bl 8011148 <tcp_rexmit_rto>
  36015. 800f40a: e717 b.n 800f23c <tcp_process+0x58>
  36016. if (flags & TCP_ACK) {
  36017. 800f40c: 4b11 ldr r3, [pc, #68] @ (800f454 <tcp_process+0x270>)
  36018. 800f40e: 781b ldrb r3, [r3, #0]
  36019. 800f410: f013 0f10 tst.w r3, #16
  36020. 800f414: f000 8090 beq.w 800f538 <tcp_process+0x354>
  36021. if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) {
  36022. 800f418: 4b13 ldr r3, [pc, #76] @ (800f468 <tcp_process+0x284>)
  36023. 800f41a: 6819 ldr r1, [r3, #0]
  36024. 800f41c: 6c63 ldr r3, [r4, #68] @ 0x44
  36025. 800f41e: 1acb subs r3, r1, r3
  36026. 800f420: 2b01 cmp r3, #1
  36027. 800f422: d403 bmi.n 800f42c <tcp_process+0x248>
  36028. 800f424: 6d23 ldr r3, [r4, #80] @ 0x50
  36029. 800f426: 1acb subs r3, r1, r3
  36030. 800f428: 2b00 cmp r3, #0
  36031. 800f42a: dd2f ble.n 800f48c <tcp_process+0x2a8>
  36032. ip_current_src_addr(), tcphdr->dest, tcphdr->src);
  36033. 800f42c: 4b12 ldr r3, [pc, #72] @ (800f478 <tcp_process+0x294>)
  36034. 800f42e: 6818 ldr r0, [r3, #0]
  36035. tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(),
  36036. 800f430: 4b14 ldr r3, [pc, #80] @ (800f484 <tcp_process+0x2a0>)
  36037. 800f432: 4a15 ldr r2, [pc, #84] @ (800f488 <tcp_process+0x2a4>)
  36038. 800f434: 8815 ldrh r5, [r2, #0]
  36039. 800f436: 4a08 ldr r2, [pc, #32] @ (800f458 <tcp_process+0x274>)
  36040. 800f438: 6812 ldr r2, [r2, #0]
  36041. 800f43a: 8806 ldrh r6, [r0, #0]
  36042. 800f43c: 9602 str r6, [sp, #8]
  36043. 800f43e: 8840 ldrh r0, [r0, #2]
  36044. 800f440: 9001 str r0, [sp, #4]
  36045. 800f442: 1f18 subs r0, r3, #4
  36046. 800f444: 9000 str r0, [sp, #0]
  36047. 800f446: 442a add r2, r5
  36048. 800f448: 4620 mov r0, r4
  36049. 800f44a: f001 fc89 bl 8010d60 <tcp_rst>
  36050. return ERR_OK;
  36051. 800f44e: 2500 movs r5, #0
  36052. 800f450: e6f4 b.n 800f23c <tcp_process+0x58>
  36053. 800f452: bf00 nop
  36054. 800f454: 24019bf1 .word 0x24019bf1
  36055. 800f458: 24019bfc .word 0x24019bfc
  36056. 800f45c: 08016c64 .word 0x08016c64
  36057. 800f460: 08016ef0 .word 0x08016ef0
  36058. 800f464: 080144e8 .word 0x080144e8
  36059. 800f468: 24019bf8 .word 0x24019bf8
  36060. 800f46c: 24019bf0 .word 0x24019bf0
  36061. 800f470: 08016f0c .word 0x08016f0c
  36062. 800f474: 24019be4 .word 0x24019be4
  36063. 800f478: 24019c0c .word 0x24019c0c
  36064. 800f47c: 08016f2c .word 0x08016f2c
  36065. 800f480: 08016f44 .word 0x08016f44
  36066. 800f484: 24013030 .word 0x24013030
  36067. 800f488: 24019bf2 .word 0x24019bf2
  36068. pcb->state = ESTABLISHED;
  36069. 800f48c: 2304 movs r3, #4
  36070. 800f48e: 7523 strb r3, [r4, #20]
  36071. if (pcb->listener == NULL) {
  36072. 800f490: 6fe3 ldr r3, [r4, #124] @ 0x7c
  36073. 800f492: 2b00 cmp r3, #0
  36074. 800f494: d037 beq.n 800f506 <tcp_process+0x322>
  36075. LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL);
  36076. 800f496: 699b ldr r3, [r3, #24]
  36077. 800f498: b36b cbz r3, 800f4f6 <tcp_process+0x312>
  36078. TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
  36079. 800f49a: 6fe3 ldr r3, [r4, #124] @ 0x7c
  36080. 800f49c: 699b ldr r3, [r3, #24]
  36081. 800f49e: 2b00 cmp r3, #0
  36082. 800f4a0: d039 beq.n 800f516 <tcp_process+0x332>
  36083. 800f4a2: 2200 movs r2, #0
  36084. 800f4a4: 4621 mov r1, r4
  36085. 800f4a6: 6920 ldr r0, [r4, #16]
  36086. 800f4a8: 4798 blx r3
  36087. if (err != ERR_OK) {
  36088. 800f4aa: 4605 mov r5, r0
  36089. 800f4ac: bb68 cbnz r0, 800f50a <tcp_process+0x326>
  36090. tcp_receive(pcb);
  36091. 800f4ae: 4620 mov r0, r4
  36092. 800f4b0: f7ff f9f8 bl 800e8a4 <tcp_receive>
  36093. if (recv_acked != 0) {
  36094. 800f4b4: 4b9c ldr r3, [pc, #624] @ (800f728 <tcp_process+0x544>)
  36095. 800f4b6: 881b ldrh r3, [r3, #0]
  36096. 800f4b8: b113 cbz r3, 800f4c0 <tcp_process+0x2dc>
  36097. recv_acked--;
  36098. 800f4ba: 3b01 subs r3, #1
  36099. 800f4bc: 4a9a ldr r2, [pc, #616] @ (800f728 <tcp_process+0x544>)
  36100. 800f4be: 8013 strh r3, [r2, #0]
  36101. pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
  36102. 800f4c0: 8e63 ldrh r3, [r4, #50] @ 0x32
  36103. 800f4c2: 0059 lsls r1, r3, #1
  36104. 800f4c4: f241 121c movw r2, #4380 @ 0x111c
  36105. 800f4c8: 428a cmp r2, r1
  36106. 800f4ca: bf38 it cc
  36107. 800f4cc: 460a movcc r2, r1
  36108. 800f4ce: ebb2 0f83 cmp.w r2, r3, lsl #2
  36109. 800f4d2: d927 bls.n 800f524 <tcp_process+0x340>
  36110. 800f4d4: 009b lsls r3, r3, #2
  36111. 800f4d6: b29b uxth r3, r3
  36112. 800f4d8: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
  36113. if (recv_flags & TF_GOT_FIN) {
  36114. 800f4dc: 4b93 ldr r3, [pc, #588] @ (800f72c <tcp_process+0x548>)
  36115. 800f4de: 781b ldrb r3, [r3, #0]
  36116. 800f4e0: f013 0f20 tst.w r3, #32
  36117. 800f4e4: f43f aeaa beq.w 800f23c <tcp_process+0x58>
  36118. tcp_ack_now(pcb);
  36119. 800f4e8: 8b63 ldrh r3, [r4, #26]
  36120. 800f4ea: f043 0302 orr.w r3, r3, #2
  36121. 800f4ee: 8363 strh r3, [r4, #26]
  36122. pcb->state = CLOSE_WAIT;
  36123. 800f4f0: 2307 movs r3, #7
  36124. 800f4f2: 7523 strb r3, [r4, #20]
  36125. 800f4f4: e6a2 b.n 800f23c <tcp_process+0x58>
  36126. LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL);
  36127. 800f4f6: 4b8e ldr r3, [pc, #568] @ (800f730 <tcp_process+0x54c>)
  36128. 800f4f8: f44f 726a mov.w r2, #936 @ 0x3a8
  36129. 800f4fc: 498d ldr r1, [pc, #564] @ (800f734 <tcp_process+0x550>)
  36130. 800f4fe: 488e ldr r0, [pc, #568] @ (800f738 <tcp_process+0x554>)
  36131. 800f500: f003 ff82 bl 8013408 <iprintf>
  36132. 800f504: e7c9 b.n 800f49a <tcp_process+0x2b6>
  36133. err = ERR_VAL;
  36134. 800f506: f06f 0505 mvn.w r5, #5
  36135. if (err != ERR_ABRT) {
  36136. 800f50a: f115 0f0d cmn.w r5, #13
  36137. 800f50e: d105 bne.n 800f51c <tcp_process+0x338>
  36138. return ERR_ABRT;
  36139. 800f510: f06f 050c mvn.w r5, #12
  36140. 800f514: e692 b.n 800f23c <tcp_process+0x58>
  36141. TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err);
  36142. 800f516: f06f 050f mvn.w r5, #15
  36143. 800f51a: e7f6 b.n 800f50a <tcp_process+0x326>
  36144. tcp_abort(pcb);
  36145. 800f51c: 4620 mov r0, r4
  36146. 800f51e: f7fe fa1b bl 800d958 <tcp_abort>
  36147. 800f522: e7f5 b.n 800f510 <tcp_process+0x32c>
  36148. pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss);
  36149. 800f524: f241 121c movw r2, #4380 @ 0x111c
  36150. 800f528: 4291 cmp r1, r2
  36151. 800f52a: d902 bls.n 800f532 <tcp_process+0x34e>
  36152. 800f52c: 005b lsls r3, r3, #1
  36153. 800f52e: b29b uxth r3, r3
  36154. 800f530: e7d2 b.n 800f4d8 <tcp_process+0x2f4>
  36155. 800f532: f241 131c movw r3, #4380 @ 0x111c
  36156. 800f536: e7cf b.n 800f4d8 <tcp_process+0x2f4>
  36157. } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) {
  36158. 800f538: f013 0f02 tst.w r3, #2
  36159. 800f53c: f000 810a beq.w 800f754 <tcp_process+0x570>
  36160. 800f540: 6a63 ldr r3, [r4, #36] @ 0x24
  36161. 800f542: 3b01 subs r3, #1
  36162. 800f544: 4a7d ldr r2, [pc, #500] @ (800f73c <tcp_process+0x558>)
  36163. 800f546: 6812 ldr r2, [r2, #0]
  36164. 800f548: 4293 cmp r3, r2
  36165. 800f54a: d001 beq.n 800f550 <tcp_process+0x36c>
  36166. return ERR_OK;
  36167. 800f54c: 2500 movs r5, #0
  36168. 800f54e: e675 b.n 800f23c <tcp_process+0x58>
  36169. tcp_rexmit(pcb);
  36170. 800f550: 4620 mov r0, r4
  36171. 800f552: f001 fb83 bl 8010c5c <tcp_rexmit>
  36172. return ERR_OK;
  36173. 800f556: 2500 movs r5, #0
  36174. 800f558: e670 b.n 800f23c <tcp_process+0x58>
  36175. tcp_receive(pcb);
  36176. 800f55a: 4620 mov r0, r4
  36177. 800f55c: f7ff f9a2 bl 800e8a4 <tcp_receive>
  36178. if (recv_flags & TF_GOT_FIN) { /* passive close */
  36179. 800f560: 4b72 ldr r3, [pc, #456] @ (800f72c <tcp_process+0x548>)
  36180. 800f562: 781b ldrb r3, [r3, #0]
  36181. 800f564: f013 0f20 tst.w r3, #32
  36182. 800f568: f000 80f6 beq.w 800f758 <tcp_process+0x574>
  36183. tcp_ack_now(pcb);
  36184. 800f56c: 8b63 ldrh r3, [r4, #26]
  36185. 800f56e: f043 0302 orr.w r3, r3, #2
  36186. 800f572: 8363 strh r3, [r4, #26]
  36187. pcb->state = CLOSE_WAIT;
  36188. 800f574: 2307 movs r3, #7
  36189. 800f576: 7523 strb r3, [r4, #20]
  36190. return ERR_OK;
  36191. 800f578: 2500 movs r5, #0
  36192. 800f57a: e65f b.n 800f23c <tcp_process+0x58>
  36193. tcp_receive(pcb);
  36194. 800f57c: 4620 mov r0, r4
  36195. 800f57e: f7ff f991 bl 800e8a4 <tcp_receive>
  36196. if (recv_flags & TF_GOT_FIN) {
  36197. 800f582: 4b6a ldr r3, [pc, #424] @ (800f72c <tcp_process+0x548>)
  36198. 800f584: 781b ldrb r3, [r3, #0]
  36199. 800f586: f013 0f20 tst.w r3, #32
  36200. 800f58a: d039 beq.n 800f600 <tcp_process+0x41c>
  36201. if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
  36202. 800f58c: 4b6c ldr r3, [pc, #432] @ (800f740 <tcp_process+0x55c>)
  36203. 800f58e: 781b ldrb r3, [r3, #0]
  36204. 800f590: f013 0f10 tst.w r3, #16
  36205. 800f594: d004 beq.n 800f5a0 <tcp_process+0x3bc>
  36206. 800f596: 6d22 ldr r2, [r4, #80] @ 0x50
  36207. 800f598: 4b6a ldr r3, [pc, #424] @ (800f744 <tcp_process+0x560>)
  36208. 800f59a: 681b ldr r3, [r3, #0]
  36209. 800f59c: 429a cmp r2, r3
  36210. 800f59e: d007 beq.n 800f5b0 <tcp_process+0x3cc>
  36211. tcp_ack_now(pcb);
  36212. 800f5a0: 8b63 ldrh r3, [r4, #26]
  36213. 800f5a2: f043 0302 orr.w r3, r3, #2
  36214. 800f5a6: 8363 strh r3, [r4, #26]
  36215. pcb->state = CLOSING;
  36216. 800f5a8: 2308 movs r3, #8
  36217. 800f5aa: 7523 strb r3, [r4, #20]
  36218. return ERR_OK;
  36219. 800f5ac: 2500 movs r5, #0
  36220. 800f5ae: e645 b.n 800f23c <tcp_process+0x58>
  36221. pcb->unsent == NULL) {
  36222. 800f5b0: 6ee3 ldr r3, [r4, #108] @ 0x6c
  36223. if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
  36224. 800f5b2: 2b00 cmp r3, #0
  36225. 800f5b4: d1f4 bne.n 800f5a0 <tcp_process+0x3bc>
  36226. tcp_ack_now(pcb);
  36227. 800f5b6: 8b63 ldrh r3, [r4, #26]
  36228. 800f5b8: f043 0302 orr.w r3, r3, #2
  36229. 800f5bc: 8363 strh r3, [r4, #26]
  36230. tcp_pcb_purge(pcb);
  36231. 800f5be: 4620 mov r0, r4
  36232. 800f5c0: f7fe f8a8 bl 800d714 <tcp_pcb_purge>
  36233. TCP_RMV_ACTIVE(pcb);
  36234. 800f5c4: 4b60 ldr r3, [pc, #384] @ (800f748 <tcp_process+0x564>)
  36235. 800f5c6: 681b ldr r3, [r3, #0]
  36236. 800f5c8: 429c cmp r4, r3
  36237. 800f5ca: d005 beq.n 800f5d8 <tcp_process+0x3f4>
  36238. 800f5cc: b153 cbz r3, 800f5e4 <tcp_process+0x400>
  36239. 800f5ce: 68da ldr r2, [r3, #12]
  36240. 800f5d0: 4294 cmp r4, r2
  36241. 800f5d2: d005 beq.n 800f5e0 <tcp_process+0x3fc>
  36242. 800f5d4: 4613 mov r3, r2
  36243. 800f5d6: e7f9 b.n 800f5cc <tcp_process+0x3e8>
  36244. 800f5d8: 68da ldr r2, [r3, #12]
  36245. 800f5da: 4b5b ldr r3, [pc, #364] @ (800f748 <tcp_process+0x564>)
  36246. 800f5dc: 601a str r2, [r3, #0]
  36247. 800f5de: e001 b.n 800f5e4 <tcp_process+0x400>
  36248. 800f5e0: 68e2 ldr r2, [r4, #12]
  36249. 800f5e2: 60da str r2, [r3, #12]
  36250. 800f5e4: 2500 movs r5, #0
  36251. 800f5e6: 60e5 str r5, [r4, #12]
  36252. 800f5e8: 4b58 ldr r3, [pc, #352] @ (800f74c <tcp_process+0x568>)
  36253. 800f5ea: 2201 movs r2, #1
  36254. 800f5ec: 701a strb r2, [r3, #0]
  36255. pcb->state = TIME_WAIT;
  36256. 800f5ee: 230a movs r3, #10
  36257. 800f5f0: 7523 strb r3, [r4, #20]
  36258. TCP_REG(&tcp_tw_pcbs, pcb);
  36259. 800f5f2: 4b57 ldr r3, [pc, #348] @ (800f750 <tcp_process+0x56c>)
  36260. 800f5f4: 681a ldr r2, [r3, #0]
  36261. 800f5f6: 60e2 str r2, [r4, #12]
  36262. 800f5f8: 601c str r4, [r3, #0]
  36263. 800f5fa: f002 f819 bl 8011630 <tcp_timer_needed>
  36264. 800f5fe: e61d b.n 800f23c <tcp_process+0x58>
  36265. } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
  36266. 800f600: 4b4f ldr r3, [pc, #316] @ (800f740 <tcp_process+0x55c>)
  36267. 800f602: 781b ldrb r3, [r3, #0]
  36268. 800f604: f013 0f10 tst.w r3, #16
  36269. 800f608: f000 80a8 beq.w 800f75c <tcp_process+0x578>
  36270. 800f60c: 6d22 ldr r2, [r4, #80] @ 0x50
  36271. 800f60e: 4b4d ldr r3, [pc, #308] @ (800f744 <tcp_process+0x560>)
  36272. 800f610: 681b ldr r3, [r3, #0]
  36273. 800f612: 429a cmp r2, r3
  36274. 800f614: d001 beq.n 800f61a <tcp_process+0x436>
  36275. return ERR_OK;
  36276. 800f616: 2500 movs r5, #0
  36277. 800f618: e610 b.n 800f23c <tcp_process+0x58>
  36278. pcb->unsent == NULL) {
  36279. 800f61a: 6ee3 ldr r3, [r4, #108] @ 0x6c
  36280. } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
  36281. 800f61c: b10b cbz r3, 800f622 <tcp_process+0x43e>
  36282. return ERR_OK;
  36283. 800f61e: 2500 movs r5, #0
  36284. 800f620: e60c b.n 800f23c <tcp_process+0x58>
  36285. pcb->state = FIN_WAIT_2;
  36286. 800f622: 2306 movs r3, #6
  36287. 800f624: 7523 strb r3, [r4, #20]
  36288. return ERR_OK;
  36289. 800f626: 2500 movs r5, #0
  36290. 800f628: e608 b.n 800f23c <tcp_process+0x58>
  36291. tcp_receive(pcb);
  36292. 800f62a: 4620 mov r0, r4
  36293. 800f62c: f7ff f93a bl 800e8a4 <tcp_receive>
  36294. if (recv_flags & TF_GOT_FIN) {
  36295. 800f630: 4b3e ldr r3, [pc, #248] @ (800f72c <tcp_process+0x548>)
  36296. 800f632: 781b ldrb r3, [r3, #0]
  36297. 800f634: f013 0f20 tst.w r3, #32
  36298. 800f638: d101 bne.n 800f63e <tcp_process+0x45a>
  36299. return ERR_OK;
  36300. 800f63a: 2500 movs r5, #0
  36301. 800f63c: e5fe b.n 800f23c <tcp_process+0x58>
  36302. tcp_ack_now(pcb);
  36303. 800f63e: 8b63 ldrh r3, [r4, #26]
  36304. 800f640: f043 0302 orr.w r3, r3, #2
  36305. 800f644: 8363 strh r3, [r4, #26]
  36306. tcp_pcb_purge(pcb);
  36307. 800f646: 4620 mov r0, r4
  36308. 800f648: f7fe f864 bl 800d714 <tcp_pcb_purge>
  36309. TCP_RMV_ACTIVE(pcb);
  36310. 800f64c: 4b3e ldr r3, [pc, #248] @ (800f748 <tcp_process+0x564>)
  36311. 800f64e: 681b ldr r3, [r3, #0]
  36312. 800f650: 429c cmp r4, r3
  36313. 800f652: d005 beq.n 800f660 <tcp_process+0x47c>
  36314. 800f654: b153 cbz r3, 800f66c <tcp_process+0x488>
  36315. 800f656: 68da ldr r2, [r3, #12]
  36316. 800f658: 4294 cmp r4, r2
  36317. 800f65a: d005 beq.n 800f668 <tcp_process+0x484>
  36318. 800f65c: 4613 mov r3, r2
  36319. 800f65e: e7f9 b.n 800f654 <tcp_process+0x470>
  36320. 800f660: 68da ldr r2, [r3, #12]
  36321. 800f662: 4b39 ldr r3, [pc, #228] @ (800f748 <tcp_process+0x564>)
  36322. 800f664: 601a str r2, [r3, #0]
  36323. 800f666: e001 b.n 800f66c <tcp_process+0x488>
  36324. 800f668: 68e2 ldr r2, [r4, #12]
  36325. 800f66a: 60da str r2, [r3, #12]
  36326. 800f66c: 2500 movs r5, #0
  36327. 800f66e: 60e5 str r5, [r4, #12]
  36328. 800f670: 4b36 ldr r3, [pc, #216] @ (800f74c <tcp_process+0x568>)
  36329. 800f672: 2201 movs r2, #1
  36330. 800f674: 701a strb r2, [r3, #0]
  36331. pcb->state = TIME_WAIT;
  36332. 800f676: 230a movs r3, #10
  36333. 800f678: 7523 strb r3, [r4, #20]
  36334. TCP_REG(&tcp_tw_pcbs, pcb);
  36335. 800f67a: 4b35 ldr r3, [pc, #212] @ (800f750 <tcp_process+0x56c>)
  36336. 800f67c: 681a ldr r2, [r3, #0]
  36337. 800f67e: 60e2 str r2, [r4, #12]
  36338. 800f680: 601c str r4, [r3, #0]
  36339. 800f682: f001 ffd5 bl 8011630 <tcp_timer_needed>
  36340. 800f686: e5d9 b.n 800f23c <tcp_process+0x58>
  36341. tcp_receive(pcb);
  36342. 800f688: 4620 mov r0, r4
  36343. 800f68a: f7ff f90b bl 800e8a4 <tcp_receive>
  36344. if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
  36345. 800f68e: 4b2c ldr r3, [pc, #176] @ (800f740 <tcp_process+0x55c>)
  36346. 800f690: 781b ldrb r3, [r3, #0]
  36347. 800f692: f013 0f10 tst.w r3, #16
  36348. 800f696: d063 beq.n 800f760 <tcp_process+0x57c>
  36349. 800f698: 6d22 ldr r2, [r4, #80] @ 0x50
  36350. 800f69a: 4b2a ldr r3, [pc, #168] @ (800f744 <tcp_process+0x560>)
  36351. 800f69c: 681b ldr r3, [r3, #0]
  36352. 800f69e: 429a cmp r2, r3
  36353. 800f6a0: d001 beq.n 800f6a6 <tcp_process+0x4c2>
  36354. return ERR_OK;
  36355. 800f6a2: 2500 movs r5, #0
  36356. 800f6a4: e5ca b.n 800f23c <tcp_process+0x58>
  36357. if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
  36358. 800f6a6: 6ee3 ldr r3, [r4, #108] @ 0x6c
  36359. 800f6a8: b10b cbz r3, 800f6ae <tcp_process+0x4ca>
  36360. return ERR_OK;
  36361. 800f6aa: 2500 movs r5, #0
  36362. 800f6ac: e5c6 b.n 800f23c <tcp_process+0x58>
  36363. tcp_pcb_purge(pcb);
  36364. 800f6ae: 4620 mov r0, r4
  36365. 800f6b0: f7fe f830 bl 800d714 <tcp_pcb_purge>
  36366. TCP_RMV_ACTIVE(pcb);
  36367. 800f6b4: 4b24 ldr r3, [pc, #144] @ (800f748 <tcp_process+0x564>)
  36368. 800f6b6: 681b ldr r3, [r3, #0]
  36369. 800f6b8: 429c cmp r4, r3
  36370. 800f6ba: d005 beq.n 800f6c8 <tcp_process+0x4e4>
  36371. 800f6bc: b153 cbz r3, 800f6d4 <tcp_process+0x4f0>
  36372. 800f6be: 68da ldr r2, [r3, #12]
  36373. 800f6c0: 4294 cmp r4, r2
  36374. 800f6c2: d005 beq.n 800f6d0 <tcp_process+0x4ec>
  36375. 800f6c4: 4613 mov r3, r2
  36376. 800f6c6: e7f9 b.n 800f6bc <tcp_process+0x4d8>
  36377. 800f6c8: 68da ldr r2, [r3, #12]
  36378. 800f6ca: 4b1f ldr r3, [pc, #124] @ (800f748 <tcp_process+0x564>)
  36379. 800f6cc: 601a str r2, [r3, #0]
  36380. 800f6ce: e001 b.n 800f6d4 <tcp_process+0x4f0>
  36381. 800f6d0: 68e2 ldr r2, [r4, #12]
  36382. 800f6d2: 60da str r2, [r3, #12]
  36383. 800f6d4: 2500 movs r5, #0
  36384. 800f6d6: 60e5 str r5, [r4, #12]
  36385. 800f6d8: 4b1c ldr r3, [pc, #112] @ (800f74c <tcp_process+0x568>)
  36386. 800f6da: 2201 movs r2, #1
  36387. 800f6dc: 701a strb r2, [r3, #0]
  36388. pcb->state = TIME_WAIT;
  36389. 800f6de: 230a movs r3, #10
  36390. 800f6e0: 7523 strb r3, [r4, #20]
  36391. TCP_REG(&tcp_tw_pcbs, pcb);
  36392. 800f6e2: 4b1b ldr r3, [pc, #108] @ (800f750 <tcp_process+0x56c>)
  36393. 800f6e4: 681a ldr r2, [r3, #0]
  36394. 800f6e6: 60e2 str r2, [r4, #12]
  36395. 800f6e8: 601c str r4, [r3, #0]
  36396. 800f6ea: f001 ffa1 bl 8011630 <tcp_timer_needed>
  36397. 800f6ee: e5a5 b.n 800f23c <tcp_process+0x58>
  36398. tcp_receive(pcb);
  36399. 800f6f0: 4620 mov r0, r4
  36400. 800f6f2: f7ff f8d7 bl 800e8a4 <tcp_receive>
  36401. if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
  36402. 800f6f6: 4b12 ldr r3, [pc, #72] @ (800f740 <tcp_process+0x55c>)
  36403. 800f6f8: 781b ldrb r3, [r3, #0]
  36404. 800f6fa: f013 0f10 tst.w r3, #16
  36405. 800f6fe: d031 beq.n 800f764 <tcp_process+0x580>
  36406. 800f700: 6d22 ldr r2, [r4, #80] @ 0x50
  36407. 800f702: 4b10 ldr r3, [pc, #64] @ (800f744 <tcp_process+0x560>)
  36408. 800f704: 681b ldr r3, [r3, #0]
  36409. 800f706: 429a cmp r2, r3
  36410. 800f708: d001 beq.n 800f70e <tcp_process+0x52a>
  36411. return ERR_OK;
  36412. 800f70a: 2500 movs r5, #0
  36413. 800f70c: e596 b.n 800f23c <tcp_process+0x58>
  36414. if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
  36415. 800f70e: 6ee3 ldr r3, [r4, #108] @ 0x6c
  36416. 800f710: b10b cbz r3, 800f716 <tcp_process+0x532>
  36417. return ERR_OK;
  36418. 800f712: 2500 movs r5, #0
  36419. 800f714: e592 b.n 800f23c <tcp_process+0x58>
  36420. recv_flags |= TF_CLOSED;
  36421. 800f716: 4a05 ldr r2, [pc, #20] @ (800f72c <tcp_process+0x548>)
  36422. 800f718: 7813 ldrb r3, [r2, #0]
  36423. 800f71a: f043 0310 orr.w r3, r3, #16
  36424. 800f71e: 7013 strb r3, [r2, #0]
  36425. return ERR_OK;
  36426. 800f720: 2500 movs r5, #0
  36427. 800f722: e58b b.n 800f23c <tcp_process+0x58>
  36428. switch (pcb->state) {
  36429. 800f724: 2500 movs r5, #0
  36430. 800f726: e589 b.n 800f23c <tcp_process+0x58>
  36431. 800f728: 24019bf4 .word 0x24019bf4
  36432. 800f72c: 24019bf0 .word 0x24019bf0
  36433. 800f730: 08016c64 .word 0x08016c64
  36434. 800f734: 08016f58 .word 0x08016f58
  36435. 800f738: 080144e8 .word 0x080144e8
  36436. 800f73c: 24019bfc .word 0x24019bfc
  36437. 800f740: 24019bf1 .word 0x24019bf1
  36438. 800f744: 24019bf8 .word 0x24019bf8
  36439. 800f748: 24019bd8 .word 0x24019bd8
  36440. 800f74c: 24019bd2 .word 0x24019bd2
  36441. 800f750: 24019bd4 .word 0x24019bd4
  36442. return ERR_OK;
  36443. 800f754: 2500 movs r5, #0
  36444. 800f756: e571 b.n 800f23c <tcp_process+0x58>
  36445. 800f758: 2500 movs r5, #0
  36446. 800f75a: e56f b.n 800f23c <tcp_process+0x58>
  36447. 800f75c: 2500 movs r5, #0
  36448. 800f75e: e56d b.n 800f23c <tcp_process+0x58>
  36449. 800f760: 2500 movs r5, #0
  36450. 800f762: e56b b.n 800f23c <tcp_process+0x58>
  36451. 800f764: 2500 movs r5, #0
  36452. 800f766: e569 b.n 800f23c <tcp_process+0x58>
  36453. 0800f768 <tcp_input>:
  36454. {
  36455. 800f768: b5f0 push {r4, r5, r6, r7, lr}
  36456. 800f76a: b085 sub sp, #20
  36457. 800f76c: 4605 mov r5, r0
  36458. LWIP_ASSERT_CORE_LOCKED();
  36459. 800f76e: f7f4 f9cd bl 8003b0c <sys_check_core_locking>
  36460. LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL);
  36461. 800f772: b155 cbz r5, 800f78a <tcp_input+0x22>
  36462. tcphdr = (struct tcp_hdr *)p->payload;
  36463. 800f774: 686a ldr r2, [r5, #4]
  36464. 800f776: 4b8b ldr r3, [pc, #556] @ (800f9a4 <tcp_input+0x23c>)
  36465. 800f778: 601a str r2, [r3, #0]
  36466. if (p->len < TCP_HLEN) {
  36467. 800f77a: 896b ldrh r3, [r5, #10]
  36468. 800f77c: 2b13 cmp r3, #19
  36469. 800f77e: d80b bhi.n 800f798 <tcp_input+0x30>
  36470. pbuf_free(p);
  36471. 800f780: 4628 mov r0, r5
  36472. 800f782: f7fc fb0d bl 800bda0 <pbuf_free>
  36473. }
  36474. 800f786: b005 add sp, #20
  36475. 800f788: bdf0 pop {r4, r5, r6, r7, pc}
  36476. LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL);
  36477. 800f78a: 4b87 ldr r3, [pc, #540] @ (800f9a8 <tcp_input+0x240>)
  36478. 800f78c: 2283 movs r2, #131 @ 0x83
  36479. 800f78e: 4987 ldr r1, [pc, #540] @ (800f9ac <tcp_input+0x244>)
  36480. 800f790: 4887 ldr r0, [pc, #540] @ (800f9b0 <tcp_input+0x248>)
  36481. 800f792: f003 fe39 bl 8013408 <iprintf>
  36482. 800f796: e7ed b.n 800f774 <tcp_input+0xc>
  36483. if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
  36484. 800f798: 4b86 ldr r3, [pc, #536] @ (800f9b4 <tcp_input+0x24c>)
  36485. 800f79a: 6819 ldr r1, [r3, #0]
  36486. 800f79c: 6958 ldr r0, [r3, #20]
  36487. 800f79e: f7fa fe58 bl 800a452 <ip4_addr_isbroadcast_u32>
  36488. 800f7a2: 2800 cmp r0, #0
  36489. 800f7a4: d1ec bne.n 800f780 <tcp_input+0x18>
  36490. ip_addr_ismulticast(ip_current_dest_addr())) {
  36491. 800f7a6: 4b83 ldr r3, [pc, #524] @ (800f9b4 <tcp_input+0x24c>)
  36492. 800f7a8: 695b ldr r3, [r3, #20]
  36493. 800f7aa: f003 03f0 and.w r3, r3, #240 @ 0xf0
  36494. if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) ||
  36495. 800f7ae: 2be0 cmp r3, #224 @ 0xe0
  36496. 800f7b0: d0e6 beq.n 800f780 <tcp_input+0x18>
  36497. hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr);
  36498. 800f7b2: 4b7c ldr r3, [pc, #496] @ (800f9a4 <tcp_input+0x23c>)
  36499. 800f7b4: 681b ldr r3, [r3, #0]
  36500. 800f7b6: 8998 ldrh r0, [r3, #12]
  36501. 800f7b8: f7f8 fb60 bl 8007e7c <lwip_htons>
  36502. 800f7bc: f3c0 3107 ubfx r1, r0, #12, #8
  36503. 800f7c0: 0089 lsls r1, r1, #2
  36504. 800f7c2: b2c9 uxtb r1, r1
  36505. if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) {
  36506. 800f7c4: 2913 cmp r1, #19
  36507. 800f7c6: d9db bls.n 800f780 <tcp_input+0x18>
  36508. 800f7c8: 892b ldrh r3, [r5, #8]
  36509. 800f7ca: 4299 cmp r1, r3
  36510. 800f7cc: d8d8 bhi.n 800f780 <tcp_input+0x18>
  36511. tcphdr_optlen = (u16_t)(hdrlen_bytes - TCP_HLEN);
  36512. 800f7ce: f1a1 0314 sub.w r3, r1, #20
  36513. 800f7d2: b29b uxth r3, r3
  36514. 800f7d4: 4a78 ldr r2, [pc, #480] @ (800f9b8 <tcp_input+0x250>)
  36515. 800f7d6: 8013 strh r3, [r2, #0]
  36516. tcphdr_opt2 = NULL;
  36517. 800f7d8: 4a78 ldr r2, [pc, #480] @ (800f9bc <tcp_input+0x254>)
  36518. 800f7da: 2000 movs r0, #0
  36519. 800f7dc: 6010 str r0, [r2, #0]
  36520. if (p->len >= hdrlen_bytes) {
  36521. 800f7de: 896a ldrh r2, [r5, #10]
  36522. 800f7e0: 4291 cmp r1, r2
  36523. 800f7e2: d92e bls.n 800f842 <tcp_input+0xda>
  36524. LWIP_ASSERT("p->next != NULL", p->next != NULL);
  36525. 800f7e4: 682b ldr r3, [r5, #0]
  36526. 800f7e6: 2b00 cmp r3, #0
  36527. 800f7e8: d067 beq.n 800f8ba <tcp_input+0x152>
  36528. pbuf_remove_header(p, TCP_HLEN);
  36529. 800f7ea: 2114 movs r1, #20
  36530. 800f7ec: 4628 mov r0, r5
  36531. 800f7ee: f7fc fa91 bl 800bd14 <pbuf_remove_header>
  36532. tcphdr_opt1len = p->len;
  36533. 800f7f2: 896c ldrh r4, [r5, #10]
  36534. 800f7f4: 4b72 ldr r3, [pc, #456] @ (800f9c0 <tcp_input+0x258>)
  36535. 800f7f6: 801c strh r4, [r3, #0]
  36536. opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len);
  36537. 800f7f8: 4b6f ldr r3, [pc, #444] @ (800f9b8 <tcp_input+0x250>)
  36538. 800f7fa: 881f ldrh r7, [r3, #0]
  36539. 800f7fc: 1b3e subs r6, r7, r4
  36540. 800f7fe: b2b6 uxth r6, r6
  36541. pbuf_remove_header(p, tcphdr_opt1len);
  36542. 800f800: 4621 mov r1, r4
  36543. 800f802: 4628 mov r0, r5
  36544. 800f804: f7fc fa86 bl 800bd14 <pbuf_remove_header>
  36545. if (opt2len > p->next->len) {
  36546. 800f808: 6828 ldr r0, [r5, #0]
  36547. 800f80a: 8943 ldrh r3, [r0, #10]
  36548. 800f80c: 42b3 cmp r3, r6
  36549. 800f80e: d3b7 bcc.n 800f780 <tcp_input+0x18>
  36550. tcphdr_opt2 = (u8_t *)p->next->payload;
  36551. 800f810: 6842 ldr r2, [r0, #4]
  36552. 800f812: 4b6a ldr r3, [pc, #424] @ (800f9bc <tcp_input+0x254>)
  36553. 800f814: 601a str r2, [r3, #0]
  36554. pbuf_remove_header(p->next, opt2len);
  36555. 800f816: 4631 mov r1, r6
  36556. 800f818: f7fc fa7c bl 800bd14 <pbuf_remove_header>
  36557. p->tot_len = (u16_t)(p->tot_len - opt2len);
  36558. 800f81c: 892b ldrh r3, [r5, #8]
  36559. 800f81e: 1be4 subs r4, r4, r7
  36560. 800f820: 4423 add r3, r4
  36561. 800f822: 812b strh r3, [r5, #8]
  36562. LWIP_ASSERT("p->len == 0", p->len == 0);
  36563. 800f824: 896b ldrh r3, [r5, #10]
  36564. 800f826: 2b00 cmp r3, #0
  36565. 800f828: d14e bne.n 800f8c8 <tcp_input+0x160>
  36566. LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len);
  36567. 800f82a: 892a ldrh r2, [r5, #8]
  36568. 800f82c: 682b ldr r3, [r5, #0]
  36569. 800f82e: 891b ldrh r3, [r3, #8]
  36570. 800f830: 429a cmp r2, r3
  36571. 800f832: d00b beq.n 800f84c <tcp_input+0xe4>
  36572. 800f834: 4b5c ldr r3, [pc, #368] @ (800f9a8 <tcp_input+0x240>)
  36573. 800f836: 22e0 movs r2, #224 @ 0xe0
  36574. 800f838: 4962 ldr r1, [pc, #392] @ (800f9c4 <tcp_input+0x25c>)
  36575. 800f83a: 485d ldr r0, [pc, #372] @ (800f9b0 <tcp_input+0x248>)
  36576. 800f83c: f003 fde4 bl 8013408 <iprintf>
  36577. 800f840: e004 b.n 800f84c <tcp_input+0xe4>
  36578. tcphdr_opt1len = tcphdr_optlen;
  36579. 800f842: 4a5f ldr r2, [pc, #380] @ (800f9c0 <tcp_input+0x258>)
  36580. 800f844: 8013 strh r3, [r2, #0]
  36581. pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */
  36582. 800f846: 4628 mov r0, r5
  36583. 800f848: f7fc fa64 bl 800bd14 <pbuf_remove_header>
  36584. tcphdr->src = lwip_ntohs(tcphdr->src);
  36585. 800f84c: 4c55 ldr r4, [pc, #340] @ (800f9a4 <tcp_input+0x23c>)
  36586. 800f84e: 6826 ldr r6, [r4, #0]
  36587. 800f850: 8830 ldrh r0, [r6, #0]
  36588. 800f852: f7f8 fb13 bl 8007e7c <lwip_htons>
  36589. 800f856: 8030 strh r0, [r6, #0]
  36590. tcphdr->dest = lwip_ntohs(tcphdr->dest);
  36591. 800f858: 6826 ldr r6, [r4, #0]
  36592. 800f85a: 8870 ldrh r0, [r6, #2]
  36593. 800f85c: f7f8 fb0e bl 8007e7c <lwip_htons>
  36594. 800f860: 8070 strh r0, [r6, #2]
  36595. seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno);
  36596. 800f862: 6826 ldr r6, [r4, #0]
  36597. 800f864: 6870 ldr r0, [r6, #4]
  36598. 800f866: f7f8 fb0e bl 8007e86 <lwip_htonl>
  36599. 800f86a: 6070 str r0, [r6, #4]
  36600. 800f86c: 4b56 ldr r3, [pc, #344] @ (800f9c8 <tcp_input+0x260>)
  36601. 800f86e: 6018 str r0, [r3, #0]
  36602. ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno);
  36603. 800f870: 6826 ldr r6, [r4, #0]
  36604. 800f872: 68b0 ldr r0, [r6, #8]
  36605. 800f874: f7f8 fb07 bl 8007e86 <lwip_htonl>
  36606. 800f878: 60b0 str r0, [r6, #8]
  36607. 800f87a: 4b54 ldr r3, [pc, #336] @ (800f9cc <tcp_input+0x264>)
  36608. 800f87c: 6018 str r0, [r3, #0]
  36609. tcphdr->wnd = lwip_ntohs(tcphdr->wnd);
  36610. 800f87e: 6826 ldr r6, [r4, #0]
  36611. 800f880: 89f0 ldrh r0, [r6, #14]
  36612. 800f882: f7f8 fafb bl 8007e7c <lwip_htons>
  36613. 800f886: 81f0 strh r0, [r6, #14]
  36614. flags = TCPH_FLAGS(tcphdr);
  36615. 800f888: 6823 ldr r3, [r4, #0]
  36616. 800f88a: 8998 ldrh r0, [r3, #12]
  36617. 800f88c: f7f8 faf6 bl 8007e7c <lwip_htons>
  36618. 800f890: f000 023f and.w r2, r0, #63 @ 0x3f
  36619. 800f894: 4b4e ldr r3, [pc, #312] @ (800f9d0 <tcp_input+0x268>)
  36620. 800f896: 701a strb r2, [r3, #0]
  36621. tcplen = p->tot_len;
  36622. 800f898: 892b ldrh r3, [r5, #8]
  36623. 800f89a: 4a4e ldr r2, [pc, #312] @ (800f9d4 <tcp_input+0x26c>)
  36624. 800f89c: 8013 strh r3, [r2, #0]
  36625. if (flags & (TCP_FIN | TCP_SYN)) {
  36626. 800f89e: f010 0f03 tst.w r0, #3
  36627. 800f8a2: d006 beq.n 800f8b2 <tcp_input+0x14a>
  36628. tcplen++;
  36629. 800f8a4: 1c5a adds r2, r3, #1
  36630. 800f8a6: b292 uxth r2, r2
  36631. 800f8a8: 494a ldr r1, [pc, #296] @ (800f9d4 <tcp_input+0x26c>)
  36632. 800f8aa: 800a strh r2, [r1, #0]
  36633. if (tcplen < p->tot_len) {
  36634. 800f8ac: 4293 cmp r3, r2
  36635. 800f8ae: f63f af67 bhi.w 800f780 <tcp_input+0x18>
  36636. for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
  36637. 800f8b2: 4b49 ldr r3, [pc, #292] @ (800f9d8 <tcp_input+0x270>)
  36638. 800f8b4: 681c ldr r4, [r3, #0]
  36639. prev = NULL;
  36640. 800f8b6: 2600 movs r6, #0
  36641. for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
  36642. 800f8b8: e02a b.n 800f910 <tcp_input+0x1a8>
  36643. LWIP_ASSERT("p->next != NULL", p->next != NULL);
  36644. 800f8ba: 4b3b ldr r3, [pc, #236] @ (800f9a8 <tcp_input+0x240>)
  36645. 800f8bc: 22c2 movs r2, #194 @ 0xc2
  36646. 800f8be: 4947 ldr r1, [pc, #284] @ (800f9dc <tcp_input+0x274>)
  36647. 800f8c0: 483b ldr r0, [pc, #236] @ (800f9b0 <tcp_input+0x248>)
  36648. 800f8c2: f003 fda1 bl 8013408 <iprintf>
  36649. 800f8c6: e790 b.n 800f7ea <tcp_input+0x82>
  36650. LWIP_ASSERT("p->len == 0", p->len == 0);
  36651. 800f8c8: 4b37 ldr r3, [pc, #220] @ (800f9a8 <tcp_input+0x240>)
  36652. 800f8ca: 22df movs r2, #223 @ 0xdf
  36653. 800f8cc: 4944 ldr r1, [pc, #272] @ (800f9e0 <tcp_input+0x278>)
  36654. 800f8ce: 4838 ldr r0, [pc, #224] @ (800f9b0 <tcp_input+0x248>)
  36655. 800f8d0: f003 fd9a bl 8013408 <iprintf>
  36656. 800f8d4: e7a9 b.n 800f82a <tcp_input+0xc2>
  36657. LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED);
  36658. 800f8d6: 4b34 ldr r3, [pc, #208] @ (800f9a8 <tcp_input+0x240>)
  36659. 800f8d8: 22fb movs r2, #251 @ 0xfb
  36660. 800f8da: 4942 ldr r1, [pc, #264] @ (800f9e4 <tcp_input+0x27c>)
  36661. 800f8dc: 4834 ldr r0, [pc, #208] @ (800f9b0 <tcp_input+0x248>)
  36662. 800f8de: f003 fd93 bl 8013408 <iprintf>
  36663. 800f8e2: e01a b.n 800f91a <tcp_input+0x1b2>
  36664. LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
  36665. 800f8e4: 4b30 ldr r3, [pc, #192] @ (800f9a8 <tcp_input+0x240>)
  36666. 800f8e6: 22fc movs r2, #252 @ 0xfc
  36667. 800f8e8: 493f ldr r1, [pc, #252] @ (800f9e8 <tcp_input+0x280>)
  36668. 800f8ea: 4831 ldr r0, [pc, #196] @ (800f9b0 <tcp_input+0x248>)
  36669. 800f8ec: f003 fd8c bl 8013408 <iprintf>
  36670. 800f8f0: e016 b.n 800f920 <tcp_input+0x1b8>
  36671. LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN);
  36672. 800f8f2: 4b2d ldr r3, [pc, #180] @ (800f9a8 <tcp_input+0x240>)
  36673. 800f8f4: 22fd movs r2, #253 @ 0xfd
  36674. 800f8f6: 493d ldr r1, [pc, #244] @ (800f9ec <tcp_input+0x284>)
  36675. 800f8f8: 482d ldr r0, [pc, #180] @ (800f9b0 <tcp_input+0x248>)
  36676. 800f8fa: f003 fd85 bl 8013408 <iprintf>
  36677. 800f8fe: e012 b.n 800f926 <tcp_input+0x1be>
  36678. if (pcb->remote_port == tcphdr->src &&
  36679. 800f900: 8b21 ldrh r1, [r4, #24]
  36680. 800f902: 4b28 ldr r3, [pc, #160] @ (800f9a4 <tcp_input+0x23c>)
  36681. 800f904: 681b ldr r3, [r3, #0]
  36682. 800f906: 881a ldrh r2, [r3, #0]
  36683. 800f908: 4291 cmp r1, r2
  36684. 800f90a: d018 beq.n 800f93e <tcp_input+0x1d6>
  36685. for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
  36686. 800f90c: 4626 mov r6, r4
  36687. 800f90e: 68e4 ldr r4, [r4, #12]
  36688. 800f910: 2c00 cmp r4, #0
  36689. 800f912: d076 beq.n 800fa02 <tcp_input+0x29a>
  36690. LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED);
  36691. 800f914: 7d23 ldrb r3, [r4, #20]
  36692. 800f916: 2b00 cmp r3, #0
  36693. 800f918: d0dd beq.n 800f8d6 <tcp_input+0x16e>
  36694. LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT);
  36695. 800f91a: 7d23 ldrb r3, [r4, #20]
  36696. 800f91c: 2b0a cmp r3, #10
  36697. 800f91e: d0e1 beq.n 800f8e4 <tcp_input+0x17c>
  36698. LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN);
  36699. 800f920: 7d23 ldrb r3, [r4, #20]
  36700. 800f922: 2b01 cmp r3, #1
  36701. 800f924: d0e5 beq.n 800f8f2 <tcp_input+0x18a>
  36702. if ((pcb->netif_idx != NETIF_NO_INDEX) &&
  36703. 800f926: 7a22 ldrb r2, [r4, #8]
  36704. 800f928: 2a00 cmp r2, #0
  36705. 800f92a: d0e9 beq.n 800f900 <tcp_input+0x198>
  36706. (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
  36707. 800f92c: 4b21 ldr r3, [pc, #132] @ (800f9b4 <tcp_input+0x24c>)
  36708. 800f92e: 685b ldr r3, [r3, #4]
  36709. 800f930: f893 3034 ldrb.w r3, [r3, #52] @ 0x34
  36710. 800f934: 3301 adds r3, #1
  36711. 800f936: b2db uxtb r3, r3
  36712. if ((pcb->netif_idx != NETIF_NO_INDEX) &&
  36713. 800f938: 429a cmp r2, r3
  36714. 800f93a: d0e1 beq.n 800f900 <tcp_input+0x198>
  36715. 800f93c: e7e6 b.n 800f90c <tcp_input+0x1a4>
  36716. pcb->local_port == tcphdr->dest &&
  36717. 800f93e: 8ae2 ldrh r2, [r4, #22]
  36718. 800f940: 885b ldrh r3, [r3, #2]
  36719. if (pcb->remote_port == tcphdr->src &&
  36720. 800f942: 429a cmp r2, r3
  36721. 800f944: d1e2 bne.n 800f90c <tcp_input+0x1a4>
  36722. ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
  36723. 800f946: 6862 ldr r2, [r4, #4]
  36724. 800f948: 4b1a ldr r3, [pc, #104] @ (800f9b4 <tcp_input+0x24c>)
  36725. 800f94a: 691b ldr r3, [r3, #16]
  36726. pcb->local_port == tcphdr->dest &&
  36727. 800f94c: 429a cmp r2, r3
  36728. 800f94e: d1dd bne.n 800f90c <tcp_input+0x1a4>
  36729. ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
  36730. 800f950: 6822 ldr r2, [r4, #0]
  36731. 800f952: 4b18 ldr r3, [pc, #96] @ (800f9b4 <tcp_input+0x24c>)
  36732. 800f954: 695b ldr r3, [r3, #20]
  36733. ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
  36734. 800f956: 429a cmp r2, r3
  36735. 800f958: d1d8 bne.n 800f90c <tcp_input+0x1a4>
  36736. LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb);
  36737. 800f95a: 68e3 ldr r3, [r4, #12]
  36738. 800f95c: 429c cmp r4, r3
  36739. 800f95e: d018 beq.n 800f992 <tcp_input+0x22a>
  36740. if (prev != NULL) {
  36741. 800f960: b12e cbz r6, 800f96e <tcp_input+0x206>
  36742. prev->next = pcb->next;
  36743. 800f962: 68e3 ldr r3, [r4, #12]
  36744. 800f964: 60f3 str r3, [r6, #12]
  36745. pcb->next = tcp_active_pcbs;
  36746. 800f966: 4b1c ldr r3, [pc, #112] @ (800f9d8 <tcp_input+0x270>)
  36747. 800f968: 681a ldr r2, [r3, #0]
  36748. 800f96a: 60e2 str r2, [r4, #12]
  36749. tcp_active_pcbs = pcb;
  36750. 800f96c: 601c str r4, [r3, #0]
  36751. LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
  36752. 800f96e: 68e3 ldr r3, [r4, #12]
  36753. 800f970: 429c cmp r4, r3
  36754. 800f972: d03f beq.n 800f9f4 <tcp_input+0x28c>
  36755. if (pcb != NULL) {
  36756. 800f974: 2c00 cmp r4, #0
  36757. 800f976: d146 bne.n 800fa06 <tcp_input+0x29e>
  36758. if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) {
  36759. 800f978: 4b0a ldr r3, [pc, #40] @ (800f9a4 <tcp_input+0x23c>)
  36760. 800f97a: 681b ldr r3, [r3, #0]
  36761. 800f97c: 8998 ldrh r0, [r3, #12]
  36762. 800f97e: f7f8 fa7d bl 8007e7c <lwip_htons>
  36763. 800f982: f010 0f04 tst.w r0, #4
  36764. 800f986: f000 8197 beq.w 800fcb8 <tcp_input+0x550>
  36765. pbuf_free(p);
  36766. 800f98a: 4628 mov r0, r5
  36767. 800f98c: f7fc fa08 bl 800bda0 <pbuf_free>
  36768. 800f990: e6f9 b.n 800f786 <tcp_input+0x1e>
  36769. LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb);
  36770. 800f992: 4b05 ldr r3, [pc, #20] @ (800f9a8 <tcp_input+0x240>)
  36771. 800f994: f240 120d movw r2, #269 @ 0x10d
  36772. 800f998: 4915 ldr r1, [pc, #84] @ (800f9f0 <tcp_input+0x288>)
  36773. 800f99a: 4805 ldr r0, [pc, #20] @ (800f9b0 <tcp_input+0x248>)
  36774. 800f99c: f003 fd34 bl 8013408 <iprintf>
  36775. 800f9a0: e7de b.n 800f960 <tcp_input+0x1f8>
  36776. 800f9a2: bf00 nop
  36777. 800f9a4: 24019c0c .word 0x24019c0c
  36778. 800f9a8: 08016c64 .word 0x08016c64
  36779. 800f9ac: 08016f78 .word 0x08016f78
  36780. 800f9b0: 080144e8 .word 0x080144e8
  36781. 800f9b4: 2401301c .word 0x2401301c
  36782. 800f9b8: 24019c0a .word 0x24019c0a
  36783. 800f9bc: 24019c04 .word 0x24019c04
  36784. 800f9c0: 24019c08 .word 0x24019c08
  36785. 800f9c4: 08016fac .word 0x08016fac
  36786. 800f9c8: 24019bfc .word 0x24019bfc
  36787. 800f9cc: 24019bf8 .word 0x24019bf8
  36788. 800f9d0: 24019bf1 .word 0x24019bf1
  36789. 800f9d4: 24019bf2 .word 0x24019bf2
  36790. 800f9d8: 24019bd8 .word 0x24019bd8
  36791. 800f9dc: 08016f90 .word 0x08016f90
  36792. 800f9e0: 08016fa0 .word 0x08016fa0
  36793. 800f9e4: 08016fcc .word 0x08016fcc
  36794. 800f9e8: 08016ff4 .word 0x08016ff4
  36795. 800f9ec: 08017020 .word 0x08017020
  36796. 800f9f0: 08017048 .word 0x08017048
  36797. LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb);
  36798. 800f9f4: 4b95 ldr r3, [pc, #596] @ (800fc4c <tcp_input+0x4e4>)
  36799. 800f9f6: f240 1215 movw r2, #277 @ 0x115
  36800. 800f9fa: 4995 ldr r1, [pc, #596] @ (800fc50 <tcp_input+0x4e8>)
  36801. 800f9fc: 4895 ldr r0, [pc, #596] @ (800fc54 <tcp_input+0x4ec>)
  36802. 800f9fe: f003 fd03 bl 8013408 <iprintf>
  36803. if (pcb == NULL) {
  36804. 800fa02: 2c00 cmp r4, #0
  36805. 800fa04: d053 beq.n 800faae <tcp_input+0x346>
  36806. inseg.next = NULL;
  36807. 800fa06: 4a94 ldr r2, [pc, #592] @ (800fc58 <tcp_input+0x4f0>)
  36808. 800fa08: 2300 movs r3, #0
  36809. 800fa0a: 6013 str r3, [r2, #0]
  36810. inseg.len = p->tot_len;
  36811. 800fa0c: 8929 ldrh r1, [r5, #8]
  36812. 800fa0e: 8111 strh r1, [r2, #8]
  36813. inseg.p = p;
  36814. 800fa10: 6055 str r5, [r2, #4]
  36815. inseg.tcphdr = tcphdr;
  36816. 800fa12: 4992 ldr r1, [pc, #584] @ (800fc5c <tcp_input+0x4f4>)
  36817. 800fa14: 6809 ldr r1, [r1, #0]
  36818. 800fa16: 6111 str r1, [r2, #16]
  36819. recv_data = NULL;
  36820. 800fa18: 4a91 ldr r2, [pc, #580] @ (800fc60 <tcp_input+0x4f8>)
  36821. 800fa1a: 6013 str r3, [r2, #0]
  36822. recv_flags = 0;
  36823. 800fa1c: 4a91 ldr r2, [pc, #580] @ (800fc64 <tcp_input+0x4fc>)
  36824. 800fa1e: 7013 strb r3, [r2, #0]
  36825. recv_acked = 0;
  36826. 800fa20: 4a91 ldr r2, [pc, #580] @ (800fc68 <tcp_input+0x500>)
  36827. 800fa22: 8013 strh r3, [r2, #0]
  36828. if (flags & TCP_PSH) {
  36829. 800fa24: 4b91 ldr r3, [pc, #580] @ (800fc6c <tcp_input+0x504>)
  36830. 800fa26: 781b ldrb r3, [r3, #0]
  36831. 800fa28: f013 0f08 tst.w r3, #8
  36832. 800fa2c: d003 beq.n 800fa36 <tcp_input+0x2ce>
  36833. p->flags |= PBUF_FLAG_PUSH;
  36834. 800fa2e: 7b6b ldrb r3, [r5, #13]
  36835. 800fa30: f043 0301 orr.w r3, r3, #1
  36836. 800fa34: 736b strb r3, [r5, #13]
  36837. if (pcb->refused_data != NULL) {
  36838. 800fa36: 6fa3 ldr r3, [r4, #120] @ 0x78
  36839. 800fa38: b16b cbz r3, 800fa56 <tcp_input+0x2ee>
  36840. if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
  36841. 800fa3a: 4620 mov r0, r4
  36842. 800fa3c: f7fe f9a8 bl 800dd90 <tcp_process_refused_data>
  36843. 800fa40: f110 0f0d cmn.w r0, #13
  36844. 800fa44: f000 809a beq.w 800fb7c <tcp_input+0x414>
  36845. ((pcb->refused_data != NULL) && (tcplen > 0))) {
  36846. 800fa48: 6fa3 ldr r3, [r4, #120] @ 0x78
  36847. if ((tcp_process_refused_data(pcb) == ERR_ABRT) ||
  36848. 800fa4a: b123 cbz r3, 800fa56 <tcp_input+0x2ee>
  36849. ((pcb->refused_data != NULL) && (tcplen > 0))) {
  36850. 800fa4c: 4b88 ldr r3, [pc, #544] @ (800fc70 <tcp_input+0x508>)
  36851. 800fa4e: 881b ldrh r3, [r3, #0]
  36852. 800fa50: 2b00 cmp r3, #0
  36853. 800fa52: f040 8093 bne.w 800fb7c <tcp_input+0x414>
  36854. tcp_input_pcb = pcb;
  36855. 800fa56: 4b87 ldr r3, [pc, #540] @ (800fc74 <tcp_input+0x50c>)
  36856. 800fa58: 601c str r4, [r3, #0]
  36857. err = tcp_process(pcb);
  36858. 800fa5a: 4620 mov r0, r4
  36859. 800fa5c: f7ff fbc2 bl 800f1e4 <tcp_process>
  36860. if (err != ERR_ABRT) {
  36861. 800fa60: f110 0f0d cmn.w r0, #13
  36862. 800fa64: d013 beq.n 800fa8e <tcp_input+0x326>
  36863. if (recv_flags & TF_RESET) {
  36864. 800fa66: 4b7f ldr r3, [pc, #508] @ (800fc64 <tcp_input+0x4fc>)
  36865. 800fa68: 781b ldrb r3, [r3, #0]
  36866. 800fa6a: f013 0f08 tst.w r3, #8
  36867. 800fa6e: f000 808c beq.w 800fb8a <tcp_input+0x422>
  36868. TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST);
  36869. 800fa72: f8d4 3090 ldr.w r3, [r4, #144] @ 0x90
  36870. 800fa76: b11b cbz r3, 800fa80 <tcp_input+0x318>
  36871. 800fa78: f06f 010d mvn.w r1, #13
  36872. 800fa7c: 6920 ldr r0, [r4, #16]
  36873. 800fa7e: 4798 blx r3
  36874. tcp_pcb_remove(&tcp_active_pcbs, pcb);
  36875. 800fa80: 4621 mov r1, r4
  36876. 800fa82: 487d ldr r0, [pc, #500] @ (800fc78 <tcp_input+0x510>)
  36877. 800fa84: f7fd fe78 bl 800d778 <tcp_pcb_remove>
  36878. tcp_free(pcb);
  36879. 800fa88: 4620 mov r0, r4
  36880. 800fa8a: f7fd fbfb bl 800d284 <tcp_free>
  36881. tcp_input_pcb = NULL;
  36882. 800fa8e: 2300 movs r3, #0
  36883. 800fa90: 4a78 ldr r2, [pc, #480] @ (800fc74 <tcp_input+0x50c>)
  36884. 800fa92: 6013 str r3, [r2, #0]
  36885. recv_data = NULL;
  36886. 800fa94: 4a72 ldr r2, [pc, #456] @ (800fc60 <tcp_input+0x4f8>)
  36887. 800fa96: 6013 str r3, [r2, #0]
  36888. if (inseg.p != NULL) {
  36889. 800fa98: 4b6f ldr r3, [pc, #444] @ (800fc58 <tcp_input+0x4f0>)
  36890. 800fa9a: 6858 ldr r0, [r3, #4]
  36891. 800fa9c: 2800 cmp r0, #0
  36892. 800fa9e: f43f ae72 beq.w 800f786 <tcp_input+0x1e>
  36893. pbuf_free(inseg.p);
  36894. 800faa2: f7fc f97d bl 800bda0 <pbuf_free>
  36895. inseg.p = NULL;
  36896. 800faa6: 4b6c ldr r3, [pc, #432] @ (800fc58 <tcp_input+0x4f0>)
  36897. 800faa8: 2200 movs r2, #0
  36898. 800faaa: 605a str r2, [r3, #4]
  36899. 800faac: e66b b.n 800f786 <tcp_input+0x1e>
  36900. for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
  36901. 800faae: 4b73 ldr r3, [pc, #460] @ (800fc7c <tcp_input+0x514>)
  36902. 800fab0: 681c ldr r4, [r3, #0]
  36903. 800fab2: e00e b.n 800fad2 <tcp_input+0x36a>
  36904. LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
  36905. 800fab4: 4b65 ldr r3, [pc, #404] @ (800fc4c <tcp_input+0x4e4>)
  36906. 800fab6: f240 121f movw r2, #287 @ 0x11f
  36907. 800faba: 4971 ldr r1, [pc, #452] @ (800fc80 <tcp_input+0x518>)
  36908. 800fabc: 4865 ldr r0, [pc, #404] @ (800fc54 <tcp_input+0x4ec>)
  36909. 800fabe: f003 fca3 bl 8013408 <iprintf>
  36910. 800fac2: e00a b.n 800fada <tcp_input+0x372>
  36911. if (pcb->remote_port == tcphdr->src &&
  36912. 800fac4: 8b21 ldrh r1, [r4, #24]
  36913. 800fac6: 4b65 ldr r3, [pc, #404] @ (800fc5c <tcp_input+0x4f4>)
  36914. 800fac8: 681b ldr r3, [r3, #0]
  36915. 800faca: 881a ldrh r2, [r3, #0]
  36916. 800facc: 4291 cmp r1, r2
  36917. 800face: d010 beq.n 800faf2 <tcp_input+0x38a>
  36918. for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
  36919. 800fad0: 68e4 ldr r4, [r4, #12]
  36920. 800fad2: b31c cbz r4, 800fb1c <tcp_input+0x3b4>
  36921. LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT);
  36922. 800fad4: 7d23 ldrb r3, [r4, #20]
  36923. 800fad6: 2b0a cmp r3, #10
  36924. 800fad8: d1ec bne.n 800fab4 <tcp_input+0x34c>
  36925. if ((pcb->netif_idx != NETIF_NO_INDEX) &&
  36926. 800fada: 7a22 ldrb r2, [r4, #8]
  36927. 800fadc: 2a00 cmp r2, #0
  36928. 800fade: d0f1 beq.n 800fac4 <tcp_input+0x35c>
  36929. (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
  36930. 800fae0: 4b68 ldr r3, [pc, #416] @ (800fc84 <tcp_input+0x51c>)
  36931. 800fae2: 685b ldr r3, [r3, #4]
  36932. 800fae4: f893 3034 ldrb.w r3, [r3, #52] @ 0x34
  36933. 800fae8: 3301 adds r3, #1
  36934. 800faea: b2db uxtb r3, r3
  36935. if ((pcb->netif_idx != NETIF_NO_INDEX) &&
  36936. 800faec: 429a cmp r2, r3
  36937. 800faee: d0e9 beq.n 800fac4 <tcp_input+0x35c>
  36938. 800faf0: e7ee b.n 800fad0 <tcp_input+0x368>
  36939. pcb->local_port == tcphdr->dest &&
  36940. 800faf2: 8ae2 ldrh r2, [r4, #22]
  36941. 800faf4: 885b ldrh r3, [r3, #2]
  36942. if (pcb->remote_port == tcphdr->src &&
  36943. 800faf6: 429a cmp r2, r3
  36944. 800faf8: d1ea bne.n 800fad0 <tcp_input+0x368>
  36945. ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
  36946. 800fafa: 6862 ldr r2, [r4, #4]
  36947. 800fafc: 4b61 ldr r3, [pc, #388] @ (800fc84 <tcp_input+0x51c>)
  36948. 800fafe: 691b ldr r3, [r3, #16]
  36949. pcb->local_port == tcphdr->dest &&
  36950. 800fb00: 429a cmp r2, r3
  36951. 800fb02: d1e5 bne.n 800fad0 <tcp_input+0x368>
  36952. ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
  36953. 800fb04: 6822 ldr r2, [r4, #0]
  36954. 800fb06: 4b5f ldr r3, [pc, #380] @ (800fc84 <tcp_input+0x51c>)
  36955. 800fb08: 695b ldr r3, [r3, #20]
  36956. ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) &&
  36957. 800fb0a: 429a cmp r2, r3
  36958. 800fb0c: d1e0 bne.n 800fad0 <tcp_input+0x368>
  36959. tcp_timewait_input(pcb);
  36960. 800fb0e: 4620 mov r0, r4
  36961. 800fb10: f7fe fd10 bl 800e534 <tcp_timewait_input>
  36962. pbuf_free(p);
  36963. 800fb14: 4628 mov r0, r5
  36964. 800fb16: f7fc f943 bl 800bda0 <pbuf_free>
  36965. return;
  36966. 800fb1a: e634 b.n 800f786 <tcp_input+0x1e>
  36967. for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
  36968. 800fb1c: 4b5a ldr r3, [pc, #360] @ (800fc88 <tcp_input+0x520>)
  36969. 800fb1e: 681e ldr r6, [r3, #0]
  36970. 800fb20: 4630 mov r0, r6
  36971. prev = NULL;
  36972. 800fb22: 4621 mov r1, r4
  36973. for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
  36974. 800fb24: e007 b.n 800fb36 <tcp_input+0x3ce>
  36975. if (lpcb->local_port == tcphdr->dest) {
  36976. 800fb26: 8ac2 ldrh r2, [r0, #22]
  36977. 800fb28: 4b4c ldr r3, [pc, #304] @ (800fc5c <tcp_input+0x4f4>)
  36978. 800fb2a: 681b ldr r3, [r3, #0]
  36979. 800fb2c: 885b ldrh r3, [r3, #2]
  36980. 800fb2e: 429a cmp r2, r3
  36981. 800fb30: d00e beq.n 800fb50 <tcp_input+0x3e8>
  36982. for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
  36983. 800fb32: 4601 mov r1, r0
  36984. 800fb34: 68c0 ldr r0, [r0, #12]
  36985. 800fb36: b190 cbz r0, 800fb5e <tcp_input+0x3f6>
  36986. if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
  36987. 800fb38: 7a02 ldrb r2, [r0, #8]
  36988. 800fb3a: 2a00 cmp r2, #0
  36989. 800fb3c: d0f3 beq.n 800fb26 <tcp_input+0x3be>
  36990. (lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
  36991. 800fb3e: 4b51 ldr r3, [pc, #324] @ (800fc84 <tcp_input+0x51c>)
  36992. 800fb40: 685b ldr r3, [r3, #4]
  36993. 800fb42: f893 3034 ldrb.w r3, [r3, #52] @ 0x34
  36994. 800fb46: 3301 adds r3, #1
  36995. 800fb48: b2db uxtb r3, r3
  36996. if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
  36997. 800fb4a: 429a cmp r2, r3
  36998. 800fb4c: d0eb beq.n 800fb26 <tcp_input+0x3be>
  36999. 800fb4e: e7f0 b.n 800fb32 <tcp_input+0x3ca>
  37000. if (ip_addr_cmp(&lpcb->local_ip, ip_current_dest_addr())) {
  37001. 800fb50: 6803 ldr r3, [r0, #0]
  37002. 800fb52: 4a4c ldr r2, [pc, #304] @ (800fc84 <tcp_input+0x51c>)
  37003. 800fb54: 6952 ldr r2, [r2, #20]
  37004. 800fb56: 4293 cmp r3, r2
  37005. 800fb58: d001 beq.n 800fb5e <tcp_input+0x3f6>
  37006. } else if (ip_addr_isany(&lpcb->local_ip)) {
  37007. 800fb5a: 2b00 cmp r3, #0
  37008. 800fb5c: d1e9 bne.n 800fb32 <tcp_input+0x3ca>
  37009. if (lpcb != NULL) {
  37010. 800fb5e: 2800 cmp r0, #0
  37011. 800fb60: f43f af08 beq.w 800f974 <tcp_input+0x20c>
  37012. if (prev != NULL) {
  37013. 800fb64: b121 cbz r1, 800fb70 <tcp_input+0x408>
  37014. ((struct tcp_pcb_listen *)prev)->next = lpcb->next;
  37015. 800fb66: 68c3 ldr r3, [r0, #12]
  37016. 800fb68: 60cb str r3, [r1, #12]
  37017. lpcb->next = tcp_listen_pcbs.listen_pcbs;
  37018. 800fb6a: 60c6 str r6, [r0, #12]
  37019. tcp_listen_pcbs.listen_pcbs = lpcb;
  37020. 800fb6c: 4b46 ldr r3, [pc, #280] @ (800fc88 <tcp_input+0x520>)
  37021. 800fb6e: 6018 str r0, [r3, #0]
  37022. tcp_listen_input(lpcb);
  37023. 800fb70: f7fe fd3c bl 800e5ec <tcp_listen_input>
  37024. pbuf_free(p);
  37025. 800fb74: 4628 mov r0, r5
  37026. 800fb76: f7fc f913 bl 800bda0 <pbuf_free>
  37027. return;
  37028. 800fb7a: e604 b.n 800f786 <tcp_input+0x1e>
  37029. if (pcb->rcv_ann_wnd == 0) {
  37030. 800fb7c: 8d63 ldrh r3, [r4, #42] @ 0x2a
  37031. 800fb7e: 2b00 cmp r3, #0
  37032. 800fb80: d185 bne.n 800fa8e <tcp_input+0x326>
  37033. tcp_send_empty_ack(pcb);
  37034. 800fb82: 4620 mov r0, r4
  37035. 800fb84: f001 f934 bl 8010df0 <tcp_send_empty_ack>
  37036. goto aborted;
  37037. 800fb88: e781 b.n 800fa8e <tcp_input+0x326>
  37038. if (recv_acked > 0) {
  37039. 800fb8a: 4b37 ldr r3, [pc, #220] @ (800fc68 <tcp_input+0x500>)
  37040. 800fb8c: 881a ldrh r2, [r3, #0]
  37041. 800fb8e: b162 cbz r2, 800fbaa <tcp_input+0x442>
  37042. TCP_EVENT_SENT(pcb, (u16_t)acked16, err);
  37043. 800fb90: f8d4 3080 ldr.w r3, [r4, #128] @ 0x80
  37044. 800fb94: b133 cbz r3, 800fba4 <tcp_input+0x43c>
  37045. 800fb96: 4621 mov r1, r4
  37046. 800fb98: 6920 ldr r0, [r4, #16]
  37047. 800fb9a: 4798 blx r3
  37048. if (err == ERR_ABRT) {
  37049. 800fb9c: f110 0f0d cmn.w r0, #13
  37050. 800fba0: f43f af75 beq.w 800fa8e <tcp_input+0x326>
  37051. recv_acked = 0;
  37052. 800fba4: 4b30 ldr r3, [pc, #192] @ (800fc68 <tcp_input+0x500>)
  37053. 800fba6: 2200 movs r2, #0
  37054. 800fba8: 801a strh r2, [r3, #0]
  37055. if (tcp_input_delayed_close(pcb)) {
  37056. 800fbaa: 4620 mov r0, r4
  37057. 800fbac: f7fe fc92 bl 800e4d4 <tcp_input_delayed_close>
  37058. 800fbb0: 2800 cmp r0, #0
  37059. 800fbb2: f47f af6c bne.w 800fa8e <tcp_input+0x326>
  37060. if (recv_data != NULL) {
  37061. 800fbb6: 4b2a ldr r3, [pc, #168] @ (800fc60 <tcp_input+0x4f8>)
  37062. 800fbb8: 681b ldr r3, [r3, #0]
  37063. 800fbba: b1f3 cbz r3, 800fbfa <tcp_input+0x492>
  37064. LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL);
  37065. 800fbbc: 6fa3 ldr r3, [r4, #120] @ 0x78
  37066. 800fbbe: b133 cbz r3, 800fbce <tcp_input+0x466>
  37067. 800fbc0: 4b22 ldr r3, [pc, #136] @ (800fc4c <tcp_input+0x4e4>)
  37068. 800fbc2: f44f 72f3 mov.w r2, #486 @ 0x1e6
  37069. 800fbc6: 4931 ldr r1, [pc, #196] @ (800fc8c <tcp_input+0x524>)
  37070. 800fbc8: 4822 ldr r0, [pc, #136] @ (800fc54 <tcp_input+0x4ec>)
  37071. 800fbca: f003 fc1d bl 8013408 <iprintf>
  37072. if (pcb->flags & TF_RXCLOSED) {
  37073. 800fbce: 8b63 ldrh r3, [r4, #26]
  37074. 800fbd0: f013 0f10 tst.w r3, #16
  37075. 800fbd4: d12a bne.n 800fc2c <tcp_input+0x4c4>
  37076. TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
  37077. 800fbd6: f8d4 5084 ldr.w r5, [r4, #132] @ 0x84
  37078. 800fbda: 2d00 cmp r5, #0
  37079. 800fbdc: d02e beq.n 800fc3c <tcp_input+0x4d4>
  37080. 800fbde: 2300 movs r3, #0
  37081. 800fbe0: 4a1f ldr r2, [pc, #124] @ (800fc60 <tcp_input+0x4f8>)
  37082. 800fbe2: 6812 ldr r2, [r2, #0]
  37083. 800fbe4: 4621 mov r1, r4
  37084. 800fbe6: 6920 ldr r0, [r4, #16]
  37085. 800fbe8: 47a8 blx r5
  37086. if (err == ERR_ABRT) {
  37087. 800fbea: f110 0f0d cmn.w r0, #13
  37088. 800fbee: f43f af4e beq.w 800fa8e <tcp_input+0x326>
  37089. if (err != ERR_OK) {
  37090. 800fbf2: b110 cbz r0, 800fbfa <tcp_input+0x492>
  37091. pcb->refused_data = recv_data;
  37092. 800fbf4: 4b1a ldr r3, [pc, #104] @ (800fc60 <tcp_input+0x4f8>)
  37093. 800fbf6: 681b ldr r3, [r3, #0]
  37094. 800fbf8: 67a3 str r3, [r4, #120] @ 0x78
  37095. if (recv_flags & TF_GOT_FIN) {
  37096. 800fbfa: 4b1a ldr r3, [pc, #104] @ (800fc64 <tcp_input+0x4fc>)
  37097. 800fbfc: 781b ldrb r3, [r3, #0]
  37098. 800fbfe: f013 0f20 tst.w r3, #32
  37099. 800fc02: d006 beq.n 800fc12 <tcp_input+0x4aa>
  37100. if (pcb->refused_data != NULL) {
  37101. 800fc04: 6fa3 ldr r3, [r4, #120] @ 0x78
  37102. 800fc06: 2b00 cmp r3, #0
  37103. 800fc08: d042 beq.n 800fc90 <tcp_input+0x528>
  37104. pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN;
  37105. 800fc0a: 7b5a ldrb r2, [r3, #13]
  37106. 800fc0c: f042 0220 orr.w r2, r2, #32
  37107. 800fc10: 735a strb r2, [r3, #13]
  37108. tcp_input_pcb = NULL;
  37109. 800fc12: 4b18 ldr r3, [pc, #96] @ (800fc74 <tcp_input+0x50c>)
  37110. 800fc14: 2200 movs r2, #0
  37111. 800fc16: 601a str r2, [r3, #0]
  37112. if (tcp_input_delayed_close(pcb)) {
  37113. 800fc18: 4620 mov r0, r4
  37114. 800fc1a: f7fe fc5b bl 800e4d4 <tcp_input_delayed_close>
  37115. 800fc1e: 2800 cmp r0, #0
  37116. 800fc20: f47f af35 bne.w 800fa8e <tcp_input+0x326>
  37117. tcp_output(pcb);
  37118. 800fc24: 4620 mov r0, r4
  37119. 800fc26: f001 f91d bl 8010e64 <tcp_output>
  37120. 800fc2a: e730 b.n 800fa8e <tcp_input+0x326>
  37121. pbuf_free(recv_data);
  37122. 800fc2c: 4b0c ldr r3, [pc, #48] @ (800fc60 <tcp_input+0x4f8>)
  37123. 800fc2e: 6818 ldr r0, [r3, #0]
  37124. 800fc30: f7fc f8b6 bl 800bda0 <pbuf_free>
  37125. tcp_abort(pcb);
  37126. 800fc34: 4620 mov r0, r4
  37127. 800fc36: f7fd fe8f bl 800d958 <tcp_abort>
  37128. goto aborted;
  37129. 800fc3a: e728 b.n 800fa8e <tcp_input+0x326>
  37130. TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err);
  37131. 800fc3c: 2300 movs r3, #0
  37132. 800fc3e: 4a08 ldr r2, [pc, #32] @ (800fc60 <tcp_input+0x4f8>)
  37133. 800fc40: 6812 ldr r2, [r2, #0]
  37134. 800fc42: 4621 mov r1, r4
  37135. 800fc44: 4618 mov r0, r3
  37136. 800fc46: f7fe f87f bl 800dd48 <tcp_recv_null>
  37137. 800fc4a: e7ce b.n 800fbea <tcp_input+0x482>
  37138. 800fc4c: 08016c64 .word 0x08016c64
  37139. 800fc50: 08017074 .word 0x08017074
  37140. 800fc54: 080144e8 .word 0x080144e8
  37141. 800fc58: 24019c10 .word 0x24019c10
  37142. 800fc5c: 24019c0c .word 0x24019c0c
  37143. 800fc60: 24019bec .word 0x24019bec
  37144. 800fc64: 24019bf0 .word 0x24019bf0
  37145. 800fc68: 24019bf4 .word 0x24019bf4
  37146. 800fc6c: 24019bf1 .word 0x24019bf1
  37147. 800fc70: 24019bf2 .word 0x24019bf2
  37148. 800fc74: 24019be8 .word 0x24019be8
  37149. 800fc78: 24019bd8 .word 0x24019bd8
  37150. 800fc7c: 24019bd4 .word 0x24019bd4
  37151. 800fc80: 080170a0 .word 0x080170a0
  37152. 800fc84: 2401301c .word 0x2401301c
  37153. 800fc88: 24019bdc .word 0x24019bdc
  37154. 800fc8c: 080170d0 .word 0x080170d0
  37155. if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) {
  37156. 800fc90: 8d23 ldrh r3, [r4, #40] @ 0x28
  37157. 800fc92: f241 62d0 movw r2, #5840 @ 0x16d0
  37158. 800fc96: 4293 cmp r3, r2
  37159. 800fc98: d001 beq.n 800fc9e <tcp_input+0x536>
  37160. pcb->rcv_wnd++;
  37161. 800fc9a: 3301 adds r3, #1
  37162. 800fc9c: 8523 strh r3, [r4, #40] @ 0x28
  37163. TCP_EVENT_CLOSED(pcb, err);
  37164. 800fc9e: f8d4 5084 ldr.w r5, [r4, #132] @ 0x84
  37165. 800fca2: 2d00 cmp r5, #0
  37166. 800fca4: d0b5 beq.n 800fc12 <tcp_input+0x4aa>
  37167. 800fca6: 2300 movs r3, #0
  37168. 800fca8: 461a mov r2, r3
  37169. 800fcaa: 4621 mov r1, r4
  37170. 800fcac: 6920 ldr r0, [r4, #16]
  37171. 800fcae: 47a8 blx r5
  37172. if (err == ERR_ABRT) {
  37173. 800fcb0: f110 0f0d cmn.w r0, #13
  37174. 800fcb4: d1ad bne.n 800fc12 <tcp_input+0x4aa>
  37175. 800fcb6: e6ea b.n 800fa8e <tcp_input+0x326>
  37176. ip_current_src_addr(), tcphdr->dest, tcphdr->src);
  37177. 800fcb8: 4b09 ldr r3, [pc, #36] @ (800fce0 <tcp_input+0x578>)
  37178. 800fcba: 6819 ldr r1, [r3, #0]
  37179. tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(),
  37180. 800fcbc: 4b09 ldr r3, [pc, #36] @ (800fce4 <tcp_input+0x57c>)
  37181. 800fcbe: 4a0a ldr r2, [pc, #40] @ (800fce8 <tcp_input+0x580>)
  37182. 800fcc0: 8810 ldrh r0, [r2, #0]
  37183. 800fcc2: 4a0a ldr r2, [pc, #40] @ (800fcec <tcp_input+0x584>)
  37184. 800fcc4: 6812 ldr r2, [r2, #0]
  37185. 800fcc6: 880c ldrh r4, [r1, #0]
  37186. 800fcc8: 9402 str r4, [sp, #8]
  37187. 800fcca: 8849 ldrh r1, [r1, #2]
  37188. 800fccc: 9101 str r1, [sp, #4]
  37189. 800fcce: 1f19 subs r1, r3, #4
  37190. 800fcd0: 9100 str r1, [sp, #0]
  37191. 800fcd2: 4402 add r2, r0
  37192. 800fcd4: 4906 ldr r1, [pc, #24] @ (800fcf0 <tcp_input+0x588>)
  37193. 800fcd6: 6809 ldr r1, [r1, #0]
  37194. 800fcd8: 2000 movs r0, #0
  37195. 800fcda: f001 f841 bl 8010d60 <tcp_rst>
  37196. 800fcde: e654 b.n 800f98a <tcp_input+0x222>
  37197. 800fce0: 24019c0c .word 0x24019c0c
  37198. 800fce4: 24013030 .word 0x24013030
  37199. 800fce8: 24019bf2 .word 0x24019bf2
  37200. 800fcec: 24019bfc .word 0x24019bfc
  37201. 800fcf0: 24019bf8 .word 0x24019bf8
  37202. 0800fcf4 <tcp_trigger_input_pcb_close>:
  37203. void
  37204. tcp_trigger_input_pcb_close(void)
  37205. {
  37206. recv_flags |= TF_CLOSED;
  37207. 800fcf4: 4a02 ldr r2, [pc, #8] @ (800fd00 <tcp_trigger_input_pcb_close+0xc>)
  37208. 800fcf6: 7813 ldrb r3, [r2, #0]
  37209. 800fcf8: f043 0310 orr.w r3, r3, #16
  37210. 800fcfc: 7013 strb r3, [r2, #0]
  37211. }
  37212. 800fcfe: 4770 bx lr
  37213. 800fd00: 24019bf0 .word 0x24019bf0
  37214. 0800fd04 <tcp_write_checks>:
  37215. * @param len length of data to send (checked agains snd_buf)
  37216. * @return ERR_OK if tcp_write is allowed to proceed, another err_t otherwise
  37217. */
  37218. static err_t
  37219. tcp_write_checks(struct tcp_pcb *pcb, u16_t len)
  37220. {
  37221. 800fd04: b538 push {r3, r4, r5, lr}
  37222. 800fd06: 460c mov r4, r1
  37223. LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL);
  37224. 800fd08: 4605 mov r5, r0
  37225. 800fd0a: b1b8 cbz r0, 800fd3c <tcp_write_checks+0x38>
  37226. /* connection is in invalid state for data transmission? */
  37227. if ((pcb->state != ESTABLISHED) &&
  37228. 800fd0c: 7d2b ldrb r3, [r5, #20]
  37229. 800fd0e: 2b04 cmp r3, #4
  37230. 800fd10: bf18 it ne
  37231. 800fd12: 2b07 cmpne r3, #7
  37232. 800fd14: d003 beq.n 800fd1e <tcp_write_checks+0x1a>
  37233. (pcb->state != CLOSE_WAIT) &&
  37234. 800fd16: 2b02 cmp r3, #2
  37235. 800fd18: d001 beq.n 800fd1e <tcp_write_checks+0x1a>
  37236. (pcb->state != SYN_SENT) &&
  37237. 800fd1a: 2b03 cmp r3, #3
  37238. 800fd1c: d141 bne.n 800fda2 <tcp_write_checks+0x9e>
  37239. (pcb->state != SYN_RCVD)) {
  37240. LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n"));
  37241. return ERR_CONN;
  37242. } else if (len == 0) {
  37243. 800fd1e: 2c00 cmp r4, #0
  37244. 800fd20: d042 beq.n 800fda8 <tcp_write_checks+0xa4>
  37245. return ERR_OK;
  37246. }
  37247. /* fail on too much data */
  37248. if (len > pcb->snd_buf) {
  37249. 800fd22: f8b5 3064 ldrh.w r3, [r5, #100] @ 0x64
  37250. 800fd26: 42a3 cmp r3, r4
  37251. 800fd28: d310 bcc.n 800fd4c <tcp_write_checks+0x48>
  37252. LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: queuelen: %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen));
  37253. /* If total number of pbufs on the unsent/unacked queues exceeds the
  37254. * configured maximum, return an error */
  37255. /* check for configured max queuelen and possible overflow */
  37256. if (pcb->snd_queuelen >= LWIP_MIN(TCP_SND_QUEUELEN, (TCP_SNDQUEUELEN_OVERFLOW + 1))) {
  37257. 800fd2a: f8b5 3066 ldrh.w r3, [r5, #102] @ 0x66
  37258. 800fd2e: 2b0f cmp r3, #15
  37259. 800fd30: d813 bhi.n 800fd5a <tcp_write_checks+0x56>
  37260. pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN));
  37261. TCP_STATS_INC(tcp.memerr);
  37262. tcp_set_flags(pcb, TF_NAGLEMEMERR);
  37263. return ERR_MEM;
  37264. }
  37265. if (pcb->snd_queuelen != 0) {
  37266. 800fd32: b333 cbz r3, 800fd82 <tcp_write_checks+0x7e>
  37267. LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty",
  37268. 800fd34: 6f2b ldr r3, [r5, #112] @ 0x70
  37269. 800fd36: b1bb cbz r3, 800fd68 <tcp_write_checks+0x64>
  37270. pcb->unacked != NULL || pcb->unsent != NULL);
  37271. } else {
  37272. LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty",
  37273. pcb->unacked == NULL && pcb->unsent == NULL);
  37274. }
  37275. return ERR_OK;
  37276. 800fd38: 2000 movs r0, #0
  37277. 800fd3a: e036 b.n 800fdaa <tcp_write_checks+0xa6>
  37278. LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL);
  37279. 800fd3c: 4b1b ldr r3, [pc, #108] @ (800fdac <tcp_write_checks+0xa8>)
  37280. 800fd3e: f240 1233 movw r2, #307 @ 0x133
  37281. 800fd42: 491b ldr r1, [pc, #108] @ (800fdb0 <tcp_write_checks+0xac>)
  37282. 800fd44: 481b ldr r0, [pc, #108] @ (800fdb4 <tcp_write_checks+0xb0>)
  37283. 800fd46: f003 fb5f bl 8013408 <iprintf>
  37284. 800fd4a: e7df b.n 800fd0c <tcp_write_checks+0x8>
  37285. tcp_set_flags(pcb, TF_NAGLEMEMERR);
  37286. 800fd4c: 8b6b ldrh r3, [r5, #26]
  37287. 800fd4e: f043 0380 orr.w r3, r3, #128 @ 0x80
  37288. 800fd52: 836b strh r3, [r5, #26]
  37289. return ERR_MEM;
  37290. 800fd54: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  37291. 800fd58: e027 b.n 800fdaa <tcp_write_checks+0xa6>
  37292. tcp_set_flags(pcb, TF_NAGLEMEMERR);
  37293. 800fd5a: 8b6b ldrh r3, [r5, #26]
  37294. 800fd5c: f043 0380 orr.w r3, r3, #128 @ 0x80
  37295. 800fd60: 836b strh r3, [r5, #26]
  37296. return ERR_MEM;
  37297. 800fd62: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  37298. 800fd66: e020 b.n 800fdaa <tcp_write_checks+0xa6>
  37299. LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty",
  37300. 800fd68: 6eeb ldr r3, [r5, #108] @ 0x6c
  37301. 800fd6a: b10b cbz r3, 800fd70 <tcp_write_checks+0x6c>
  37302. return ERR_OK;
  37303. 800fd6c: 2000 movs r0, #0
  37304. 800fd6e: e01c b.n 800fdaa <tcp_write_checks+0xa6>
  37305. LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty",
  37306. 800fd70: 4b0e ldr r3, [pc, #56] @ (800fdac <tcp_write_checks+0xa8>)
  37307. 800fd72: f240 1255 movw r2, #341 @ 0x155
  37308. 800fd76: 4910 ldr r1, [pc, #64] @ (800fdb8 <tcp_write_checks+0xb4>)
  37309. 800fd78: 480e ldr r0, [pc, #56] @ (800fdb4 <tcp_write_checks+0xb0>)
  37310. 800fd7a: f003 fb45 bl 8013408 <iprintf>
  37311. return ERR_OK;
  37312. 800fd7e: 2000 movs r0, #0
  37313. 800fd80: e013 b.n 800fdaa <tcp_write_checks+0xa6>
  37314. LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty",
  37315. 800fd82: 6f2b ldr r3, [r5, #112] @ 0x70
  37316. 800fd84: b143 cbz r3, 800fd98 <tcp_write_checks+0x94>
  37317. 800fd86: 4b09 ldr r3, [pc, #36] @ (800fdac <tcp_write_checks+0xa8>)
  37318. 800fd88: f44f 72ac mov.w r2, #344 @ 0x158
  37319. 800fd8c: 490b ldr r1, [pc, #44] @ (800fdbc <tcp_write_checks+0xb8>)
  37320. 800fd8e: 4809 ldr r0, [pc, #36] @ (800fdb4 <tcp_write_checks+0xb0>)
  37321. 800fd90: f003 fb3a bl 8013408 <iprintf>
  37322. return ERR_OK;
  37323. 800fd94: 2000 movs r0, #0
  37324. 800fd96: e008 b.n 800fdaa <tcp_write_checks+0xa6>
  37325. LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty",
  37326. 800fd98: 6eeb ldr r3, [r5, #108] @ 0x6c
  37327. 800fd9a: 2b00 cmp r3, #0
  37328. 800fd9c: d1f3 bne.n 800fd86 <tcp_write_checks+0x82>
  37329. return ERR_OK;
  37330. 800fd9e: 2000 movs r0, #0
  37331. 800fda0: e003 b.n 800fdaa <tcp_write_checks+0xa6>
  37332. return ERR_CONN;
  37333. 800fda2: f06f 000a mvn.w r0, #10
  37334. 800fda6: e000 b.n 800fdaa <tcp_write_checks+0xa6>
  37335. return ERR_OK;
  37336. 800fda8: 2000 movs r0, #0
  37337. }
  37338. 800fdaa: bd38 pop {r3, r4, r5, pc}
  37339. 800fdac: 080170ec .word 0x080170ec
  37340. 800fdb0: 08017150 .word 0x08017150
  37341. 800fdb4: 080144e8 .word 0x080144e8
  37342. 800fdb8: 08017170 .word 0x08017170
  37343. 800fdbc: 080171ac .word 0x080171ac
  37344. 0800fdc0 <tcp_output_segment_busy>:
  37345. * @arg seg the tcp segment to check
  37346. * @return 1 if ref != 1, 0 if ref == 1
  37347. */
  37348. static int
  37349. tcp_output_segment_busy(const struct tcp_seg *seg)
  37350. {
  37351. 800fdc0: b510 push {r4, lr}
  37352. LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL);
  37353. 800fdc2: 4604 mov r4, r0
  37354. 800fdc4: b128 cbz r0, 800fdd2 <tcp_output_segment_busy+0x12>
  37355. /* We only need to check the first pbuf here:
  37356. If a pbuf is queued for transmission, a driver calls pbuf_ref(),
  37357. which only changes the ref count of the first pbuf */
  37358. if (seg->p->ref != 1) {
  37359. 800fdc6: 6863 ldr r3, [r4, #4]
  37360. 800fdc8: 7b9b ldrb r3, [r3, #14]
  37361. 800fdca: 2b01 cmp r3, #1
  37362. 800fdcc: d109 bne.n 800fde2 <tcp_output_segment_busy+0x22>
  37363. /* other reference found */
  37364. return 1;
  37365. }
  37366. /* no other references found */
  37367. return 0;
  37368. 800fdce: 2000 movs r0, #0
  37369. }
  37370. 800fdd0: bd10 pop {r4, pc}
  37371. LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL);
  37372. 800fdd2: 4b05 ldr r3, [pc, #20] @ (800fde8 <tcp_output_segment_busy+0x28>)
  37373. 800fdd4: f240 529a movw r2, #1434 @ 0x59a
  37374. 800fdd8: 4904 ldr r1, [pc, #16] @ (800fdec <tcp_output_segment_busy+0x2c>)
  37375. 800fdda: 4805 ldr r0, [pc, #20] @ (800fdf0 <tcp_output_segment_busy+0x30>)
  37376. 800fddc: f003 fb14 bl 8013408 <iprintf>
  37377. 800fde0: e7f1 b.n 800fdc6 <tcp_output_segment_busy+0x6>
  37378. return 1;
  37379. 800fde2: 2001 movs r0, #1
  37380. 800fde4: e7f4 b.n 800fdd0 <tcp_output_segment_busy+0x10>
  37381. 800fde6: bf00 nop
  37382. 800fde8: 080170ec .word 0x080170ec
  37383. 800fdec: 080171e0 .word 0x080171e0
  37384. 800fdf0: 080144e8 .word 0x080144e8
  37385. 0800fdf4 <tcp_output_fill_options>:
  37386. }
  37387. /* Fill in options for control segments */
  37388. static void
  37389. tcp_output_fill_options(const struct tcp_pcb *pcb, struct pbuf *p, u8_t optflags, u8_t num_sacks)
  37390. {
  37391. 800fdf4: b538 push {r3, r4, r5, lr}
  37392. 800fdf6: 4614 mov r4, r2
  37393. struct tcp_hdr *tcphdr;
  37394. u32_t *opts;
  37395. u16_t sacks_len = 0;
  37396. LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL);
  37397. 800fdf8: 460d mov r5, r1
  37398. 800fdfa: b189 cbz r1, 800fe20 <tcp_output_fill_options+0x2c>
  37399. tcphdr = (struct tcp_hdr *)p->payload;
  37400. 800fdfc: 686b ldr r3, [r5, #4]
  37401. opts = (u32_t *)(void *)(tcphdr + 1);
  37402. 800fdfe: f103 0214 add.w r2, r3, #20
  37403. opts = LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(p, tcphdr, pcb, opts);
  37404. #endif
  37405. LWIP_UNUSED_ARG(pcb);
  37406. LWIP_UNUSED_ARG(sacks_len);
  37407. LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(tcphdr + 1)) + sacks_len * 4 + LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb));
  37408. 800fe02: 00a4 lsls r4, r4, #2
  37409. 800fe04: f004 0404 and.w r4, r4, #4
  37410. 800fe08: 3414 adds r4, #20
  37411. 800fe0a: 4423 add r3, r4
  37412. 800fe0c: 4293 cmp r3, r2
  37413. 800fe0e: d006 beq.n 800fe1e <tcp_output_fill_options+0x2a>
  37414. 800fe10: 4b07 ldr r3, [pc, #28] @ (800fe30 <tcp_output_fill_options+0x3c>)
  37415. 800fe12: f240 7275 movw r2, #1909 @ 0x775
  37416. 800fe16: 4907 ldr r1, [pc, #28] @ (800fe34 <tcp_output_fill_options+0x40>)
  37417. 800fe18: 4807 ldr r0, [pc, #28] @ (800fe38 <tcp_output_fill_options+0x44>)
  37418. 800fe1a: f003 faf5 bl 8013408 <iprintf>
  37419. LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */
  37420. LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */
  37421. }
  37422. 800fe1e: bd38 pop {r3, r4, r5, pc}
  37423. LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL);
  37424. 800fe20: 4b03 ldr r3, [pc, #12] @ (800fe30 <tcp_output_fill_options+0x3c>)
  37425. 800fe22: f240 7256 movw r2, #1878 @ 0x756
  37426. 800fe26: 4905 ldr r1, [pc, #20] @ (800fe3c <tcp_output_fill_options+0x48>)
  37427. 800fe28: 4803 ldr r0, [pc, #12] @ (800fe38 <tcp_output_fill_options+0x44>)
  37428. 800fe2a: f003 faed bl 8013408 <iprintf>
  37429. 800fe2e: e7e5 b.n 800fdfc <tcp_output_fill_options+0x8>
  37430. 800fe30: 080170ec .word 0x080170ec
  37431. 800fe34: 08017230 .word 0x08017230
  37432. 800fe38: 080144e8 .word 0x080144e8
  37433. 800fe3c: 08017208 .word 0x08017208
  37434. 0800fe40 <tcp_pbuf_prealloc>:
  37435. {
  37436. 800fe40: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  37437. 800fe44: 4606 mov r6, r0
  37438. 800fe46: 460c mov r4, r1
  37439. 800fe48: 4615 mov r5, r2
  37440. 800fe4a: 9f08 ldr r7, [sp, #32]
  37441. 800fe4c: f89d 9028 ldrb.w r9, [sp, #40] @ 0x28
  37442. LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL);
  37443. 800fe50: 4698 mov r8, r3
  37444. 800fe52: b1cb cbz r3, 800fe88 <tcp_pbuf_prealloc+0x48>
  37445. LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL);
  37446. 800fe54: b1ff cbz r7, 800fe96 <tcp_pbuf_prealloc+0x56>
  37447. if (length < max_length) {
  37448. 800fe56: 42ac cmp r4, r5
  37449. 800fe58: d229 bcs.n 800feae <tcp_pbuf_prealloc+0x6e>
  37450. if ((apiflags & TCP_WRITE_FLAG_MORE) ||
  37451. 800fe5a: f89d 3024 ldrb.w r3, [sp, #36] @ 0x24
  37452. 800fe5e: f013 0f02 tst.w r3, #2
  37453. 800fe62: d108 bne.n 800fe76 <tcp_pbuf_prealloc+0x36>
  37454. (!(pcb->flags & TF_NODELAY) &&
  37455. 800fe64: 8b7b ldrh r3, [r7, #26]
  37456. if ((apiflags & TCP_WRITE_FLAG_MORE) ||
  37457. 800fe66: f013 0f40 tst.w r3, #64 @ 0x40
  37458. 800fe6a: d13a bne.n 800fee2 <tcp_pbuf_prealloc+0xa2>
  37459. (!(pcb->flags & TF_NODELAY) &&
  37460. 800fe6c: f1b9 0f00 cmp.w r9, #0
  37461. 800fe70: d001 beq.n 800fe76 <tcp_pbuf_prealloc+0x36>
  37462. pcb->unsent != NULL ||
  37463. 800fe72: 6efb ldr r3, [r7, #108] @ 0x6c
  37464. (!first_seg ||
  37465. 800fe74: b1b3 cbz r3, 800fea4 <tcp_pbuf_prealloc+0x64>
  37466. alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length)));
  37467. 800fe76: f204 53b7 addw r3, r4, #1463 @ 0x5b7
  37468. 800fe7a: f023 0303 bic.w r3, r3, #3
  37469. 800fe7e: 429d cmp r5, r3
  37470. 800fe80: bf28 it cs
  37471. 800fe82: 461d movcs r5, r3
  37472. 800fe84: b2a9 uxth r1, r5
  37473. 800fe86: e013 b.n 800feb0 <tcp_pbuf_prealloc+0x70>
  37474. LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL);
  37475. 800fe88: 4b17 ldr r3, [pc, #92] @ (800fee8 <tcp_pbuf_prealloc+0xa8>)
  37476. 800fe8a: 22e8 movs r2, #232 @ 0xe8
  37477. 800fe8c: 4917 ldr r1, [pc, #92] @ (800feec <tcp_pbuf_prealloc+0xac>)
  37478. 800fe8e: 4818 ldr r0, [pc, #96] @ (800fef0 <tcp_pbuf_prealloc+0xb0>)
  37479. 800fe90: f003 faba bl 8013408 <iprintf>
  37480. 800fe94: e7de b.n 800fe54 <tcp_pbuf_prealloc+0x14>
  37481. LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL);
  37482. 800fe96: 4b14 ldr r3, [pc, #80] @ (800fee8 <tcp_pbuf_prealloc+0xa8>)
  37483. 800fe98: 22e9 movs r2, #233 @ 0xe9
  37484. 800fe9a: 4916 ldr r1, [pc, #88] @ (800fef4 <tcp_pbuf_prealloc+0xb4>)
  37485. 800fe9c: 4814 ldr r0, [pc, #80] @ (800fef0 <tcp_pbuf_prealloc+0xb0>)
  37486. 800fe9e: f003 fab3 bl 8013408 <iprintf>
  37487. 800fea2: e7d8 b.n 800fe56 <tcp_pbuf_prealloc+0x16>
  37488. pcb->unacked != NULL))) {
  37489. 800fea4: 6f3b ldr r3, [r7, #112] @ 0x70
  37490. pcb->unsent != NULL ||
  37491. 800fea6: 2b00 cmp r3, #0
  37492. 800fea8: d1e5 bne.n 800fe76 <tcp_pbuf_prealloc+0x36>
  37493. u16_t alloc = length;
  37494. 800feaa: 4621 mov r1, r4
  37495. 800feac: e000 b.n 800feb0 <tcp_pbuf_prealloc+0x70>
  37496. 800feae: 4621 mov r1, r4
  37497. p = pbuf_alloc(layer, alloc, PBUF_RAM);
  37498. 800feb0: f44f 7220 mov.w r2, #640 @ 0x280
  37499. 800feb4: 4630 mov r0, r6
  37500. 800feb6: f7fb ffdb bl 800be70 <pbuf_alloc>
  37501. if (p == NULL) {
  37502. 800feba: 4605 mov r5, r0
  37503. 800febc: b170 cbz r0, 800fedc <tcp_pbuf_prealloc+0x9c>
  37504. LWIP_ASSERT("need unchained pbuf", p->next == NULL);
  37505. 800febe: 6803 ldr r3, [r0, #0]
  37506. 800fec0: b133 cbz r3, 800fed0 <tcp_pbuf_prealloc+0x90>
  37507. 800fec2: 4b09 ldr r3, [pc, #36] @ (800fee8 <tcp_pbuf_prealloc+0xa8>)
  37508. 800fec4: f240 120b movw r2, #267 @ 0x10b
  37509. 800fec8: 490b ldr r1, [pc, #44] @ (800fef8 <tcp_pbuf_prealloc+0xb8>)
  37510. 800feca: 4809 ldr r0, [pc, #36] @ (800fef0 <tcp_pbuf_prealloc+0xb0>)
  37511. 800fecc: f003 fa9c bl 8013408 <iprintf>
  37512. *oversize = p->len - length;
  37513. 800fed0: 896b ldrh r3, [r5, #10]
  37514. 800fed2: 1b1b subs r3, r3, r4
  37515. 800fed4: f8a8 3000 strh.w r3, [r8]
  37516. p->len = p->tot_len = length;
  37517. 800fed8: 812c strh r4, [r5, #8]
  37518. 800feda: 816c strh r4, [r5, #10]
  37519. }
  37520. 800fedc: 4628 mov r0, r5
  37521. 800fede: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  37522. u16_t alloc = length;
  37523. 800fee2: 4621 mov r1, r4
  37524. 800fee4: e7e4 b.n 800feb0 <tcp_pbuf_prealloc+0x70>
  37525. 800fee6: bf00 nop
  37526. 800fee8: 080170ec .word 0x080170ec
  37527. 800feec: 08017244 .word 0x08017244
  37528. 800fef0: 080144e8 .word 0x080144e8
  37529. 800fef4: 08017268 .word 0x08017268
  37530. 800fef8: 08017288 .word 0x08017288
  37531. 0800fefc <tcp_create_segment>:
  37532. {
  37533. 800fefc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  37534. 800ff00: 460e mov r6, r1
  37535. 800ff02: 4617 mov r7, r2
  37536. 800ff04: 4698 mov r8, r3
  37537. 800ff06: f89d a020 ldrb.w sl, [sp, #32]
  37538. LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL);
  37539. 800ff0a: 4681 mov r9, r0
  37540. 800ff0c: 2800 cmp r0, #0
  37541. 800ff0e: d040 beq.n 800ff92 <tcp_create_segment+0x96>
  37542. LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL);
  37543. 800ff10: 2e00 cmp r6, #0
  37544. 800ff12: d045 beq.n 800ffa0 <tcp_create_segment+0xa4>
  37545. optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
  37546. 800ff14: ea4f 058a mov.w r5, sl, lsl #2
  37547. 800ff18: f005 0504 and.w r5, r5, #4
  37548. if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) {
  37549. 800ff1c: 2003 movs r0, #3
  37550. 800ff1e: f7fb fb71 bl 800b604 <memp_malloc>
  37551. 800ff22: 4604 mov r4, r0
  37552. 800ff24: 2800 cmp r0, #0
  37553. 800ff26: d042 beq.n 800ffae <tcp_create_segment+0xb2>
  37554. seg->flags = optflags;
  37555. 800ff28: f880 a00c strb.w sl, [r0, #12]
  37556. seg->next = NULL;
  37557. 800ff2c: 2300 movs r3, #0
  37558. 800ff2e: 6003 str r3, [r0, #0]
  37559. seg->p = p;
  37560. 800ff30: 6046 str r6, [r0, #4]
  37561. LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
  37562. 800ff32: 8933 ldrh r3, [r6, #8]
  37563. 800ff34: 42ab cmp r3, r5
  37564. 800ff36: d33e bcc.n 800ffb6 <tcp_create_segment+0xba>
  37565. seg->len = p->tot_len - optlen;
  37566. 800ff38: 8931 ldrh r1, [r6, #8]
  37567. 800ff3a: 1b49 subs r1, r1, r5
  37568. 800ff3c: 8121 strh r1, [r4, #8]
  37569. seg->oversize_left = 0;
  37570. 800ff3e: 2300 movs r3, #0
  37571. 800ff40: 8163 strh r3, [r4, #10]
  37572. if (pbuf_add_header(p, TCP_HLEN)) {
  37573. 800ff42: 2114 movs r1, #20
  37574. 800ff44: 4630 mov r0, r6
  37575. 800ff46: f7fb fee0 bl 800bd0a <pbuf_add_header>
  37576. 800ff4a: 2800 cmp r0, #0
  37577. 800ff4c: d13a bne.n 800ffc4 <tcp_create_segment+0xc8>
  37578. seg->tcphdr = (struct tcp_hdr *)seg->p->payload;
  37579. 800ff4e: 6863 ldr r3, [r4, #4]
  37580. 800ff50: 685e ldr r6, [r3, #4]
  37581. 800ff52: 6126 str r6, [r4, #16]
  37582. seg->tcphdr->src = lwip_htons(pcb->local_port);
  37583. 800ff54: f8b9 0016 ldrh.w r0, [r9, #22]
  37584. 800ff58: f7f7 ff90 bl 8007e7c <lwip_htons>
  37585. 800ff5c: 8030 strh r0, [r6, #0]
  37586. seg->tcphdr->dest = lwip_htons(pcb->remote_port);
  37587. 800ff5e: 6926 ldr r6, [r4, #16]
  37588. 800ff60: f8b9 0018 ldrh.w r0, [r9, #24]
  37589. 800ff64: f7f7 ff8a bl 8007e7c <lwip_htons>
  37590. 800ff68: 8070 strh r0, [r6, #2]
  37591. seg->tcphdr->seqno = lwip_htonl(seqno);
  37592. 800ff6a: 6926 ldr r6, [r4, #16]
  37593. 800ff6c: 4640 mov r0, r8
  37594. 800ff6e: f7f7 ff8a bl 8007e86 <lwip_htonl>
  37595. 800ff72: 6070 str r0, [r6, #4]
  37596. TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags);
  37597. 800ff74: 08a8 lsrs r0, r5, #2
  37598. 800ff76: 3005 adds r0, #5
  37599. 800ff78: 6925 ldr r5, [r4, #16]
  37600. 800ff7a: ea47 3000 orr.w r0, r7, r0, lsl #12
  37601. 800ff7e: f7f7 ff7d bl 8007e7c <lwip_htons>
  37602. 800ff82: 81a8 strh r0, [r5, #12]
  37603. seg->tcphdr->urgp = 0;
  37604. 800ff84: 6923 ldr r3, [r4, #16]
  37605. 800ff86: 2200 movs r2, #0
  37606. 800ff88: 749a strb r2, [r3, #18]
  37607. 800ff8a: 74da strb r2, [r3, #19]
  37608. }
  37609. 800ff8c: 4620 mov r0, r4
  37610. 800ff8e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  37611. LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL);
  37612. 800ff92: 4b0f ldr r3, [pc, #60] @ (800ffd0 <tcp_create_segment+0xd4>)
  37613. 800ff94: 22a3 movs r2, #163 @ 0xa3
  37614. 800ff96: 490f ldr r1, [pc, #60] @ (800ffd4 <tcp_create_segment+0xd8>)
  37615. 800ff98: 480f ldr r0, [pc, #60] @ (800ffd8 <tcp_create_segment+0xdc>)
  37616. 800ff9a: f003 fa35 bl 8013408 <iprintf>
  37617. 800ff9e: e7b7 b.n 800ff10 <tcp_create_segment+0x14>
  37618. LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL);
  37619. 800ffa0: 4b0b ldr r3, [pc, #44] @ (800ffd0 <tcp_create_segment+0xd4>)
  37620. 800ffa2: 22a4 movs r2, #164 @ 0xa4
  37621. 800ffa4: 490d ldr r1, [pc, #52] @ (800ffdc <tcp_create_segment+0xe0>)
  37622. 800ffa6: 480c ldr r0, [pc, #48] @ (800ffd8 <tcp_create_segment+0xdc>)
  37623. 800ffa8: f003 fa2e bl 8013408 <iprintf>
  37624. 800ffac: e7b2 b.n 800ff14 <tcp_create_segment+0x18>
  37625. pbuf_free(p);
  37626. 800ffae: 4630 mov r0, r6
  37627. 800ffb0: f7fb fef6 bl 800bda0 <pbuf_free>
  37628. return NULL;
  37629. 800ffb4: e7ea b.n 800ff8c <tcp_create_segment+0x90>
  37630. LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen);
  37631. 800ffb6: 4b06 ldr r3, [pc, #24] @ (800ffd0 <tcp_create_segment+0xd4>)
  37632. 800ffb8: 22b0 movs r2, #176 @ 0xb0
  37633. 800ffba: 4909 ldr r1, [pc, #36] @ (800ffe0 <tcp_create_segment+0xe4>)
  37634. 800ffbc: 4806 ldr r0, [pc, #24] @ (800ffd8 <tcp_create_segment+0xdc>)
  37635. 800ffbe: f003 fa23 bl 8013408 <iprintf>
  37636. 800ffc2: e7b9 b.n 800ff38 <tcp_create_segment+0x3c>
  37637. tcp_seg_free(seg);
  37638. 800ffc4: 4620 mov r0, r4
  37639. 800ffc6: f7fd f9f1 bl 800d3ac <tcp_seg_free>
  37640. return NULL;
  37641. 800ffca: 2400 movs r4, #0
  37642. 800ffcc: e7de b.n 800ff8c <tcp_create_segment+0x90>
  37643. 800ffce: bf00 nop
  37644. 800ffd0: 080170ec .word 0x080170ec
  37645. 800ffd4: 0801729c .word 0x0801729c
  37646. 800ffd8: 080144e8 .word 0x080144e8
  37647. 800ffdc: 080172bc .word 0x080172bc
  37648. 800ffe0: 080172e0 .word 0x080172e0
  37649. 0800ffe4 <tcp_output_alloc_header_common>:
  37650. {
  37651. 800ffe4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  37652. 800ffe8: 4606 mov r6, r0
  37653. 800ffea: 460c mov r4, r1
  37654. 800ffec: 4698 mov r8, r3
  37655. p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM);
  37656. 800ffee: 4411 add r1, r2
  37657. 800fff0: b289 uxth r1, r1
  37658. 800fff2: 3114 adds r1, #20
  37659. 800fff4: f44f 7220 mov.w r2, #640 @ 0x280
  37660. 800fff8: b289 uxth r1, r1
  37661. 800fffa: 2022 movs r0, #34 @ 0x22
  37662. 800fffc: f7fb ff38 bl 800be70 <pbuf_alloc>
  37663. if (p != NULL) {
  37664. 8010000: 4607 mov r7, r0
  37665. 8010002: b348 cbz r0, 8010058 <tcp_output_alloc_header_common+0x74>
  37666. LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
  37667. 8010004: f104 0313 add.w r3, r4, #19
  37668. 8010008: 8942 ldrh r2, [r0, #10]
  37669. 801000a: 4293 cmp r3, r2
  37670. 801000c: da27 bge.n 801005e <tcp_output_alloc_header_common+0x7a>
  37671. tcphdr = (struct tcp_hdr *)p->payload;
  37672. 801000e: 687d ldr r5, [r7, #4]
  37673. tcphdr->src = lwip_htons(src_port);
  37674. 8010010: f8bd 0018 ldrh.w r0, [sp, #24]
  37675. 8010014: f7f7 ff32 bl 8007e7c <lwip_htons>
  37676. 8010018: 8028 strh r0, [r5, #0]
  37677. tcphdr->dest = lwip_htons(dst_port);
  37678. 801001a: f8bd 001c ldrh.w r0, [sp, #28]
  37679. 801001e: f7f7 ff2d bl 8007e7c <lwip_htons>
  37680. 8010022: 8068 strh r0, [r5, #2]
  37681. tcphdr->seqno = seqno_be;
  37682. 8010024: f8c5 8004 str.w r8, [r5, #4]
  37683. tcphdr->ackno = lwip_htonl(ackno);
  37684. 8010028: 4630 mov r0, r6
  37685. 801002a: f7f7 ff2c bl 8007e86 <lwip_htonl>
  37686. 801002e: 60a8 str r0, [r5, #8]
  37687. TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags);
  37688. 8010030: 08a4 lsrs r4, r4, #2
  37689. 8010032: 3405 adds r4, #5
  37690. 8010034: 0324 lsls r4, r4, #12
  37691. 8010036: b2a4 uxth r4, r4
  37692. 8010038: f89d 0020 ldrb.w r0, [sp, #32]
  37693. 801003c: 4320 orrs r0, r4
  37694. 801003e: f7f7 ff1d bl 8007e7c <lwip_htons>
  37695. 8010042: 81a8 strh r0, [r5, #12]
  37696. tcphdr->wnd = lwip_htons(wnd);
  37697. 8010044: f8bd 0024 ldrh.w r0, [sp, #36] @ 0x24
  37698. 8010048: f7f7 ff18 bl 8007e7c <lwip_htons>
  37699. 801004c: 81e8 strh r0, [r5, #14]
  37700. tcphdr->chksum = 0;
  37701. 801004e: 2300 movs r3, #0
  37702. 8010050: 742b strb r3, [r5, #16]
  37703. 8010052: 746b strb r3, [r5, #17]
  37704. tcphdr->urgp = 0;
  37705. 8010054: 74ab strb r3, [r5, #18]
  37706. 8010056: 74eb strb r3, [r5, #19]
  37707. }
  37708. 8010058: 4638 mov r0, r7
  37709. 801005a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  37710. LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr",
  37711. 801005e: 4b04 ldr r3, [pc, #16] @ (8010070 <tcp_output_alloc_header_common+0x8c>)
  37712. 8010060: f240 7223 movw r2, #1827 @ 0x723
  37713. 8010064: 4903 ldr r1, [pc, #12] @ (8010074 <tcp_output_alloc_header_common+0x90>)
  37714. 8010066: 4804 ldr r0, [pc, #16] @ (8010078 <tcp_output_alloc_header_common+0x94>)
  37715. 8010068: f003 f9ce bl 8013408 <iprintf>
  37716. 801006c: e7cf b.n 801000e <tcp_output_alloc_header_common+0x2a>
  37717. 801006e: bf00 nop
  37718. 8010070: 080170ec .word 0x080170ec
  37719. 8010074: 080172f8 .word 0x080172f8
  37720. 8010078: 080144e8 .word 0x080144e8
  37721. 0801007c <tcp_output_alloc_header>:
  37722. {
  37723. 801007c: b5f0 push {r4, r5, r6, r7, lr}
  37724. 801007e: b085 sub sp, #20
  37725. 8010080: 460d mov r5, r1
  37726. 8010082: 4616 mov r6, r2
  37727. 8010084: 461f mov r7, r3
  37728. LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL);
  37729. 8010086: 4604 mov r4, r0
  37730. 8010088: b1a0 cbz r0, 80100b4 <tcp_output_alloc_header+0x38>
  37731. p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen,
  37732. 801008a: 8d63 ldrh r3, [r4, #42] @ 0x2a
  37733. 801008c: 9303 str r3, [sp, #12]
  37734. 801008e: 2310 movs r3, #16
  37735. 8010090: 9302 str r3, [sp, #8]
  37736. 8010092: 8b23 ldrh r3, [r4, #24]
  37737. 8010094: 9301 str r3, [sp, #4]
  37738. 8010096: 8ae3 ldrh r3, [r4, #22]
  37739. 8010098: 9300 str r3, [sp, #0]
  37740. 801009a: 463b mov r3, r7
  37741. 801009c: 4632 mov r2, r6
  37742. 801009e: 4629 mov r1, r5
  37743. 80100a0: 6a60 ldr r0, [r4, #36] @ 0x24
  37744. 80100a2: f7ff ff9f bl 800ffe4 <tcp_output_alloc_header_common>
  37745. if (p != NULL) {
  37746. 80100a6: b118 cbz r0, 80100b0 <tcp_output_alloc_header+0x34>
  37747. pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
  37748. 80100a8: 6a63 ldr r3, [r4, #36] @ 0x24
  37749. 80100aa: 8d62 ldrh r2, [r4, #42] @ 0x2a
  37750. 80100ac: 4413 add r3, r2
  37751. 80100ae: 62e3 str r3, [r4, #44] @ 0x2c
  37752. }
  37753. 80100b0: b005 add sp, #20
  37754. 80100b2: bdf0 pop {r4, r5, r6, r7, pc}
  37755. LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL);
  37756. 80100b4: 4b03 ldr r3, [pc, #12] @ (80100c4 <tcp_output_alloc_header+0x48>)
  37757. 80100b6: f240 7242 movw r2, #1858 @ 0x742
  37758. 80100ba: 4903 ldr r1, [pc, #12] @ (80100c8 <tcp_output_alloc_header+0x4c>)
  37759. 80100bc: 4803 ldr r0, [pc, #12] @ (80100cc <tcp_output_alloc_header+0x50>)
  37760. 80100be: f003 f9a3 bl 8013408 <iprintf>
  37761. 80100c2: e7e2 b.n 801008a <tcp_output_alloc_header+0xe>
  37762. 80100c4: 080170ec .word 0x080170ec
  37763. 80100c8: 08017328 .word 0x08017328
  37764. 80100cc: 080144e8 .word 0x080144e8
  37765. 080100d0 <tcp_route>:
  37766. {
  37767. 80100d0: b508 push {r3, lr}
  37768. if ((pcb != NULL) && (pcb->netif_idx != NETIF_NO_INDEX)) {
  37769. 80100d2: b108 cbz r0, 80100d8 <tcp_route+0x8>
  37770. 80100d4: 7a00 ldrb r0, [r0, #8]
  37771. 80100d6: b918 cbnz r0, 80100e0 <tcp_route+0x10>
  37772. return ip_route(src, dst);
  37773. 80100d8: 4610 mov r0, r2
  37774. 80100da: f7fa f811 bl 800a100 <ip4_route>
  37775. }
  37776. 80100de: bd08 pop {r3, pc}
  37777. return netif_get_by_index(pcb->netif_idx);
  37778. 80100e0: f7fb fd2e bl 800bb40 <netif_get_by_index>
  37779. 80100e4: e7fb b.n 80100de <tcp_route+0xe>
  37780. ...
  37781. 080100e8 <tcp_output_segment>:
  37782. {
  37783. 80100e8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  37784. 80100ec: b084 sub sp, #16
  37785. 80100ee: 460c mov r4, r1
  37786. 80100f0: 4616 mov r6, r2
  37787. LWIP_ASSERT("tcp_output_segment: invalid seg", seg != NULL);
  37788. 80100f2: 4605 mov r5, r0
  37789. 80100f4: b148 cbz r0, 801010a <tcp_output_segment+0x22>
  37790. LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL);
  37791. 80100f6: b184 cbz r4, 801011a <tcp_output_segment+0x32>
  37792. LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL);
  37793. 80100f8: b1be cbz r6, 801012a <tcp_output_segment+0x42>
  37794. if (tcp_output_segment_busy(seg)) {
  37795. 80100fa: 4628 mov r0, r5
  37796. 80100fc: f7ff fe60 bl 800fdc0 <tcp_output_segment_busy>
  37797. 8010100: b1d8 cbz r0, 801013a <tcp_output_segment+0x52>
  37798. return ERR_OK;
  37799. 8010102: 2000 movs r0, #0
  37800. }
  37801. 8010104: b004 add sp, #16
  37802. 8010106: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  37803. LWIP_ASSERT("tcp_output_segment: invalid seg", seg != NULL);
  37804. 801010a: 4b40 ldr r3, [pc, #256] @ (801020c <tcp_output_segment+0x124>)
  37805. 801010c: f44f 62b7 mov.w r2, #1464 @ 0x5b8
  37806. 8010110: 493f ldr r1, [pc, #252] @ (8010210 <tcp_output_segment+0x128>)
  37807. 8010112: 4840 ldr r0, [pc, #256] @ (8010214 <tcp_output_segment+0x12c>)
  37808. 8010114: f003 f978 bl 8013408 <iprintf>
  37809. 8010118: e7ed b.n 80100f6 <tcp_output_segment+0xe>
  37810. LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL);
  37811. 801011a: 4b3c ldr r3, [pc, #240] @ (801020c <tcp_output_segment+0x124>)
  37812. 801011c: f240 52b9 movw r2, #1465 @ 0x5b9
  37813. 8010120: 493d ldr r1, [pc, #244] @ (8010218 <tcp_output_segment+0x130>)
  37814. 8010122: 483c ldr r0, [pc, #240] @ (8010214 <tcp_output_segment+0x12c>)
  37815. 8010124: f003 f970 bl 8013408 <iprintf>
  37816. 8010128: e7e6 b.n 80100f8 <tcp_output_segment+0x10>
  37817. LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL);
  37818. 801012a: 4b38 ldr r3, [pc, #224] @ (801020c <tcp_output_segment+0x124>)
  37819. 801012c: f240 52ba movw r2, #1466 @ 0x5ba
  37820. 8010130: 493a ldr r1, [pc, #232] @ (801021c <tcp_output_segment+0x134>)
  37821. 8010132: 4838 ldr r0, [pc, #224] @ (8010214 <tcp_output_segment+0x12c>)
  37822. 8010134: f003 f968 bl 8013408 <iprintf>
  37823. 8010138: e7df b.n 80100fa <tcp_output_segment+0x12>
  37824. seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt);
  37825. 801013a: 692f ldr r7, [r5, #16]
  37826. 801013c: 6a60 ldr r0, [r4, #36] @ 0x24
  37827. 801013e: f7f7 fea2 bl 8007e86 <lwip_htonl>
  37828. 8010142: 60b8 str r0, [r7, #8]
  37829. seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd)));
  37830. 8010144: 692f ldr r7, [r5, #16]
  37831. 8010146: 8d60 ldrh r0, [r4, #42] @ 0x2a
  37832. 8010148: f7f7 fe98 bl 8007e7c <lwip_htons>
  37833. 801014c: 81f8 strh r0, [r7, #14]
  37834. pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd;
  37835. 801014e: 6a63 ldr r3, [r4, #36] @ 0x24
  37836. 8010150: 8d62 ldrh r2, [r4, #42] @ 0x2a
  37837. 8010152: 4413 add r3, r2
  37838. 8010154: 62e3 str r3, [r4, #44] @ 0x2c
  37839. opts = (u32_t *)(void *)(seg->tcphdr + 1);
  37840. 8010156: f8d5 8010 ldr.w r8, [r5, #16]
  37841. 801015a: f108 0714 add.w r7, r8, #20
  37842. if (seg->flags & TF_SEG_OPTS_MSS) {
  37843. 801015e: 7b2b ldrb r3, [r5, #12]
  37844. 8010160: f013 0f01 tst.w r3, #1
  37845. 8010164: d134 bne.n 80101d0 <tcp_output_segment+0xe8>
  37846. if (pcb->rtime < 0) {
  37847. 8010166: f9b4 3030 ldrsh.w r3, [r4, #48] @ 0x30
  37848. 801016a: 2b00 cmp r3, #0
  37849. 801016c: db3f blt.n 80101ee <tcp_output_segment+0x106>
  37850. if (pcb->rttest == 0) {
  37851. 801016e: 6b63 ldr r3, [r4, #52] @ 0x34
  37852. 8010170: 2b00 cmp r3, #0
  37853. 8010172: d03f beq.n 80101f4 <tcp_output_segment+0x10c>
  37854. len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload);
  37855. 8010174: 692b ldr r3, [r5, #16]
  37856. 8010176: 686a ldr r2, [r5, #4]
  37857. 8010178: 6851 ldr r1, [r2, #4]
  37858. 801017a: 1a5b subs r3, r3, r1
  37859. 801017c: b29b uxth r3, r3
  37860. seg->p->len -= len;
  37861. 801017e: 8951 ldrh r1, [r2, #10]
  37862. 8010180: 1ac9 subs r1, r1, r3
  37863. 8010182: 8151 strh r1, [r2, #10]
  37864. seg->p->tot_len -= len;
  37865. 8010184: 6869 ldr r1, [r5, #4]
  37866. 8010186: 890a ldrh r2, [r1, #8]
  37867. 8010188: 1ad3 subs r3, r2, r3
  37868. 801018a: 810b strh r3, [r1, #8]
  37869. seg->p->payload = seg->tcphdr;
  37870. 801018c: 686a ldr r2, [r5, #4]
  37871. 801018e: 692b ldr r3, [r5, #16]
  37872. 8010190: 6053 str r3, [r2, #4]
  37873. seg->tcphdr->chksum = 0;
  37874. 8010192: 2200 movs r2, #0
  37875. 8010194: 741a strb r2, [r3, #16]
  37876. 8010196: 745a strb r2, [r3, #17]
  37877. LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(seg->tcphdr + 1)) + LWIP_TCP_OPT_LENGTH_SEGMENT(seg->flags, pcb));
  37878. 8010198: 692b ldr r3, [r5, #16]
  37879. 801019a: 7b2a ldrb r2, [r5, #12]
  37880. 801019c: f012 0f01 tst.w r2, #1
  37881. 80101a0: d031 beq.n 8010206 <tcp_output_segment+0x11e>
  37882. 80101a2: 2218 movs r2, #24
  37883. 80101a4: 4413 add r3, r2
  37884. 80101a6: 429f cmp r7, r3
  37885. 80101a8: d006 beq.n 80101b8 <tcp_output_segment+0xd0>
  37886. 80101aa: 4b18 ldr r3, [pc, #96] @ (801020c <tcp_output_segment+0x124>)
  37887. 80101ac: f240 621c movw r2, #1564 @ 0x61c
  37888. 80101b0: 491b ldr r1, [pc, #108] @ (8010220 <tcp_output_segment+0x138>)
  37889. 80101b2: 4818 ldr r0, [pc, #96] @ (8010214 <tcp_output_segment+0x12c>)
  37890. 80101b4: f003 f928 bl 8013408 <iprintf>
  37891. err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl,
  37892. 80101b8: 9602 str r6, [sp, #8]
  37893. 80101ba: 2306 movs r3, #6
  37894. 80101bc: 9301 str r3, [sp, #4]
  37895. 80101be: 7aa3 ldrb r3, [r4, #10]
  37896. 80101c0: 9300 str r3, [sp, #0]
  37897. 80101c2: 7ae3 ldrb r3, [r4, #11]
  37898. 80101c4: 1d22 adds r2, r4, #4
  37899. 80101c6: 4621 mov r1, r4
  37900. 80101c8: 6868 ldr r0, [r5, #4]
  37901. 80101ca: f7fa f92d bl 800a428 <ip4_output_if>
  37902. return err;
  37903. 80101ce: e799 b.n 8010104 <tcp_output_segment+0x1c>
  37904. mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip);
  37905. 80101d0: 1d22 adds r2, r4, #4
  37906. 80101d2: 4631 mov r1, r6
  37907. 80101d4: f240 50b4 movw r0, #1460 @ 0x5b4
  37908. 80101d8: f7fd f9ca bl 800d570 <tcp_eff_send_mss_netif>
  37909. *opts = TCP_BUILD_MSS_OPTION(mss);
  37910. 80101dc: f040 7001 orr.w r0, r0, #33816576 @ 0x2040000
  37911. 80101e0: f7f7 fe51 bl 8007e86 <lwip_htonl>
  37912. 80101e4: f8c8 0014 str.w r0, [r8, #20]
  37913. opts += 1;
  37914. 80101e8: f108 0718 add.w r7, r8, #24
  37915. 80101ec: e7bb b.n 8010166 <tcp_output_segment+0x7e>
  37916. pcb->rtime = 0;
  37917. 80101ee: 2300 movs r3, #0
  37918. 80101f0: 8623 strh r3, [r4, #48] @ 0x30
  37919. 80101f2: e7bc b.n 801016e <tcp_output_segment+0x86>
  37920. pcb->rttest = tcp_ticks;
  37921. 80101f4: 4b0b ldr r3, [pc, #44] @ (8010224 <tcp_output_segment+0x13c>)
  37922. 80101f6: 681b ldr r3, [r3, #0]
  37923. 80101f8: 6363 str r3, [r4, #52] @ 0x34
  37924. pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno);
  37925. 80101fa: 692b ldr r3, [r5, #16]
  37926. 80101fc: 6858 ldr r0, [r3, #4]
  37927. 80101fe: f7f7 fe42 bl 8007e86 <lwip_htonl>
  37928. 8010202: 63a0 str r0, [r4, #56] @ 0x38
  37929. LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_output_segment: rtseq %"U32_F"\n", pcb->rtseq));
  37930. 8010204: e7b6 b.n 8010174 <tcp_output_segment+0x8c>
  37931. LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(seg->tcphdr + 1)) + LWIP_TCP_OPT_LENGTH_SEGMENT(seg->flags, pcb));
  37932. 8010206: 2214 movs r2, #20
  37933. 8010208: e7cc b.n 80101a4 <tcp_output_segment+0xbc>
  37934. 801020a: bf00 nop
  37935. 801020c: 080170ec .word 0x080170ec
  37936. 8010210: 08017350 .word 0x08017350
  37937. 8010214: 080144e8 .word 0x080144e8
  37938. 8010218: 08017370 .word 0x08017370
  37939. 801021c: 08017390 .word 0x08017390
  37940. 8010220: 08017230 .word 0x08017230
  37941. 8010224: 24019be4 .word 0x24019be4
  37942. 08010228 <tcp_output_control_segment>:
  37943. * header checksum and calling ip_output_if while handling netif hints and stats.
  37944. */
  37945. static err_t
  37946. tcp_output_control_segment(const struct tcp_pcb *pcb, struct pbuf *p,
  37947. const ip_addr_t *src, const ip_addr_t *dst)
  37948. {
  37949. 8010228: b5f0 push {r4, r5, r6, r7, lr}
  37950. 801022a: b085 sub sp, #20
  37951. 801022c: 4604 mov r4, r0
  37952. 801022e: 4615 mov r5, r2
  37953. 8010230: 461e mov r6, r3
  37954. err_t err;
  37955. struct netif *netif;
  37956. LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL);
  37957. 8010232: 460f mov r7, r1
  37958. 8010234: b1c9 cbz r1, 801026a <tcp_output_control_segment+0x42>
  37959. netif = tcp_route(pcb, src, dst);
  37960. 8010236: 4632 mov r2, r6
  37961. 8010238: 4629 mov r1, r5
  37962. 801023a: 4620 mov r0, r4
  37963. 801023c: f7ff ff48 bl 80100d0 <tcp_route>
  37964. if (netif == NULL) {
  37965. 8010240: 4602 mov r2, r0
  37966. 8010242: b1e8 cbz r0, 8010280 <tcp_output_control_segment+0x58>
  37967. struct tcp_hdr *tcphdr = (struct tcp_hdr *)p->payload;
  37968. tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len,
  37969. src, dst);
  37970. }
  37971. #endif
  37972. if (pcb != NULL) {
  37973. 8010244: b1cc cbz r4, 801027a <tcp_output_control_segment+0x52>
  37974. NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints)));
  37975. ttl = pcb->ttl;
  37976. 8010246: 7ae3 ldrb r3, [r4, #11]
  37977. tos = pcb->tos;
  37978. 8010248: 7aa1 ldrb r1, [r4, #10]
  37979. /* Send output with hardcoded TTL/HL since we have no access to the pcb */
  37980. ttl = TCP_TTL;
  37981. tos = 0;
  37982. }
  37983. TCP_STATS_INC(tcp.xmit);
  37984. err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif);
  37985. 801024a: 9202 str r2, [sp, #8]
  37986. 801024c: 2206 movs r2, #6
  37987. 801024e: 9201 str r2, [sp, #4]
  37988. 8010250: 9100 str r1, [sp, #0]
  37989. 8010252: 4632 mov r2, r6
  37990. 8010254: 4629 mov r1, r5
  37991. 8010256: 4638 mov r0, r7
  37992. 8010258: f7fa f8e6 bl 800a428 <ip4_output_if>
  37993. 801025c: 4604 mov r4, r0
  37994. NETIF_RESET_HINTS(netif);
  37995. }
  37996. pbuf_free(p);
  37997. 801025e: 4638 mov r0, r7
  37998. 8010260: f7fb fd9e bl 800bda0 <pbuf_free>
  37999. return err;
  38000. }
  38001. 8010264: 4620 mov r0, r4
  38002. 8010266: b005 add sp, #20
  38003. 8010268: bdf0 pop {r4, r5, r6, r7, pc}
  38004. LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL);
  38005. 801026a: 4b07 ldr r3, [pc, #28] @ (8010288 <tcp_output_control_segment+0x60>)
  38006. 801026c: f240 7287 movw r2, #1927 @ 0x787
  38007. 8010270: 4906 ldr r1, [pc, #24] @ (801028c <tcp_output_control_segment+0x64>)
  38008. 8010272: 4807 ldr r0, [pc, #28] @ (8010290 <tcp_output_control_segment+0x68>)
  38009. 8010274: f003 f8c8 bl 8013408 <iprintf>
  38010. 8010278: e7dd b.n 8010236 <tcp_output_control_segment+0xe>
  38011. tos = 0;
  38012. 801027a: 2100 movs r1, #0
  38013. ttl = TCP_TTL;
  38014. 801027c: 23ff movs r3, #255 @ 0xff
  38015. 801027e: e7e4 b.n 801024a <tcp_output_control_segment+0x22>
  38016. err = ERR_RTE;
  38017. 8010280: f06f 0403 mvn.w r4, #3
  38018. 8010284: e7eb b.n 801025e <tcp_output_control_segment+0x36>
  38019. 8010286: bf00 nop
  38020. 8010288: 080170ec .word 0x080170ec
  38021. 801028c: 080173b4 .word 0x080173b4
  38022. 8010290: 080144e8 .word 0x080144e8
  38023. 08010294 <tcp_write>:
  38024. {
  38025. 8010294: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  38026. 8010298: b091 sub sp, #68 @ 0x44
  38027. 801029a: 9107 str r1, [sp, #28]
  38028. 801029c: 9305 str r3, [sp, #20]
  38029. u16_t oversize = 0;
  38030. 801029e: 2300 movs r3, #0
  38031. 80102a0: f8ad 303e strh.w r3, [sp, #62] @ 0x3e
  38032. LWIP_ERROR("tcp_write: invalid pcb", pcb != NULL, return ERR_ARG);
  38033. 80102a4: 2800 cmp r0, #0
  38034. 80102a6: f000 809c beq.w 80103e2 <tcp_write+0x14e>
  38035. 80102aa: 4692 mov sl, r2
  38036. 80102ac: 4680 mov r8, r0
  38037. mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max / 2));
  38038. 80102ae: f8b0 3062 ldrh.w r3, [r0, #98] @ 0x62
  38039. 80102b2: 085b lsrs r3, r3, #1
  38040. 80102b4: f8b0 b032 ldrh.w fp, [r0, #50] @ 0x32
  38041. 80102b8: 455b cmp r3, fp
  38042. 80102ba: bf28 it cs
  38043. 80102bc: 465b movcs r3, fp
  38044. mss_local = mss_local ? mss_local : pcb->mss;
  38045. 80102be: b103 cbz r3, 80102c2 <tcp_write+0x2e>
  38046. 80102c0: 469b mov fp, r3
  38047. LWIP_ASSERT_CORE_LOCKED();
  38048. 80102c2: f7f3 fc23 bl 8003b0c <sys_check_core_locking>
  38049. LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)",
  38050. 80102c6: 9b07 ldr r3, [sp, #28]
  38051. 80102c8: 2b00 cmp r3, #0
  38052. 80102ca: f000 8094 beq.w 80103f6 <tcp_write+0x162>
  38053. err = tcp_write_checks(pcb, len);
  38054. 80102ce: 4651 mov r1, sl
  38055. 80102d0: 4640 mov r0, r8
  38056. 80102d2: f7ff fd17 bl 800fd04 <tcp_write_checks>
  38057. if (err != ERR_OK) {
  38058. 80102d6: 4681 mov r9, r0
  38059. 80102d8: 2800 cmp r0, #0
  38060. 80102da: f040 81a1 bne.w 8010620 <tcp_write+0x38c>
  38061. queuelen = pcb->snd_queuelen;
  38062. 80102de: f8b8 6066 ldrh.w r6, [r8, #102] @ 0x66
  38063. if (pcb->unsent != NULL) {
  38064. 80102e2: f8d8 306c ldr.w r3, [r8, #108] @ 0x6c
  38065. 80102e6: 930a str r3, [sp, #40] @ 0x28
  38066. 80102e8: 2b00 cmp r3, #0
  38067. 80102ea: f000 80e5 beq.w 80104b8 <tcp_write+0x224>
  38068. for (last_unsent = pcb->unsent; last_unsent->next != NULL;
  38069. 80102ee: 9308 str r3, [sp, #32]
  38070. 80102f0: 681b ldr r3, [r3, #0]
  38071. 80102f2: 2b00 cmp r3, #0
  38072. 80102f4: d1fb bne.n 80102ee <tcp_write+0x5a>
  38073. unsent_optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(last_unsent->flags, pcb);
  38074. 80102f6: 930a str r3, [sp, #40] @ 0x28
  38075. 80102f8: 9b08 ldr r3, [sp, #32]
  38076. 80102fa: 7b1c ldrb r4, [r3, #12]
  38077. 80102fc: 00a4 lsls r4, r4, #2
  38078. 80102fe: f004 0404 and.w r4, r4, #4
  38079. LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen);
  38080. 8010302: 891b ldrh r3, [r3, #8]
  38081. 8010304: 4423 add r3, r4
  38082. 8010306: 459b cmp fp, r3
  38083. 8010308: db7f blt.n 801040a <tcp_write+0x176>
  38084. space = mss_local - (last_unsent->len + unsent_optlen);
  38085. 801030a: 9908 ldr r1, [sp, #32]
  38086. 801030c: 890b ldrh r3, [r1, #8]
  38087. 801030e: 441c add r4, r3
  38088. 8010310: b2a4 uxth r4, r4
  38089. 8010312: ebab 0404 sub.w r4, fp, r4
  38090. 8010316: b2a4 uxth r4, r4
  38091. LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)",
  38092. 8010318: f8b8 2068 ldrh.w r2, [r8, #104] @ 0x68
  38093. 801031c: 894b ldrh r3, [r1, #10]
  38094. 801031e: 429a cmp r2, r3
  38095. 8010320: d17b bne.n 801041a <tcp_write+0x186>
  38096. oversize = pcb->unsent_oversize;
  38097. 8010322: f8b8 3068 ldrh.w r3, [r8, #104] @ 0x68
  38098. 8010326: 9309 str r3, [sp, #36] @ 0x24
  38099. 8010328: f8ad 303e strh.w r3, [sp, #62] @ 0x3e
  38100. if (oversize > 0) {
  38101. 801032c: 2b00 cmp r3, #0
  38102. 801032e: f000 8084 beq.w 801043a <tcp_write+0x1a6>
  38103. LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space);
  38104. 8010332: 42a3 cmp r3, r4
  38105. 8010334: d879 bhi.n 801042a <tcp_write+0x196>
  38106. oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len));
  38107. 8010336: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
  38108. 801033a: 461a mov r2, r3
  38109. 801033c: 4553 cmp r3, sl
  38110. 801033e: bf28 it cs
  38111. 8010340: 4652 movcs r2, sl
  38112. 8010342: 42a2 cmp r2, r4
  38113. 8010344: bf28 it cs
  38114. 8010346: 4622 movcs r2, r4
  38115. 8010348: 9209 str r2, [sp, #36] @ 0x24
  38116. oversize -= oversize_used;
  38117. 801034a: 1a9b subs r3, r3, r2
  38118. 801034c: f8ad 303e strh.w r3, [sp, #62] @ 0x3e
  38119. space -= oversize_used;
  38120. 8010350: 1aa4 subs r4, r4, r2
  38121. 8010352: b2a4 uxth r4, r4
  38122. seg = last_unsent;
  38123. 8010354: 9f08 ldr r7, [sp, #32]
  38124. LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len));
  38125. 8010356: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
  38126. 801035a: 9a09 ldr r2, [sp, #36] @ 0x24
  38127. 801035c: 2b00 cmp r3, #0
  38128. 801035e: bf18 it ne
  38129. 8010360: 4552 cmpne r2, sl
  38130. 8010362: d16c bne.n 801043e <tcp_write+0x1aa>
  38131. if ((pos < len) && (space > 0) && (last_unsent->len > 0)) {
  38132. 8010364: 9b09 ldr r3, [sp, #36] @ 0x24
  38133. 8010366: 2c00 cmp r4, #0
  38134. 8010368: bf18 it ne
  38135. 801036a: 4553 cmpne r3, sl
  38136. 801036c: f080 8166 bcs.w 801063c <tcp_write+0x3a8>
  38137. 8010370: 9a08 ldr r2, [sp, #32]
  38138. 8010372: 8912 ldrh r2, [r2, #8]
  38139. 8010374: 920b str r2, [sp, #44] @ 0x2c
  38140. 8010376: 2a00 cmp r2, #0
  38141. 8010378: f000 8169 beq.w 801064e <tcp_write+0x3ba>
  38142. u16_t seglen = LWIP_MIN(space, len - pos);
  38143. 801037c: ebaa 0303 sub.w r3, sl, r3
  38144. 8010380: 42a3 cmp r3, r4
  38145. 8010382: bfa8 it ge
  38146. 8010384: 4623 movge r3, r4
  38147. 8010386: b29f uxth r7, r3
  38148. if (apiflags & TCP_WRITE_FLAG_COPY) {
  38149. 8010388: 9b05 ldr r3, [sp, #20]
  38150. 801038a: f013 0f01 tst.w r3, #1
  38151. 801038e: d15e bne.n 801044e <tcp_write+0x1ba>
  38152. for (p = last_unsent->p; p->next != NULL; p = p->next);
  38153. 8010390: 9b08 ldr r3, [sp, #32]
  38154. 8010392: 685a ldr r2, [r3, #4]
  38155. 8010394: 4613 mov r3, r2
  38156. 8010396: 6812 ldr r2, [r2, #0]
  38157. 8010398: 2a00 cmp r2, #0
  38158. 801039a: d1fb bne.n 8010394 <tcp_write+0x100>
  38159. if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) &&
  38160. 801039c: 920a str r2, [sp, #40] @ 0x28
  38161. 801039e: 7b1a ldrb r2, [r3, #12]
  38162. 80103a0: 2a3f cmp r2, #63 @ 0x3f
  38163. 80103a2: d805 bhi.n 80103b0 <tcp_write+0x11c>
  38164. (const u8_t *)p->payload + p->len == (const u8_t *)arg) {
  38165. 80103a4: 685a ldr r2, [r3, #4]
  38166. 80103a6: 895b ldrh r3, [r3, #10]
  38167. 80103a8: 4413 add r3, r2
  38168. if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) &&
  38169. 80103aa: 9a07 ldr r2, [sp, #28]
  38170. 80103ac: 4293 cmp r3, r2
  38171. 80103ae: d072 beq.n 8010496 <tcp_write+0x202>
  38172. if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) {
  38173. 80103b0: 2201 movs r2, #1
  38174. 80103b2: 4639 mov r1, r7
  38175. 80103b4: 2000 movs r0, #0
  38176. 80103b6: f7fb fd5b bl 800be70 <pbuf_alloc>
  38177. 80103ba: 900a str r0, [sp, #40] @ 0x28
  38178. 80103bc: 2800 cmp r0, #0
  38179. 80103be: f000 821e beq.w 80107fe <tcp_write+0x56a>
  38180. ((struct pbuf_rom *)concat_p)->payload = (const u8_t *)arg + pos;
  38181. 80103c2: 9b07 ldr r3, [sp, #28]
  38182. 80103c4: 9909 ldr r1, [sp, #36] @ 0x24
  38183. 80103c6: 440b add r3, r1
  38184. 80103c8: 6043 str r3, [r0, #4]
  38185. queuelen += pbuf_clen(concat_p);
  38186. 80103ca: f7fb fe6e bl 800c0aa <pbuf_clen>
  38187. 80103ce: 1833 adds r3, r6, r0
  38188. 80103d0: b29e uxth r6, r3
  38189. u16_t extendlen = 0;
  38190. 80103d2: 2300 movs r3, #0
  38191. 80103d4: 930d str r3, [sp, #52] @ 0x34
  38192. u16_t oversize_add = 0;
  38193. 80103d6: 930b str r3, [sp, #44] @ 0x2c
  38194. pos += seglen;
  38195. 80103d8: 9b09 ldr r3, [sp, #36] @ 0x24
  38196. 80103da: 19dc adds r4, r3, r7
  38197. 80103dc: b2a4 uxth r4, r4
  38198. seg = last_unsent;
  38199. 80103de: 9f08 ldr r7, [sp, #32]
  38200. 80103e0: e130 b.n 8010644 <tcp_write+0x3b0>
  38201. LWIP_ERROR("tcp_write: invalid pcb", pcb != NULL, return ERR_ARG);
  38202. 80103e2: 4ba6 ldr r3, [pc, #664] @ (801067c <tcp_write+0x3e8>)
  38203. 80103e4: f44f 72cf mov.w r2, #414 @ 0x19e
  38204. 80103e8: 49a5 ldr r1, [pc, #660] @ (8010680 <tcp_write+0x3ec>)
  38205. 80103ea: 48a6 ldr r0, [pc, #664] @ (8010684 <tcp_write+0x3f0>)
  38206. 80103ec: f003 f80c bl 8013408 <iprintf>
  38207. 80103f0: f06f 090f mvn.w r9, #15
  38208. 80103f4: e114 b.n 8010620 <tcp_write+0x38c>
  38209. LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)",
  38210. 80103f6: 4ba1 ldr r3, [pc, #644] @ (801067c <tcp_write+0x3e8>)
  38211. 80103f8: f240 12ad movw r2, #429 @ 0x1ad
  38212. 80103fc: 49a2 ldr r1, [pc, #648] @ (8010688 <tcp_write+0x3f4>)
  38213. 80103fe: 48a1 ldr r0, [pc, #644] @ (8010684 <tcp_write+0x3f0>)
  38214. 8010400: f003 f802 bl 8013408 <iprintf>
  38215. 8010404: f06f 090f mvn.w r9, #15
  38216. 8010408: e10a b.n 8010620 <tcp_write+0x38c>
  38217. LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen);
  38218. 801040a: 4b9c ldr r3, [pc, #624] @ (801067c <tcp_write+0x3e8>)
  38219. 801040c: f44f 72f3 mov.w r2, #486 @ 0x1e6
  38220. 8010410: 499e ldr r1, [pc, #632] @ (801068c <tcp_write+0x3f8>)
  38221. 8010412: 489c ldr r0, [pc, #624] @ (8010684 <tcp_write+0x3f0>)
  38222. 8010414: f002 fff8 bl 8013408 <iprintf>
  38223. 8010418: e777 b.n 801030a <tcp_write+0x76>
  38224. LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)",
  38225. 801041a: 4b98 ldr r3, [pc, #608] @ (801067c <tcp_write+0x3e8>)
  38226. 801041c: f240 12f3 movw r2, #499 @ 0x1f3
  38227. 8010420: 499b ldr r1, [pc, #620] @ (8010690 <tcp_write+0x3fc>)
  38228. 8010422: 4898 ldr r0, [pc, #608] @ (8010684 <tcp_write+0x3f0>)
  38229. 8010424: f002 fff0 bl 8013408 <iprintf>
  38230. 8010428: e77b b.n 8010322 <tcp_write+0x8e>
  38231. LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space);
  38232. 801042a: 4b94 ldr r3, [pc, #592] @ (801067c <tcp_write+0x3e8>)
  38233. 801042c: f44f 72fc mov.w r2, #504 @ 0x1f8
  38234. 8010430: 4998 ldr r1, [pc, #608] @ (8010694 <tcp_write+0x400>)
  38235. 8010432: 4894 ldr r0, [pc, #592] @ (8010684 <tcp_write+0x3f0>)
  38236. 8010434: f002 ffe8 bl 8013408 <iprintf>
  38237. 8010438: e77d b.n 8010336 <tcp_write+0xa2>
  38238. struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL;
  38239. 801043a: 9f0a ldr r7, [sp, #40] @ 0x28
  38240. 801043c: e78b b.n 8010356 <tcp_write+0xc2>
  38241. LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len));
  38242. 801043e: 4b8f ldr r3, [pc, #572] @ (801067c <tcp_write+0x3e8>)
  38243. 8010440: f44f 7200 mov.w r2, #512 @ 0x200
  38244. 8010444: 4994 ldr r1, [pc, #592] @ (8010698 <tcp_write+0x404>)
  38245. 8010446: 488f ldr r0, [pc, #572] @ (8010684 <tcp_write+0x3f0>)
  38246. 8010448: f002 ffde bl 8013408 <iprintf>
  38247. 801044c: e78a b.n 8010364 <tcp_write+0xd0>
  38248. if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) {
  38249. 801044e: 2301 movs r3, #1
  38250. 8010450: 9302 str r3, [sp, #8]
  38251. 8010452: 9b05 ldr r3, [sp, #20]
  38252. 8010454: 9301 str r3, [sp, #4]
  38253. 8010456: f8cd 8000 str.w r8, [sp]
  38254. 801045a: f10d 033e add.w r3, sp, #62 @ 0x3e
  38255. 801045e: 4622 mov r2, r4
  38256. 8010460: 4639 mov r1, r7
  38257. 8010462: 2000 movs r0, #0
  38258. 8010464: f7ff fcec bl 800fe40 <tcp_pbuf_prealloc>
  38259. 8010468: 4604 mov r4, r0
  38260. 801046a: 900a str r0, [sp, #40] @ 0x28
  38261. 801046c: 2800 cmp r0, #0
  38262. 801046e: f000 81c4 beq.w 80107fa <tcp_write+0x566>
  38263. oversize_add = oversize;
  38264. 8010472: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
  38265. 8010476: 930b str r3, [sp, #44] @ 0x2c
  38266. TCP_DATA_COPY2(concat_p->payload, (const u8_t *)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped);
  38267. 8010478: 463a mov r2, r7
  38268. 801047a: 9b07 ldr r3, [sp, #28]
  38269. 801047c: 9909 ldr r1, [sp, #36] @ 0x24
  38270. 801047e: 1859 adds r1, r3, r1
  38271. 8010480: 6840 ldr r0, [r0, #4]
  38272. 8010482: f003 f9fe bl 8013882 <memcpy>
  38273. queuelen += pbuf_clen(concat_p);
  38274. 8010486: 4620 mov r0, r4
  38275. 8010488: f7fb fe0f bl 800c0aa <pbuf_clen>
  38276. 801048c: 1833 adds r3, r6, r0
  38277. 801048e: b29e uxth r6, r3
  38278. u16_t extendlen = 0;
  38279. 8010490: 2300 movs r3, #0
  38280. 8010492: 930d str r3, [sp, #52] @ 0x34
  38281. 8010494: e7a0 b.n 80103d8 <tcp_write+0x144>
  38282. LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0);
  38283. 8010496: 9b09 ldr r3, [sp, #36] @ 0x24
  38284. 8010498: b91b cbnz r3, 80104a2 <tcp_write+0x20e>
  38285. extendlen = seglen;
  38286. 801049a: 970d str r7, [sp, #52] @ 0x34
  38287. u16_t oversize_add = 0;
  38288. 801049c: 9b09 ldr r3, [sp, #36] @ 0x24
  38289. 801049e: 930b str r3, [sp, #44] @ 0x2c
  38290. 80104a0: e79a b.n 80103d8 <tcp_write+0x144>
  38291. LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0);
  38292. 80104a2: 4b76 ldr r3, [pc, #472] @ (801067c <tcp_write+0x3e8>)
  38293. 80104a4: f240 2231 movw r2, #561 @ 0x231
  38294. 80104a8: 497c ldr r1, [pc, #496] @ (801069c <tcp_write+0x408>)
  38295. 80104aa: 4876 ldr r0, [pc, #472] @ (8010684 <tcp_write+0x3f0>)
  38296. 80104ac: f002 ffac bl 8013408 <iprintf>
  38297. extendlen = seglen;
  38298. 80104b0: 970d str r7, [sp, #52] @ 0x34
  38299. u16_t oversize_add = 0;
  38300. 80104b2: 2300 movs r3, #0
  38301. 80104b4: 930b str r3, [sp, #44] @ 0x2c
  38302. 80104b6: e78f b.n 80103d8 <tcp_write+0x144>
  38303. LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)",
  38304. 80104b8: f8b8 4068 ldrh.w r4, [r8, #104] @ 0x68
  38305. 80104bc: b934 cbnz r4, 80104cc <tcp_write+0x238>
  38306. u16_t extendlen = 0;
  38307. 80104be: 940d str r4, [sp, #52] @ 0x34
  38308. u16_t oversize_add = 0;
  38309. 80104c0: 940b str r4, [sp, #44] @ 0x2c
  38310. u16_t oversize_used = 0;
  38311. 80104c2: 9409 str r4, [sp, #36] @ 0x24
  38312. struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL;
  38313. 80104c4: 9b0a ldr r3, [sp, #40] @ 0x28
  38314. 80104c6: 461f mov r7, r3
  38315. 80104c8: 9308 str r3, [sp, #32]
  38316. 80104ca: e0bb b.n 8010644 <tcp_write+0x3b0>
  38317. LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)",
  38318. 80104cc: 4b6b ldr r3, [pc, #428] @ (801067c <tcp_write+0x3e8>)
  38319. 80104ce: f240 224a movw r2, #586 @ 0x24a
  38320. 80104d2: 4973 ldr r1, [pc, #460] @ (80106a0 <tcp_write+0x40c>)
  38321. 80104d4: 486b ldr r0, [pc, #428] @ (8010684 <tcp_write+0x3f0>)
  38322. 80104d6: f002 ff97 bl 8013408 <iprintf>
  38323. struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL;
  38324. 80104da: 9b0a ldr r3, [sp, #40] @ 0x28
  38325. 80104dc: 461f mov r7, r3
  38326. 80104de: 9308 str r3, [sp, #32]
  38327. u16_t extendlen = 0;
  38328. 80104e0: 2400 movs r4, #0
  38329. 80104e2: 940d str r4, [sp, #52] @ 0x34
  38330. u16_t oversize_add = 0;
  38331. 80104e4: 940b str r4, [sp, #44] @ 0x2c
  38332. u16_t oversize_used = 0;
  38333. 80104e6: 9409 str r4, [sp, #36] @ 0x24
  38334. 80104e8: e0ac b.n 8010644 <tcp_write+0x3b0>
  38335. if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) {
  38336. 80104ea: fab5 f385 clz r3, r5
  38337. 80104ee: 095b lsrs r3, r3, #5
  38338. 80104f0: 9302 str r3, [sp, #8]
  38339. 80104f2: 9b05 ldr r3, [sp, #20]
  38340. 80104f4: 9301 str r3, [sp, #4]
  38341. 80104f6: f8cd 8000 str.w r8, [sp]
  38342. 80104fa: f10d 033e add.w r3, sp, #62 @ 0x3e
  38343. 80104fe: 465a mov r2, fp
  38344. 8010500: 4649 mov r1, r9
  38345. 8010502: 2036 movs r0, #54 @ 0x36
  38346. 8010504: f7ff fc9c bl 800fe40 <tcp_pbuf_prealloc>
  38347. 8010508: 4607 mov r7, r0
  38348. 801050a: 2800 cmp r0, #0
  38349. 801050c: d068 beq.n 80105e0 <tcp_write+0x34c>
  38350. LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen",
  38351. 801050e: 8943 ldrh r3, [r0, #10]
  38352. 8010510: 454b cmp r3, r9
  38353. 8010512: d306 bcc.n 8010522 <tcp_write+0x28e>
  38354. TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t *)arg + pos, seglen, &chksum, &chksum_swapped);
  38355. 8010514: 464a mov r2, r9
  38356. 8010516: 9b07 ldr r3, [sp, #28]
  38357. 8010518: 1919 adds r1, r3, r4
  38358. 801051a: 6878 ldr r0, [r7, #4]
  38359. 801051c: f003 f9b1 bl 8013882 <memcpy>
  38360. 8010520: e01e b.n 8010560 <tcp_write+0x2cc>
  38361. LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen",
  38362. 8010522: 4b56 ldr r3, [pc, #344] @ (801067c <tcp_write+0x3e8>)
  38363. 8010524: f240 2266 movw r2, #614 @ 0x266
  38364. 8010528: 495e ldr r1, [pc, #376] @ (80106a4 <tcp_write+0x410>)
  38365. 801052a: 4856 ldr r0, [pc, #344] @ (8010684 <tcp_write+0x3f0>)
  38366. 801052c: f002 ff6c bl 8013408 <iprintf>
  38367. 8010530: e7f0 b.n 8010514 <tcp_write+0x280>
  38368. if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) {
  38369. 8010532: 2201 movs r2, #1
  38370. 8010534: 4649 mov r1, r9
  38371. 8010536: 2036 movs r0, #54 @ 0x36
  38372. 8010538: f7fb fc9a bl 800be70 <pbuf_alloc>
  38373. 801053c: 9006 str r0, [sp, #24]
  38374. 801053e: 2800 cmp r0, #0
  38375. 8010540: d04e beq.n 80105e0 <tcp_write+0x34c>
  38376. ((struct pbuf_rom *)p2)->payload = (const u8_t *)arg + pos;
  38377. 8010542: 9b07 ldr r3, [sp, #28]
  38378. 8010544: 4423 add r3, r4
  38379. 8010546: 6043 str r3, [r0, #4]
  38380. if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) {
  38381. 8010548: f44f 7220 mov.w r2, #640 @ 0x280
  38382. 801054c: 2100 movs r1, #0
  38383. 801054e: 2036 movs r0, #54 @ 0x36
  38384. 8010550: f7fb fc8e bl 800be70 <pbuf_alloc>
  38385. 8010554: 4607 mov r7, r0
  38386. 8010556: 2800 cmp r0, #0
  38387. 8010558: d03b beq.n 80105d2 <tcp_write+0x33e>
  38388. pbuf_cat(p/*header*/, p2/*data*/);
  38389. 801055a: 9906 ldr r1, [sp, #24]
  38390. 801055c: f7fb fdca bl 800c0f4 <pbuf_cat>
  38391. queuelen += pbuf_clen(p);
  38392. 8010560: 4638 mov r0, r7
  38393. 8010562: f7fb fda2 bl 800c0aa <pbuf_clen>
  38394. 8010566: 4430 add r0, r6
  38395. 8010568: b286 uxth r6, r0
  38396. if (queuelen > LWIP_MIN(TCP_SND_QUEUELEN, TCP_SNDQUEUELEN_OVERFLOW)) {
  38397. 801056a: 2e10 cmp r6, #16
  38398. 801056c: d835 bhi.n 80105da <tcp_write+0x346>
  38399. if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) {
  38400. 801056e: f8d8 305c ldr.w r3, [r8, #92] @ 0x5c
  38401. 8010572: 2200 movs r2, #0
  38402. 8010574: 9200 str r2, [sp, #0]
  38403. 8010576: 4423 add r3, r4
  38404. 8010578: 4639 mov r1, r7
  38405. 801057a: 4640 mov r0, r8
  38406. 801057c: f7ff fcbe bl 800fefc <tcp_create_segment>
  38407. 8010580: 4607 mov r7, r0
  38408. 8010582: b368 cbz r0, 80105e0 <tcp_write+0x34c>
  38409. seg->oversize_left = oversize;
  38410. 8010584: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
  38411. 8010588: 8143 strh r3, [r0, #10]
  38412. if (queue == NULL) {
  38413. 801058a: 2d00 cmp r5, #0
  38414. 801058c: d054 beq.n 8010638 <tcp_write+0x3a4>
  38415. LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL);
  38416. 801058e: 9b04 ldr r3, [sp, #16]
  38417. 8010590: 2b00 cmp r3, #0
  38418. 8010592: d049 beq.n 8010628 <tcp_write+0x394>
  38419. prev_seg->next = seg;
  38420. 8010594: 9b04 ldr r3, [sp, #16]
  38421. 8010596: 601f str r7, [r3, #0]
  38422. pos += seglen;
  38423. 8010598: 44a1 add r9, r4
  38424. 801059a: fa1f f489 uxth.w r4, r9
  38425. prev_seg = seg;
  38426. 801059e: 9704 str r7, [sp, #16]
  38427. while (pos < len) {
  38428. 80105a0: 4554 cmp r4, sl
  38429. 80105a2: d258 bcs.n 8010656 <tcp_write+0x3c2>
  38430. u16_t left = len - pos;
  38431. 80105a4: ebaa 0904 sub.w r9, sl, r4
  38432. 80105a8: fa1f f989 uxth.w r9, r9
  38433. u16_t seglen = LWIP_MIN(left, max_len);
  38434. 80105ac: 45d9 cmp r9, fp
  38435. 80105ae: bf28 it cs
  38436. 80105b0: 46d9 movcs r9, fp
  38437. if (apiflags & TCP_WRITE_FLAG_COPY) {
  38438. 80105b2: 9b05 ldr r3, [sp, #20]
  38439. 80105b4: f013 0f01 tst.w r3, #1
  38440. 80105b8: d197 bne.n 80104ea <tcp_write+0x256>
  38441. LWIP_ASSERT("oversize == 0", oversize == 0);
  38442. 80105ba: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
  38443. 80105be: 2b00 cmp r3, #0
  38444. 80105c0: d0b7 beq.n 8010532 <tcp_write+0x29e>
  38445. 80105c2: 4b2e ldr r3, [pc, #184] @ (801067c <tcp_write+0x3e8>)
  38446. 80105c4: f240 2271 movw r2, #625 @ 0x271
  38447. 80105c8: 4937 ldr r1, [pc, #220] @ (80106a8 <tcp_write+0x414>)
  38448. 80105ca: 482e ldr r0, [pc, #184] @ (8010684 <tcp_write+0x3f0>)
  38449. 80105cc: f002 ff1c bl 8013408 <iprintf>
  38450. 80105d0: e7af b.n 8010532 <tcp_write+0x29e>
  38451. pbuf_free(p2);
  38452. 80105d2: 9806 ldr r0, [sp, #24]
  38453. 80105d4: f7fb fbe4 bl 800bda0 <pbuf_free>
  38454. goto memerr;
  38455. 80105d8: e002 b.n 80105e0 <tcp_write+0x34c>
  38456. pbuf_free(p);
  38457. 80105da: 4638 mov r0, r7
  38458. 80105dc: f7fb fbe0 bl 800bda0 <pbuf_free>
  38459. tcp_set_flags(pcb, TF_NAGLEMEMERR);
  38460. 80105e0: f8b8 301a ldrh.w r3, [r8, #26]
  38461. 80105e4: f043 0380 orr.w r3, r3, #128 @ 0x80
  38462. 80105e8: f8a8 301a strh.w r3, [r8, #26]
  38463. if (concat_p != NULL) {
  38464. 80105ec: 9b0a ldr r3, [sp, #40] @ 0x28
  38465. 80105ee: b113 cbz r3, 80105f6 <tcp_write+0x362>
  38466. pbuf_free(concat_p);
  38467. 80105f0: 4618 mov r0, r3
  38468. 80105f2: f7fb fbd5 bl 800bda0 <pbuf_free>
  38469. if (queue != NULL) {
  38470. 80105f6: b115 cbz r5, 80105fe <tcp_write+0x36a>
  38471. tcp_segs_free(queue);
  38472. 80105f8: 4628 mov r0, r5
  38473. 80105fa: f7fc fee4 bl 800d3c6 <tcp_segs_free>
  38474. if (pcb->snd_queuelen != 0) {
  38475. 80105fe: f8b8 3066 ldrh.w r3, [r8, #102] @ 0x66
  38476. 8010602: 2b00 cmp r3, #0
  38477. 8010604: f000 8107 beq.w 8010816 <tcp_write+0x582>
  38478. LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL ||
  38479. 8010608: f8d8 3070 ldr.w r3, [r8, #112] @ 0x70
  38480. 801060c: 2b00 cmp r3, #0
  38481. 801060e: f040 8105 bne.w 801081c <tcp_write+0x588>
  38482. 8010612: f8d8 306c ldr.w r3, [r8, #108] @ 0x6c
  38483. 8010616: 2b00 cmp r3, #0
  38484. 8010618: f000 80f3 beq.w 8010802 <tcp_write+0x56e>
  38485. return ERR_MEM;
  38486. 801061c: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
  38487. }
  38488. 8010620: 4648 mov r0, r9
  38489. 8010622: b011 add sp, #68 @ 0x44
  38490. 8010624: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  38491. LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL);
  38492. 8010628: 4b14 ldr r3, [pc, #80] @ (801067c <tcp_write+0x3e8>)
  38493. 801062a: f240 22ab movw r2, #683 @ 0x2ab
  38494. 801062e: 491f ldr r1, [pc, #124] @ (80106ac <tcp_write+0x418>)
  38495. 8010630: 4814 ldr r0, [pc, #80] @ (8010684 <tcp_write+0x3f0>)
  38496. 8010632: f002 fee9 bl 8013408 <iprintf>
  38497. 8010636: e7ad b.n 8010594 <tcp_write+0x300>
  38498. queue = seg;
  38499. 8010638: 4605 mov r5, r0
  38500. 801063a: e7ad b.n 8010598 <tcp_write+0x304>
  38501. 801063c: 9c09 ldr r4, [sp, #36] @ 0x24
  38502. u16_t extendlen = 0;
  38503. 801063e: 2300 movs r3, #0
  38504. 8010640: 930d str r3, [sp, #52] @ 0x34
  38505. u16_t oversize_add = 0;
  38506. 8010642: 930b str r3, [sp, #44] @ 0x2c
  38507. 8010644: 2500 movs r5, #0
  38508. 8010646: 9504 str r5, [sp, #16]
  38509. 8010648: f8cd 9030 str.w r9, [sp, #48] @ 0x30
  38510. 801064c: e7a8 b.n 80105a0 <tcp_write+0x30c>
  38511. u16_t extendlen = 0;
  38512. 801064e: 9b0b ldr r3, [sp, #44] @ 0x2c
  38513. 8010650: 930d str r3, [sp, #52] @ 0x34
  38514. 8010652: 9c09 ldr r4, [sp, #36] @ 0x24
  38515. 8010654: e7f6 b.n 8010644 <tcp_write+0x3b0>
  38516. if ((last_unsent != NULL) && (oversize_add != 0)) {
  38517. 8010656: f8dd 9030 ldr.w r9, [sp, #48] @ 0x30
  38518. 801065a: 9a08 ldr r2, [sp, #32]
  38519. 801065c: 990b ldr r1, [sp, #44] @ 0x2c
  38520. 801065e: 2a00 cmp r2, #0
  38521. 8010660: bf18 it ne
  38522. 8010662: 2900 cmpne r1, #0
  38523. 8010664: d002 beq.n 801066c <tcp_write+0x3d8>
  38524. last_unsent->oversize_left += oversize_add;
  38525. 8010666: 8953 ldrh r3, [r2, #10]
  38526. 8010668: 440b add r3, r1
  38527. 801066a: 8153 strh r3, [r2, #10]
  38528. if (oversize_used > 0) {
  38529. 801066c: 9b09 ldr r3, [sp, #36] @ 0x24
  38530. 801066e: 2b00 cmp r3, #0
  38531. 8010670: d03e beq.n 80106f0 <tcp_write+0x45c>
  38532. for (p = last_unsent->p; p; p = p->next) {
  38533. 8010672: 9a08 ldr r2, [sp, #32]
  38534. 8010674: 6854 ldr r4, [r2, #4]
  38535. 8010676: 469b mov fp, r3
  38536. 8010678: e01b b.n 80106b2 <tcp_write+0x41e>
  38537. 801067a: bf00 nop
  38538. 801067c: 080170ec .word 0x080170ec
  38539. 8010680: 080173e0 .word 0x080173e0
  38540. 8010684: 080144e8 .word 0x080144e8
  38541. 8010688: 080173f8 .word 0x080173f8
  38542. 801068c: 0801742c .word 0x0801742c
  38543. 8010690: 08017444 .word 0x08017444
  38544. 8010694: 08017474 .word 0x08017474
  38545. 8010698: 08017494 .word 0x08017494
  38546. 801069c: 080174b4 .word 0x080174b4
  38547. 80106a0: 080174e0 .word 0x080174e0
  38548. 80106a4: 08017510 .word 0x08017510
  38549. 80106a8: 08017550 .word 0x08017550
  38550. 80106ac: 08017560 .word 0x08017560
  38551. 80106b0: 6824 ldr r4, [r4, #0]
  38552. 80106b2: b184 cbz r4, 80106d6 <tcp_write+0x442>
  38553. p->tot_len += oversize_used;
  38554. 80106b4: 8923 ldrh r3, [r4, #8]
  38555. 80106b6: 445b add r3, fp
  38556. 80106b8: 8123 strh r3, [r4, #8]
  38557. if (p->next == NULL) {
  38558. 80106ba: 6823 ldr r3, [r4, #0]
  38559. 80106bc: 2b00 cmp r3, #0
  38560. 80106be: d1f7 bne.n 80106b0 <tcp_write+0x41c>
  38561. TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent);
  38562. 80106c0: 6860 ldr r0, [r4, #4]
  38563. 80106c2: 8963 ldrh r3, [r4, #10]
  38564. 80106c4: 465a mov r2, fp
  38565. 80106c6: 9907 ldr r1, [sp, #28]
  38566. 80106c8: 4418 add r0, r3
  38567. 80106ca: f003 f8da bl 8013882 <memcpy>
  38568. p->len += oversize_used;
  38569. 80106ce: 8963 ldrh r3, [r4, #10]
  38570. 80106d0: 445b add r3, fp
  38571. 80106d2: 8163 strh r3, [r4, #10]
  38572. 80106d4: e7ec b.n 80106b0 <tcp_write+0x41c>
  38573. last_unsent->len += oversize_used;
  38574. 80106d6: 9a08 ldr r2, [sp, #32]
  38575. 80106d8: 8913 ldrh r3, [r2, #8]
  38576. 80106da: 9909 ldr r1, [sp, #36] @ 0x24
  38577. 80106dc: 440b add r3, r1
  38578. 80106de: 8113 strh r3, [r2, #8]
  38579. LWIP_ASSERT("last_unsent->oversize_left >= oversize_used",
  38580. 80106e0: 8953 ldrh r3, [r2, #10]
  38581. 80106e2: 428b cmp r3, r1
  38582. 80106e4: d342 bcc.n 801076c <tcp_write+0x4d8>
  38583. last_unsent->oversize_left -= oversize_used;
  38584. 80106e6: 9a08 ldr r2, [sp, #32]
  38585. 80106e8: 8953 ldrh r3, [r2, #10]
  38586. 80106ea: 9909 ldr r1, [sp, #36] @ 0x24
  38587. 80106ec: 1a5b subs r3, r3, r1
  38588. 80106ee: 8153 strh r3, [r2, #10]
  38589. pcb->unsent_oversize = oversize;
  38590. 80106f0: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e
  38591. 80106f4: f8a8 3068 strh.w r3, [r8, #104] @ 0x68
  38592. if (concat_p != NULL) {
  38593. 80106f8: 9b0a ldr r3, [sp, #40] @ 0x28
  38594. 80106fa: 2b00 cmp r3, #0
  38595. 80106fc: d046 beq.n 801078c <tcp_write+0x4f8>
  38596. LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty",
  38597. 80106fe: 9b08 ldr r3, [sp, #32]
  38598. 8010700: 2b00 cmp r3, #0
  38599. 8010702: d03b beq.n 801077c <tcp_write+0x4e8>
  38600. pbuf_cat(last_unsent->p, concat_p);
  38601. 8010704: f8dd b028 ldr.w fp, [sp, #40] @ 0x28
  38602. 8010708: 4659 mov r1, fp
  38603. 801070a: 9c08 ldr r4, [sp, #32]
  38604. 801070c: 6860 ldr r0, [r4, #4]
  38605. 801070e: f7fb fcf1 bl 800c0f4 <pbuf_cat>
  38606. last_unsent->len += concat_p->tot_len;
  38607. 8010712: 8923 ldrh r3, [r4, #8]
  38608. 8010714: f8bb 2008 ldrh.w r2, [fp, #8]
  38609. 8010718: 4413 add r3, r2
  38610. 801071a: 8123 strh r3, [r4, #8]
  38611. last_unsent->next = queue;
  38612. 801071c: 9b08 ldr r3, [sp, #32]
  38613. 801071e: 601d str r5, [r3, #0]
  38614. pcb->snd_lbb += len;
  38615. 8010720: f8d8 305c ldr.w r3, [r8, #92] @ 0x5c
  38616. 8010724: 4453 add r3, sl
  38617. 8010726: f8c8 305c str.w r3, [r8, #92] @ 0x5c
  38618. pcb->snd_buf -= len;
  38619. 801072a: f8b8 3064 ldrh.w r3, [r8, #100] @ 0x64
  38620. 801072e: eba3 030a sub.w r3, r3, sl
  38621. 8010732: f8a8 3064 strh.w r3, [r8, #100] @ 0x64
  38622. pcb->snd_queuelen = queuelen;
  38623. 8010736: f8a8 6066 strh.w r6, [r8, #102] @ 0x66
  38624. if (pcb->snd_queuelen != 0) {
  38625. 801073a: b11e cbz r6, 8010744 <tcp_write+0x4b0>
  38626. LWIP_ASSERT("tcp_write: valid queue length",
  38627. 801073c: f8d8 3070 ldr.w r3, [r8, #112] @ 0x70
  38628. 8010740: 2b00 cmp r3, #0
  38629. 8010742: d04e beq.n 80107e2 <tcp_write+0x54e>
  38630. if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE) == 0)) {
  38631. 8010744: 2f00 cmp r7, #0
  38632. 8010746: f43f af6b beq.w 8010620 <tcp_write+0x38c>
  38633. 801074a: 693b ldr r3, [r7, #16]
  38634. 801074c: 2b00 cmp r3, #0
  38635. 801074e: f43f af67 beq.w 8010620 <tcp_write+0x38c>
  38636. 8010752: 9a05 ldr r2, [sp, #20]
  38637. 8010754: f012 0f02 tst.w r2, #2
  38638. 8010758: f47f af62 bne.w 8010620 <tcp_write+0x38c>
  38639. TCPH_SET_FLAG(seg->tcphdr, TCP_PSH);
  38640. 801075c: 899c ldrh r4, [r3, #12]
  38641. 801075e: 2008 movs r0, #8
  38642. 8010760: f7f7 fb8c bl 8007e7c <lwip_htons>
  38643. 8010764: 693b ldr r3, [r7, #16]
  38644. 8010766: 4304 orrs r4, r0
  38645. 8010768: 819c strh r4, [r3, #12]
  38646. 801076a: e759 b.n 8010620 <tcp_write+0x38c>
  38647. LWIP_ASSERT("last_unsent->oversize_left >= oversize_used",
  38648. 801076c: 4b2d ldr r3, [pc, #180] @ (8010824 <tcp_write+0x590>)
  38649. 801076e: f240 22d3 movw r2, #723 @ 0x2d3
  38650. 8010772: 492d ldr r1, [pc, #180] @ (8010828 <tcp_write+0x594>)
  38651. 8010774: 482d ldr r0, [pc, #180] @ (801082c <tcp_write+0x598>)
  38652. 8010776: f002 fe47 bl 8013408 <iprintf>
  38653. 801077a: e7b4 b.n 80106e6 <tcp_write+0x452>
  38654. LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty",
  38655. 801077c: 4b29 ldr r3, [pc, #164] @ (8010824 <tcp_write+0x590>)
  38656. 801077e: f44f 7238 mov.w r2, #736 @ 0x2e0
  38657. 8010782: 492b ldr r1, [pc, #172] @ (8010830 <tcp_write+0x59c>)
  38658. 8010784: 4829 ldr r0, [pc, #164] @ (801082c <tcp_write+0x598>)
  38659. 8010786: f002 fe3f bl 8013408 <iprintf>
  38660. 801078a: e7bb b.n 8010704 <tcp_write+0x470>
  38661. } else if (extendlen > 0) {
  38662. 801078c: 9b0d ldr r3, [sp, #52] @ 0x34
  38663. 801078e: b313 cbz r3, 80107d6 <tcp_write+0x542>
  38664. LWIP_ASSERT("tcp_write: extension of reference requires reference",
  38665. 8010790: 9b08 ldr r3, [sp, #32]
  38666. 8010792: b12b cbz r3, 80107a0 <tcp_write+0x50c>
  38667. 8010794: 685b ldr r3, [r3, #4]
  38668. 8010796: b11b cbz r3, 80107a0 <tcp_write+0x50c>
  38669. for (p = last_unsent->p; p->next != NULL; p = p->next) {
  38670. 8010798: 9b08 ldr r3, [sp, #32]
  38671. 801079a: 685b ldr r3, [r3, #4]
  38672. 801079c: 980d ldr r0, [sp, #52] @ 0x34
  38673. 801079e: e00b b.n 80107b8 <tcp_write+0x524>
  38674. LWIP_ASSERT("tcp_write: extension of reference requires reference",
  38675. 80107a0: 4b20 ldr r3, [pc, #128] @ (8010824 <tcp_write+0x590>)
  38676. 80107a2: f240 22e6 movw r2, #742 @ 0x2e6
  38677. 80107a6: 4923 ldr r1, [pc, #140] @ (8010834 <tcp_write+0x5a0>)
  38678. 80107a8: 4820 ldr r0, [pc, #128] @ (801082c <tcp_write+0x598>)
  38679. 80107aa: f002 fe2d bl 8013408 <iprintf>
  38680. 80107ae: e7f3 b.n 8010798 <tcp_write+0x504>
  38681. p->tot_len += extendlen;
  38682. 80107b0: 891a ldrh r2, [r3, #8]
  38683. 80107b2: 4402 add r2, r0
  38684. 80107b4: 811a strh r2, [r3, #8]
  38685. for (p = last_unsent->p; p->next != NULL; p = p->next) {
  38686. 80107b6: 460b mov r3, r1
  38687. 80107b8: 6819 ldr r1, [r3, #0]
  38688. 80107ba: 2900 cmp r1, #0
  38689. 80107bc: d1f8 bne.n 80107b0 <tcp_write+0x51c>
  38690. p->tot_len += extendlen;
  38691. 80107be: 891a ldrh r2, [r3, #8]
  38692. 80107c0: 990d ldr r1, [sp, #52] @ 0x34
  38693. 80107c2: 440a add r2, r1
  38694. 80107c4: 811a strh r2, [r3, #8]
  38695. p->len += extendlen;
  38696. 80107c6: 895a ldrh r2, [r3, #10]
  38697. 80107c8: 440a add r2, r1
  38698. 80107ca: 815a strh r2, [r3, #10]
  38699. last_unsent->len += extendlen;
  38700. 80107cc: 9a08 ldr r2, [sp, #32]
  38701. 80107ce: 8913 ldrh r3, [r2, #8]
  38702. 80107d0: 440b add r3, r1
  38703. 80107d2: 8113 strh r3, [r2, #8]
  38704. if (last_unsent == NULL) {
  38705. 80107d4: e7a2 b.n 801071c <tcp_write+0x488>
  38706. 80107d6: 9b08 ldr r3, [sp, #32]
  38707. 80107d8: 2b00 cmp r3, #0
  38708. 80107da: d19f bne.n 801071c <tcp_write+0x488>
  38709. pcb->unsent = queue;
  38710. 80107dc: f8c8 506c str.w r5, [r8, #108] @ 0x6c
  38711. 80107e0: e79e b.n 8010720 <tcp_write+0x48c>
  38712. LWIP_ASSERT("tcp_write: valid queue length",
  38713. 80107e2: f8d8 306c ldr.w r3, [r8, #108] @ 0x6c
  38714. 80107e6: 2b00 cmp r3, #0
  38715. 80107e8: d1ac bne.n 8010744 <tcp_write+0x4b0>
  38716. 80107ea: 4b0e ldr r3, [pc, #56] @ (8010824 <tcp_write+0x590>)
  38717. 80107ec: f240 3212 movw r2, #786 @ 0x312
  38718. 80107f0: 4911 ldr r1, [pc, #68] @ (8010838 <tcp_write+0x5a4>)
  38719. 80107f2: 480e ldr r0, [pc, #56] @ (801082c <tcp_write+0x598>)
  38720. 80107f4: f002 fe08 bl 8013408 <iprintf>
  38721. 80107f8: e7a4 b.n 8010744 <tcp_write+0x4b0>
  38722. struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL;
  38723. 80107fa: 9d0a ldr r5, [sp, #40] @ 0x28
  38724. 80107fc: e6f0 b.n 80105e0 <tcp_write+0x34c>
  38725. 80107fe: 9d0a ldr r5, [sp, #40] @ 0x28
  38726. 8010800: e6ee b.n 80105e0 <tcp_write+0x34c>
  38727. LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL ||
  38728. 8010802: 4b08 ldr r3, [pc, #32] @ (8010824 <tcp_write+0x590>)
  38729. 8010804: f240 3227 movw r2, #807 @ 0x327
  38730. 8010808: 490b ldr r1, [pc, #44] @ (8010838 <tcp_write+0x5a4>)
  38731. 801080a: 4808 ldr r0, [pc, #32] @ (801082c <tcp_write+0x598>)
  38732. 801080c: f002 fdfc bl 8013408 <iprintf>
  38733. return ERR_MEM;
  38734. 8010810: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
  38735. 8010814: e704 b.n 8010620 <tcp_write+0x38c>
  38736. 8010816: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
  38737. 801081a: e701 b.n 8010620 <tcp_write+0x38c>
  38738. 801081c: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff
  38739. 8010820: e6fe b.n 8010620 <tcp_write+0x38c>
  38740. 8010822: bf00 nop
  38741. 8010824: 080170ec .word 0x080170ec
  38742. 8010828: 08017574 .word 0x08017574
  38743. 801082c: 080144e8 .word 0x080144e8
  38744. 8010830: 080175a0 .word 0x080175a0
  38745. 8010834: 080175d8 .word 0x080175d8
  38746. 8010838: 08017610 .word 0x08017610
  38747. 0801083c <tcp_split_unsent_seg>:
  38748. {
  38749. 801083c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  38750. 8010840: b083 sub sp, #12
  38751. 8010842: 460c mov r4, r1
  38752. LWIP_ASSERT("tcp_split_unsent_seg: invalid pcb", pcb != NULL);
  38753. 8010844: 4607 mov r7, r0
  38754. 8010846: 2800 cmp r0, #0
  38755. 8010848: d03d beq.n 80108c6 <tcp_split_unsent_seg+0x8a>
  38756. useg = pcb->unsent;
  38757. 801084a: 6efd ldr r5, [r7, #108] @ 0x6c
  38758. if (useg == NULL) {
  38759. 801084c: 2d00 cmp r5, #0
  38760. 801084e: f000 80bd beq.w 80109cc <tcp_split_unsent_seg+0x190>
  38761. if (split == 0) {
  38762. 8010852: 2c00 cmp r4, #0
  38763. 8010854: d03f beq.n 80108d6 <tcp_split_unsent_seg+0x9a>
  38764. if (useg->len <= split) {
  38765. 8010856: 892b ldrh r3, [r5, #8]
  38766. 8010858: 42a3 cmp r3, r4
  38767. 801085a: f240 80ba bls.w 80109d2 <tcp_split_unsent_seg+0x196>
  38768. LWIP_ASSERT("split <= mss", split <= pcb->mss);
  38769. 801085e: 8e7b ldrh r3, [r7, #50] @ 0x32
  38770. 8010860: 42a3 cmp r3, r4
  38771. 8010862: d342 bcc.n 80108ea <tcp_split_unsent_seg+0xae>
  38772. LWIP_ASSERT("useg->len > 0", useg->len > 0);
  38773. 8010864: 892b ldrh r3, [r5, #8]
  38774. 8010866: 2b00 cmp r3, #0
  38775. 8010868: d047 beq.n 80108fa <tcp_split_unsent_seg+0xbe>
  38776. optflags = useg->flags;
  38777. 801086a: f895 900c ldrb.w r9, [r5, #12]
  38778. optlen = LWIP_TCP_OPT_LENGTH(optflags);
  38779. 801086e: ea4f 0b89 mov.w fp, r9, lsl #2
  38780. 8010872: f00b 0b04 and.w fp, fp, #4
  38781. remainder = useg->len - split;
  38782. 8010876: f8b5 a008 ldrh.w sl, [r5, #8]
  38783. 801087a: ebaa 0604 sub.w r6, sl, r4
  38784. 801087e: b2b6 uxth r6, r6
  38785. p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM);
  38786. 8010880: eb0b 0106 add.w r1, fp, r6
  38787. 8010884: f44f 7220 mov.w r2, #640 @ 0x280
  38788. 8010888: b289 uxth r1, r1
  38789. 801088a: 2036 movs r0, #54 @ 0x36
  38790. 801088c: f7fb faf0 bl 800be70 <pbuf_alloc>
  38791. if (p == NULL) {
  38792. 8010890: 4680 mov r8, r0
  38793. 8010892: b170 cbz r0, 80108b2 <tcp_split_unsent_seg+0x76>
  38794. offset = useg->p->tot_len - useg->len + split;
  38795. 8010894: 6868 ldr r0, [r5, #4]
  38796. 8010896: 8903 ldrh r3, [r0, #8]
  38797. 8010898: 892a ldrh r2, [r5, #8]
  38798. 801089a: 1a9b subs r3, r3, r2
  38799. 801089c: fa14 f383 uxtah r3, r4, r3
  38800. if (pbuf_copy_partial(useg->p, (u8_t *)p->payload + optlen, remainder, offset ) != remainder) {
  38801. 80108a0: f8d8 1004 ldr.w r1, [r8, #4]
  38802. 80108a4: b29b uxth r3, r3
  38803. 80108a6: 4632 mov r2, r6
  38804. 80108a8: 4459 add r1, fp
  38805. 80108aa: f7fb fcfb bl 800c2a4 <pbuf_copy_partial>
  38806. 80108ae: 42b0 cmp r0, r6
  38807. 80108b0: d02b beq.n 801090a <tcp_split_unsent_seg+0xce>
  38808. if (p != NULL) {
  38809. 80108b2: f1b8 0f00 cmp.w r8, #0
  38810. 80108b6: f000 8090 beq.w 80109da <tcp_split_unsent_seg+0x19e>
  38811. pbuf_free(p);
  38812. 80108ba: 4640 mov r0, r8
  38813. 80108bc: f7fb fa70 bl 800bda0 <pbuf_free>
  38814. return ERR_MEM;
  38815. 80108c0: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  38816. 80108c4: e086 b.n 80109d4 <tcp_split_unsent_seg+0x198>
  38817. LWIP_ASSERT("tcp_split_unsent_seg: invalid pcb", pcb != NULL);
  38818. 80108c6: 4b46 ldr r3, [pc, #280] @ (80109e0 <tcp_split_unsent_seg+0x1a4>)
  38819. 80108c8: f240 324b movw r2, #843 @ 0x34b
  38820. 80108cc: 4945 ldr r1, [pc, #276] @ (80109e4 <tcp_split_unsent_seg+0x1a8>)
  38821. 80108ce: 4846 ldr r0, [pc, #280] @ (80109e8 <tcp_split_unsent_seg+0x1ac>)
  38822. 80108d0: f002 fd9a bl 8013408 <iprintf>
  38823. 80108d4: e7b9 b.n 801084a <tcp_split_unsent_seg+0xe>
  38824. LWIP_ASSERT("Can't split segment into length 0", 0);
  38825. 80108d6: 4b42 ldr r3, [pc, #264] @ (80109e0 <tcp_split_unsent_seg+0x1a4>)
  38826. 80108d8: f240 3253 movw r2, #851 @ 0x353
  38827. 80108dc: 4943 ldr r1, [pc, #268] @ (80109ec <tcp_split_unsent_seg+0x1b0>)
  38828. 80108de: 4842 ldr r0, [pc, #264] @ (80109e8 <tcp_split_unsent_seg+0x1ac>)
  38829. 80108e0: f002 fd92 bl 8013408 <iprintf>
  38830. return ERR_VAL;
  38831. 80108e4: f06f 0005 mvn.w r0, #5
  38832. 80108e8: e074 b.n 80109d4 <tcp_split_unsent_seg+0x198>
  38833. LWIP_ASSERT("split <= mss", split <= pcb->mss);
  38834. 80108ea: 4b3d ldr r3, [pc, #244] @ (80109e0 <tcp_split_unsent_seg+0x1a4>)
  38835. 80108ec: f240 325b movw r2, #859 @ 0x35b
  38836. 80108f0: 493f ldr r1, [pc, #252] @ (80109f0 <tcp_split_unsent_seg+0x1b4>)
  38837. 80108f2: 483d ldr r0, [pc, #244] @ (80109e8 <tcp_split_unsent_seg+0x1ac>)
  38838. 80108f4: f002 fd88 bl 8013408 <iprintf>
  38839. 80108f8: e7b4 b.n 8010864 <tcp_split_unsent_seg+0x28>
  38840. LWIP_ASSERT("useg->len > 0", useg->len > 0);
  38841. 80108fa: 4b39 ldr r3, [pc, #228] @ (80109e0 <tcp_split_unsent_seg+0x1a4>)
  38842. 80108fc: f44f 7257 mov.w r2, #860 @ 0x35c
  38843. 8010900: 493c ldr r1, [pc, #240] @ (80109f4 <tcp_split_unsent_seg+0x1b8>)
  38844. 8010902: 4839 ldr r0, [pc, #228] @ (80109e8 <tcp_split_unsent_seg+0x1ac>)
  38845. 8010904: f002 fd80 bl 8013408 <iprintf>
  38846. 8010908: e7af b.n 801086a <tcp_split_unsent_seg+0x2e>
  38847. split_flags = TCPH_FLAGS(useg->tcphdr);
  38848. 801090a: 692b ldr r3, [r5, #16]
  38849. 801090c: 8998 ldrh r0, [r3, #12]
  38850. 801090e: f7f7 fab5 bl 8007e7c <lwip_htons>
  38851. 8010912: b2c3 uxtb r3, r0
  38852. 8010914: f000 063f and.w r6, r0, #63 @ 0x3f
  38853. if (split_flags & TCP_PSH) {
  38854. 8010918: f010 0b08 ands.w fp, r0, #8
  38855. 801091c: d003 beq.n 8010926 <tcp_split_unsent_seg+0xea>
  38856. split_flags &= ~TCP_PSH;
  38857. 801091e: f003 0637 and.w r6, r3, #55 @ 0x37
  38858. remainder_flags |= TCP_PSH;
  38859. 8010922: f04f 0b08 mov.w fp, #8
  38860. if (split_flags & TCP_FIN) {
  38861. 8010926: f016 0f01 tst.w r6, #1
  38862. 801092a: d003 beq.n 8010934 <tcp_split_unsent_seg+0xf8>
  38863. split_flags &= ~TCP_FIN;
  38864. 801092c: f006 06fe and.w r6, r6, #254 @ 0xfe
  38865. remainder_flags |= TCP_FIN;
  38866. 8010930: f04b 0b01 orr.w fp, fp, #1
  38867. seg = tcp_create_segment(pcb, p, remainder_flags, lwip_ntohl(useg->tcphdr->seqno) + split, optflags);
  38868. 8010934: 692b ldr r3, [r5, #16]
  38869. 8010936: 6858 ldr r0, [r3, #4]
  38870. 8010938: f7f7 faa5 bl 8007e86 <lwip_htonl>
  38871. 801093c: f8cd 9000 str.w r9, [sp]
  38872. 8010940: 1823 adds r3, r4, r0
  38873. 8010942: 465a mov r2, fp
  38874. 8010944: 4641 mov r1, r8
  38875. 8010946: 4638 mov r0, r7
  38876. 8010948: f7ff fad8 bl 800fefc <tcp_create_segment>
  38877. if (seg == NULL) {
  38878. 801094c: 4681 mov r9, r0
  38879. 801094e: 2800 cmp r0, #0
  38880. 8010950: d0af beq.n 80108b2 <tcp_split_unsent_seg+0x76>
  38881. pcb->snd_queuelen -= pbuf_clen(useg->p);
  38882. 8010952: 6868 ldr r0, [r5, #4]
  38883. 8010954: f7fb fba9 bl 800c0aa <pbuf_clen>
  38884. 8010958: f8b7 3066 ldrh.w r3, [r7, #102] @ 0x66
  38885. 801095c: 1a1b subs r3, r3, r0
  38886. 801095e: f8a7 3066 strh.w r3, [r7, #102] @ 0x66
  38887. pbuf_realloc(useg->p, useg->p->tot_len - remainder);
  38888. 8010962: 6868 ldr r0, [r5, #4]
  38889. 8010964: 8901 ldrh r1, [r0, #8]
  38890. 8010966: eba4 040a sub.w r4, r4, sl
  38891. 801096a: b2a4 uxth r4, r4
  38892. 801096c: 4421 add r1, r4
  38893. 801096e: b289 uxth r1, r1
  38894. 8010970: f7fb fb2c bl 800bfcc <pbuf_realloc>
  38895. useg->len -= remainder;
  38896. 8010974: 892b ldrh r3, [r5, #8]
  38897. 8010976: 4423 add r3, r4
  38898. 8010978: 812b strh r3, [r5, #8]
  38899. TCPH_SET_FLAG(useg->tcphdr, split_flags);
  38900. 801097a: 692b ldr r3, [r5, #16]
  38901. 801097c: 899c ldrh r4, [r3, #12]
  38902. 801097e: 4630 mov r0, r6
  38903. 8010980: f7f7 fa7c bl 8007e7c <lwip_htons>
  38904. 8010984: 692b ldr r3, [r5, #16]
  38905. 8010986: 4304 orrs r4, r0
  38906. 8010988: 819c strh r4, [r3, #12]
  38907. useg->oversize_left = 0;
  38908. 801098a: 2300 movs r3, #0
  38909. 801098c: 816b strh r3, [r5, #10]
  38910. pcb->snd_queuelen += pbuf_clen(useg->p);
  38911. 801098e: 6868 ldr r0, [r5, #4]
  38912. 8010990: f7fb fb8b bl 800c0aa <pbuf_clen>
  38913. 8010994: f8b7 3066 ldrh.w r3, [r7, #102] @ 0x66
  38914. 8010998: 4403 add r3, r0
  38915. 801099a: f8a7 3066 strh.w r3, [r7, #102] @ 0x66
  38916. pcb->snd_queuelen += pbuf_clen(seg->p);
  38917. 801099e: f8d9 0004 ldr.w r0, [r9, #4]
  38918. 80109a2: f7fb fb82 bl 800c0aa <pbuf_clen>
  38919. 80109a6: f8b7 3066 ldrh.w r3, [r7, #102] @ 0x66
  38920. 80109aa: 4403 add r3, r0
  38921. 80109ac: f8a7 3066 strh.w r3, [r7, #102] @ 0x66
  38922. seg->next = useg->next;
  38923. 80109b0: 682b ldr r3, [r5, #0]
  38924. 80109b2: f8c9 3000 str.w r3, [r9]
  38925. useg->next = seg;
  38926. 80109b6: f8c5 9000 str.w r9, [r5]
  38927. if (seg->next == NULL) {
  38928. 80109ba: f8d9 3000 ldr.w r3, [r9]
  38929. 80109be: b10b cbz r3, 80109c4 <tcp_split_unsent_seg+0x188>
  38930. return ERR_OK;
  38931. 80109c0: 2000 movs r0, #0
  38932. 80109c2: e007 b.n 80109d4 <tcp_split_unsent_seg+0x198>
  38933. pcb->unsent_oversize = 0;
  38934. 80109c4: 2000 movs r0, #0
  38935. 80109c6: f8a7 0068 strh.w r0, [r7, #104] @ 0x68
  38936. 80109ca: e003 b.n 80109d4 <tcp_split_unsent_seg+0x198>
  38937. return ERR_MEM;
  38938. 80109cc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  38939. 80109d0: e000 b.n 80109d4 <tcp_split_unsent_seg+0x198>
  38940. return ERR_OK;
  38941. 80109d2: 2000 movs r0, #0
  38942. }
  38943. 80109d4: b003 add sp, #12
  38944. 80109d6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  38945. return ERR_MEM;
  38946. 80109da: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  38947. 80109de: e7f9 b.n 80109d4 <tcp_split_unsent_seg+0x198>
  38948. 80109e0: 080170ec .word 0x080170ec
  38949. 80109e4: 08017630 .word 0x08017630
  38950. 80109e8: 080144e8 .word 0x080144e8
  38951. 80109ec: 08017654 .word 0x08017654
  38952. 80109f0: 08017678 .word 0x08017678
  38953. 80109f4: 08017688 .word 0x08017688
  38954. 080109f8 <tcp_enqueue_flags>:
  38955. {
  38956. 80109f8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
  38957. 80109fc: b083 sub sp, #12
  38958. 80109fe: 4604 mov r4, r0
  38959. 8010a00: 460d mov r5, r1
  38960. LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)",
  38961. 8010a02: f011 0703 ands.w r7, r1, #3
  38962. 8010a06: d04e beq.n 8010aa6 <tcp_enqueue_flags+0xae>
  38963. LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL);
  38964. 8010a08: 2c00 cmp r4, #0
  38965. 8010a0a: d054 beq.n 8010ab6 <tcp_enqueue_flags+0xbe>
  38966. if (flags & TCP_SYN) {
  38967. 8010a0c: f015 0802 ands.w r8, r5, #2
  38968. 8010a10: d001 beq.n 8010a16 <tcp_enqueue_flags+0x1e>
  38969. optflags = TF_SEG_OPTS_MSS;
  38970. 8010a12: f04f 0801 mov.w r8, #1
  38971. optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb);
  38972. 8010a16: ea4f 0688 mov.w r6, r8, lsl #2
  38973. 8010a1a: f006 0604 and.w r6, r6, #4
  38974. if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) {
  38975. 8010a1e: f44f 7220 mov.w r2, #640 @ 0x280
  38976. 8010a22: 4631 mov r1, r6
  38977. 8010a24: 2036 movs r0, #54 @ 0x36
  38978. 8010a26: f7fb fa23 bl 800be70 <pbuf_alloc>
  38979. 8010a2a: 4681 mov r9, r0
  38980. 8010a2c: 2800 cmp r0, #0
  38981. 8010a2e: d04a beq.n 8010ac6 <tcp_enqueue_flags+0xce>
  38982. LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
  38983. 8010a30: 8943 ldrh r3, [r0, #10]
  38984. 8010a32: 429e cmp r6, r3
  38985. 8010a34: d84e bhi.n 8010ad4 <tcp_enqueue_flags+0xdc>
  38986. if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) {
  38987. 8010a36: f8cd 8000 str.w r8, [sp]
  38988. 8010a3a: 6de3 ldr r3, [r4, #92] @ 0x5c
  38989. 8010a3c: 462a mov r2, r5
  38990. 8010a3e: 4649 mov r1, r9
  38991. 8010a40: 4620 mov r0, r4
  38992. 8010a42: f7ff fa5b bl 800fefc <tcp_create_segment>
  38993. 8010a46: 4606 mov r6, r0
  38994. 8010a48: 2800 cmp r0, #0
  38995. 8010a4a: d04b beq.n 8010ae4 <tcp_enqueue_flags+0xec>
  38996. LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0);
  38997. 8010a4c: 6903 ldr r3, [r0, #16]
  38998. 8010a4e: f013 0f03 tst.w r3, #3
  38999. 8010a52: d14e bne.n 8010af2 <tcp_enqueue_flags+0xfa>
  39000. LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
  39001. 8010a54: 8933 ldrh r3, [r6, #8]
  39002. 8010a56: 2b00 cmp r3, #0
  39003. 8010a58: d153 bne.n 8010b02 <tcp_enqueue_flags+0x10a>
  39004. if (pcb->unsent == NULL) {
  39005. 8010a5a: 6ee3 ldr r3, [r4, #108] @ 0x6c
  39006. 8010a5c: 2b00 cmp r3, #0
  39007. 8010a5e: d058 beq.n 8010b12 <tcp_enqueue_flags+0x11a>
  39008. for (useg = pcb->unsent; useg->next != NULL; useg = useg->next);
  39009. 8010a60: 461a mov r2, r3
  39010. 8010a62: 681b ldr r3, [r3, #0]
  39011. 8010a64: 2b00 cmp r3, #0
  39012. 8010a66: d1fb bne.n 8010a60 <tcp_enqueue_flags+0x68>
  39013. useg->next = seg;
  39014. 8010a68: 6016 str r6, [r2, #0]
  39015. pcb->unsent_oversize = 0;
  39016. 8010a6a: 2300 movs r3, #0
  39017. 8010a6c: f8a4 3068 strh.w r3, [r4, #104] @ 0x68
  39018. if ((flags & TCP_SYN) || (flags & TCP_FIN)) {
  39019. 8010a70: b117 cbz r7, 8010a78 <tcp_enqueue_flags+0x80>
  39020. pcb->snd_lbb++;
  39021. 8010a72: 6de3 ldr r3, [r4, #92] @ 0x5c
  39022. 8010a74: 3301 adds r3, #1
  39023. 8010a76: 65e3 str r3, [r4, #92] @ 0x5c
  39024. if (flags & TCP_FIN) {
  39025. 8010a78: f015 0f01 tst.w r5, #1
  39026. 8010a7c: d003 beq.n 8010a86 <tcp_enqueue_flags+0x8e>
  39027. tcp_set_flags(pcb, TF_FIN);
  39028. 8010a7e: 8b63 ldrh r3, [r4, #26]
  39029. 8010a80: f043 0320 orr.w r3, r3, #32
  39030. 8010a84: 8363 strh r3, [r4, #26]
  39031. pcb->snd_queuelen += pbuf_clen(seg->p);
  39032. 8010a86: 6870 ldr r0, [r6, #4]
  39033. 8010a88: f7fb fb0f bl 800c0aa <pbuf_clen>
  39034. 8010a8c: f8b4 3066 ldrh.w r3, [r4, #102] @ 0x66
  39035. 8010a90: 4418 add r0, r3
  39036. 8010a92: b280 uxth r0, r0
  39037. 8010a94: f8a4 0066 strh.w r0, [r4, #102] @ 0x66
  39038. if (pcb->snd_queuelen != 0) {
  39039. 8010a98: 2800 cmp r0, #0
  39040. 8010a9a: d049 beq.n 8010b30 <tcp_enqueue_flags+0x138>
  39041. LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
  39042. 8010a9c: 6f23 ldr r3, [r4, #112] @ 0x70
  39043. 8010a9e: 2b00 cmp r3, #0
  39044. 8010aa0: d039 beq.n 8010b16 <tcp_enqueue_flags+0x11e>
  39045. return ERR_OK;
  39046. 8010aa2: 2000 movs r0, #0
  39047. 8010aa4: e045 b.n 8010b32 <tcp_enqueue_flags+0x13a>
  39048. LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)",
  39049. 8010aa6: 4b24 ldr r3, [pc, #144] @ (8010b38 <tcp_enqueue_flags+0x140>)
  39050. 8010aa8: f240 4211 movw r2, #1041 @ 0x411
  39051. 8010aac: 4923 ldr r1, [pc, #140] @ (8010b3c <tcp_enqueue_flags+0x144>)
  39052. 8010aae: 4824 ldr r0, [pc, #144] @ (8010b40 <tcp_enqueue_flags+0x148>)
  39053. 8010ab0: f002 fcaa bl 8013408 <iprintf>
  39054. 8010ab4: e7a8 b.n 8010a08 <tcp_enqueue_flags+0x10>
  39055. LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL);
  39056. 8010ab6: 4b20 ldr r3, [pc, #128] @ (8010b38 <tcp_enqueue_flags+0x140>)
  39057. 8010ab8: f240 4213 movw r2, #1043 @ 0x413
  39058. 8010abc: 4921 ldr r1, [pc, #132] @ (8010b44 <tcp_enqueue_flags+0x14c>)
  39059. 8010abe: 4820 ldr r0, [pc, #128] @ (8010b40 <tcp_enqueue_flags+0x148>)
  39060. 8010ac0: f002 fca2 bl 8013408 <iprintf>
  39061. 8010ac4: e7a2 b.n 8010a0c <tcp_enqueue_flags+0x14>
  39062. tcp_set_flags(pcb, TF_NAGLEMEMERR);
  39063. 8010ac6: 8b63 ldrh r3, [r4, #26]
  39064. 8010ac8: f043 0380 orr.w r3, r3, #128 @ 0x80
  39065. 8010acc: 8363 strh r3, [r4, #26]
  39066. return ERR_MEM;
  39067. 8010ace: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  39068. 8010ad2: e02e b.n 8010b32 <tcp_enqueue_flags+0x13a>
  39069. LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen",
  39070. 8010ad4: 4b18 ldr r3, [pc, #96] @ (8010b38 <tcp_enqueue_flags+0x140>)
  39071. 8010ad6: f240 4239 movw r2, #1081 @ 0x439
  39072. 8010ada: 491b ldr r1, [pc, #108] @ (8010b48 <tcp_enqueue_flags+0x150>)
  39073. 8010adc: 4818 ldr r0, [pc, #96] @ (8010b40 <tcp_enqueue_flags+0x148>)
  39074. 8010ade: f002 fc93 bl 8013408 <iprintf>
  39075. 8010ae2: e7a8 b.n 8010a36 <tcp_enqueue_flags+0x3e>
  39076. tcp_set_flags(pcb, TF_NAGLEMEMERR);
  39077. 8010ae4: 8b63 ldrh r3, [r4, #26]
  39078. 8010ae6: f043 0380 orr.w r3, r3, #128 @ 0x80
  39079. 8010aea: 8363 strh r3, [r4, #26]
  39080. return ERR_MEM;
  39081. 8010aec: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  39082. 8010af0: e01f b.n 8010b32 <tcp_enqueue_flags+0x13a>
  39083. LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0);
  39084. 8010af2: 4b11 ldr r3, [pc, #68] @ (8010b38 <tcp_enqueue_flags+0x140>)
  39085. 8010af4: f240 4242 movw r2, #1090 @ 0x442
  39086. 8010af8: 4914 ldr r1, [pc, #80] @ (8010b4c <tcp_enqueue_flags+0x154>)
  39087. 8010afa: 4811 ldr r0, [pc, #68] @ (8010b40 <tcp_enqueue_flags+0x148>)
  39088. 8010afc: f002 fc84 bl 8013408 <iprintf>
  39089. 8010b00: e7a8 b.n 8010a54 <tcp_enqueue_flags+0x5c>
  39090. LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0);
  39091. 8010b02: 4b0d ldr r3, [pc, #52] @ (8010b38 <tcp_enqueue_flags+0x140>)
  39092. 8010b04: f240 4243 movw r2, #1091 @ 0x443
  39093. 8010b08: 4911 ldr r1, [pc, #68] @ (8010b50 <tcp_enqueue_flags+0x158>)
  39094. 8010b0a: 480d ldr r0, [pc, #52] @ (8010b40 <tcp_enqueue_flags+0x148>)
  39095. 8010b0c: f002 fc7c bl 8013408 <iprintf>
  39096. 8010b10: e7a3 b.n 8010a5a <tcp_enqueue_flags+0x62>
  39097. pcb->unsent = seg;
  39098. 8010b12: 66e6 str r6, [r4, #108] @ 0x6c
  39099. 8010b14: e7a9 b.n 8010a6a <tcp_enqueue_flags+0x72>
  39100. LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
  39101. 8010b16: 6ee3 ldr r3, [r4, #108] @ 0x6c
  39102. 8010b18: b10b cbz r3, 8010b1e <tcp_enqueue_flags+0x126>
  39103. return ERR_OK;
  39104. 8010b1a: 2000 movs r0, #0
  39105. 8010b1c: e009 b.n 8010b32 <tcp_enqueue_flags+0x13a>
  39106. LWIP_ASSERT("tcp_enqueue_flags: invalid queue length",
  39107. 8010b1e: 4b06 ldr r3, [pc, #24] @ (8010b38 <tcp_enqueue_flags+0x140>)
  39108. 8010b20: f240 4265 movw r2, #1125 @ 0x465
  39109. 8010b24: 490b ldr r1, [pc, #44] @ (8010b54 <tcp_enqueue_flags+0x15c>)
  39110. 8010b26: 4806 ldr r0, [pc, #24] @ (8010b40 <tcp_enqueue_flags+0x148>)
  39111. 8010b28: f002 fc6e bl 8013408 <iprintf>
  39112. return ERR_OK;
  39113. 8010b2c: 2000 movs r0, #0
  39114. 8010b2e: e000 b.n 8010b32 <tcp_enqueue_flags+0x13a>
  39115. 8010b30: 2000 movs r0, #0
  39116. }
  39117. 8010b32: b003 add sp, #12
  39118. 8010b34: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
  39119. 8010b38: 080170ec .word 0x080170ec
  39120. 8010b3c: 08017698 .word 0x08017698
  39121. 8010b40: 080144e8 .word 0x080144e8
  39122. 8010b44: 080176f0 .word 0x080176f0
  39123. 8010b48: 08017710 .word 0x08017710
  39124. 8010b4c: 0801774c .word 0x0801774c
  39125. 8010b50: 08017764 .word 0x08017764
  39126. 8010b54: 08017790 .word 0x08017790
  39127. 08010b58 <tcp_send_fin>:
  39128. {
  39129. 8010b58: b570 push {r4, r5, r6, lr}
  39130. LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
  39131. 8010b5a: 4605 mov r5, r0
  39132. 8010b5c: b188 cbz r0, 8010b82 <tcp_send_fin+0x2a>
  39133. if (pcb->unsent != NULL) {
  39134. 8010b5e: 6eeb ldr r3, [r5, #108] @ 0x6c
  39135. 8010b60: b153 cbz r3, 8010b78 <tcp_send_fin+0x20>
  39136. for (last_unsent = pcb->unsent; last_unsent->next != NULL;
  39137. 8010b62: 461c mov r4, r3
  39138. 8010b64: 681b ldr r3, [r3, #0]
  39139. 8010b66: 2b00 cmp r3, #0
  39140. 8010b68: d1fb bne.n 8010b62 <tcp_send_fin+0xa>
  39141. if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) {
  39142. 8010b6a: 6923 ldr r3, [r4, #16]
  39143. 8010b6c: 8998 ldrh r0, [r3, #12]
  39144. 8010b6e: f7f7 f985 bl 8007e7c <lwip_htons>
  39145. 8010b72: f010 0f07 tst.w r0, #7
  39146. 8010b76: d00c beq.n 8010b92 <tcp_send_fin+0x3a>
  39147. return tcp_enqueue_flags(pcb, TCP_FIN);
  39148. 8010b78: 2101 movs r1, #1
  39149. 8010b7a: 4628 mov r0, r5
  39150. 8010b7c: f7ff ff3c bl 80109f8 <tcp_enqueue_flags>
  39151. }
  39152. 8010b80: bd70 pop {r4, r5, r6, pc}
  39153. LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL);
  39154. 8010b82: 4b0b ldr r3, [pc, #44] @ (8010bb0 <tcp_send_fin+0x58>)
  39155. 8010b84: f240 32eb movw r2, #1003 @ 0x3eb
  39156. 8010b88: 490a ldr r1, [pc, #40] @ (8010bb4 <tcp_send_fin+0x5c>)
  39157. 8010b8a: 480b ldr r0, [pc, #44] @ (8010bb8 <tcp_send_fin+0x60>)
  39158. 8010b8c: f002 fc3c bl 8013408 <iprintf>
  39159. 8010b90: e7e5 b.n 8010b5e <tcp_send_fin+0x6>
  39160. TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN);
  39161. 8010b92: 6923 ldr r3, [r4, #16]
  39162. 8010b94: 899e ldrh r6, [r3, #12]
  39163. 8010b96: 2001 movs r0, #1
  39164. 8010b98: f7f7 f970 bl 8007e7c <lwip_htons>
  39165. 8010b9c: 6923 ldr r3, [r4, #16]
  39166. 8010b9e: 4306 orrs r6, r0
  39167. 8010ba0: 819e strh r6, [r3, #12]
  39168. tcp_set_flags(pcb, TF_FIN);
  39169. 8010ba2: 8b6b ldrh r3, [r5, #26]
  39170. 8010ba4: f043 0320 orr.w r3, r3, #32
  39171. 8010ba8: 836b strh r3, [r5, #26]
  39172. return ERR_OK;
  39173. 8010baa: 2000 movs r0, #0
  39174. 8010bac: e7e8 b.n 8010b80 <tcp_send_fin+0x28>
  39175. 8010bae: bf00 nop
  39176. 8010bb0: 080170ec .word 0x080170ec
  39177. 8010bb4: 080177b8 .word 0x080177b8
  39178. 8010bb8: 080144e8 .word 0x080144e8
  39179. 08010bbc <tcp_rexmit_rto_prepare>:
  39180. {
  39181. 8010bbc: b5f8 push {r3, r4, r5, r6, r7, lr}
  39182. LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL);
  39183. 8010bbe: 4605 mov r5, r0
  39184. 8010bc0: b158 cbz r0, 8010bda <tcp_rexmit_rto_prepare+0x1e>
  39185. if (pcb->unacked == NULL) {
  39186. 8010bc2: 6f2c ldr r4, [r5, #112] @ 0x70
  39187. 8010bc4: 2c00 cmp r4, #0
  39188. 8010bc6: d039 beq.n 8010c3c <tcp_rexmit_rto_prepare+0x80>
  39189. for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
  39190. 8010bc8: 6823 ldr r3, [r4, #0]
  39191. 8010bca: b173 cbz r3, 8010bea <tcp_rexmit_rto_prepare+0x2e>
  39192. if (tcp_output_segment_busy(seg)) {
  39193. 8010bcc: 4620 mov r0, r4
  39194. 8010bce: f7ff f8f7 bl 800fdc0 <tcp_output_segment_busy>
  39195. 8010bd2: 2800 cmp r0, #0
  39196. 8010bd4: d135 bne.n 8010c42 <tcp_rexmit_rto_prepare+0x86>
  39197. for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) {
  39198. 8010bd6: 6824 ldr r4, [r4, #0]
  39199. 8010bd8: e7f6 b.n 8010bc8 <tcp_rexmit_rto_prepare+0xc>
  39200. LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL);
  39201. 8010bda: 4b1d ldr r3, [pc, #116] @ (8010c50 <tcp_rexmit_rto_prepare+0x94>)
  39202. 8010bdc: f240 6263 movw r2, #1635 @ 0x663
  39203. 8010be0: 491c ldr r1, [pc, #112] @ (8010c54 <tcp_rexmit_rto_prepare+0x98>)
  39204. 8010be2: 481d ldr r0, [pc, #116] @ (8010c58 <tcp_rexmit_rto_prepare+0x9c>)
  39205. 8010be4: f002 fc10 bl 8013408 <iprintf>
  39206. 8010be8: e7eb b.n 8010bc2 <tcp_rexmit_rto_prepare+0x6>
  39207. if (tcp_output_segment_busy(seg)) {
  39208. 8010bea: 4620 mov r0, r4
  39209. 8010bec: f7ff f8e8 bl 800fdc0 <tcp_output_segment_busy>
  39210. 8010bf0: bb50 cbnz r0, 8010c48 <tcp_rexmit_rto_prepare+0x8c>
  39211. seg->next = pcb->unsent;
  39212. 8010bf2: 6eeb ldr r3, [r5, #108] @ 0x6c
  39213. 8010bf4: 6023 str r3, [r4, #0]
  39214. if (pcb->unsent == NULL) {
  39215. 8010bf6: b1db cbz r3, 8010c30 <tcp_rexmit_rto_prepare+0x74>
  39216. pcb->unsent = pcb->unacked;
  39217. 8010bf8: 6f2b ldr r3, [r5, #112] @ 0x70
  39218. 8010bfa: 66eb str r3, [r5, #108] @ 0x6c
  39219. pcb->unacked = NULL;
  39220. 8010bfc: 2300 movs r3, #0
  39221. 8010bfe: 672b str r3, [r5, #112] @ 0x70
  39222. tcp_set_flags(pcb, TF_RTO);
  39223. 8010c00: 8b6b ldrh r3, [r5, #26]
  39224. 8010c02: f443 6300 orr.w r3, r3, #2048 @ 0x800
  39225. 8010c06: 836b strh r3, [r5, #26]
  39226. pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
  39227. 8010c08: 6923 ldr r3, [r4, #16]
  39228. 8010c0a: 6858 ldr r0, [r3, #4]
  39229. 8010c0c: f7f7 f93b bl 8007e86 <lwip_htonl>
  39230. 8010c10: 4606 mov r6, r0
  39231. 8010c12: 8927 ldrh r7, [r4, #8]
  39232. 8010c14: 6923 ldr r3, [r4, #16]
  39233. 8010c16: 8998 ldrh r0, [r3, #12]
  39234. 8010c18: f7f7 f930 bl 8007e7c <lwip_htons>
  39235. 8010c1c: f010 0f03 tst.w r0, #3
  39236. 8010c20: d00a beq.n 8010c38 <tcp_rexmit_rto_prepare+0x7c>
  39237. 8010c22: 2301 movs r3, #1
  39238. 8010c24: 441f add r7, r3
  39239. 8010c26: 443e add r6, r7
  39240. 8010c28: 64ee str r6, [r5, #76] @ 0x4c
  39241. pcb->rttest = 0;
  39242. 8010c2a: 2000 movs r0, #0
  39243. 8010c2c: 6368 str r0, [r5, #52] @ 0x34
  39244. }
  39245. 8010c2e: bdf8 pop {r3, r4, r5, r6, r7, pc}
  39246. pcb->unsent_oversize = seg->oversize_left;
  39247. 8010c30: 8963 ldrh r3, [r4, #10]
  39248. 8010c32: f8a5 3068 strh.w r3, [r5, #104] @ 0x68
  39249. 8010c36: e7df b.n 8010bf8 <tcp_rexmit_rto_prepare+0x3c>
  39250. pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
  39251. 8010c38: 2300 movs r3, #0
  39252. 8010c3a: e7f3 b.n 8010c24 <tcp_rexmit_rto_prepare+0x68>
  39253. return ERR_VAL;
  39254. 8010c3c: f06f 0005 mvn.w r0, #5
  39255. 8010c40: e7f5 b.n 8010c2e <tcp_rexmit_rto_prepare+0x72>
  39256. return ERR_VAL;
  39257. 8010c42: f06f 0005 mvn.w r0, #5
  39258. 8010c46: e7f2 b.n 8010c2e <tcp_rexmit_rto_prepare+0x72>
  39259. return ERR_VAL;
  39260. 8010c48: f06f 0005 mvn.w r0, #5
  39261. 8010c4c: e7ef b.n 8010c2e <tcp_rexmit_rto_prepare+0x72>
  39262. 8010c4e: bf00 nop
  39263. 8010c50: 080170ec .word 0x080170ec
  39264. 8010c54: 080177d4 .word 0x080177d4
  39265. 8010c58: 080144e8 .word 0x080144e8
  39266. 08010c5c <tcp_rexmit>:
  39267. {
  39268. 8010c5c: b5f8 push {r3, r4, r5, r6, r7, lr}
  39269. LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL);
  39270. 8010c5e: 4607 mov r7, r0
  39271. 8010c60: b150 cbz r0, 8010c78 <tcp_rexmit+0x1c>
  39272. if (pcb->unacked == NULL) {
  39273. 8010c62: 6f3e ldr r6, [r7, #112] @ 0x70
  39274. 8010c64: b38e cbz r6, 8010cca <tcp_rexmit+0x6e>
  39275. if (tcp_output_segment_busy(seg)) {
  39276. 8010c66: 4630 mov r0, r6
  39277. 8010c68: f7ff f8aa bl 800fdc0 <tcp_output_segment_busy>
  39278. 8010c6c: bb80 cbnz r0, 8010cd0 <tcp_rexmit+0x74>
  39279. pcb->unacked = seg->next;
  39280. 8010c6e: 6833 ldr r3, [r6, #0]
  39281. 8010c70: 673b str r3, [r7, #112] @ 0x70
  39282. cur_seg = &(pcb->unsent);
  39283. 8010c72: f107 056c add.w r5, r7, #108 @ 0x6c
  39284. while (*cur_seg &&
  39285. 8010c76: e008 b.n 8010c8a <tcp_rexmit+0x2e>
  39286. LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL);
  39287. 8010c78: 4b17 ldr r3, [pc, #92] @ (8010cd8 <tcp_rexmit+0x7c>)
  39288. 8010c7a: f240 62c1 movw r2, #1729 @ 0x6c1
  39289. 8010c7e: 4917 ldr r1, [pc, #92] @ (8010cdc <tcp_rexmit+0x80>)
  39290. 8010c80: 4817 ldr r0, [pc, #92] @ (8010ce0 <tcp_rexmit+0x84>)
  39291. 8010c82: f002 fbc1 bl 8013408 <iprintf>
  39292. 8010c86: e7ec b.n 8010c62 <tcp_rexmit+0x6>
  39293. cur_seg = &((*cur_seg)->next );
  39294. 8010c88: 682d ldr r5, [r5, #0]
  39295. while (*cur_seg &&
  39296. 8010c8a: 682b ldr r3, [r5, #0]
  39297. 8010c8c: b15b cbz r3, 8010ca6 <tcp_rexmit+0x4a>
  39298. TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
  39299. 8010c8e: 691b ldr r3, [r3, #16]
  39300. 8010c90: 6858 ldr r0, [r3, #4]
  39301. 8010c92: f7f7 f8f8 bl 8007e86 <lwip_htonl>
  39302. 8010c96: 4604 mov r4, r0
  39303. 8010c98: 6933 ldr r3, [r6, #16]
  39304. 8010c9a: 6858 ldr r0, [r3, #4]
  39305. 8010c9c: f7f7 f8f3 bl 8007e86 <lwip_htonl>
  39306. 8010ca0: 1a24 subs r4, r4, r0
  39307. while (*cur_seg &&
  39308. 8010ca2: 2c00 cmp r4, #0
  39309. 8010ca4: dbf0 blt.n 8010c88 <tcp_rexmit+0x2c>
  39310. seg->next = *cur_seg;
  39311. 8010ca6: 682b ldr r3, [r5, #0]
  39312. 8010ca8: 6033 str r3, [r6, #0]
  39313. *cur_seg = seg;
  39314. 8010caa: 602e str r6, [r5, #0]
  39315. if (seg->next == NULL) {
  39316. 8010cac: 6833 ldr r3, [r6, #0]
  39317. 8010cae: b14b cbz r3, 8010cc4 <tcp_rexmit+0x68>
  39318. if (pcb->nrtx < 0xFF) {
  39319. 8010cb0: f897 3042 ldrb.w r3, [r7, #66] @ 0x42
  39320. 8010cb4: 2bff cmp r3, #255 @ 0xff
  39321. 8010cb6: d002 beq.n 8010cbe <tcp_rexmit+0x62>
  39322. ++pcb->nrtx;
  39323. 8010cb8: 3301 adds r3, #1
  39324. 8010cba: f887 3042 strb.w r3, [r7, #66] @ 0x42
  39325. pcb->rttest = 0;
  39326. 8010cbe: 2000 movs r0, #0
  39327. 8010cc0: 6378 str r0, [r7, #52] @ 0x34
  39328. }
  39329. 8010cc2: bdf8 pop {r3, r4, r5, r6, r7, pc}
  39330. pcb->unsent_oversize = 0;
  39331. 8010cc4: f8a7 3068 strh.w r3, [r7, #104] @ 0x68
  39332. 8010cc8: e7f2 b.n 8010cb0 <tcp_rexmit+0x54>
  39333. return ERR_VAL;
  39334. 8010cca: f06f 0005 mvn.w r0, #5
  39335. 8010cce: e7f8 b.n 8010cc2 <tcp_rexmit+0x66>
  39336. return ERR_VAL;
  39337. 8010cd0: f06f 0005 mvn.w r0, #5
  39338. 8010cd4: e7f5 b.n 8010cc2 <tcp_rexmit+0x66>
  39339. 8010cd6: bf00 nop
  39340. 8010cd8: 080170ec .word 0x080170ec
  39341. 8010cdc: 080177f8 .word 0x080177f8
  39342. 8010ce0: 080144e8 .word 0x080144e8
  39343. 08010ce4 <tcp_rexmit_fast>:
  39344. {
  39345. 8010ce4: b510 push {r4, lr}
  39346. LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL);
  39347. 8010ce6: 4604 mov r4, r0
  39348. 8010ce8: b130 cbz r0, 8010cf8 <tcp_rexmit_fast+0x14>
  39349. if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) {
  39350. 8010cea: 6f23 ldr r3, [r4, #112] @ 0x70
  39351. 8010cec: b11b cbz r3, 8010cf6 <tcp_rexmit_fast+0x12>
  39352. 8010cee: 8b63 ldrh r3, [r4, #26]
  39353. 8010cf0: f013 0f04 tst.w r3, #4
  39354. 8010cf4: d008 beq.n 8010d08 <tcp_rexmit_fast+0x24>
  39355. }
  39356. 8010cf6: bd10 pop {r4, pc}
  39357. LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL);
  39358. 8010cf8: 4b16 ldr r3, [pc, #88] @ (8010d54 <tcp_rexmit_fast+0x70>)
  39359. 8010cfa: f240 62f9 movw r2, #1785 @ 0x6f9
  39360. 8010cfe: 4916 ldr r1, [pc, #88] @ (8010d58 <tcp_rexmit_fast+0x74>)
  39361. 8010d00: 4816 ldr r0, [pc, #88] @ (8010d5c <tcp_rexmit_fast+0x78>)
  39362. 8010d02: f002 fb81 bl 8013408 <iprintf>
  39363. 8010d06: e7f0 b.n 8010cea <tcp_rexmit_fast+0x6>
  39364. if (tcp_rexmit(pcb) == ERR_OK) {
  39365. 8010d08: 4620 mov r0, r4
  39366. 8010d0a: f7ff ffa7 bl 8010c5c <tcp_rexmit>
  39367. 8010d0e: 2800 cmp r0, #0
  39368. 8010d10: d1f1 bne.n 8010cf6 <tcp_rexmit_fast+0x12>
  39369. pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2;
  39370. 8010d12: f8b4 3060 ldrh.w r3, [r4, #96] @ 0x60
  39371. 8010d16: f8b4 2048 ldrh.w r2, [r4, #72] @ 0x48
  39372. 8010d1a: 4293 cmp r3, r2
  39373. 8010d1c: bf28 it cs
  39374. 8010d1e: 4613 movcs r3, r2
  39375. 8010d20: 105b asrs r3, r3, #1
  39376. 8010d22: f8a4 304a strh.w r3, [r4, #74] @ 0x4a
  39377. if (pcb->ssthresh < (2U * pcb->mss)) {
  39378. 8010d26: b29b uxth r3, r3
  39379. 8010d28: 8e62 ldrh r2, [r4, #50] @ 0x32
  39380. 8010d2a: ebb3 0f42 cmp.w r3, r2, lsl #1
  39381. 8010d2e: d202 bcs.n 8010d36 <tcp_rexmit_fast+0x52>
  39382. pcb->ssthresh = 2 * pcb->mss;
  39383. 8010d30: 0053 lsls r3, r2, #1
  39384. 8010d32: f8a4 304a strh.w r3, [r4, #74] @ 0x4a
  39385. pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
  39386. 8010d36: f8b4 304a ldrh.w r3, [r4, #74] @ 0x4a
  39387. 8010d3a: eb02 0242 add.w r2, r2, r2, lsl #1
  39388. 8010d3e: 4413 add r3, r2
  39389. 8010d40: f8a4 3048 strh.w r3, [r4, #72] @ 0x48
  39390. tcp_set_flags(pcb, TF_INFR);
  39391. 8010d44: 8b63 ldrh r3, [r4, #26]
  39392. 8010d46: f043 0304 orr.w r3, r3, #4
  39393. 8010d4a: 8363 strh r3, [r4, #26]
  39394. pcb->rtime = 0;
  39395. 8010d4c: 2300 movs r3, #0
  39396. 8010d4e: 8623 strh r3, [r4, #48] @ 0x30
  39397. }
  39398. 8010d50: e7d1 b.n 8010cf6 <tcp_rexmit_fast+0x12>
  39399. 8010d52: bf00 nop
  39400. 8010d54: 080170ec .word 0x080170ec
  39401. 8010d58: 08017810 .word 0x08017810
  39402. 8010d5c: 080144e8 .word 0x080144e8
  39403. 08010d60 <tcp_rst>:
  39404. */
  39405. void
  39406. tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno,
  39407. const ip_addr_t *local_ip, const ip_addr_t *remote_ip,
  39408. u16_t local_port, u16_t remote_port)
  39409. {
  39410. 8010d60: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  39411. 8010d64: b084 sub sp, #16
  39412. 8010d66: 4604 mov r4, r0
  39413. 8010d68: 460e mov r6, r1
  39414. 8010d6a: 4615 mov r5, r2
  39415. 8010d6c: 9f0a ldr r7, [sp, #40] @ 0x28
  39416. struct pbuf *p;
  39417. u16_t wnd;
  39418. u8_t optlen;
  39419. LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
  39420. 8010d6e: 4698 mov r8, r3
  39421. 8010d70: b32b cbz r3, 8010dbe <tcp_rst+0x5e>
  39422. LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
  39423. 8010d72: b367 cbz r7, 8010dce <tcp_rst+0x6e>
  39424. wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF));
  39425. #else
  39426. wnd = PP_HTONS(TCP_WND);
  39427. #endif
  39428. p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port,
  39429. 8010d74: 4630 mov r0, r6
  39430. 8010d76: f7f7 f886 bl 8007e86 <lwip_htonl>
  39431. 8010d7a: 4603 mov r3, r0
  39432. 8010d7c: f24d 0216 movw r2, #53270 @ 0xd016
  39433. 8010d80: 9203 str r2, [sp, #12]
  39434. 8010d82: 2214 movs r2, #20
  39435. 8010d84: 9202 str r2, [sp, #8]
  39436. 8010d86: f8bd 2030 ldrh.w r2, [sp, #48] @ 0x30
  39437. 8010d8a: 9201 str r2, [sp, #4]
  39438. 8010d8c: f8bd 202c ldrh.w r2, [sp, #44] @ 0x2c
  39439. 8010d90: 9200 str r2, [sp, #0]
  39440. 8010d92: 2200 movs r2, #0
  39441. 8010d94: 4611 mov r1, r2
  39442. 8010d96: 4628 mov r0, r5
  39443. 8010d98: f7ff f924 bl 800ffe4 <tcp_output_alloc_header_common>
  39444. remote_port, TCP_RST | TCP_ACK, wnd);
  39445. if (p == NULL) {
  39446. 8010d9c: 4605 mov r5, r0
  39447. 8010d9e: b158 cbz r0, 8010db8 <tcp_rst+0x58>
  39448. LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n"));
  39449. return;
  39450. }
  39451. tcp_output_fill_options(pcb, p, 0, optlen);
  39452. 8010da0: 2300 movs r3, #0
  39453. 8010da2: 461a mov r2, r3
  39454. 8010da4: 4601 mov r1, r0
  39455. 8010da6: 4620 mov r0, r4
  39456. 8010da8: f7ff f824 bl 800fdf4 <tcp_output_fill_options>
  39457. MIB2_STATS_INC(mib2.tcpoutrsts);
  39458. tcp_output_control_segment(pcb, p, local_ip, remote_ip);
  39459. 8010dac: 463b mov r3, r7
  39460. 8010dae: 4642 mov r2, r8
  39461. 8010db0: 4629 mov r1, r5
  39462. 8010db2: 4620 mov r0, r4
  39463. 8010db4: f7ff fa38 bl 8010228 <tcp_output_control_segment>
  39464. LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno));
  39465. }
  39466. 8010db8: b004 add sp, #16
  39467. 8010dba: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  39468. LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL);
  39469. 8010dbe: 4b08 ldr r3, [pc, #32] @ (8010de0 <tcp_rst+0x80>)
  39470. 8010dc0: f240 72c4 movw r2, #1988 @ 0x7c4
  39471. 8010dc4: 4907 ldr r1, [pc, #28] @ (8010de4 <tcp_rst+0x84>)
  39472. 8010dc6: 4808 ldr r0, [pc, #32] @ (8010de8 <tcp_rst+0x88>)
  39473. 8010dc8: f002 fb1e bl 8013408 <iprintf>
  39474. 8010dcc: e7d1 b.n 8010d72 <tcp_rst+0x12>
  39475. LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL);
  39476. 8010dce: 4b04 ldr r3, [pc, #16] @ (8010de0 <tcp_rst+0x80>)
  39477. 8010dd0: f240 72c5 movw r2, #1989 @ 0x7c5
  39478. 8010dd4: 4905 ldr r1, [pc, #20] @ (8010dec <tcp_rst+0x8c>)
  39479. 8010dd6: 4804 ldr r0, [pc, #16] @ (8010de8 <tcp_rst+0x88>)
  39480. 8010dd8: f002 fb16 bl 8013408 <iprintf>
  39481. 8010ddc: e7ca b.n 8010d74 <tcp_rst+0x14>
  39482. 8010dde: bf00 nop
  39483. 8010de0: 080170ec .word 0x080170ec
  39484. 8010de4: 08017830 .word 0x08017830
  39485. 8010de8: 080144e8 .word 0x080144e8
  39486. 8010dec: 0801784c .word 0x0801784c
  39487. 08010df0 <tcp_send_empty_ack>:
  39488. *
  39489. * @param pcb Protocol control block for the TCP connection to send the ACK
  39490. */
  39491. err_t
  39492. tcp_send_empty_ack(struct tcp_pcb *pcb)
  39493. {
  39494. 8010df0: b538 push {r3, r4, r5, lr}
  39495. err_t err;
  39496. struct pbuf *p;
  39497. u8_t optlen, optflags = 0;
  39498. u8_t num_sacks = 0;
  39499. LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL);
  39500. 8010df2: 4604 mov r4, r0
  39501. 8010df4: b1e0 cbz r0, 8010e30 <tcp_send_empty_ack+0x40>
  39502. if ((num_sacks = tcp_get_num_sacks(pcb, optlen)) > 0) {
  39503. optlen += 4 + num_sacks * 8; /* 4 bytes for header (including 2*NOP), plus 8B for each SACK */
  39504. }
  39505. #endif
  39506. p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt));
  39507. 8010df6: 6d20 ldr r0, [r4, #80] @ 0x50
  39508. 8010df8: f7f7 f845 bl 8007e86 <lwip_htonl>
  39509. 8010dfc: 4603 mov r3, r0
  39510. 8010dfe: 2200 movs r2, #0
  39511. 8010e00: 4611 mov r1, r2
  39512. 8010e02: 4620 mov r0, r4
  39513. 8010e04: f7ff f93a bl 801007c <tcp_output_alloc_header>
  39514. if (p == NULL) {
  39515. 8010e08: 4605 mov r5, r0
  39516. 8010e0a: b1c8 cbz r0, 8010e40 <tcp_send_empty_ack+0x50>
  39517. /* let tcp_fasttmr retry sending this ACK */
  39518. tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
  39519. LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n"));
  39520. return ERR_BUF;
  39521. }
  39522. tcp_output_fill_options(pcb, p, optflags, num_sacks);
  39523. 8010e0c: 2300 movs r3, #0
  39524. 8010e0e: 461a mov r2, r3
  39525. 8010e10: 4601 mov r1, r0
  39526. 8010e12: 4620 mov r0, r4
  39527. 8010e14: f7fe ffee bl 800fdf4 <tcp_output_fill_options>
  39528. pcb->ts_lastacksent = pcb->rcv_nxt;
  39529. #endif
  39530. LWIP_DEBUGF(TCP_OUTPUT_DEBUG,
  39531. ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt));
  39532. err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
  39533. 8010e18: 1d23 adds r3, r4, #4
  39534. 8010e1a: 4622 mov r2, r4
  39535. 8010e1c: 4629 mov r1, r5
  39536. 8010e1e: 4620 mov r0, r4
  39537. 8010e20: f7ff fa02 bl 8010228 <tcp_output_control_segment>
  39538. if (err != ERR_OK) {
  39539. 8010e24: b198 cbz r0, 8010e4e <tcp_send_empty_ack+0x5e>
  39540. /* let tcp_fasttmr retry sending this ACK */
  39541. tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
  39542. 8010e26: 8b63 ldrh r3, [r4, #26]
  39543. 8010e28: f043 0303 orr.w r3, r3, #3
  39544. 8010e2c: 8363 strh r3, [r4, #26]
  39545. /* remove ACK flags from the PCB, as we sent an empty ACK now */
  39546. tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
  39547. }
  39548. return err;
  39549. }
  39550. 8010e2e: bd38 pop {r3, r4, r5, pc}
  39551. LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL);
  39552. 8010e30: 4b09 ldr r3, [pc, #36] @ (8010e58 <tcp_send_empty_ack+0x68>)
  39553. 8010e32: f240 72ea movw r2, #2026 @ 0x7ea
  39554. 8010e36: 4909 ldr r1, [pc, #36] @ (8010e5c <tcp_send_empty_ack+0x6c>)
  39555. 8010e38: 4809 ldr r0, [pc, #36] @ (8010e60 <tcp_send_empty_ack+0x70>)
  39556. 8010e3a: f002 fae5 bl 8013408 <iprintf>
  39557. 8010e3e: e7da b.n 8010df6 <tcp_send_empty_ack+0x6>
  39558. tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
  39559. 8010e40: 8b63 ldrh r3, [r4, #26]
  39560. 8010e42: f043 0303 orr.w r3, r3, #3
  39561. 8010e46: 8363 strh r3, [r4, #26]
  39562. return ERR_BUF;
  39563. 8010e48: f06f 0001 mvn.w r0, #1
  39564. 8010e4c: e7ef b.n 8010e2e <tcp_send_empty_ack+0x3e>
  39565. tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
  39566. 8010e4e: 8b63 ldrh r3, [r4, #26]
  39567. 8010e50: f023 0303 bic.w r3, r3, #3
  39568. 8010e54: 8363 strh r3, [r4, #26]
  39569. 8010e56: e7ea b.n 8010e2e <tcp_send_empty_ack+0x3e>
  39570. 8010e58: 080170ec .word 0x080170ec
  39571. 8010e5c: 08017868 .word 0x08017868
  39572. 8010e60: 080144e8 .word 0x080144e8
  39573. 08010e64 <tcp_output>:
  39574. {
  39575. 8010e64: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  39576. 8010e68: 4605 mov r5, r0
  39577. LWIP_ASSERT_CORE_LOCKED();
  39578. 8010e6a: f7f2 fe4f bl 8003b0c <sys_check_core_locking>
  39579. LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL);
  39580. 8010e6e: 2d00 cmp r5, #0
  39581. 8010e70: d037 beq.n 8010ee2 <tcp_output+0x7e>
  39582. LWIP_ASSERT("don't call tcp_output for listen-pcbs",
  39583. 8010e72: 7d2b ldrb r3, [r5, #20]
  39584. 8010e74: 2b01 cmp r3, #1
  39585. 8010e76: d03c beq.n 8010ef2 <tcp_output+0x8e>
  39586. if (tcp_input_pcb == pcb) {
  39587. 8010e78: 4b9f ldr r3, [pc, #636] @ (80110f8 <tcp_output+0x294>)
  39588. 8010e7a: 681b ldr r3, [r3, #0]
  39589. 8010e7c: 42ab cmp r3, r5
  39590. 8010e7e: f000 8135 beq.w 80110ec <tcp_output+0x288>
  39591. wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd);
  39592. 8010e82: f8b5 6048 ldrh.w r6, [r5, #72] @ 0x48
  39593. 8010e86: f8b5 3060 ldrh.w r3, [r5, #96] @ 0x60
  39594. 8010e8a: 429e cmp r6, r3
  39595. 8010e8c: bf28 it cs
  39596. 8010e8e: 461e movcs r6, r3
  39597. seg = pcb->unsent;
  39598. 8010e90: 6eec ldr r4, [r5, #108] @ 0x6c
  39599. if (seg == NULL) {
  39600. 8010e92: 2c00 cmp r4, #0
  39601. 8010e94: d035 beq.n 8010f02 <tcp_output+0x9e>
  39602. netif = tcp_route(pcb, &pcb->local_ip, &pcb->remote_ip);
  39603. 8010e96: 1d2a adds r2, r5, #4
  39604. 8010e98: 4629 mov r1, r5
  39605. 8010e9a: 4628 mov r0, r5
  39606. 8010e9c: f7ff f918 bl 80100d0 <tcp_route>
  39607. if (netif == NULL) {
  39608. 8010ea0: 4680 mov r8, r0
  39609. 8010ea2: 2800 cmp r0, #0
  39610. 8010ea4: f000 8124 beq.w 80110f0 <tcp_output+0x28c>
  39611. if (ip_addr_isany(&pcb->local_ip)) {
  39612. 8010ea8: b10d cbz r5, 8010eae <tcp_output+0x4a>
  39613. 8010eaa: 682b ldr r3, [r5, #0]
  39614. 8010eac: b913 cbnz r3, 8010eb4 <tcp_output+0x50>
  39615. ip_addr_copy(pcb->local_ip, *local_ip);
  39616. 8010eae: f8d8 3004 ldr.w r3, [r8, #4]
  39617. 8010eb2: 602b str r3, [r5, #0]
  39618. if (lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd) {
  39619. 8010eb4: 6923 ldr r3, [r4, #16]
  39620. 8010eb6: 6858 ldr r0, [r3, #4]
  39621. 8010eb8: f7f6 ffe5 bl 8007e86 <lwip_htonl>
  39622. 8010ebc: 6c6b ldr r3, [r5, #68] @ 0x44
  39623. 8010ebe: 1ac0 subs r0, r0, r3
  39624. 8010ec0: 8923 ldrh r3, [r4, #8]
  39625. 8010ec2: 4418 add r0, r3
  39626. 8010ec4: 42b0 cmp r0, r6
  39627. 8010ec6: d93c bls.n 8010f42 <tcp_output+0xde>
  39628. if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) {
  39629. 8010ec8: f8b5 3060 ldrh.w r3, [r5, #96] @ 0x60
  39630. 8010ecc: 429e cmp r6, r3
  39631. 8010ece: d029 beq.n 8010f24 <tcp_output+0xc0>
  39632. if (pcb->flags & TF_ACK_NOW) {
  39633. 8010ed0: 8b6b ldrh r3, [r5, #26]
  39634. 8010ed2: f013 0f02 tst.w r3, #2
  39635. 8010ed6: d018 beq.n 8010f0a <tcp_output+0xa6>
  39636. return tcp_send_empty_ack(pcb);
  39637. 8010ed8: 4628 mov r0, r5
  39638. 8010eda: f7ff ff89 bl 8010df0 <tcp_send_empty_ack>
  39639. 8010ede: 4603 mov r3, r0
  39640. 8010ee0: e018 b.n 8010f14 <tcp_output+0xb0>
  39641. LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL);
  39642. 8010ee2: 4b86 ldr r3, [pc, #536] @ (80110fc <tcp_output+0x298>)
  39643. 8010ee4: f240 42e1 movw r2, #1249 @ 0x4e1
  39644. 8010ee8: 4985 ldr r1, [pc, #532] @ (8011100 <tcp_output+0x29c>)
  39645. 8010eea: 4886 ldr r0, [pc, #536] @ (8011104 <tcp_output+0x2a0>)
  39646. 8010eec: f002 fa8c bl 8013408 <iprintf>
  39647. 8010ef0: e7bf b.n 8010e72 <tcp_output+0xe>
  39648. LWIP_ASSERT("don't call tcp_output for listen-pcbs",
  39649. 8010ef2: 4b82 ldr r3, [pc, #520] @ (80110fc <tcp_output+0x298>)
  39650. 8010ef4: f240 42e3 movw r2, #1251 @ 0x4e3
  39651. 8010ef8: 4983 ldr r1, [pc, #524] @ (8011108 <tcp_output+0x2a4>)
  39652. 8010efa: 4882 ldr r0, [pc, #520] @ (8011104 <tcp_output+0x2a0>)
  39653. 8010efc: f002 fa84 bl 8013408 <iprintf>
  39654. 8010f00: e7ba b.n 8010e78 <tcp_output+0x14>
  39655. if (pcb->flags & TF_ACK_NOW) {
  39656. 8010f02: 8b6b ldrh r3, [r5, #26]
  39657. 8010f04: f013 0f02 tst.w r3, #2
  39658. 8010f08: d107 bne.n 8010f1a <tcp_output+0xb6>
  39659. tcp_clear_flags(pcb, TF_NAGLEMEMERR);
  39660. 8010f0a: 8b6b ldrh r3, [r5, #26]
  39661. 8010f0c: f023 0380 bic.w r3, r3, #128 @ 0x80
  39662. 8010f10: 836b strh r3, [r5, #26]
  39663. return ERR_OK;
  39664. 8010f12: 2300 movs r3, #0
  39665. }
  39666. 8010f14: 4618 mov r0, r3
  39667. 8010f16: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  39668. return tcp_send_empty_ack(pcb);
  39669. 8010f1a: 4628 mov r0, r5
  39670. 8010f1c: f7ff ff68 bl 8010df0 <tcp_send_empty_ack>
  39671. 8010f20: 4603 mov r3, r0
  39672. 8010f22: e7f7 b.n 8010f14 <tcp_output+0xb0>
  39673. if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) {
  39674. 8010f24: 6f2b ldr r3, [r5, #112] @ 0x70
  39675. 8010f26: 2b00 cmp r3, #0
  39676. 8010f28: d1d2 bne.n 8010ed0 <tcp_output+0x6c>
  39677. 8010f2a: f895 3099 ldrb.w r3, [r5, #153] @ 0x99
  39678. 8010f2e: 2b00 cmp r3, #0
  39679. 8010f30: d1ce bne.n 8010ed0 <tcp_output+0x6c>
  39680. pcb->persist_cnt = 0;
  39681. 8010f32: f885 3098 strb.w r3, [r5, #152] @ 0x98
  39682. pcb->persist_backoff = 1;
  39683. 8010f36: 2201 movs r2, #1
  39684. 8010f38: f885 2099 strb.w r2, [r5, #153] @ 0x99
  39685. pcb->persist_probe = 0;
  39686. 8010f3c: f885 309a strb.w r3, [r5, #154] @ 0x9a
  39687. 8010f40: e7c6 b.n 8010ed0 <tcp_output+0x6c>
  39688. pcb->persist_backoff = 0;
  39689. 8010f42: 2300 movs r3, #0
  39690. 8010f44: f885 3099 strb.w r3, [r5, #153] @ 0x99
  39691. useg = pcb->unacked;
  39692. 8010f48: 6f2b ldr r3, [r5, #112] @ 0x70
  39693. if (useg != NULL) {
  39694. 8010f4a: 2b00 cmp r3, #0
  39695. 8010f4c: f000 80cc beq.w 80110e8 <tcp_output+0x284>
  39696. for (; useg->next != NULL; useg = useg->next);
  39697. 8010f50: 461f mov r7, r3
  39698. 8010f52: 681b ldr r3, [r3, #0]
  39699. 8010f54: 2b00 cmp r3, #0
  39700. 8010f56: d1fb bne.n 8010f50 <tcp_output+0xec>
  39701. 8010f58: e056 b.n 8011008 <tcp_output+0x1a4>
  39702. LWIP_ASSERT("RST not expected here!",
  39703. 8010f5a: 4b68 ldr r3, [pc, #416] @ (80110fc <tcp_output+0x298>)
  39704. 8010f5c: f240 5236 movw r2, #1334 @ 0x536
  39705. 8010f60: 496a ldr r1, [pc, #424] @ (801110c <tcp_output+0x2a8>)
  39706. 8010f62: 4868 ldr r0, [pc, #416] @ (8011104 <tcp_output+0x2a0>)
  39707. 8010f64: f002 fa50 bl 8013408 <iprintf>
  39708. 8010f68: e061 b.n 801102e <tcp_output+0x1ca>
  39709. if ((tcp_do_output_nagle(pcb) == 0) &&
  39710. 8010f6a: 8911 ldrh r1, [r2, #8]
  39711. 8010f6c: 8e6a ldrh r2, [r5, #50] @ 0x32
  39712. 8010f6e: 4291 cmp r1, r2
  39713. 8010f70: d269 bcs.n 8011046 <tcp_output+0x1e2>
  39714. 8010f72: f8b5 2064 ldrh.w r2, [r5, #100] @ 0x64
  39715. 8010f76: 2a00 cmp r2, #0
  39716. 8010f78: d065 beq.n 8011046 <tcp_output+0x1e2>
  39717. 8010f7a: f8b5 2066 ldrh.w r2, [r5, #102] @ 0x66
  39718. 8010f7e: 2a0f cmp r2, #15
  39719. 8010f80: d861 bhi.n 8011046 <tcp_output+0x1e2>
  39720. 8010f82: f013 0fa0 tst.w r3, #160 @ 0xa0
  39721. 8010f86: d15e bne.n 8011046 <tcp_output+0x1e2>
  39722. if (pcb->unsent == NULL) {
  39723. 8010f88: 6eeb ldr r3, [r5, #108] @ 0x6c
  39724. 8010f8a: 2b00 cmp r3, #0
  39725. 8010f8c: d1bd bne.n 8010f0a <tcp_output+0xa6>
  39726. pcb->unsent_oversize = 0;
  39727. 8010f8e: f8a5 3068 strh.w r3, [r5, #104] @ 0x68
  39728. 8010f92: e7ba b.n 8010f0a <tcp_output+0xa6>
  39729. TCPH_SET_FLAG(seg->tcphdr, TCP_ACK);
  39730. 8010f94: 6923 ldr r3, [r4, #16]
  39731. 8010f96: f8b3 900c ldrh.w r9, [r3, #12]
  39732. 8010f9a: 2010 movs r0, #16
  39733. 8010f9c: f7f6 ff6e bl 8007e7c <lwip_htons>
  39734. 8010fa0: 6923 ldr r3, [r4, #16]
  39735. 8010fa2: ea49 0900 orr.w r9, r9, r0
  39736. 8010fa6: f8a3 900c strh.w r9, [r3, #12]
  39737. 8010faa: e04f b.n 801104c <tcp_output+0x1e8>
  39738. tcp_set_flags(pcb, TF_NAGLEMEMERR);
  39739. 8010fac: 8b6a ldrh r2, [r5, #26]
  39740. 8010fae: f042 0280 orr.w r2, r2, #128 @ 0x80
  39741. 8010fb2: 836a strh r2, [r5, #26]
  39742. return err;
  39743. 8010fb4: e7ae b.n 8010f14 <tcp_output+0xb0>
  39744. snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
  39745. 8010fb6: 2300 movs r3, #0
  39746. 8010fb8: e06a b.n 8011090 <tcp_output+0x22c>
  39747. pcb->snd_nxt = snd_nxt;
  39748. 8010fba: 6528 str r0, [r5, #80] @ 0x50
  39749. 8010fbc: e06f b.n 801109e <tcp_output+0x23a>
  39750. if (TCP_TCPLEN(seg) > 0) {
  39751. 8010fbe: 2300 movs r3, #0
  39752. 8010fc0: e077 b.n 80110b2 <tcp_output+0x24e>
  39753. pcb->unacked = seg;
  39754. 8010fc2: 672c str r4, [r5, #112] @ 0x70
  39755. useg = seg;
  39756. 8010fc4: 4627 mov r7, r4
  39757. 8010fc6: e01e b.n 8011006 <tcp_output+0x1a2>
  39758. struct tcp_seg **cur_seg = &(pcb->unacked);
  39759. 8010fc8: f105 0a70 add.w sl, r5, #112 @ 0x70
  39760. while (*cur_seg &&
  39761. 8010fcc: e001 b.n 8010fd2 <tcp_output+0x16e>
  39762. cur_seg = &((*cur_seg)->next );
  39763. 8010fce: f8da a000 ldr.w sl, [sl]
  39764. while (*cur_seg &&
  39765. 8010fd2: f8da 3000 ldr.w r3, [sl]
  39766. 8010fd6: b16b cbz r3, 8010ff4 <tcp_output+0x190>
  39767. TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) {
  39768. 8010fd8: 691b ldr r3, [r3, #16]
  39769. 8010fda: 6858 ldr r0, [r3, #4]
  39770. 8010fdc: f7f6 ff53 bl 8007e86 <lwip_htonl>
  39771. 8010fe0: 4681 mov r9, r0
  39772. 8010fe2: 6923 ldr r3, [r4, #16]
  39773. 8010fe4: 6858 ldr r0, [r3, #4]
  39774. 8010fe6: f7f6 ff4e bl 8007e86 <lwip_htonl>
  39775. 8010fea: eba9 0900 sub.w r9, r9, r0
  39776. while (*cur_seg &&
  39777. 8010fee: f1b9 0f00 cmp.w r9, #0
  39778. 8010ff2: dbec blt.n 8010fce <tcp_output+0x16a>
  39779. seg->next = (*cur_seg);
  39780. 8010ff4: f8da 3000 ldr.w r3, [sl]
  39781. 8010ff8: 6023 str r3, [r4, #0]
  39782. (*cur_seg) = seg;
  39783. 8010ffa: f8ca 4000 str.w r4, [sl]
  39784. 8010ffe: e002 b.n 8011006 <tcp_output+0x1a2>
  39785. tcp_seg_free(seg);
  39786. 8011000: 4620 mov r0, r4
  39787. 8011002: f7fc f9d3 bl 800d3ac <tcp_seg_free>
  39788. seg = pcb->unsent;
  39789. 8011006: 6eec ldr r4, [r5, #108] @ 0x6c
  39790. while (seg != NULL &&
  39791. 8011008: 2c00 cmp r4, #0
  39792. 801100a: d0bd beq.n 8010f88 <tcp_output+0x124>
  39793. lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) {
  39794. 801100c: 6923 ldr r3, [r4, #16]
  39795. 801100e: 6858 ldr r0, [r3, #4]
  39796. 8011010: f7f6 ff39 bl 8007e86 <lwip_htonl>
  39797. 8011014: 6c6b ldr r3, [r5, #68] @ 0x44
  39798. 8011016: 1ac0 subs r0, r0, r3
  39799. 8011018: 8923 ldrh r3, [r4, #8]
  39800. 801101a: 4418 add r0, r3
  39801. while (seg != NULL &&
  39802. 801101c: 42b0 cmp r0, r6
  39803. 801101e: d8b3 bhi.n 8010f88 <tcp_output+0x124>
  39804. LWIP_ASSERT("RST not expected here!",
  39805. 8011020: 6923 ldr r3, [r4, #16]
  39806. 8011022: 8998 ldrh r0, [r3, #12]
  39807. 8011024: f7f6 ff2a bl 8007e7c <lwip_htons>
  39808. 8011028: f010 0f04 tst.w r0, #4
  39809. 801102c: d195 bne.n 8010f5a <tcp_output+0xf6>
  39810. if ((tcp_do_output_nagle(pcb) == 0) &&
  39811. 801102e: 6f2b ldr r3, [r5, #112] @ 0x70
  39812. 8011030: b14b cbz r3, 8011046 <tcp_output+0x1e2>
  39813. 8011032: 8b6b ldrh r3, [r5, #26]
  39814. 8011034: f013 0f44 tst.w r3, #68 @ 0x44
  39815. 8011038: d105 bne.n 8011046 <tcp_output+0x1e2>
  39816. 801103a: 6eea ldr r2, [r5, #108] @ 0x6c
  39817. 801103c: 2a00 cmp r2, #0
  39818. 801103e: d098 beq.n 8010f72 <tcp_output+0x10e>
  39819. 8011040: 6811 ldr r1, [r2, #0]
  39820. 8011042: 2900 cmp r1, #0
  39821. 8011044: d091 beq.n 8010f6a <tcp_output+0x106>
  39822. if (pcb->state != SYN_SENT) {
  39823. 8011046: 7d2b ldrb r3, [r5, #20]
  39824. 8011048: 2b02 cmp r3, #2
  39825. 801104a: d1a3 bne.n 8010f94 <tcp_output+0x130>
  39826. err = tcp_output_segment(seg, pcb, netif);
  39827. 801104c: 4642 mov r2, r8
  39828. 801104e: 4629 mov r1, r5
  39829. 8011050: 4620 mov r0, r4
  39830. 8011052: f7ff f849 bl 80100e8 <tcp_output_segment>
  39831. if (err != ERR_OK) {
  39832. 8011056: 4603 mov r3, r0
  39833. 8011058: 2800 cmp r0, #0
  39834. 801105a: d1a7 bne.n 8010fac <tcp_output+0x148>
  39835. seg->oversize_left = 0;
  39836. 801105c: 2300 movs r3, #0
  39837. 801105e: 8163 strh r3, [r4, #10]
  39838. pcb->unsent = seg->next;
  39839. 8011060: 6823 ldr r3, [r4, #0]
  39840. 8011062: 66eb str r3, [r5, #108] @ 0x6c
  39841. if (pcb->state != SYN_SENT) {
  39842. 8011064: 7d2b ldrb r3, [r5, #20]
  39843. 8011066: 2b02 cmp r3, #2
  39844. 8011068: d003 beq.n 8011072 <tcp_output+0x20e>
  39845. tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);
  39846. 801106a: 8b6b ldrh r3, [r5, #26]
  39847. 801106c: f023 0303 bic.w r3, r3, #3
  39848. 8011070: 836b strh r3, [r5, #26]
  39849. snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
  39850. 8011072: 6923 ldr r3, [r4, #16]
  39851. 8011074: 6858 ldr r0, [r3, #4]
  39852. 8011076: f7f6 ff06 bl 8007e86 <lwip_htonl>
  39853. 801107a: 4681 mov r9, r0
  39854. 801107c: f8b4 a008 ldrh.w sl, [r4, #8]
  39855. 8011080: 6923 ldr r3, [r4, #16]
  39856. 8011082: 8998 ldrh r0, [r3, #12]
  39857. 8011084: f7f6 fefa bl 8007e7c <lwip_htons>
  39858. 8011088: f010 0f03 tst.w r0, #3
  39859. 801108c: d093 beq.n 8010fb6 <tcp_output+0x152>
  39860. 801108e: 2301 movs r3, #1
  39861. 8011090: 4453 add r3, sl
  39862. 8011092: eb09 0003 add.w r0, r9, r3
  39863. if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
  39864. 8011096: 6d2b ldr r3, [r5, #80] @ 0x50
  39865. 8011098: 1a1b subs r3, r3, r0
  39866. 801109a: 2b00 cmp r3, #0
  39867. 801109c: db8d blt.n 8010fba <tcp_output+0x156>
  39868. if (TCP_TCPLEN(seg) > 0) {
  39869. 801109e: f8b4 9008 ldrh.w r9, [r4, #8]
  39870. 80110a2: 6923 ldr r3, [r4, #16]
  39871. 80110a4: 8998 ldrh r0, [r3, #12]
  39872. 80110a6: f7f6 fee9 bl 8007e7c <lwip_htons>
  39873. 80110aa: f010 0f03 tst.w r0, #3
  39874. 80110ae: d086 beq.n 8010fbe <tcp_output+0x15a>
  39875. 80110b0: 2301 movs r3, #1
  39876. 80110b2: eb13 0f09 cmn.w r3, r9
  39877. 80110b6: d0a3 beq.n 8011000 <tcp_output+0x19c>
  39878. seg->next = NULL;
  39879. 80110b8: 2300 movs r3, #0
  39880. 80110ba: 6023 str r3, [r4, #0]
  39881. if (pcb->unacked == NULL) {
  39882. 80110bc: 6f2b ldr r3, [r5, #112] @ 0x70
  39883. 80110be: 2b00 cmp r3, #0
  39884. 80110c0: f43f af7f beq.w 8010fc2 <tcp_output+0x15e>
  39885. if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) {
  39886. 80110c4: 6923 ldr r3, [r4, #16]
  39887. 80110c6: 6858 ldr r0, [r3, #4]
  39888. 80110c8: f7f6 fedd bl 8007e86 <lwip_htonl>
  39889. 80110cc: 4681 mov r9, r0
  39890. 80110ce: 693b ldr r3, [r7, #16]
  39891. 80110d0: 6858 ldr r0, [r3, #4]
  39892. 80110d2: f7f6 fed8 bl 8007e86 <lwip_htonl>
  39893. 80110d6: eba9 0900 sub.w r9, r9, r0
  39894. 80110da: f1b9 0f00 cmp.w r9, #0
  39895. 80110de: f6ff af73 blt.w 8010fc8 <tcp_output+0x164>
  39896. useg->next = seg;
  39897. 80110e2: 603c str r4, [r7, #0]
  39898. useg = useg->next;
  39899. 80110e4: 4627 mov r7, r4
  39900. 80110e6: e78e b.n 8011006 <tcp_output+0x1a2>
  39901. useg = pcb->unacked;
  39902. 80110e8: 461f mov r7, r3
  39903. 80110ea: e78d b.n 8011008 <tcp_output+0x1a4>
  39904. return ERR_OK;
  39905. 80110ec: 2300 movs r3, #0
  39906. 80110ee: e711 b.n 8010f14 <tcp_output+0xb0>
  39907. return ERR_RTE;
  39908. 80110f0: f06f 0303 mvn.w r3, #3
  39909. 80110f4: e70e b.n 8010f14 <tcp_output+0xb0>
  39910. 80110f6: bf00 nop
  39911. 80110f8: 24019be8 .word 0x24019be8
  39912. 80110fc: 080170ec .word 0x080170ec
  39913. 8011100: 08017888 .word 0x08017888
  39914. 8011104: 080144e8 .word 0x080144e8
  39915. 8011108: 080178a0 .word 0x080178a0
  39916. 801110c: 080178c8 .word 0x080178c8
  39917. 08011110 <tcp_rexmit_rto_commit>:
  39918. {
  39919. 8011110: b510 push {r4, lr}
  39920. LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL);
  39921. 8011112: 4604 mov r4, r0
  39922. 8011114: b150 cbz r0, 801112c <tcp_rexmit_rto_commit+0x1c>
  39923. if (pcb->nrtx < 0xFF) {
  39924. 8011116: f894 3042 ldrb.w r3, [r4, #66] @ 0x42
  39925. 801111a: 2bff cmp r3, #255 @ 0xff
  39926. 801111c: d002 beq.n 8011124 <tcp_rexmit_rto_commit+0x14>
  39927. ++pcb->nrtx;
  39928. 801111e: 3301 adds r3, #1
  39929. 8011120: f884 3042 strb.w r3, [r4, #66] @ 0x42
  39930. tcp_output(pcb);
  39931. 8011124: 4620 mov r0, r4
  39932. 8011126: f7ff fe9d bl 8010e64 <tcp_output>
  39933. }
  39934. 801112a: bd10 pop {r4, pc}
  39935. LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL);
  39936. 801112c: 4b03 ldr r3, [pc, #12] @ (801113c <tcp_rexmit_rto_commit+0x2c>)
  39937. 801112e: f44f 62d3 mov.w r2, #1688 @ 0x698
  39938. 8011132: 4903 ldr r1, [pc, #12] @ (8011140 <tcp_rexmit_rto_commit+0x30>)
  39939. 8011134: 4803 ldr r0, [pc, #12] @ (8011144 <tcp_rexmit_rto_commit+0x34>)
  39940. 8011136: f002 f967 bl 8013408 <iprintf>
  39941. 801113a: e7ec b.n 8011116 <tcp_rexmit_rto_commit+0x6>
  39942. 801113c: 080170ec .word 0x080170ec
  39943. 8011140: 080178e0 .word 0x080178e0
  39944. 8011144: 080144e8 .word 0x080144e8
  39945. 08011148 <tcp_rexmit_rto>:
  39946. {
  39947. 8011148: b510 push {r4, lr}
  39948. LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL);
  39949. 801114a: 4604 mov r4, r0
  39950. 801114c: b120 cbz r0, 8011158 <tcp_rexmit_rto+0x10>
  39951. if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) {
  39952. 801114e: 4620 mov r0, r4
  39953. 8011150: f7ff fd34 bl 8010bbc <tcp_rexmit_rto_prepare>
  39954. 8011154: b140 cbz r0, 8011168 <tcp_rexmit_rto+0x20>
  39955. }
  39956. 8011156: bd10 pop {r4, pc}
  39957. LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL);
  39958. 8011158: 4b05 ldr r3, [pc, #20] @ (8011170 <tcp_rexmit_rto+0x28>)
  39959. 801115a: f240 62ad movw r2, #1709 @ 0x6ad
  39960. 801115e: 4905 ldr r1, [pc, #20] @ (8011174 <tcp_rexmit_rto+0x2c>)
  39961. 8011160: 4805 ldr r0, [pc, #20] @ (8011178 <tcp_rexmit_rto+0x30>)
  39962. 8011162: f002 f951 bl 8013408 <iprintf>
  39963. 8011166: e7f2 b.n 801114e <tcp_rexmit_rto+0x6>
  39964. tcp_rexmit_rto_commit(pcb);
  39965. 8011168: 4620 mov r0, r4
  39966. 801116a: f7ff ffd1 bl 8011110 <tcp_rexmit_rto_commit>
  39967. }
  39968. 801116e: e7f2 b.n 8011156 <tcp_rexmit_rto+0xe>
  39969. 8011170: 080170ec .word 0x080170ec
  39970. 8011174: 08017904 .word 0x08017904
  39971. 8011178: 080144e8 .word 0x080144e8
  39972. 0801117c <tcp_keepalive>:
  39973. *
  39974. * @param pcb the tcp_pcb for which to send a keepalive packet
  39975. */
  39976. err_t
  39977. tcp_keepalive(struct tcp_pcb *pcb)
  39978. {
  39979. 801117c: b538 push {r3, r4, r5, lr}
  39980. err_t err;
  39981. struct pbuf *p;
  39982. u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
  39983. LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL);
  39984. 801117e: 4604 mov r4, r0
  39985. 8011180: b1c0 cbz r0, 80111b4 <tcp_keepalive+0x38>
  39986. LWIP_DEBUGF(TCP_DEBUG, ("\n"));
  39987. LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %"U32_F" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
  39988. tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent));
  39989. p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt - 1));
  39990. 8011182: 6d20 ldr r0, [r4, #80] @ 0x50
  39991. 8011184: 3801 subs r0, #1
  39992. 8011186: f7f6 fe7e bl 8007e86 <lwip_htonl>
  39993. 801118a: 4603 mov r3, r0
  39994. 801118c: 2200 movs r2, #0
  39995. 801118e: 4611 mov r1, r2
  39996. 8011190: 4620 mov r0, r4
  39997. 8011192: f7fe ff73 bl 801007c <tcp_output_alloc_header>
  39998. if (p == NULL) {
  39999. 8011196: 4605 mov r5, r0
  40000. 8011198: b1a0 cbz r0, 80111c4 <tcp_keepalive+0x48>
  40001. LWIP_DEBUGF(TCP_DEBUG,
  40002. ("tcp_keepalive: could not allocate memory for pbuf\n"));
  40003. return ERR_MEM;
  40004. }
  40005. tcp_output_fill_options(pcb, p, 0, optlen);
  40006. 801119a: 2300 movs r3, #0
  40007. 801119c: 461a mov r2, r3
  40008. 801119e: 4601 mov r1, r0
  40009. 80111a0: 4620 mov r0, r4
  40010. 80111a2: f7fe fe27 bl 800fdf4 <tcp_output_fill_options>
  40011. err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
  40012. 80111a6: 1d23 adds r3, r4, #4
  40013. 80111a8: 4622 mov r2, r4
  40014. 80111aa: 4629 mov r1, r5
  40015. 80111ac: 4620 mov r0, r4
  40016. 80111ae: f7ff f83b bl 8010228 <tcp_output_control_segment>
  40017. LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F" err %d.\n",
  40018. pcb->snd_nxt - 1, pcb->rcv_nxt, (int)err));
  40019. return err;
  40020. }
  40021. 80111b2: bd38 pop {r3, r4, r5, pc}
  40022. LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL);
  40023. 80111b4: 4b05 ldr r3, [pc, #20] @ (80111cc <tcp_keepalive+0x50>)
  40024. 80111b6: f640 0224 movw r2, #2084 @ 0x824
  40025. 80111ba: 4905 ldr r1, [pc, #20] @ (80111d0 <tcp_keepalive+0x54>)
  40026. 80111bc: 4805 ldr r0, [pc, #20] @ (80111d4 <tcp_keepalive+0x58>)
  40027. 80111be: f002 f923 bl 8013408 <iprintf>
  40028. 80111c2: e7de b.n 8011182 <tcp_keepalive+0x6>
  40029. return ERR_MEM;
  40030. 80111c4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  40031. 80111c8: e7f3 b.n 80111b2 <tcp_keepalive+0x36>
  40032. 80111ca: bf00 nop
  40033. 80111cc: 080170ec .word 0x080170ec
  40034. 80111d0: 08017920 .word 0x08017920
  40035. 80111d4: 080144e8 .word 0x080144e8
  40036. 080111d8 <tcp_zero_window_probe>:
  40037. *
  40038. * @param pcb the tcp_pcb for which to send a zero-window probe packet
  40039. */
  40040. err_t
  40041. tcp_zero_window_probe(struct tcp_pcb *pcb)
  40042. {
  40043. 80111d8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  40044. u16_t len;
  40045. u8_t is_fin;
  40046. u32_t snd_nxt;
  40047. u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb);
  40048. LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL);
  40049. 80111dc: 4604 mov r4, r0
  40050. 80111de: b1a8 cbz r0, 801120c <tcp_zero_window_probe+0x34>
  40051. ("tcp_zero_window_probe: tcp_ticks %"U32_F
  40052. " pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n",
  40053. tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent));
  40054. /* Only consider unsent, persist timer should be off when there is data in-flight */
  40055. seg = pcb->unsent;
  40056. 80111e0: 6ee5 ldr r5, [r4, #108] @ 0x6c
  40057. if (seg == NULL) {
  40058. 80111e2: 2d00 cmp r5, #0
  40059. 80111e4: d05b beq.n 801129e <tcp_zero_window_probe+0xc6>
  40060. /* increment probe count. NOTE: we record probe even if it fails
  40061. to actually transmit due to an error. This ensures memory exhaustion/
  40062. routing problem doesn't leave a zero-window pcb as an indefinite zombie.
  40063. RTO mechanism has similar behavior, see pcb->nrtx */
  40064. if (pcb->persist_probe < 0xFF) {
  40065. 80111e6: f894 309a ldrb.w r3, [r4, #154] @ 0x9a
  40066. 80111ea: 2bff cmp r3, #255 @ 0xff
  40067. 80111ec: d002 beq.n 80111f4 <tcp_zero_window_probe+0x1c>
  40068. ++pcb->persist_probe;
  40069. 80111ee: 3301 adds r3, #1
  40070. 80111f0: f884 309a strb.w r3, [r4, #154] @ 0x9a
  40071. }
  40072. is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
  40073. 80111f4: 692b ldr r3, [r5, #16]
  40074. 80111f6: 8998 ldrh r0, [r3, #12]
  40075. 80111f8: f7f6 fe40 bl 8007e7c <lwip_htons>
  40076. 80111fc: f010 0f01 tst.w r0, #1
  40077. 8011200: d00c beq.n 801121c <tcp_zero_window_probe+0x44>
  40078. 8011202: 892b ldrh r3, [r5, #8]
  40079. 8011204: 2b00 cmp r3, #0
  40080. 8011206: d03b beq.n 8011280 <tcp_zero_window_probe+0xa8>
  40081. 8011208: 2200 movs r2, #0
  40082. 801120a: e008 b.n 801121e <tcp_zero_window_probe+0x46>
  40083. LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL);
  40084. 801120c: 4b26 ldr r3, [pc, #152] @ (80112a8 <tcp_zero_window_probe+0xd0>)
  40085. 801120e: f640 024f movw r2, #2127 @ 0x84f
  40086. 8011212: 4926 ldr r1, [pc, #152] @ (80112ac <tcp_zero_window_probe+0xd4>)
  40087. 8011214: 4826 ldr r0, [pc, #152] @ (80112b0 <tcp_zero_window_probe+0xd8>)
  40088. 8011216: f002 f8f7 bl 8013408 <iprintf>
  40089. 801121a: e7e1 b.n 80111e0 <tcp_zero_window_probe+0x8>
  40090. is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
  40091. 801121c: 2200 movs r2, #0
  40092. /* we want to send one seqno: either FIN or data (no options) */
  40093. len = is_fin ? 0 : 1;
  40094. 801121e: f002 08ff and.w r8, r2, #255 @ 0xff
  40095. p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno);
  40096. 8011222: 692b ldr r3, [r5, #16]
  40097. 8011224: 685b ldr r3, [r3, #4]
  40098. 8011226: f082 0201 eor.w r2, r2, #1
  40099. 801122a: 2100 movs r1, #0
  40100. 801122c: 4620 mov r0, r4
  40101. 801122e: f7fe ff25 bl 801007c <tcp_output_alloc_header>
  40102. if (p == NULL) {
  40103. 8011232: 4606 mov r6, r0
  40104. 8011234: b3a8 cbz r0, 80112a2 <tcp_zero_window_probe+0xca>
  40105. LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n"));
  40106. return ERR_MEM;
  40107. }
  40108. tcphdr = (struct tcp_hdr *)p->payload;
  40109. 8011236: 6847 ldr r7, [r0, #4]
  40110. if (is_fin) {
  40111. 8011238: f1b8 0f00 cmp.w r8, #0
  40112. 801123c: d022 beq.n 8011284 <tcp_zero_window_probe+0xac>
  40113. /* FIN segment, no data */
  40114. TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN);
  40115. 801123e: f8b7 800c ldrh.w r8, [r7, #12]
  40116. 8011242: 2011 movs r0, #17
  40117. 8011244: f7f6 fe1a bl 8007e7c <lwip_htons>
  40118. 8011248: f428 587c bic.w r8, r8, #16128 @ 0x3f00
  40119. 801124c: ea40 0008 orr.w r0, r0, r8
  40120. 8011250: 81b8 strh r0, [r7, #12]
  40121. Ensure we copy the first TCP data byte: */
  40122. pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len);
  40123. }
  40124. /* The byte may be acknowledged without the window being opened. */
  40125. snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1;
  40126. 8011252: 692b ldr r3, [r5, #16]
  40127. 8011254: 6858 ldr r0, [r3, #4]
  40128. 8011256: f7f6 fe16 bl 8007e86 <lwip_htonl>
  40129. 801125a: 3001 adds r0, #1
  40130. if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
  40131. 801125c: 6d23 ldr r3, [r4, #80] @ 0x50
  40132. 801125e: 1a1b subs r3, r3, r0
  40133. 8011260: 2b00 cmp r3, #0
  40134. 8011262: db1a blt.n 801129a <tcp_zero_window_probe+0xc2>
  40135. pcb->snd_nxt = snd_nxt;
  40136. }
  40137. tcp_output_fill_options(pcb, p, 0, optlen);
  40138. 8011264: 2300 movs r3, #0
  40139. 8011266: 461a mov r2, r3
  40140. 8011268: 4631 mov r1, r6
  40141. 801126a: 4620 mov r0, r4
  40142. 801126c: f7fe fdc2 bl 800fdf4 <tcp_output_fill_options>
  40143. err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip);
  40144. 8011270: 1d23 adds r3, r4, #4
  40145. 8011272: 4622 mov r2, r4
  40146. 8011274: 4631 mov r1, r6
  40147. 8011276: 4620 mov r0, r4
  40148. 8011278: f7fe ffd6 bl 8010228 <tcp_output_control_segment>
  40149. LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F
  40150. " ackno %"U32_F" err %d.\n",
  40151. pcb->snd_nxt - 1, pcb->rcv_nxt, (int)err));
  40152. return err;
  40153. }
  40154. 801127c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  40155. is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0);
  40156. 8011280: 2201 movs r2, #1
  40157. 8011282: e7cc b.n 801121e <tcp_zero_window_probe+0x46>
  40158. pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len);
  40159. 8011284: 6868 ldr r0, [r5, #4]
  40160. 8011286: 8903 ldrh r3, [r0, #8]
  40161. 8011288: 892a ldrh r2, [r5, #8]
  40162. 801128a: 1a9b subs r3, r3, r2
  40163. 801128c: b29b uxth r3, r3
  40164. 801128e: 2201 movs r2, #1
  40165. 8011290: f107 0114 add.w r1, r7, #20
  40166. 8011294: f7fb f806 bl 800c2a4 <pbuf_copy_partial>
  40167. 8011298: e7db b.n 8011252 <tcp_zero_window_probe+0x7a>
  40168. pcb->snd_nxt = snd_nxt;
  40169. 801129a: 6520 str r0, [r4, #80] @ 0x50
  40170. 801129c: e7e2 b.n 8011264 <tcp_zero_window_probe+0x8c>
  40171. return ERR_OK;
  40172. 801129e: 2000 movs r0, #0
  40173. 80112a0: e7ec b.n 801127c <tcp_zero_window_probe+0xa4>
  40174. return ERR_MEM;
  40175. 80112a2: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  40176. 80112a6: e7e9 b.n 801127c <tcp_zero_window_probe+0xa4>
  40177. 80112a8: 080170ec .word 0x080170ec
  40178. 80112ac: 0801793c .word 0x0801793c
  40179. 80112b0: 080144e8 .word 0x080144e8
  40180. 080112b4 <tcpip_timeouts_mbox_fetch>:
  40181. * @param mbox the mbox to fetch the message from
  40182. * @param msg the place to store the message
  40183. */
  40184. static void
  40185. tcpip_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg)
  40186. {
  40187. 80112b4: b570 push {r4, r5, r6, lr}
  40188. 80112b6: 4605 mov r5, r0
  40189. 80112b8: 460e mov r6, r1
  40190. 80112ba: e00b b.n 80112d4 <tcpip_timeouts_mbox_fetch+0x20>
  40191. again:
  40192. LWIP_ASSERT_CORE_LOCKED();
  40193. sleeptime = sys_timeouts_sleeptime();
  40194. if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) {
  40195. UNLOCK_TCPIP_CORE();
  40196. 80112bc: f7f2 fc1a bl 8003af4 <sys_unlock_tcpip_core>
  40197. sys_arch_mbox_fetch(mbox, msg, 0);
  40198. 80112c0: 2200 movs r2, #0
  40199. 80112c2: 4631 mov r1, r6
  40200. 80112c4: 4628 mov r0, r5
  40201. 80112c6: f7fb fe20 bl 800cf0a <sys_arch_mbox_fetch>
  40202. LOCK_TCPIP_CORE();
  40203. 80112ca: f7f2 fc05 bl 8003ad8 <sys_lock_tcpip_core>
  40204. before a message could be fetched. */
  40205. sys_check_timeouts();
  40206. /* We try again to fetch a message from the mbox. */
  40207. goto again;
  40208. }
  40209. }
  40210. 80112ce: bd70 pop {r4, r5, r6, pc}
  40211. sys_check_timeouts();
  40212. 80112d0: f000 f9fe bl 80116d0 <sys_check_timeouts>
  40213. LWIP_ASSERT_CORE_LOCKED();
  40214. 80112d4: f7f2 fc1a bl 8003b0c <sys_check_core_locking>
  40215. sleeptime = sys_timeouts_sleeptime();
  40216. 80112d8: f000 fa1c bl 8011714 <sys_timeouts_sleeptime>
  40217. 80112dc: 4604 mov r4, r0
  40218. if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) {
  40219. 80112de: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff
  40220. 80112e2: d0eb beq.n 80112bc <tcpip_timeouts_mbox_fetch+0x8>
  40221. } else if (sleeptime == 0) {
  40222. 80112e4: 2800 cmp r0, #0
  40223. 80112e6: d0f3 beq.n 80112d0 <tcpip_timeouts_mbox_fetch+0x1c>
  40224. UNLOCK_TCPIP_CORE();
  40225. 80112e8: f7f2 fc04 bl 8003af4 <sys_unlock_tcpip_core>
  40226. res = sys_arch_mbox_fetch(mbox, msg, sleeptime);
  40227. 80112ec: 4622 mov r2, r4
  40228. 80112ee: 4631 mov r1, r6
  40229. 80112f0: 4628 mov r0, r5
  40230. 80112f2: f7fb fe0a bl 800cf0a <sys_arch_mbox_fetch>
  40231. 80112f6: 4604 mov r4, r0
  40232. LOCK_TCPIP_CORE();
  40233. 80112f8: f7f2 fbee bl 8003ad8 <sys_lock_tcpip_core>
  40234. if (res == SYS_ARCH_TIMEOUT) {
  40235. 80112fc: f1b4 3fff cmp.w r4, #4294967295 @ 0xffffffff
  40236. 8011300: d1e5 bne.n 80112ce <tcpip_timeouts_mbox_fetch+0x1a>
  40237. sys_check_timeouts();
  40238. 8011302: f000 f9e5 bl 80116d0 <sys_check_timeouts>
  40239. goto again;
  40240. 8011306: e7e5 b.n 80112d4 <tcpip_timeouts_mbox_fetch+0x20>
  40241. 08011308 <tcpip_thread_handle_msg>:
  40242. /* Handle a single tcpip_msg
  40243. * This is in its own function for access by tests only.
  40244. */
  40245. static void
  40246. tcpip_thread_handle_msg(struct tcpip_msg *msg)
  40247. {
  40248. 8011308: b510 push {r4, lr}
  40249. 801130a: 4604 mov r4, r0
  40250. switch (msg->type) {
  40251. 801130c: 7803 ldrb r3, [r0, #0]
  40252. 801130e: 2b01 cmp r3, #1
  40253. 8011310: d017 beq.n 8011342 <tcpip_thread_handle_msg+0x3a>
  40254. 8011312: 2b02 cmp r3, #2
  40255. 8011314: d01d beq.n 8011352 <tcpip_thread_handle_msg+0x4a>
  40256. 8011316: b133 cbz r3, 8011326 <tcpip_thread_handle_msg+0x1e>
  40257. msg->msg.cb.function(msg->msg.cb.ctx);
  40258. break;
  40259. default:
  40260. LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type));
  40261. LWIP_ASSERT("tcpip_thread: invalid message", 0);
  40262. 8011318: 4b10 ldr r3, [pc, #64] @ (801135c <tcpip_thread_handle_msg+0x54>)
  40263. 801131a: 22cf movs r2, #207 @ 0xcf
  40264. 801131c: 4910 ldr r1, [pc, #64] @ (8011360 <tcpip_thread_handle_msg+0x58>)
  40265. 801131e: 4811 ldr r0, [pc, #68] @ (8011364 <tcpip_thread_handle_msg+0x5c>)
  40266. 8011320: f002 f872 bl 8013408 <iprintf>
  40267. break;
  40268. }
  40269. }
  40270. 8011324: e008 b.n 8011338 <tcpip_thread_handle_msg+0x30>
  40271. if (msg->msg.inp.input_fn(msg->msg.inp.p, msg->msg.inp.netif) != ERR_OK) {
  40272. 8011326: 68c3 ldr r3, [r0, #12]
  40273. 8011328: 6881 ldr r1, [r0, #8]
  40274. 801132a: 6840 ldr r0, [r0, #4]
  40275. 801132c: 4798 blx r3
  40276. 801132e: b920 cbnz r0, 801133a <tcpip_thread_handle_msg+0x32>
  40277. memp_free(MEMP_TCPIP_MSG_INPKT, msg);
  40278. 8011330: 4621 mov r1, r4
  40279. 8011332: 2009 movs r0, #9
  40280. 8011334: f7fa f99c bl 800b670 <memp_free>
  40281. }
  40282. 8011338: bd10 pop {r4, pc}
  40283. pbuf_free(msg->msg.inp.p);
  40284. 801133a: 6860 ldr r0, [r4, #4]
  40285. 801133c: f7fa fd30 bl 800bda0 <pbuf_free>
  40286. 8011340: e7f6 b.n 8011330 <tcpip_thread_handle_msg+0x28>
  40287. msg->msg.cb.function(msg->msg.cb.ctx);
  40288. 8011342: 6843 ldr r3, [r0, #4]
  40289. 8011344: 6880 ldr r0, [r0, #8]
  40290. 8011346: 4798 blx r3
  40291. memp_free(MEMP_TCPIP_MSG_API, msg);
  40292. 8011348: 4621 mov r1, r4
  40293. 801134a: 2008 movs r0, #8
  40294. 801134c: f7fa f990 bl 800b670 <memp_free>
  40295. break;
  40296. 8011350: e7f2 b.n 8011338 <tcpip_thread_handle_msg+0x30>
  40297. msg->msg.cb.function(msg->msg.cb.ctx);
  40298. 8011352: 6843 ldr r3, [r0, #4]
  40299. 8011354: 6880 ldr r0, [r0, #8]
  40300. 8011356: 4798 blx r3
  40301. break;
  40302. 8011358: e7ee b.n 8011338 <tcpip_thread_handle_msg+0x30>
  40303. 801135a: bf00 nop
  40304. 801135c: 08017960 .word 0x08017960
  40305. 8011360: 080179c0 .word 0x080179c0
  40306. 8011364: 080144e8 .word 0x080144e8
  40307. 08011368 <tcpip_thread>:
  40308. {
  40309. 8011368: b500 push {lr}
  40310. 801136a: b083 sub sp, #12
  40311. LWIP_MARK_TCPIP_THREAD();
  40312. 801136c: f7f2 fc02 bl 8003b74 <sys_mark_tcpip_thread>
  40313. LOCK_TCPIP_CORE();
  40314. 8011370: f7f2 fbb2 bl 8003ad8 <sys_lock_tcpip_core>
  40315. if (tcpip_init_done != NULL) {
  40316. 8011374: 4b0b ldr r3, [pc, #44] @ (80113a4 <tcpip_thread+0x3c>)
  40317. 8011376: 681b ldr r3, [r3, #0]
  40318. 8011378: b12b cbz r3, 8011386 <tcpip_thread+0x1e>
  40319. tcpip_init_done(tcpip_init_done_arg);
  40320. 801137a: 4a0b ldr r2, [pc, #44] @ (80113a8 <tcpip_thread+0x40>)
  40321. 801137c: 6810 ldr r0, [r2, #0]
  40322. 801137e: 4798 blx r3
  40323. 8011380: e001 b.n 8011386 <tcpip_thread+0x1e>
  40324. tcpip_thread_handle_msg(msg);
  40325. 8011382: f7ff ffc1 bl 8011308 <tcpip_thread_handle_msg>
  40326. TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg);
  40327. 8011386: a901 add r1, sp, #4
  40328. 8011388: 4808 ldr r0, [pc, #32] @ (80113ac <tcpip_thread+0x44>)
  40329. 801138a: f7ff ff93 bl 80112b4 <tcpip_timeouts_mbox_fetch>
  40330. if (msg == NULL) {
  40331. 801138e: 9801 ldr r0, [sp, #4]
  40332. 8011390: 2800 cmp r0, #0
  40333. 8011392: d1f6 bne.n 8011382 <tcpip_thread+0x1a>
  40334. LWIP_ASSERT("tcpip_thread: invalid message", 0);
  40335. 8011394: 4b06 ldr r3, [pc, #24] @ (80113b0 <tcpip_thread+0x48>)
  40336. 8011396: 2291 movs r2, #145 @ 0x91
  40337. 8011398: 4906 ldr r1, [pc, #24] @ (80113b4 <tcpip_thread+0x4c>)
  40338. 801139a: 4807 ldr r0, [pc, #28] @ (80113b8 <tcpip_thread+0x50>)
  40339. 801139c: f002 f834 bl 8013408 <iprintf>
  40340. continue;
  40341. 80113a0: e7f1 b.n 8011386 <tcpip_thread+0x1e>
  40342. 80113a2: bf00 nop
  40343. 80113a4: 24019c30 .word 0x24019c30
  40344. 80113a8: 24019c2c .word 0x24019c2c
  40345. 80113ac: 24019c28 .word 0x24019c28
  40346. 80113b0: 08017960 .word 0x08017960
  40347. 80113b4: 080179c0 .word 0x080179c0
  40348. 80113b8: 080144e8 .word 0x080144e8
  40349. 080113bc <tcpip_inpkt>:
  40350. * @param inp the network interface on which the packet was received
  40351. * @param input_fn input function to call
  40352. */
  40353. err_t
  40354. tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn)
  40355. {
  40356. 80113bc: b5f8 push {r3, r4, r5, r6, r7, lr}
  40357. 80113be: 4607 mov r7, r0
  40358. 80113c0: 460e mov r6, r1
  40359. 80113c2: 4615 mov r5, r2
  40360. UNLOCK_TCPIP_CORE();
  40361. return ret;
  40362. #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */
  40363. struct tcpip_msg *msg;
  40364. LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
  40365. 80113c4: 4812 ldr r0, [pc, #72] @ (8011410 <tcpip_inpkt+0x54>)
  40366. 80113c6: f7fb fdcc bl 800cf62 <sys_mbox_valid>
  40367. 80113ca: b178 cbz r0, 80113ec <tcpip_inpkt+0x30>
  40368. msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT);
  40369. 80113cc: 2009 movs r0, #9
  40370. 80113ce: f7fa f919 bl 800b604 <memp_malloc>
  40371. if (msg == NULL) {
  40372. 80113d2: 4604 mov r4, r0
  40373. 80113d4: b1c0 cbz r0, 8011408 <tcpip_inpkt+0x4c>
  40374. return ERR_MEM;
  40375. }
  40376. msg->type = TCPIP_MSG_INPKT;
  40377. 80113d6: 2300 movs r3, #0
  40378. 80113d8: 7003 strb r3, [r0, #0]
  40379. msg->msg.inp.p = p;
  40380. 80113da: 6047 str r7, [r0, #4]
  40381. msg->msg.inp.netif = inp;
  40382. 80113dc: 6086 str r6, [r0, #8]
  40383. msg->msg.inp.input_fn = input_fn;
  40384. 80113de: 60c5 str r5, [r0, #12]
  40385. if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) {
  40386. 80113e0: 4601 mov r1, r0
  40387. 80113e2: 480b ldr r0, [pc, #44] @ (8011410 <tcpip_inpkt+0x54>)
  40388. 80113e4: f7fb fd81 bl 800ceea <sys_mbox_trypost>
  40389. 80113e8: b938 cbnz r0, 80113fa <tcpip_inpkt+0x3e>
  40390. memp_free(MEMP_TCPIP_MSG_INPKT, msg);
  40391. return ERR_MEM;
  40392. }
  40393. return ERR_OK;
  40394. #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */
  40395. }
  40396. 80113ea: bdf8 pop {r3, r4, r5, r6, r7, pc}
  40397. LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
  40398. 80113ec: 4b09 ldr r3, [pc, #36] @ (8011414 <tcpip_inpkt+0x58>)
  40399. 80113ee: 22fc movs r2, #252 @ 0xfc
  40400. 80113f0: 4909 ldr r1, [pc, #36] @ (8011418 <tcpip_inpkt+0x5c>)
  40401. 80113f2: 480a ldr r0, [pc, #40] @ (801141c <tcpip_inpkt+0x60>)
  40402. 80113f4: f002 f808 bl 8013408 <iprintf>
  40403. 80113f8: e7e8 b.n 80113cc <tcpip_inpkt+0x10>
  40404. memp_free(MEMP_TCPIP_MSG_INPKT, msg);
  40405. 80113fa: 4621 mov r1, r4
  40406. 80113fc: 2009 movs r0, #9
  40407. 80113fe: f7fa f937 bl 800b670 <memp_free>
  40408. return ERR_MEM;
  40409. 8011402: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  40410. 8011406: e7f0 b.n 80113ea <tcpip_inpkt+0x2e>
  40411. return ERR_MEM;
  40412. 8011408: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  40413. 801140c: e7ed b.n 80113ea <tcpip_inpkt+0x2e>
  40414. 801140e: bf00 nop
  40415. 8011410: 24019c28 .word 0x24019c28
  40416. 8011414: 08017960 .word 0x08017960
  40417. 8011418: 080179e0 .word 0x080179e0
  40418. 801141c: 080144e8 .word 0x080144e8
  40419. 08011420 <tcpip_input>:
  40420. * NETIF_FLAG_ETHERNET flags)
  40421. * @param inp the network interface on which the packet was received
  40422. */
  40423. err_t
  40424. tcpip_input(struct pbuf *p, struct netif *inp)
  40425. {
  40426. 8011420: b508 push {r3, lr}
  40427. #if LWIP_ETHERNET
  40428. if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) {
  40429. 8011422: f891 3031 ldrb.w r3, [r1, #49] @ 0x31
  40430. 8011426: f013 0f18 tst.w r3, #24
  40431. 801142a: d003 beq.n 8011434 <tcpip_input+0x14>
  40432. return tcpip_inpkt(p, inp, ethernet_input);
  40433. 801142c: 4a03 ldr r2, [pc, #12] @ (801143c <tcpip_input+0x1c>)
  40434. 801142e: f7ff ffc5 bl 80113bc <tcpip_inpkt>
  40435. } else
  40436. #endif /* LWIP_ETHERNET */
  40437. return tcpip_inpkt(p, inp, ip_input);
  40438. }
  40439. 8011432: bd08 pop {r3, pc}
  40440. return tcpip_inpkt(p, inp, ip_input);
  40441. 8011434: 4a02 ldr r2, [pc, #8] @ (8011440 <tcpip_input+0x20>)
  40442. 8011436: f7ff ffc1 bl 80113bc <tcpip_inpkt>
  40443. 801143a: e7fa b.n 8011432 <tcpip_input+0x12>
  40444. 801143c: 08009c99 .word 0x08009c99
  40445. 8011440: 0800a169 .word 0x0800a169
  40446. 08011444 <tcpip_try_callback>:
  40447. *
  40448. * @see tcpip_callback
  40449. */
  40450. err_t
  40451. tcpip_try_callback(tcpip_callback_fn function, void *ctx)
  40452. {
  40453. 8011444: b570 push {r4, r5, r6, lr}
  40454. 8011446: 4606 mov r6, r0
  40455. 8011448: 460d mov r5, r1
  40456. struct tcpip_msg *msg;
  40457. LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
  40458. 801144a: 4812 ldr r0, [pc, #72] @ (8011494 <tcpip_try_callback+0x50>)
  40459. 801144c: f7fb fd89 bl 800cf62 <sys_mbox_valid>
  40460. 8011450: b170 cbz r0, 8011470 <tcpip_try_callback+0x2c>
  40461. msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API);
  40462. 8011452: 2008 movs r0, #8
  40463. 8011454: f7fa f8d6 bl 800b604 <memp_malloc>
  40464. if (msg == NULL) {
  40465. 8011458: 4604 mov r4, r0
  40466. 801145a: b1c0 cbz r0, 801148e <tcpip_try_callback+0x4a>
  40467. return ERR_MEM;
  40468. }
  40469. msg->type = TCPIP_MSG_CALLBACK;
  40470. 801145c: 2301 movs r3, #1
  40471. 801145e: 7003 strb r3, [r0, #0]
  40472. msg->msg.cb.function = function;
  40473. 8011460: 6046 str r6, [r0, #4]
  40474. msg->msg.cb.ctx = ctx;
  40475. 8011462: 6085 str r5, [r0, #8]
  40476. if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) {
  40477. 8011464: 4601 mov r1, r0
  40478. 8011466: 480b ldr r0, [pc, #44] @ (8011494 <tcpip_try_callback+0x50>)
  40479. 8011468: f7fb fd3f bl 800ceea <sys_mbox_trypost>
  40480. 801146c: b940 cbnz r0, 8011480 <tcpip_try_callback+0x3c>
  40481. memp_free(MEMP_TCPIP_MSG_API, msg);
  40482. return ERR_MEM;
  40483. }
  40484. return ERR_OK;
  40485. }
  40486. 801146e: bd70 pop {r4, r5, r6, pc}
  40487. LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox));
  40488. 8011470: 4b09 ldr r3, [pc, #36] @ (8011498 <tcpip_try_callback+0x54>)
  40489. 8011472: f240 125d movw r2, #349 @ 0x15d
  40490. 8011476: 4909 ldr r1, [pc, #36] @ (801149c <tcpip_try_callback+0x58>)
  40491. 8011478: 4809 ldr r0, [pc, #36] @ (80114a0 <tcpip_try_callback+0x5c>)
  40492. 801147a: f001 ffc5 bl 8013408 <iprintf>
  40493. 801147e: e7e8 b.n 8011452 <tcpip_try_callback+0xe>
  40494. memp_free(MEMP_TCPIP_MSG_API, msg);
  40495. 8011480: 4621 mov r1, r4
  40496. 8011482: 2008 movs r0, #8
  40497. 8011484: f7fa f8f4 bl 800b670 <memp_free>
  40498. return ERR_MEM;
  40499. 8011488: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  40500. 801148c: e7ef b.n 801146e <tcpip_try_callback+0x2a>
  40501. return ERR_MEM;
  40502. 801148e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  40503. 8011492: e7ec b.n 801146e <tcpip_try_callback+0x2a>
  40504. 8011494: 24019c28 .word 0x24019c28
  40505. 8011498: 08017960 .word 0x08017960
  40506. 801149c: 080179e0 .word 0x080179e0
  40507. 80114a0: 080144e8 .word 0x080144e8
  40508. 080114a4 <tcpip_send_msg_wait_sem>:
  40509. * @param sem semaphore to wait on
  40510. * @return ERR_OK if the function was called, another err_t if not
  40511. */
  40512. err_t
  40513. tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem)
  40514. {
  40515. 80114a4: b538 push {r3, r4, r5, lr}
  40516. 80114a6: 4604 mov r4, r0
  40517. 80114a8: 460d mov r5, r1
  40518. #if LWIP_TCPIP_CORE_LOCKING
  40519. LWIP_UNUSED_ARG(sem);
  40520. LOCK_TCPIP_CORE();
  40521. 80114aa: f7f2 fb15 bl 8003ad8 <sys_lock_tcpip_core>
  40522. fn(apimsg);
  40523. 80114ae: 4628 mov r0, r5
  40524. 80114b0: 47a0 blx r4
  40525. UNLOCK_TCPIP_CORE();
  40526. 80114b2: f7f2 fb1f bl 8003af4 <sys_unlock_tcpip_core>
  40527. sys_mbox_post(&tcpip_mbox, &TCPIP_MSG_VAR_REF(msg));
  40528. sys_arch_sem_wait(sem, 0);
  40529. TCPIP_MSG_VAR_FREE(msg);
  40530. return ERR_OK;
  40531. #endif /* LWIP_TCPIP_CORE_LOCKING */
  40532. }
  40533. 80114b6: 2000 movs r0, #0
  40534. 80114b8: bd38 pop {r3, r4, r5, pc}
  40535. ...
  40536. 080114bc <tcpip_init>:
  40537. * @param initfunc a function to call when tcpip_thread is running and finished initializing
  40538. * @param arg argument to pass to initfunc
  40539. */
  40540. void
  40541. tcpip_init(tcpip_init_done_fn initfunc, void *arg)
  40542. {
  40543. 80114bc: b530 push {r4, r5, lr}
  40544. 80114be: b083 sub sp, #12
  40545. 80114c0: 4605 mov r5, r0
  40546. 80114c2: 460c mov r4, r1
  40547. lwip_init();
  40548. 80114c4: f7f8 fdf2 bl 800a0ac <lwip_init>
  40549. tcpip_init_done = initfunc;
  40550. 80114c8: 4b13 ldr r3, [pc, #76] @ (8011518 <tcpip_init+0x5c>)
  40551. 80114ca: 601d str r5, [r3, #0]
  40552. tcpip_init_done_arg = arg;
  40553. 80114cc: 4b13 ldr r3, [pc, #76] @ (801151c <tcpip_init+0x60>)
  40554. 80114ce: 601c str r4, [r3, #0]
  40555. if (sys_mbox_new(&tcpip_mbox, TCPIP_MBOX_SIZE) != ERR_OK) {
  40556. 80114d0: 2106 movs r1, #6
  40557. 80114d2: 4813 ldr r0, [pc, #76] @ (8011520 <tcpip_init+0x64>)
  40558. 80114d4: f7fb fcf2 bl 800cebc <sys_mbox_new>
  40559. 80114d8: b970 cbnz r0, 80114f8 <tcpip_init+0x3c>
  40560. LWIP_ASSERT("failed to create tcpip_thread mbox", 0);
  40561. }
  40562. #if LWIP_TCPIP_CORE_LOCKING
  40563. if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) {
  40564. 80114da: 4812 ldr r0, [pc, #72] @ (8011524 <tcpip_init+0x68>)
  40565. 80114dc: f7fb fd9a bl 800d014 <sys_mutex_new>
  40566. 80114e0: b990 cbnz r0, 8011508 <tcpip_init+0x4c>
  40567. LWIP_ASSERT("failed to create lock_tcpip_core", 0);
  40568. }
  40569. #endif /* LWIP_TCPIP_CORE_LOCKING */
  40570. sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);
  40571. 80114e2: 2330 movs r3, #48 @ 0x30
  40572. 80114e4: 9300 str r3, [sp, #0]
  40573. 80114e6: f44f 5380 mov.w r3, #4096 @ 0x1000
  40574. 80114ea: 2200 movs r2, #0
  40575. 80114ec: 490e ldr r1, [pc, #56] @ (8011528 <tcpip_init+0x6c>)
  40576. 80114ee: 480f ldr r0, [pc, #60] @ (801152c <tcpip_init+0x70>)
  40577. 80114f0: f7fb fda8 bl 800d044 <sys_thread_new>
  40578. }
  40579. 80114f4: b003 add sp, #12
  40580. 80114f6: bd30 pop {r4, r5, pc}
  40581. LWIP_ASSERT("failed to create tcpip_thread mbox", 0);
  40582. 80114f8: 4b0d ldr r3, [pc, #52] @ (8011530 <tcpip_init+0x74>)
  40583. 80114fa: f240 2261 movw r2, #609 @ 0x261
  40584. 80114fe: 490d ldr r1, [pc, #52] @ (8011534 <tcpip_init+0x78>)
  40585. 8011500: 480d ldr r0, [pc, #52] @ (8011538 <tcpip_init+0x7c>)
  40586. 8011502: f001 ff81 bl 8013408 <iprintf>
  40587. 8011506: e7e8 b.n 80114da <tcpip_init+0x1e>
  40588. LWIP_ASSERT("failed to create lock_tcpip_core", 0);
  40589. 8011508: 4b09 ldr r3, [pc, #36] @ (8011530 <tcpip_init+0x74>)
  40590. 801150a: f240 2265 movw r2, #613 @ 0x265
  40591. 801150e: 490b ldr r1, [pc, #44] @ (801153c <tcpip_init+0x80>)
  40592. 8011510: 4809 ldr r0, [pc, #36] @ (8011538 <tcpip_init+0x7c>)
  40593. 8011512: f001 ff79 bl 8013408 <iprintf>
  40594. 8011516: e7e4 b.n 80114e2 <tcpip_init+0x26>
  40595. 8011518: 24019c30 .word 0x24019c30
  40596. 801151c: 24019c2c .word 0x24019c2c
  40597. 8011520: 24019c28 .word 0x24019c28
  40598. 8011524: 24019c24 .word 0x24019c24
  40599. 8011528: 08011369 .word 0x08011369
  40600. 801152c: 08017a38 .word 0x08017a38
  40601. 8011530: 08017960 .word 0x08017960
  40602. 8011534: 080179f0 .word 0x080179f0
  40603. 8011538: 080144e8 .word 0x080144e8
  40604. 801153c: 08017a14 .word 0x08017a14
  40605. 08011540 <sys_timeout_abs>:
  40606. #if LWIP_DEBUG_TIMERNAMES
  40607. sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg, const char *handler_name)
  40608. #else /* LWIP_DEBUG_TIMERNAMES */
  40609. sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg)
  40610. #endif
  40611. {
  40612. 8011540: b5f8 push {r3, r4, r5, r6, r7, lr}
  40613. 8011542: 4604 mov r4, r0
  40614. 8011544: 460f mov r7, r1
  40615. 8011546: 4616 mov r6, r2
  40616. struct sys_timeo *timeout, *t;
  40617. timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT);
  40618. 8011548: 200a movs r0, #10
  40619. 801154a: f7fa f85b bl 800b604 <memp_malloc>
  40620. if (timeout == NULL) {
  40621. 801154e: b180 cbz r0, 8011572 <sys_timeout_abs+0x32>
  40622. 8011550: 4605 mov r5, r0
  40623. LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL);
  40624. return;
  40625. }
  40626. timeout->next = NULL;
  40627. 8011552: 2300 movs r3, #0
  40628. 8011554: 6003 str r3, [r0, #0]
  40629. timeout->h = handler;
  40630. 8011556: 6087 str r7, [r0, #8]
  40631. timeout->arg = arg;
  40632. 8011558: 60c6 str r6, [r0, #12]
  40633. timeout->time = abs_time;
  40634. 801155a: 6044 str r4, [r0, #4]
  40635. timeout->handler_name = handler_name;
  40636. LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p abs_time=%"U32_F" handler=%s arg=%p\n",
  40637. (void *)timeout, abs_time, handler_name, (void *)arg));
  40638. #endif /* LWIP_DEBUG_TIMERNAMES */
  40639. if (next_timeout == NULL) {
  40640. 801155c: 4b10 ldr r3, [pc, #64] @ (80115a0 <sys_timeout_abs+0x60>)
  40641. 801155e: 681a ldr r2, [r3, #0]
  40642. 8011560: b172 cbz r2, 8011580 <sys_timeout_abs+0x40>
  40643. next_timeout = timeout;
  40644. return;
  40645. }
  40646. if (TIME_LESS_THAN(timeout->time, next_timeout->time)) {
  40647. 8011562: 6853 ldr r3, [r2, #4]
  40648. 8011564: 1ae3 subs r3, r4, r3
  40649. 8011566: 2b00 cmp r3, #0
  40650. 8011568: da0f bge.n 801158a <sys_timeout_abs+0x4a>
  40651. timeout->next = next_timeout;
  40652. 801156a: 6002 str r2, [r0, #0]
  40653. next_timeout = timeout;
  40654. 801156c: 4b0c ldr r3, [pc, #48] @ (80115a0 <sys_timeout_abs+0x60>)
  40655. 801156e: 6018 str r0, [r3, #0]
  40656. t->next = timeout;
  40657. break;
  40658. }
  40659. }
  40660. }
  40661. }
  40662. 8011570: bdf8 pop {r3, r4, r5, r6, r7, pc}
  40663. LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL);
  40664. 8011572: 4b0c ldr r3, [pc, #48] @ (80115a4 <sys_timeout_abs+0x64>)
  40665. 8011574: 22be movs r2, #190 @ 0xbe
  40666. 8011576: 490c ldr r1, [pc, #48] @ (80115a8 <sys_timeout_abs+0x68>)
  40667. 8011578: 480c ldr r0, [pc, #48] @ (80115ac <sys_timeout_abs+0x6c>)
  40668. 801157a: f001 ff45 bl 8013408 <iprintf>
  40669. return;
  40670. 801157e: e7f7 b.n 8011570 <sys_timeout_abs+0x30>
  40671. next_timeout = timeout;
  40672. 8011580: 6018 str r0, [r3, #0]
  40673. return;
  40674. 8011582: e7f5 b.n 8011570 <sys_timeout_abs+0x30>
  40675. timeout->next = t->next;
  40676. 8011584: 602b str r3, [r5, #0]
  40677. t->next = timeout;
  40678. 8011586: 6015 str r5, [r2, #0]
  40679. break;
  40680. 8011588: e7f2 b.n 8011570 <sys_timeout_abs+0x30>
  40681. for (t = next_timeout; t != NULL; t = t->next) {
  40682. 801158a: 2a00 cmp r2, #0
  40683. 801158c: d0f0 beq.n 8011570 <sys_timeout_abs+0x30>
  40684. if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) {
  40685. 801158e: 6813 ldr r3, [r2, #0]
  40686. 8011590: 2b00 cmp r3, #0
  40687. 8011592: d0f7 beq.n 8011584 <sys_timeout_abs+0x44>
  40688. 8011594: 6859 ldr r1, [r3, #4]
  40689. 8011596: 1a61 subs r1, r4, r1
  40690. 8011598: 2900 cmp r1, #0
  40691. 801159a: dbf3 blt.n 8011584 <sys_timeout_abs+0x44>
  40692. for (t = next_timeout; t != NULL; t = t->next) {
  40693. 801159c: 461a mov r2, r3
  40694. 801159e: e7f4 b.n 801158a <sys_timeout_abs+0x4a>
  40695. 80115a0: 24019c3c .word 0x24019c3c
  40696. 80115a4: 08017a48 .word 0x08017a48
  40697. 80115a8: 08017aac .word 0x08017aac
  40698. 80115ac: 080144e8 .word 0x080144e8
  40699. 080115b0 <lwip_cyclic_timer>:
  40700. #if !LWIP_TESTMODE
  40701. static
  40702. #endif
  40703. void
  40704. lwip_cyclic_timer(void *arg)
  40705. {
  40706. 80115b0: b538 push {r3, r4, r5, lr}
  40707. 80115b2: 4604 mov r4, r0
  40708. const struct lwip_cyclic_timer *cyclic = (const struct lwip_cyclic_timer *)arg;
  40709. #if LWIP_DEBUG_TIMERNAMES
  40710. LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name));
  40711. #endif
  40712. cyclic->handler();
  40713. 80115b4: 6843 ldr r3, [r0, #4]
  40714. 80115b6: 4798 blx r3
  40715. now = sys_now();
  40716. 80115b8: f7f2 f85a bl 8003670 <sys_now>
  40717. 80115bc: 4684 mov ip, r0
  40718. next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */
  40719. 80115be: 6825 ldr r5, [r4, #0]
  40720. 80115c0: 4b09 ldr r3, [pc, #36] @ (80115e8 <lwip_cyclic_timer+0x38>)
  40721. 80115c2: 6818 ldr r0, [r3, #0]
  40722. 80115c4: 4428 add r0, r5
  40723. if (TIME_LESS_THAN(next_timeout_time, now)) {
  40724. 80115c6: eba0 030c sub.w r3, r0, ip
  40725. 80115ca: 2b00 cmp r3, #0
  40726. 80115cc: da06 bge.n 80115dc <lwip_cyclic_timer+0x2c>
  40727. /* timer would immediately expire again -> "overload" -> restart without any correction */
  40728. #if LWIP_DEBUG_TIMERNAMES
  40729. sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg, cyclic->handler_name);
  40730. #else
  40731. sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg);
  40732. 80115ce: 4622 mov r2, r4
  40733. 80115d0: 4906 ldr r1, [pc, #24] @ (80115ec <lwip_cyclic_timer+0x3c>)
  40734. 80115d2: eb05 000c add.w r0, r5, ip
  40735. 80115d6: f7ff ffb3 bl 8011540 <sys_timeout_abs>
  40736. sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg, cyclic->handler_name);
  40737. #else
  40738. sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
  40739. #endif
  40740. }
  40741. }
  40742. 80115da: bd38 pop {r3, r4, r5, pc}
  40743. sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg);
  40744. 80115dc: 4622 mov r2, r4
  40745. 80115de: 4903 ldr r1, [pc, #12] @ (80115ec <lwip_cyclic_timer+0x3c>)
  40746. 80115e0: f7ff ffae bl 8011540 <sys_timeout_abs>
  40747. }
  40748. 80115e4: e7f9 b.n 80115da <lwip_cyclic_timer+0x2a>
  40749. 80115e6: bf00 nop
  40750. 80115e8: 24019c38 .word 0x24019c38
  40751. 80115ec: 080115b1 .word 0x080115b1
  40752. 080115f0 <sys_timeout>:
  40753. sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char *handler_name)
  40754. #else /* LWIP_DEBUG_TIMERNAMES */
  40755. void
  40756. sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg)
  40757. #endif /* LWIP_DEBUG_TIMERNAMES */
  40758. {
  40759. 80115f0: b570 push {r4, r5, r6, lr}
  40760. 80115f2: 4604 mov r4, r0
  40761. 80115f4: 460d mov r5, r1
  40762. 80115f6: 4616 mov r6, r2
  40763. u32_t next_timeout_time;
  40764. LWIP_ASSERT_CORE_LOCKED();
  40765. 80115f8: f7f2 fa88 bl 8003b0c <sys_check_core_locking>
  40766. LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4));
  40767. 80115fc: f1b4 4f80 cmp.w r4, #1073741824 @ 0x40000000
  40768. 8011600: d207 bcs.n 8011612 <sys_timeout+0x22>
  40769. next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */
  40770. 8011602: f7f2 f835 bl 8003670 <sys_now>
  40771. #if LWIP_DEBUG_TIMERNAMES
  40772. sys_timeout_abs(next_timeout_time, handler, arg, handler_name);
  40773. #else
  40774. sys_timeout_abs(next_timeout_time, handler, arg);
  40775. 8011606: 4632 mov r2, r6
  40776. 8011608: 4629 mov r1, r5
  40777. 801160a: 4420 add r0, r4
  40778. 801160c: f7ff ff98 bl 8011540 <sys_timeout_abs>
  40779. #endif
  40780. }
  40781. 8011610: bd70 pop {r4, r5, r6, pc}
  40782. LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4));
  40783. 8011612: 4b04 ldr r3, [pc, #16] @ (8011624 <sys_timeout+0x34>)
  40784. 8011614: f240 1229 movw r2, #297 @ 0x129
  40785. 8011618: 4903 ldr r1, [pc, #12] @ (8011628 <sys_timeout+0x38>)
  40786. 801161a: 4804 ldr r0, [pc, #16] @ (801162c <sys_timeout+0x3c>)
  40787. 801161c: f001 fef4 bl 8013408 <iprintf>
  40788. 8011620: e7ef b.n 8011602 <sys_timeout+0x12>
  40789. 8011622: bf00 nop
  40790. 8011624: 08017a48 .word 0x08017a48
  40791. 8011628: 08017aec .word 0x08017aec
  40792. 801162c: 080144e8 .word 0x080144e8
  40793. 08011630 <tcp_timer_needed>:
  40794. {
  40795. 8011630: b508 push {r3, lr}
  40796. LWIP_ASSERT_CORE_LOCKED();
  40797. 8011632: f7f2 fa6b bl 8003b0c <sys_check_core_locking>
  40798. if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) {
  40799. 8011636: 4b0a ldr r3, [pc, #40] @ (8011660 <tcp_timer_needed+0x30>)
  40800. 8011638: 681b ldr r3, [r3, #0]
  40801. 801163a: b953 cbnz r3, 8011652 <tcp_timer_needed+0x22>
  40802. 801163c: 4b09 ldr r3, [pc, #36] @ (8011664 <tcp_timer_needed+0x34>)
  40803. 801163e: 681b ldr r3, [r3, #0]
  40804. 8011640: b143 cbz r3, 8011654 <tcp_timer_needed+0x24>
  40805. tcpip_tcp_timer_active = 1;
  40806. 8011642: 4b07 ldr r3, [pc, #28] @ (8011660 <tcp_timer_needed+0x30>)
  40807. 8011644: 2201 movs r2, #1
  40808. 8011646: 601a str r2, [r3, #0]
  40809. sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
  40810. 8011648: 2200 movs r2, #0
  40811. 801164a: 4907 ldr r1, [pc, #28] @ (8011668 <tcp_timer_needed+0x38>)
  40812. 801164c: 20fa movs r0, #250 @ 0xfa
  40813. 801164e: f7ff ffcf bl 80115f0 <sys_timeout>
  40814. }
  40815. 8011652: bd08 pop {r3, pc}
  40816. if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) {
  40817. 8011654: 4b05 ldr r3, [pc, #20] @ (801166c <tcp_timer_needed+0x3c>)
  40818. 8011656: 681b ldr r3, [r3, #0]
  40819. 8011658: 2b00 cmp r3, #0
  40820. 801165a: d1f2 bne.n 8011642 <tcp_timer_needed+0x12>
  40821. 801165c: e7f9 b.n 8011652 <tcp_timer_needed+0x22>
  40822. 801165e: bf00 nop
  40823. 8011660: 24019c34 .word 0x24019c34
  40824. 8011664: 24019bd8 .word 0x24019bd8
  40825. 8011668: 08011671 .word 0x08011671
  40826. 801166c: 24019bd4 .word 0x24019bd4
  40827. 08011670 <tcpip_tcp_timer>:
  40828. {
  40829. 8011670: b508 push {r3, lr}
  40830. tcp_tmr();
  40831. 8011672: f7fc fead bl 800e3d0 <tcp_tmr>
  40832. if (tcp_active_pcbs || tcp_tw_pcbs) {
  40833. 8011676: 4b08 ldr r3, [pc, #32] @ (8011698 <tcpip_tcp_timer+0x28>)
  40834. 8011678: 681b ldr r3, [r3, #0]
  40835. 801167a: b12b cbz r3, 8011688 <tcpip_tcp_timer+0x18>
  40836. sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
  40837. 801167c: 2200 movs r2, #0
  40838. 801167e: 4907 ldr r1, [pc, #28] @ (801169c <tcpip_tcp_timer+0x2c>)
  40839. 8011680: 20fa movs r0, #250 @ 0xfa
  40840. 8011682: f7ff ffb5 bl 80115f0 <sys_timeout>
  40841. }
  40842. 8011686: bd08 pop {r3, pc}
  40843. if (tcp_active_pcbs || tcp_tw_pcbs) {
  40844. 8011688: 4b05 ldr r3, [pc, #20] @ (80116a0 <tcpip_tcp_timer+0x30>)
  40845. 801168a: 681b ldr r3, [r3, #0]
  40846. 801168c: 2b00 cmp r3, #0
  40847. 801168e: d1f5 bne.n 801167c <tcpip_tcp_timer+0xc>
  40848. tcpip_tcp_timer_active = 0;
  40849. 8011690: 4b04 ldr r3, [pc, #16] @ (80116a4 <tcpip_tcp_timer+0x34>)
  40850. 8011692: 2200 movs r2, #0
  40851. 8011694: 601a str r2, [r3, #0]
  40852. }
  40853. 8011696: e7f6 b.n 8011686 <tcpip_tcp_timer+0x16>
  40854. 8011698: 24019bd8 .word 0x24019bd8
  40855. 801169c: 08011671 .word 0x08011671
  40856. 80116a0: 24019bd4 .word 0x24019bd4
  40857. 80116a4: 24019c34 .word 0x24019c34
  40858. 080116a8 <sys_timeouts_init>:
  40859. {
  40860. 80116a8: b510 push {r4, lr}
  40861. for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
  40862. 80116aa: 2401 movs r4, #1
  40863. 80116ac: e008 b.n 80116c0 <sys_timeouts_init+0x18>
  40864. sys_timeout(lwip_cyclic_timers[i].interval_ms, lwip_cyclic_timer, LWIP_CONST_CAST(void *, &lwip_cyclic_timers[i]));
  40865. 80116ae: 4b06 ldr r3, [pc, #24] @ (80116c8 <sys_timeouts_init+0x20>)
  40866. 80116b0: eb03 02c4 add.w r2, r3, r4, lsl #3
  40867. 80116b4: 4905 ldr r1, [pc, #20] @ (80116cc <sys_timeouts_init+0x24>)
  40868. 80116b6: f853 0034 ldr.w r0, [r3, r4, lsl #3]
  40869. 80116ba: f7ff ff99 bl 80115f0 <sys_timeout>
  40870. for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) {
  40871. 80116be: 3401 adds r4, #1
  40872. 80116c0: 2c04 cmp r4, #4
  40873. 80116c2: d9f4 bls.n 80116ae <sys_timeouts_init+0x6>
  40874. }
  40875. 80116c4: bd10 pop {r4, pc}
  40876. 80116c6: bf00 nop
  40877. 80116c8: 08017b38 .word 0x08017b38
  40878. 80116cc: 080115b1 .word 0x080115b1
  40879. 080116d0 <sys_check_timeouts>:
  40880. *
  40881. * Must be called periodically from your main loop.
  40882. */
  40883. void
  40884. sys_check_timeouts(void)
  40885. {
  40886. 80116d0: b570 push {r4, r5, r6, lr}
  40887. u32_t now;
  40888. LWIP_ASSERT_CORE_LOCKED();
  40889. 80116d2: f7f2 fa1b bl 8003b0c <sys_check_core_locking>
  40890. /* Process only timers expired at the start of the function. */
  40891. now = sys_now();
  40892. 80116d6: f7f1 ffcb bl 8003670 <sys_now>
  40893. 80116da: 4605 mov r5, r0
  40894. sys_timeout_handler handler;
  40895. void *arg;
  40896. PBUF_CHECK_FREE_OOSEQ();
  40897. tmptimeout = next_timeout;
  40898. 80116dc: 4b0b ldr r3, [pc, #44] @ (801170c <sys_check_timeouts+0x3c>)
  40899. 80116de: 6819 ldr r1, [r3, #0]
  40900. if (tmptimeout == NULL) {
  40901. 80116e0: b191 cbz r1, 8011708 <sys_check_timeouts+0x38>
  40902. return;
  40903. }
  40904. if (TIME_LESS_THAN(now, tmptimeout->time)) {
  40905. 80116e2: 684b ldr r3, [r1, #4]
  40906. 80116e4: 1aea subs r2, r5, r3
  40907. 80116e6: 2a00 cmp r2, #0
  40908. 80116e8: db0e blt.n 8011708 <sys_check_timeouts+0x38>
  40909. return;
  40910. }
  40911. /* Timeout has expired */
  40912. next_timeout = tmptimeout->next;
  40913. 80116ea: 6808 ldr r0, [r1, #0]
  40914. 80116ec: 4a07 ldr r2, [pc, #28] @ (801170c <sys_check_timeouts+0x3c>)
  40915. 80116ee: 6010 str r0, [r2, #0]
  40916. handler = tmptimeout->h;
  40917. 80116f0: 688c ldr r4, [r1, #8]
  40918. arg = tmptimeout->arg;
  40919. 80116f2: 68ce ldr r6, [r1, #12]
  40920. current_timeout_due_time = tmptimeout->time;
  40921. 80116f4: 4a06 ldr r2, [pc, #24] @ (8011710 <sys_check_timeouts+0x40>)
  40922. 80116f6: 6013 str r3, [r2, #0]
  40923. if (handler != NULL) {
  40924. LWIP_DEBUGF(TIMERS_DEBUG, ("sct calling h=%s t=%"U32_F" arg=%p\n",
  40925. tmptimeout->handler_name, sys_now() - tmptimeout->time, arg));
  40926. }
  40927. #endif /* LWIP_DEBUG_TIMERNAMES */
  40928. memp_free(MEMP_SYS_TIMEOUT, tmptimeout);
  40929. 80116f8: 200a movs r0, #10
  40930. 80116fa: f7f9 ffb9 bl 800b670 <memp_free>
  40931. if (handler != NULL) {
  40932. 80116fe: 2c00 cmp r4, #0
  40933. 8011700: d0ec beq.n 80116dc <sys_check_timeouts+0xc>
  40934. handler(arg);
  40935. 8011702: 4630 mov r0, r6
  40936. 8011704: 47a0 blx r4
  40937. 8011706: e7e9 b.n 80116dc <sys_check_timeouts+0xc>
  40938. }
  40939. LWIP_TCPIP_THREAD_ALIVE();
  40940. /* Repeat until all expired timers have been called */
  40941. } while (1);
  40942. }
  40943. 8011708: bd70 pop {r4, r5, r6, pc}
  40944. 801170a: bf00 nop
  40945. 801170c: 24019c3c .word 0x24019c3c
  40946. 8011710: 24019c38 .word 0x24019c38
  40947. 08011714 <sys_timeouts_sleeptime>:
  40948. /** Return the time left before the next timeout is due. If no timeouts are
  40949. * enqueued, returns 0xffffffff
  40950. */
  40951. u32_t
  40952. sys_timeouts_sleeptime(void)
  40953. {
  40954. 8011714: b510 push {r4, lr}
  40955. u32_t now;
  40956. LWIP_ASSERT_CORE_LOCKED();
  40957. 8011716: f7f2 f9f9 bl 8003b0c <sys_check_core_locking>
  40958. if (next_timeout == NULL) {
  40959. 801171a: 4b0d ldr r3, [pc, #52] @ (8011750 <sys_timeouts_sleeptime+0x3c>)
  40960. 801171c: 681b ldr r3, [r3, #0]
  40961. 801171e: b183 cbz r3, 8011742 <sys_timeouts_sleeptime+0x2e>
  40962. return SYS_TIMEOUTS_SLEEPTIME_INFINITE;
  40963. }
  40964. now = sys_now();
  40965. 8011720: f7f1 ffa6 bl 8003670 <sys_now>
  40966. if (TIME_LESS_THAN(next_timeout->time, now)) {
  40967. 8011724: 4b0a ldr r3, [pc, #40] @ (8011750 <sys_timeouts_sleeptime+0x3c>)
  40968. 8011726: 681b ldr r3, [r3, #0]
  40969. 8011728: 685c ldr r4, [r3, #4]
  40970. 801172a: 1a24 subs r4, r4, r0
  40971. 801172c: d40c bmi.n 8011748 <sys_timeouts_sleeptime+0x34>
  40972. return 0;
  40973. } else {
  40974. u32_t ret = (u32_t)(next_timeout->time - now);
  40975. LWIP_ASSERT("invalid sleeptime", ret <= LWIP_MAX_TIMEOUT);
  40976. 801172e: 2c00 cmp r4, #0
  40977. 8011730: da0b bge.n 801174a <sys_timeouts_sleeptime+0x36>
  40978. 8011732: 4b08 ldr r3, [pc, #32] @ (8011754 <sys_timeouts_sleeptime+0x40>)
  40979. 8011734: f44f 72dc mov.w r2, #440 @ 0x1b8
  40980. 8011738: 4907 ldr r1, [pc, #28] @ (8011758 <sys_timeouts_sleeptime+0x44>)
  40981. 801173a: 4808 ldr r0, [pc, #32] @ (801175c <sys_timeouts_sleeptime+0x48>)
  40982. 801173c: f001 fe64 bl 8013408 <iprintf>
  40983. return ret;
  40984. 8011740: e003 b.n 801174a <sys_timeouts_sleeptime+0x36>
  40985. return SYS_TIMEOUTS_SLEEPTIME_INFINITE;
  40986. 8011742: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  40987. 8011746: e000 b.n 801174a <sys_timeouts_sleeptime+0x36>
  40988. return 0;
  40989. 8011748: 2400 movs r4, #0
  40990. }
  40991. }
  40992. 801174a: 4620 mov r0, r4
  40993. 801174c: bd10 pop {r4, pc}
  40994. 801174e: bf00 nop
  40995. 8011750: 24019c3c .word 0x24019c3c
  40996. 8011754: 08017a48 .word 0x08017a48
  40997. 8011758: 08017b24 .word 0x08017b24
  40998. 801175c: 080144e8 .word 0x080144e8
  40999. 08011760 <udp_new_port>:
  41000. * @return a new (free) local UDP port number
  41001. */
  41002. static u16_t
  41003. udp_new_port(void)
  41004. {
  41005. u16_t n = 0;
  41006. 8011760: 2000 movs r0, #0
  41007. struct udp_pcb *pcb;
  41008. again:
  41009. if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) {
  41010. 8011762: 4a10 ldr r2, [pc, #64] @ (80117a4 <udp_new_port+0x44>)
  41011. 8011764: 8813 ldrh r3, [r2, #0]
  41012. 8011766: 1c59 adds r1, r3, #1
  41013. 8011768: 8011 strh r1, [r2, #0]
  41014. 801176a: f64f 72ff movw r2, #65535 @ 0xffff
  41015. 801176e: 4293 cmp r3, r2
  41016. 8011770: d009 beq.n 8011786 <udp_new_port+0x26>
  41017. udp_port = UDP_LOCAL_PORT_RANGE_START;
  41018. }
  41019. /* Check all PCBs. */
  41020. for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
  41021. 8011772: 4b0d ldr r3, [pc, #52] @ (80117a8 <udp_new_port+0x48>)
  41022. 8011774: 681b ldr r3, [r3, #0]
  41023. 8011776: b193 cbz r3, 801179e <udp_new_port+0x3e>
  41024. if (pcb->local_port == udp_port) {
  41025. 8011778: 8a59 ldrh r1, [r3, #18]
  41026. 801177a: 4a0a ldr r2, [pc, #40] @ (80117a4 <udp_new_port+0x44>)
  41027. 801177c: 8812 ldrh r2, [r2, #0]
  41028. 801177e: 4291 cmp r1, r2
  41029. 8011780: d006 beq.n 8011790 <udp_new_port+0x30>
  41030. for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
  41031. 8011782: 68db ldr r3, [r3, #12]
  41032. 8011784: e7f7 b.n 8011776 <udp_new_port+0x16>
  41033. udp_port = UDP_LOCAL_PORT_RANGE_START;
  41034. 8011786: 4b07 ldr r3, [pc, #28] @ (80117a4 <udp_new_port+0x44>)
  41035. 8011788: f44f 4240 mov.w r2, #49152 @ 0xc000
  41036. 801178c: 801a strh r2, [r3, #0]
  41037. 801178e: e7f0 b.n 8011772 <udp_new_port+0x12>
  41038. if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) {
  41039. 8011790: 3001 adds r0, #1
  41040. 8011792: b280 uxth r0, r0
  41041. 8011794: f5b0 4f80 cmp.w r0, #16384 @ 0x4000
  41042. 8011798: d3e3 bcc.n 8011762 <udp_new_port+0x2>
  41043. return 0;
  41044. 801179a: 2000 movs r0, #0
  41045. }
  41046. goto again;
  41047. }
  41048. }
  41049. return udp_port;
  41050. }
  41051. 801179c: 4770 bx lr
  41052. return udp_port;
  41053. 801179e: 4b01 ldr r3, [pc, #4] @ (80117a4 <udp_new_port+0x44>)
  41054. 80117a0: 8818 ldrh r0, [r3, #0]
  41055. 80117a2: 4770 bx lr
  41056. 80117a4: 2400002e .word 0x2400002e
  41057. 80117a8: 24019c40 .word 0x24019c40
  41058. 080117ac <udp_input_local_match>:
  41059. * @param broadcast 1 if his is an IPv4 broadcast (global or subnet-only), 0 otherwise (only used for IPv4)
  41060. * @return 1 on match, 0 otherwise
  41061. */
  41062. static u8_t
  41063. udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast)
  41064. {
  41065. 80117ac: b5f8 push {r3, r4, r5, r6, r7, lr}
  41066. 80117ae: 460e mov r6, r1
  41067. 80117b0: 4615 mov r5, r2
  41068. LWIP_UNUSED_ARG(inp); /* in IPv6 only case */
  41069. LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */
  41070. LWIP_ASSERT("udp_input_local_match: invalid pcb", pcb != NULL);
  41071. 80117b2: 4607 mov r7, r0
  41072. 80117b4: b1c8 cbz r0, 80117ea <udp_input_local_match+0x3e>
  41073. LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL);
  41074. 80117b6: b1fe cbz r6, 80117f8 <udp_input_local_match+0x4c>
  41075. /* check if PCB is bound to specific netif */
  41076. if ((pcb->netif_idx != NETIF_NO_INDEX) &&
  41077. 80117b8: 7a3c ldrb r4, [r7, #8]
  41078. 80117ba: b13c cbz r4, 80117cc <udp_input_local_match+0x20>
  41079. (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
  41080. 80117bc: 4b1e ldr r3, [pc, #120] @ (8011838 <udp_input_local_match+0x8c>)
  41081. 80117be: 685b ldr r3, [r3, #4]
  41082. 80117c0: f893 3034 ldrb.w r3, [r3, #52] @ 0x34
  41083. 80117c4: 3301 adds r3, #1
  41084. 80117c6: b2db uxtb r3, r3
  41085. if ((pcb->netif_idx != NETIF_NO_INDEX) &&
  41086. 80117c8: 429c cmp r4, r3
  41087. 80117ca: d125 bne.n 8011818 <udp_input_local_match+0x6c>
  41088. /* Only need to check PCB if incoming IP version matches PCB IP version */
  41089. if (IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ip_current_dest_addr())) {
  41090. #if LWIP_IPV4
  41091. /* Special case: IPv4 broadcast: all or broadcasts in my subnet
  41092. * Note: broadcast variable can only be 1 if it is an IPv4 broadcast */
  41093. if (broadcast != 0) {
  41094. 80117cc: b1dd cbz r5, 8011806 <udp_input_local_match+0x5a>
  41095. #if IP_SOF_BROADCAST_RECV
  41096. if (ip_get_option(pcb, SOF_BROADCAST))
  41097. #endif /* IP_SOF_BROADCAST_RECV */
  41098. {
  41099. if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
  41100. 80117ce: b32f cbz r7, 801181c <udp_input_local_match+0x70>
  41101. 80117d0: 683b ldr r3, [r7, #0]
  41102. 80117d2: b32b cbz r3, 8011820 <udp_input_local_match+0x74>
  41103. ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
  41104. 80117d4: 4a18 ldr r2, [pc, #96] @ (8011838 <udp_input_local_match+0x8c>)
  41105. 80117d6: 6952 ldr r2, [r2, #20]
  41106. if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
  41107. 80117d8: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff
  41108. 80117dc: d022 beq.n 8011824 <udp_input_local_match+0x78>
  41109. ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) {
  41110. 80117de: 68b1 ldr r1, [r6, #8]
  41111. 80117e0: 4053 eors r3, r2
  41112. ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) ||
  41113. 80117e2: 420b tst r3, r1
  41114. 80117e4: d020 beq.n 8011828 <udp_input_local_match+0x7c>
  41115. if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
  41116. return 1;
  41117. }
  41118. }
  41119. return 0;
  41120. 80117e6: 2000 movs r0, #0
  41121. 80117e8: e017 b.n 801181a <udp_input_local_match+0x6e>
  41122. LWIP_ASSERT("udp_input_local_match: invalid pcb", pcb != NULL);
  41123. 80117ea: 4b14 ldr r3, [pc, #80] @ (801183c <udp_input_local_match+0x90>)
  41124. 80117ec: 2287 movs r2, #135 @ 0x87
  41125. 80117ee: 4914 ldr r1, [pc, #80] @ (8011840 <udp_input_local_match+0x94>)
  41126. 80117f0: 4814 ldr r0, [pc, #80] @ (8011844 <udp_input_local_match+0x98>)
  41127. 80117f2: f001 fe09 bl 8013408 <iprintf>
  41128. 80117f6: e7de b.n 80117b6 <udp_input_local_match+0xa>
  41129. LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL);
  41130. 80117f8: 4b10 ldr r3, [pc, #64] @ (801183c <udp_input_local_match+0x90>)
  41131. 80117fa: 2288 movs r2, #136 @ 0x88
  41132. 80117fc: 4912 ldr r1, [pc, #72] @ (8011848 <udp_input_local_match+0x9c>)
  41133. 80117fe: 4811 ldr r0, [pc, #68] @ (8011844 <udp_input_local_match+0x98>)
  41134. 8011800: f001 fe02 bl 8013408 <iprintf>
  41135. 8011804: e7d8 b.n 80117b8 <udp_input_local_match+0xc>
  41136. if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) {
  41137. 8011806: b18f cbz r7, 801182c <udp_input_local_match+0x80>
  41138. 8011808: 683b ldr r3, [r7, #0]
  41139. 801180a: b18b cbz r3, 8011830 <udp_input_local_match+0x84>
  41140. 801180c: 4a0a ldr r2, [pc, #40] @ (8011838 <udp_input_local_match+0x8c>)
  41141. 801180e: 6952 ldr r2, [r2, #20]
  41142. 8011810: 4293 cmp r3, r2
  41143. 8011812: d00f beq.n 8011834 <udp_input_local_match+0x88>
  41144. return 0;
  41145. 8011814: 4628 mov r0, r5
  41146. 8011816: e000 b.n 801181a <udp_input_local_match+0x6e>
  41147. return 0;
  41148. 8011818: 2000 movs r0, #0
  41149. }
  41150. 801181a: bdf8 pop {r3, r4, r5, r6, r7, pc}
  41151. return 1;
  41152. 801181c: 2001 movs r0, #1
  41153. 801181e: e7fc b.n 801181a <udp_input_local_match+0x6e>
  41154. 8011820: 2001 movs r0, #1
  41155. 8011822: e7fa b.n 801181a <udp_input_local_match+0x6e>
  41156. 8011824: 2001 movs r0, #1
  41157. 8011826: e7f8 b.n 801181a <udp_input_local_match+0x6e>
  41158. 8011828: 2001 movs r0, #1
  41159. 801182a: e7f6 b.n 801181a <udp_input_local_match+0x6e>
  41160. return 1;
  41161. 801182c: 2001 movs r0, #1
  41162. 801182e: e7f4 b.n 801181a <udp_input_local_match+0x6e>
  41163. 8011830: 2001 movs r0, #1
  41164. 8011832: e7f2 b.n 801181a <udp_input_local_match+0x6e>
  41165. 8011834: 2001 movs r0, #1
  41166. 8011836: e7f0 b.n 801181a <udp_input_local_match+0x6e>
  41167. 8011838: 2401301c .word 0x2401301c
  41168. 801183c: 08017b60 .word 0x08017b60
  41169. 8011840: 08017bc0 .word 0x08017bc0
  41170. 8011844: 080144e8 .word 0x080144e8
  41171. 8011848: 08017be4 .word 0x08017be4
  41172. 0801184c <udp_init>:
  41173. {
  41174. 801184c: b508 push {r3, lr}
  41175. udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
  41176. 801184e: f001 fc2f bl 80130b0 <rand>
  41177. 8011852: 4b02 ldr r3, [pc, #8] @ (801185c <udp_init+0x10>)
  41178. 8011854: 4303 orrs r3, r0
  41179. 8011856: 4a02 ldr r2, [pc, #8] @ (8011860 <udp_init+0x14>)
  41180. 8011858: 8013 strh r3, [r2, #0]
  41181. }
  41182. 801185a: bd08 pop {r3, pc}
  41183. 801185c: ffffc000 .word 0xffffc000
  41184. 8011860: 2400002e .word 0x2400002e
  41185. 08011864 <udp_input>:
  41186. * @param inp network interface on which the datagram was received.
  41187. *
  41188. */
  41189. void
  41190. udp_input(struct pbuf *p, struct netif *inp)
  41191. {
  41192. 8011864: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  41193. 8011868: b083 sub sp, #12
  41194. 801186a: 4680 mov r8, r0
  41195. 801186c: 460f mov r7, r1
  41196. u8_t broadcast;
  41197. u8_t for_us = 0;
  41198. LWIP_UNUSED_ARG(inp);
  41199. LWIP_ASSERT_CORE_LOCKED();
  41200. 801186e: f7f2 f94d bl 8003b0c <sys_check_core_locking>
  41201. LWIP_ASSERT("udp_input: invalid pbuf", p != NULL);
  41202. 8011872: f1b8 0f00 cmp.w r8, #0
  41203. 8011876: d01a beq.n 80118ae <udp_input+0x4a>
  41204. LWIP_ASSERT("udp_input: invalid netif", inp != NULL);
  41205. 8011878: b307 cbz r7, 80118bc <udp_input+0x58>
  41206. PERF_START;
  41207. UDP_STATS_INC(udp.recv);
  41208. /* Check minimum length (UDP header) */
  41209. if (p->len < UDP_HLEN) {
  41210. 801187a: f8b8 300a ldrh.w r3, [r8, #10]
  41211. 801187e: 2b07 cmp r3, #7
  41212. 8011880: d923 bls.n 80118ca <udp_input+0x66>
  41213. MIB2_STATS_INC(mib2.udpinerrors);
  41214. pbuf_free(p);
  41215. goto end;
  41216. }
  41217. udphdr = (struct udp_hdr *)p->payload;
  41218. 8011882: f8d8 4004 ldr.w r4, [r8, #4]
  41219. /* is broadcast packet ? */
  41220. broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif());
  41221. 8011886: 4b53 ldr r3, [pc, #332] @ (80119d4 <udp_input+0x170>)
  41222. 8011888: 6819 ldr r1, [r3, #0]
  41223. 801188a: 6958 ldr r0, [r3, #20]
  41224. 801188c: f7f8 fde1 bl 800a452 <ip4_addr_isbroadcast_u32>
  41225. 8011890: 4681 mov r9, r0
  41226. LWIP_DEBUGF(UDP_DEBUG, ("udp_input: received datagram of length %"U16_F"\n", p->tot_len));
  41227. /* convert src and dest ports to host byte order */
  41228. src = lwip_ntohs(udphdr->src);
  41229. 8011892: 8820 ldrh r0, [r4, #0]
  41230. 8011894: f7f6 faf2 bl 8007e7c <lwip_htons>
  41231. 8011898: 4682 mov sl, r0
  41232. dest = lwip_ntohs(udphdr->dest);
  41233. 801189a: 8860 ldrh r0, [r4, #2]
  41234. 801189c: f7f6 faee bl 8007e7c <lwip_htons>
  41235. 80118a0: 4605 mov r5, r0
  41236. uncon_pcb = NULL;
  41237. /* Iterate through the UDP pcb list for a matching pcb.
  41238. * 'Perfect match' pcbs (connected to the remote port & ip address) are
  41239. * preferred. If no perfect match is found, the first unconnected pcb that
  41240. * matches the local port and ip address gets the datagram. */
  41241. for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
  41242. 80118a2: 4b4d ldr r3, [pc, #308] @ (80119d8 <udp_input+0x174>)
  41243. 80118a4: 681c ldr r4, [r3, #0]
  41244. uncon_pcb = NULL;
  41245. 80118a6: f04f 0b00 mov.w fp, #0
  41246. prev = NULL;
  41247. 80118aa: 465e mov r6, fp
  41248. for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
  41249. 80118ac: e019 b.n 80118e2 <udp_input+0x7e>
  41250. LWIP_ASSERT("udp_input: invalid pbuf", p != NULL);
  41251. 80118ae: 4b4b ldr r3, [pc, #300] @ (80119dc <udp_input+0x178>)
  41252. 80118b0: 22cf movs r2, #207 @ 0xcf
  41253. 80118b2: 494b ldr r1, [pc, #300] @ (80119e0 <udp_input+0x17c>)
  41254. 80118b4: 484b ldr r0, [pc, #300] @ (80119e4 <udp_input+0x180>)
  41255. 80118b6: f001 fda7 bl 8013408 <iprintf>
  41256. 80118ba: e7dd b.n 8011878 <udp_input+0x14>
  41257. LWIP_ASSERT("udp_input: invalid netif", inp != NULL);
  41258. 80118bc: 4b47 ldr r3, [pc, #284] @ (80119dc <udp_input+0x178>)
  41259. 80118be: 22d0 movs r2, #208 @ 0xd0
  41260. 80118c0: 4949 ldr r1, [pc, #292] @ (80119e8 <udp_input+0x184>)
  41261. 80118c2: 4848 ldr r0, [pc, #288] @ (80119e4 <udp_input+0x180>)
  41262. 80118c4: f001 fda0 bl 8013408 <iprintf>
  41263. 80118c8: e7d7 b.n 801187a <udp_input+0x16>
  41264. pbuf_free(p);
  41265. 80118ca: 4640 mov r0, r8
  41266. 80118cc: f7fa fa68 bl 800bda0 <pbuf_free>
  41267. UDP_STATS_INC(udp.drop);
  41268. MIB2_STATS_INC(mib2.udpinerrors);
  41269. pbuf_free(p);
  41270. PERF_STOP("udp_input");
  41271. #endif /* CHECKSUM_CHECK_UDP */
  41272. }
  41273. 80118d0: b003 add sp, #12
  41274. 80118d2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  41275. uncon_pcb = pcb;
  41276. 80118d6: 46a3 mov fp, r4
  41277. if ((pcb->remote_port == src) &&
  41278. 80118d8: 8aa3 ldrh r3, [r4, #20]
  41279. 80118da: 459a cmp sl, r3
  41280. 80118dc: d026 beq.n 801192c <udp_input+0xc8>
  41281. prev = pcb;
  41282. 80118de: 4626 mov r6, r4
  41283. for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
  41284. 80118e0: 68e4 ldr r4, [r4, #12]
  41285. 80118e2: 2c00 cmp r4, #0
  41286. 80118e4: d030 beq.n 8011948 <udp_input+0xe4>
  41287. if ((pcb->local_port == dest) &&
  41288. 80118e6: 8a63 ldrh r3, [r4, #18]
  41289. 80118e8: 429d cmp r5, r3
  41290. 80118ea: d1f8 bne.n 80118de <udp_input+0x7a>
  41291. (udp_input_local_match(pcb, inp, broadcast) != 0)) {
  41292. 80118ec: 464a mov r2, r9
  41293. 80118ee: 4639 mov r1, r7
  41294. 80118f0: 4620 mov r0, r4
  41295. 80118f2: f7ff ff5b bl 80117ac <udp_input_local_match>
  41296. if ((pcb->local_port == dest) &&
  41297. 80118f6: 2800 cmp r0, #0
  41298. 80118f8: d0f1 beq.n 80118de <udp_input+0x7a>
  41299. if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) {
  41300. 80118fa: 7c23 ldrb r3, [r4, #16]
  41301. 80118fc: f013 0f04 tst.w r3, #4
  41302. 8011900: d1ea bne.n 80118d8 <udp_input+0x74>
  41303. if (uncon_pcb == NULL) {
  41304. 8011902: f1bb 0f00 cmp.w fp, #0
  41305. 8011906: d0e6 beq.n 80118d6 <udp_input+0x72>
  41306. } else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) {
  41307. 8011908: f1b9 0f00 cmp.w r9, #0
  41308. 801190c: d0e4 beq.n 80118d8 <udp_input+0x74>
  41309. 801190e: 4b31 ldr r3, [pc, #196] @ (80119d4 <udp_input+0x170>)
  41310. 8011910: 695b ldr r3, [r3, #20]
  41311. 8011912: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  41312. 8011916: d1df bne.n 80118d8 <udp_input+0x74>
  41313. if (!IP_IS_V4_VAL(uncon_pcb->local_ip) || !ip4_addr_cmp(ip_2_ip4(&uncon_pcb->local_ip), netif_ip4_addr(inp))) {
  41314. 8011918: f8db 2000 ldr.w r2, [fp]
  41315. 801191c: 687b ldr r3, [r7, #4]
  41316. 801191e: 429a cmp r2, r3
  41317. 8011920: d0da beq.n 80118d8 <udp_input+0x74>
  41318. if (IP_IS_V4_VAL(pcb->local_ip) && ip4_addr_cmp(ip_2_ip4(&pcb->local_ip), netif_ip4_addr(inp))) {
  41319. 8011922: 6822 ldr r2, [r4, #0]
  41320. 8011924: 4293 cmp r3, r2
  41321. 8011926: d1d7 bne.n 80118d8 <udp_input+0x74>
  41322. uncon_pcb = pcb;
  41323. 8011928: 46a3 mov fp, r4
  41324. 801192a: e7d5 b.n 80118d8 <udp_input+0x74>
  41325. (ip_addr_isany_val(pcb->remote_ip) ||
  41326. 801192c: 6863 ldr r3, [r4, #4]
  41327. if ((pcb->remote_port == src) &&
  41328. 801192e: b11b cbz r3, 8011938 <udp_input+0xd4>
  41329. ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) {
  41330. 8011930: 4a28 ldr r2, [pc, #160] @ (80119d4 <udp_input+0x170>)
  41331. 8011932: 6912 ldr r2, [r2, #16]
  41332. (ip_addr_isany_val(pcb->remote_ip) ||
  41333. 8011934: 4293 cmp r3, r2
  41334. 8011936: d1d2 bne.n 80118de <udp_input+0x7a>
  41335. if (prev != NULL) {
  41336. 8011938: b136 cbz r6, 8011948 <udp_input+0xe4>
  41337. prev->next = pcb->next;
  41338. 801193a: 68e3 ldr r3, [r4, #12]
  41339. 801193c: 60f3 str r3, [r6, #12]
  41340. pcb->next = udp_pcbs;
  41341. 801193e: 4b26 ldr r3, [pc, #152] @ (80119d8 <udp_input+0x174>)
  41342. 8011940: 681a ldr r2, [r3, #0]
  41343. 8011942: 60e2 str r2, [r4, #12]
  41344. udp_pcbs = pcb;
  41345. 8011944: 601c str r4, [r3, #0]
  41346. if (pcb == NULL) {
  41347. 8011946: e011 b.n 801196c <udp_input+0x108>
  41348. 8011948: b17c cbz r4, 801196a <udp_input+0x106>
  41349. if (pbuf_remove_header(p, UDP_HLEN)) {
  41350. 801194a: 2108 movs r1, #8
  41351. 801194c: 4640 mov r0, r8
  41352. 801194e: f7fa f9e1 bl 800bd14 <pbuf_remove_header>
  41353. 8011952: b9b0 cbnz r0, 8011982 <udp_input+0x11e>
  41354. if (pcb != NULL) {
  41355. 8011954: b324 cbz r4, 80119a0 <udp_input+0x13c>
  41356. if (pcb->recv != NULL) {
  41357. 8011956: 69a5 ldr r5, [r4, #24]
  41358. 8011958: b1f5 cbz r5, 8011998 <udp_input+0x134>
  41359. pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src);
  41360. 801195a: 69e0 ldr r0, [r4, #28]
  41361. 801195c: f8cd a000 str.w sl, [sp]
  41362. 8011960: 4b22 ldr r3, [pc, #136] @ (80119ec <udp_input+0x188>)
  41363. 8011962: 4642 mov r2, r8
  41364. 8011964: 4621 mov r1, r4
  41365. 8011966: 47a8 blx r5
  41366. 8011968: e7b2 b.n 80118d0 <udp_input+0x6c>
  41367. 801196a: 465c mov r4, fp
  41368. if (pcb != NULL) {
  41369. 801196c: 2c00 cmp r4, #0
  41370. 801196e: d1ec bne.n 801194a <udp_input+0xe6>
  41371. for_us = ip4_addr_cmp(netif_ip4_addr(inp), ip4_current_dest_addr());
  41372. 8011970: 687a ldr r2, [r7, #4]
  41373. 8011972: 4b18 ldr r3, [pc, #96] @ (80119d4 <udp_input+0x170>)
  41374. 8011974: 695b ldr r3, [r3, #20]
  41375. if (for_us) {
  41376. 8011976: 429a cmp r2, r3
  41377. 8011978: d0e7 beq.n 801194a <udp_input+0xe6>
  41378. pbuf_free(p);
  41379. 801197a: 4640 mov r0, r8
  41380. 801197c: f7fa fa10 bl 800bda0 <pbuf_free>
  41381. return;
  41382. 8011980: e7a6 b.n 80118d0 <udp_input+0x6c>
  41383. LWIP_ASSERT("pbuf_remove_header failed\n", 0);
  41384. 8011982: 4b16 ldr r3, [pc, #88] @ (80119dc <udp_input+0x178>)
  41385. 8011984: f44f 72b8 mov.w r2, #368 @ 0x170
  41386. 8011988: 4919 ldr r1, [pc, #100] @ (80119f0 <udp_input+0x18c>)
  41387. 801198a: 4816 ldr r0, [pc, #88] @ (80119e4 <udp_input+0x180>)
  41388. 801198c: f001 fd3c bl 8013408 <iprintf>
  41389. pbuf_free(p);
  41390. 8011990: 4640 mov r0, r8
  41391. 8011992: f7fa fa05 bl 800bda0 <pbuf_free>
  41392. goto end;
  41393. 8011996: e79b b.n 80118d0 <udp_input+0x6c>
  41394. pbuf_free(p);
  41395. 8011998: 4640 mov r0, r8
  41396. 801199a: f7fa fa01 bl 800bda0 <pbuf_free>
  41397. goto end;
  41398. 801199e: e797 b.n 80118d0 <udp_input+0x6c>
  41399. if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) {
  41400. 80119a0: f1b9 0f00 cmp.w r9, #0
  41401. 80119a4: d105 bne.n 80119b2 <udp_input+0x14e>
  41402. 80119a6: 4b0b ldr r3, [pc, #44] @ (80119d4 <udp_input+0x170>)
  41403. 80119a8: 695b ldr r3, [r3, #20]
  41404. 80119aa: f003 03f0 and.w r3, r3, #240 @ 0xf0
  41405. 80119ae: 2be0 cmp r3, #224 @ 0xe0
  41406. 80119b0: d103 bne.n 80119ba <udp_input+0x156>
  41407. pbuf_free(p);
  41408. 80119b2: 4640 mov r0, r8
  41409. 80119b4: f7fa f9f4 bl 800bda0 <pbuf_free>
  41410. 80119b8: e78a b.n 80118d0 <udp_input+0x6c>
  41411. pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN));
  41412. 80119ba: 4b06 ldr r3, [pc, #24] @ (80119d4 <udp_input+0x170>)
  41413. 80119bc: 8999 ldrh r1, [r3, #12]
  41414. 80119be: 3108 adds r1, #8
  41415. 80119c0: b209 sxth r1, r1
  41416. 80119c2: 4640 mov r0, r8
  41417. 80119c4: f7fa f9e6 bl 800bd94 <pbuf_header_force>
  41418. icmp_port_unreach(ip_current_is_v6(), p);
  41419. 80119c8: 2103 movs r1, #3
  41420. 80119ca: 4640 mov r0, r8
  41421. 80119cc: f7f8 fb06 bl 8009fdc <icmp_dest_unreach>
  41422. 80119d0: e7ef b.n 80119b2 <udp_input+0x14e>
  41423. 80119d2: bf00 nop
  41424. 80119d4: 2401301c .word 0x2401301c
  41425. 80119d8: 24019c40 .word 0x24019c40
  41426. 80119dc: 08017b60 .word 0x08017b60
  41427. 80119e0: 08017c0c .word 0x08017c0c
  41428. 80119e4: 080144e8 .word 0x080144e8
  41429. 80119e8: 08017c24 .word 0x08017c24
  41430. 80119ec: 2401302c .word 0x2401302c
  41431. 80119f0: 08017c40 .word 0x08017c40
  41432. 080119f4 <udp_bind>:
  41433. *
  41434. * @see udp_disconnect()
  41435. */
  41436. err_t
  41437. udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
  41438. {
  41439. 80119f4: b5f8 push {r3, r4, r5, r6, r7, lr}
  41440. 80119f6: 4605 mov r5, r0
  41441. 80119f8: 460f mov r7, r1
  41442. 80119fa: 4616 mov r6, r2
  41443. u8_t rebind;
  41444. #if LWIP_IPV6 && LWIP_IPV6_SCOPES
  41445. ip_addr_t zoned_ipaddr;
  41446. #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
  41447. LWIP_ASSERT_CORE_LOCKED();
  41448. 80119fc: f7f2 f886 bl 8003b0c <sys_check_core_locking>
  41449. #if LWIP_IPV4
  41450. /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */
  41451. if (ipaddr == NULL) {
  41452. 8011a00: b127 cbz r7, 8011a0c <udp_bind+0x18>
  41453. }
  41454. #else /* LWIP_IPV4 */
  41455. LWIP_ERROR("udp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
  41456. #endif /* LWIP_IPV4 */
  41457. LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
  41458. 8011a02: b12d cbz r5, 8011a10 <udp_bind+0x1c>
  41459. ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr);
  41460. LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port));
  41461. rebind = 0;
  41462. /* Check for double bind and rebind of the same pcb */
  41463. for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
  41464. 8011a04: 4b23 ldr r3, [pc, #140] @ (8011a94 <udp_bind+0xa0>)
  41465. 8011a06: 681b ldr r3, [r3, #0]
  41466. 8011a08: 461c mov r4, r3
  41467. 8011a0a: e00c b.n 8011a26 <udp_bind+0x32>
  41468. ipaddr = IP4_ADDR_ANY;
  41469. 8011a0c: 4f22 ldr r7, [pc, #136] @ (8011a98 <udp_bind+0xa4>)
  41470. 8011a0e: e7f8 b.n 8011a02 <udp_bind+0xe>
  41471. LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG);
  41472. 8011a10: 4b22 ldr r3, [pc, #136] @ (8011a9c <udp_bind+0xa8>)
  41473. 8011a12: f240 32b7 movw r2, #951 @ 0x3b7
  41474. 8011a16: 4922 ldr r1, [pc, #136] @ (8011aa0 <udp_bind+0xac>)
  41475. 8011a18: 4822 ldr r0, [pc, #136] @ (8011aa4 <udp_bind+0xb0>)
  41476. 8011a1a: f001 fcf5 bl 8013408 <iprintf>
  41477. 8011a1e: f06f 000f mvn.w r0, #15
  41478. 8011a22: e013 b.n 8011a4c <udp_bind+0x58>
  41479. for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
  41480. 8011a24: 68e4 ldr r4, [r4, #12]
  41481. 8011a26: b114 cbz r4, 8011a2e <udp_bind+0x3a>
  41482. /* is this UDP PCB already on active list? */
  41483. if (pcb == ipcb) {
  41484. 8011a28: 42ac cmp r4, r5
  41485. 8011a2a: d1fb bne.n 8011a24 <udp_bind+0x30>
  41486. rebind = 1;
  41487. 8011a2c: 2401 movs r4, #1
  41488. ipaddr = &zoned_ipaddr;
  41489. }
  41490. #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
  41491. /* no port specified? */
  41492. if (port == 0) {
  41493. 8011a2e: b97e cbnz r6, 8011a50 <udp_bind+0x5c>
  41494. port = udp_new_port();
  41495. 8011a30: f7ff fe96 bl 8011760 <udp_new_port>
  41496. if (port == 0) {
  41497. 8011a34: 4606 mov r6, r0
  41498. 8011a36: b1f8 cbz r0, 8011a78 <udp_bind+0x84>
  41499. }
  41500. }
  41501. }
  41502. }
  41503. ip_addr_set_ipaddr(&pcb->local_ip, ipaddr);
  41504. 8011a38: b1e7 cbz r7, 8011a74 <udp_bind+0x80>
  41505. 8011a3a: 683b ldr r3, [r7, #0]
  41506. 8011a3c: 602b str r3, [r5, #0]
  41507. pcb->local_port = port;
  41508. 8011a3e: 826e strh r6, [r5, #18]
  41509. mib2_udp_bind(pcb);
  41510. /* pcb not active yet? */
  41511. if (rebind == 0) {
  41512. 8011a40: bb34 cbnz r4, 8011a90 <udp_bind+0x9c>
  41513. /* place the PCB on the active list if not already there */
  41514. pcb->next = udp_pcbs;
  41515. 8011a42: 4b14 ldr r3, [pc, #80] @ (8011a94 <udp_bind+0xa0>)
  41516. 8011a44: 681a ldr r2, [r3, #0]
  41517. 8011a46: 60ea str r2, [r5, #12]
  41518. udp_pcbs = pcb;
  41519. 8011a48: 601d str r5, [r3, #0]
  41520. }
  41521. LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to "));
  41522. ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, pcb->local_ip);
  41523. LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->local_port));
  41524. return ERR_OK;
  41525. 8011a4a: 2000 movs r0, #0
  41526. }
  41527. 8011a4c: bdf8 pop {r3, r4, r5, r6, r7, pc}
  41528. for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
  41529. 8011a4e: 68db ldr r3, [r3, #12]
  41530. 8011a50: 2b00 cmp r3, #0
  41531. 8011a52: d0f1 beq.n 8011a38 <udp_bind+0x44>
  41532. if (pcb != ipcb) {
  41533. 8011a54: 42ab cmp r3, r5
  41534. 8011a56: d0fa beq.n 8011a4e <udp_bind+0x5a>
  41535. if ((ipcb->local_port == port) &&
  41536. 8011a58: 8a58 ldrh r0, [r3, #18]
  41537. 8011a5a: 4286 cmp r6, r0
  41538. 8011a5c: d1f7 bne.n 8011a4e <udp_bind+0x5a>
  41539. (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
  41540. 8011a5e: 6818 ldr r0, [r3, #0]
  41541. 8011a60: 683a ldr r2, [r7, #0]
  41542. if ((ipcb->local_port == port) &&
  41543. 8011a62: 4290 cmp r0, r2
  41544. 8011a64: d00b beq.n 8011a7e <udp_bind+0x8a>
  41545. (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) ||
  41546. 8011a66: b16a cbz r2, 8011a84 <udp_bind+0x90>
  41547. 8011a68: b17b cbz r3, 8011a8a <udp_bind+0x96>
  41548. ip_addr_isany(&ipcb->local_ip))) {
  41549. 8011a6a: 2800 cmp r0, #0
  41550. 8011a6c: d1ef bne.n 8011a4e <udp_bind+0x5a>
  41551. return ERR_USE;
  41552. 8011a6e: f06f 0007 mvn.w r0, #7
  41553. 8011a72: e7eb b.n 8011a4c <udp_bind+0x58>
  41554. ip_addr_set_ipaddr(&pcb->local_ip, ipaddr);
  41555. 8011a74: 2300 movs r3, #0
  41556. 8011a76: e7e1 b.n 8011a3c <udp_bind+0x48>
  41557. return ERR_USE;
  41558. 8011a78: f06f 0007 mvn.w r0, #7
  41559. 8011a7c: e7e6 b.n 8011a4c <udp_bind+0x58>
  41560. return ERR_USE;
  41561. 8011a7e: f06f 0007 mvn.w r0, #7
  41562. 8011a82: e7e3 b.n 8011a4c <udp_bind+0x58>
  41563. 8011a84: f06f 0007 mvn.w r0, #7
  41564. 8011a88: e7e0 b.n 8011a4c <udp_bind+0x58>
  41565. 8011a8a: f06f 0007 mvn.w r0, #7
  41566. 8011a8e: e7dd b.n 8011a4c <udp_bind+0x58>
  41567. return ERR_OK;
  41568. 8011a90: 2000 movs r0, #0
  41569. 8011a92: e7db b.n 8011a4c <udp_bind+0x58>
  41570. 8011a94: 24019c40 .word 0x24019c40
  41571. 8011a98: 080156d8 .word 0x080156d8
  41572. 8011a9c: 08017b60 .word 0x08017b60
  41573. 8011aa0: 08017c5c .word 0x08017c5c
  41574. 8011aa4: 080144e8 .word 0x080144e8
  41575. 08011aa8 <udp_sendto_if_src>:
  41576. {
  41577. 8011aa8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  41578. 8011aac: b085 sub sp, #20
  41579. 8011aae: 4604 mov r4, r0
  41580. 8011ab0: 460d mov r5, r1
  41581. 8011ab2: 4690 mov r8, r2
  41582. 8011ab4: 4699 mov r9, r3
  41583. 8011ab6: f8dd b038 ldr.w fp, [sp, #56] @ 0x38
  41584. 8011aba: f8dd a03c ldr.w sl, [sp, #60] @ 0x3c
  41585. LWIP_ASSERT_CORE_LOCKED();
  41586. 8011abe: f7f2 f825 bl 8003b0c <sys_check_core_locking>
  41587. LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG);
  41588. 8011ac2: 2c00 cmp r4, #0
  41589. 8011ac4: d043 beq.n 8011b4e <udp_sendto_if_src+0xa6>
  41590. LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG);
  41591. 8011ac6: 2d00 cmp r5, #0
  41592. 8011ac8: d04b beq.n 8011b62 <udp_sendto_if_src+0xba>
  41593. LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
  41594. 8011aca: f1b8 0f00 cmp.w r8, #0
  41595. 8011ace: d052 beq.n 8011b76 <udp_sendto_if_src+0xce>
  41596. LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG);
  41597. 8011ad0: f1ba 0f00 cmp.w sl, #0
  41598. 8011ad4: d059 beq.n 8011b8a <udp_sendto_if_src+0xe2>
  41599. LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG);
  41600. 8011ad6: f1bb 0f00 cmp.w fp, #0
  41601. 8011ada: d060 beq.n 8011b9e <udp_sendto_if_src+0xf6>
  41602. if (pcb->local_port == 0) {
  41603. 8011adc: 8a62 ldrh r2, [r4, #18]
  41604. 8011ade: 2a00 cmp r2, #0
  41605. 8011ae0: d067 beq.n 8011bb2 <udp_sendto_if_src+0x10a>
  41606. if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) {
  41607. 8011ae2: 892a ldrh r2, [r5, #8]
  41608. 8011ae4: f64f 73f7 movw r3, #65527 @ 0xfff7
  41609. 8011ae8: 429a cmp r2, r3
  41610. 8011aea: f200 8081 bhi.w 8011bf0 <udp_sendto_if_src+0x148>
  41611. if (pbuf_add_header(p, UDP_HLEN)) {
  41612. 8011aee: 2108 movs r1, #8
  41613. 8011af0: 4628 mov r0, r5
  41614. 8011af2: f7fa f90a bl 800bd0a <pbuf_add_header>
  41615. 8011af6: 2800 cmp r0, #0
  41616. 8011af8: d163 bne.n 8011bc2 <udp_sendto_if_src+0x11a>
  41617. q = p;
  41618. 8011afa: 462e mov r6, r5
  41619. LWIP_ASSERT("check that first pbuf can hold struct udp_hdr",
  41620. 8011afc: 8973 ldrh r3, [r6, #10]
  41621. 8011afe: 2b07 cmp r3, #7
  41622. 8011b00: d96e bls.n 8011be0 <udp_sendto_if_src+0x138>
  41623. udphdr = (struct udp_hdr *)q->payload;
  41624. 8011b02: 6877 ldr r7, [r6, #4]
  41625. udphdr->src = lwip_htons(pcb->local_port);
  41626. 8011b04: 8a60 ldrh r0, [r4, #18]
  41627. 8011b06: f7f6 f9b9 bl 8007e7c <lwip_htons>
  41628. 8011b0a: 8038 strh r0, [r7, #0]
  41629. udphdr->dest = lwip_htons(dst_port);
  41630. 8011b0c: 4648 mov r0, r9
  41631. 8011b0e: f7f6 f9b5 bl 8007e7c <lwip_htons>
  41632. 8011b12: 8078 strh r0, [r7, #2]
  41633. udphdr->chksum = 0x0000;
  41634. 8011b14: 2300 movs r3, #0
  41635. 8011b16: 71bb strb r3, [r7, #6]
  41636. 8011b18: 71fb strb r3, [r7, #7]
  41637. udphdr->len = lwip_htons(q->tot_len);
  41638. 8011b1a: 8930 ldrh r0, [r6, #8]
  41639. 8011b1c: f7f6 f9ae bl 8007e7c <lwip_htons>
  41640. 8011b20: 80b8 strh r0, [r7, #4]
  41641. err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif);
  41642. 8011b22: f8cd b008 str.w fp, [sp, #8]
  41643. 8011b26: 2311 movs r3, #17
  41644. 8011b28: 9301 str r3, [sp, #4]
  41645. 8011b2a: 7aa3 ldrb r3, [r4, #10]
  41646. 8011b2c: 9300 str r3, [sp, #0]
  41647. 8011b2e: 7ae3 ldrb r3, [r4, #11]
  41648. 8011b30: 4642 mov r2, r8
  41649. 8011b32: 4651 mov r1, sl
  41650. 8011b34: 4630 mov r0, r6
  41651. 8011b36: f7f8 fbf5 bl 800a324 <ip4_output_if_src>
  41652. 8011b3a: 4607 mov r7, r0
  41653. if (q != p) {
  41654. 8011b3c: 42ae cmp r6, r5
  41655. 8011b3e: d002 beq.n 8011b46 <udp_sendto_if_src+0x9e>
  41656. pbuf_free(q);
  41657. 8011b40: 4630 mov r0, r6
  41658. 8011b42: f7fa f92d bl 800bda0 <pbuf_free>
  41659. }
  41660. 8011b46: 4638 mov r0, r7
  41661. 8011b48: b005 add sp, #20
  41662. 8011b4a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  41663. LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG);
  41664. 8011b4e: 4b2b ldr r3, [pc, #172] @ (8011bfc <udp_sendto_if_src+0x154>)
  41665. 8011b50: f240 22d1 movw r2, #721 @ 0x2d1
  41666. 8011b54: 492a ldr r1, [pc, #168] @ (8011c00 <udp_sendto_if_src+0x158>)
  41667. 8011b56: 482b ldr r0, [pc, #172] @ (8011c04 <udp_sendto_if_src+0x15c>)
  41668. 8011b58: f001 fc56 bl 8013408 <iprintf>
  41669. 8011b5c: f06f 070f mvn.w r7, #15
  41670. 8011b60: e7f1 b.n 8011b46 <udp_sendto_if_src+0x9e>
  41671. LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG);
  41672. 8011b62: 4b26 ldr r3, [pc, #152] @ (8011bfc <udp_sendto_if_src+0x154>)
  41673. 8011b64: f240 22d2 movw r2, #722 @ 0x2d2
  41674. 8011b68: 4927 ldr r1, [pc, #156] @ (8011c08 <udp_sendto_if_src+0x160>)
  41675. 8011b6a: 4826 ldr r0, [pc, #152] @ (8011c04 <udp_sendto_if_src+0x15c>)
  41676. 8011b6c: f001 fc4c bl 8013408 <iprintf>
  41677. 8011b70: f06f 070f mvn.w r7, #15
  41678. 8011b74: e7e7 b.n 8011b46 <udp_sendto_if_src+0x9e>
  41679. LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
  41680. 8011b76: 4b21 ldr r3, [pc, #132] @ (8011bfc <udp_sendto_if_src+0x154>)
  41681. 8011b78: f240 22d3 movw r2, #723 @ 0x2d3
  41682. 8011b7c: 4923 ldr r1, [pc, #140] @ (8011c0c <udp_sendto_if_src+0x164>)
  41683. 8011b7e: 4821 ldr r0, [pc, #132] @ (8011c04 <udp_sendto_if_src+0x15c>)
  41684. 8011b80: f001 fc42 bl 8013408 <iprintf>
  41685. 8011b84: f06f 070f mvn.w r7, #15
  41686. 8011b88: e7dd b.n 8011b46 <udp_sendto_if_src+0x9e>
  41687. LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG);
  41688. 8011b8a: 4b1c ldr r3, [pc, #112] @ (8011bfc <udp_sendto_if_src+0x154>)
  41689. 8011b8c: f44f 7235 mov.w r2, #724 @ 0x2d4
  41690. 8011b90: 491f ldr r1, [pc, #124] @ (8011c10 <udp_sendto_if_src+0x168>)
  41691. 8011b92: 481c ldr r0, [pc, #112] @ (8011c04 <udp_sendto_if_src+0x15c>)
  41692. 8011b94: f001 fc38 bl 8013408 <iprintf>
  41693. 8011b98: f06f 070f mvn.w r7, #15
  41694. 8011b9c: e7d3 b.n 8011b46 <udp_sendto_if_src+0x9e>
  41695. LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG);
  41696. 8011b9e: 4b17 ldr r3, [pc, #92] @ (8011bfc <udp_sendto_if_src+0x154>)
  41697. 8011ba0: f240 22d5 movw r2, #725 @ 0x2d5
  41698. 8011ba4: 491b ldr r1, [pc, #108] @ (8011c14 <udp_sendto_if_src+0x16c>)
  41699. 8011ba6: 4817 ldr r0, [pc, #92] @ (8011c04 <udp_sendto_if_src+0x15c>)
  41700. 8011ba8: f001 fc2e bl 8013408 <iprintf>
  41701. 8011bac: f06f 070f mvn.w r7, #15
  41702. 8011bb0: e7c9 b.n 8011b46 <udp_sendto_if_src+0x9e>
  41703. err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
  41704. 8011bb2: 4621 mov r1, r4
  41705. 8011bb4: 4620 mov r0, r4
  41706. 8011bb6: f7ff ff1d bl 80119f4 <udp_bind>
  41707. if (err != ERR_OK) {
  41708. 8011bba: 4607 mov r7, r0
  41709. 8011bbc: 2800 cmp r0, #0
  41710. 8011bbe: d090 beq.n 8011ae2 <udp_sendto_if_src+0x3a>
  41711. 8011bc0: e7c1 b.n 8011b46 <udp_sendto_if_src+0x9e>
  41712. q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
  41713. 8011bc2: f44f 7220 mov.w r2, #640 @ 0x280
  41714. 8011bc6: 2108 movs r1, #8
  41715. 8011bc8: 2022 movs r0, #34 @ 0x22
  41716. 8011bca: f7fa f951 bl 800be70 <pbuf_alloc>
  41717. if (q == NULL) {
  41718. 8011bce: 4606 mov r6, r0
  41719. 8011bd0: b188 cbz r0, 8011bf6 <udp_sendto_if_src+0x14e>
  41720. if (p->tot_len != 0) {
  41721. 8011bd2: 892b ldrh r3, [r5, #8]
  41722. 8011bd4: 2b00 cmp r3, #0
  41723. 8011bd6: d091 beq.n 8011afc <udp_sendto_if_src+0x54>
  41724. pbuf_chain(q, p);
  41725. 8011bd8: 4629 mov r1, r5
  41726. 8011bda: f7fa fac7 bl 800c16c <pbuf_chain>
  41727. 8011bde: e78d b.n 8011afc <udp_sendto_if_src+0x54>
  41728. LWIP_ASSERT("check that first pbuf can hold struct udp_hdr",
  41729. 8011be0: 4b06 ldr r3, [pc, #24] @ (8011bfc <udp_sendto_if_src+0x154>)
  41730. 8011be2: f240 320d movw r2, #781 @ 0x30d
  41731. 8011be6: 490c ldr r1, [pc, #48] @ (8011c18 <udp_sendto_if_src+0x170>)
  41732. 8011be8: 4806 ldr r0, [pc, #24] @ (8011c04 <udp_sendto_if_src+0x15c>)
  41733. 8011bea: f001 fc0d bl 8013408 <iprintf>
  41734. 8011bee: e788 b.n 8011b02 <udp_sendto_if_src+0x5a>
  41735. return ERR_MEM;
  41736. 8011bf0: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
  41737. 8011bf4: e7a7 b.n 8011b46 <udp_sendto_if_src+0x9e>
  41738. return ERR_MEM;
  41739. 8011bf6: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
  41740. 8011bfa: e7a4 b.n 8011b46 <udp_sendto_if_src+0x9e>
  41741. 8011bfc: 08017b60 .word 0x08017b60
  41742. 8011c00: 08017c74 .word 0x08017c74
  41743. 8011c04: 080144e8 .word 0x080144e8
  41744. 8011c08: 08017c94 .word 0x08017c94
  41745. 8011c0c: 08017cb4 .word 0x08017cb4
  41746. 8011c10: 08017cd8 .word 0x08017cd8
  41747. 8011c14: 08017cfc .word 0x08017cfc
  41748. 8011c18: 08017d20 .word 0x08017d20
  41749. 08011c1c <udp_sendto_if>:
  41750. {
  41751. 8011c1c: b5f0 push {r4, r5, r6, r7, lr}
  41752. 8011c1e: b083 sub sp, #12
  41753. 8011c20: 9d08 ldr r5, [sp, #32]
  41754. LWIP_ERROR("udp_sendto_if: invalid pcb", pcb != NULL, return ERR_ARG);
  41755. 8011c22: b190 cbz r0, 8011c4a <udp_sendto_if+0x2e>
  41756. 8011c24: 4604 mov r4, r0
  41757. LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG);
  41758. 8011c26: b1d1 cbz r1, 8011c5e <udp_sendto_if+0x42>
  41759. LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
  41760. 8011c28: b31a cbz r2, 8011c72 <udp_sendto_if+0x56>
  41761. LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG);
  41762. 8011c2a: b365 cbz r5, 8011c86 <udp_sendto_if+0x6a>
  41763. if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
  41764. 8011c2c: 2800 cmp r0, #0
  41765. 8011c2e: d034 beq.n 8011c9a <udp_sendto_if+0x7e>
  41766. 8011c30: 6806 ldr r6, [r0, #0]
  41767. 8011c32: b396 cbz r6, 8011c9a <udp_sendto_if+0x7e>
  41768. ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) {
  41769. 8011c34: f006 0cf0 and.w ip, r6, #240 @ 0xf0
  41770. if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) ||
  41771. 8011c38: f1bc 0fe0 cmp.w ip, #224 @ 0xe0
  41772. 8011c3c: d02d beq.n 8011c9a <udp_sendto_if+0x7e>
  41773. if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) {
  41774. 8011c3e: 686f ldr r7, [r5, #4]
  41775. 8011c40: 42be cmp r6, r7
  41776. 8011c42: d02b beq.n 8011c9c <udp_sendto_if+0x80>
  41777. return ERR_RTE;
  41778. 8011c44: f06f 0003 mvn.w r0, #3
  41779. 8011c48: e02d b.n 8011ca6 <udp_sendto_if+0x8a>
  41780. LWIP_ERROR("udp_sendto_if: invalid pcb", pcb != NULL, return ERR_ARG);
  41781. 8011c4a: 4b18 ldr r3, [pc, #96] @ (8011cac <udp_sendto_if+0x90>)
  41782. 8011c4c: f44f 7220 mov.w r2, #640 @ 0x280
  41783. 8011c50: 4917 ldr r1, [pc, #92] @ (8011cb0 <udp_sendto_if+0x94>)
  41784. 8011c52: 4818 ldr r0, [pc, #96] @ (8011cb4 <udp_sendto_if+0x98>)
  41785. 8011c54: f001 fbd8 bl 8013408 <iprintf>
  41786. 8011c58: f06f 000f mvn.w r0, #15
  41787. 8011c5c: e023 b.n 8011ca6 <udp_sendto_if+0x8a>
  41788. LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG);
  41789. 8011c5e: 4b13 ldr r3, [pc, #76] @ (8011cac <udp_sendto_if+0x90>)
  41790. 8011c60: f240 2281 movw r2, #641 @ 0x281
  41791. 8011c64: 4914 ldr r1, [pc, #80] @ (8011cb8 <udp_sendto_if+0x9c>)
  41792. 8011c66: 4813 ldr r0, [pc, #76] @ (8011cb4 <udp_sendto_if+0x98>)
  41793. 8011c68: f001 fbce bl 8013408 <iprintf>
  41794. 8011c6c: f06f 000f mvn.w r0, #15
  41795. 8011c70: e019 b.n 8011ca6 <udp_sendto_if+0x8a>
  41796. LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
  41797. 8011c72: 4b0e ldr r3, [pc, #56] @ (8011cac <udp_sendto_if+0x90>)
  41798. 8011c74: f240 2282 movw r2, #642 @ 0x282
  41799. 8011c78: 4910 ldr r1, [pc, #64] @ (8011cbc <udp_sendto_if+0xa0>)
  41800. 8011c7a: 480e ldr r0, [pc, #56] @ (8011cb4 <udp_sendto_if+0x98>)
  41801. 8011c7c: f001 fbc4 bl 8013408 <iprintf>
  41802. 8011c80: f06f 000f mvn.w r0, #15
  41803. 8011c84: e00f b.n 8011ca6 <udp_sendto_if+0x8a>
  41804. LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG);
  41805. 8011c86: 4b09 ldr r3, [pc, #36] @ (8011cac <udp_sendto_if+0x90>)
  41806. 8011c88: f240 2283 movw r2, #643 @ 0x283
  41807. 8011c8c: 490c ldr r1, [pc, #48] @ (8011cc0 <udp_sendto_if+0xa4>)
  41808. 8011c8e: 4809 ldr r0, [pc, #36] @ (8011cb4 <udp_sendto_if+0x98>)
  41809. 8011c90: f001 fbba bl 8013408 <iprintf>
  41810. 8011c94: f06f 000f mvn.w r0, #15
  41811. 8011c98: e005 b.n 8011ca6 <udp_sendto_if+0x8a>
  41812. src_ip = netif_ip_addr4(netif);
  41813. 8011c9a: 1d28 adds r0, r5, #4
  41814. return udp_sendto_if_src(pcb, p, dst_ip, dst_port, netif, src_ip);
  41815. 8011c9c: 9001 str r0, [sp, #4]
  41816. 8011c9e: 9500 str r5, [sp, #0]
  41817. 8011ca0: 4620 mov r0, r4
  41818. 8011ca2: f7ff ff01 bl 8011aa8 <udp_sendto_if_src>
  41819. }
  41820. 8011ca6: b003 add sp, #12
  41821. 8011ca8: bdf0 pop {r4, r5, r6, r7, pc}
  41822. 8011caa: bf00 nop
  41823. 8011cac: 08017b60 .word 0x08017b60
  41824. 8011cb0: 08017d50 .word 0x08017d50
  41825. 8011cb4: 080144e8 .word 0x080144e8
  41826. 8011cb8: 08017d6c .word 0x08017d6c
  41827. 8011cbc: 08017d88 .word 0x08017d88
  41828. 8011cc0: 08017da8 .word 0x08017da8
  41829. 08011cc4 <udp_sendto>:
  41830. {
  41831. 8011cc4: b5f0 push {r4, r5, r6, r7, lr}
  41832. 8011cc6: b083 sub sp, #12
  41833. LWIP_ERROR("udp_sendto: invalid pcb", pcb != NULL, return ERR_ARG);
  41834. 8011cc8: b198 cbz r0, 8011cf2 <udp_sendto+0x2e>
  41835. 8011cca: 460d mov r5, r1
  41836. 8011ccc: 4614 mov r4, r2
  41837. 8011cce: 461e mov r6, r3
  41838. 8011cd0: 4607 mov r7, r0
  41839. LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG);
  41840. 8011cd2: b1c1 cbz r1, 8011d06 <udp_sendto+0x42>
  41841. LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
  41842. 8011cd4: b30a cbz r2, 8011d1a <udp_sendto+0x56>
  41843. if (pcb->netif_idx != NETIF_NO_INDEX) {
  41844. 8011cd6: 7a00 ldrb r0, [r0, #8]
  41845. 8011cd8: b348 cbz r0, 8011d2e <udp_sendto+0x6a>
  41846. netif = netif_get_by_index(pcb->netif_idx);
  41847. 8011cda: f7f9 ff31 bl 800bb40 <netif_get_by_index>
  41848. if (netif == NULL) {
  41849. 8011cde: b350 cbz r0, 8011d36 <udp_sendto+0x72>
  41850. return udp_sendto_if(pcb, p, dst_ip, dst_port, netif);
  41851. 8011ce0: 9000 str r0, [sp, #0]
  41852. 8011ce2: 4633 mov r3, r6
  41853. 8011ce4: 4622 mov r2, r4
  41854. 8011ce6: 4629 mov r1, r5
  41855. 8011ce8: 4638 mov r0, r7
  41856. 8011cea: f7ff ff97 bl 8011c1c <udp_sendto_if>
  41857. }
  41858. 8011cee: b003 add sp, #12
  41859. 8011cf0: bdf0 pop {r4, r5, r6, r7, pc}
  41860. LWIP_ERROR("udp_sendto: invalid pcb", pcb != NULL, return ERR_ARG);
  41861. 8011cf2: 4b12 ldr r3, [pc, #72] @ (8011d3c <udp_sendto+0x78>)
  41862. 8011cf4: f44f 7206 mov.w r2, #536 @ 0x218
  41863. 8011cf8: 4911 ldr r1, [pc, #68] @ (8011d40 <udp_sendto+0x7c>)
  41864. 8011cfa: 4812 ldr r0, [pc, #72] @ (8011d44 <udp_sendto+0x80>)
  41865. 8011cfc: f001 fb84 bl 8013408 <iprintf>
  41866. 8011d00: f06f 000f mvn.w r0, #15
  41867. 8011d04: e7f3 b.n 8011cee <udp_sendto+0x2a>
  41868. LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG);
  41869. 8011d06: 4b0d ldr r3, [pc, #52] @ (8011d3c <udp_sendto+0x78>)
  41870. 8011d08: f240 2219 movw r2, #537 @ 0x219
  41871. 8011d0c: 490e ldr r1, [pc, #56] @ (8011d48 <udp_sendto+0x84>)
  41872. 8011d0e: 480d ldr r0, [pc, #52] @ (8011d44 <udp_sendto+0x80>)
  41873. 8011d10: f001 fb7a bl 8013408 <iprintf>
  41874. 8011d14: f06f 000f mvn.w r0, #15
  41875. 8011d18: e7e9 b.n 8011cee <udp_sendto+0x2a>
  41876. LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG);
  41877. 8011d1a: 4b08 ldr r3, [pc, #32] @ (8011d3c <udp_sendto+0x78>)
  41878. 8011d1c: f240 221a movw r2, #538 @ 0x21a
  41879. 8011d20: 490a ldr r1, [pc, #40] @ (8011d4c <udp_sendto+0x88>)
  41880. 8011d22: 4808 ldr r0, [pc, #32] @ (8011d44 <udp_sendto+0x80>)
  41881. 8011d24: f001 fb70 bl 8013408 <iprintf>
  41882. 8011d28: f06f 000f mvn.w r0, #15
  41883. 8011d2c: e7df b.n 8011cee <udp_sendto+0x2a>
  41884. netif = ip_route(&pcb->local_ip, dst_ip);
  41885. 8011d2e: 4610 mov r0, r2
  41886. 8011d30: f7f8 f9e6 bl 800a100 <ip4_route>
  41887. 8011d34: e7d3 b.n 8011cde <udp_sendto+0x1a>
  41888. return ERR_RTE;
  41889. 8011d36: f06f 0003 mvn.w r0, #3
  41890. 8011d3a: e7d8 b.n 8011cee <udp_sendto+0x2a>
  41891. 8011d3c: 08017b60 .word 0x08017b60
  41892. 8011d40: 08017dc8 .word 0x08017dc8
  41893. 8011d44: 080144e8 .word 0x080144e8
  41894. 8011d48: 08017de0 .word 0x08017de0
  41895. 8011d4c: 08017dfc .word 0x08017dfc
  41896. 08011d50 <udp_send>:
  41897. {
  41898. 8011d50: b508 push {r3, lr}
  41899. LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG);
  41900. 8011d52: b128 cbz r0, 8011d60 <udp_send+0x10>
  41901. LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG);
  41902. 8011d54: b171 cbz r1, 8011d74 <udp_send+0x24>
  41903. return udp_sendto(pcb, p, &pcb->remote_ip, pcb->remote_port);
  41904. 8011d56: 8a83 ldrh r3, [r0, #20]
  41905. 8011d58: 1d02 adds r2, r0, #4
  41906. 8011d5a: f7ff ffb3 bl 8011cc4 <udp_sendto>
  41907. }
  41908. 8011d5e: bd08 pop {r3, pc}
  41909. LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG);
  41910. 8011d60: 4b09 ldr r3, [pc, #36] @ (8011d88 <udp_send+0x38>)
  41911. 8011d62: f240 12d5 movw r2, #469 @ 0x1d5
  41912. 8011d66: 4909 ldr r1, [pc, #36] @ (8011d8c <udp_send+0x3c>)
  41913. 8011d68: 4809 ldr r0, [pc, #36] @ (8011d90 <udp_send+0x40>)
  41914. 8011d6a: f001 fb4d bl 8013408 <iprintf>
  41915. 8011d6e: f06f 000f mvn.w r0, #15
  41916. 8011d72: e7f4 b.n 8011d5e <udp_send+0xe>
  41917. LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG);
  41918. 8011d74: 4b04 ldr r3, [pc, #16] @ (8011d88 <udp_send+0x38>)
  41919. 8011d76: f44f 72eb mov.w r2, #470 @ 0x1d6
  41920. 8011d7a: 4906 ldr r1, [pc, #24] @ (8011d94 <udp_send+0x44>)
  41921. 8011d7c: 4804 ldr r0, [pc, #16] @ (8011d90 <udp_send+0x40>)
  41922. 8011d7e: f001 fb43 bl 8013408 <iprintf>
  41923. 8011d82: f06f 000f mvn.w r0, #15
  41924. 8011d86: e7ea b.n 8011d5e <udp_send+0xe>
  41925. 8011d88: 08017b60 .word 0x08017b60
  41926. 8011d8c: 08017e18 .word 0x08017e18
  41927. 8011d90: 080144e8 .word 0x080144e8
  41928. 8011d94: 08017e30 .word 0x08017e30
  41929. 08011d98 <udp_connect>:
  41930. *
  41931. * @see udp_disconnect()
  41932. */
  41933. err_t
  41934. udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
  41935. {
  41936. 8011d98: b570 push {r4, r5, r6, lr}
  41937. 8011d9a: 4604 mov r4, r0
  41938. 8011d9c: 460d mov r5, r1
  41939. 8011d9e: 4616 mov r6, r2
  41940. struct udp_pcb *ipcb;
  41941. LWIP_ASSERT_CORE_LOCKED();
  41942. 8011da0: f7f1 feb4 bl 8003b0c <sys_check_core_locking>
  41943. LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
  41944. 8011da4: b18c cbz r4, 8011dca <udp_connect+0x32>
  41945. LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
  41946. 8011da6: b1d5 cbz r5, 8011dde <udp_connect+0x46>
  41947. if (pcb->local_port == 0) {
  41948. 8011da8: 8a62 ldrh r2, [r4, #18]
  41949. 8011daa: b312 cbz r2, 8011df2 <udp_connect+0x5a>
  41950. if (err != ERR_OK) {
  41951. return err;
  41952. }
  41953. }
  41954. ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr);
  41955. 8011dac: 682b ldr r3, [r5, #0]
  41956. 8011dae: 6063 str r3, [r4, #4]
  41957. ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNKNOWN)) {
  41958. ip6_addr_select_zone(ip_2_ip6(&pcb->remote_ip), ip_2_ip6(&pcb->local_ip));
  41959. }
  41960. #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */
  41961. pcb->remote_port = port;
  41962. 8011db0: 82a6 strh r6, [r4, #20]
  41963. pcb->flags |= UDP_FLAGS_CONNECTED;
  41964. 8011db2: 7c23 ldrb r3, [r4, #16]
  41965. 8011db4: f043 0304 orr.w r3, r3, #4
  41966. 8011db8: 7423 strb r3, [r4, #16]
  41967. ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE,
  41968. pcb->remote_ip);
  41969. LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->remote_port));
  41970. /* Insert UDP PCB into the list of active UDP PCBs. */
  41971. for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
  41972. 8011dba: 4b15 ldr r3, [pc, #84] @ (8011e10 <udp_connect+0x78>)
  41973. 8011dbc: 681a ldr r2, [r3, #0]
  41974. 8011dbe: 4613 mov r3, r2
  41975. 8011dc0: b1f3 cbz r3, 8011e00 <udp_connect+0x68>
  41976. if (pcb == ipcb) {
  41977. 8011dc2: 429c cmp r4, r3
  41978. 8011dc4: d021 beq.n 8011e0a <udp_connect+0x72>
  41979. for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) {
  41980. 8011dc6: 68db ldr r3, [r3, #12]
  41981. 8011dc8: e7fa b.n 8011dc0 <udp_connect+0x28>
  41982. LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG);
  41983. 8011dca: 4b12 ldr r3, [pc, #72] @ (8011e14 <udp_connect+0x7c>)
  41984. 8011dcc: f240 4235 movw r2, #1077 @ 0x435
  41985. 8011dd0: 4911 ldr r1, [pc, #68] @ (8011e18 <udp_connect+0x80>)
  41986. 8011dd2: 4812 ldr r0, [pc, #72] @ (8011e1c <udp_connect+0x84>)
  41987. 8011dd4: f001 fb18 bl 8013408 <iprintf>
  41988. 8011dd8: f06f 000f mvn.w r0, #15
  41989. 8011ddc: e014 b.n 8011e08 <udp_connect+0x70>
  41990. LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG);
  41991. 8011dde: 4b0d ldr r3, [pc, #52] @ (8011e14 <udp_connect+0x7c>)
  41992. 8011de0: f240 4236 movw r2, #1078 @ 0x436
  41993. 8011de4: 490e ldr r1, [pc, #56] @ (8011e20 <udp_connect+0x88>)
  41994. 8011de6: 480d ldr r0, [pc, #52] @ (8011e1c <udp_connect+0x84>)
  41995. 8011de8: f001 fb0e bl 8013408 <iprintf>
  41996. 8011dec: f06f 000f mvn.w r0, #15
  41997. 8011df0: e00a b.n 8011e08 <udp_connect+0x70>
  41998. err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port);
  41999. 8011df2: 4621 mov r1, r4
  42000. 8011df4: 4620 mov r0, r4
  42001. 8011df6: f7ff fdfd bl 80119f4 <udp_bind>
  42002. if (err != ERR_OK) {
  42003. 8011dfa: 2800 cmp r0, #0
  42004. 8011dfc: d0d6 beq.n 8011dac <udp_connect+0x14>
  42005. 8011dfe: e003 b.n 8011e08 <udp_connect+0x70>
  42006. /* already on the list, just return */
  42007. return ERR_OK;
  42008. }
  42009. }
  42010. /* PCB not yet on the list, add PCB now */
  42011. pcb->next = udp_pcbs;
  42012. 8011e00: 60e2 str r2, [r4, #12]
  42013. udp_pcbs = pcb;
  42014. 8011e02: 4b03 ldr r3, [pc, #12] @ (8011e10 <udp_connect+0x78>)
  42015. 8011e04: 601c str r4, [r3, #0]
  42016. return ERR_OK;
  42017. 8011e06: 2000 movs r0, #0
  42018. }
  42019. 8011e08: bd70 pop {r4, r5, r6, pc}
  42020. return ERR_OK;
  42021. 8011e0a: 2000 movs r0, #0
  42022. 8011e0c: e7fc b.n 8011e08 <udp_connect+0x70>
  42023. 8011e0e: bf00 nop
  42024. 8011e10: 24019c40 .word 0x24019c40
  42025. 8011e14: 08017b60 .word 0x08017b60
  42026. 8011e18: 08017e48 .word 0x08017e48
  42027. 8011e1c: 080144e8 .word 0x080144e8
  42028. 8011e20: 08017e64 .word 0x08017e64
  42029. 08011e24 <udp_disconnect>:
  42030. *
  42031. * @param pcb the udp pcb to disconnect.
  42032. */
  42033. void
  42034. udp_disconnect(struct udp_pcb *pcb)
  42035. {
  42036. 8011e24: b510 push {r4, lr}
  42037. 8011e26: 4604 mov r4, r0
  42038. LWIP_ASSERT_CORE_LOCKED();
  42039. 8011e28: f7f1 fe70 bl 8003b0c <sys_check_core_locking>
  42040. LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return);
  42041. 8011e2c: b144 cbz r4, 8011e40 <udp_disconnect+0x1c>
  42042. #if LWIP_IPV4 && LWIP_IPV6
  42043. if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) {
  42044. ip_addr_copy(pcb->remote_ip, *IP_ANY_TYPE);
  42045. } else {
  42046. #endif
  42047. ip_addr_set_any(IP_IS_V6_VAL(pcb->remote_ip), &pcb->remote_ip);
  42048. 8011e2e: 2300 movs r3, #0
  42049. 8011e30: 6063 str r3, [r4, #4]
  42050. #if LWIP_IPV4 && LWIP_IPV6
  42051. }
  42052. #endif
  42053. pcb->remote_port = 0;
  42054. 8011e32: 82a3 strh r3, [r4, #20]
  42055. pcb->netif_idx = NETIF_NO_INDEX;
  42056. 8011e34: 7223 strb r3, [r4, #8]
  42057. /* mark PCB as unconnected */
  42058. udp_clear_flags(pcb, UDP_FLAGS_CONNECTED);
  42059. 8011e36: 7c23 ldrb r3, [r4, #16]
  42060. 8011e38: f003 03fb and.w r3, r3, #251 @ 0xfb
  42061. 8011e3c: 7423 strb r3, [r4, #16]
  42062. }
  42063. 8011e3e: bd10 pop {r4, pc}
  42064. LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return);
  42065. 8011e40: 4b03 ldr r3, [pc, #12] @ (8011e50 <udp_disconnect+0x2c>)
  42066. 8011e42: f240 426a movw r2, #1130 @ 0x46a
  42067. 8011e46: 4903 ldr r1, [pc, #12] @ (8011e54 <udp_disconnect+0x30>)
  42068. 8011e48: 4803 ldr r0, [pc, #12] @ (8011e58 <udp_disconnect+0x34>)
  42069. 8011e4a: f001 fadd bl 8013408 <iprintf>
  42070. 8011e4e: e7f6 b.n 8011e3e <udp_disconnect+0x1a>
  42071. 8011e50: 08017b60 .word 0x08017b60
  42072. 8011e54: 08017e80 .word 0x08017e80
  42073. 8011e58: 080144e8 .word 0x080144e8
  42074. 08011e5c <udp_recv>:
  42075. * @param recv function pointer of the callback function
  42076. * @param recv_arg additional argument to pass to the callback function
  42077. */
  42078. void
  42079. udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg)
  42080. {
  42081. 8011e5c: b570 push {r4, r5, r6, lr}
  42082. 8011e5e: 4604 mov r4, r0
  42083. 8011e60: 460e mov r6, r1
  42084. 8011e62: 4615 mov r5, r2
  42085. LWIP_ASSERT_CORE_LOCKED();
  42086. 8011e64: f7f1 fe52 bl 8003b0c <sys_check_core_locking>
  42087. LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return);
  42088. 8011e68: b114 cbz r4, 8011e70 <udp_recv+0x14>
  42089. /* remember recv() callback and user data */
  42090. pcb->recv = recv;
  42091. 8011e6a: 61a6 str r6, [r4, #24]
  42092. pcb->recv_arg = recv_arg;
  42093. 8011e6c: 61e5 str r5, [r4, #28]
  42094. }
  42095. 8011e6e: bd70 pop {r4, r5, r6, pc}
  42096. LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return);
  42097. 8011e70: 4b03 ldr r3, [pc, #12] @ (8011e80 <udp_recv+0x24>)
  42098. 8011e72: f240 428a movw r2, #1162 @ 0x48a
  42099. 8011e76: 4903 ldr r1, [pc, #12] @ (8011e84 <udp_recv+0x28>)
  42100. 8011e78: 4803 ldr r0, [pc, #12] @ (8011e88 <udp_recv+0x2c>)
  42101. 8011e7a: f001 fac5 bl 8013408 <iprintf>
  42102. 8011e7e: e7f6 b.n 8011e6e <udp_recv+0x12>
  42103. 8011e80: 08017b60 .word 0x08017b60
  42104. 8011e84: 08017e9c .word 0x08017e9c
  42105. 8011e88: 080144e8 .word 0x080144e8
  42106. 08011e8c <udp_remove>:
  42107. *
  42108. * @see udp_new()
  42109. */
  42110. void
  42111. udp_remove(struct udp_pcb *pcb)
  42112. {
  42113. 8011e8c: b510 push {r4, lr}
  42114. 8011e8e: 4604 mov r4, r0
  42115. struct udp_pcb *pcb2;
  42116. LWIP_ASSERT_CORE_LOCKED();
  42117. 8011e90: f7f1 fe3c bl 8003b0c <sys_check_core_locking>
  42118. LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return);
  42119. 8011e94: b154 cbz r4, 8011eac <udp_remove+0x20>
  42120. mib2_udp_unbind(pcb);
  42121. /* pcb to be removed is first in list? */
  42122. if (udp_pcbs == pcb) {
  42123. 8011e96: 4b10 ldr r3, [pc, #64] @ (8011ed8 <udp_remove+0x4c>)
  42124. 8011e98: 681a ldr r2, [r3, #0]
  42125. 8011e9a: 42a2 cmp r2, r4
  42126. 8011e9c: d112 bne.n 8011ec4 <udp_remove+0x38>
  42127. /* make list start at 2nd pcb */
  42128. udp_pcbs = udp_pcbs->next;
  42129. 8011e9e: 68d2 ldr r2, [r2, #12]
  42130. 8011ea0: 601a str r2, [r3, #0]
  42131. pcb2->next = pcb->next;
  42132. break;
  42133. }
  42134. }
  42135. }
  42136. memp_free(MEMP_UDP_PCB, pcb);
  42137. 8011ea2: 4621 mov r1, r4
  42138. 8011ea4: 2000 movs r0, #0
  42139. 8011ea6: f7f9 fbe3 bl 800b670 <memp_free>
  42140. }
  42141. 8011eaa: bd10 pop {r4, pc}
  42142. LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return);
  42143. 8011eac: 4b0b ldr r3, [pc, #44] @ (8011edc <udp_remove+0x50>)
  42144. 8011eae: f240 42a1 movw r2, #1185 @ 0x4a1
  42145. 8011eb2: 490b ldr r1, [pc, #44] @ (8011ee0 <udp_remove+0x54>)
  42146. 8011eb4: 480b ldr r0, [pc, #44] @ (8011ee4 <udp_remove+0x58>)
  42147. 8011eb6: f001 faa7 bl 8013408 <iprintf>
  42148. 8011eba: e7f6 b.n 8011eaa <udp_remove+0x1e>
  42149. pcb2->next = pcb->next;
  42150. 8011ebc: 68e3 ldr r3, [r4, #12]
  42151. 8011ebe: 60d3 str r3, [r2, #12]
  42152. break;
  42153. 8011ec0: e7ef b.n 8011ea2 <udp_remove+0x16>
  42154. 8011ec2: 461a mov r2, r3
  42155. for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
  42156. 8011ec4: 2a00 cmp r2, #0
  42157. 8011ec6: d0ec beq.n 8011ea2 <udp_remove+0x16>
  42158. if (pcb2->next != NULL && pcb2->next == pcb) {
  42159. 8011ec8: 68d3 ldr r3, [r2, #12]
  42160. 8011eca: 2b00 cmp r3, #0
  42161. 8011ecc: d0f9 beq.n 8011ec2 <udp_remove+0x36>
  42162. 8011ece: 42a3 cmp r3, r4
  42163. 8011ed0: d0f4 beq.n 8011ebc <udp_remove+0x30>
  42164. 8011ed2: 461a mov r2, r3
  42165. 8011ed4: e7f6 b.n 8011ec4 <udp_remove+0x38>
  42166. 8011ed6: bf00 nop
  42167. 8011ed8: 24019c40 .word 0x24019c40
  42168. 8011edc: 08017b60 .word 0x08017b60
  42169. 8011ee0: 08017eb4 .word 0x08017eb4
  42170. 8011ee4: 080144e8 .word 0x080144e8
  42171. 08011ee8 <udp_new>:
  42172. *
  42173. * @see udp_remove()
  42174. */
  42175. struct udp_pcb *
  42176. udp_new(void)
  42177. {
  42178. 8011ee8: b510 push {r4, lr}
  42179. struct udp_pcb *pcb;
  42180. LWIP_ASSERT_CORE_LOCKED();
  42181. 8011eea: f7f1 fe0f bl 8003b0c <sys_check_core_locking>
  42182. pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB);
  42183. 8011eee: 2000 movs r0, #0
  42184. 8011ef0: f7f9 fb88 bl 800b604 <memp_malloc>
  42185. /* could allocate UDP PCB? */
  42186. if (pcb != NULL) {
  42187. 8011ef4: 4604 mov r4, r0
  42188. 8011ef6: b128 cbz r0, 8011f04 <udp_new+0x1c>
  42189. /* UDP Lite: by initializing to all zeroes, chksum_len is set to 0
  42190. * which means checksum is generated over the whole datagram per default
  42191. * (recommended as default by RFC 3828). */
  42192. /* initialize PCB to all zeroes */
  42193. memset(pcb, 0, sizeof(struct udp_pcb));
  42194. 8011ef8: 2220 movs r2, #32
  42195. 8011efa: 2100 movs r1, #0
  42196. 8011efc: f001 fbdc bl 80136b8 <memset>
  42197. pcb->ttl = UDP_TTL;
  42198. 8011f00: 23ff movs r3, #255 @ 0xff
  42199. 8011f02: 72e3 strb r3, [r4, #11]
  42200. #if LWIP_MULTICAST_TX_OPTIONS
  42201. udp_set_multicast_ttl(pcb, UDP_TTL);
  42202. #endif /* LWIP_MULTICAST_TX_OPTIONS */
  42203. }
  42204. return pcb;
  42205. }
  42206. 8011f04: 4620 mov r0, r4
  42207. 8011f06: bd10 pop {r4, pc}
  42208. 08011f08 <udp_new_ip_type>:
  42209. *
  42210. * @see udp_remove()
  42211. */
  42212. struct udp_pcb *
  42213. udp_new_ip_type(u8_t type)
  42214. {
  42215. 8011f08: b508 push {r3, lr}
  42216. struct udp_pcb *pcb;
  42217. LWIP_ASSERT_CORE_LOCKED();
  42218. 8011f0a: f7f1 fdff bl 8003b0c <sys_check_core_locking>
  42219. pcb = udp_new();
  42220. 8011f0e: f7ff ffeb bl 8011ee8 <udp_new>
  42221. }
  42222. #else
  42223. LWIP_UNUSED_ARG(type);
  42224. #endif /* LWIP_IPV4 && LWIP_IPV6 */
  42225. return pcb;
  42226. }
  42227. 8011f12: bd08 pop {r3, pc}
  42228. 08011f14 <udp_netif_ip_addr_changed>:
  42229. */
  42230. void udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr)
  42231. {
  42232. struct udp_pcb *upcb;
  42233. if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) {
  42234. 8011f14: b1b8 cbz r0, 8011f46 <udp_netif_ip_addr_changed+0x32>
  42235. 8011f16: 4602 mov r2, r0
  42236. 8011f18: 6803 ldr r3, [r0, #0]
  42237. 8011f1a: b1a3 cbz r3, 8011f46 <udp_netif_ip_addr_changed+0x32>
  42238. 8011f1c: b199 cbz r1, 8011f46 <udp_netif_ip_addr_changed+0x32>
  42239. 8011f1e: 680b ldr r3, [r1, #0]
  42240. 8011f20: b18b cbz r3, 8011f46 <udp_netif_ip_addr_changed+0x32>
  42241. for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
  42242. 8011f22: 4b09 ldr r3, [pc, #36] @ (8011f48 <udp_netif_ip_addr_changed+0x34>)
  42243. 8011f24: 681b ldr r3, [r3, #0]
  42244. 8011f26: b16b cbz r3, 8011f44 <udp_netif_ip_addr_changed+0x30>
  42245. {
  42246. 8011f28: b410 push {r4}
  42247. 8011f2a: e001 b.n 8011f30 <udp_netif_ip_addr_changed+0x1c>
  42248. for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) {
  42249. 8011f2c: 68db ldr r3, [r3, #12]
  42250. 8011f2e: b133 cbz r3, 8011f3e <udp_netif_ip_addr_changed+0x2a>
  42251. /* PCB bound to current local interface address? */
  42252. if (ip_addr_cmp(&upcb->local_ip, old_addr)) {
  42253. 8011f30: 6810 ldr r0, [r2, #0]
  42254. 8011f32: 681c ldr r4, [r3, #0]
  42255. 8011f34: 4284 cmp r4, r0
  42256. 8011f36: d1f9 bne.n 8011f2c <udp_netif_ip_addr_changed+0x18>
  42257. /* The PCB is bound to the old ipaddr and
  42258. * is set to bound to the new one instead */
  42259. ip_addr_copy(upcb->local_ip, *new_addr);
  42260. 8011f38: 6808 ldr r0, [r1, #0]
  42261. 8011f3a: 6018 str r0, [r3, #0]
  42262. 8011f3c: e7f6 b.n 8011f2c <udp_netif_ip_addr_changed+0x18>
  42263. }
  42264. }
  42265. }
  42266. }
  42267. 8011f3e: f85d 4b04 ldr.w r4, [sp], #4
  42268. 8011f42: 4770 bx lr
  42269. 8011f44: 4770 bx lr
  42270. 8011f46: 4770 bx lr
  42271. 8011f48: 24019c40 .word 0x24019c40
  42272. 08011f4c <NewMessageData>:
  42273. #include "cmsis_os.h"
  42274. osMutexId_t mqttMutex;
  42275. static void NewMessageData(MessageData* md, MQTTString* aTopicName, MQTTMessage* aMessage) {
  42276. md->topicName = aTopicName;
  42277. 8011f4c: 6041 str r1, [r0, #4]
  42278. md->message = aMessage;
  42279. 8011f4e: 6002 str r2, [r0, #0]
  42280. }
  42281. 8011f50: 4770 bx lr
  42282. 08011f52 <getNextPacketId>:
  42283. static int getNextPacketId(MQTTClient *c) {
  42284. 8011f52: 4602 mov r2, r0
  42285. return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1;
  42286. 8011f54: 6800 ldr r0, [r0, #0]
  42287. 8011f56: f64f 71ff movw r1, #65535 @ 0xffff
  42288. 8011f5a: 4288 cmp r0, r1
  42289. 8011f5c: d002 beq.n 8011f64 <getNextPacketId+0x12>
  42290. 8011f5e: 3001 adds r0, #1
  42291. 8011f60: 6010 str r0, [r2, #0]
  42292. }
  42293. 8011f62: 4770 bx lr
  42294. return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1;
  42295. 8011f64: 2001 movs r0, #1
  42296. 8011f66: e7fb b.n 8011f60 <getNextPacketId+0xe>
  42297. 08011f68 <decodePacket>:
  42298. }
  42299. }
  42300. static int decodePacket(MQTTClient* c, int* value, int timeout)
  42301. {
  42302. 8011f68: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
  42303. 8011f6c: b083 sub sp, #12
  42304. 8011f6e: 4681 mov r9, r0
  42305. 8011f70: 460e mov r6, r1
  42306. 8011f72: 4690 mov r8, r2
  42307. unsigned char i;
  42308. int multiplier = 1;
  42309. int len = 0;
  42310. const int MAX_NO_OF_REMAINING_LENGTH_BYTES = 4;
  42311. *value = 0;
  42312. 8011f74: 2400 movs r4, #0
  42313. 8011f76: 600c str r4, [r1, #0]
  42314. int multiplier = 1;
  42315. 8011f78: 2701 movs r7, #1
  42316. do
  42317. {
  42318. int rc = MQTTPACKET_READ_ERROR;
  42319. if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES)
  42320. 8011f7a: 3401 adds r4, #1
  42321. 8011f7c: 2c04 cmp r4, #4
  42322. 8011f7e: dc15 bgt.n 8011fac <decodePacket+0x44>
  42323. {
  42324. rc = MQTTPACKET_READ_ERROR; /* bad data */
  42325. goto exit;
  42326. }
  42327. rc = c->ipstack->mqttread(c->ipstack, &i, 1, timeout);
  42328. 8011f80: f8d9 0054 ldr.w r0, [r9, #84] @ 0x54
  42329. 8011f84: 6845 ldr r5, [r0, #4]
  42330. 8011f86: 4643 mov r3, r8
  42331. 8011f88: 2201 movs r2, #1
  42332. 8011f8a: f10d 0107 add.w r1, sp, #7
  42333. 8011f8e: 47a8 blx r5
  42334. if (rc != 1)
  42335. 8011f90: 2801 cmp r0, #1
  42336. 8011f92: d10b bne.n 8011fac <decodePacket+0x44>
  42337. goto exit;
  42338. *value += (i & 127) * multiplier;
  42339. 8011f94: f89d 3007 ldrb.w r3, [sp, #7]
  42340. 8011f98: f003 027f and.w r2, r3, #127 @ 0x7f
  42341. 8011f9c: 6831 ldr r1, [r6, #0]
  42342. 8011f9e: fb07 1202 mla r2, r7, r2, r1
  42343. 8011fa2: 6032 str r2, [r6, #0]
  42344. multiplier *= 128;
  42345. 8011fa4: 01ff lsls r7, r7, #7
  42346. } while ((i & 128) != 0);
  42347. 8011fa6: f013 0f80 tst.w r3, #128 @ 0x80
  42348. 8011faa: d1e6 bne.n 8011f7a <decodePacket+0x12>
  42349. exit:
  42350. return len;
  42351. }
  42352. 8011fac: 4620 mov r0, r4
  42353. 8011fae: b003 add sp, #12
  42354. 8011fb0: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
  42355. 08011fb4 <isTopicMatched>:
  42356. // # can only be at end
  42357. // + and # can only be next to separator
  42358. static char isTopicMatched(char* topicFilter, MQTTString* topicName)
  42359. {
  42360. char* curf = topicFilter;
  42361. char* curn = topicName->lenstring.data;
  42362. 8011fb4: 688b ldr r3, [r1, #8]
  42363. char* curn_end = curn + topicName->lenstring.len;
  42364. 8011fb6: 6849 ldr r1, [r1, #4]
  42365. 8011fb8: 4419 add r1, r3
  42366. while (*curf && curn < curn_end)
  42367. 8011fba: e008 b.n 8011fce <isTopicMatched+0x1a>
  42368. {
  42369. if (*curn == '/' && *curf != '/')
  42370. 8011fbc: 2a2f cmp r2, #47 @ 0x2f
  42371. 8011fbe: d00f beq.n 8011fe0 <isTopicMatched+0x2c>
  42372. 8011fc0: e014 b.n 8011fec <isTopicMatched+0x38>
  42373. break;
  42374. if (*curf != '+' && *curf != '#' && *curf != *curn)
  42375. break;
  42376. if (*curf == '+')
  42377. 8011fc2: 2a2b cmp r2, #43 @ 0x2b
  42378. 8011fc4: d016 beq.n 8011ff4 <isTopicMatched+0x40>
  42379. { // skip until we meet the next separator, or end of string
  42380. char* nextpos = curn + 1;
  42381. while (nextpos < curn_end && *nextpos != '/')
  42382. nextpos = ++curn + 1;
  42383. }
  42384. else if (*curf == '#')
  42385. 8011fc6: 2a23 cmp r2, #35 @ 0x23
  42386. 8011fc8: d01e beq.n 8012008 <isTopicMatched+0x54>
  42387. curn = curn_end - 1; // skip until end of string
  42388. curf++;
  42389. 8011fca: 3001 adds r0, #1
  42390. curn++;
  42391. 8011fcc: 3301 adds r3, #1
  42392. while (*curf && curn < curn_end)
  42393. 8011fce: 7802 ldrb r2, [r0, #0]
  42394. 8011fd0: b162 cbz r2, 8011fec <isTopicMatched+0x38>
  42395. 8011fd2: 428b cmp r3, r1
  42396. 8011fd4: d20a bcs.n 8011fec <isTopicMatched+0x38>
  42397. if (*curn == '/' && *curf != '/')
  42398. 8011fd6: f893 c000 ldrb.w ip, [r3]
  42399. 8011fda: f1bc 0f2f cmp.w ip, #47 @ 0x2f
  42400. 8011fde: d0ed beq.n 8011fbc <isTopicMatched+0x8>
  42401. if (*curf != '+' && *curf != '#' && *curf != *curn)
  42402. 8011fe0: 2a2b cmp r2, #43 @ 0x2b
  42403. 8011fe2: bf18 it ne
  42404. 8011fe4: 2a23 cmpne r2, #35 @ 0x23
  42405. 8011fe6: d0ec beq.n 8011fc2 <isTopicMatched+0xe>
  42406. 8011fe8: 4594 cmp ip, r2
  42407. 8011fea: d0ea beq.n 8011fc2 <isTopicMatched+0xe>
  42408. };
  42409. return (curn == curn_end) && (*curf == '\0');
  42410. 8011fec: 428b cmp r3, r1
  42411. 8011fee: d00d beq.n 801200c <isTopicMatched+0x58>
  42412. 8011ff0: 2000 movs r0, #0
  42413. 8011ff2: 4770 bx lr
  42414. char* nextpos = curn + 1;
  42415. 8011ff4: 1c5a adds r2, r3, #1
  42416. while (nextpos < curn_end && *nextpos != '/')
  42417. 8011ff6: e001 b.n 8011ffc <isTopicMatched+0x48>
  42418. nextpos = ++curn + 1;
  42419. 8011ff8: 1c9a adds r2, r3, #2
  42420. 8011ffa: 3301 adds r3, #1
  42421. while (nextpos < curn_end && *nextpos != '/')
  42422. 8011ffc: 428a cmp r2, r1
  42423. 8011ffe: d2e4 bcs.n 8011fca <isTopicMatched+0x16>
  42424. 8012000: 7812 ldrb r2, [r2, #0]
  42425. 8012002: 2a2f cmp r2, #47 @ 0x2f
  42426. 8012004: d1f8 bne.n 8011ff8 <isTopicMatched+0x44>
  42427. 8012006: e7e0 b.n 8011fca <isTopicMatched+0x16>
  42428. curn = curn_end - 1; // skip until end of string
  42429. 8012008: 1e4b subs r3, r1, #1
  42430. 801200a: e7de b.n 8011fca <isTopicMatched+0x16>
  42431. return (curn == curn_end) && (*curf == '\0');
  42432. 801200c: b10a cbz r2, 8012012 <isTopicMatched+0x5e>
  42433. 801200e: 2000 movs r0, #0
  42434. 8012010: 4770 bx lr
  42435. 8012012: 2001 movs r0, #1
  42436. }
  42437. 8012014: 4770 bx lr
  42438. 08012016 <sendPacket>:
  42439. {
  42440. 8012016: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  42441. 801201a: 4606 mov r6, r0
  42442. 801201c: 460f mov r7, r1
  42443. 801201e: 4690 mov r8, r2
  42444. sent = 0;
  42445. 8012020: 2400 movs r4, #0
  42446. while (sent < length && !TimerIsExpired(timer))
  42447. 8012022: e000 b.n 8012026 <sendPacket+0x10>
  42448. sent += rc;
  42449. 8012024: 4404 add r4, r0
  42450. while (sent < length && !TimerIsExpired(timer))
  42451. 8012026: 42bc cmp r4, r7
  42452. 8012028: da13 bge.n 8012052 <sendPacket+0x3c>
  42453. 801202a: 4640 mov r0, r8
  42454. 801202c: f000 fc0a bl 8012844 <TimerIsExpired>
  42455. 8012030: b978 cbnz r0, 8012052 <sendPacket+0x3c>
  42456. rc = c->ipstack->mqttwrite(c->ipstack, &c->buf[sent], length, TimerLeftMS(timer));
  42457. 8012032: f8d6 9054 ldr.w r9, [r6, #84] @ 0x54
  42458. 8012036: f8d9 a008 ldr.w sl, [r9, #8]
  42459. 801203a: 6935 ldr r5, [r6, #16]
  42460. 801203c: 4425 add r5, r4
  42461. 801203e: 4640 mov r0, r8
  42462. 8012040: f000 fc1a bl 8012878 <TimerLeftMS>
  42463. 8012044: 4603 mov r3, r0
  42464. 8012046: 463a mov r2, r7
  42465. 8012048: 4629 mov r1, r5
  42466. 801204a: 4648 mov r0, r9
  42467. 801204c: 47d0 blx sl
  42468. if (rc < 0) // there was an error writing the data
  42469. 801204e: 2800 cmp r0, #0
  42470. 8012050: dae8 bge.n 8012024 <sendPacket+0xe>
  42471. if (sent == length)
  42472. 8012052: 42bc cmp r4, r7
  42473. 8012054: d107 bne.n 8012066 <sendPacket+0x50>
  42474. TimerCountdown(&c->last_sent, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully sent the packet
  42475. 8012056: 69b1 ldr r1, [r6, #24]
  42476. 8012058: f106 0058 add.w r0, r6, #88 @ 0x58
  42477. 801205c: f000 fc02 bl 8012864 <TimerCountdown>
  42478. rc = MQTT_SUCCESS;
  42479. 8012060: 2000 movs r0, #0
  42480. }
  42481. 8012062: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  42482. rc = FAILURE;
  42483. 8012066: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  42484. return rc;
  42485. 801206a: e7fa b.n 8012062 <sendPacket+0x4c>
  42486. 0801206c <readPacket>:
  42487. {
  42488. 801206c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr}
  42489. 8012070: b083 sub sp, #12
  42490. 8012072: 4604 mov r4, r0
  42491. 8012074: 460e mov r6, r1
  42492. MQTTHeader header = {0};
  42493. 8012076: 2300 movs r3, #0
  42494. int rem_len = 0;
  42495. 8012078: 9301 str r3, [sp, #4]
  42496. int rc = c->ipstack->mqttread(c->ipstack, c->readbuf, 1, TimerLeftMS(timer));
  42497. 801207a: 6d45 ldr r5, [r0, #84] @ 0x54
  42498. 801207c: 686f ldr r7, [r5, #4]
  42499. 801207e: f8d0 8014 ldr.w r8, [r0, #20]
  42500. 8012082: 4608 mov r0, r1
  42501. 8012084: f000 fbf8 bl 8012878 <TimerLeftMS>
  42502. 8012088: 4603 mov r3, r0
  42503. 801208a: 2201 movs r2, #1
  42504. 801208c: 4641 mov r1, r8
  42505. 801208e: 4628 mov r0, r5
  42506. 8012090: 47b8 blx r7
  42507. 8012092: 4605 mov r5, r0
  42508. if (rc != 1)
  42509. 8012094: 2801 cmp r0, #1
  42510. 8012096: d003 beq.n 80120a0 <readPacket+0x34>
  42511. }
  42512. 8012098: 4628 mov r0, r5
  42513. 801209a: b003 add sp, #12
  42514. 801209c: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc}
  42515. decodePacket(c, &rem_len, TimerLeftMS(timer));
  42516. 80120a0: 4630 mov r0, r6
  42517. 80120a2: f000 fbe9 bl 8012878 <TimerLeftMS>
  42518. 80120a6: 4602 mov r2, r0
  42519. 80120a8: a901 add r1, sp, #4
  42520. 80120aa: 4620 mov r0, r4
  42521. 80120ac: f7ff ff5c bl 8011f68 <decodePacket>
  42522. len += MQTTPacket_encode(c->readbuf + 1, rem_len); /* put the original remaining length back into the buffer */
  42523. 80120b0: 6960 ldr r0, [r4, #20]
  42524. 80120b2: 9901 ldr r1, [sp, #4]
  42525. 80120b4: 3001 adds r0, #1
  42526. 80120b6: f000 fdd7 bl 8012c68 <MQTTPacket_encode>
  42527. 80120ba: 3001 adds r0, #1
  42528. if (rem_len > (c->readbuf_size - len))
  42529. 80120bc: 68e3 ldr r3, [r4, #12]
  42530. 80120be: 1a1b subs r3, r3, r0
  42531. 80120c0: 9d01 ldr r5, [sp, #4]
  42532. 80120c2: 42ab cmp r3, r5
  42533. 80120c4: d31f bcc.n 8012106 <readPacket+0x9a>
  42534. if (rem_len > 0 && (rc = c->ipstack->mqttread(c->ipstack, c->readbuf + len, rem_len, TimerLeftMS(timer)) != rem_len)) {
  42535. 80120c6: 2d00 cmp r5, #0
  42536. 80120c8: dc0a bgt.n 80120e0 <readPacket+0x74>
  42537. header.byte = c->readbuf[0];
  42538. 80120ca: 6963 ldr r3, [r4, #20]
  42539. 80120cc: 781d ldrb r5, [r3, #0]
  42540. rc = header.bits.type;
  42541. 80120ce: 092d lsrs r5, r5, #4
  42542. if (c->keepAliveInterval > 0)
  42543. 80120d0: 69a1 ldr r1, [r4, #24]
  42544. 80120d2: 2900 cmp r1, #0
  42545. 80120d4: d0e0 beq.n 8012098 <readPacket+0x2c>
  42546. TimerCountdown(&c->last_received, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully received a packet
  42547. 80120d6: f104 0060 add.w r0, r4, #96 @ 0x60
  42548. 80120da: f000 fbc3 bl 8012864 <TimerCountdown>
  42549. 80120de: e7db b.n 8012098 <readPacket+0x2c>
  42550. if (rem_len > 0 && (rc = c->ipstack->mqttread(c->ipstack, c->readbuf + len, rem_len, TimerLeftMS(timer)) != rem_len)) {
  42551. 80120e0: f8d4 8054 ldr.w r8, [r4, #84] @ 0x54
  42552. 80120e4: f8d8 9004 ldr.w r9, [r8, #4]
  42553. 80120e8: 6967 ldr r7, [r4, #20]
  42554. 80120ea: 4407 add r7, r0
  42555. 80120ec: 4630 mov r0, r6
  42556. 80120ee: f000 fbc3 bl 8012878 <TimerLeftMS>
  42557. 80120f2: 4603 mov r3, r0
  42558. 80120f4: 462a mov r2, r5
  42559. 80120f6: 4639 mov r1, r7
  42560. 80120f8: 4640 mov r0, r8
  42561. 80120fa: 47c8 blx r9
  42562. 80120fc: 9b01 ldr r3, [sp, #4]
  42563. 80120fe: 4298 cmp r0, r3
  42564. 8012100: d0e3 beq.n 80120ca <readPacket+0x5e>
  42565. rc = 0;
  42566. 8012102: 2500 movs r5, #0
  42567. return rc;
  42568. 8012104: e7c8 b.n 8012098 <readPacket+0x2c>
  42569. rc = BUFFER_OVERFLOW;
  42570. 8012106: f06f 0501 mvn.w r5, #1
  42571. 801210a: e7c5 b.n 8012098 <readPacket+0x2c>
  42572. 0801210c <MQTTClientInit>:
  42573. {
  42574. 801210c: b538 push {r3, r4, r5, lr}
  42575. 801210e: 4604 mov r4, r0
  42576. c->ipstack = network;
  42577. 8012110: 6541 str r1, [r0, #84] @ 0x54
  42578. for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
  42579. 8012112: 2100 movs r1, #0
  42580. 8012114: e004 b.n 8012120 <MQTTClientInit+0x14>
  42581. c->messageHandlers[i].topicFilter = 0;
  42582. 8012116: 1d48 adds r0, r1, #5
  42583. 8012118: 2500 movs r5, #0
  42584. 801211a: f844 5030 str.w r5, [r4, r0, lsl #3]
  42585. for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
  42586. 801211e: 3101 adds r1, #1
  42587. 8012120: 2904 cmp r1, #4
  42588. 8012122: ddf8 ble.n 8012116 <MQTTClientInit+0xa>
  42589. c->command_timeout_ms = command_timeout_ms;
  42590. 8012124: 6062 str r2, [r4, #4]
  42591. c->buf = sendbuf;
  42592. 8012126: 6123 str r3, [r4, #16]
  42593. c->buf_size = sendbuf_size;
  42594. 8012128: 9b04 ldr r3, [sp, #16]
  42595. 801212a: 60a3 str r3, [r4, #8]
  42596. c->readbuf = readbuf;
  42597. 801212c: 9b05 ldr r3, [sp, #20]
  42598. 801212e: 6163 str r3, [r4, #20]
  42599. c->readbuf_size = readbuf_size;
  42600. 8012130: 9b06 ldr r3, [sp, #24]
  42601. 8012132: 60e3 str r3, [r4, #12]
  42602. c->isconnected = 0;
  42603. 8012134: 2300 movs r3, #0
  42604. 8012136: 6223 str r3, [r4, #32]
  42605. c->cleansession = 0;
  42606. 8012138: 6263 str r3, [r4, #36] @ 0x24
  42607. c->ping_outstanding = 0;
  42608. 801213a: 7723 strb r3, [r4, #28]
  42609. c->defaultMessageHandler = NULL;
  42610. 801213c: 6523 str r3, [r4, #80] @ 0x50
  42611. c->next_packetid = 1;
  42612. 801213e: 4620 mov r0, r4
  42613. 8012140: 2301 movs r3, #1
  42614. 8012142: f840 3b58 str.w r3, [r0], #88
  42615. TimerInit(&c->last_sent);
  42616. 8012146: f000 fba1 bl 801288c <TimerInit>
  42617. TimerInit(&c->last_received);
  42618. 801214a: f104 0060 add.w r0, r4, #96 @ 0x60
  42619. 801214e: f000 fb9d bl 801288c <TimerInit>
  42620. if(mqttMutex == NULL)
  42621. 8012152: 4b05 ldr r3, [pc, #20] @ (8012168 <MQTTClientInit+0x5c>)
  42622. 8012154: 681b ldr r3, [r3, #0]
  42623. 8012156: b103 cbz r3, 801215a <MQTTClientInit+0x4e>
  42624. }
  42625. 8012158: bd38 pop {r3, r4, r5, pc}
  42626. mqttMutex = osMutexNew(NULL);
  42627. 801215a: 2000 movs r0, #0
  42628. 801215c: f7f1 feac bl 8003eb8 <osMutexNew>
  42629. 8012160: 4b01 ldr r3, [pc, #4] @ (8012168 <MQTTClientInit+0x5c>)
  42630. 8012162: 6018 str r0, [r3, #0]
  42631. }
  42632. 8012164: e7f8 b.n 8012158 <MQTTClientInit+0x4c>
  42633. 8012166: bf00 nop
  42634. 8012168: 24019c44 .word 0x24019c44
  42635. 0801216c <deliverMessage>:
  42636. int deliverMessage(MQTTClient* c, MQTTString* topicName, MQTTMessage* message)
  42637. {
  42638. 801216c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  42639. 8012170: b082 sub sp, #8
  42640. 8012172: 4605 mov r5, r0
  42641. 8012174: 460e mov r6, r1
  42642. 8012176: 4690 mov r8, r2
  42643. int i;
  42644. int rc = FAILURE;
  42645. 8012178: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
  42646. // we have to find the right message handler - indexed by topic
  42647. for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
  42648. 801217c: 2400 movs r4, #0
  42649. 801217e: e007 b.n 8012190 <deliverMessage+0x24>
  42650. {
  42651. if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) ||
  42652. isTopicMatched((char*)c->messageHandlers[i].topicFilter, topicName)))
  42653. 8012180: 1d63 adds r3, r4, #5
  42654. 8012182: 4631 mov r1, r6
  42655. 8012184: f855 0033 ldr.w r0, [r5, r3, lsl #3]
  42656. 8012188: f7ff ff14 bl 8011fb4 <isTopicMatched>
  42657. if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) ||
  42658. 801218c: b960 cbnz r0, 80121a8 <deliverMessage+0x3c>
  42659. for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
  42660. 801218e: 3401 adds r4, #1
  42661. 8012190: 2c04 cmp r4, #4
  42662. 8012192: dc1c bgt.n 80121ce <deliverMessage+0x62>
  42663. if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) ||
  42664. 8012194: 1d63 adds r3, r4, #5
  42665. 8012196: f855 1033 ldr.w r1, [r5, r3, lsl #3]
  42666. 801219a: 2900 cmp r1, #0
  42667. 801219c: d0f7 beq.n 801218e <deliverMessage+0x22>
  42668. 801219e: 4630 mov r0, r6
  42669. 80121a0: f000 fe4c bl 8012e3c <MQTTPacket_equals>
  42670. 80121a4: 2800 cmp r0, #0
  42671. 80121a6: d0eb beq.n 8012180 <deliverMessage+0x14>
  42672. {
  42673. if (c->messageHandlers[i].fp != NULL)
  42674. 80121a8: 1d63 adds r3, r4, #5
  42675. 80121aa: eb05 03c3 add.w r3, r5, r3, lsl #3
  42676. 80121ae: 685b ldr r3, [r3, #4]
  42677. 80121b0: 2b00 cmp r3, #0
  42678. 80121b2: d0ec beq.n 801218e <deliverMessage+0x22>
  42679. {
  42680. MessageData md;
  42681. NewMessageData(&md, topicName, message);
  42682. 80121b4: 4642 mov r2, r8
  42683. 80121b6: 4631 mov r1, r6
  42684. 80121b8: 4668 mov r0, sp
  42685. 80121ba: f7ff fec7 bl 8011f4c <NewMessageData>
  42686. c->messageHandlers[i].fp(&md);
  42687. 80121be: 1d63 adds r3, r4, #5
  42688. 80121c0: eb05 03c3 add.w r3, r5, r3, lsl #3
  42689. 80121c4: 685b ldr r3, [r3, #4]
  42690. 80121c6: 4668 mov r0, sp
  42691. 80121c8: 4798 blx r3
  42692. rc = MQTT_SUCCESS;
  42693. 80121ca: 2700 movs r7, #0
  42694. 80121cc: e7df b.n 801218e <deliverMessage+0x22>
  42695. }
  42696. }
  42697. }
  42698. if (rc == FAILURE && c->defaultMessageHandler != NULL)
  42699. 80121ce: b91f cbnz r7, 80121d8 <deliverMessage+0x6c>
  42700. c->defaultMessageHandler(&md);
  42701. rc = MQTT_SUCCESS;
  42702. }
  42703. return rc;
  42704. }
  42705. 80121d0: 4638 mov r0, r7
  42706. 80121d2: b002 add sp, #8
  42707. 80121d4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  42708. if (rc == FAILURE && c->defaultMessageHandler != NULL)
  42709. 80121d8: 6d2b ldr r3, [r5, #80] @ 0x50
  42710. 80121da: 2b00 cmp r3, #0
  42711. 80121dc: d0f8 beq.n 80121d0 <deliverMessage+0x64>
  42712. NewMessageData(&md, topicName, message);
  42713. 80121de: 4642 mov r2, r8
  42714. 80121e0: 4631 mov r1, r6
  42715. 80121e2: 4668 mov r0, sp
  42716. 80121e4: f7ff feb2 bl 8011f4c <NewMessageData>
  42717. c->defaultMessageHandler(&md);
  42718. 80121e8: 6d2b ldr r3, [r5, #80] @ 0x50
  42719. 80121ea: 4668 mov r0, sp
  42720. 80121ec: 4798 blx r3
  42721. rc = MQTT_SUCCESS;
  42722. 80121ee: 2700 movs r7, #0
  42723. return rc;
  42724. 80121f0: e7ee b.n 80121d0 <deliverMessage+0x64>
  42725. 080121f2 <keepalive>:
  42726. int keepalive(MQTTClient* c)
  42727. {
  42728. int rc = MQTT_SUCCESS;
  42729. if (c->keepAliveInterval == 0)
  42730. 80121f2: 6983 ldr r3, [r0, #24]
  42731. 80121f4: b90b cbnz r3, 80121fa <keepalive+0x8>
  42732. int rc = MQTT_SUCCESS;
  42733. 80121f6: 2000 movs r0, #0
  42734. }
  42735. }
  42736. exit:
  42737. return rc;
  42738. }
  42739. 80121f8: 4770 bx lr
  42740. {
  42741. 80121fa: b510 push {r4, lr}
  42742. 80121fc: b082 sub sp, #8
  42743. 80121fe: 4604 mov r4, r0
  42744. if (TimerIsExpired(&c->last_sent) || TimerIsExpired(&c->last_received))
  42745. 8012200: 3058 adds r0, #88 @ 0x58
  42746. 8012202: f000 fb1f bl 8012844 <TimerIsExpired>
  42747. 8012206: b190 cbz r0, 801222e <keepalive+0x3c>
  42748. if (c->ping_outstanding)
  42749. 8012208: 7f23 ldrb r3, [r4, #28]
  42750. 801220a: bb0b cbnz r3, 8012250 <keepalive+0x5e>
  42751. TimerInit(&timer);
  42752. 801220c: 4668 mov r0, sp
  42753. 801220e: f000 fb3d bl 801288c <TimerInit>
  42754. TimerCountdownMS(&timer, 1000);
  42755. 8012212: f44f 717a mov.w r1, #1000 @ 0x3e8
  42756. 8012216: 4668 mov r0, sp
  42757. 8012218: f000 fb1c bl 8012854 <TimerCountdownMS>
  42758. int len = MQTTSerialize_pingreq(c->buf, c->buf_size);
  42759. 801221c: 68a1 ldr r1, [r4, #8]
  42760. 801221e: 6920 ldr r0, [r4, #16]
  42761. 8012220: f000 fc9a bl 8012b58 <MQTTSerialize_pingreq>
  42762. if (len > 0 && (rc = sendPacket(c, len, &timer)) == MQTT_SUCCESS) // send the ping packet
  42763. 8012224: 1e01 subs r1, r0, #0
  42764. 8012226: dc0a bgt.n 801223e <keepalive+0x4c>
  42765. int rc = MQTT_SUCCESS;
  42766. 8012228: 2000 movs r0, #0
  42767. }
  42768. 801222a: b002 add sp, #8
  42769. 801222c: bd10 pop {r4, pc}
  42770. if (TimerIsExpired(&c->last_sent) || TimerIsExpired(&c->last_received))
  42771. 801222e: f104 0060 add.w r0, r4, #96 @ 0x60
  42772. 8012232: f000 fb07 bl 8012844 <TimerIsExpired>
  42773. 8012236: 2800 cmp r0, #0
  42774. 8012238: d1e6 bne.n 8012208 <keepalive+0x16>
  42775. int rc = MQTT_SUCCESS;
  42776. 801223a: 2000 movs r0, #0
  42777. 801223c: e7f5 b.n 801222a <keepalive+0x38>
  42778. if (len > 0 && (rc = sendPacket(c, len, &timer)) == MQTT_SUCCESS) // send the ping packet
  42779. 801223e: 466a mov r2, sp
  42780. 8012240: 4620 mov r0, r4
  42781. 8012242: f7ff fee8 bl 8012016 <sendPacket>
  42782. 8012246: 2800 cmp r0, #0
  42783. 8012248: d1ef bne.n 801222a <keepalive+0x38>
  42784. c->ping_outstanding = 1;
  42785. 801224a: 2301 movs r3, #1
  42786. 801224c: 7723 strb r3, [r4, #28]
  42787. 801224e: e7ec b.n 801222a <keepalive+0x38>
  42788. rc = FAILURE; /* PINGRESP not received in keepalive interval */
  42789. 8012250: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  42790. return rc;
  42791. 8012254: e7e9 b.n 801222a <keepalive+0x38>
  42792. 08012256 <MQTTCleanSession>:
  42793. void MQTTCleanSession(MQTTClient* c)
  42794. {
  42795. int i = 0;
  42796. for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
  42797. 8012256: 2300 movs r3, #0
  42798. 8012258: e004 b.n 8012264 <MQTTCleanSession+0xe>
  42799. c->messageHandlers[i].topicFilter = NULL;
  42800. 801225a: 1d5a adds r2, r3, #5
  42801. 801225c: 2100 movs r1, #0
  42802. 801225e: f840 1032 str.w r1, [r0, r2, lsl #3]
  42803. for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
  42804. 8012262: 3301 adds r3, #1
  42805. 8012264: 2b04 cmp r3, #4
  42806. 8012266: ddf8 ble.n 801225a <MQTTCleanSession+0x4>
  42807. }
  42808. 8012268: 4770 bx lr
  42809. 0801226a <MQTTCloseSession>:
  42810. void MQTTCloseSession(MQTTClient* c)
  42811. {
  42812. 801226a: b508 push {r3, lr}
  42813. c->ping_outstanding = 0;
  42814. 801226c: 2300 movs r3, #0
  42815. 801226e: 7703 strb r3, [r0, #28]
  42816. c->isconnected = 0;
  42817. 8012270: 6203 str r3, [r0, #32]
  42818. if (c->cleansession)
  42819. 8012272: 6a43 ldr r3, [r0, #36] @ 0x24
  42820. 8012274: b903 cbnz r3, 8012278 <MQTTCloseSession+0xe>
  42821. MQTTCleanSession(c);
  42822. }
  42823. 8012276: bd08 pop {r3, pc}
  42824. MQTTCleanSession(c);
  42825. 8012278: f7ff ffed bl 8012256 <MQTTCleanSession>
  42826. }
  42827. 801227c: e7fb b.n 8012276 <MQTTCloseSession+0xc>
  42828. 0801227e <cycle>:
  42829. int cycle(MQTTClient* c, Timer* timer)
  42830. {
  42831. 801227e: b570 push {r4, r5, r6, lr}
  42832. 8012280: b08e sub sp, #56 @ 0x38
  42833. 8012282: 4606 mov r6, r0
  42834. 8012284: 460d mov r5, r1
  42835. int len = 0,
  42836. rc = MQTT_SUCCESS;
  42837. int packet_type = readPacket(c, timer); /* read the socket, see what work is due */
  42838. 8012286: f7ff fef1 bl 801206c <readPacket>
  42839. 801228a: 4604 mov r4, r0
  42840. switch (packet_type)
  42841. 801228c: 280d cmp r0, #13
  42842. 801228e: dc41 bgt.n 8012314 <cycle+0x96>
  42843. 8012290: 2804 cmp r0, #4
  42844. 8012292: db0e blt.n 80122b2 <cycle+0x34>
  42845. 8012294: 2301 movs r3, #1
  42846. 8012296: 4083 lsls r3, r0
  42847. 8012298: f413 6f29 tst.w r3, #2704 @ 0xa90
  42848. 801229c: f040 8095 bne.w 80123ca <cycle+0x14c>
  42849. 80122a0: f013 0f60 tst.w r3, #96 @ 0x60
  42850. 80122a4: d16c bne.n 8012380 <cycle+0x102>
  42851. 80122a6: f413 5f00 tst.w r3, #8192 @ 0x2000
  42852. 80122aa: d033 beq.n 8012314 <cycle+0x96>
  42853. }
  42854. case PUBCOMP:
  42855. break;
  42856. case PINGRESP:
  42857. c->ping_outstanding = 0;
  42858. 80122ac: 2500 movs r5, #0
  42859. 80122ae: 7735 strb r5, [r6, #28]
  42860. break;
  42861. 80122b0: e03b b.n 801232a <cycle+0xac>
  42862. switch (packet_type)
  42863. 80122b2: 2803 cmp r0, #3
  42864. 80122b4: d12d bne.n 8012312 <cycle+0x94>
  42865. msg.payloadlen = 0; /* this is a size_t, but deserialize publish sets this as int */
  42866. 80122b6: 2300 movs r3, #0
  42867. 80122b8: 930d str r3, [sp, #52] @ 0x34
  42868. (unsigned char**)&msg.payload, (int*)&msg.payloadlen, c->readbuf, c->readbuf_size) != 1)
  42869. 80122ba: 68f3 ldr r3, [r6, #12]
  42870. if (MQTTDeserialize_publish(&msg.dup, &intQoS, &msg.retained, &msg.id, &topicName,
  42871. 80122bc: 9304 str r3, [sp, #16]
  42872. 80122be: 6973 ldr r3, [r6, #20]
  42873. 80122c0: 9303 str r3, [sp, #12]
  42874. 80122c2: ab0d add r3, sp, #52 @ 0x34
  42875. 80122c4: 9302 str r3, [sp, #8]
  42876. 80122c6: ab0c add r3, sp, #48 @ 0x30
  42877. 80122c8: 9301 str r3, [sp, #4]
  42878. 80122ca: ab07 add r3, sp, #28
  42879. 80122cc: 9300 str r3, [sp, #0]
  42880. 80122ce: ab0b add r3, sp, #44 @ 0x2c
  42881. 80122d0: f10d 0229 add.w r2, sp, #41 @ 0x29
  42882. 80122d4: a906 add r1, sp, #24
  42883. 80122d6: f10d 002a add.w r0, sp, #42 @ 0x2a
  42884. 80122da: f000 fc42 bl 8012b62 <MQTTDeserialize_publish>
  42885. 80122de: 2801 cmp r0, #1
  42886. 80122e0: d11b bne.n 801231a <cycle+0x9c>
  42887. msg.qos = (enum QoS)intQoS;
  42888. 80122e2: f89d 3018 ldrb.w r3, [sp, #24]
  42889. 80122e6: f88d 3028 strb.w r3, [sp, #40] @ 0x28
  42890. deliverMessage(c, &topicName, &msg);
  42891. 80122ea: aa0a add r2, sp, #40 @ 0x28
  42892. 80122ec: a907 add r1, sp, #28
  42893. 80122ee: 4630 mov r0, r6
  42894. 80122f0: f7ff ff3c bl 801216c <deliverMessage>
  42895. if (msg.qos != QOS0)
  42896. 80122f4: f89d 3028 ldrb.w r3, [sp, #40] @ 0x28
  42897. 80122f8: 2b00 cmp r3, #0
  42898. 80122fa: d03f beq.n 801237c <cycle+0xfe>
  42899. if (msg.qos == QOS1)
  42900. 80122fc: 2b01 cmp r3, #1
  42901. 80122fe: d01d beq.n 801233c <cycle+0xbe>
  42902. else if (msg.qos == QOS2)
  42903. 8012300: 2b02 cmp r3, #2
  42904. 8012302: d02d beq.n 8012360 <cycle+0xe2>
  42905. rc = FAILURE;
  42906. 8012304: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  42907. if (rc == FAILURE)
  42908. 8012308: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff
  42909. 801230c: d10d bne.n 801232a <cycle+0xac>
  42910. goto exit;
  42911. 801230e: 462c mov r4, r5
  42912. 8012310: e000 b.n 8012314 <cycle+0x96>
  42913. switch (packet_type)
  42914. 8012312: dd05 ble.n 8012320 <cycle+0xa2>
  42915. }
  42916. exit:
  42917. if (rc == MQTT_SUCCESS)
  42918. rc = packet_type;
  42919. else if (c->isconnected)
  42920. 8012314: 6a33 ldr r3, [r6, #32]
  42921. 8012316: 2b00 cmp r3, #0
  42922. 8012318: d15c bne.n 80123d4 <cycle+0x156>
  42923. MQTTCloseSession(c);
  42924. return rc;
  42925. }
  42926. 801231a: 4620 mov r0, r4
  42927. 801231c: b00e add sp, #56 @ 0x38
  42928. 801231e: bd70 pop {r4, r5, r6, pc}
  42929. switch (packet_type)
  42930. 8012320: 2800 cmp r0, #0
  42931. 8012322: d050 beq.n 80123c6 <cycle+0x148>
  42932. 8012324: 2802 cmp r0, #2
  42933. 8012326: d1f5 bne.n 8012314 <cycle+0x96>
  42934. 8012328: 2500 movs r5, #0
  42935. if (keepalive(c) != MQTT_SUCCESS) {
  42936. 801232a: 4630 mov r0, r6
  42937. 801232c: f7ff ff61 bl 80121f2 <keepalive>
  42938. 8012330: 2800 cmp r0, #0
  42939. 8012332: d14c bne.n 80123ce <cycle+0x150>
  42940. if (rc == MQTT_SUCCESS)
  42941. 8012334: 2d00 cmp r5, #0
  42942. 8012336: d0f0 beq.n 801231a <cycle+0x9c>
  42943. 8012338: 462c mov r4, r5
  42944. 801233a: e7eb b.n 8012314 <cycle+0x96>
  42945. len = MQTTSerialize_ack(c->buf, c->buf_size, PUBACK, 0, msg.id);
  42946. 801233c: f8bd 302c ldrh.w r3, [sp, #44] @ 0x2c
  42947. 8012340: 9300 str r3, [sp, #0]
  42948. 8012342: 2300 movs r3, #0
  42949. 8012344: 2204 movs r2, #4
  42950. 8012346: 68b1 ldr r1, [r6, #8]
  42951. 8012348: 6930 ldr r0, [r6, #16]
  42952. 801234a: f000 fdef bl 8012f2c <MQTTSerialize_ack>
  42953. 801234e: 4601 mov r1, r0
  42954. if (len <= 0)
  42955. 8012350: 2900 cmp r1, #0
  42956. 8012352: dd10 ble.n 8012376 <cycle+0xf8>
  42957. rc = sendPacket(c, len, timer);
  42958. 8012354: 462a mov r2, r5
  42959. 8012356: 4630 mov r0, r6
  42960. 8012358: f7ff fe5d bl 8012016 <sendPacket>
  42961. 801235c: 4605 mov r5, r0
  42962. 801235e: e7d3 b.n 8012308 <cycle+0x8a>
  42963. len = MQTTSerialize_ack(c->buf, c->buf_size, PUBREC, 0, msg.id);
  42964. 8012360: f8bd 302c ldrh.w r3, [sp, #44] @ 0x2c
  42965. 8012364: 9300 str r3, [sp, #0]
  42966. 8012366: 2300 movs r3, #0
  42967. 8012368: 2205 movs r2, #5
  42968. 801236a: 68b1 ldr r1, [r6, #8]
  42969. 801236c: 6930 ldr r0, [r6, #16]
  42970. 801236e: f000 fddd bl 8012f2c <MQTTSerialize_ack>
  42971. 8012372: 4601 mov r1, r0
  42972. 8012374: e7ec b.n 8012350 <cycle+0xd2>
  42973. rc = FAILURE;
  42974. 8012376: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  42975. 801237a: e7c8 b.n 801230e <cycle+0x90>
  42976. rc = MQTT_SUCCESS;
  42977. 801237c: 2500 movs r5, #0
  42978. break;
  42979. 801237e: e7d4 b.n 801232a <cycle+0xac>
  42980. if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
  42981. 8012380: 68f3 ldr r3, [r6, #12]
  42982. 8012382: 9300 str r3, [sp, #0]
  42983. 8012384: 6973 ldr r3, [r6, #20]
  42984. 8012386: aa0a add r2, sp, #40 @ 0x28
  42985. 8012388: a906 add r1, sp, #24
  42986. 801238a: a807 add r0, sp, #28
  42987. 801238c: f000 fc32 bl 8012bf4 <MQTTDeserialize_ack>
  42988. 8012390: 2801 cmp r0, #1
  42989. 8012392: d113 bne.n 80123bc <cycle+0x13e>
  42990. else if ((len = MQTTSerialize_ack(c->buf, c->buf_size,
  42991. 8012394: 6930 ldr r0, [r6, #16]
  42992. 8012396: 68b1 ldr r1, [r6, #8]
  42993. 8012398: 2c05 cmp r4, #5
  42994. 801239a: d012 beq.n 80123c2 <cycle+0x144>
  42995. 801239c: 2207 movs r2, #7
  42996. 801239e: f8bd 3028 ldrh.w r3, [sp, #40] @ 0x28
  42997. 80123a2: 9300 str r3, [sp, #0]
  42998. 80123a4: 2300 movs r3, #0
  42999. 80123a6: f000 fdc1 bl 8012f2c <MQTTSerialize_ack>
  43000. 80123aa: 1e01 subs r1, r0, #0
  43001. 80123ac: dd06 ble.n 80123bc <cycle+0x13e>
  43002. else if ((rc = sendPacket(c, len, timer)) != MQTT_SUCCESS) // send the PUBREL packet
  43003. 80123ae: 462a mov r2, r5
  43004. 80123b0: 4630 mov r0, r6
  43005. 80123b2: f7ff fe30 bl 8012016 <sendPacket>
  43006. 80123b6: 4605 mov r5, r0
  43007. 80123b8: 2800 cmp r0, #0
  43008. 80123ba: d0b6 beq.n 801232a <cycle+0xac>
  43009. goto exit; // there was a problem
  43010. 80123bc: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  43011. 80123c0: e7a8 b.n 8012314 <cycle+0x96>
  43012. else if ((len = MQTTSerialize_ack(c->buf, c->buf_size,
  43013. 80123c2: 2206 movs r2, #6
  43014. 80123c4: e7eb b.n 801239e <cycle+0x120>
  43015. switch (packet_type)
  43016. 80123c6: 4605 mov r5, r0
  43017. 80123c8: e7af b.n 801232a <cycle+0xac>
  43018. 80123ca: 2500 movs r5, #0
  43019. 80123cc: e7ad b.n 801232a <cycle+0xac>
  43020. rc = FAILURE;
  43021. 80123ce: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  43022. 80123d2: e79f b.n 8012314 <cycle+0x96>
  43023. MQTTCloseSession(c);
  43024. 80123d4: 4630 mov r0, r6
  43025. 80123d6: f7ff ff48 bl 801226a <MQTTCloseSession>
  43026. return rc;
  43027. 80123da: e79e b.n 801231a <cycle+0x9c>
  43028. 080123dc <MQTTYield>:
  43029. int MQTTYield(MQTTClient* c, int timeout_ms)
  43030. {
  43031. 80123dc: b530 push {r4, r5, lr}
  43032. 80123de: b083 sub sp, #12
  43033. 80123e0: 4604 mov r4, r0
  43034. 80123e2: 460d mov r5, r1
  43035. int rc = MQTT_SUCCESS;
  43036. Timer timer;
  43037. TimerInit(&timer);
  43038. 80123e4: 4668 mov r0, sp
  43039. 80123e6: f000 fa51 bl 801288c <TimerInit>
  43040. TimerCountdownMS(&timer, timeout_ms);
  43041. 80123ea: 4629 mov r1, r5
  43042. 80123ec: 4668 mov r0, sp
  43043. 80123ee: f000 fa31 bl 8012854 <TimerCountdownMS>
  43044. do
  43045. {
  43046. if (cycle(c, &timer) < 0)
  43047. 80123f2: 4669 mov r1, sp
  43048. 80123f4: 4620 mov r0, r4
  43049. 80123f6: f7ff ff42 bl 801227e <cycle>
  43050. 80123fa: 2800 cmp r0, #0
  43051. 80123fc: db06 blt.n 801240c <MQTTYield+0x30>
  43052. {
  43053. rc = FAILURE;
  43054. break;
  43055. }
  43056. } while (!TimerIsExpired(&timer));
  43057. 80123fe: 4668 mov r0, sp
  43058. 8012400: f000 fa20 bl 8012844 <TimerIsExpired>
  43059. 8012404: 2800 cmp r0, #0
  43060. 8012406: d0f4 beq.n 80123f2 <MQTTYield+0x16>
  43061. int rc = MQTT_SUCCESS;
  43062. 8012408: 2000 movs r0, #0
  43063. 801240a: e001 b.n 8012410 <MQTTYield+0x34>
  43064. rc = FAILURE;
  43065. 801240c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  43066. return rc;
  43067. }
  43068. 8012410: b003 add sp, #12
  43069. 8012412: bd30 pop {r4, r5, pc}
  43070. 08012414 <waitfor>:
  43071. }
  43072. #endif
  43073. int waitfor(MQTTClient* c, int packet_type, Timer* timer)
  43074. {
  43075. 8012414: b5f8 push {r3, r4, r5, r6, r7, lr}
  43076. 8012416: 4607 mov r7, r0
  43077. 8012418: 460e mov r6, r1
  43078. 801241a: 4615 mov r5, r2
  43079. int rc = FAILURE;
  43080. 801241c: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  43081. do
  43082. {
  43083. if (TimerIsExpired(timer))
  43084. 8012420: 4628 mov r0, r5
  43085. 8012422: f000 fa0f bl 8012844 <TimerIsExpired>
  43086. 8012426: b950 cbnz r0, 801243e <waitfor+0x2a>
  43087. break; // we timed out
  43088. rc = cycle(c, timer);
  43089. 8012428: 4629 mov r1, r5
  43090. 801242a: 4638 mov r0, r7
  43091. 801242c: f7ff ff27 bl 801227e <cycle>
  43092. 8012430: 4604 mov r4, r0
  43093. }
  43094. while (rc != packet_type && rc >= 0);
  43095. 8012432: 43c3 mvns r3, r0
  43096. 8012434: 0fdb lsrs r3, r3, #31
  43097. 8012436: 42b0 cmp r0, r6
  43098. 8012438: d001 beq.n 801243e <waitfor+0x2a>
  43099. 801243a: 2b00 cmp r3, #0
  43100. 801243c: d1f0 bne.n 8012420 <waitfor+0xc>
  43101. return rc;
  43102. }
  43103. 801243e: 4620 mov r0, r4
  43104. 8012440: bdf8 pop {r3, r4, r5, r6, r7, pc}
  43105. ...
  43106. 08012444 <MQTTConnectWithResults>:
  43107. int MQTTConnectWithResults(MQTTClient* c, MQTTPacket_connectData* options, MQTTConnackData* data)
  43108. {
  43109. 8012444: b570 push {r4, r5, r6, lr}
  43110. 8012446: b098 sub sp, #96 @ 0x60
  43111. 8012448: 4604 mov r4, r0
  43112. 801244a: 460d mov r5, r1
  43113. 801244c: 4616 mov r6, r2
  43114. Timer connect_timer;
  43115. int rc = FAILURE;
  43116. MQTTPacket_connectData default_options = MQTTPacket_connectData_initializer;
  43117. 801244e: 2258 movs r2, #88 @ 0x58
  43118. 8012450: 492c ldr r1, [pc, #176] @ (8012504 <MQTTConnectWithResults+0xc0>)
  43119. 8012452: 4668 mov r0, sp
  43120. 8012454: f001 fa15 bl 8013882 <memcpy>
  43121. int len = 0;
  43122. #if defined(MQTT_TASK)
  43123. MutexLock(&c->mutex);
  43124. #endif
  43125. osMutexAcquire(mqttMutex, osWaitForever);
  43126. 8012458: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
  43127. 801245c: 4b2a ldr r3, [pc, #168] @ (8012508 <MQTTConnectWithResults+0xc4>)
  43128. 801245e: 6818 ldr r0, [r3, #0]
  43129. 8012460: f7f1 fd78 bl 8003f54 <osMutexAcquire>
  43130. if (c->isconnected) /* don't send connect packet again if we are already connected */
  43131. 8012464: 6a23 ldr r3, [r4, #32]
  43132. 8012466: 2b00 cmp r3, #0
  43133. 8012468: d140 bne.n 80124ec <MQTTConnectWithResults+0xa8>
  43134. goto exit;
  43135. TimerInit(&connect_timer);
  43136. 801246a: a816 add r0, sp, #88 @ 0x58
  43137. 801246c: f000 fa0e bl 801288c <TimerInit>
  43138. TimerCountdownMS(&connect_timer, c->command_timeout_ms);
  43139. 8012470: 6861 ldr r1, [r4, #4]
  43140. 8012472: a816 add r0, sp, #88 @ 0x58
  43141. 8012474: f000 f9ee bl 8012854 <TimerCountdownMS>
  43142. if (options == 0)
  43143. 8012478: b1dd cbz r5, 80124b2 <MQTTConnectWithResults+0x6e>
  43144. options = &default_options; /* set default options if none were supplied */
  43145. c->keepAliveInterval = options->keepAliveInterval;
  43146. 801247a: 8b29 ldrh r1, [r5, #24]
  43147. 801247c: 61a1 str r1, [r4, #24]
  43148. c->cleansession = options->cleansession;
  43149. 801247e: 7eab ldrb r3, [r5, #26]
  43150. 8012480: 6263 str r3, [r4, #36] @ 0x24
  43151. TimerCountdown(&c->last_received, c->keepAliveInterval);
  43152. 8012482: f104 0060 add.w r0, r4, #96 @ 0x60
  43153. 8012486: f000 f9ed bl 8012864 <TimerCountdown>
  43154. if ((len = MQTTSerialize_connect(c->buf, c->buf_size, options)) <= 0)
  43155. 801248a: 462a mov r2, r5
  43156. 801248c: 68a1 ldr r1, [r4, #8]
  43157. 801248e: 6920 ldr r0, [r4, #16]
  43158. 8012490: f000 fa8c bl 80129ac <MQTTSerialize_connect>
  43159. 8012494: 1e01 subs r1, r0, #0
  43160. 8012496: dd2c ble.n 80124f2 <MQTTConnectWithResults+0xae>
  43161. goto exit;
  43162. if ((rc = sendPacket(c, len, &connect_timer)) != MQTT_SUCCESS) // send the connect packet
  43163. 8012498: aa16 add r2, sp, #88 @ 0x58
  43164. 801249a: 4620 mov r0, r4
  43165. 801249c: f7ff fdbb bl 8012016 <sendPacket>
  43166. 80124a0: 4605 mov r5, r0
  43167. 80124a2: b140 cbz r0, 80124b6 <MQTTConnectWithResults+0x72>
  43168. }
  43169. #if defined(MQTT_TASK)
  43170. MutexUnlock(&c->mutex);
  43171. #endif
  43172. osMutexRelease(mqttMutex);
  43173. 80124a4: 4b18 ldr r3, [pc, #96] @ (8012508 <MQTTConnectWithResults+0xc4>)
  43174. 80124a6: 6818 ldr r0, [r3, #0]
  43175. 80124a8: f7f1 fd83 bl 8003fb2 <osMutexRelease>
  43176. return rc;
  43177. }
  43178. 80124ac: 4628 mov r0, r5
  43179. 80124ae: b018 add sp, #96 @ 0x60
  43180. 80124b0: bd70 pop {r4, r5, r6, pc}
  43181. options = &default_options; /* set default options if none were supplied */
  43182. 80124b2: 466d mov r5, sp
  43183. 80124b4: e7e1 b.n 801247a <MQTTConnectWithResults+0x36>
  43184. if (waitfor(c, CONNACK, &connect_timer) == CONNACK)
  43185. 80124b6: aa16 add r2, sp, #88 @ 0x58
  43186. 80124b8: 2102 movs r1, #2
  43187. 80124ba: 4620 mov r0, r4
  43188. 80124bc: f7ff ffaa bl 8012414 <waitfor>
  43189. 80124c0: 2802 cmp r0, #2
  43190. 80124c2: d119 bne.n 80124f8 <MQTTConnectWithResults+0xb4>
  43191. data->rc = 0;
  43192. 80124c4: 2300 movs r3, #0
  43193. 80124c6: 7033 strb r3, [r6, #0]
  43194. data->sessionPresent = 0;
  43195. 80124c8: 4630 mov r0, r6
  43196. 80124ca: f800 3f01 strb.w r3, [r0, #1]!
  43197. if (MQTTDeserialize_connack(&data->sessionPresent, &data->rc, c->readbuf, c->readbuf_size) == 1)
  43198. 80124ce: 68e3 ldr r3, [r4, #12]
  43199. 80124d0: 6962 ldr r2, [r4, #20]
  43200. 80124d2: 4631 mov r1, r6
  43201. 80124d4: f000 fafc bl 8012ad0 <MQTTDeserialize_connack>
  43202. 80124d8: 2801 cmp r0, #1
  43203. 80124da: d110 bne.n 80124fe <MQTTConnectWithResults+0xba>
  43204. rc = data->rc;
  43205. 80124dc: 7835 ldrb r5, [r6, #0]
  43206. if (rc == MQTT_SUCCESS)
  43207. 80124de: 2d00 cmp r5, #0
  43208. 80124e0: d1e0 bne.n 80124a4 <MQTTConnectWithResults+0x60>
  43209. c->isconnected = 1;
  43210. 80124e2: 2301 movs r3, #1
  43211. 80124e4: 6223 str r3, [r4, #32]
  43212. c->ping_outstanding = 0;
  43213. 80124e6: 2300 movs r3, #0
  43214. 80124e8: 7723 strb r3, [r4, #28]
  43215. 80124ea: e7db b.n 80124a4 <MQTTConnectWithResults+0x60>
  43216. int rc = FAILURE;
  43217. 80124ec: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  43218. 80124f0: e7d8 b.n 80124a4 <MQTTConnectWithResults+0x60>
  43219. 80124f2: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  43220. 80124f6: e7d5 b.n 80124a4 <MQTTConnectWithResults+0x60>
  43221. rc = FAILURE;
  43222. 80124f8: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  43223. 80124fc: e7d2 b.n 80124a4 <MQTTConnectWithResults+0x60>
  43224. rc = FAILURE;
  43225. 80124fe: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  43226. 8012502: e7cf b.n 80124a4 <MQTTConnectWithResults+0x60>
  43227. 8012504: 080142d0 .word 0x080142d0
  43228. 8012508: 24019c44 .word 0x24019c44
  43229. 0801250c <MQTTConnect>:
  43230. int MQTTConnect(MQTTClient* c, MQTTPacket_connectData* options)
  43231. {
  43232. 801250c: b500 push {lr}
  43233. 801250e: b083 sub sp, #12
  43234. MQTTConnackData data;
  43235. return MQTTConnectWithResults(c, options, &data);
  43236. 8012510: aa01 add r2, sp, #4
  43237. 8012512: f7ff ff97 bl 8012444 <MQTTConnectWithResults>
  43238. }
  43239. 8012516: b003 add sp, #12
  43240. 8012518: f85d fb04 ldr.w pc, [sp], #4
  43241. 0801251c <MQTTSetMessageHandler>:
  43242. int MQTTSetMessageHandler(MQTTClient* c, const char* topicFilter, messageHandler messageHandler)
  43243. {
  43244. 801251c: b5f8 push {r3, r4, r5, r6, r7, lr}
  43245. 801251e: 4605 mov r5, r0
  43246. 8012520: 460f mov r7, r1
  43247. 8012522: 4616 mov r6, r2
  43248. int rc = FAILURE;
  43249. int i = -1;
  43250. /* first check for an existing matching slot */
  43251. for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
  43252. 8012524: 2400 movs r4, #0
  43253. 8012526: e000 b.n 801252a <MQTTSetMessageHandler+0xe>
  43254. 8012528: 3401 adds r4, #1
  43255. 801252a: 2c04 cmp r4, #4
  43256. 801252c: dc13 bgt.n 8012556 <MQTTSetMessageHandler+0x3a>
  43257. {
  43258. if (c->messageHandlers[i].topicFilter != NULL && strcmp(c->messageHandlers[i].topicFilter, topicFilter) == 0)
  43259. 801252e: 1d63 adds r3, r4, #5
  43260. 8012530: f855 0033 ldr.w r0, [r5, r3, lsl #3]
  43261. 8012534: 2800 cmp r0, #0
  43262. 8012536: d0f7 beq.n 8012528 <MQTTSetMessageHandler+0xc>
  43263. 8012538: 4639 mov r1, r7
  43264. 801253a: f7ed fed1 bl 80002e0 <strcmp>
  43265. 801253e: 4603 mov r3, r0
  43266. 8012540: 2800 cmp r0, #0
  43267. 8012542: d1f1 bne.n 8012528 <MQTTSetMessageHandler+0xc>
  43268. {
  43269. if (messageHandler == NULL) /* remove existing */
  43270. 8012544: b956 cbnz r6, 801255c <MQTTSetMessageHandler+0x40>
  43271. {
  43272. c->messageHandlers[i].topicFilter = NULL;
  43273. 8012546: 1d62 adds r2, r4, #5
  43274. 8012548: 2100 movs r1, #0
  43275. 801254a: f845 1032 str.w r1, [r5, r2, lsl #3]
  43276. c->messageHandlers[i].fp = NULL;
  43277. 801254e: eb05 02c2 add.w r2, r5, r2, lsl #3
  43278. 8012552: 6051 str r1, [r2, #4]
  43279. }
  43280. rc = MQTT_SUCCESS; /* return i when adding new subscription */
  43281. break;
  43282. 8012554: e001 b.n 801255a <MQTTSetMessageHandler+0x3e>
  43283. int rc = FAILURE;
  43284. 8012556: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff
  43285. }
  43286. }
  43287. /* if no existing, look for empty slot (unless we are removing) */
  43288. if (messageHandler != NULL) {
  43289. 801255a: b156 cbz r6, 8012572 <MQTTSetMessageHandler+0x56>
  43290. if (rc == FAILURE)
  43291. 801255c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff
  43292. 8012560: d009 beq.n 8012576 <MQTTSetMessageHandler+0x5a>
  43293. rc = MQTT_SUCCESS;
  43294. break;
  43295. }
  43296. }
  43297. }
  43298. if (i < MAX_MESSAGE_HANDLERS)
  43299. 8012562: 2c04 cmp r4, #4
  43300. 8012564: dc05 bgt.n 8012572 <MQTTSetMessageHandler+0x56>
  43301. {
  43302. c->messageHandlers[i].topicFilter = topicFilter;
  43303. 8012566: 3405 adds r4, #5
  43304. 8012568: f845 7034 str.w r7, [r5, r4, lsl #3]
  43305. c->messageHandlers[i].fp = messageHandler;
  43306. 801256c: eb05 05c4 add.w r5, r5, r4, lsl #3
  43307. 8012570: 606e str r6, [r5, #4]
  43308. }
  43309. }
  43310. return rc;
  43311. }
  43312. 8012572: 4618 mov r0, r3
  43313. 8012574: bdf8 pop {r3, r4, r5, r6, r7, pc}
  43314. for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
  43315. 8012576: 2400 movs r4, #0
  43316. 8012578: 2c04 cmp r4, #4
  43317. 801257a: dcf2 bgt.n 8012562 <MQTTSetMessageHandler+0x46>
  43318. if (c->messageHandlers[i].topicFilter == NULL)
  43319. 801257c: 1d62 adds r2, r4, #5
  43320. 801257e: f855 2032 ldr.w r2, [r5, r2, lsl #3]
  43321. 8012582: b10a cbz r2, 8012588 <MQTTSetMessageHandler+0x6c>
  43322. for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i)
  43323. 8012584: 3401 adds r4, #1
  43324. 8012586: e7f7 b.n 8012578 <MQTTSetMessageHandler+0x5c>
  43325. rc = MQTT_SUCCESS;
  43326. 8012588: 2300 movs r3, #0
  43327. 801258a: e7ea b.n 8012562 <MQTTSetMessageHandler+0x46>
  43328. 0801258c <MQTTSubscribeWithResults>:
  43329. int MQTTSubscribeWithResults(MQTTClient* c, const char* topicFilter, enum QoS qos,
  43330. messageHandler messageHandler, MQTTSubackData* data)
  43331. {
  43332. 801258c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  43333. 8012590: b08e sub sp, #56 @ 0x38
  43334. 8012592: 4604 mov r4, r0
  43335. 8012594: 460d mov r5, r1
  43336. 8012596: 461e mov r6, r3
  43337. 8012598: f88d 2017 strb.w r2, [sp, #23]
  43338. int rc = FAILURE;
  43339. Timer timer;
  43340. int len = 0;
  43341. MQTTString topic = MQTTString_initializer;
  43342. 801259c: 2200 movs r2, #0
  43343. 801259e: 9209 str r2, [sp, #36] @ 0x24
  43344. 80125a0: 920a str r2, [sp, #40] @ 0x28
  43345. 80125a2: 920b str r2, [sp, #44] @ 0x2c
  43346. topic.cstring = (char *)topicFilter;
  43347. 80125a4: 9109 str r1, [sp, #36] @ 0x24
  43348. #if defined(MQTT_TASK)
  43349. MutexLock(&c->mutex);
  43350. #endif
  43351. osMutexAcquire(mqttMutex, osWaitForever);
  43352. 80125a6: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
  43353. 80125aa: 4b31 ldr r3, [pc, #196] @ (8012670 <MQTTSubscribeWithResults+0xe4>)
  43354. 80125ac: 6818 ldr r0, [r3, #0]
  43355. 80125ae: f7f1 fcd1 bl 8003f54 <osMutexAcquire>
  43356. if (!c->isconnected)
  43357. 80125b2: 6a23 ldr r3, [r4, #32]
  43358. 80125b4: b963 cbnz r3, 80125d0 <MQTTSubscribeWithResults+0x44>
  43359. int rc = FAILURE;
  43360. 80125b6: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
  43361. else
  43362. rc = FAILURE;
  43363. exit:
  43364. if (rc == FAILURE)
  43365. MQTTCloseSession(c);
  43366. 80125ba: 4620 mov r0, r4
  43367. 80125bc: f7ff fe55 bl 801226a <MQTTCloseSession>
  43368. #if defined(MQTT_TASK)
  43369. MutexUnlock(&c->mutex);
  43370. #endif
  43371. osMutexRelease(mqttMutex);
  43372. 80125c0: 4b2b ldr r3, [pc, #172] @ (8012670 <MQTTSubscribeWithResults+0xe4>)
  43373. 80125c2: 6818 ldr r0, [r3, #0]
  43374. 80125c4: f7f1 fcf5 bl 8003fb2 <osMutexRelease>
  43375. return rc;
  43376. }
  43377. 80125c8: 4638 mov r0, r7
  43378. 80125ca: b00e add sp, #56 @ 0x38
  43379. 80125cc: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  43380. TimerInit(&timer);
  43381. 80125d0: a80c add r0, sp, #48 @ 0x30
  43382. 80125d2: f000 f95b bl 801288c <TimerInit>
  43383. TimerCountdownMS(&timer, c->command_timeout_ms);
  43384. 80125d6: 6861 ldr r1, [r4, #4]
  43385. 80125d8: a80c add r0, sp, #48 @ 0x30
  43386. 80125da: f000 f93b bl 8012854 <TimerCountdownMS>
  43387. len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, (int*)&qos);
  43388. 80125de: 6927 ldr r7, [r4, #16]
  43389. 80125e0: f8d4 8008 ldr.w r8, [r4, #8]
  43390. 80125e4: 4620 mov r0, r4
  43391. 80125e6: f7ff fcb4 bl 8011f52 <getNextPacketId>
  43392. 80125ea: f10d 0317 add.w r3, sp, #23
  43393. 80125ee: 9302 str r3, [sp, #8]
  43394. 80125f0: ab09 add r3, sp, #36 @ 0x24
  43395. 80125f2: 9301 str r3, [sp, #4]
  43396. 80125f4: 2301 movs r3, #1
  43397. 80125f6: 9300 str r3, [sp, #0]
  43398. 80125f8: b283 uxth r3, r0
  43399. 80125fa: 2200 movs r2, #0
  43400. 80125fc: 4641 mov r1, r8
  43401. 80125fe: 4638 mov r0, r7
  43402. 8012600: f000 fcd1 bl 8012fa6 <MQTTSerialize_subscribe>
  43403. if (len <= 0)
  43404. 8012604: 1e01 subs r1, r0, #0
  43405. 8012606: dd2f ble.n 8012668 <MQTTSubscribeWithResults+0xdc>
  43406. if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet
  43407. 8012608: aa0c add r2, sp, #48 @ 0x30
  43408. 801260a: 4620 mov r0, r4
  43409. 801260c: f7ff fd03 bl 8012016 <sendPacket>
  43410. 8012610: 4607 mov r7, r0
  43411. 8012612: b118 cbz r0, 801261c <MQTTSubscribeWithResults+0x90>
  43412. if (rc == FAILURE)
  43413. 8012614: f1b7 3fff cmp.w r7, #4294967295 @ 0xffffffff
  43414. 8012618: d1d2 bne.n 80125c0 <MQTTSubscribeWithResults+0x34>
  43415. 801261a: e7ce b.n 80125ba <MQTTSubscribeWithResults+0x2e>
  43416. if (waitfor(c, SUBACK, &timer) == SUBACK) // wait for suback
  43417. 801261c: aa0c add r2, sp, #48 @ 0x30
  43418. 801261e: 2109 movs r1, #9
  43419. 8012620: 4620 mov r0, r4
  43420. 8012622: f7ff fef7 bl 8012414 <waitfor>
  43421. 8012626: 2809 cmp r0, #9
  43422. 8012628: d002 beq.n 8012630 <MQTTSubscribeWithResults+0xa4>
  43423. rc = FAILURE;
  43424. 801262a: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
  43425. 801262e: e7c4 b.n 80125ba <MQTTSubscribeWithResults+0x2e>
  43426. int count = 0;
  43427. 8012630: 2300 movs r3, #0
  43428. 8012632: 9308 str r3, [sp, #32]
  43429. data->grantedQoS = QOS0;
  43430. 8012634: 9a14 ldr r2, [sp, #80] @ 0x50
  43431. 8012636: 7013 strb r3, [r2, #0]
  43432. if (MQTTDeserialize_suback(&mypacketid, 1, &count, (int*)&data->grantedQoS, c->readbuf, c->readbuf_size) == 1)
  43433. 8012638: 68e3 ldr r3, [r4, #12]
  43434. 801263a: 9301 str r3, [sp, #4]
  43435. 801263c: 6963 ldr r3, [r4, #20]
  43436. 801263e: 9300 str r3, [sp, #0]
  43437. 8012640: 4613 mov r3, r2
  43438. 8012642: aa08 add r2, sp, #32
  43439. 8012644: 2101 movs r1, #1
  43440. 8012646: f10d 001e add.w r0, sp, #30
  43441. 801264a: f000 fcf6 bl 801303a <MQTTDeserialize_suback>
  43442. 801264e: 2801 cmp r0, #1
  43443. 8012650: d1e0 bne.n 8012614 <MQTTSubscribeWithResults+0x88>
  43444. if (data->grantedQoS != 0x80)
  43445. 8012652: 9b14 ldr r3, [sp, #80] @ 0x50
  43446. 8012654: 781b ldrb r3, [r3, #0]
  43447. 8012656: 2b80 cmp r3, #128 @ 0x80
  43448. 8012658: d0dc beq.n 8012614 <MQTTSubscribeWithResults+0x88>
  43449. rc = MQTTSetMessageHandler(c, topicFilter, messageHandler);
  43450. 801265a: 4632 mov r2, r6
  43451. 801265c: 4629 mov r1, r5
  43452. 801265e: 4620 mov r0, r4
  43453. 8012660: f7ff ff5c bl 801251c <MQTTSetMessageHandler>
  43454. 8012664: 4607 mov r7, r0
  43455. 8012666: e7d5 b.n 8012614 <MQTTSubscribeWithResults+0x88>
  43456. int rc = FAILURE;
  43457. 8012668: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
  43458. 801266c: e7a5 b.n 80125ba <MQTTSubscribeWithResults+0x2e>
  43459. 801266e: bf00 nop
  43460. 8012670: 24019c44 .word 0x24019c44
  43461. 08012674 <MQTTSubscribe>:
  43462. int MQTTSubscribe(MQTTClient* c, const char* topicFilter, enum QoS qos,
  43463. messageHandler messageHandler)
  43464. {
  43465. 8012674: b510 push {r4, lr}
  43466. 8012676: b084 sub sp, #16
  43467. MQTTSubackData data;
  43468. return MQTTSubscribeWithResults(c, topicFilter, qos, messageHandler, &data);
  43469. 8012678: ac03 add r4, sp, #12
  43470. 801267a: 9400 str r4, [sp, #0]
  43471. 801267c: f7ff ff86 bl 801258c <MQTTSubscribeWithResults>
  43472. }
  43473. 8012680: b004 add sp, #16
  43474. 8012682: bd10 pop {r4, pc}
  43475. 08012684 <MQTTPublish>:
  43476. return rc;
  43477. }
  43478. int MQTTPublish(MQTTClient* c, const char* topicName, MQTTMessage* message)
  43479. {
  43480. 8012684: b570 push {r4, r5, r6, lr}
  43481. 8012686: b08e sub sp, #56 @ 0x38
  43482. 8012688: 4604 mov r4, r0
  43483. 801268a: 4615 mov r5, r2
  43484. int rc = FAILURE;
  43485. Timer timer;
  43486. MQTTString topic = MQTTString_initializer;
  43487. 801268c: 2300 movs r3, #0
  43488. 801268e: 9309 str r3, [sp, #36] @ 0x24
  43489. 8012690: 930a str r3, [sp, #40] @ 0x28
  43490. 8012692: 930b str r3, [sp, #44] @ 0x2c
  43491. topic.cstring = (char *)topicName;
  43492. 8012694: 9109 str r1, [sp, #36] @ 0x24
  43493. int len = 0;
  43494. #if defined(MQTT_TASK)
  43495. MutexLock(&c->mutex);
  43496. #endif
  43497. osMutexAcquire(mqttMutex, osWaitForever);
  43498. 8012696: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
  43499. 801269a: 4b3e ldr r3, [pc, #248] @ (8012794 <MQTTPublish+0x110>)
  43500. 801269c: 6818 ldr r0, [r3, #0]
  43501. 801269e: f7f1 fc59 bl 8003f54 <osMutexAcquire>
  43502. if (!c->isconnected)
  43503. 80126a2: 6a23 ldr r3, [r4, #32]
  43504. 80126a4: b95b cbnz r3, 80126be <MQTTPublish+0x3a>
  43505. int rc = FAILURE;
  43506. 80126a6: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  43507. rc = FAILURE;
  43508. }
  43509. exit:
  43510. if (rc == FAILURE)
  43511. MQTTCloseSession(c);
  43512. 80126aa: 4620 mov r0, r4
  43513. 80126ac: f7ff fddd bl 801226a <MQTTCloseSession>
  43514. #if defined(MQTT_TASK)
  43515. MutexUnlock(&c->mutex);
  43516. #endif
  43517. osMutexRelease(mqttMutex);
  43518. 80126b0: 4b38 ldr r3, [pc, #224] @ (8012794 <MQTTPublish+0x110>)
  43519. 80126b2: 6818 ldr r0, [r3, #0]
  43520. 80126b4: f7f1 fc7d bl 8003fb2 <osMutexRelease>
  43521. return rc;
  43522. }
  43523. 80126b8: 4630 mov r0, r6
  43524. 80126ba: b00e add sp, #56 @ 0x38
  43525. 80126bc: bd70 pop {r4, r5, r6, pc}
  43526. TimerInit(&timer);
  43527. 80126be: a80c add r0, sp, #48 @ 0x30
  43528. 80126c0: f000 f8e4 bl 801288c <TimerInit>
  43529. TimerCountdownMS(&timer, c->command_timeout_ms);
  43530. 80126c4: 6861 ldr r1, [r4, #4]
  43531. 80126c6: a80c add r0, sp, #48 @ 0x30
  43532. 80126c8: f000 f8c4 bl 8012854 <TimerCountdownMS>
  43533. if (message->qos == QOS1 || message->qos == QOS2)
  43534. 80126cc: 782b ldrb r3, [r5, #0]
  43535. 80126ce: 3b01 subs r3, #1
  43536. 80126d0: b2db uxtb r3, r3
  43537. 80126d2: 2b01 cmp r3, #1
  43538. 80126d4: d923 bls.n 801271e <MQTTPublish+0x9a>
  43539. topic, (unsigned char*)message->payload, message->payloadlen);
  43540. 80126d6: 68ab ldr r3, [r5, #8]
  43541. 80126d8: 68ea ldr r2, [r5, #12]
  43542. len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id,
  43543. 80126da: 9206 str r2, [sp, #24]
  43544. 80126dc: 9305 str r3, [sp, #20]
  43545. 80126de: ab02 add r3, sp, #8
  43546. 80126e0: aa09 add r2, sp, #36 @ 0x24
  43547. 80126e2: ca07 ldmia r2, {r0, r1, r2}
  43548. 80126e4: e883 0007 stmia.w r3, {r0, r1, r2}
  43549. 80126e8: 88ab ldrh r3, [r5, #4]
  43550. 80126ea: 9301 str r3, [sp, #4]
  43551. 80126ec: 786b ldrb r3, [r5, #1]
  43552. 80126ee: 9300 str r3, [sp, #0]
  43553. 80126f0: 782b ldrb r3, [r5, #0]
  43554. 80126f2: 2200 movs r2, #0
  43555. 80126f4: 68a1 ldr r1, [r4, #8]
  43556. 80126f6: 6920 ldr r0, [r4, #16]
  43557. 80126f8: f000 fbcf bl 8012e9a <MQTTSerialize_publish>
  43558. if (len <= 0)
  43559. 80126fc: 1e01 subs r1, r0, #0
  43560. 80126fe: dd45 ble.n 801278c <MQTTPublish+0x108>
  43561. if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet
  43562. 8012700: aa0c add r2, sp, #48 @ 0x30
  43563. 8012702: 4620 mov r0, r4
  43564. 8012704: f7ff fc87 bl 8012016 <sendPacket>
  43565. 8012708: 4606 mov r6, r0
  43566. 801270a: b920 cbnz r0, 8012716 <MQTTPublish+0x92>
  43567. if (message->qos == QOS1)
  43568. 801270c: 782b ldrb r3, [r5, #0]
  43569. 801270e: 2b01 cmp r3, #1
  43570. 8012710: d00a beq.n 8012728 <MQTTPublish+0xa4>
  43571. else if (message->qos == QOS2)
  43572. 8012712: 2b02 cmp r3, #2
  43573. 8012714: d021 beq.n 801275a <MQTTPublish+0xd6>
  43574. if (rc == FAILURE)
  43575. 8012716: f1b6 3fff cmp.w r6, #4294967295 @ 0xffffffff
  43576. 801271a: d1c9 bne.n 80126b0 <MQTTPublish+0x2c>
  43577. 801271c: e7c5 b.n 80126aa <MQTTPublish+0x26>
  43578. message->id = getNextPacketId(c);
  43579. 801271e: 4620 mov r0, r4
  43580. 8012720: f7ff fc17 bl 8011f52 <getNextPacketId>
  43581. 8012724: 80a8 strh r0, [r5, #4]
  43582. 8012726: e7d6 b.n 80126d6 <MQTTPublish+0x52>
  43583. if (waitfor(c, PUBACK, &timer) == PUBACK)
  43584. 8012728: aa0c add r2, sp, #48 @ 0x30
  43585. 801272a: 2104 movs r1, #4
  43586. 801272c: 4620 mov r0, r4
  43587. 801272e: f7ff fe71 bl 8012414 <waitfor>
  43588. 8012732: 2804 cmp r0, #4
  43589. 8012734: d002 beq.n 801273c <MQTTPublish+0xb8>
  43590. rc = FAILURE;
  43591. 8012736: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  43592. 801273a: e7b6 b.n 80126aa <MQTTPublish+0x26>
  43593. if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
  43594. 801273c: 68e3 ldr r3, [r4, #12]
  43595. 801273e: 9300 str r3, [sp, #0]
  43596. 8012740: 6963 ldr r3, [r4, #20]
  43597. 8012742: f10d 0222 add.w r2, sp, #34 @ 0x22
  43598. 8012746: a908 add r1, sp, #32
  43599. 8012748: f10d 0021 add.w r0, sp, #33 @ 0x21
  43600. 801274c: f000 fa52 bl 8012bf4 <MQTTDeserialize_ack>
  43601. 8012750: 2801 cmp r0, #1
  43602. 8012752: d0e0 beq.n 8012716 <MQTTPublish+0x92>
  43603. rc = FAILURE;
  43604. 8012754: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  43605. 8012758: e7a7 b.n 80126aa <MQTTPublish+0x26>
  43606. if (waitfor(c, PUBCOMP, &timer) == PUBCOMP)
  43607. 801275a: aa0c add r2, sp, #48 @ 0x30
  43608. 801275c: 2107 movs r1, #7
  43609. 801275e: 4620 mov r0, r4
  43610. 8012760: f7ff fe58 bl 8012414 <waitfor>
  43611. 8012764: 2807 cmp r0, #7
  43612. 8012766: d002 beq.n 801276e <MQTTPublish+0xea>
  43613. rc = FAILURE;
  43614. 8012768: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  43615. 801276c: e79d b.n 80126aa <MQTTPublish+0x26>
  43616. if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
  43617. 801276e: 68e3 ldr r3, [r4, #12]
  43618. 8012770: 9300 str r3, [sp, #0]
  43619. 8012772: 6963 ldr r3, [r4, #20]
  43620. 8012774: f10d 0222 add.w r2, sp, #34 @ 0x22
  43621. 8012778: a908 add r1, sp, #32
  43622. 801277a: f10d 0021 add.w r0, sp, #33 @ 0x21
  43623. 801277e: f000 fa39 bl 8012bf4 <MQTTDeserialize_ack>
  43624. 8012782: 2801 cmp r0, #1
  43625. 8012784: d0c7 beq.n 8012716 <MQTTPublish+0x92>
  43626. rc = FAILURE;
  43627. 8012786: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  43628. 801278a: e78e b.n 80126aa <MQTTPublish+0x26>
  43629. int rc = FAILURE;
  43630. 801278c: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff
  43631. 8012790: e78b b.n 80126aa <MQTTPublish+0x26>
  43632. 8012792: bf00 nop
  43633. 8012794: 24019c44 .word 0x24019c44
  43634. 08012798 <MQTTDisconnect>:
  43635. int MQTTDisconnect(MQTTClient* c)
  43636. {
  43637. 8012798: b530 push {r4, r5, lr}
  43638. 801279a: b083 sub sp, #12
  43639. 801279c: 4604 mov r4, r0
  43640. int len = 0;
  43641. #if defined(MQTT_TASK)
  43642. MutexLock(&c->mutex);
  43643. #endif
  43644. osMutexAcquire(mqttMutex, osWaitForever);
  43645. 801279e: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff
  43646. 80127a2: 4b11 ldr r3, [pc, #68] @ (80127e8 <MQTTDisconnect+0x50>)
  43647. 80127a4: 6818 ldr r0, [r3, #0]
  43648. 80127a6: f7f1 fbd5 bl 8003f54 <osMutexAcquire>
  43649. TimerInit(&timer);
  43650. 80127aa: 4668 mov r0, sp
  43651. 80127ac: f000 f86e bl 801288c <TimerInit>
  43652. TimerCountdownMS(&timer, c->command_timeout_ms);
  43653. 80127b0: 6861 ldr r1, [r4, #4]
  43654. 80127b2: 4668 mov r0, sp
  43655. 80127b4: f000 f84e bl 8012854 <TimerCountdownMS>
  43656. len = MQTTSerialize_disconnect(c->buf, c->buf_size);
  43657. 80127b8: 68a1 ldr r1, [r4, #8]
  43658. 80127ba: 6920 ldr r0, [r4, #16]
  43659. 80127bc: f000 f9c7 bl 8012b4e <MQTTSerialize_disconnect>
  43660. if (len > 0)
  43661. 80127c0: 1e01 subs r1, r0, #0
  43662. 80127c2: dd0e ble.n 80127e2 <MQTTDisconnect+0x4a>
  43663. rc = sendPacket(c, len, &timer); // send the disconnect packet
  43664. 80127c4: 466a mov r2, sp
  43665. 80127c6: 4620 mov r0, r4
  43666. 80127c8: f7ff fc25 bl 8012016 <sendPacket>
  43667. 80127cc: 4605 mov r5, r0
  43668. MQTTCloseSession(c);
  43669. 80127ce: 4620 mov r0, r4
  43670. 80127d0: f7ff fd4b bl 801226a <MQTTCloseSession>
  43671. #if defined(MQTT_TASK)
  43672. MutexUnlock(&c->mutex);
  43673. #endif
  43674. osMutexRelease(mqttMutex);
  43675. 80127d4: 4b04 ldr r3, [pc, #16] @ (80127e8 <MQTTDisconnect+0x50>)
  43676. 80127d6: 6818 ldr r0, [r3, #0]
  43677. 80127d8: f7f1 fbeb bl 8003fb2 <osMutexRelease>
  43678. return rc;
  43679. }
  43680. 80127dc: 4628 mov r0, r5
  43681. 80127de: b003 add sp, #12
  43682. 80127e0: bd30 pop {r4, r5, pc}
  43683. int rc = FAILURE;
  43684. 80127e2: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  43685. 80127e6: e7f2 b.n 80127ce <MQTTDisconnect+0x36>
  43686. 80127e8: 24019c44 .word 0x24019c44
  43687. 080127ec <net_disconnect>:
  43688. int net_write(Network *n, unsigned char *buffer, int len, int timeout_ms) {
  43689. return send(n->socket, buffer, len, 0);
  43690. }
  43691. void net_disconnect(Network *n) {
  43692. 80127ec: b510 push {r4, lr}
  43693. 80127ee: 4604 mov r4, r0
  43694. close(n->socket);
  43695. 80127f0: 6800 ldr r0, [r0, #0]
  43696. 80127f2: f7fa f919 bl 800ca28 <lwip_close>
  43697. n->socket = 0;
  43698. 80127f6: 2300 movs r3, #0
  43699. 80127f8: 6023 str r3, [r4, #0]
  43700. }
  43701. 80127fa: bd10 pop {r4, pc}
  43702. 080127fc <net_read>:
  43703. int net_read(Network *n, unsigned char *buffer, int len, int timeout_ms) {
  43704. 80127fc: b570 push {r4, r5, r6, lr}
  43705. 80127fe: b082 sub sp, #8
  43706. 8012800: 4604 mov r4, r0
  43707. 8012802: 460d mov r5, r1
  43708. 8012804: 4616 mov r6, r2
  43709. if(ioctl(n->socket, FIONREAD, &available) < 0) return -1; //check receive buffer
  43710. 8012806: aa01 add r2, sp, #4
  43711. 8012808: 490a ldr r1, [pc, #40] @ (8012834 <net_read+0x38>)
  43712. 801280a: 6800 ldr r0, [r0, #0]
  43713. 801280c: f7fa fb02 bl 800ce14 <lwip_ioctl>
  43714. 8012810: 2800 cmp r0, #0
  43715. 8012812: db0c blt.n 801282e <net_read+0x32>
  43716. if(available > 0)
  43717. 8012814: 9b01 ldr r3, [sp, #4]
  43718. 8012816: 2b00 cmp r3, #0
  43719. 8012818: dc02 bgt.n 8012820 <net_read+0x24>
  43720. return 0;
  43721. 801281a: 2000 movs r0, #0
  43722. }
  43723. 801281c: b002 add sp, #8
  43724. 801281e: bd70 pop {r4, r5, r6, pc}
  43725. return recv(n->socket, buffer, len, 0);
  43726. 8012820: 2300 movs r3, #0
  43727. 8012822: 4632 mov r2, r6
  43728. 8012824: 4629 mov r1, r5
  43729. 8012826: 6820 ldr r0, [r4, #0]
  43730. 8012828: f7fa f9e0 bl 800cbec <lwip_recv>
  43731. 801282c: e7f6 b.n 801281c <net_read+0x20>
  43732. if(ioctl(n->socket, FIONREAD, &available) < 0) return -1; //check receive buffer
  43733. 801282e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  43734. 8012832: e7f3 b.n 801281c <net_read+0x20>
  43735. 8012834: 4004667f .word 0x4004667f
  43736. 08012838 <net_write>:
  43737. int net_write(Network *n, unsigned char *buffer, int len, int timeout_ms) {
  43738. 8012838: b508 push {r3, lr}
  43739. return send(n->socket, buffer, len, 0);
  43740. 801283a: 2300 movs r3, #0
  43741. 801283c: 6800 ldr r0, [r0, #0]
  43742. 801283e: f7fa fa65 bl 800cd0c <lwip_send>
  43743. }
  43744. 8012842: bd08 pop {r3, pc}
  43745. 08012844 <TimerIsExpired>:
  43746. long left = timer->end_time - MilliTimer;
  43747. 8012844: 6840 ldr r0, [r0, #4]
  43748. 8012846: 4b02 ldr r3, [pc, #8] @ (8012850 <TimerIsExpired+0xc>)
  43749. 8012848: 681b ldr r3, [r3, #0]
  43750. 801284a: 1ac0 subs r0, r0, r3
  43751. }
  43752. 801284c: 0fc0 lsrs r0, r0, #31
  43753. 801284e: 4770 bx lr
  43754. 8012850: 24019c48 .word 0x24019c48
  43755. 08012854 <TimerCountdownMS>:
  43756. timer->end_time = MilliTimer + timeout;
  43757. 8012854: 4b02 ldr r3, [pc, #8] @ (8012860 <TimerCountdownMS+0xc>)
  43758. 8012856: 681b ldr r3, [r3, #0]
  43759. 8012858: 4419 add r1, r3
  43760. 801285a: 6041 str r1, [r0, #4]
  43761. }
  43762. 801285c: 4770 bx lr
  43763. 801285e: bf00 nop
  43764. 8012860: 24019c48 .word 0x24019c48
  43765. 08012864 <TimerCountdown>:
  43766. timer->end_time = MilliTimer + (timeout * 1000);
  43767. 8012864: 4b03 ldr r3, [pc, #12] @ (8012874 <TimerCountdown+0x10>)
  43768. 8012866: 681b ldr r3, [r3, #0]
  43769. 8012868: f44f 727a mov.w r2, #1000 @ 0x3e8
  43770. 801286c: fb02 3301 mla r3, r2, r1, r3
  43771. 8012870: 6043 str r3, [r0, #4]
  43772. }
  43773. 8012872: 4770 bx lr
  43774. 8012874: 24019c48 .word 0x24019c48
  43775. 08012878 <TimerLeftMS>:
  43776. long left = timer->end_time - MilliTimer;
  43777. 8012878: 6840 ldr r0, [r0, #4]
  43778. 801287a: 4b03 ldr r3, [pc, #12] @ (8012888 <TimerLeftMS+0x10>)
  43779. 801287c: 681b ldr r3, [r3, #0]
  43780. 801287e: 1ac0 subs r0, r0, r3
  43781. }
  43782. 8012880: ea20 70e0 bic.w r0, r0, r0, asr #31
  43783. 8012884: 4770 bx lr
  43784. 8012886: bf00 nop
  43785. 8012888: 24019c48 .word 0x24019c48
  43786. 0801288c <TimerInit>:
  43787. timer->end_time = 0;
  43788. 801288c: 2300 movs r3, #0
  43789. 801288e: 6043 str r3, [r0, #4]
  43790. }
  43791. 8012890: 4770 bx lr
  43792. ...
  43793. 08012894 <NewNetwork>:
  43794. n->socket = 0; //clear
  43795. 8012894: 2300 movs r3, #0
  43796. 8012896: 6003 str r3, [r0, #0]
  43797. n->mqttread = net_read; //receive function
  43798. 8012898: 4b03 ldr r3, [pc, #12] @ (80128a8 <NewNetwork+0x14>)
  43799. 801289a: 6043 str r3, [r0, #4]
  43800. n->mqttwrite = net_write; //send function
  43801. 801289c: 4b03 ldr r3, [pc, #12] @ (80128ac <NewNetwork+0x18>)
  43802. 801289e: 6083 str r3, [r0, #8]
  43803. n->disconnect = net_disconnect; //disconnection function
  43804. 80128a0: 4b03 ldr r3, [pc, #12] @ (80128b0 <NewNetwork+0x1c>)
  43805. 80128a2: 60c3 str r3, [r0, #12]
  43806. }
  43807. 80128a4: 4770 bx lr
  43808. 80128a6: bf00 nop
  43809. 80128a8: 080127fd .word 0x080127fd
  43810. 80128ac: 08012839 .word 0x08012839
  43811. 80128b0: 080127ed .word 0x080127ed
  43812. 080128b4 <ConnectNetwork>:
  43813. int ConnectNetwork(Network *n, char *ip, int port) {
  43814. 80128b4: b570 push {r4, r5, r6, lr}
  43815. 80128b6: b084 sub sp, #16
  43816. 80128b8: 4604 mov r4, r0
  43817. 80128ba: 460e mov r6, r1
  43818. 80128bc: 4615 mov r5, r2
  43819. if(n->socket)
  43820. 80128be: 6800 ldr r0, [r0, #0]
  43821. 80128c0: bb10 cbnz r0, 8012908 <ConnectNetwork+0x54>
  43822. n->socket = socket(PF_INET, SOCK_STREAM, 0); //create socket
  43823. 80128c2: 2200 movs r2, #0
  43824. 80128c4: 2101 movs r1, #1
  43825. 80128c6: 2002 movs r0, #2
  43826. 80128c8: f7fa fa60 bl 800cd8c <lwip_socket>
  43827. 80128cc: 6020 str r0, [r4, #0]
  43828. if(n->socket < 0)
  43829. 80128ce: 2800 cmp r0, #0
  43830. 80128d0: db1d blt.n 801290e <ConnectNetwork+0x5a>
  43831. memset(&server_addr, 0, sizeof(struct sockaddr_in)); //broker address info
  43832. 80128d2: 2300 movs r3, #0
  43833. 80128d4: 9300 str r3, [sp, #0]
  43834. 80128d6: 9301 str r3, [sp, #4]
  43835. 80128d8: 9302 str r3, [sp, #8]
  43836. 80128da: 9303 str r3, [sp, #12]
  43837. server_addr.sin_family = AF_INET;
  43838. 80128dc: 2302 movs r3, #2
  43839. 80128de: f88d 3001 strb.w r3, [sp, #1]
  43840. server_addr.sin_addr.s_addr = inet_addr(ip);
  43841. 80128e2: 4630 mov r0, r6
  43842. 80128e4: f7f7 fe86 bl 800a5f4 <ipaddr_addr>
  43843. 80128e8: 9001 str r0, [sp, #4]
  43844. server_addr.sin_port = htons(port);
  43845. 80128ea: b2a8 uxth r0, r5
  43846. 80128ec: f7f5 fac6 bl 8007e7c <lwip_htons>
  43847. 80128f0: f8ad 0002 strh.w r0, [sp, #2]
  43848. if(connect(n->socket, (struct sockaddr*)&server_addr, sizeof(struct sockaddr_in)) < 0) //connect to the broker
  43849. 80128f4: 2210 movs r2, #16
  43850. 80128f6: 4669 mov r1, sp
  43851. 80128f8: 6820 ldr r0, [r4, #0]
  43852. 80128fa: f7fa f8cd bl 800ca98 <lwip_connect>
  43853. 80128fe: 2800 cmp r0, #0
  43854. 8012900: db0a blt.n 8012918 <ConnectNetwork+0x64>
  43855. return 0;
  43856. 8012902: 2000 movs r0, #0
  43857. }
  43858. 8012904: b004 add sp, #16
  43859. 8012906: bd70 pop {r4, r5, r6, pc}
  43860. close(n->socket);
  43861. 8012908: f7fa f88e bl 800ca28 <lwip_close>
  43862. 801290c: e7d9 b.n 80128c2 <ConnectNetwork+0xe>
  43863. n->socket = 0;
  43864. 801290e: 2300 movs r3, #0
  43865. 8012910: 6023 str r3, [r4, #0]
  43866. return -1;
  43867. 8012912: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  43868. 8012916: e7f5 b.n 8012904 <ConnectNetwork+0x50>
  43869. close(n->socket);
  43870. 8012918: 6820 ldr r0, [r4, #0]
  43871. 801291a: f7fa f885 bl 800ca28 <lwip_close>
  43872. return -1;
  43873. 801291e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  43874. 8012922: e7ef b.n 8012904 <ConnectNetwork+0x50>
  43875. 08012924 <MQTTSerialize_connectLength>:
  43876. * Determines the length of the MQTT connect packet that would be produced using the supplied connect options.
  43877. * @param options the options to be used to build the connect packet
  43878. * @return the length of buffer needed to contain the serialized version of the packet
  43879. */
  43880. int MQTTSerialize_connectLength(MQTTPacket_connectData* options)
  43881. {
  43882. 8012924: b570 push {r4, r5, r6, lr}
  43883. 8012926: 4604 mov r4, r0
  43884. int len = 0;
  43885. FUNC_ENTRY;
  43886. if (options->MQTTVersion == 3)
  43887. 8012928: 7a03 ldrb r3, [r0, #8]
  43888. 801292a: 2b03 cmp r3, #3
  43889. 801292c: d021 beq.n 8012972 <MQTTSerialize_connectLength+0x4e>
  43890. len = 12; /* variable depending on MQTT or MQIsdp */
  43891. else if (options->MQTTVersion == 4)
  43892. 801292e: 2b04 cmp r3, #4
  43893. 8012930: d021 beq.n 8012976 <MQTTSerialize_connectLength+0x52>
  43894. int len = 0;
  43895. 8012932: 2500 movs r5, #0
  43896. len = 10;
  43897. len += MQTTstrlen(options->clientID)+2;
  43898. 8012934: f104 030c add.w r3, r4, #12
  43899. 8012938: e893 0007 ldmia.w r3, {r0, r1, r2}
  43900. 801293c: f000 fa71 bl 8012e22 <MQTTstrlen>
  43901. 8012940: 3002 adds r0, #2
  43902. 8012942: 4405 add r5, r0
  43903. if (options->willFlag)
  43904. 8012944: 7ee3 ldrb r3, [r4, #27]
  43905. 8012946: b9c3 cbnz r3, 801297a <MQTTSerialize_connectLength+0x56>
  43906. len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2;
  43907. if (options->username.cstring || options->username.lenstring.data)
  43908. 8012948: 6c23 ldr r3, [r4, #64] @ 0x40
  43909. 801294a: b33b cbz r3, 801299c <MQTTSerialize_connectLength+0x78>
  43910. len += MQTTstrlen(options->username)+2;
  43911. 801294c: f104 0340 add.w r3, r4, #64 @ 0x40
  43912. 8012950: e893 0007 ldmia.w r3, {r0, r1, r2}
  43913. 8012954: f000 fa65 bl 8012e22 <MQTTstrlen>
  43914. 8012958: 3002 adds r0, #2
  43915. 801295a: 4405 add r5, r0
  43916. if (options->password.cstring || options->password.lenstring.data)
  43917. 801295c: 6ce3 ldr r3, [r4, #76] @ 0x4c
  43918. 801295e: b30b cbz r3, 80129a4 <MQTTSerialize_connectLength+0x80>
  43919. len += MQTTstrlen(options->password)+2;
  43920. 8012960: 344c adds r4, #76 @ 0x4c
  43921. 8012962: e894 0007 ldmia.w r4, {r0, r1, r2}
  43922. 8012966: f000 fa5c bl 8012e22 <MQTTstrlen>
  43923. 801296a: 3002 adds r0, #2
  43924. 801296c: 4405 add r5, r0
  43925. FUNC_EXIT_RC(len);
  43926. return len;
  43927. }
  43928. 801296e: 4628 mov r0, r5
  43929. 8012970: bd70 pop {r4, r5, r6, pc}
  43930. len = 12; /* variable depending on MQTT or MQIsdp */
  43931. 8012972: 250c movs r5, #12
  43932. 8012974: e7de b.n 8012934 <MQTTSerialize_connectLength+0x10>
  43933. len = 10;
  43934. 8012976: 250a movs r5, #10
  43935. 8012978: e7dc b.n 8012934 <MQTTSerialize_connectLength+0x10>
  43936. len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2;
  43937. 801297a: f104 0324 add.w r3, r4, #36 @ 0x24
  43938. 801297e: e893 0007 ldmia.w r3, {r0, r1, r2}
  43939. 8012982: f000 fa4e bl 8012e22 <MQTTstrlen>
  43940. 8012986: 1c86 adds r6, r0, #2
  43941. 8012988: f104 0330 add.w r3, r4, #48 @ 0x30
  43942. 801298c: e893 0007 ldmia.w r3, {r0, r1, r2}
  43943. 8012990: f000 fa47 bl 8012e22 <MQTTstrlen>
  43944. 8012994: 4406 add r6, r0
  43945. 8012996: 3602 adds r6, #2
  43946. 8012998: 4435 add r5, r6
  43947. 801299a: e7d5 b.n 8012948 <MQTTSerialize_connectLength+0x24>
  43948. if (options->username.cstring || options->username.lenstring.data)
  43949. 801299c: 6ca3 ldr r3, [r4, #72] @ 0x48
  43950. 801299e: 2b00 cmp r3, #0
  43951. 80129a0: d1d4 bne.n 801294c <MQTTSerialize_connectLength+0x28>
  43952. 80129a2: e7db b.n 801295c <MQTTSerialize_connectLength+0x38>
  43953. if (options->password.cstring || options->password.lenstring.data)
  43954. 80129a4: 6d63 ldr r3, [r4, #84] @ 0x54
  43955. 80129a6: 2b00 cmp r3, #0
  43956. 80129a8: d1da bne.n 8012960 <MQTTSerialize_connectLength+0x3c>
  43957. 80129aa: e7e0 b.n 801296e <MQTTSerialize_connectLength+0x4a>
  43958. 080129ac <MQTTSerialize_connect>:
  43959. * @param len the length in bytes of the supplied buffer
  43960. * @param options the options to be used to build the connect packet
  43961. * @return serialized length, or error if 0
  43962. */
  43963. int MQTTSerialize_connect(unsigned char* buf, int buflen, MQTTPacket_connectData* options)
  43964. {
  43965. 80129ac: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  43966. 80129b0: b082 sub sp, #8
  43967. 80129b2: 4606 mov r6, r0
  43968. 80129b4: 460f mov r7, r1
  43969. 80129b6: 4614 mov r4, r2
  43970. unsigned char *ptr = buf;
  43971. 80129b8: 9001 str r0, [sp, #4]
  43972. MQTTConnectFlags flags = {0};
  43973. int len = 0;
  43974. int rc = -1;
  43975. FUNC_ENTRY;
  43976. if (MQTTPacket_len(len = MQTTSerialize_connectLength(options)) > buflen)
  43977. 80129ba: 4610 mov r0, r2
  43978. 80129bc: f7ff ffb2 bl 8012924 <MQTTSerialize_connectLength>
  43979. 80129c0: 4680 mov r8, r0
  43980. 80129c2: f000 f993 bl 8012cec <MQTTPacket_len>
  43981. 80129c6: 42b8 cmp r0, r7
  43982. 80129c8: dc7b bgt.n 8012ac2 <MQTTSerialize_connect+0x116>
  43983. 80129ca: 2500 movs r5, #0
  43984. goto exit;
  43985. }
  43986. header.byte = 0;
  43987. header.bits.type = CONNECT;
  43988. writeChar(&ptr, header.byte); /* write header */
  43989. 80129cc: 2110 movs r1, #16
  43990. 80129ce: a801 add r0, sp, #4
  43991. 80129d0: f000 f9ba bl 8012d48 <writeChar>
  43992. ptr += MQTTPacket_encode(ptr, len); /* write remaining length */
  43993. 80129d4: 4641 mov r1, r8
  43994. 80129d6: 9801 ldr r0, [sp, #4]
  43995. 80129d8: f000 f946 bl 8012c68 <MQTTPacket_encode>
  43996. 80129dc: 9b01 ldr r3, [sp, #4]
  43997. 80129de: 4403 add r3, r0
  43998. 80129e0: 9301 str r3, [sp, #4]
  43999. if (options->MQTTVersion == 4)
  44000. 80129e2: 7a23 ldrb r3, [r4, #8]
  44001. 80129e4: 2b04 cmp r3, #4
  44002. 80129e6: d03f beq.n 8012a68 <MQTTSerialize_connect+0xbc>
  44003. writeCString(&ptr, "MQTT");
  44004. writeChar(&ptr, (char) 4);
  44005. }
  44006. else
  44007. {
  44008. writeCString(&ptr, "MQIsdp");
  44009. 80129e8: 4937 ldr r1, [pc, #220] @ (8012ac8 <MQTTSerialize_connect+0x11c>)
  44010. 80129ea: a801 add r0, sp, #4
  44011. 80129ec: f000 f9c9 bl 8012d82 <writeCString>
  44012. writeChar(&ptr, (char) 3);
  44013. 80129f0: 2103 movs r1, #3
  44014. 80129f2: a801 add r0, sp, #4
  44015. 80129f4: f000 f9a8 bl 8012d48 <writeChar>
  44016. }
  44017. flags.all = 0;
  44018. flags.bits.cleansession = options->cleansession;
  44019. 80129f8: 7ea3 ldrb r3, [r4, #26]
  44020. 80129fa: f363 0541 bfi r5, r3, #1, #1
  44021. flags.bits.will = (options->willFlag) ? 1 : 0;
  44022. 80129fe: 7ee3 ldrb r3, [r4, #27]
  44023. 8012a00: 3b00 subs r3, #0
  44024. 8012a02: bf18 it ne
  44025. 8012a04: 2301 movne r3, #1
  44026. 8012a06: f363 0582 bfi r5, r3, #2, #1
  44027. if (flags.bits.will)
  44028. 8012a0a: f015 0f04 tst.w r5, #4
  44029. 8012a0e: d007 beq.n 8012a20 <MQTTSerialize_connect+0x74>
  44030. {
  44031. flags.bits.willQoS = options->will.qos;
  44032. 8012a10: f894 303d ldrb.w r3, [r4, #61] @ 0x3d
  44033. 8012a14: f363 05c4 bfi r5, r3, #3, #2
  44034. flags.bits.willRetain = options->will.retained;
  44035. 8012a18: f894 303c ldrb.w r3, [r4, #60] @ 0x3c
  44036. 8012a1c: f363 1545 bfi r5, r3, #5, #1
  44037. }
  44038. if (options->username.cstring || options->username.lenstring.data)
  44039. 8012a20: 6c23 ldr r3, [r4, #64] @ 0x40
  44040. 8012a22: b35b cbz r3, 8012a7c <MQTTSerialize_connect+0xd0>
  44041. flags.bits.username = 1;
  44042. 8012a24: f045 0580 orr.w r5, r5, #128 @ 0x80
  44043. if (options->password.cstring || options->password.lenstring.data)
  44044. 8012a28: 6ce3 ldr r3, [r4, #76] @ 0x4c
  44045. 8012a2a: b35b cbz r3, 8012a84 <MQTTSerialize_connect+0xd8>
  44046. flags.bits.password = 1;
  44047. 8012a2c: f045 0540 orr.w r5, r5, #64 @ 0x40
  44048. writeChar(&ptr, flags.all);
  44049. 8012a30: b2ed uxtb r5, r5
  44050. 8012a32: 4629 mov r1, r5
  44051. 8012a34: a801 add r0, sp, #4
  44052. 8012a36: f000 f987 bl 8012d48 <writeChar>
  44053. writeInt(&ptr, options->keepAliveInterval);
  44054. 8012a3a: 8b21 ldrh r1, [r4, #24]
  44055. 8012a3c: a801 add r0, sp, #4
  44056. 8012a3e: f000 f989 bl 8012d54 <writeInt>
  44057. writeMQTTString(&ptr, options->clientID);
  44058. 8012a42: f104 030c add.w r3, r4, #12
  44059. 8012a46: cb0e ldmia r3, {r1, r2, r3}
  44060. 8012a48: a801 add r0, sp, #4
  44061. 8012a4a: f000 f9ae bl 8012daa <writeMQTTString>
  44062. if (options->willFlag)
  44063. 8012a4e: 7ee3 ldrb r3, [r4, #27]
  44064. 8012a50: b9e3 cbnz r3, 8012a8c <MQTTSerialize_connect+0xe0>
  44065. {
  44066. writeMQTTString(&ptr, options->will.topicName);
  44067. writeMQTTString(&ptr, options->will.message);
  44068. }
  44069. if (flags.bits.username)
  44070. 8012a52: f015 0f80 tst.w r5, #128 @ 0x80
  44071. 8012a56: d126 bne.n 8012aa6 <MQTTSerialize_connect+0xfa>
  44072. writeMQTTString(&ptr, options->username);
  44073. if (flags.bits.password)
  44074. 8012a58: f015 0f40 tst.w r5, #64 @ 0x40
  44075. 8012a5c: d12a bne.n 8012ab4 <MQTTSerialize_connect+0x108>
  44076. writeMQTTString(&ptr, options->password);
  44077. rc = ptr - buf;
  44078. 8012a5e: 9801 ldr r0, [sp, #4]
  44079. 8012a60: 1b80 subs r0, r0, r6
  44080. exit: FUNC_EXIT_RC(rc);
  44081. return rc;
  44082. }
  44083. 8012a62: b002 add sp, #8
  44084. 8012a64: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  44085. writeCString(&ptr, "MQTT");
  44086. 8012a68: 4918 ldr r1, [pc, #96] @ (8012acc <MQTTSerialize_connect+0x120>)
  44087. 8012a6a: a801 add r0, sp, #4
  44088. 8012a6c: f000 f989 bl 8012d82 <writeCString>
  44089. writeChar(&ptr, (char) 4);
  44090. 8012a70: 2104 movs r1, #4
  44091. 8012a72: eb0d 0001 add.w r0, sp, r1
  44092. 8012a76: f000 f967 bl 8012d48 <writeChar>
  44093. 8012a7a: e7bd b.n 80129f8 <MQTTSerialize_connect+0x4c>
  44094. if (options->username.cstring || options->username.lenstring.data)
  44095. 8012a7c: 6ca3 ldr r3, [r4, #72] @ 0x48
  44096. 8012a7e: 2b00 cmp r3, #0
  44097. 8012a80: d1d0 bne.n 8012a24 <MQTTSerialize_connect+0x78>
  44098. 8012a82: e7d1 b.n 8012a28 <MQTTSerialize_connect+0x7c>
  44099. if (options->password.cstring || options->password.lenstring.data)
  44100. 8012a84: 6d63 ldr r3, [r4, #84] @ 0x54
  44101. 8012a86: 2b00 cmp r3, #0
  44102. 8012a88: d1d0 bne.n 8012a2c <MQTTSerialize_connect+0x80>
  44103. 8012a8a: e7d1 b.n 8012a30 <MQTTSerialize_connect+0x84>
  44104. writeMQTTString(&ptr, options->will.topicName);
  44105. 8012a8c: f104 0324 add.w r3, r4, #36 @ 0x24
  44106. 8012a90: cb0e ldmia r3, {r1, r2, r3}
  44107. 8012a92: a801 add r0, sp, #4
  44108. 8012a94: f000 f989 bl 8012daa <writeMQTTString>
  44109. writeMQTTString(&ptr, options->will.message);
  44110. 8012a98: f104 0330 add.w r3, r4, #48 @ 0x30
  44111. 8012a9c: cb0e ldmia r3, {r1, r2, r3}
  44112. 8012a9e: a801 add r0, sp, #4
  44113. 8012aa0: f000 f983 bl 8012daa <writeMQTTString>
  44114. 8012aa4: e7d5 b.n 8012a52 <MQTTSerialize_connect+0xa6>
  44115. writeMQTTString(&ptr, options->username);
  44116. 8012aa6: f104 0340 add.w r3, r4, #64 @ 0x40
  44117. 8012aaa: cb0e ldmia r3, {r1, r2, r3}
  44118. 8012aac: a801 add r0, sp, #4
  44119. 8012aae: f000 f97c bl 8012daa <writeMQTTString>
  44120. 8012ab2: e7d1 b.n 8012a58 <MQTTSerialize_connect+0xac>
  44121. writeMQTTString(&ptr, options->password);
  44122. 8012ab4: 344c adds r4, #76 @ 0x4c
  44123. 8012ab6: e894 000e ldmia.w r4, {r1, r2, r3}
  44124. 8012aba: a801 add r0, sp, #4
  44125. 8012abc: f000 f975 bl 8012daa <writeMQTTString>
  44126. 8012ac0: e7cd b.n 8012a5e <MQTTSerialize_connect+0xb2>
  44127. rc = MQTTPACKET_BUFFER_TOO_SHORT;
  44128. 8012ac2: f06f 0001 mvn.w r0, #1
  44129. return rc;
  44130. 8012ac6: e7cc b.n 8012a62 <MQTTSerialize_connect+0xb6>
  44131. 8012ac8: 08017ed4 .word 0x08017ed4
  44132. 8012acc: 08017ecc .word 0x08017ecc
  44133. 08012ad0 <MQTTDeserialize_connack>:
  44134. * @param buf the raw buffer data, of the correct length determined by the remaining length field
  44135. * @param len the length in bytes of the data in the supplied buffer
  44136. * @return error code. 1 is success, 0 is failure
  44137. */
  44138. int MQTTDeserialize_connack(unsigned char* sessionPresent, unsigned char* connack_rc, unsigned char* buf, int buflen)
  44139. {
  44140. 8012ad0: b530 push {r4, r5, lr}
  44141. 8012ad2: b083 sub sp, #12
  44142. 8012ad4: 4605 mov r5, r0
  44143. 8012ad6: 460c mov r4, r1
  44144. MQTTHeader header = {0};
  44145. unsigned char* curdata = buf;
  44146. 8012ad8: 9201 str r2, [sp, #4]
  44147. int rc = 0;
  44148. int mylen;
  44149. MQTTConnackFlags flags = {0};
  44150. FUNC_ENTRY;
  44151. header.byte = readChar(&curdata);
  44152. 8012ada: a801 add r0, sp, #4
  44153. 8012adc: f000 f92e bl 8012d3c <readChar>
  44154. if (header.bits.type != CONNACK)
  44155. 8012ae0: f000 03f0 and.w r3, r0, #240 @ 0xf0
  44156. 8012ae4: 2b20 cmp r3, #32
  44157. 8012ae6: d002 beq.n 8012aee <MQTTDeserialize_connack+0x1e>
  44158. int rc = 0;
  44159. 8012ae8: 2000 movs r0, #0
  44160. rc = 1;
  44161. exit:
  44162. FUNC_EXIT_RC(rc);
  44163. return rc;
  44164. }
  44165. 8012aea: b003 add sp, #12
  44166. 8012aec: bd30 pop {r4, r5, pc}
  44167. curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
  44168. 8012aee: 4669 mov r1, sp
  44169. 8012af0: 9801 ldr r0, [sp, #4]
  44170. 8012af2: f000 f90f bl 8012d14 <MQTTPacket_decodeBuf>
  44171. 8012af6: 9b01 ldr r3, [sp, #4]
  44172. 8012af8: 4403 add r3, r0
  44173. 8012afa: 9301 str r3, [sp, #4]
  44174. enddata = curdata + mylen;
  44175. 8012afc: 9b00 ldr r3, [sp, #0]
  44176. if (enddata - curdata < 2)
  44177. 8012afe: 2b01 cmp r3, #1
  44178. 8012b00: ddf3 ble.n 8012aea <MQTTDeserialize_connack+0x1a>
  44179. flags.all = readChar(&curdata);
  44180. 8012b02: a801 add r0, sp, #4
  44181. 8012b04: f000 f91a bl 8012d3c <readChar>
  44182. *sessionPresent = flags.bits.sessionpresent;
  44183. 8012b08: f000 0001 and.w r0, r0, #1
  44184. 8012b0c: 7028 strb r0, [r5, #0]
  44185. *connack_rc = readChar(&curdata);
  44186. 8012b0e: a801 add r0, sp, #4
  44187. 8012b10: f000 f914 bl 8012d3c <readChar>
  44188. 8012b14: 7020 strb r0, [r4, #0]
  44189. rc = 1;
  44190. 8012b16: 2001 movs r0, #1
  44191. 8012b18: e7e7 b.n 8012aea <MQTTDeserialize_connack+0x1a>
  44192. 08012b1a <MQTTSerialize_zero>:
  44193. * @param buflen the length in bytes of the supplied buffer, to avoid overruns
  44194. * @param packettype the message type
  44195. * @return serialized length, or error if 0
  44196. */
  44197. int MQTTSerialize_zero(unsigned char* buf, int buflen, unsigned char packettype)
  44198. {
  44199. 8012b1a: b510 push {r4, lr}
  44200. 8012b1c: b082 sub sp, #8
  44201. MQTTHeader header = {0};
  44202. int rc = -1;
  44203. unsigned char *ptr = buf;
  44204. 8012b1e: 9001 str r0, [sp, #4]
  44205. FUNC_ENTRY;
  44206. if (buflen < 2)
  44207. 8012b20: 2901 cmp r1, #1
  44208. 8012b22: dd11 ble.n 8012b48 <MQTTSerialize_zero+0x2e>
  44209. 8012b24: 4604 mov r4, r0
  44210. 8012b26: 2300 movs r3, #0
  44211. {
  44212. rc = MQTTPACKET_BUFFER_TOO_SHORT;
  44213. goto exit;
  44214. }
  44215. header.byte = 0;
  44216. header.bits.type = packettype;
  44217. 8012b28: f362 1307 bfi r3, r2, #4, #4
  44218. writeChar(&ptr, header.byte); /* write header */
  44219. 8012b2c: 4619 mov r1, r3
  44220. 8012b2e: a801 add r0, sp, #4
  44221. 8012b30: f000 f90a bl 8012d48 <writeChar>
  44222. ptr += MQTTPacket_encode(ptr, 0); /* write remaining length */
  44223. 8012b34: 2100 movs r1, #0
  44224. 8012b36: 9801 ldr r0, [sp, #4]
  44225. 8012b38: f000 f896 bl 8012c68 <MQTTPacket_encode>
  44226. 8012b3c: 9b01 ldr r3, [sp, #4]
  44227. 8012b3e: 4418 add r0, r3
  44228. 8012b40: 9001 str r0, [sp, #4]
  44229. rc = ptr - buf;
  44230. 8012b42: 1b00 subs r0, r0, r4
  44231. exit:
  44232. FUNC_EXIT_RC(rc);
  44233. return rc;
  44234. }
  44235. 8012b44: b002 add sp, #8
  44236. 8012b46: bd10 pop {r4, pc}
  44237. rc = MQTTPACKET_BUFFER_TOO_SHORT;
  44238. 8012b48: f06f 0001 mvn.w r0, #1
  44239. return rc;
  44240. 8012b4c: e7fa b.n 8012b44 <MQTTSerialize_zero+0x2a>
  44241. 08012b4e <MQTTSerialize_disconnect>:
  44242. * @param buf the buffer into which the packet will be serialized
  44243. * @param buflen the length in bytes of the supplied buffer, to avoid overruns
  44244. * @return serialized length, or error if 0
  44245. */
  44246. int MQTTSerialize_disconnect(unsigned char* buf, int buflen)
  44247. {
  44248. 8012b4e: b508 push {r3, lr}
  44249. return MQTTSerialize_zero(buf, buflen, DISCONNECT);
  44250. 8012b50: 220e movs r2, #14
  44251. 8012b52: f7ff ffe2 bl 8012b1a <MQTTSerialize_zero>
  44252. }
  44253. 8012b56: bd08 pop {r3, pc}
  44254. 08012b58 <MQTTSerialize_pingreq>:
  44255. * @param buf the buffer into which the packet will be serialized
  44256. * @param buflen the length in bytes of the supplied buffer, to avoid overruns
  44257. * @return serialized length, or error if 0
  44258. */
  44259. int MQTTSerialize_pingreq(unsigned char* buf, int buflen)
  44260. {
  44261. 8012b58: b508 push {r3, lr}
  44262. return MQTTSerialize_zero(buf, buflen, PINGREQ);
  44263. 8012b5a: 220c movs r2, #12
  44264. 8012b5c: f7ff ffdd bl 8012b1a <MQTTSerialize_zero>
  44265. }
  44266. 8012b60: bd08 pop {r3, pc}
  44267. 08012b62 <MQTTDeserialize_publish>:
  44268. * @param buflen the length in bytes of the data in the supplied buffer
  44269. * @return error code. 1 is success
  44270. */
  44271. int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName,
  44272. unsigned char** payload, int* payloadlen, unsigned char* buf, int buflen)
  44273. {
  44274. 8012b62: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  44275. 8012b66: b082 sub sp, #8
  44276. 8012b68: 4680 mov r8, r0
  44277. 8012b6a: 460d mov r5, r1
  44278. 8012b6c: 4616 mov r6, r2
  44279. 8012b6e: 461f mov r7, r3
  44280. MQTTHeader header = {0};
  44281. 8012b70: 2400 movs r4, #0
  44282. unsigned char* curdata = buf;
  44283. 8012b72: 9b0b ldr r3, [sp, #44] @ 0x2c
  44284. 8012b74: 9301 str r3, [sp, #4]
  44285. unsigned char* enddata = NULL;
  44286. int rc = 0;
  44287. int mylen = 0;
  44288. 8012b76: 9400 str r4, [sp, #0]
  44289. FUNC_ENTRY;
  44290. header.byte = readChar(&curdata);
  44291. 8012b78: a801 add r0, sp, #4
  44292. 8012b7a: f000 f8df bl 8012d3c <readChar>
  44293. 8012b7e: f360 0407 bfi r4, r0, #0, #8
  44294. if (header.bits.type != PUBLISH)
  44295. 8012b82: f000 0cf0 and.w ip, r0, #240 @ 0xf0
  44296. 8012b86: f1bc 0f30 cmp.w ip, #48 @ 0x30
  44297. 8012b8a: d004 beq.n 8012b96 <MQTTDeserialize_publish+0x34>
  44298. int rc = 0;
  44299. 8012b8c: 2400 movs r4, #0
  44300. *payload = curdata;
  44301. rc = 1;
  44302. exit:
  44303. FUNC_EXIT_RC(rc);
  44304. return rc;
  44305. }
  44306. 8012b8e: 4620 mov r0, r4
  44307. 8012b90: b002 add sp, #8
  44308. 8012b92: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  44309. *dup = header.bits.dup;
  44310. 8012b96: f3c4 03c0 ubfx r3, r4, #3, #1
  44311. 8012b9a: f888 3000 strb.w r3, [r8]
  44312. *qos = header.bits.qos;
  44313. 8012b9e: f3c4 0341 ubfx r3, r4, #1, #2
  44314. 8012ba2: 602b str r3, [r5, #0]
  44315. *retained = header.bits.retain;
  44316. 8012ba4: f3c4 0400 ubfx r4, r4, #0, #1
  44317. 8012ba8: 7034 strb r4, [r6, #0]
  44318. curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
  44319. 8012baa: 4669 mov r1, sp
  44320. 8012bac: 9801 ldr r0, [sp, #4]
  44321. 8012bae: f000 f8b1 bl 8012d14 <MQTTPacket_decodeBuf>
  44322. 8012bb2: 4604 mov r4, r0
  44323. 8012bb4: 9e01 ldr r6, [sp, #4]
  44324. 8012bb6: 4406 add r6, r0
  44325. 8012bb8: 9601 str r6, [sp, #4]
  44326. enddata = curdata + mylen;
  44327. 8012bba: 9b00 ldr r3, [sp, #0]
  44328. 8012bbc: 441e add r6, r3
  44329. if (!readMQTTLenString(topicName, &curdata, enddata) ||
  44330. 8012bbe: 4632 mov r2, r6
  44331. 8012bc0: a901 add r1, sp, #4
  44332. 8012bc2: 9808 ldr r0, [sp, #32]
  44333. 8012bc4: f000 f913 bl 8012dee <readMQTTLenString>
  44334. 8012bc8: 2800 cmp r0, #0
  44335. 8012bca: d0e0 beq.n 8012b8e <MQTTDeserialize_publish+0x2c>
  44336. enddata - curdata < 0) /* do we have enough data to read the protocol version byte? */
  44337. 8012bcc: 9b01 ldr r3, [sp, #4]
  44338. 8012bce: 1af3 subs r3, r6, r3
  44339. if (!readMQTTLenString(topicName, &curdata, enddata) ||
  44340. 8012bd0: 2b00 cmp r3, #0
  44341. 8012bd2: dbdc blt.n 8012b8e <MQTTDeserialize_publish+0x2c>
  44342. if (*qos > 0)
  44343. 8012bd4: 682b ldr r3, [r5, #0]
  44344. 8012bd6: 2b00 cmp r3, #0
  44345. 8012bd8: dc07 bgt.n 8012bea <MQTTDeserialize_publish+0x88>
  44346. *payloadlen = enddata - curdata;
  44347. 8012bda: 9b01 ldr r3, [sp, #4]
  44348. 8012bdc: 1af6 subs r6, r6, r3
  44349. 8012bde: 9a0a ldr r2, [sp, #40] @ 0x28
  44350. 8012be0: 6016 str r6, [r2, #0]
  44351. *payload = curdata;
  44352. 8012be2: 9a09 ldr r2, [sp, #36] @ 0x24
  44353. 8012be4: 6013 str r3, [r2, #0]
  44354. rc = 1;
  44355. 8012be6: 2401 movs r4, #1
  44356. 8012be8: e7d1 b.n 8012b8e <MQTTDeserialize_publish+0x2c>
  44357. *packetid = readInt(&curdata);
  44358. 8012bea: a801 add r0, sp, #4
  44359. 8012bec: f000 f89e bl 8012d2c <readInt>
  44360. 8012bf0: 8038 strh r0, [r7, #0]
  44361. 8012bf2: e7f2 b.n 8012bda <MQTTDeserialize_publish+0x78>
  44362. 08012bf4 <MQTTDeserialize_ack>:
  44363. * @param buf the raw buffer data, of the correct length determined by the remaining length field
  44364. * @param buflen the length in bytes of the data in the supplied buffer
  44365. * @return error code. 1 is success, 0 is failure
  44366. */
  44367. int MQTTDeserialize_ack(unsigned char* packettype, unsigned char* dup, unsigned short* packetid, unsigned char* buf, int buflen)
  44368. {
  44369. 8012bf4: b5f0 push {r4, r5, r6, r7, lr}
  44370. 8012bf6: b083 sub sp, #12
  44371. 8012bf8: 4605 mov r5, r0
  44372. 8012bfa: 460f mov r7, r1
  44373. 8012bfc: 4616 mov r6, r2
  44374. MQTTHeader header = {0};
  44375. 8012bfe: 2400 movs r4, #0
  44376. unsigned char* curdata = buf;
  44377. 8012c00: 9301 str r3, [sp, #4]
  44378. unsigned char* enddata = NULL;
  44379. int rc = 0;
  44380. int mylen;
  44381. FUNC_ENTRY;
  44382. header.byte = readChar(&curdata);
  44383. 8012c02: a801 add r0, sp, #4
  44384. 8012c04: f000 f89a bl 8012d3c <readChar>
  44385. 8012c08: f360 0407 bfi r4, r0, #0, #8
  44386. *dup = header.bits.dup;
  44387. 8012c0c: f3c4 03c0 ubfx r3, r4, #3, #1
  44388. 8012c10: 703b strb r3, [r7, #0]
  44389. *packettype = header.bits.type;
  44390. 8012c12: f3c4 1403 ubfx r4, r4, #4, #4
  44391. 8012c16: 702c strb r4, [r5, #0]
  44392. curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
  44393. 8012c18: 4669 mov r1, sp
  44394. 8012c1a: 9801 ldr r0, [sp, #4]
  44395. 8012c1c: f000 f87a bl 8012d14 <MQTTPacket_decodeBuf>
  44396. 8012c20: 9b01 ldr r3, [sp, #4]
  44397. 8012c22: 4403 add r3, r0
  44398. 8012c24: 9301 str r3, [sp, #4]
  44399. enddata = curdata + mylen;
  44400. 8012c26: 9b00 ldr r3, [sp, #0]
  44401. if (enddata - curdata < 2)
  44402. 8012c28: 2b01 cmp r3, #1
  44403. 8012c2a: dd04 ble.n 8012c36 <MQTTDeserialize_ack+0x42>
  44404. goto exit;
  44405. *packetid = readInt(&curdata);
  44406. 8012c2c: a801 add r0, sp, #4
  44407. 8012c2e: f000 f87d bl 8012d2c <readInt>
  44408. 8012c32: 8030 strh r0, [r6, #0]
  44409. rc = 1;
  44410. 8012c34: 2001 movs r0, #1
  44411. exit:
  44412. FUNC_EXIT_RC(rc);
  44413. return rc;
  44414. }
  44415. 8012c36: b003 add sp, #12
  44416. 8012c38: bdf0 pop {r4, r5, r6, r7, pc}
  44417. ...
  44418. 08012c3c <bufchar>:
  44419. static unsigned char* bufptr;
  44420. int bufchar(unsigned char* c, int count)
  44421. {
  44422. 8012c3c: 4684 mov ip, r0
  44423. 8012c3e: 4608 mov r0, r1
  44424. int i;
  44425. for (i = 0; i < count; ++i)
  44426. 8012c40: 2300 movs r3, #0
  44427. 8012c42: 428b cmp r3, r1
  44428. 8012c44: da0c bge.n 8012c60 <bufchar+0x24>
  44429. {
  44430. 8012c46: b430 push {r4, r5}
  44431. *c = *bufptr++;
  44432. 8012c48: 4c06 ldr r4, [pc, #24] @ (8012c64 <bufchar+0x28>)
  44433. 8012c4a: 6822 ldr r2, [r4, #0]
  44434. 8012c4c: 1c55 adds r5, r2, #1
  44435. 8012c4e: 6025 str r5, [r4, #0]
  44436. 8012c50: 7812 ldrb r2, [r2, #0]
  44437. 8012c52: f88c 2000 strb.w r2, [ip]
  44438. for (i = 0; i < count; ++i)
  44439. 8012c56: 3301 adds r3, #1
  44440. 8012c58: 4283 cmp r3, r0
  44441. 8012c5a: dbf5 blt.n 8012c48 <bufchar+0xc>
  44442. return count;
  44443. }
  44444. 8012c5c: bc30 pop {r4, r5}
  44445. 8012c5e: 4770 bx lr
  44446. 8012c60: 4770 bx lr
  44447. 8012c62: bf00 nop
  44448. 8012c64: 24019c4c .word 0x24019c4c
  44449. 08012c68 <MQTTPacket_encode>:
  44450. {
  44451. 8012c68: b510 push {r4, lr}
  44452. 8012c6a: 4604 mov r4, r0
  44453. int rc = 0;
  44454. 8012c6c: f04f 0c00 mov.w ip, #0
  44455. 8012c70: e00b b.n 8012c8a <MQTTPacket_encode+0x22>
  44456. length /= 128;
  44457. 8012c72: f101 0e7f add.w lr, r1, #127 @ 0x7f
  44458. 8012c76: e014 b.n 8012ca2 <MQTTPacket_encode+0x3a>
  44459. d |= 0x80;
  44460. 8012c78: f043 0380 orr.w r3, r3, #128 @ 0x80
  44461. buf[rc++] = d;
  44462. 8012c7c: f10c 0001 add.w r0, ip, #1
  44463. 8012c80: f804 300c strb.w r3, [r4, ip]
  44464. } while (length > 0);
  44465. 8012c84: 2a7f cmp r2, #127 @ 0x7f
  44466. 8012c86: dd11 ble.n 8012cac <MQTTPacket_encode+0x44>
  44467. buf[rc++] = d;
  44468. 8012c88: 4684 mov ip, r0
  44469. char d = length % 128;
  44470. 8012c8a: 424a negs r2, r1
  44471. 8012c8c: f001 037f and.w r3, r1, #127 @ 0x7f
  44472. 8012c90: f002 027f and.w r2, r2, #127 @ 0x7f
  44473. 8012c94: bf58 it pl
  44474. 8012c96: 4253 negpl r3, r2
  44475. 8012c98: b2db uxtb r3, r3
  44476. length /= 128;
  44477. 8012c9a: 460a mov r2, r1
  44478. 8012c9c: 468e mov lr, r1
  44479. 8012c9e: 2900 cmp r1, #0
  44480. 8012ca0: dbe7 blt.n 8012c72 <MQTTPacket_encode+0xa>
  44481. 8012ca2: ea4f 11ee mov.w r1, lr, asr #7
  44482. if (length > 0)
  44483. 8012ca6: 2a7f cmp r2, #127 @ 0x7f
  44484. 8012ca8: dde8 ble.n 8012c7c <MQTTPacket_encode+0x14>
  44485. 8012caa: e7e5 b.n 8012c78 <MQTTPacket_encode+0x10>
  44486. }
  44487. 8012cac: bd10 pop {r4, pc}
  44488. 08012cae <MQTTPacket_decode>:
  44489. {
  44490. 8012cae: b5f0 push {r4, r5, r6, r7, lr}
  44491. 8012cb0: b083 sub sp, #12
  44492. 8012cb2: 4607 mov r7, r0
  44493. 8012cb4: 460d mov r5, r1
  44494. *value = 0;
  44495. 8012cb6: 2400 movs r4, #0
  44496. 8012cb8: 600c str r4, [r1, #0]
  44497. int multiplier = 1;
  44498. 8012cba: 2601 movs r6, #1
  44499. if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES)
  44500. 8012cbc: 3401 adds r4, #1
  44501. 8012cbe: 2c04 cmp r4, #4
  44502. 8012cc0: dc11 bgt.n 8012ce6 <MQTTPacket_decode+0x38>
  44503. rc = (*getcharfn)(&c, 1);
  44504. 8012cc2: 2101 movs r1, #1
  44505. 8012cc4: f10d 0007 add.w r0, sp, #7
  44506. 8012cc8: 47b8 blx r7
  44507. if (rc != 1)
  44508. 8012cca: 2801 cmp r0, #1
  44509. 8012ccc: d10b bne.n 8012ce6 <MQTTPacket_decode+0x38>
  44510. *value += (c & 127) * multiplier;
  44511. 8012cce: 682b ldr r3, [r5, #0]
  44512. 8012cd0: f89d 2007 ldrb.w r2, [sp, #7]
  44513. 8012cd4: f002 017f and.w r1, r2, #127 @ 0x7f
  44514. 8012cd8: fb06 3301 mla r3, r6, r1, r3
  44515. 8012cdc: 602b str r3, [r5, #0]
  44516. multiplier *= 128;
  44517. 8012cde: 01f6 lsls r6, r6, #7
  44518. } while ((c & 128) != 0);
  44519. 8012ce0: f012 0f80 tst.w r2, #128 @ 0x80
  44520. 8012ce4: d1ea bne.n 8012cbc <MQTTPacket_decode+0xe>
  44521. }
  44522. 8012ce6: 4620 mov r0, r4
  44523. 8012ce8: b003 add sp, #12
  44524. 8012cea: bdf0 pop {r4, r5, r6, r7, pc}
  44525. 08012cec <MQTTPacket_len>:
  44526. rem_len += 1; /* header byte */
  44527. 8012cec: 1c43 adds r3, r0, #1
  44528. if (rem_len < 128)
  44529. 8012cee: 2b7f cmp r3, #127 @ 0x7f
  44530. 8012cf0: dc01 bgt.n 8012cf6 <MQTTPacket_len+0xa>
  44531. rem_len += 1;
  44532. 8012cf2: 3002 adds r0, #2
  44533. 8012cf4: 4770 bx lr
  44534. else if (rem_len < 16384)
  44535. 8012cf6: f5b3 4f80 cmp.w r3, #16384 @ 0x4000
  44536. 8012cfa: da01 bge.n 8012d00 <MQTTPacket_len+0x14>
  44537. rem_len += 2;
  44538. 8012cfc: 3003 adds r0, #3
  44539. 8012cfe: 4770 bx lr
  44540. else if (rem_len < 2097151)
  44541. 8012d00: 4a03 ldr r2, [pc, #12] @ (8012d10 <MQTTPacket_len+0x24>)
  44542. 8012d02: 4293 cmp r3, r2
  44543. 8012d04: dc01 bgt.n 8012d0a <MQTTPacket_len+0x1e>
  44544. rem_len += 3;
  44545. 8012d06: 3004 adds r0, #4
  44546. 8012d08: 4770 bx lr
  44547. rem_len += 4;
  44548. 8012d0a: 3005 adds r0, #5
  44549. }
  44550. 8012d0c: 4770 bx lr
  44551. 8012d0e: bf00 nop
  44552. 8012d10: 001ffffe .word 0x001ffffe
  44553. 08012d14 <MQTTPacket_decodeBuf>:
  44554. int MQTTPacket_decodeBuf(unsigned char* buf, int* value)
  44555. {
  44556. 8012d14: b508 push {r3, lr}
  44557. bufptr = buf;
  44558. 8012d16: 4b03 ldr r3, [pc, #12] @ (8012d24 <MQTTPacket_decodeBuf+0x10>)
  44559. 8012d18: 6018 str r0, [r3, #0]
  44560. return MQTTPacket_decode(bufchar, value);
  44561. 8012d1a: 4803 ldr r0, [pc, #12] @ (8012d28 <MQTTPacket_decodeBuf+0x14>)
  44562. 8012d1c: f7ff ffc7 bl 8012cae <MQTTPacket_decode>
  44563. }
  44564. 8012d20: bd08 pop {r3, pc}
  44565. 8012d22: bf00 nop
  44566. 8012d24: 24019c4c .word 0x24019c4c
  44567. 8012d28: 08012c3d .word 0x08012c3d
  44568. 08012d2c <readInt>:
  44569. * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned
  44570. * @return the integer value calculated
  44571. */
  44572. int readInt(unsigned char** pptr)
  44573. {
  44574. unsigned char* ptr = *pptr;
  44575. 8012d2c: 6803 ldr r3, [r0, #0]
  44576. int len = 256*(*ptr) + (*(ptr+1));
  44577. 8012d2e: 7819 ldrb r1, [r3, #0]
  44578. 8012d30: 785a ldrb r2, [r3, #1]
  44579. *pptr += 2;
  44580. 8012d32: 3302 adds r3, #2
  44581. 8012d34: 6003 str r3, [r0, #0]
  44582. return len;
  44583. }
  44584. 8012d36: eb02 2001 add.w r0, r2, r1, lsl #8
  44585. 8012d3a: 4770 bx lr
  44586. 08012d3c <readChar>:
  44587. * Reads one character from the input buffer.
  44588. * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned
  44589. * @return the character read
  44590. */
  44591. char readChar(unsigned char** pptr)
  44592. {
  44593. 8012d3c: 4603 mov r3, r0
  44594. char c = **pptr;
  44595. 8012d3e: 6802 ldr r2, [r0, #0]
  44596. 8012d40: f812 0b01 ldrb.w r0, [r2], #1
  44597. (*pptr)++;
  44598. 8012d44: 601a str r2, [r3, #0]
  44599. return c;
  44600. }
  44601. 8012d46: 4770 bx lr
  44602. 08012d48 <writeChar>:
  44603. * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
  44604. * @param c the character to write
  44605. */
  44606. void writeChar(unsigned char** pptr, char c)
  44607. {
  44608. **pptr = c;
  44609. 8012d48: 6803 ldr r3, [r0, #0]
  44610. 8012d4a: 7019 strb r1, [r3, #0]
  44611. (*pptr)++;
  44612. 8012d4c: 6803 ldr r3, [r0, #0]
  44613. 8012d4e: 3301 adds r3, #1
  44614. 8012d50: 6003 str r3, [r0, #0]
  44615. }
  44616. 8012d52: 4770 bx lr
  44617. 08012d54 <writeInt>:
  44618. * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
  44619. * @param anInt the integer to write
  44620. */
  44621. void writeInt(unsigned char** pptr, int anInt)
  44622. {
  44623. **pptr = (unsigned char)(anInt / 256);
  44624. 8012d54: 460b mov r3, r1
  44625. 8012d56: 2900 cmp r1, #0
  44626. 8012d58: db10 blt.n 8012d7c <writeInt+0x28>
  44627. 8012d5a: 6802 ldr r2, [r0, #0]
  44628. 8012d5c: f3c3 2307 ubfx r3, r3, #8, #8
  44629. 8012d60: 7013 strb r3, [r2, #0]
  44630. (*pptr)++;
  44631. 8012d62: 6802 ldr r2, [r0, #0]
  44632. 8012d64: 1c53 adds r3, r2, #1
  44633. 8012d66: 6003 str r3, [r0, #0]
  44634. **pptr = (unsigned char)(anInt % 256);
  44635. 8012d68: 424b negs r3, r1
  44636. 8012d6a: b2c9 uxtb r1, r1
  44637. 8012d6c: b2db uxtb r3, r3
  44638. 8012d6e: bf58 it pl
  44639. 8012d70: 4259 negpl r1, r3
  44640. 8012d72: 7051 strb r1, [r2, #1]
  44641. (*pptr)++;
  44642. 8012d74: 6803 ldr r3, [r0, #0]
  44643. 8012d76: 3301 adds r3, #1
  44644. 8012d78: 6003 str r3, [r0, #0]
  44645. }
  44646. 8012d7a: 4770 bx lr
  44647. **pptr = (unsigned char)(anInt / 256);
  44648. 8012d7c: f101 03ff add.w r3, r1, #255 @ 0xff
  44649. 8012d80: e7eb b.n 8012d5a <writeInt+0x6>
  44650. 08012d82 <writeCString>:
  44651. * Writes a "UTF" string to an output buffer. Converts C string to length-delimited.
  44652. * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
  44653. * @param string the C string to write
  44654. */
  44655. void writeCString(unsigned char** pptr, const char* string)
  44656. {
  44657. 8012d82: b570 push {r4, r5, r6, lr}
  44658. 8012d84: 4604 mov r4, r0
  44659. 8012d86: 460e mov r6, r1
  44660. int len = strlen(string);
  44661. 8012d88: 4608 mov r0, r1
  44662. 8012d8a: f7ed fab3 bl 80002f4 <strlen>
  44663. 8012d8e: 4605 mov r5, r0
  44664. writeInt(pptr, len);
  44665. 8012d90: 4601 mov r1, r0
  44666. 8012d92: 4620 mov r0, r4
  44667. 8012d94: f7ff ffde bl 8012d54 <writeInt>
  44668. memcpy(*pptr, string, len);
  44669. 8012d98: 462a mov r2, r5
  44670. 8012d9a: 4631 mov r1, r6
  44671. 8012d9c: 6820 ldr r0, [r4, #0]
  44672. 8012d9e: f000 fd70 bl 8013882 <memcpy>
  44673. *pptr += len;
  44674. 8012da2: 6823 ldr r3, [r4, #0]
  44675. 8012da4: 442b add r3, r5
  44676. 8012da6: 6023 str r3, [r4, #0]
  44677. }
  44678. 8012da8: bd70 pop {r4, r5, r6, pc}
  44679. 08012daa <writeMQTTString>:
  44680. return len;
  44681. }
  44682. void writeMQTTString(unsigned char** pptr, MQTTString mqttstring)
  44683. {
  44684. 8012daa: b530 push {r4, r5, lr}
  44685. 8012dac: b085 sub sp, #20
  44686. 8012dae: 4604 mov r4, r0
  44687. 8012db0: a804 add r0, sp, #16
  44688. 8012db2: e900 000e stmdb r0, {r1, r2, r3}
  44689. if (mqttstring.lenstring.len > 0)
  44690. 8012db6: 2a00 cmp r2, #0
  44691. 8012db8: dc05 bgt.n 8012dc6 <writeMQTTString+0x1c>
  44692. {
  44693. writeInt(pptr, mqttstring.lenstring.len);
  44694. memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len);
  44695. *pptr += mqttstring.lenstring.len;
  44696. }
  44697. else if (mqttstring.cstring)
  44698. 8012dba: 9901 ldr r1, [sp, #4]
  44699. 8012dbc: b191 cbz r1, 8012de4 <writeMQTTString+0x3a>
  44700. writeCString(pptr, mqttstring.cstring);
  44701. 8012dbe: 4620 mov r0, r4
  44702. 8012dc0: f7ff ffdf bl 8012d82 <writeCString>
  44703. 8012dc4: e00c b.n 8012de0 <writeMQTTString+0x36>
  44704. 8012dc6: 4615 mov r5, r2
  44705. writeInt(pptr, mqttstring.lenstring.len);
  44706. 8012dc8: 4611 mov r1, r2
  44707. 8012dca: 4620 mov r0, r4
  44708. 8012dcc: f7ff ffc2 bl 8012d54 <writeInt>
  44709. memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len);
  44710. 8012dd0: 462a mov r2, r5
  44711. 8012dd2: 9903 ldr r1, [sp, #12]
  44712. 8012dd4: 6820 ldr r0, [r4, #0]
  44713. 8012dd6: f000 fd54 bl 8013882 <memcpy>
  44714. *pptr += mqttstring.lenstring.len;
  44715. 8012dda: 6823 ldr r3, [r4, #0]
  44716. 8012ddc: 442b add r3, r5
  44717. 8012dde: 6023 str r3, [r4, #0]
  44718. else
  44719. writeInt(pptr, 0);
  44720. }
  44721. 8012de0: b005 add sp, #20
  44722. 8012de2: bd30 pop {r4, r5, pc}
  44723. writeInt(pptr, 0);
  44724. 8012de4: 2100 movs r1, #0
  44725. 8012de6: 4620 mov r0, r4
  44726. 8012de8: f7ff ffb4 bl 8012d54 <writeInt>
  44727. }
  44728. 8012dec: e7f8 b.n 8012de0 <writeMQTTString+0x36>
  44729. 08012dee <readMQTTLenString>:
  44730. * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned
  44731. * @param enddata pointer to the end of the data: do not read beyond
  44732. * @return 1 if successful, 0 if not
  44733. */
  44734. int readMQTTLenString(MQTTString* mqttstring, unsigned char** pptr, unsigned char* enddata)
  44735. {
  44736. 8012dee: b570 push {r4, r5, r6, lr}
  44737. 8012df0: 4605 mov r5, r0
  44738. int rc = 0;
  44739. FUNC_ENTRY;
  44740. /* the first two bytes are the length of the string */
  44741. if (enddata - (*pptr) > 1) /* enough length to read the integer? */
  44742. 8012df2: 680b ldr r3, [r1, #0]
  44743. 8012df4: 1ad3 subs r3, r2, r3
  44744. 8012df6: 2b01 cmp r3, #1
  44745. 8012df8: dc03 bgt.n 8012e02 <readMQTTLenString+0x14>
  44746. int rc = 0;
  44747. 8012dfa: 2000 movs r0, #0
  44748. mqttstring->lenstring.data = (char*)*pptr;
  44749. *pptr += mqttstring->lenstring.len;
  44750. rc = 1;
  44751. }
  44752. }
  44753. mqttstring->cstring = NULL;
  44754. 8012dfc: 2300 movs r3, #0
  44755. 8012dfe: 602b str r3, [r5, #0]
  44756. FUNC_EXIT_RC(rc);
  44757. return rc;
  44758. }
  44759. 8012e00: bd70 pop {r4, r5, r6, pc}
  44760. 8012e02: 460c mov r4, r1
  44761. 8012e04: 4616 mov r6, r2
  44762. mqttstring->lenstring.len = readInt(pptr); /* increments pptr to point past length */
  44763. 8012e06: 4608 mov r0, r1
  44764. 8012e08: f7ff ff90 bl 8012d2c <readInt>
  44765. 8012e0c: 6068 str r0, [r5, #4]
  44766. if (&(*pptr)[mqttstring->lenstring.len] <= enddata)
  44767. 8012e0e: 6823 ldr r3, [r4, #0]
  44768. 8012e10: 4418 add r0, r3
  44769. 8012e12: 42b0 cmp r0, r6
  44770. 8012e14: d803 bhi.n 8012e1e <readMQTTLenString+0x30>
  44771. mqttstring->lenstring.data = (char*)*pptr;
  44772. 8012e16: 60ab str r3, [r5, #8]
  44773. *pptr += mqttstring->lenstring.len;
  44774. 8012e18: 6020 str r0, [r4, #0]
  44775. rc = 1;
  44776. 8012e1a: 2001 movs r0, #1
  44777. 8012e1c: e7ee b.n 8012dfc <readMQTTLenString+0xe>
  44778. int rc = 0;
  44779. 8012e1e: 2000 movs r0, #0
  44780. 8012e20: e7ec b.n 8012dfc <readMQTTLenString+0xe>
  44781. 08012e22 <MQTTstrlen>:
  44782. * Return the length of the MQTTstring - C string if there is one, otherwise the length delimited string
  44783. * @param mqttstring the string to return the length of
  44784. * @return the length of the string
  44785. */
  44786. int MQTTstrlen(MQTTString mqttstring)
  44787. {
  44788. 8012e22: b500 push {lr}
  44789. 8012e24: b085 sub sp, #20
  44790. 8012e26: ab04 add r3, sp, #16
  44791. 8012e28: e903 0007 stmdb r3, {r0, r1, r2}
  44792. int rc = 0;
  44793. if (mqttstring.cstring)
  44794. 8012e2c: b120 cbz r0, 8012e38 <MQTTstrlen+0x16>
  44795. rc = strlen(mqttstring.cstring);
  44796. 8012e2e: f7ed fa61 bl 80002f4 <strlen>
  44797. else
  44798. rc = mqttstring.lenstring.len;
  44799. return rc;
  44800. }
  44801. 8012e32: b005 add sp, #20
  44802. 8012e34: f85d fb04 ldr.w pc, [sp], #4
  44803. rc = mqttstring.lenstring.len;
  44804. 8012e38: 9802 ldr r0, [sp, #8]
  44805. return rc;
  44806. 8012e3a: e7fa b.n 8012e32 <MQTTstrlen+0x10>
  44807. 08012e3c <MQTTPacket_equals>:
  44808. * @param a the MQTTString to compare
  44809. * @param bptr the C string to compare
  44810. * @return boolean - equal or not
  44811. */
  44812. int MQTTPacket_equals(MQTTString* a, char* bptr)
  44813. {
  44814. 8012e3c: b570 push {r4, r5, r6, lr}
  44815. 8012e3e: 460c mov r4, r1
  44816. int alen = 0,
  44817. blen = 0;
  44818. char *aptr;
  44819. if (a->cstring)
  44820. 8012e40: 6806 ldr r6, [r0, #0]
  44821. 8012e42: b156 cbz r6, 8012e5a <MQTTPacket_equals+0x1e>
  44822. {
  44823. aptr = a->cstring;
  44824. alen = strlen(a->cstring);
  44825. 8012e44: 4630 mov r0, r6
  44826. 8012e46: f7ed fa55 bl 80002f4 <strlen>
  44827. 8012e4a: 4605 mov r5, r0
  44828. else
  44829. {
  44830. aptr = a->lenstring.data;
  44831. alen = a->lenstring.len;
  44832. }
  44833. blen = strlen(bptr);
  44834. 8012e4c: 4620 mov r0, r4
  44835. 8012e4e: f7ed fa51 bl 80002f4 <strlen>
  44836. return (alen == blen) && (strncmp(aptr, bptr, alen) == 0);
  44837. 8012e52: 4285 cmp r5, r0
  44838. 8012e54: d004 beq.n 8012e60 <MQTTPacket_equals+0x24>
  44839. 8012e56: 2000 movs r0, #0
  44840. }
  44841. 8012e58: bd70 pop {r4, r5, r6, pc}
  44842. aptr = a->lenstring.data;
  44843. 8012e5a: 6886 ldr r6, [r0, #8]
  44844. alen = a->lenstring.len;
  44845. 8012e5c: 6845 ldr r5, [r0, #4]
  44846. 8012e5e: e7f5 b.n 8012e4c <MQTTPacket_equals+0x10>
  44847. return (alen == blen) && (strncmp(aptr, bptr, alen) == 0);
  44848. 8012e60: 462a mov r2, r5
  44849. 8012e62: 4621 mov r1, r4
  44850. 8012e64: 4630 mov r0, r6
  44851. 8012e66: f000 fc2f bl 80136c8 <strncmp>
  44852. 8012e6a: b108 cbz r0, 8012e70 <MQTTPacket_equals+0x34>
  44853. 8012e6c: 2000 movs r0, #0
  44854. 8012e6e: e7f3 b.n 8012e58 <MQTTPacket_equals+0x1c>
  44855. 8012e70: 2001 movs r0, #1
  44856. 8012e72: e7f1 b.n 8012e58 <MQTTPacket_equals+0x1c>
  44857. 08012e74 <MQTTSerialize_publishLength>:
  44858. * @param topicName the topic name to be used in the publish
  44859. * @param payloadlen the length of the payload to be sent
  44860. * @return the length of buffer needed to contain the serialized version of the packet
  44861. */
  44862. int MQTTSerialize_publishLength(int qos, MQTTString topicName, int payloadlen)
  44863. {
  44864. 8012e74: b510 push {r4, lr}
  44865. 8012e76: b084 sub sp, #16
  44866. 8012e78: 4604 mov r4, r0
  44867. 8012e7a: f10d 0c04 add.w ip, sp, #4
  44868. 8012e7e: e88c 000e stmia.w ip, {r1, r2, r3}
  44869. int len = 0;
  44870. len += 2 + MQTTstrlen(topicName) + payloadlen;
  44871. 8012e82: e89c 0007 ldmia.w ip, {r0, r1, r2}
  44872. 8012e86: f7ff ffcc bl 8012e22 <MQTTstrlen>
  44873. 8012e8a: 1c83 adds r3, r0, #2
  44874. 8012e8c: 9a06 ldr r2, [sp, #24]
  44875. 8012e8e: 1898 adds r0, r3, r2
  44876. if (qos > 0)
  44877. 8012e90: 2c00 cmp r4, #0
  44878. 8012e92: dd00 ble.n 8012e96 <MQTTSerialize_publishLength+0x22>
  44879. len += 2; /* packetid */
  44880. 8012e94: 3002 adds r0, #2
  44881. return len;
  44882. }
  44883. 8012e96: b004 add sp, #16
  44884. 8012e98: bd10 pop {r4, pc}
  44885. 08012e9a <MQTTSerialize_publish>:
  44886. * @param payloadlen integer - the length of the MQTT payload
  44887. * @return the length of the serialized data. <= 0 indicates error
  44888. */
  44889. int MQTTSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid,
  44890. MQTTString topicName, unsigned char* payload, int payloadlen)
  44891. {
  44892. 8012e9a: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  44893. 8012e9e: b084 sub sp, #16
  44894. 8012ea0: 4606 mov r6, r0
  44895. 8012ea2: 460f mov r7, r1
  44896. 8012ea4: 4690 mov r8, r2
  44897. 8012ea6: 461c mov r4, r3
  44898. 8012ea8: f8dd 9048 ldr.w r9, [sp, #72] @ 0x48
  44899. unsigned char *ptr = buf;
  44900. 8012eac: 9003 str r0, [sp, #12]
  44901. MQTTHeader header = {0};
  44902. int rem_len = 0;
  44903. int rc = 0;
  44904. FUNC_ENTRY;
  44905. if (MQTTPacket_len(rem_len = MQTTSerialize_publishLength(qos, topicName, payloadlen)) > buflen)
  44906. 8012eae: f8cd 9000 str.w r9, [sp]
  44907. 8012eb2: ab0e add r3, sp, #56 @ 0x38
  44908. 8012eb4: cb0e ldmia r3, {r1, r2, r3}
  44909. 8012eb6: 4620 mov r0, r4
  44910. 8012eb8: f7ff ffdc bl 8012e74 <MQTTSerialize_publishLength>
  44911. 8012ebc: 4682 mov sl, r0
  44912. 8012ebe: f7ff ff15 bl 8012cec <MQTTPacket_len>
  44913. 8012ec2: 42b8 cmp r0, r7
  44914. 8012ec4: dc2f bgt.n 8012f26 <MQTTSerialize_publish+0x8c>
  44915. 8012ec6: 2500 movs r5, #0
  44916. {
  44917. rc = MQTTPACKET_BUFFER_TOO_SHORT;
  44918. goto exit;
  44919. }
  44920. header.bits.type = PUBLISH;
  44921. 8012ec8: 2303 movs r3, #3
  44922. 8012eca: f363 1507 bfi r5, r3, #4, #4
  44923. header.bits.dup = dup;
  44924. 8012ece: f368 05c3 bfi r5, r8, #3, #1
  44925. header.bits.qos = qos;
  44926. 8012ed2: f364 0542 bfi r5, r4, #1, #2
  44927. header.bits.retain = retained;
  44928. 8012ed6: f89d 3030 ldrb.w r3, [sp, #48] @ 0x30
  44929. 8012eda: f363 0500 bfi r5, r3, #0, #1
  44930. writeChar(&ptr, header.byte); /* write header */
  44931. 8012ede: b2e9 uxtb r1, r5
  44932. 8012ee0: a803 add r0, sp, #12
  44933. 8012ee2: f7ff ff31 bl 8012d48 <writeChar>
  44934. ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */;
  44935. 8012ee6: 4651 mov r1, sl
  44936. 8012ee8: 9803 ldr r0, [sp, #12]
  44937. 8012eea: f7ff febd bl 8012c68 <MQTTPacket_encode>
  44938. 8012eee: 9b03 ldr r3, [sp, #12]
  44939. 8012ef0: 4403 add r3, r0
  44940. 8012ef2: 9303 str r3, [sp, #12]
  44941. writeMQTTString(&ptr, topicName);
  44942. 8012ef4: ab0e add r3, sp, #56 @ 0x38
  44943. 8012ef6: cb0e ldmia r3, {r1, r2, r3}
  44944. 8012ef8: a803 add r0, sp, #12
  44945. 8012efa: f7ff ff56 bl 8012daa <writeMQTTString>
  44946. if (qos > 0)
  44947. 8012efe: 2c00 cmp r4, #0
  44948. 8012f00: dc0b bgt.n 8012f1a <MQTTSerialize_publish+0x80>
  44949. writeInt(&ptr, packetid);
  44950. memcpy(ptr, payload, payloadlen);
  44951. 8012f02: 464a mov r2, r9
  44952. 8012f04: 9911 ldr r1, [sp, #68] @ 0x44
  44953. 8012f06: 9803 ldr r0, [sp, #12]
  44954. 8012f08: f000 fcbb bl 8013882 <memcpy>
  44955. ptr += payloadlen;
  44956. 8012f0c: 9a03 ldr r2, [sp, #12]
  44957. 8012f0e: 444a add r2, r9
  44958. 8012f10: 9203 str r2, [sp, #12]
  44959. rc = ptr - buf;
  44960. 8012f12: 1b90 subs r0, r2, r6
  44961. exit:
  44962. FUNC_EXIT_RC(rc);
  44963. return rc;
  44964. }
  44965. 8012f14: b004 add sp, #16
  44966. 8012f16: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  44967. writeInt(&ptr, packetid);
  44968. 8012f1a: f8bd 1034 ldrh.w r1, [sp, #52] @ 0x34
  44969. 8012f1e: a803 add r0, sp, #12
  44970. 8012f20: f7ff ff18 bl 8012d54 <writeInt>
  44971. 8012f24: e7ed b.n 8012f02 <MQTTSerialize_publish+0x68>
  44972. rc = MQTTPACKET_BUFFER_TOO_SHORT;
  44973. 8012f26: f06f 0001 mvn.w r0, #1
  44974. return rc;
  44975. 8012f2a: e7f3 b.n 8012f14 <MQTTSerialize_publish+0x7a>
  44976. 08012f2c <MQTTSerialize_ack>:
  44977. * @param dup the MQTT dup flag
  44978. * @param packetid the MQTT packet identifier
  44979. * @return serialized length, or error if 0
  44980. */
  44981. int MQTTSerialize_ack(unsigned char* buf, int buflen, unsigned char packettype, unsigned char dup, unsigned short packetid)
  44982. {
  44983. 8012f2c: b510 push {r4, lr}
  44984. 8012f2e: b082 sub sp, #8
  44985. 8012f30: 4604 mov r4, r0
  44986. MQTTHeader header = {0};
  44987. int rc = 0;
  44988. unsigned char *ptr = buf;
  44989. 8012f32: 9001 str r0, [sp, #4]
  44990. FUNC_ENTRY;
  44991. if (buflen < 4)
  44992. 8012f34: 2903 cmp r1, #3
  44993. 8012f36: dd1e ble.n 8012f76 <MQTTSerialize_ack+0x4a>
  44994. 8012f38: 2000 movs r0, #0
  44995. {
  44996. rc = MQTTPACKET_BUFFER_TOO_SHORT;
  44997. goto exit;
  44998. }
  44999. header.bits.type = packettype;
  45000. 8012f3a: f362 1007 bfi r0, r2, #4, #4
  45001. header.bits.dup = dup;
  45002. 8012f3e: f363 00c3 bfi r0, r3, #3, #1
  45003. header.bits.qos = (packettype == PUBREL) ? 1 : 0;
  45004. 8012f42: 2a06 cmp r2, #6
  45005. 8012f44: bf14 ite ne
  45006. 8012f46: 2200 movne r2, #0
  45007. 8012f48: 2201 moveq r2, #1
  45008. 8012f4a: f362 0042 bfi r0, r2, #1, #2
  45009. writeChar(&ptr, header.byte); /* write header */
  45010. 8012f4e: b2c1 uxtb r1, r0
  45011. 8012f50: a801 add r0, sp, #4
  45012. 8012f52: f7ff fef9 bl 8012d48 <writeChar>
  45013. ptr += MQTTPacket_encode(ptr, 2); /* write remaining length */
  45014. 8012f56: 2102 movs r1, #2
  45015. 8012f58: 9801 ldr r0, [sp, #4]
  45016. 8012f5a: f7ff fe85 bl 8012c68 <MQTTPacket_encode>
  45017. 8012f5e: 9b01 ldr r3, [sp, #4]
  45018. 8012f60: 4403 add r3, r0
  45019. 8012f62: 9301 str r3, [sp, #4]
  45020. writeInt(&ptr, packetid);
  45021. 8012f64: f8bd 1010 ldrh.w r1, [sp, #16]
  45022. 8012f68: a801 add r0, sp, #4
  45023. 8012f6a: f7ff fef3 bl 8012d54 <writeInt>
  45024. rc = ptr - buf;
  45025. 8012f6e: 9801 ldr r0, [sp, #4]
  45026. 8012f70: 1b00 subs r0, r0, r4
  45027. exit:
  45028. FUNC_EXIT_RC(rc);
  45029. return rc;
  45030. }
  45031. 8012f72: b002 add sp, #8
  45032. 8012f74: bd10 pop {r4, pc}
  45033. rc = MQTTPACKET_BUFFER_TOO_SHORT;
  45034. 8012f76: f06f 0001 mvn.w r0, #1
  45035. return rc;
  45036. 8012f7a: e7fa b.n 8012f72 <MQTTSerialize_ack+0x46>
  45037. 08012f7c <MQTTSerialize_subscribeLength>:
  45038. * @param count the number of topic filter strings in topicFilters
  45039. * @param topicFilters the array of topic filter strings to be used in the publish
  45040. * @return the length of buffer needed to contain the serialized version of the packet
  45041. */
  45042. int MQTTSerialize_subscribeLength(int count, MQTTString topicFilters[])
  45043. {
  45044. 8012f7c: b5f8 push {r3, r4, r5, r6, r7, lr}
  45045. 8012f7e: 4606 mov r6, r0
  45046. 8012f80: 460f mov r7, r1
  45047. int i;
  45048. int len = 2; /* packetid */
  45049. 8012f82: 2502 movs r5, #2
  45050. for (i = 0; i < count; ++i)
  45051. 8012f84: 2400 movs r4, #0
  45052. 8012f86: e00a b.n 8012f9e <MQTTSerialize_subscribeLength+0x22>
  45053. len += 2 + MQTTstrlen(topicFilters[i]) + 1; /* length + topic + req_qos */
  45054. 8012f88: eb04 0344 add.w r3, r4, r4, lsl #1
  45055. 8012f8c: eb07 0383 add.w r3, r7, r3, lsl #2
  45056. 8012f90: e893 0007 ldmia.w r3, {r0, r1, r2}
  45057. 8012f94: f7ff ff45 bl 8012e22 <MQTTstrlen>
  45058. 8012f98: 3003 adds r0, #3
  45059. 8012f9a: 4405 add r5, r0
  45060. for (i = 0; i < count; ++i)
  45061. 8012f9c: 3401 adds r4, #1
  45062. 8012f9e: 42b4 cmp r4, r6
  45063. 8012fa0: dbf2 blt.n 8012f88 <MQTTSerialize_subscribeLength+0xc>
  45064. return len;
  45065. }
  45066. 8012fa2: 4628 mov r0, r5
  45067. 8012fa4: bdf8 pop {r3, r4, r5, r6, r7, pc}
  45068. 08012fa6 <MQTTSerialize_subscribe>:
  45069. * @param requestedQoSs - array of requested QoS
  45070. * @return the length of the serialized data. <= 0 indicates error
  45071. */
  45072. int MQTTSerialize_subscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid, int count,
  45073. MQTTString topicFilters[], int requestedQoSs[])
  45074. {
  45075. 8012fa6: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  45076. 8012faa: b085 sub sp, #20
  45077. 8012fac: 4607 mov r7, r0
  45078. 8012fae: 4689 mov r9, r1
  45079. 8012fb0: 4692 mov sl, r2
  45080. 8012fb2: 9301 str r3, [sp, #4]
  45081. 8012fb4: 9c0e ldr r4, [sp, #56] @ 0x38
  45082. 8012fb6: 9d0f ldr r5, [sp, #60] @ 0x3c
  45083. 8012fb8: 9e10 ldr r6, [sp, #64] @ 0x40
  45084. unsigned char *ptr = buf;
  45085. 8012fba: 9003 str r0, [sp, #12]
  45086. int rem_len = 0;
  45087. int rc = 0;
  45088. int i = 0;
  45089. FUNC_ENTRY;
  45090. if (MQTTPacket_len(rem_len = MQTTSerialize_subscribeLength(count, topicFilters)) > buflen)
  45091. 8012fbc: 4629 mov r1, r5
  45092. 8012fbe: 4620 mov r0, r4
  45093. 8012fc0: f7ff ffdc bl 8012f7c <MQTTSerialize_subscribeLength>
  45094. 8012fc4: 4683 mov fp, r0
  45095. 8012fc6: f7ff fe91 bl 8012cec <MQTTPacket_len>
  45096. 8012fca: 4548 cmp r0, r9
  45097. 8012fcc: dc32 bgt.n 8013034 <MQTTSerialize_subscribe+0x8e>
  45098. 8012fce: f04f 0800 mov.w r8, #0
  45099. rc = MQTTPACKET_BUFFER_TOO_SHORT;
  45100. goto exit;
  45101. }
  45102. header.byte = 0;
  45103. header.bits.type = SUBSCRIBE;
  45104. 8012fd2: 2308 movs r3, #8
  45105. 8012fd4: f363 1807 bfi r8, r3, #4, #4
  45106. header.bits.dup = dup;
  45107. 8012fd8: f36a 08c3 bfi r8, sl, #3, #1
  45108. header.bits.qos = 1;
  45109. 8012fdc: 2301 movs r3, #1
  45110. 8012fde: f363 0842 bfi r8, r3, #1, #2
  45111. writeChar(&ptr, header.byte); /* write header */
  45112. 8012fe2: fa5f f188 uxtb.w r1, r8
  45113. 8012fe6: a803 add r0, sp, #12
  45114. 8012fe8: f7ff feae bl 8012d48 <writeChar>
  45115. ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */;
  45116. 8012fec: 4659 mov r1, fp
  45117. 8012fee: 9803 ldr r0, [sp, #12]
  45118. 8012ff0: f7ff fe3a bl 8012c68 <MQTTPacket_encode>
  45119. 8012ff4: 9b03 ldr r3, [sp, #12]
  45120. 8012ff6: 4403 add r3, r0
  45121. 8012ff8: 9303 str r3, [sp, #12]
  45122. writeInt(&ptr, packetid);
  45123. 8012ffa: 9901 ldr r1, [sp, #4]
  45124. 8012ffc: a803 add r0, sp, #12
  45125. 8012ffe: f7ff fea9 bl 8012d54 <writeInt>
  45126. for (i = 0; i < count; ++i)
  45127. 8013002: f04f 0800 mov.w r8, #0
  45128. 8013006: e00e b.n 8013026 <MQTTSerialize_subscribe+0x80>
  45129. {
  45130. writeMQTTString(&ptr, topicFilters[i]);
  45131. 8013008: eb08 0348 add.w r3, r8, r8, lsl #1
  45132. 801300c: eb05 0383 add.w r3, r5, r3, lsl #2
  45133. 8013010: cb0e ldmia r3, {r1, r2, r3}
  45134. 8013012: a803 add r0, sp, #12
  45135. 8013014: f7ff fec9 bl 8012daa <writeMQTTString>
  45136. writeChar(&ptr, requestedQoSs[i]);
  45137. 8013018: f816 1028 ldrb.w r1, [r6, r8, lsl #2]
  45138. 801301c: a803 add r0, sp, #12
  45139. 801301e: f7ff fe93 bl 8012d48 <writeChar>
  45140. for (i = 0; i < count; ++i)
  45141. 8013022: f108 0801 add.w r8, r8, #1
  45142. 8013026: 45a0 cmp r8, r4
  45143. 8013028: dbee blt.n 8013008 <MQTTSerialize_subscribe+0x62>
  45144. }
  45145. rc = ptr - buf;
  45146. 801302a: 9803 ldr r0, [sp, #12]
  45147. 801302c: 1bc0 subs r0, r0, r7
  45148. exit:
  45149. FUNC_EXIT_RC(rc);
  45150. return rc;
  45151. }
  45152. 801302e: b005 add sp, #20
  45153. 8013030: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  45154. rc = MQTTPACKET_BUFFER_TOO_SHORT;
  45155. 8013034: f06f 0001 mvn.w r0, #1
  45156. return rc;
  45157. 8013038: e7f9 b.n 801302e <MQTTSerialize_subscribe+0x88>
  45158. 0801303a <MQTTDeserialize_suback>:
  45159. * @param buf the raw buffer data, of the correct length determined by the remaining length field
  45160. * @param buflen the length in bytes of the data in the supplied buffer
  45161. * @return error code. 1 is success, 0 is failure
  45162. */
  45163. int MQTTDeserialize_suback(unsigned short* packetid, int maxcount, int* count, int grantedQoSs[], unsigned char* buf, int buflen)
  45164. {
  45165. 801303a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  45166. 801303e: b082 sub sp, #8
  45167. 8013040: 4680 mov r8, r0
  45168. 8013042: 460d mov r5, r1
  45169. 8013044: 4614 mov r4, r2
  45170. 8013046: 461e mov r6, r3
  45171. MQTTHeader header = {0};
  45172. unsigned char* curdata = buf;
  45173. 8013048: 9b08 ldr r3, [sp, #32]
  45174. 801304a: 9301 str r3, [sp, #4]
  45175. unsigned char* enddata = NULL;
  45176. int rc = 0;
  45177. int mylen;
  45178. FUNC_ENTRY;
  45179. header.byte = readChar(&curdata);
  45180. 801304c: a801 add r0, sp, #4
  45181. 801304e: f7ff fe75 bl 8012d3c <readChar>
  45182. if (header.bits.type != SUBACK)
  45183. 8013052: f000 03f0 and.w r3, r0, #240 @ 0xf0
  45184. 8013056: 2b90 cmp r3, #144 @ 0x90
  45185. 8013058: d003 beq.n 8013062 <MQTTDeserialize_suback+0x28>
  45186. int rc = 0;
  45187. 801305a: 2000 movs r0, #0
  45188. rc = 1;
  45189. exit:
  45190. FUNC_EXIT_RC(rc);
  45191. return rc;
  45192. }
  45193. 801305c: b002 add sp, #8
  45194. 801305e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  45195. curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */
  45196. 8013062: 4669 mov r1, sp
  45197. 8013064: 9801 ldr r0, [sp, #4]
  45198. 8013066: f7ff fe55 bl 8012d14 <MQTTPacket_decodeBuf>
  45199. 801306a: 9f01 ldr r7, [sp, #4]
  45200. 801306c: 4407 add r7, r0
  45201. 801306e: 9701 str r7, [sp, #4]
  45202. enddata = curdata + mylen;
  45203. 8013070: 9b00 ldr r3, [sp, #0]
  45204. 8013072: 441f add r7, r3
  45205. if (enddata - curdata < 2)
  45206. 8013074: 2b01 cmp r3, #1
  45207. 8013076: ddf1 ble.n 801305c <MQTTDeserialize_suback+0x22>
  45208. *packetid = readInt(&curdata);
  45209. 8013078: a801 add r0, sp, #4
  45210. 801307a: f7ff fe57 bl 8012d2c <readInt>
  45211. 801307e: f8a8 0000 strh.w r0, [r8]
  45212. *count = 0;
  45213. 8013082: 2300 movs r3, #0
  45214. 8013084: 6023 str r3, [r4, #0]
  45215. while (curdata < enddata)
  45216. 8013086: 9b01 ldr r3, [sp, #4]
  45217. 8013088: 42bb cmp r3, r7
  45218. 801308a: d20b bcs.n 80130a4 <MQTTDeserialize_suback+0x6a>
  45219. if (*count > maxcount)
  45220. 801308c: 6823 ldr r3, [r4, #0]
  45221. 801308e: 42ab cmp r3, r5
  45222. 8013090: dc0a bgt.n 80130a8 <MQTTDeserialize_suback+0x6e>
  45223. grantedQoSs[(*count)++] = readChar(&curdata);
  45224. 8013092: a801 add r0, sp, #4
  45225. 8013094: f7ff fe52 bl 8012d3c <readChar>
  45226. 8013098: 6822 ldr r2, [r4, #0]
  45227. 801309a: 1c53 adds r3, r2, #1
  45228. 801309c: 6023 str r3, [r4, #0]
  45229. 801309e: f846 0022 str.w r0, [r6, r2, lsl #2]
  45230. 80130a2: e7f0 b.n 8013086 <MQTTDeserialize_suback+0x4c>
  45231. rc = 1;
  45232. 80130a4: 2001 movs r0, #1
  45233. 80130a6: e7d9 b.n 801305c <MQTTDeserialize_suback+0x22>
  45234. rc = -1;
  45235. 80130a8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  45236. return rc;
  45237. 80130ac: e7d6 b.n 801305c <MQTTDeserialize_suback+0x22>
  45238. ...
  45239. 080130b0 <rand>:
  45240. 80130b0: 4b16 ldr r3, [pc, #88] @ (801310c <rand+0x5c>)
  45241. 80130b2: b510 push {r4, lr}
  45242. 80130b4: 681c ldr r4, [r3, #0]
  45243. 80130b6: 6b23 ldr r3, [r4, #48] @ 0x30
  45244. 80130b8: b9b3 cbnz r3, 80130e8 <rand+0x38>
  45245. 80130ba: 2018 movs r0, #24
  45246. 80130bc: f000 fc58 bl 8013970 <malloc>
  45247. 80130c0: 4602 mov r2, r0
  45248. 80130c2: 6320 str r0, [r4, #48] @ 0x30
  45249. 80130c4: b920 cbnz r0, 80130d0 <rand+0x20>
  45250. 80130c6: 4b12 ldr r3, [pc, #72] @ (8013110 <rand+0x60>)
  45251. 80130c8: 4812 ldr r0, [pc, #72] @ (8013114 <rand+0x64>)
  45252. 80130ca: 2152 movs r1, #82 @ 0x52
  45253. 80130cc: f000 fbe8 bl 80138a0 <__assert_func>
  45254. 80130d0: 4911 ldr r1, [pc, #68] @ (8013118 <rand+0x68>)
  45255. 80130d2: 4b12 ldr r3, [pc, #72] @ (801311c <rand+0x6c>)
  45256. 80130d4: e9c0 1300 strd r1, r3, [r0]
  45257. 80130d8: 4b11 ldr r3, [pc, #68] @ (8013120 <rand+0x70>)
  45258. 80130da: 6083 str r3, [r0, #8]
  45259. 80130dc: 230b movs r3, #11
  45260. 80130de: 8183 strh r3, [r0, #12]
  45261. 80130e0: 2100 movs r1, #0
  45262. 80130e2: 2001 movs r0, #1
  45263. 80130e4: e9c2 0104 strd r0, r1, [r2, #16]
  45264. 80130e8: 6b21 ldr r1, [r4, #48] @ 0x30
  45265. 80130ea: 480e ldr r0, [pc, #56] @ (8013124 <rand+0x74>)
  45266. 80130ec: 690b ldr r3, [r1, #16]
  45267. 80130ee: 694c ldr r4, [r1, #20]
  45268. 80130f0: 4a0d ldr r2, [pc, #52] @ (8013128 <rand+0x78>)
  45269. 80130f2: 4358 muls r0, r3
  45270. 80130f4: fb02 0004 mla r0, r2, r4, r0
  45271. 80130f8: fba3 3202 umull r3, r2, r3, r2
  45272. 80130fc: 3301 adds r3, #1
  45273. 80130fe: eb40 0002 adc.w r0, r0, r2
  45274. 8013102: e9c1 3004 strd r3, r0, [r1, #16]
  45275. 8013106: f020 4000 bic.w r0, r0, #2147483648 @ 0x80000000
  45276. 801310a: bd10 pop {r4, pc}
  45277. 801310c: 2400003c .word 0x2400003c
  45278. 8013110: 08017edb .word 0x08017edb
  45279. 8013114: 08017ef2 .word 0x08017ef2
  45280. 8013118: abcd330e .word 0xabcd330e
  45281. 801311c: e66d1234 .word 0xe66d1234
  45282. 8013120: 0005deec .word 0x0005deec
  45283. 8013124: 5851f42d .word 0x5851f42d
  45284. 8013128: 4c957f2d .word 0x4c957f2d
  45285. 0801312c <__sflush_r>:
  45286. 801312c: f9b1 200c ldrsh.w r2, [r1, #12]
  45287. 8013130: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  45288. 8013134: 0716 lsls r6, r2, #28
  45289. 8013136: 4605 mov r5, r0
  45290. 8013138: 460c mov r4, r1
  45291. 801313a: d454 bmi.n 80131e6 <__sflush_r+0xba>
  45292. 801313c: 684b ldr r3, [r1, #4]
  45293. 801313e: 2b00 cmp r3, #0
  45294. 8013140: dc02 bgt.n 8013148 <__sflush_r+0x1c>
  45295. 8013142: 6c0b ldr r3, [r1, #64] @ 0x40
  45296. 8013144: 2b00 cmp r3, #0
  45297. 8013146: dd48 ble.n 80131da <__sflush_r+0xae>
  45298. 8013148: 6ae6 ldr r6, [r4, #44] @ 0x2c
  45299. 801314a: 2e00 cmp r6, #0
  45300. 801314c: d045 beq.n 80131da <__sflush_r+0xae>
  45301. 801314e: 2300 movs r3, #0
  45302. 8013150: f412 5280 ands.w r2, r2, #4096 @ 0x1000
  45303. 8013154: 682f ldr r7, [r5, #0]
  45304. 8013156: 6a21 ldr r1, [r4, #32]
  45305. 8013158: 602b str r3, [r5, #0]
  45306. 801315a: d030 beq.n 80131be <__sflush_r+0x92>
  45307. 801315c: 6d62 ldr r2, [r4, #84] @ 0x54
  45308. 801315e: 89a3 ldrh r3, [r4, #12]
  45309. 8013160: 0759 lsls r1, r3, #29
  45310. 8013162: d505 bpl.n 8013170 <__sflush_r+0x44>
  45311. 8013164: 6863 ldr r3, [r4, #4]
  45312. 8013166: 1ad2 subs r2, r2, r3
  45313. 8013168: 6b63 ldr r3, [r4, #52] @ 0x34
  45314. 801316a: b10b cbz r3, 8013170 <__sflush_r+0x44>
  45315. 801316c: 6c23 ldr r3, [r4, #64] @ 0x40
  45316. 801316e: 1ad2 subs r2, r2, r3
  45317. 8013170: 2300 movs r3, #0
  45318. 8013172: 6ae6 ldr r6, [r4, #44] @ 0x2c
  45319. 8013174: 6a21 ldr r1, [r4, #32]
  45320. 8013176: 4628 mov r0, r5
  45321. 8013178: 47b0 blx r6
  45322. 801317a: 1c43 adds r3, r0, #1
  45323. 801317c: 89a3 ldrh r3, [r4, #12]
  45324. 801317e: d106 bne.n 801318e <__sflush_r+0x62>
  45325. 8013180: 6829 ldr r1, [r5, #0]
  45326. 8013182: 291d cmp r1, #29
  45327. 8013184: d82b bhi.n 80131de <__sflush_r+0xb2>
  45328. 8013186: 4a2a ldr r2, [pc, #168] @ (8013230 <__sflush_r+0x104>)
  45329. 8013188: 410a asrs r2, r1
  45330. 801318a: 07d6 lsls r6, r2, #31
  45331. 801318c: d427 bmi.n 80131de <__sflush_r+0xb2>
  45332. 801318e: 2200 movs r2, #0
  45333. 8013190: 6062 str r2, [r4, #4]
  45334. 8013192: 04d9 lsls r1, r3, #19
  45335. 8013194: 6922 ldr r2, [r4, #16]
  45336. 8013196: 6022 str r2, [r4, #0]
  45337. 8013198: d504 bpl.n 80131a4 <__sflush_r+0x78>
  45338. 801319a: 1c42 adds r2, r0, #1
  45339. 801319c: d101 bne.n 80131a2 <__sflush_r+0x76>
  45340. 801319e: 682b ldr r3, [r5, #0]
  45341. 80131a0: b903 cbnz r3, 80131a4 <__sflush_r+0x78>
  45342. 80131a2: 6560 str r0, [r4, #84] @ 0x54
  45343. 80131a4: 6b61 ldr r1, [r4, #52] @ 0x34
  45344. 80131a6: 602f str r7, [r5, #0]
  45345. 80131a8: b1b9 cbz r1, 80131da <__sflush_r+0xae>
  45346. 80131aa: f104 0344 add.w r3, r4, #68 @ 0x44
  45347. 80131ae: 4299 cmp r1, r3
  45348. 80131b0: d002 beq.n 80131b8 <__sflush_r+0x8c>
  45349. 80131b2: 4628 mov r0, r5
  45350. 80131b4: f000 fb92 bl 80138dc <_free_r>
  45351. 80131b8: 2300 movs r3, #0
  45352. 80131ba: 6363 str r3, [r4, #52] @ 0x34
  45353. 80131bc: e00d b.n 80131da <__sflush_r+0xae>
  45354. 80131be: 2301 movs r3, #1
  45355. 80131c0: 4628 mov r0, r5
  45356. 80131c2: 47b0 blx r6
  45357. 80131c4: 4602 mov r2, r0
  45358. 80131c6: 1c50 adds r0, r2, #1
  45359. 80131c8: d1c9 bne.n 801315e <__sflush_r+0x32>
  45360. 80131ca: 682b ldr r3, [r5, #0]
  45361. 80131cc: 2b00 cmp r3, #0
  45362. 80131ce: d0c6 beq.n 801315e <__sflush_r+0x32>
  45363. 80131d0: 2b1d cmp r3, #29
  45364. 80131d2: d001 beq.n 80131d8 <__sflush_r+0xac>
  45365. 80131d4: 2b16 cmp r3, #22
  45366. 80131d6: d11e bne.n 8013216 <__sflush_r+0xea>
  45367. 80131d8: 602f str r7, [r5, #0]
  45368. 80131da: 2000 movs r0, #0
  45369. 80131dc: e022 b.n 8013224 <__sflush_r+0xf8>
  45370. 80131de: f043 0340 orr.w r3, r3, #64 @ 0x40
  45371. 80131e2: b21b sxth r3, r3
  45372. 80131e4: e01b b.n 801321e <__sflush_r+0xf2>
  45373. 80131e6: 690f ldr r7, [r1, #16]
  45374. 80131e8: 2f00 cmp r7, #0
  45375. 80131ea: d0f6 beq.n 80131da <__sflush_r+0xae>
  45376. 80131ec: 0793 lsls r3, r2, #30
  45377. 80131ee: 680e ldr r6, [r1, #0]
  45378. 80131f0: bf08 it eq
  45379. 80131f2: 694b ldreq r3, [r1, #20]
  45380. 80131f4: 600f str r7, [r1, #0]
  45381. 80131f6: bf18 it ne
  45382. 80131f8: 2300 movne r3, #0
  45383. 80131fa: eba6 0807 sub.w r8, r6, r7
  45384. 80131fe: 608b str r3, [r1, #8]
  45385. 8013200: f1b8 0f00 cmp.w r8, #0
  45386. 8013204: dde9 ble.n 80131da <__sflush_r+0xae>
  45387. 8013206: 6a21 ldr r1, [r4, #32]
  45388. 8013208: 6aa6 ldr r6, [r4, #40] @ 0x28
  45389. 801320a: 4643 mov r3, r8
  45390. 801320c: 463a mov r2, r7
  45391. 801320e: 4628 mov r0, r5
  45392. 8013210: 47b0 blx r6
  45393. 8013212: 2800 cmp r0, #0
  45394. 8013214: dc08 bgt.n 8013228 <__sflush_r+0xfc>
  45395. 8013216: f9b4 300c ldrsh.w r3, [r4, #12]
  45396. 801321a: f043 0340 orr.w r3, r3, #64 @ 0x40
  45397. 801321e: 81a3 strh r3, [r4, #12]
  45398. 8013220: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  45399. 8013224: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc}
  45400. 8013228: 4407 add r7, r0
  45401. 801322a: eba8 0800 sub.w r8, r8, r0
  45402. 801322e: e7e7 b.n 8013200 <__sflush_r+0xd4>
  45403. 8013230: dfbffffe .word 0xdfbffffe
  45404. 08013234 <_fflush_r>:
  45405. 8013234: b538 push {r3, r4, r5, lr}
  45406. 8013236: 690b ldr r3, [r1, #16]
  45407. 8013238: 4605 mov r5, r0
  45408. 801323a: 460c mov r4, r1
  45409. 801323c: b913 cbnz r3, 8013244 <_fflush_r+0x10>
  45410. 801323e: 2500 movs r5, #0
  45411. 8013240: 4628 mov r0, r5
  45412. 8013242: bd38 pop {r3, r4, r5, pc}
  45413. 8013244: b118 cbz r0, 801324e <_fflush_r+0x1a>
  45414. 8013246: 6a03 ldr r3, [r0, #32]
  45415. 8013248: b90b cbnz r3, 801324e <_fflush_r+0x1a>
  45416. 801324a: f000 f8a7 bl 801339c <__sinit>
  45417. 801324e: f9b4 300c ldrsh.w r3, [r4, #12]
  45418. 8013252: 2b00 cmp r3, #0
  45419. 8013254: d0f3 beq.n 801323e <_fflush_r+0xa>
  45420. 8013256: 6e62 ldr r2, [r4, #100] @ 0x64
  45421. 8013258: 07d0 lsls r0, r2, #31
  45422. 801325a: d404 bmi.n 8013266 <_fflush_r+0x32>
  45423. 801325c: 0599 lsls r1, r3, #22
  45424. 801325e: d402 bmi.n 8013266 <_fflush_r+0x32>
  45425. 8013260: 6da0 ldr r0, [r4, #88] @ 0x58
  45426. 8013262: f000 fb04 bl 801386e <__retarget_lock_acquire_recursive>
  45427. 8013266: 4628 mov r0, r5
  45428. 8013268: 4621 mov r1, r4
  45429. 801326a: f7ff ff5f bl 801312c <__sflush_r>
  45430. 801326e: 6e63 ldr r3, [r4, #100] @ 0x64
  45431. 8013270: 07da lsls r2, r3, #31
  45432. 8013272: 4605 mov r5, r0
  45433. 8013274: d4e4 bmi.n 8013240 <_fflush_r+0xc>
  45434. 8013276: 89a3 ldrh r3, [r4, #12]
  45435. 8013278: 059b lsls r3, r3, #22
  45436. 801327a: d4e1 bmi.n 8013240 <_fflush_r+0xc>
  45437. 801327c: 6da0 ldr r0, [r4, #88] @ 0x58
  45438. 801327e: f000 faf7 bl 8013870 <__retarget_lock_release_recursive>
  45439. 8013282: e7dd b.n 8013240 <_fflush_r+0xc>
  45440. 08013284 <std>:
  45441. 8013284: 2300 movs r3, #0
  45442. 8013286: b510 push {r4, lr}
  45443. 8013288: 4604 mov r4, r0
  45444. 801328a: e9c0 3300 strd r3, r3, [r0]
  45445. 801328e: e9c0 3304 strd r3, r3, [r0, #16]
  45446. 8013292: 6083 str r3, [r0, #8]
  45447. 8013294: 8181 strh r1, [r0, #12]
  45448. 8013296: 6643 str r3, [r0, #100] @ 0x64
  45449. 8013298: 81c2 strh r2, [r0, #14]
  45450. 801329a: 6183 str r3, [r0, #24]
  45451. 801329c: 4619 mov r1, r3
  45452. 801329e: 2208 movs r2, #8
  45453. 80132a0: 305c adds r0, #92 @ 0x5c
  45454. 80132a2: f000 fa09 bl 80136b8 <memset>
  45455. 80132a6: 4b0d ldr r3, [pc, #52] @ (80132dc <std+0x58>)
  45456. 80132a8: 6263 str r3, [r4, #36] @ 0x24
  45457. 80132aa: 4b0d ldr r3, [pc, #52] @ (80132e0 <std+0x5c>)
  45458. 80132ac: 62a3 str r3, [r4, #40] @ 0x28
  45459. 80132ae: 4b0d ldr r3, [pc, #52] @ (80132e4 <std+0x60>)
  45460. 80132b0: 62e3 str r3, [r4, #44] @ 0x2c
  45461. 80132b2: 4b0d ldr r3, [pc, #52] @ (80132e8 <std+0x64>)
  45462. 80132b4: 6323 str r3, [r4, #48] @ 0x30
  45463. 80132b6: 4b0d ldr r3, [pc, #52] @ (80132ec <std+0x68>)
  45464. 80132b8: 6224 str r4, [r4, #32]
  45465. 80132ba: 429c cmp r4, r3
  45466. 80132bc: d006 beq.n 80132cc <std+0x48>
  45467. 80132be: f103 0268 add.w r2, r3, #104 @ 0x68
  45468. 80132c2: 4294 cmp r4, r2
  45469. 80132c4: d002 beq.n 80132cc <std+0x48>
  45470. 80132c6: 33d0 adds r3, #208 @ 0xd0
  45471. 80132c8: 429c cmp r4, r3
  45472. 80132ca: d105 bne.n 80132d8 <std+0x54>
  45473. 80132cc: f104 0058 add.w r0, r4, #88 @ 0x58
  45474. 80132d0: e8bd 4010 ldmia.w sp!, {r4, lr}
  45475. 80132d4: f000 baca b.w 801386c <__retarget_lock_init_recursive>
  45476. 80132d8: bd10 pop {r4, pc}
  45477. 80132da: bf00 nop
  45478. 80132dc: 080134e9 .word 0x080134e9
  45479. 80132e0: 0801350b .word 0x0801350b
  45480. 80132e4: 08013543 .word 0x08013543
  45481. 80132e8: 08013567 .word 0x08013567
  45482. 80132ec: 24019c50 .word 0x24019c50
  45483. 080132f0 <stdio_exit_handler>:
  45484. 80132f0: 4a02 ldr r2, [pc, #8] @ (80132fc <stdio_exit_handler+0xc>)
  45485. 80132f2: 4903 ldr r1, [pc, #12] @ (8013300 <stdio_exit_handler+0x10>)
  45486. 80132f4: 4803 ldr r0, [pc, #12] @ (8013304 <stdio_exit_handler+0x14>)
  45487. 80132f6: f000 b869 b.w 80133cc <_fwalk_sglue>
  45488. 80132fa: bf00 nop
  45489. 80132fc: 24000030 .word 0x24000030
  45490. 8013300: 08013235 .word 0x08013235
  45491. 8013304: 24000040 .word 0x24000040
  45492. 08013308 <cleanup_stdio>:
  45493. 8013308: 6841 ldr r1, [r0, #4]
  45494. 801330a: 4b0c ldr r3, [pc, #48] @ (801333c <cleanup_stdio+0x34>)
  45495. 801330c: 4299 cmp r1, r3
  45496. 801330e: b510 push {r4, lr}
  45497. 8013310: 4604 mov r4, r0
  45498. 8013312: d001 beq.n 8013318 <cleanup_stdio+0x10>
  45499. 8013314: f7ff ff8e bl 8013234 <_fflush_r>
  45500. 8013318: 68a1 ldr r1, [r4, #8]
  45501. 801331a: 4b09 ldr r3, [pc, #36] @ (8013340 <cleanup_stdio+0x38>)
  45502. 801331c: 4299 cmp r1, r3
  45503. 801331e: d002 beq.n 8013326 <cleanup_stdio+0x1e>
  45504. 8013320: 4620 mov r0, r4
  45505. 8013322: f7ff ff87 bl 8013234 <_fflush_r>
  45506. 8013326: 68e1 ldr r1, [r4, #12]
  45507. 8013328: 4b06 ldr r3, [pc, #24] @ (8013344 <cleanup_stdio+0x3c>)
  45508. 801332a: 4299 cmp r1, r3
  45509. 801332c: d004 beq.n 8013338 <cleanup_stdio+0x30>
  45510. 801332e: 4620 mov r0, r4
  45511. 8013330: e8bd 4010 ldmia.w sp!, {r4, lr}
  45512. 8013334: f7ff bf7e b.w 8013234 <_fflush_r>
  45513. 8013338: bd10 pop {r4, pc}
  45514. 801333a: bf00 nop
  45515. 801333c: 24019c50 .word 0x24019c50
  45516. 8013340: 24019cb8 .word 0x24019cb8
  45517. 8013344: 24019d20 .word 0x24019d20
  45518. 08013348 <global_stdio_init.part.0>:
  45519. 8013348: b510 push {r4, lr}
  45520. 801334a: 4b0b ldr r3, [pc, #44] @ (8013378 <global_stdio_init.part.0+0x30>)
  45521. 801334c: 4c0b ldr r4, [pc, #44] @ (801337c <global_stdio_init.part.0+0x34>)
  45522. 801334e: 4a0c ldr r2, [pc, #48] @ (8013380 <global_stdio_init.part.0+0x38>)
  45523. 8013350: 601a str r2, [r3, #0]
  45524. 8013352: 4620 mov r0, r4
  45525. 8013354: 2200 movs r2, #0
  45526. 8013356: 2104 movs r1, #4
  45527. 8013358: f7ff ff94 bl 8013284 <std>
  45528. 801335c: f104 0068 add.w r0, r4, #104 @ 0x68
  45529. 8013360: 2201 movs r2, #1
  45530. 8013362: 2109 movs r1, #9
  45531. 8013364: f7ff ff8e bl 8013284 <std>
  45532. 8013368: f104 00d0 add.w r0, r4, #208 @ 0xd0
  45533. 801336c: 2202 movs r2, #2
  45534. 801336e: e8bd 4010 ldmia.w sp!, {r4, lr}
  45535. 8013372: 2112 movs r1, #18
  45536. 8013374: f7ff bf86 b.w 8013284 <std>
  45537. 8013378: 24019d88 .word 0x24019d88
  45538. 801337c: 24019c50 .word 0x24019c50
  45539. 8013380: 080132f1 .word 0x080132f1
  45540. 08013384 <__sfp_lock_acquire>:
  45541. 8013384: 4801 ldr r0, [pc, #4] @ (801338c <__sfp_lock_acquire+0x8>)
  45542. 8013386: f000 ba72 b.w 801386e <__retarget_lock_acquire_recursive>
  45543. 801338a: bf00 nop
  45544. 801338c: 24019d91 .word 0x24019d91
  45545. 08013390 <__sfp_lock_release>:
  45546. 8013390: 4801 ldr r0, [pc, #4] @ (8013398 <__sfp_lock_release+0x8>)
  45547. 8013392: f000 ba6d b.w 8013870 <__retarget_lock_release_recursive>
  45548. 8013396: bf00 nop
  45549. 8013398: 24019d91 .word 0x24019d91
  45550. 0801339c <__sinit>:
  45551. 801339c: b510 push {r4, lr}
  45552. 801339e: 4604 mov r4, r0
  45553. 80133a0: f7ff fff0 bl 8013384 <__sfp_lock_acquire>
  45554. 80133a4: 6a23 ldr r3, [r4, #32]
  45555. 80133a6: b11b cbz r3, 80133b0 <__sinit+0x14>
  45556. 80133a8: e8bd 4010 ldmia.w sp!, {r4, lr}
  45557. 80133ac: f7ff bff0 b.w 8013390 <__sfp_lock_release>
  45558. 80133b0: 4b04 ldr r3, [pc, #16] @ (80133c4 <__sinit+0x28>)
  45559. 80133b2: 6223 str r3, [r4, #32]
  45560. 80133b4: 4b04 ldr r3, [pc, #16] @ (80133c8 <__sinit+0x2c>)
  45561. 80133b6: 681b ldr r3, [r3, #0]
  45562. 80133b8: 2b00 cmp r3, #0
  45563. 80133ba: d1f5 bne.n 80133a8 <__sinit+0xc>
  45564. 80133bc: f7ff ffc4 bl 8013348 <global_stdio_init.part.0>
  45565. 80133c0: e7f2 b.n 80133a8 <__sinit+0xc>
  45566. 80133c2: bf00 nop
  45567. 80133c4: 08013309 .word 0x08013309
  45568. 80133c8: 24019d88 .word 0x24019d88
  45569. 080133cc <_fwalk_sglue>:
  45570. 80133cc: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  45571. 80133d0: 4607 mov r7, r0
  45572. 80133d2: 4688 mov r8, r1
  45573. 80133d4: 4614 mov r4, r2
  45574. 80133d6: 2600 movs r6, #0
  45575. 80133d8: e9d4 9501 ldrd r9, r5, [r4, #4]
  45576. 80133dc: f1b9 0901 subs.w r9, r9, #1
  45577. 80133e0: d505 bpl.n 80133ee <_fwalk_sglue+0x22>
  45578. 80133e2: 6824 ldr r4, [r4, #0]
  45579. 80133e4: 2c00 cmp r4, #0
  45580. 80133e6: d1f7 bne.n 80133d8 <_fwalk_sglue+0xc>
  45581. 80133e8: 4630 mov r0, r6
  45582. 80133ea: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  45583. 80133ee: 89ab ldrh r3, [r5, #12]
  45584. 80133f0: 2b01 cmp r3, #1
  45585. 80133f2: d907 bls.n 8013404 <_fwalk_sglue+0x38>
  45586. 80133f4: f9b5 300e ldrsh.w r3, [r5, #14]
  45587. 80133f8: 3301 adds r3, #1
  45588. 80133fa: d003 beq.n 8013404 <_fwalk_sglue+0x38>
  45589. 80133fc: 4629 mov r1, r5
  45590. 80133fe: 4638 mov r0, r7
  45591. 8013400: 47c0 blx r8
  45592. 8013402: 4306 orrs r6, r0
  45593. 8013404: 3568 adds r5, #104 @ 0x68
  45594. 8013406: e7e9 b.n 80133dc <_fwalk_sglue+0x10>
  45595. 08013408 <iprintf>:
  45596. 8013408: b40f push {r0, r1, r2, r3}
  45597. 801340a: b507 push {r0, r1, r2, lr}
  45598. 801340c: 4906 ldr r1, [pc, #24] @ (8013428 <iprintf+0x20>)
  45599. 801340e: ab04 add r3, sp, #16
  45600. 8013410: 6808 ldr r0, [r1, #0]
  45601. 8013412: f853 2b04 ldr.w r2, [r3], #4
  45602. 8013416: 6881 ldr r1, [r0, #8]
  45603. 8013418: 9301 str r3, [sp, #4]
  45604. 801341a: f000 fb89 bl 8013b30 <_vfiprintf_r>
  45605. 801341e: b003 add sp, #12
  45606. 8013420: f85d eb04 ldr.w lr, [sp], #4
  45607. 8013424: b004 add sp, #16
  45608. 8013426: 4770 bx lr
  45609. 8013428: 2400003c .word 0x2400003c
  45610. 0801342c <_puts_r>:
  45611. 801342c: 6a03 ldr r3, [r0, #32]
  45612. 801342e: b570 push {r4, r5, r6, lr}
  45613. 8013430: 6884 ldr r4, [r0, #8]
  45614. 8013432: 4605 mov r5, r0
  45615. 8013434: 460e mov r6, r1
  45616. 8013436: b90b cbnz r3, 801343c <_puts_r+0x10>
  45617. 8013438: f7ff ffb0 bl 801339c <__sinit>
  45618. 801343c: 6e63 ldr r3, [r4, #100] @ 0x64
  45619. 801343e: 07db lsls r3, r3, #31
  45620. 8013440: d405 bmi.n 801344e <_puts_r+0x22>
  45621. 8013442: 89a3 ldrh r3, [r4, #12]
  45622. 8013444: 0598 lsls r0, r3, #22
  45623. 8013446: d402 bmi.n 801344e <_puts_r+0x22>
  45624. 8013448: 6da0 ldr r0, [r4, #88] @ 0x58
  45625. 801344a: f000 fa10 bl 801386e <__retarget_lock_acquire_recursive>
  45626. 801344e: 89a3 ldrh r3, [r4, #12]
  45627. 8013450: 0719 lsls r1, r3, #28
  45628. 8013452: d502 bpl.n 801345a <_puts_r+0x2e>
  45629. 8013454: 6923 ldr r3, [r4, #16]
  45630. 8013456: 2b00 cmp r3, #0
  45631. 8013458: d135 bne.n 80134c6 <_puts_r+0x9a>
  45632. 801345a: 4621 mov r1, r4
  45633. 801345c: 4628 mov r0, r5
  45634. 801345e: f000 f8c5 bl 80135ec <__swsetup_r>
  45635. 8013462: b380 cbz r0, 80134c6 <_puts_r+0x9a>
  45636. 8013464: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff
  45637. 8013468: 6e63 ldr r3, [r4, #100] @ 0x64
  45638. 801346a: 07da lsls r2, r3, #31
  45639. 801346c: d405 bmi.n 801347a <_puts_r+0x4e>
  45640. 801346e: 89a3 ldrh r3, [r4, #12]
  45641. 8013470: 059b lsls r3, r3, #22
  45642. 8013472: d402 bmi.n 801347a <_puts_r+0x4e>
  45643. 8013474: 6da0 ldr r0, [r4, #88] @ 0x58
  45644. 8013476: f000 f9fb bl 8013870 <__retarget_lock_release_recursive>
  45645. 801347a: 4628 mov r0, r5
  45646. 801347c: bd70 pop {r4, r5, r6, pc}
  45647. 801347e: 2b00 cmp r3, #0
  45648. 8013480: da04 bge.n 801348c <_puts_r+0x60>
  45649. 8013482: 69a2 ldr r2, [r4, #24]
  45650. 8013484: 429a cmp r2, r3
  45651. 8013486: dc17 bgt.n 80134b8 <_puts_r+0x8c>
  45652. 8013488: 290a cmp r1, #10
  45653. 801348a: d015 beq.n 80134b8 <_puts_r+0x8c>
  45654. 801348c: 6823 ldr r3, [r4, #0]
  45655. 801348e: 1c5a adds r2, r3, #1
  45656. 8013490: 6022 str r2, [r4, #0]
  45657. 8013492: 7019 strb r1, [r3, #0]
  45658. 8013494: 68a3 ldr r3, [r4, #8]
  45659. 8013496: f816 1f01 ldrb.w r1, [r6, #1]!
  45660. 801349a: 3b01 subs r3, #1
  45661. 801349c: 60a3 str r3, [r4, #8]
  45662. 801349e: 2900 cmp r1, #0
  45663. 80134a0: d1ed bne.n 801347e <_puts_r+0x52>
  45664. 80134a2: 2b00 cmp r3, #0
  45665. 80134a4: da11 bge.n 80134ca <_puts_r+0x9e>
  45666. 80134a6: 4622 mov r2, r4
  45667. 80134a8: 210a movs r1, #10
  45668. 80134aa: 4628 mov r0, r5
  45669. 80134ac: f000 f85f bl 801356e <__swbuf_r>
  45670. 80134b0: 3001 adds r0, #1
  45671. 80134b2: d0d7 beq.n 8013464 <_puts_r+0x38>
  45672. 80134b4: 250a movs r5, #10
  45673. 80134b6: e7d7 b.n 8013468 <_puts_r+0x3c>
  45674. 80134b8: 4622 mov r2, r4
  45675. 80134ba: 4628 mov r0, r5
  45676. 80134bc: f000 f857 bl 801356e <__swbuf_r>
  45677. 80134c0: 3001 adds r0, #1
  45678. 80134c2: d1e7 bne.n 8013494 <_puts_r+0x68>
  45679. 80134c4: e7ce b.n 8013464 <_puts_r+0x38>
  45680. 80134c6: 3e01 subs r6, #1
  45681. 80134c8: e7e4 b.n 8013494 <_puts_r+0x68>
  45682. 80134ca: 6823 ldr r3, [r4, #0]
  45683. 80134cc: 1c5a adds r2, r3, #1
  45684. 80134ce: 6022 str r2, [r4, #0]
  45685. 80134d0: 220a movs r2, #10
  45686. 80134d2: 701a strb r2, [r3, #0]
  45687. 80134d4: e7ee b.n 80134b4 <_puts_r+0x88>
  45688. ...
  45689. 080134d8 <puts>:
  45690. 80134d8: 4b02 ldr r3, [pc, #8] @ (80134e4 <puts+0xc>)
  45691. 80134da: 4601 mov r1, r0
  45692. 80134dc: 6818 ldr r0, [r3, #0]
  45693. 80134de: f7ff bfa5 b.w 801342c <_puts_r>
  45694. 80134e2: bf00 nop
  45695. 80134e4: 2400003c .word 0x2400003c
  45696. 080134e8 <__sread>:
  45697. 80134e8: b510 push {r4, lr}
  45698. 80134ea: 460c mov r4, r1
  45699. 80134ec: f9b1 100e ldrsh.w r1, [r1, #14]
  45700. 80134f0: f000 f974 bl 80137dc <_read_r>
  45701. 80134f4: 2800 cmp r0, #0
  45702. 80134f6: bfab itete ge
  45703. 80134f8: 6d63 ldrge r3, [r4, #84] @ 0x54
  45704. 80134fa: 89a3 ldrhlt r3, [r4, #12]
  45705. 80134fc: 181b addge r3, r3, r0
  45706. 80134fe: f423 5380 biclt.w r3, r3, #4096 @ 0x1000
  45707. 8013502: bfac ite ge
  45708. 8013504: 6563 strge r3, [r4, #84] @ 0x54
  45709. 8013506: 81a3 strhlt r3, [r4, #12]
  45710. 8013508: bd10 pop {r4, pc}
  45711. 0801350a <__swrite>:
  45712. 801350a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr}
  45713. 801350e: 461f mov r7, r3
  45714. 8013510: 898b ldrh r3, [r1, #12]
  45715. 8013512: 05db lsls r3, r3, #23
  45716. 8013514: 4605 mov r5, r0
  45717. 8013516: 460c mov r4, r1
  45718. 8013518: 4616 mov r6, r2
  45719. 801351a: d505 bpl.n 8013528 <__swrite+0x1e>
  45720. 801351c: f9b1 100e ldrsh.w r1, [r1, #14]
  45721. 8013520: 2302 movs r3, #2
  45722. 8013522: 2200 movs r2, #0
  45723. 8013524: f000 f948 bl 80137b8 <_lseek_r>
  45724. 8013528: 89a3 ldrh r3, [r4, #12]
  45725. 801352a: f9b4 100e ldrsh.w r1, [r4, #14]
  45726. 801352e: f423 5380 bic.w r3, r3, #4096 @ 0x1000
  45727. 8013532: 81a3 strh r3, [r4, #12]
  45728. 8013534: 4632 mov r2, r6
  45729. 8013536: 463b mov r3, r7
  45730. 8013538: 4628 mov r0, r5
  45731. 801353a: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr}
  45732. 801353e: f000 b95f b.w 8013800 <_write_r>
  45733. 08013542 <__sseek>:
  45734. 8013542: b510 push {r4, lr}
  45735. 8013544: 460c mov r4, r1
  45736. 8013546: f9b1 100e ldrsh.w r1, [r1, #14]
  45737. 801354a: f000 f935 bl 80137b8 <_lseek_r>
  45738. 801354e: 1c43 adds r3, r0, #1
  45739. 8013550: 89a3 ldrh r3, [r4, #12]
  45740. 8013552: bf15 itete ne
  45741. 8013554: 6560 strne r0, [r4, #84] @ 0x54
  45742. 8013556: f423 5380 biceq.w r3, r3, #4096 @ 0x1000
  45743. 801355a: f443 5380 orrne.w r3, r3, #4096 @ 0x1000
  45744. 801355e: 81a3 strheq r3, [r4, #12]
  45745. 8013560: bf18 it ne
  45746. 8013562: 81a3 strhne r3, [r4, #12]
  45747. 8013564: bd10 pop {r4, pc}
  45748. 08013566 <__sclose>:
  45749. 8013566: f9b1 100e ldrsh.w r1, [r1, #14]
  45750. 801356a: f000 b8bf b.w 80136ec <_close_r>
  45751. 0801356e <__swbuf_r>:
  45752. 801356e: b5f8 push {r3, r4, r5, r6, r7, lr}
  45753. 8013570: 460e mov r6, r1
  45754. 8013572: 4614 mov r4, r2
  45755. 8013574: 4605 mov r5, r0
  45756. 8013576: b118 cbz r0, 8013580 <__swbuf_r+0x12>
  45757. 8013578: 6a03 ldr r3, [r0, #32]
  45758. 801357a: b90b cbnz r3, 8013580 <__swbuf_r+0x12>
  45759. 801357c: f7ff ff0e bl 801339c <__sinit>
  45760. 8013580: 69a3 ldr r3, [r4, #24]
  45761. 8013582: 60a3 str r3, [r4, #8]
  45762. 8013584: 89a3 ldrh r3, [r4, #12]
  45763. 8013586: 071a lsls r2, r3, #28
  45764. 8013588: d501 bpl.n 801358e <__swbuf_r+0x20>
  45765. 801358a: 6923 ldr r3, [r4, #16]
  45766. 801358c: b943 cbnz r3, 80135a0 <__swbuf_r+0x32>
  45767. 801358e: 4621 mov r1, r4
  45768. 8013590: 4628 mov r0, r5
  45769. 8013592: f000 f82b bl 80135ec <__swsetup_r>
  45770. 8013596: b118 cbz r0, 80135a0 <__swbuf_r+0x32>
  45771. 8013598: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff
  45772. 801359c: 4638 mov r0, r7
  45773. 801359e: bdf8 pop {r3, r4, r5, r6, r7, pc}
  45774. 80135a0: 6823 ldr r3, [r4, #0]
  45775. 80135a2: 6922 ldr r2, [r4, #16]
  45776. 80135a4: 1a98 subs r0, r3, r2
  45777. 80135a6: 6963 ldr r3, [r4, #20]
  45778. 80135a8: b2f6 uxtb r6, r6
  45779. 80135aa: 4283 cmp r3, r0
  45780. 80135ac: 4637 mov r7, r6
  45781. 80135ae: dc05 bgt.n 80135bc <__swbuf_r+0x4e>
  45782. 80135b0: 4621 mov r1, r4
  45783. 80135b2: 4628 mov r0, r5
  45784. 80135b4: f7ff fe3e bl 8013234 <_fflush_r>
  45785. 80135b8: 2800 cmp r0, #0
  45786. 80135ba: d1ed bne.n 8013598 <__swbuf_r+0x2a>
  45787. 80135bc: 68a3 ldr r3, [r4, #8]
  45788. 80135be: 3b01 subs r3, #1
  45789. 80135c0: 60a3 str r3, [r4, #8]
  45790. 80135c2: 6823 ldr r3, [r4, #0]
  45791. 80135c4: 1c5a adds r2, r3, #1
  45792. 80135c6: 6022 str r2, [r4, #0]
  45793. 80135c8: 701e strb r6, [r3, #0]
  45794. 80135ca: 6962 ldr r2, [r4, #20]
  45795. 80135cc: 1c43 adds r3, r0, #1
  45796. 80135ce: 429a cmp r2, r3
  45797. 80135d0: d004 beq.n 80135dc <__swbuf_r+0x6e>
  45798. 80135d2: 89a3 ldrh r3, [r4, #12]
  45799. 80135d4: 07db lsls r3, r3, #31
  45800. 80135d6: d5e1 bpl.n 801359c <__swbuf_r+0x2e>
  45801. 80135d8: 2e0a cmp r6, #10
  45802. 80135da: d1df bne.n 801359c <__swbuf_r+0x2e>
  45803. 80135dc: 4621 mov r1, r4
  45804. 80135de: 4628 mov r0, r5
  45805. 80135e0: f7ff fe28 bl 8013234 <_fflush_r>
  45806. 80135e4: 2800 cmp r0, #0
  45807. 80135e6: d0d9 beq.n 801359c <__swbuf_r+0x2e>
  45808. 80135e8: e7d6 b.n 8013598 <__swbuf_r+0x2a>
  45809. ...
  45810. 080135ec <__swsetup_r>:
  45811. 80135ec: b538 push {r3, r4, r5, lr}
  45812. 80135ee: 4b29 ldr r3, [pc, #164] @ (8013694 <__swsetup_r+0xa8>)
  45813. 80135f0: 4605 mov r5, r0
  45814. 80135f2: 6818 ldr r0, [r3, #0]
  45815. 80135f4: 460c mov r4, r1
  45816. 80135f6: b118 cbz r0, 8013600 <__swsetup_r+0x14>
  45817. 80135f8: 6a03 ldr r3, [r0, #32]
  45818. 80135fa: b90b cbnz r3, 8013600 <__swsetup_r+0x14>
  45819. 80135fc: f7ff fece bl 801339c <__sinit>
  45820. 8013600: f9b4 300c ldrsh.w r3, [r4, #12]
  45821. 8013604: 0719 lsls r1, r3, #28
  45822. 8013606: d422 bmi.n 801364e <__swsetup_r+0x62>
  45823. 8013608: 06da lsls r2, r3, #27
  45824. 801360a: d407 bmi.n 801361c <__swsetup_r+0x30>
  45825. 801360c: 2209 movs r2, #9
  45826. 801360e: 602a str r2, [r5, #0]
  45827. 8013610: f043 0340 orr.w r3, r3, #64 @ 0x40
  45828. 8013614: 81a3 strh r3, [r4, #12]
  45829. 8013616: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  45830. 801361a: e033 b.n 8013684 <__swsetup_r+0x98>
  45831. 801361c: 0758 lsls r0, r3, #29
  45832. 801361e: d512 bpl.n 8013646 <__swsetup_r+0x5a>
  45833. 8013620: 6b61 ldr r1, [r4, #52] @ 0x34
  45834. 8013622: b141 cbz r1, 8013636 <__swsetup_r+0x4a>
  45835. 8013624: f104 0344 add.w r3, r4, #68 @ 0x44
  45836. 8013628: 4299 cmp r1, r3
  45837. 801362a: d002 beq.n 8013632 <__swsetup_r+0x46>
  45838. 801362c: 4628 mov r0, r5
  45839. 801362e: f000 f955 bl 80138dc <_free_r>
  45840. 8013632: 2300 movs r3, #0
  45841. 8013634: 6363 str r3, [r4, #52] @ 0x34
  45842. 8013636: 89a3 ldrh r3, [r4, #12]
  45843. 8013638: f023 0324 bic.w r3, r3, #36 @ 0x24
  45844. 801363c: 81a3 strh r3, [r4, #12]
  45845. 801363e: 2300 movs r3, #0
  45846. 8013640: 6063 str r3, [r4, #4]
  45847. 8013642: 6923 ldr r3, [r4, #16]
  45848. 8013644: 6023 str r3, [r4, #0]
  45849. 8013646: 89a3 ldrh r3, [r4, #12]
  45850. 8013648: f043 0308 orr.w r3, r3, #8
  45851. 801364c: 81a3 strh r3, [r4, #12]
  45852. 801364e: 6923 ldr r3, [r4, #16]
  45853. 8013650: b94b cbnz r3, 8013666 <__swsetup_r+0x7a>
  45854. 8013652: 89a3 ldrh r3, [r4, #12]
  45855. 8013654: f403 7320 and.w r3, r3, #640 @ 0x280
  45856. 8013658: f5b3 7f00 cmp.w r3, #512 @ 0x200
  45857. 801365c: d003 beq.n 8013666 <__swsetup_r+0x7a>
  45858. 801365e: 4621 mov r1, r4
  45859. 8013660: 4628 mov r0, r5
  45860. 8013662: f000 fd43 bl 80140ec <__smakebuf_r>
  45861. 8013666: f9b4 300c ldrsh.w r3, [r4, #12]
  45862. 801366a: f013 0201 ands.w r2, r3, #1
  45863. 801366e: d00a beq.n 8013686 <__swsetup_r+0x9a>
  45864. 8013670: 2200 movs r2, #0
  45865. 8013672: 60a2 str r2, [r4, #8]
  45866. 8013674: 6962 ldr r2, [r4, #20]
  45867. 8013676: 4252 negs r2, r2
  45868. 8013678: 61a2 str r2, [r4, #24]
  45869. 801367a: 6922 ldr r2, [r4, #16]
  45870. 801367c: b942 cbnz r2, 8013690 <__swsetup_r+0xa4>
  45871. 801367e: f013 0080 ands.w r0, r3, #128 @ 0x80
  45872. 8013682: d1c5 bne.n 8013610 <__swsetup_r+0x24>
  45873. 8013684: bd38 pop {r3, r4, r5, pc}
  45874. 8013686: 0799 lsls r1, r3, #30
  45875. 8013688: bf58 it pl
  45876. 801368a: 6962 ldrpl r2, [r4, #20]
  45877. 801368c: 60a2 str r2, [r4, #8]
  45878. 801368e: e7f4 b.n 801367a <__swsetup_r+0x8e>
  45879. 8013690: 2000 movs r0, #0
  45880. 8013692: e7f7 b.n 8013684 <__swsetup_r+0x98>
  45881. 8013694: 2400003c .word 0x2400003c
  45882. 08013698 <memcmp>:
  45883. 8013698: b510 push {r4, lr}
  45884. 801369a: 3901 subs r1, #1
  45885. 801369c: 4402 add r2, r0
  45886. 801369e: 4290 cmp r0, r2
  45887. 80136a0: d101 bne.n 80136a6 <memcmp+0xe>
  45888. 80136a2: 2000 movs r0, #0
  45889. 80136a4: e005 b.n 80136b2 <memcmp+0x1a>
  45890. 80136a6: 7803 ldrb r3, [r0, #0]
  45891. 80136a8: f811 4f01 ldrb.w r4, [r1, #1]!
  45892. 80136ac: 42a3 cmp r3, r4
  45893. 80136ae: d001 beq.n 80136b4 <memcmp+0x1c>
  45894. 80136b0: 1b18 subs r0, r3, r4
  45895. 80136b2: bd10 pop {r4, pc}
  45896. 80136b4: 3001 adds r0, #1
  45897. 80136b6: e7f2 b.n 801369e <memcmp+0x6>
  45898. 080136b8 <memset>:
  45899. 80136b8: 4402 add r2, r0
  45900. 80136ba: 4603 mov r3, r0
  45901. 80136bc: 4293 cmp r3, r2
  45902. 80136be: d100 bne.n 80136c2 <memset+0xa>
  45903. 80136c0: 4770 bx lr
  45904. 80136c2: f803 1b01 strb.w r1, [r3], #1
  45905. 80136c6: e7f9 b.n 80136bc <memset+0x4>
  45906. 080136c8 <strncmp>:
  45907. 80136c8: b510 push {r4, lr}
  45908. 80136ca: b16a cbz r2, 80136e8 <strncmp+0x20>
  45909. 80136cc: 3901 subs r1, #1
  45910. 80136ce: 1884 adds r4, r0, r2
  45911. 80136d0: f810 2b01 ldrb.w r2, [r0], #1
  45912. 80136d4: f811 3f01 ldrb.w r3, [r1, #1]!
  45913. 80136d8: 429a cmp r2, r3
  45914. 80136da: d103 bne.n 80136e4 <strncmp+0x1c>
  45915. 80136dc: 42a0 cmp r0, r4
  45916. 80136de: d001 beq.n 80136e4 <strncmp+0x1c>
  45917. 80136e0: 2a00 cmp r2, #0
  45918. 80136e2: d1f5 bne.n 80136d0 <strncmp+0x8>
  45919. 80136e4: 1ad0 subs r0, r2, r3
  45920. 80136e6: bd10 pop {r4, pc}
  45921. 80136e8: 4610 mov r0, r2
  45922. 80136ea: e7fc b.n 80136e6 <strncmp+0x1e>
  45923. 080136ec <_close_r>:
  45924. 80136ec: b538 push {r3, r4, r5, lr}
  45925. 80136ee: 4d06 ldr r5, [pc, #24] @ (8013708 <_close_r+0x1c>)
  45926. 80136f0: 2300 movs r3, #0
  45927. 80136f2: 4604 mov r4, r0
  45928. 80136f4: 4608 mov r0, r1
  45929. 80136f6: 602b str r3, [r5, #0]
  45930. 80136f8: f7ed fa4a bl 8000b90 <_close>
  45931. 80136fc: 1c43 adds r3, r0, #1
  45932. 80136fe: d102 bne.n 8013706 <_close_r+0x1a>
  45933. 8013700: 682b ldr r3, [r5, #0]
  45934. 8013702: b103 cbz r3, 8013706 <_close_r+0x1a>
  45935. 8013704: 6023 str r3, [r4, #0]
  45936. 8013706: bd38 pop {r3, r4, r5, pc}
  45937. 8013708: 24019d8c .word 0x24019d8c
  45938. 0801370c <_reclaim_reent>:
  45939. 801370c: 4b29 ldr r3, [pc, #164] @ (80137b4 <_reclaim_reent+0xa8>)
  45940. 801370e: 681b ldr r3, [r3, #0]
  45941. 8013710: 4283 cmp r3, r0
  45942. 8013712: b570 push {r4, r5, r6, lr}
  45943. 8013714: 4604 mov r4, r0
  45944. 8013716: d04b beq.n 80137b0 <_reclaim_reent+0xa4>
  45945. 8013718: 69c3 ldr r3, [r0, #28]
  45946. 801371a: b1ab cbz r3, 8013748 <_reclaim_reent+0x3c>
  45947. 801371c: 68db ldr r3, [r3, #12]
  45948. 801371e: b16b cbz r3, 801373c <_reclaim_reent+0x30>
  45949. 8013720: 2500 movs r5, #0
  45950. 8013722: 69e3 ldr r3, [r4, #28]
  45951. 8013724: 68db ldr r3, [r3, #12]
  45952. 8013726: 5959 ldr r1, [r3, r5]
  45953. 8013728: 2900 cmp r1, #0
  45954. 801372a: d13b bne.n 80137a4 <_reclaim_reent+0x98>
  45955. 801372c: 3504 adds r5, #4
  45956. 801372e: 2d80 cmp r5, #128 @ 0x80
  45957. 8013730: d1f7 bne.n 8013722 <_reclaim_reent+0x16>
  45958. 8013732: 69e3 ldr r3, [r4, #28]
  45959. 8013734: 4620 mov r0, r4
  45960. 8013736: 68d9 ldr r1, [r3, #12]
  45961. 8013738: f000 f8d0 bl 80138dc <_free_r>
  45962. 801373c: 69e3 ldr r3, [r4, #28]
  45963. 801373e: 6819 ldr r1, [r3, #0]
  45964. 8013740: b111 cbz r1, 8013748 <_reclaim_reent+0x3c>
  45965. 8013742: 4620 mov r0, r4
  45966. 8013744: f000 f8ca bl 80138dc <_free_r>
  45967. 8013748: 6961 ldr r1, [r4, #20]
  45968. 801374a: b111 cbz r1, 8013752 <_reclaim_reent+0x46>
  45969. 801374c: 4620 mov r0, r4
  45970. 801374e: f000 f8c5 bl 80138dc <_free_r>
  45971. 8013752: 69e1 ldr r1, [r4, #28]
  45972. 8013754: b111 cbz r1, 801375c <_reclaim_reent+0x50>
  45973. 8013756: 4620 mov r0, r4
  45974. 8013758: f000 f8c0 bl 80138dc <_free_r>
  45975. 801375c: 6b21 ldr r1, [r4, #48] @ 0x30
  45976. 801375e: b111 cbz r1, 8013766 <_reclaim_reent+0x5a>
  45977. 8013760: 4620 mov r0, r4
  45978. 8013762: f000 f8bb bl 80138dc <_free_r>
  45979. 8013766: 6b61 ldr r1, [r4, #52] @ 0x34
  45980. 8013768: b111 cbz r1, 8013770 <_reclaim_reent+0x64>
  45981. 801376a: 4620 mov r0, r4
  45982. 801376c: f000 f8b6 bl 80138dc <_free_r>
  45983. 8013770: 6ba1 ldr r1, [r4, #56] @ 0x38
  45984. 8013772: b111 cbz r1, 801377a <_reclaim_reent+0x6e>
  45985. 8013774: 4620 mov r0, r4
  45986. 8013776: f000 f8b1 bl 80138dc <_free_r>
  45987. 801377a: 6ca1 ldr r1, [r4, #72] @ 0x48
  45988. 801377c: b111 cbz r1, 8013784 <_reclaim_reent+0x78>
  45989. 801377e: 4620 mov r0, r4
  45990. 8013780: f000 f8ac bl 80138dc <_free_r>
  45991. 8013784: 6c61 ldr r1, [r4, #68] @ 0x44
  45992. 8013786: b111 cbz r1, 801378e <_reclaim_reent+0x82>
  45993. 8013788: 4620 mov r0, r4
  45994. 801378a: f000 f8a7 bl 80138dc <_free_r>
  45995. 801378e: 6ae1 ldr r1, [r4, #44] @ 0x2c
  45996. 8013790: b111 cbz r1, 8013798 <_reclaim_reent+0x8c>
  45997. 8013792: 4620 mov r0, r4
  45998. 8013794: f000 f8a2 bl 80138dc <_free_r>
  45999. 8013798: 6a23 ldr r3, [r4, #32]
  46000. 801379a: b14b cbz r3, 80137b0 <_reclaim_reent+0xa4>
  46001. 801379c: 4620 mov r0, r4
  46002. 801379e: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr}
  46003. 80137a2: 4718 bx r3
  46004. 80137a4: 680e ldr r6, [r1, #0]
  46005. 80137a6: 4620 mov r0, r4
  46006. 80137a8: f000 f898 bl 80138dc <_free_r>
  46007. 80137ac: 4631 mov r1, r6
  46008. 80137ae: e7bb b.n 8013728 <_reclaim_reent+0x1c>
  46009. 80137b0: bd70 pop {r4, r5, r6, pc}
  46010. 80137b2: bf00 nop
  46011. 80137b4: 2400003c .word 0x2400003c
  46012. 080137b8 <_lseek_r>:
  46013. 80137b8: b538 push {r3, r4, r5, lr}
  46014. 80137ba: 4d07 ldr r5, [pc, #28] @ (80137d8 <_lseek_r+0x20>)
  46015. 80137bc: 4604 mov r4, r0
  46016. 80137be: 4608 mov r0, r1
  46017. 80137c0: 4611 mov r1, r2
  46018. 80137c2: 2200 movs r2, #0
  46019. 80137c4: 602a str r2, [r5, #0]
  46020. 80137c6: 461a mov r2, r3
  46021. 80137c8: f7ed f9ec bl 8000ba4 <_lseek>
  46022. 80137cc: 1c43 adds r3, r0, #1
  46023. 80137ce: d102 bne.n 80137d6 <_lseek_r+0x1e>
  46024. 80137d0: 682b ldr r3, [r5, #0]
  46025. 80137d2: b103 cbz r3, 80137d6 <_lseek_r+0x1e>
  46026. 80137d4: 6023 str r3, [r4, #0]
  46027. 80137d6: bd38 pop {r3, r4, r5, pc}
  46028. 80137d8: 24019d8c .word 0x24019d8c
  46029. 080137dc <_read_r>:
  46030. 80137dc: b538 push {r3, r4, r5, lr}
  46031. 80137de: 4d07 ldr r5, [pc, #28] @ (80137fc <_read_r+0x20>)
  46032. 80137e0: 4604 mov r4, r0
  46033. 80137e2: 4608 mov r0, r1
  46034. 80137e4: 4611 mov r1, r2
  46035. 80137e6: 2200 movs r2, #0
  46036. 80137e8: 602a str r2, [r5, #0]
  46037. 80137ea: 461a mov r2, r3
  46038. 80137ec: f7ed f9b2 bl 8000b54 <_read>
  46039. 80137f0: 1c43 adds r3, r0, #1
  46040. 80137f2: d102 bne.n 80137fa <_read_r+0x1e>
  46041. 80137f4: 682b ldr r3, [r5, #0]
  46042. 80137f6: b103 cbz r3, 80137fa <_read_r+0x1e>
  46043. 80137f8: 6023 str r3, [r4, #0]
  46044. 80137fa: bd38 pop {r3, r4, r5, pc}
  46045. 80137fc: 24019d8c .word 0x24019d8c
  46046. 08013800 <_write_r>:
  46047. 8013800: b538 push {r3, r4, r5, lr}
  46048. 8013802: 4d07 ldr r5, [pc, #28] @ (8013820 <_write_r+0x20>)
  46049. 8013804: 4604 mov r4, r0
  46050. 8013806: 4608 mov r0, r1
  46051. 8013808: 4611 mov r1, r2
  46052. 801380a: 2200 movs r2, #0
  46053. 801380c: 602a str r2, [r5, #0]
  46054. 801380e: 461a mov r2, r3
  46055. 8013810: f7ed f9b0 bl 8000b74 <_write>
  46056. 8013814: 1c43 adds r3, r0, #1
  46057. 8013816: d102 bne.n 801381e <_write_r+0x1e>
  46058. 8013818: 682b ldr r3, [r5, #0]
  46059. 801381a: b103 cbz r3, 801381e <_write_r+0x1e>
  46060. 801381c: 6023 str r3, [r4, #0]
  46061. 801381e: bd38 pop {r3, r4, r5, pc}
  46062. 8013820: 24019d8c .word 0x24019d8c
  46063. 08013824 <__libc_init_array>:
  46064. 8013824: b570 push {r4, r5, r6, lr}
  46065. 8013826: 4d0d ldr r5, [pc, #52] @ (801385c <__libc_init_array+0x38>)
  46066. 8013828: 4c0d ldr r4, [pc, #52] @ (8013860 <__libc_init_array+0x3c>)
  46067. 801382a: 1b64 subs r4, r4, r5
  46068. 801382c: 10a4 asrs r4, r4, #2
  46069. 801382e: 2600 movs r6, #0
  46070. 8013830: 42a6 cmp r6, r4
  46071. 8013832: d109 bne.n 8013848 <__libc_init_array+0x24>
  46072. 8013834: 4d0b ldr r5, [pc, #44] @ (8013864 <__libc_init_array+0x40>)
  46073. 8013836: 4c0c ldr r4, [pc, #48] @ (8013868 <__libc_init_array+0x44>)
  46074. 8013838: f000 fd12 bl 8014260 <_init>
  46075. 801383c: 1b64 subs r4, r4, r5
  46076. 801383e: 10a4 asrs r4, r4, #2
  46077. 8013840: 2600 movs r6, #0
  46078. 8013842: 42a6 cmp r6, r4
  46079. 8013844: d105 bne.n 8013852 <__libc_init_array+0x2e>
  46080. 8013846: bd70 pop {r4, r5, r6, pc}
  46081. 8013848: f855 3b04 ldr.w r3, [r5], #4
  46082. 801384c: 4798 blx r3
  46083. 801384e: 3601 adds r6, #1
  46084. 8013850: e7ee b.n 8013830 <__libc_init_array+0xc>
  46085. 8013852: f855 3b04 ldr.w r3, [r5], #4
  46086. 8013856: 4798 blx r3
  46087. 8013858: 3601 adds r6, #1
  46088. 801385a: e7f2 b.n 8013842 <__libc_init_array+0x1e>
  46089. 801385c: 080180c4 .word 0x080180c4
  46090. 8013860: 080180c4 .word 0x080180c4
  46091. 8013864: 080180c4 .word 0x080180c4
  46092. 8013868: 080180c8 .word 0x080180c8
  46093. 0801386c <__retarget_lock_init_recursive>:
  46094. 801386c: 4770 bx lr
  46095. 0801386e <__retarget_lock_acquire_recursive>:
  46096. 801386e: 4770 bx lr
  46097. 08013870 <__retarget_lock_release_recursive>:
  46098. 8013870: 4770 bx lr
  46099. 08013872 <strcpy>:
  46100. 8013872: 4603 mov r3, r0
  46101. 8013874: f811 2b01 ldrb.w r2, [r1], #1
  46102. 8013878: f803 2b01 strb.w r2, [r3], #1
  46103. 801387c: 2a00 cmp r2, #0
  46104. 801387e: d1f9 bne.n 8013874 <strcpy+0x2>
  46105. 8013880: 4770 bx lr
  46106. 08013882 <memcpy>:
  46107. 8013882: 440a add r2, r1
  46108. 8013884: 4291 cmp r1, r2
  46109. 8013886: f100 33ff add.w r3, r0, #4294967295 @ 0xffffffff
  46110. 801388a: d100 bne.n 801388e <memcpy+0xc>
  46111. 801388c: 4770 bx lr
  46112. 801388e: b510 push {r4, lr}
  46113. 8013890: f811 4b01 ldrb.w r4, [r1], #1
  46114. 8013894: f803 4f01 strb.w r4, [r3, #1]!
  46115. 8013898: 4291 cmp r1, r2
  46116. 801389a: d1f9 bne.n 8013890 <memcpy+0xe>
  46117. 801389c: bd10 pop {r4, pc}
  46118. ...
  46119. 080138a0 <__assert_func>:
  46120. 80138a0: b51f push {r0, r1, r2, r3, r4, lr}
  46121. 80138a2: 4614 mov r4, r2
  46122. 80138a4: 461a mov r2, r3
  46123. 80138a6: 4b09 ldr r3, [pc, #36] @ (80138cc <__assert_func+0x2c>)
  46124. 80138a8: 681b ldr r3, [r3, #0]
  46125. 80138aa: 4605 mov r5, r0
  46126. 80138ac: 68d8 ldr r0, [r3, #12]
  46127. 80138ae: b954 cbnz r4, 80138c6 <__assert_func+0x26>
  46128. 80138b0: 4b07 ldr r3, [pc, #28] @ (80138d0 <__assert_func+0x30>)
  46129. 80138b2: 461c mov r4, r3
  46130. 80138b4: e9cd 3401 strd r3, r4, [sp, #4]
  46131. 80138b8: 9100 str r1, [sp, #0]
  46132. 80138ba: 462b mov r3, r5
  46133. 80138bc: 4905 ldr r1, [pc, #20] @ (80138d4 <__assert_func+0x34>)
  46134. 80138be: f000 fbdd bl 801407c <fiprintf>
  46135. 80138c2: f000 fc81 bl 80141c8 <abort>
  46136. 80138c6: 4b04 ldr r3, [pc, #16] @ (80138d8 <__assert_func+0x38>)
  46137. 80138c8: e7f4 b.n 80138b4 <__assert_func+0x14>
  46138. 80138ca: bf00 nop
  46139. 80138cc: 2400003c .word 0x2400003c
  46140. 80138d0: 08018086 .word 0x08018086
  46141. 80138d4: 08018058 .word 0x08018058
  46142. 80138d8: 0801804b .word 0x0801804b
  46143. 080138dc <_free_r>:
  46144. 80138dc: b538 push {r3, r4, r5, lr}
  46145. 80138de: 4605 mov r5, r0
  46146. 80138e0: 2900 cmp r1, #0
  46147. 80138e2: d041 beq.n 8013968 <_free_r+0x8c>
  46148. 80138e4: f851 3c04 ldr.w r3, [r1, #-4]
  46149. 80138e8: 1f0c subs r4, r1, #4
  46150. 80138ea: 2b00 cmp r3, #0
  46151. 80138ec: bfb8 it lt
  46152. 80138ee: 18e4 addlt r4, r4, r3
  46153. 80138f0: f000 f8e8 bl 8013ac4 <__malloc_lock>
  46154. 80138f4: 4a1d ldr r2, [pc, #116] @ (801396c <_free_r+0x90>)
  46155. 80138f6: 6813 ldr r3, [r2, #0]
  46156. 80138f8: b933 cbnz r3, 8013908 <_free_r+0x2c>
  46157. 80138fa: 6063 str r3, [r4, #4]
  46158. 80138fc: 6014 str r4, [r2, #0]
  46159. 80138fe: 4628 mov r0, r5
  46160. 8013900: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
  46161. 8013904: f000 b8e4 b.w 8013ad0 <__malloc_unlock>
  46162. 8013908: 42a3 cmp r3, r4
  46163. 801390a: d908 bls.n 801391e <_free_r+0x42>
  46164. 801390c: 6820 ldr r0, [r4, #0]
  46165. 801390e: 1821 adds r1, r4, r0
  46166. 8013910: 428b cmp r3, r1
  46167. 8013912: bf01 itttt eq
  46168. 8013914: 6819 ldreq r1, [r3, #0]
  46169. 8013916: 685b ldreq r3, [r3, #4]
  46170. 8013918: 1809 addeq r1, r1, r0
  46171. 801391a: 6021 streq r1, [r4, #0]
  46172. 801391c: e7ed b.n 80138fa <_free_r+0x1e>
  46173. 801391e: 461a mov r2, r3
  46174. 8013920: 685b ldr r3, [r3, #4]
  46175. 8013922: b10b cbz r3, 8013928 <_free_r+0x4c>
  46176. 8013924: 42a3 cmp r3, r4
  46177. 8013926: d9fa bls.n 801391e <_free_r+0x42>
  46178. 8013928: 6811 ldr r1, [r2, #0]
  46179. 801392a: 1850 adds r0, r2, r1
  46180. 801392c: 42a0 cmp r0, r4
  46181. 801392e: d10b bne.n 8013948 <_free_r+0x6c>
  46182. 8013930: 6820 ldr r0, [r4, #0]
  46183. 8013932: 4401 add r1, r0
  46184. 8013934: 1850 adds r0, r2, r1
  46185. 8013936: 4283 cmp r3, r0
  46186. 8013938: 6011 str r1, [r2, #0]
  46187. 801393a: d1e0 bne.n 80138fe <_free_r+0x22>
  46188. 801393c: 6818 ldr r0, [r3, #0]
  46189. 801393e: 685b ldr r3, [r3, #4]
  46190. 8013940: 6053 str r3, [r2, #4]
  46191. 8013942: 4408 add r0, r1
  46192. 8013944: 6010 str r0, [r2, #0]
  46193. 8013946: e7da b.n 80138fe <_free_r+0x22>
  46194. 8013948: d902 bls.n 8013950 <_free_r+0x74>
  46195. 801394a: 230c movs r3, #12
  46196. 801394c: 602b str r3, [r5, #0]
  46197. 801394e: e7d6 b.n 80138fe <_free_r+0x22>
  46198. 8013950: 6820 ldr r0, [r4, #0]
  46199. 8013952: 1821 adds r1, r4, r0
  46200. 8013954: 428b cmp r3, r1
  46201. 8013956: bf04 itt eq
  46202. 8013958: 6819 ldreq r1, [r3, #0]
  46203. 801395a: 685b ldreq r3, [r3, #4]
  46204. 801395c: 6063 str r3, [r4, #4]
  46205. 801395e: bf04 itt eq
  46206. 8013960: 1809 addeq r1, r1, r0
  46207. 8013962: 6021 streq r1, [r4, #0]
  46208. 8013964: 6054 str r4, [r2, #4]
  46209. 8013966: e7ca b.n 80138fe <_free_r+0x22>
  46210. 8013968: bd38 pop {r3, r4, r5, pc}
  46211. 801396a: bf00 nop
  46212. 801396c: 24019d98 .word 0x24019d98
  46213. 08013970 <malloc>:
  46214. 8013970: 4b02 ldr r3, [pc, #8] @ (801397c <malloc+0xc>)
  46215. 8013972: 4601 mov r1, r0
  46216. 8013974: 6818 ldr r0, [r3, #0]
  46217. 8013976: f000 b825 b.w 80139c4 <_malloc_r>
  46218. 801397a: bf00 nop
  46219. 801397c: 2400003c .word 0x2400003c
  46220. 08013980 <sbrk_aligned>:
  46221. 8013980: b570 push {r4, r5, r6, lr}
  46222. 8013982: 4e0f ldr r6, [pc, #60] @ (80139c0 <sbrk_aligned+0x40>)
  46223. 8013984: 460c mov r4, r1
  46224. 8013986: 6831 ldr r1, [r6, #0]
  46225. 8013988: 4605 mov r5, r0
  46226. 801398a: b911 cbnz r1, 8013992 <sbrk_aligned+0x12>
  46227. 801398c: f000 fc0c bl 80141a8 <_sbrk_r>
  46228. 8013990: 6030 str r0, [r6, #0]
  46229. 8013992: 4621 mov r1, r4
  46230. 8013994: 4628 mov r0, r5
  46231. 8013996: f000 fc07 bl 80141a8 <_sbrk_r>
  46232. 801399a: 1c43 adds r3, r0, #1
  46233. 801399c: d103 bne.n 80139a6 <sbrk_aligned+0x26>
  46234. 801399e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff
  46235. 80139a2: 4620 mov r0, r4
  46236. 80139a4: bd70 pop {r4, r5, r6, pc}
  46237. 80139a6: 1cc4 adds r4, r0, #3
  46238. 80139a8: f024 0403 bic.w r4, r4, #3
  46239. 80139ac: 42a0 cmp r0, r4
  46240. 80139ae: d0f8 beq.n 80139a2 <sbrk_aligned+0x22>
  46241. 80139b0: 1a21 subs r1, r4, r0
  46242. 80139b2: 4628 mov r0, r5
  46243. 80139b4: f000 fbf8 bl 80141a8 <_sbrk_r>
  46244. 80139b8: 3001 adds r0, #1
  46245. 80139ba: d1f2 bne.n 80139a2 <sbrk_aligned+0x22>
  46246. 80139bc: e7ef b.n 801399e <sbrk_aligned+0x1e>
  46247. 80139be: bf00 nop
  46248. 80139c0: 24019d94 .word 0x24019d94
  46249. 080139c4 <_malloc_r>:
  46250. 80139c4: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
  46251. 80139c8: 1ccd adds r5, r1, #3
  46252. 80139ca: f025 0503 bic.w r5, r5, #3
  46253. 80139ce: 3508 adds r5, #8
  46254. 80139d0: 2d0c cmp r5, #12
  46255. 80139d2: bf38 it cc
  46256. 80139d4: 250c movcc r5, #12
  46257. 80139d6: 2d00 cmp r5, #0
  46258. 80139d8: 4606 mov r6, r0
  46259. 80139da: db01 blt.n 80139e0 <_malloc_r+0x1c>
  46260. 80139dc: 42a9 cmp r1, r5
  46261. 80139de: d904 bls.n 80139ea <_malloc_r+0x26>
  46262. 80139e0: 230c movs r3, #12
  46263. 80139e2: 6033 str r3, [r6, #0]
  46264. 80139e4: 2000 movs r0, #0
  46265. 80139e6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc}
  46266. 80139ea: f8df 80d4 ldr.w r8, [pc, #212] @ 8013ac0 <_malloc_r+0xfc>
  46267. 80139ee: f000 f869 bl 8013ac4 <__malloc_lock>
  46268. 80139f2: f8d8 3000 ldr.w r3, [r8]
  46269. 80139f6: 461c mov r4, r3
  46270. 80139f8: bb44 cbnz r4, 8013a4c <_malloc_r+0x88>
  46271. 80139fa: 4629 mov r1, r5
  46272. 80139fc: 4630 mov r0, r6
  46273. 80139fe: f7ff ffbf bl 8013980 <sbrk_aligned>
  46274. 8013a02: 1c43 adds r3, r0, #1
  46275. 8013a04: 4604 mov r4, r0
  46276. 8013a06: d158 bne.n 8013aba <_malloc_r+0xf6>
  46277. 8013a08: f8d8 4000 ldr.w r4, [r8]
  46278. 8013a0c: 4627 mov r7, r4
  46279. 8013a0e: 2f00 cmp r7, #0
  46280. 8013a10: d143 bne.n 8013a9a <_malloc_r+0xd6>
  46281. 8013a12: 2c00 cmp r4, #0
  46282. 8013a14: d04b beq.n 8013aae <_malloc_r+0xea>
  46283. 8013a16: 6823 ldr r3, [r4, #0]
  46284. 8013a18: 4639 mov r1, r7
  46285. 8013a1a: 4630 mov r0, r6
  46286. 8013a1c: eb04 0903 add.w r9, r4, r3
  46287. 8013a20: f000 fbc2 bl 80141a8 <_sbrk_r>
  46288. 8013a24: 4581 cmp r9, r0
  46289. 8013a26: d142 bne.n 8013aae <_malloc_r+0xea>
  46290. 8013a28: 6821 ldr r1, [r4, #0]
  46291. 8013a2a: 1a6d subs r5, r5, r1
  46292. 8013a2c: 4629 mov r1, r5
  46293. 8013a2e: 4630 mov r0, r6
  46294. 8013a30: f7ff ffa6 bl 8013980 <sbrk_aligned>
  46295. 8013a34: 3001 adds r0, #1
  46296. 8013a36: d03a beq.n 8013aae <_malloc_r+0xea>
  46297. 8013a38: 6823 ldr r3, [r4, #0]
  46298. 8013a3a: 442b add r3, r5
  46299. 8013a3c: 6023 str r3, [r4, #0]
  46300. 8013a3e: f8d8 3000 ldr.w r3, [r8]
  46301. 8013a42: 685a ldr r2, [r3, #4]
  46302. 8013a44: bb62 cbnz r2, 8013aa0 <_malloc_r+0xdc>
  46303. 8013a46: f8c8 7000 str.w r7, [r8]
  46304. 8013a4a: e00f b.n 8013a6c <_malloc_r+0xa8>
  46305. 8013a4c: 6822 ldr r2, [r4, #0]
  46306. 8013a4e: 1b52 subs r2, r2, r5
  46307. 8013a50: d420 bmi.n 8013a94 <_malloc_r+0xd0>
  46308. 8013a52: 2a0b cmp r2, #11
  46309. 8013a54: d917 bls.n 8013a86 <_malloc_r+0xc2>
  46310. 8013a56: 1961 adds r1, r4, r5
  46311. 8013a58: 42a3 cmp r3, r4
  46312. 8013a5a: 6025 str r5, [r4, #0]
  46313. 8013a5c: bf18 it ne
  46314. 8013a5e: 6059 strne r1, [r3, #4]
  46315. 8013a60: 6863 ldr r3, [r4, #4]
  46316. 8013a62: bf08 it eq
  46317. 8013a64: f8c8 1000 streq.w r1, [r8]
  46318. 8013a68: 5162 str r2, [r4, r5]
  46319. 8013a6a: 604b str r3, [r1, #4]
  46320. 8013a6c: 4630 mov r0, r6
  46321. 8013a6e: f000 f82f bl 8013ad0 <__malloc_unlock>
  46322. 8013a72: f104 000b add.w r0, r4, #11
  46323. 8013a76: 1d23 adds r3, r4, #4
  46324. 8013a78: f020 0007 bic.w r0, r0, #7
  46325. 8013a7c: 1ac2 subs r2, r0, r3
  46326. 8013a7e: bf1c itt ne
  46327. 8013a80: 1a1b subne r3, r3, r0
  46328. 8013a82: 50a3 strne r3, [r4, r2]
  46329. 8013a84: e7af b.n 80139e6 <_malloc_r+0x22>
  46330. 8013a86: 6862 ldr r2, [r4, #4]
  46331. 8013a88: 42a3 cmp r3, r4
  46332. 8013a8a: bf0c ite eq
  46333. 8013a8c: f8c8 2000 streq.w r2, [r8]
  46334. 8013a90: 605a strne r2, [r3, #4]
  46335. 8013a92: e7eb b.n 8013a6c <_malloc_r+0xa8>
  46336. 8013a94: 4623 mov r3, r4
  46337. 8013a96: 6864 ldr r4, [r4, #4]
  46338. 8013a98: e7ae b.n 80139f8 <_malloc_r+0x34>
  46339. 8013a9a: 463c mov r4, r7
  46340. 8013a9c: 687f ldr r7, [r7, #4]
  46341. 8013a9e: e7b6 b.n 8013a0e <_malloc_r+0x4a>
  46342. 8013aa0: 461a mov r2, r3
  46343. 8013aa2: 685b ldr r3, [r3, #4]
  46344. 8013aa4: 42a3 cmp r3, r4
  46345. 8013aa6: d1fb bne.n 8013aa0 <_malloc_r+0xdc>
  46346. 8013aa8: 2300 movs r3, #0
  46347. 8013aaa: 6053 str r3, [r2, #4]
  46348. 8013aac: e7de b.n 8013a6c <_malloc_r+0xa8>
  46349. 8013aae: 230c movs r3, #12
  46350. 8013ab0: 6033 str r3, [r6, #0]
  46351. 8013ab2: 4630 mov r0, r6
  46352. 8013ab4: f000 f80c bl 8013ad0 <__malloc_unlock>
  46353. 8013ab8: e794 b.n 80139e4 <_malloc_r+0x20>
  46354. 8013aba: 6005 str r5, [r0, #0]
  46355. 8013abc: e7d6 b.n 8013a6c <_malloc_r+0xa8>
  46356. 8013abe: bf00 nop
  46357. 8013ac0: 24019d98 .word 0x24019d98
  46358. 08013ac4 <__malloc_lock>:
  46359. 8013ac4: 4801 ldr r0, [pc, #4] @ (8013acc <__malloc_lock+0x8>)
  46360. 8013ac6: f7ff bed2 b.w 801386e <__retarget_lock_acquire_recursive>
  46361. 8013aca: bf00 nop
  46362. 8013acc: 24019d90 .word 0x24019d90
  46363. 08013ad0 <__malloc_unlock>:
  46364. 8013ad0: 4801 ldr r0, [pc, #4] @ (8013ad8 <__malloc_unlock+0x8>)
  46365. 8013ad2: f7ff becd b.w 8013870 <__retarget_lock_release_recursive>
  46366. 8013ad6: bf00 nop
  46367. 8013ad8: 24019d90 .word 0x24019d90
  46368. 08013adc <__sfputc_r>:
  46369. 8013adc: 6893 ldr r3, [r2, #8]
  46370. 8013ade: 3b01 subs r3, #1
  46371. 8013ae0: 2b00 cmp r3, #0
  46372. 8013ae2: b410 push {r4}
  46373. 8013ae4: 6093 str r3, [r2, #8]
  46374. 8013ae6: da08 bge.n 8013afa <__sfputc_r+0x1e>
  46375. 8013ae8: 6994 ldr r4, [r2, #24]
  46376. 8013aea: 42a3 cmp r3, r4
  46377. 8013aec: db01 blt.n 8013af2 <__sfputc_r+0x16>
  46378. 8013aee: 290a cmp r1, #10
  46379. 8013af0: d103 bne.n 8013afa <__sfputc_r+0x1e>
  46380. 8013af2: f85d 4b04 ldr.w r4, [sp], #4
  46381. 8013af6: f7ff bd3a b.w 801356e <__swbuf_r>
  46382. 8013afa: 6813 ldr r3, [r2, #0]
  46383. 8013afc: 1c58 adds r0, r3, #1
  46384. 8013afe: 6010 str r0, [r2, #0]
  46385. 8013b00: 7019 strb r1, [r3, #0]
  46386. 8013b02: 4608 mov r0, r1
  46387. 8013b04: f85d 4b04 ldr.w r4, [sp], #4
  46388. 8013b08: 4770 bx lr
  46389. 08013b0a <__sfputs_r>:
  46390. 8013b0a: b5f8 push {r3, r4, r5, r6, r7, lr}
  46391. 8013b0c: 4606 mov r6, r0
  46392. 8013b0e: 460f mov r7, r1
  46393. 8013b10: 4614 mov r4, r2
  46394. 8013b12: 18d5 adds r5, r2, r3
  46395. 8013b14: 42ac cmp r4, r5
  46396. 8013b16: d101 bne.n 8013b1c <__sfputs_r+0x12>
  46397. 8013b18: 2000 movs r0, #0
  46398. 8013b1a: e007 b.n 8013b2c <__sfputs_r+0x22>
  46399. 8013b1c: f814 1b01 ldrb.w r1, [r4], #1
  46400. 8013b20: 463a mov r2, r7
  46401. 8013b22: 4630 mov r0, r6
  46402. 8013b24: f7ff ffda bl 8013adc <__sfputc_r>
  46403. 8013b28: 1c43 adds r3, r0, #1
  46404. 8013b2a: d1f3 bne.n 8013b14 <__sfputs_r+0xa>
  46405. 8013b2c: bdf8 pop {r3, r4, r5, r6, r7, pc}
  46406. ...
  46407. 08013b30 <_vfiprintf_r>:
  46408. 8013b30: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
  46409. 8013b34: 460d mov r5, r1
  46410. 8013b36: b09d sub sp, #116 @ 0x74
  46411. 8013b38: 4614 mov r4, r2
  46412. 8013b3a: 4698 mov r8, r3
  46413. 8013b3c: 4606 mov r6, r0
  46414. 8013b3e: b118 cbz r0, 8013b48 <_vfiprintf_r+0x18>
  46415. 8013b40: 6a03 ldr r3, [r0, #32]
  46416. 8013b42: b90b cbnz r3, 8013b48 <_vfiprintf_r+0x18>
  46417. 8013b44: f7ff fc2a bl 801339c <__sinit>
  46418. 8013b48: 6e6b ldr r3, [r5, #100] @ 0x64
  46419. 8013b4a: 07d9 lsls r1, r3, #31
  46420. 8013b4c: d405 bmi.n 8013b5a <_vfiprintf_r+0x2a>
  46421. 8013b4e: 89ab ldrh r3, [r5, #12]
  46422. 8013b50: 059a lsls r2, r3, #22
  46423. 8013b52: d402 bmi.n 8013b5a <_vfiprintf_r+0x2a>
  46424. 8013b54: 6da8 ldr r0, [r5, #88] @ 0x58
  46425. 8013b56: f7ff fe8a bl 801386e <__retarget_lock_acquire_recursive>
  46426. 8013b5a: 89ab ldrh r3, [r5, #12]
  46427. 8013b5c: 071b lsls r3, r3, #28
  46428. 8013b5e: d501 bpl.n 8013b64 <_vfiprintf_r+0x34>
  46429. 8013b60: 692b ldr r3, [r5, #16]
  46430. 8013b62: b99b cbnz r3, 8013b8c <_vfiprintf_r+0x5c>
  46431. 8013b64: 4629 mov r1, r5
  46432. 8013b66: 4630 mov r0, r6
  46433. 8013b68: f7ff fd40 bl 80135ec <__swsetup_r>
  46434. 8013b6c: b170 cbz r0, 8013b8c <_vfiprintf_r+0x5c>
  46435. 8013b6e: 6e6b ldr r3, [r5, #100] @ 0x64
  46436. 8013b70: 07dc lsls r4, r3, #31
  46437. 8013b72: d504 bpl.n 8013b7e <_vfiprintf_r+0x4e>
  46438. 8013b74: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  46439. 8013b78: b01d add sp, #116 @ 0x74
  46440. 8013b7a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc}
  46441. 8013b7e: 89ab ldrh r3, [r5, #12]
  46442. 8013b80: 0598 lsls r0, r3, #22
  46443. 8013b82: d4f7 bmi.n 8013b74 <_vfiprintf_r+0x44>
  46444. 8013b84: 6da8 ldr r0, [r5, #88] @ 0x58
  46445. 8013b86: f7ff fe73 bl 8013870 <__retarget_lock_release_recursive>
  46446. 8013b8a: e7f3 b.n 8013b74 <_vfiprintf_r+0x44>
  46447. 8013b8c: 2300 movs r3, #0
  46448. 8013b8e: 9309 str r3, [sp, #36] @ 0x24
  46449. 8013b90: 2320 movs r3, #32
  46450. 8013b92: f88d 3029 strb.w r3, [sp, #41] @ 0x29
  46451. 8013b96: f8cd 800c str.w r8, [sp, #12]
  46452. 8013b9a: 2330 movs r3, #48 @ 0x30
  46453. 8013b9c: f8df 81ac ldr.w r8, [pc, #428] @ 8013d4c <_vfiprintf_r+0x21c>
  46454. 8013ba0: f88d 302a strb.w r3, [sp, #42] @ 0x2a
  46455. 8013ba4: f04f 0901 mov.w r9, #1
  46456. 8013ba8: 4623 mov r3, r4
  46457. 8013baa: 469a mov sl, r3
  46458. 8013bac: f813 2b01 ldrb.w r2, [r3], #1
  46459. 8013bb0: b10a cbz r2, 8013bb6 <_vfiprintf_r+0x86>
  46460. 8013bb2: 2a25 cmp r2, #37 @ 0x25
  46461. 8013bb4: d1f9 bne.n 8013baa <_vfiprintf_r+0x7a>
  46462. 8013bb6: ebba 0b04 subs.w fp, sl, r4
  46463. 8013bba: d00b beq.n 8013bd4 <_vfiprintf_r+0xa4>
  46464. 8013bbc: 465b mov r3, fp
  46465. 8013bbe: 4622 mov r2, r4
  46466. 8013bc0: 4629 mov r1, r5
  46467. 8013bc2: 4630 mov r0, r6
  46468. 8013bc4: f7ff ffa1 bl 8013b0a <__sfputs_r>
  46469. 8013bc8: 3001 adds r0, #1
  46470. 8013bca: f000 80a7 beq.w 8013d1c <_vfiprintf_r+0x1ec>
  46471. 8013bce: 9a09 ldr r2, [sp, #36] @ 0x24
  46472. 8013bd0: 445a add r2, fp
  46473. 8013bd2: 9209 str r2, [sp, #36] @ 0x24
  46474. 8013bd4: f89a 3000 ldrb.w r3, [sl]
  46475. 8013bd8: 2b00 cmp r3, #0
  46476. 8013bda: f000 809f beq.w 8013d1c <_vfiprintf_r+0x1ec>
  46477. 8013bde: 2300 movs r3, #0
  46478. 8013be0: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff
  46479. 8013be4: e9cd 2305 strd r2, r3, [sp, #20]
  46480. 8013be8: f10a 0a01 add.w sl, sl, #1
  46481. 8013bec: 9304 str r3, [sp, #16]
  46482. 8013bee: 9307 str r3, [sp, #28]
  46483. 8013bf0: f88d 3053 strb.w r3, [sp, #83] @ 0x53
  46484. 8013bf4: 931a str r3, [sp, #104] @ 0x68
  46485. 8013bf6: 4654 mov r4, sl
  46486. 8013bf8: 2205 movs r2, #5
  46487. 8013bfa: f814 1b01 ldrb.w r1, [r4], #1
  46488. 8013bfe: 4853 ldr r0, [pc, #332] @ (8013d4c <_vfiprintf_r+0x21c>)
  46489. 8013c00: f7ec fb86 bl 8000310 <memchr>
  46490. 8013c04: 9a04 ldr r2, [sp, #16]
  46491. 8013c06: b9d8 cbnz r0, 8013c40 <_vfiprintf_r+0x110>
  46492. 8013c08: 06d1 lsls r1, r2, #27
  46493. 8013c0a: bf44 itt mi
  46494. 8013c0c: 2320 movmi r3, #32
  46495. 8013c0e: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53
  46496. 8013c12: 0713 lsls r3, r2, #28
  46497. 8013c14: bf44 itt mi
  46498. 8013c16: 232b movmi r3, #43 @ 0x2b
  46499. 8013c18: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53
  46500. 8013c1c: f89a 3000 ldrb.w r3, [sl]
  46501. 8013c20: 2b2a cmp r3, #42 @ 0x2a
  46502. 8013c22: d015 beq.n 8013c50 <_vfiprintf_r+0x120>
  46503. 8013c24: 9a07 ldr r2, [sp, #28]
  46504. 8013c26: 4654 mov r4, sl
  46505. 8013c28: 2000 movs r0, #0
  46506. 8013c2a: f04f 0c0a mov.w ip, #10
  46507. 8013c2e: 4621 mov r1, r4
  46508. 8013c30: f811 3b01 ldrb.w r3, [r1], #1
  46509. 8013c34: 3b30 subs r3, #48 @ 0x30
  46510. 8013c36: 2b09 cmp r3, #9
  46511. 8013c38: d94b bls.n 8013cd2 <_vfiprintf_r+0x1a2>
  46512. 8013c3a: b1b0 cbz r0, 8013c6a <_vfiprintf_r+0x13a>
  46513. 8013c3c: 9207 str r2, [sp, #28]
  46514. 8013c3e: e014 b.n 8013c6a <_vfiprintf_r+0x13a>
  46515. 8013c40: eba0 0308 sub.w r3, r0, r8
  46516. 8013c44: fa09 f303 lsl.w r3, r9, r3
  46517. 8013c48: 4313 orrs r3, r2
  46518. 8013c4a: 9304 str r3, [sp, #16]
  46519. 8013c4c: 46a2 mov sl, r4
  46520. 8013c4e: e7d2 b.n 8013bf6 <_vfiprintf_r+0xc6>
  46521. 8013c50: 9b03 ldr r3, [sp, #12]
  46522. 8013c52: 1d19 adds r1, r3, #4
  46523. 8013c54: 681b ldr r3, [r3, #0]
  46524. 8013c56: 9103 str r1, [sp, #12]
  46525. 8013c58: 2b00 cmp r3, #0
  46526. 8013c5a: bfbb ittet lt
  46527. 8013c5c: 425b neglt r3, r3
  46528. 8013c5e: f042 0202 orrlt.w r2, r2, #2
  46529. 8013c62: 9307 strge r3, [sp, #28]
  46530. 8013c64: 9307 strlt r3, [sp, #28]
  46531. 8013c66: bfb8 it lt
  46532. 8013c68: 9204 strlt r2, [sp, #16]
  46533. 8013c6a: 7823 ldrb r3, [r4, #0]
  46534. 8013c6c: 2b2e cmp r3, #46 @ 0x2e
  46535. 8013c6e: d10a bne.n 8013c86 <_vfiprintf_r+0x156>
  46536. 8013c70: 7863 ldrb r3, [r4, #1]
  46537. 8013c72: 2b2a cmp r3, #42 @ 0x2a
  46538. 8013c74: d132 bne.n 8013cdc <_vfiprintf_r+0x1ac>
  46539. 8013c76: 9b03 ldr r3, [sp, #12]
  46540. 8013c78: 1d1a adds r2, r3, #4
  46541. 8013c7a: 681b ldr r3, [r3, #0]
  46542. 8013c7c: 9203 str r2, [sp, #12]
  46543. 8013c7e: ea43 73e3 orr.w r3, r3, r3, asr #31
  46544. 8013c82: 3402 adds r4, #2
  46545. 8013c84: 9305 str r3, [sp, #20]
  46546. 8013c86: f8df a0d4 ldr.w sl, [pc, #212] @ 8013d5c <_vfiprintf_r+0x22c>
  46547. 8013c8a: 7821 ldrb r1, [r4, #0]
  46548. 8013c8c: 2203 movs r2, #3
  46549. 8013c8e: 4650 mov r0, sl
  46550. 8013c90: f7ec fb3e bl 8000310 <memchr>
  46551. 8013c94: b138 cbz r0, 8013ca6 <_vfiprintf_r+0x176>
  46552. 8013c96: 9b04 ldr r3, [sp, #16]
  46553. 8013c98: eba0 000a sub.w r0, r0, sl
  46554. 8013c9c: 2240 movs r2, #64 @ 0x40
  46555. 8013c9e: 4082 lsls r2, r0
  46556. 8013ca0: 4313 orrs r3, r2
  46557. 8013ca2: 3401 adds r4, #1
  46558. 8013ca4: 9304 str r3, [sp, #16]
  46559. 8013ca6: f814 1b01 ldrb.w r1, [r4], #1
  46560. 8013caa: 4829 ldr r0, [pc, #164] @ (8013d50 <_vfiprintf_r+0x220>)
  46561. 8013cac: f88d 1028 strb.w r1, [sp, #40] @ 0x28
  46562. 8013cb0: 2206 movs r2, #6
  46563. 8013cb2: f7ec fb2d bl 8000310 <memchr>
  46564. 8013cb6: 2800 cmp r0, #0
  46565. 8013cb8: d03f beq.n 8013d3a <_vfiprintf_r+0x20a>
  46566. 8013cba: 4b26 ldr r3, [pc, #152] @ (8013d54 <_vfiprintf_r+0x224>)
  46567. 8013cbc: bb1b cbnz r3, 8013d06 <_vfiprintf_r+0x1d6>
  46568. 8013cbe: 9b03 ldr r3, [sp, #12]
  46569. 8013cc0: 3307 adds r3, #7
  46570. 8013cc2: f023 0307 bic.w r3, r3, #7
  46571. 8013cc6: 3308 adds r3, #8
  46572. 8013cc8: 9303 str r3, [sp, #12]
  46573. 8013cca: 9b09 ldr r3, [sp, #36] @ 0x24
  46574. 8013ccc: 443b add r3, r7
  46575. 8013cce: 9309 str r3, [sp, #36] @ 0x24
  46576. 8013cd0: e76a b.n 8013ba8 <_vfiprintf_r+0x78>
  46577. 8013cd2: fb0c 3202 mla r2, ip, r2, r3
  46578. 8013cd6: 460c mov r4, r1
  46579. 8013cd8: 2001 movs r0, #1
  46580. 8013cda: e7a8 b.n 8013c2e <_vfiprintf_r+0xfe>
  46581. 8013cdc: 2300 movs r3, #0
  46582. 8013cde: 3401 adds r4, #1
  46583. 8013ce0: 9305 str r3, [sp, #20]
  46584. 8013ce2: 4619 mov r1, r3
  46585. 8013ce4: f04f 0c0a mov.w ip, #10
  46586. 8013ce8: 4620 mov r0, r4
  46587. 8013cea: f810 2b01 ldrb.w r2, [r0], #1
  46588. 8013cee: 3a30 subs r2, #48 @ 0x30
  46589. 8013cf0: 2a09 cmp r2, #9
  46590. 8013cf2: d903 bls.n 8013cfc <_vfiprintf_r+0x1cc>
  46591. 8013cf4: 2b00 cmp r3, #0
  46592. 8013cf6: d0c6 beq.n 8013c86 <_vfiprintf_r+0x156>
  46593. 8013cf8: 9105 str r1, [sp, #20]
  46594. 8013cfa: e7c4 b.n 8013c86 <_vfiprintf_r+0x156>
  46595. 8013cfc: fb0c 2101 mla r1, ip, r1, r2
  46596. 8013d00: 4604 mov r4, r0
  46597. 8013d02: 2301 movs r3, #1
  46598. 8013d04: e7f0 b.n 8013ce8 <_vfiprintf_r+0x1b8>
  46599. 8013d06: ab03 add r3, sp, #12
  46600. 8013d08: 9300 str r3, [sp, #0]
  46601. 8013d0a: 462a mov r2, r5
  46602. 8013d0c: 4b12 ldr r3, [pc, #72] @ (8013d58 <_vfiprintf_r+0x228>)
  46603. 8013d0e: a904 add r1, sp, #16
  46604. 8013d10: 4630 mov r0, r6
  46605. 8013d12: f3af 8000 nop.w
  46606. 8013d16: 4607 mov r7, r0
  46607. 8013d18: 1c78 adds r0, r7, #1
  46608. 8013d1a: d1d6 bne.n 8013cca <_vfiprintf_r+0x19a>
  46609. 8013d1c: 6e6b ldr r3, [r5, #100] @ 0x64
  46610. 8013d1e: 07d9 lsls r1, r3, #31
  46611. 8013d20: d405 bmi.n 8013d2e <_vfiprintf_r+0x1fe>
  46612. 8013d22: 89ab ldrh r3, [r5, #12]
  46613. 8013d24: 059a lsls r2, r3, #22
  46614. 8013d26: d402 bmi.n 8013d2e <_vfiprintf_r+0x1fe>
  46615. 8013d28: 6da8 ldr r0, [r5, #88] @ 0x58
  46616. 8013d2a: f7ff fda1 bl 8013870 <__retarget_lock_release_recursive>
  46617. 8013d2e: 89ab ldrh r3, [r5, #12]
  46618. 8013d30: 065b lsls r3, r3, #25
  46619. 8013d32: f53f af1f bmi.w 8013b74 <_vfiprintf_r+0x44>
  46620. 8013d36: 9809 ldr r0, [sp, #36] @ 0x24
  46621. 8013d38: e71e b.n 8013b78 <_vfiprintf_r+0x48>
  46622. 8013d3a: ab03 add r3, sp, #12
  46623. 8013d3c: 9300 str r3, [sp, #0]
  46624. 8013d3e: 462a mov r2, r5
  46625. 8013d40: 4b05 ldr r3, [pc, #20] @ (8013d58 <_vfiprintf_r+0x228>)
  46626. 8013d42: a904 add r1, sp, #16
  46627. 8013d44: 4630 mov r0, r6
  46628. 8013d46: f000 f879 bl 8013e3c <_printf_i>
  46629. 8013d4a: e7e4 b.n 8013d16 <_vfiprintf_r+0x1e6>
  46630. 8013d4c: 08018087 .word 0x08018087
  46631. 8013d50: 08018091 .word 0x08018091
  46632. 8013d54: 00000000 .word 0x00000000
  46633. 8013d58: 08013b0b .word 0x08013b0b
  46634. 8013d5c: 0801808d .word 0x0801808d
  46635. 08013d60 <_printf_common>:
  46636. 8013d60: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr}
  46637. 8013d64: 4616 mov r6, r2
  46638. 8013d66: 4698 mov r8, r3
  46639. 8013d68: 688a ldr r2, [r1, #8]
  46640. 8013d6a: 690b ldr r3, [r1, #16]
  46641. 8013d6c: f8dd 9020 ldr.w r9, [sp, #32]
  46642. 8013d70: 4293 cmp r3, r2
  46643. 8013d72: bfb8 it lt
  46644. 8013d74: 4613 movlt r3, r2
  46645. 8013d76: 6033 str r3, [r6, #0]
  46646. 8013d78: f891 2043 ldrb.w r2, [r1, #67] @ 0x43
  46647. 8013d7c: 4607 mov r7, r0
  46648. 8013d7e: 460c mov r4, r1
  46649. 8013d80: b10a cbz r2, 8013d86 <_printf_common+0x26>
  46650. 8013d82: 3301 adds r3, #1
  46651. 8013d84: 6033 str r3, [r6, #0]
  46652. 8013d86: 6823 ldr r3, [r4, #0]
  46653. 8013d88: 0699 lsls r1, r3, #26
  46654. 8013d8a: bf42 ittt mi
  46655. 8013d8c: 6833 ldrmi r3, [r6, #0]
  46656. 8013d8e: 3302 addmi r3, #2
  46657. 8013d90: 6033 strmi r3, [r6, #0]
  46658. 8013d92: 6825 ldr r5, [r4, #0]
  46659. 8013d94: f015 0506 ands.w r5, r5, #6
  46660. 8013d98: d106 bne.n 8013da8 <_printf_common+0x48>
  46661. 8013d9a: f104 0a19 add.w sl, r4, #25
  46662. 8013d9e: 68e3 ldr r3, [r4, #12]
  46663. 8013da0: 6832 ldr r2, [r6, #0]
  46664. 8013da2: 1a9b subs r3, r3, r2
  46665. 8013da4: 42ab cmp r3, r5
  46666. 8013da6: dc26 bgt.n 8013df6 <_printf_common+0x96>
  46667. 8013da8: f894 3043 ldrb.w r3, [r4, #67] @ 0x43
  46668. 8013dac: 6822 ldr r2, [r4, #0]
  46669. 8013dae: 3b00 subs r3, #0
  46670. 8013db0: bf18 it ne
  46671. 8013db2: 2301 movne r3, #1
  46672. 8013db4: 0692 lsls r2, r2, #26
  46673. 8013db6: d42b bmi.n 8013e10 <_printf_common+0xb0>
  46674. 8013db8: f104 0243 add.w r2, r4, #67 @ 0x43
  46675. 8013dbc: 4641 mov r1, r8
  46676. 8013dbe: 4638 mov r0, r7
  46677. 8013dc0: 47c8 blx r9
  46678. 8013dc2: 3001 adds r0, #1
  46679. 8013dc4: d01e beq.n 8013e04 <_printf_common+0xa4>
  46680. 8013dc6: 6823 ldr r3, [r4, #0]
  46681. 8013dc8: 6922 ldr r2, [r4, #16]
  46682. 8013dca: f003 0306 and.w r3, r3, #6
  46683. 8013dce: 2b04 cmp r3, #4
  46684. 8013dd0: bf02 ittt eq
  46685. 8013dd2: 68e5 ldreq r5, [r4, #12]
  46686. 8013dd4: 6833 ldreq r3, [r6, #0]
  46687. 8013dd6: 1aed subeq r5, r5, r3
  46688. 8013dd8: 68a3 ldr r3, [r4, #8]
  46689. 8013dda: bf0c ite eq
  46690. 8013ddc: ea25 75e5 biceq.w r5, r5, r5, asr #31
  46691. 8013de0: 2500 movne r5, #0
  46692. 8013de2: 4293 cmp r3, r2
  46693. 8013de4: bfc4 itt gt
  46694. 8013de6: 1a9b subgt r3, r3, r2
  46695. 8013de8: 18ed addgt r5, r5, r3
  46696. 8013dea: 2600 movs r6, #0
  46697. 8013dec: 341a adds r4, #26
  46698. 8013dee: 42b5 cmp r5, r6
  46699. 8013df0: d11a bne.n 8013e28 <_printf_common+0xc8>
  46700. 8013df2: 2000 movs r0, #0
  46701. 8013df4: e008 b.n 8013e08 <_printf_common+0xa8>
  46702. 8013df6: 2301 movs r3, #1
  46703. 8013df8: 4652 mov r2, sl
  46704. 8013dfa: 4641 mov r1, r8
  46705. 8013dfc: 4638 mov r0, r7
  46706. 8013dfe: 47c8 blx r9
  46707. 8013e00: 3001 adds r0, #1
  46708. 8013e02: d103 bne.n 8013e0c <_printf_common+0xac>
  46709. 8013e04: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  46710. 8013e08: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  46711. 8013e0c: 3501 adds r5, #1
  46712. 8013e0e: e7c6 b.n 8013d9e <_printf_common+0x3e>
  46713. 8013e10: 18e1 adds r1, r4, r3
  46714. 8013e12: 1c5a adds r2, r3, #1
  46715. 8013e14: 2030 movs r0, #48 @ 0x30
  46716. 8013e16: f881 0043 strb.w r0, [r1, #67] @ 0x43
  46717. 8013e1a: 4422 add r2, r4
  46718. 8013e1c: f894 1045 ldrb.w r1, [r4, #69] @ 0x45
  46719. 8013e20: f882 1043 strb.w r1, [r2, #67] @ 0x43
  46720. 8013e24: 3302 adds r3, #2
  46721. 8013e26: e7c7 b.n 8013db8 <_printf_common+0x58>
  46722. 8013e28: 2301 movs r3, #1
  46723. 8013e2a: 4622 mov r2, r4
  46724. 8013e2c: 4641 mov r1, r8
  46725. 8013e2e: 4638 mov r0, r7
  46726. 8013e30: 47c8 blx r9
  46727. 8013e32: 3001 adds r0, #1
  46728. 8013e34: d0e6 beq.n 8013e04 <_printf_common+0xa4>
  46729. 8013e36: 3601 adds r6, #1
  46730. 8013e38: e7d9 b.n 8013dee <_printf_common+0x8e>
  46731. ...
  46732. 08013e3c <_printf_i>:
  46733. 8013e3c: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}
  46734. 8013e40: 7e0f ldrb r7, [r1, #24]
  46735. 8013e42: 9e0c ldr r6, [sp, #48] @ 0x30
  46736. 8013e44: 2f78 cmp r7, #120 @ 0x78
  46737. 8013e46: 4691 mov r9, r2
  46738. 8013e48: 4680 mov r8, r0
  46739. 8013e4a: 460c mov r4, r1
  46740. 8013e4c: 469a mov sl, r3
  46741. 8013e4e: f101 0243 add.w r2, r1, #67 @ 0x43
  46742. 8013e52: d807 bhi.n 8013e64 <_printf_i+0x28>
  46743. 8013e54: 2f62 cmp r7, #98 @ 0x62
  46744. 8013e56: d80a bhi.n 8013e6e <_printf_i+0x32>
  46745. 8013e58: 2f00 cmp r7, #0
  46746. 8013e5a: f000 80d2 beq.w 8014002 <_printf_i+0x1c6>
  46747. 8013e5e: 2f58 cmp r7, #88 @ 0x58
  46748. 8013e60: f000 80b9 beq.w 8013fd6 <_printf_i+0x19a>
  46749. 8013e64: f104 0642 add.w r6, r4, #66 @ 0x42
  46750. 8013e68: f884 7042 strb.w r7, [r4, #66] @ 0x42
  46751. 8013e6c: e03a b.n 8013ee4 <_printf_i+0xa8>
  46752. 8013e6e: f1a7 0363 sub.w r3, r7, #99 @ 0x63
  46753. 8013e72: 2b15 cmp r3, #21
  46754. 8013e74: d8f6 bhi.n 8013e64 <_printf_i+0x28>
  46755. 8013e76: a101 add r1, pc, #4 @ (adr r1, 8013e7c <_printf_i+0x40>)
  46756. 8013e78: f851 f023 ldr.w pc, [r1, r3, lsl #2]
  46757. 8013e7c: 08013ed5 .word 0x08013ed5
  46758. 8013e80: 08013ee9 .word 0x08013ee9
  46759. 8013e84: 08013e65 .word 0x08013e65
  46760. 8013e88: 08013e65 .word 0x08013e65
  46761. 8013e8c: 08013e65 .word 0x08013e65
  46762. 8013e90: 08013e65 .word 0x08013e65
  46763. 8013e94: 08013ee9 .word 0x08013ee9
  46764. 8013e98: 08013e65 .word 0x08013e65
  46765. 8013e9c: 08013e65 .word 0x08013e65
  46766. 8013ea0: 08013e65 .word 0x08013e65
  46767. 8013ea4: 08013e65 .word 0x08013e65
  46768. 8013ea8: 08013fe9 .word 0x08013fe9
  46769. 8013eac: 08013f13 .word 0x08013f13
  46770. 8013eb0: 08013fa3 .word 0x08013fa3
  46771. 8013eb4: 08013e65 .word 0x08013e65
  46772. 8013eb8: 08013e65 .word 0x08013e65
  46773. 8013ebc: 0801400b .word 0x0801400b
  46774. 8013ec0: 08013e65 .word 0x08013e65
  46775. 8013ec4: 08013f13 .word 0x08013f13
  46776. 8013ec8: 08013e65 .word 0x08013e65
  46777. 8013ecc: 08013e65 .word 0x08013e65
  46778. 8013ed0: 08013fab .word 0x08013fab
  46779. 8013ed4: 6833 ldr r3, [r6, #0]
  46780. 8013ed6: 1d1a adds r2, r3, #4
  46781. 8013ed8: 681b ldr r3, [r3, #0]
  46782. 8013eda: 6032 str r2, [r6, #0]
  46783. 8013edc: f104 0642 add.w r6, r4, #66 @ 0x42
  46784. 8013ee0: f884 3042 strb.w r3, [r4, #66] @ 0x42
  46785. 8013ee4: 2301 movs r3, #1
  46786. 8013ee6: e09d b.n 8014024 <_printf_i+0x1e8>
  46787. 8013ee8: 6833 ldr r3, [r6, #0]
  46788. 8013eea: 6820 ldr r0, [r4, #0]
  46789. 8013eec: 1d19 adds r1, r3, #4
  46790. 8013eee: 6031 str r1, [r6, #0]
  46791. 8013ef0: 0606 lsls r6, r0, #24
  46792. 8013ef2: d501 bpl.n 8013ef8 <_printf_i+0xbc>
  46793. 8013ef4: 681d ldr r5, [r3, #0]
  46794. 8013ef6: e003 b.n 8013f00 <_printf_i+0xc4>
  46795. 8013ef8: 0645 lsls r5, r0, #25
  46796. 8013efa: d5fb bpl.n 8013ef4 <_printf_i+0xb8>
  46797. 8013efc: f9b3 5000 ldrsh.w r5, [r3]
  46798. 8013f00: 2d00 cmp r5, #0
  46799. 8013f02: da03 bge.n 8013f0c <_printf_i+0xd0>
  46800. 8013f04: 232d movs r3, #45 @ 0x2d
  46801. 8013f06: 426d negs r5, r5
  46802. 8013f08: f884 3043 strb.w r3, [r4, #67] @ 0x43
  46803. 8013f0c: 4859 ldr r0, [pc, #356] @ (8014074 <_printf_i+0x238>)
  46804. 8013f0e: 230a movs r3, #10
  46805. 8013f10: e011 b.n 8013f36 <_printf_i+0xfa>
  46806. 8013f12: 6821 ldr r1, [r4, #0]
  46807. 8013f14: 6833 ldr r3, [r6, #0]
  46808. 8013f16: 0608 lsls r0, r1, #24
  46809. 8013f18: f853 5b04 ldr.w r5, [r3], #4
  46810. 8013f1c: d402 bmi.n 8013f24 <_printf_i+0xe8>
  46811. 8013f1e: 0649 lsls r1, r1, #25
  46812. 8013f20: bf48 it mi
  46813. 8013f22: b2ad uxthmi r5, r5
  46814. 8013f24: 2f6f cmp r7, #111 @ 0x6f
  46815. 8013f26: 4853 ldr r0, [pc, #332] @ (8014074 <_printf_i+0x238>)
  46816. 8013f28: 6033 str r3, [r6, #0]
  46817. 8013f2a: bf14 ite ne
  46818. 8013f2c: 230a movne r3, #10
  46819. 8013f2e: 2308 moveq r3, #8
  46820. 8013f30: 2100 movs r1, #0
  46821. 8013f32: f884 1043 strb.w r1, [r4, #67] @ 0x43
  46822. 8013f36: 6866 ldr r6, [r4, #4]
  46823. 8013f38: 60a6 str r6, [r4, #8]
  46824. 8013f3a: 2e00 cmp r6, #0
  46825. 8013f3c: bfa2 ittt ge
  46826. 8013f3e: 6821 ldrge r1, [r4, #0]
  46827. 8013f40: f021 0104 bicge.w r1, r1, #4
  46828. 8013f44: 6021 strge r1, [r4, #0]
  46829. 8013f46: b90d cbnz r5, 8013f4c <_printf_i+0x110>
  46830. 8013f48: 2e00 cmp r6, #0
  46831. 8013f4a: d04b beq.n 8013fe4 <_printf_i+0x1a8>
  46832. 8013f4c: 4616 mov r6, r2
  46833. 8013f4e: fbb5 f1f3 udiv r1, r5, r3
  46834. 8013f52: fb03 5711 mls r7, r3, r1, r5
  46835. 8013f56: 5dc7 ldrb r7, [r0, r7]
  46836. 8013f58: f806 7d01 strb.w r7, [r6, #-1]!
  46837. 8013f5c: 462f mov r7, r5
  46838. 8013f5e: 42bb cmp r3, r7
  46839. 8013f60: 460d mov r5, r1
  46840. 8013f62: d9f4 bls.n 8013f4e <_printf_i+0x112>
  46841. 8013f64: 2b08 cmp r3, #8
  46842. 8013f66: d10b bne.n 8013f80 <_printf_i+0x144>
  46843. 8013f68: 6823 ldr r3, [r4, #0]
  46844. 8013f6a: 07df lsls r7, r3, #31
  46845. 8013f6c: d508 bpl.n 8013f80 <_printf_i+0x144>
  46846. 8013f6e: 6923 ldr r3, [r4, #16]
  46847. 8013f70: 6861 ldr r1, [r4, #4]
  46848. 8013f72: 4299 cmp r1, r3
  46849. 8013f74: bfde ittt le
  46850. 8013f76: 2330 movle r3, #48 @ 0x30
  46851. 8013f78: f806 3c01 strble.w r3, [r6, #-1]
  46852. 8013f7c: f106 36ff addle.w r6, r6, #4294967295 @ 0xffffffff
  46853. 8013f80: 1b92 subs r2, r2, r6
  46854. 8013f82: 6122 str r2, [r4, #16]
  46855. 8013f84: f8cd a000 str.w sl, [sp]
  46856. 8013f88: 464b mov r3, r9
  46857. 8013f8a: aa03 add r2, sp, #12
  46858. 8013f8c: 4621 mov r1, r4
  46859. 8013f8e: 4640 mov r0, r8
  46860. 8013f90: f7ff fee6 bl 8013d60 <_printf_common>
  46861. 8013f94: 3001 adds r0, #1
  46862. 8013f96: d14a bne.n 801402e <_printf_i+0x1f2>
  46863. 8013f98: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  46864. 8013f9c: b004 add sp, #16
  46865. 8013f9e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc}
  46866. 8013fa2: 6823 ldr r3, [r4, #0]
  46867. 8013fa4: f043 0320 orr.w r3, r3, #32
  46868. 8013fa8: 6023 str r3, [r4, #0]
  46869. 8013faa: 4833 ldr r0, [pc, #204] @ (8014078 <_printf_i+0x23c>)
  46870. 8013fac: 2778 movs r7, #120 @ 0x78
  46871. 8013fae: f884 7045 strb.w r7, [r4, #69] @ 0x45
  46872. 8013fb2: 6823 ldr r3, [r4, #0]
  46873. 8013fb4: 6831 ldr r1, [r6, #0]
  46874. 8013fb6: 061f lsls r7, r3, #24
  46875. 8013fb8: f851 5b04 ldr.w r5, [r1], #4
  46876. 8013fbc: d402 bmi.n 8013fc4 <_printf_i+0x188>
  46877. 8013fbe: 065f lsls r7, r3, #25
  46878. 8013fc0: bf48 it mi
  46879. 8013fc2: b2ad uxthmi r5, r5
  46880. 8013fc4: 6031 str r1, [r6, #0]
  46881. 8013fc6: 07d9 lsls r1, r3, #31
  46882. 8013fc8: bf44 itt mi
  46883. 8013fca: f043 0320 orrmi.w r3, r3, #32
  46884. 8013fce: 6023 strmi r3, [r4, #0]
  46885. 8013fd0: b11d cbz r5, 8013fda <_printf_i+0x19e>
  46886. 8013fd2: 2310 movs r3, #16
  46887. 8013fd4: e7ac b.n 8013f30 <_printf_i+0xf4>
  46888. 8013fd6: 4827 ldr r0, [pc, #156] @ (8014074 <_printf_i+0x238>)
  46889. 8013fd8: e7e9 b.n 8013fae <_printf_i+0x172>
  46890. 8013fda: 6823 ldr r3, [r4, #0]
  46891. 8013fdc: f023 0320 bic.w r3, r3, #32
  46892. 8013fe0: 6023 str r3, [r4, #0]
  46893. 8013fe2: e7f6 b.n 8013fd2 <_printf_i+0x196>
  46894. 8013fe4: 4616 mov r6, r2
  46895. 8013fe6: e7bd b.n 8013f64 <_printf_i+0x128>
  46896. 8013fe8: 6833 ldr r3, [r6, #0]
  46897. 8013fea: 6825 ldr r5, [r4, #0]
  46898. 8013fec: 6961 ldr r1, [r4, #20]
  46899. 8013fee: 1d18 adds r0, r3, #4
  46900. 8013ff0: 6030 str r0, [r6, #0]
  46901. 8013ff2: 062e lsls r6, r5, #24
  46902. 8013ff4: 681b ldr r3, [r3, #0]
  46903. 8013ff6: d501 bpl.n 8013ffc <_printf_i+0x1c0>
  46904. 8013ff8: 6019 str r1, [r3, #0]
  46905. 8013ffa: e002 b.n 8014002 <_printf_i+0x1c6>
  46906. 8013ffc: 0668 lsls r0, r5, #25
  46907. 8013ffe: d5fb bpl.n 8013ff8 <_printf_i+0x1bc>
  46908. 8014000: 8019 strh r1, [r3, #0]
  46909. 8014002: 2300 movs r3, #0
  46910. 8014004: 6123 str r3, [r4, #16]
  46911. 8014006: 4616 mov r6, r2
  46912. 8014008: e7bc b.n 8013f84 <_printf_i+0x148>
  46913. 801400a: 6833 ldr r3, [r6, #0]
  46914. 801400c: 1d1a adds r2, r3, #4
  46915. 801400e: 6032 str r2, [r6, #0]
  46916. 8014010: 681e ldr r6, [r3, #0]
  46917. 8014012: 6862 ldr r2, [r4, #4]
  46918. 8014014: 2100 movs r1, #0
  46919. 8014016: 4630 mov r0, r6
  46920. 8014018: f7ec f97a bl 8000310 <memchr>
  46921. 801401c: b108 cbz r0, 8014022 <_printf_i+0x1e6>
  46922. 801401e: 1b80 subs r0, r0, r6
  46923. 8014020: 6060 str r0, [r4, #4]
  46924. 8014022: 6863 ldr r3, [r4, #4]
  46925. 8014024: 6123 str r3, [r4, #16]
  46926. 8014026: 2300 movs r3, #0
  46927. 8014028: f884 3043 strb.w r3, [r4, #67] @ 0x43
  46928. 801402c: e7aa b.n 8013f84 <_printf_i+0x148>
  46929. 801402e: 6923 ldr r3, [r4, #16]
  46930. 8014030: 4632 mov r2, r6
  46931. 8014032: 4649 mov r1, r9
  46932. 8014034: 4640 mov r0, r8
  46933. 8014036: 47d0 blx sl
  46934. 8014038: 3001 adds r0, #1
  46935. 801403a: d0ad beq.n 8013f98 <_printf_i+0x15c>
  46936. 801403c: 6823 ldr r3, [r4, #0]
  46937. 801403e: 079b lsls r3, r3, #30
  46938. 8014040: d413 bmi.n 801406a <_printf_i+0x22e>
  46939. 8014042: 68e0 ldr r0, [r4, #12]
  46940. 8014044: 9b03 ldr r3, [sp, #12]
  46941. 8014046: 4298 cmp r0, r3
  46942. 8014048: bfb8 it lt
  46943. 801404a: 4618 movlt r0, r3
  46944. 801404c: e7a6 b.n 8013f9c <_printf_i+0x160>
  46945. 801404e: 2301 movs r3, #1
  46946. 8014050: 4632 mov r2, r6
  46947. 8014052: 4649 mov r1, r9
  46948. 8014054: 4640 mov r0, r8
  46949. 8014056: 47d0 blx sl
  46950. 8014058: 3001 adds r0, #1
  46951. 801405a: d09d beq.n 8013f98 <_printf_i+0x15c>
  46952. 801405c: 3501 adds r5, #1
  46953. 801405e: 68e3 ldr r3, [r4, #12]
  46954. 8014060: 9903 ldr r1, [sp, #12]
  46955. 8014062: 1a5b subs r3, r3, r1
  46956. 8014064: 42ab cmp r3, r5
  46957. 8014066: dcf2 bgt.n 801404e <_printf_i+0x212>
  46958. 8014068: e7eb b.n 8014042 <_printf_i+0x206>
  46959. 801406a: 2500 movs r5, #0
  46960. 801406c: f104 0619 add.w r6, r4, #25
  46961. 8014070: e7f5 b.n 801405e <_printf_i+0x222>
  46962. 8014072: bf00 nop
  46963. 8014074: 08018098 .word 0x08018098
  46964. 8014078: 080180a9 .word 0x080180a9
  46965. 0801407c <fiprintf>:
  46966. 801407c: b40e push {r1, r2, r3}
  46967. 801407e: b503 push {r0, r1, lr}
  46968. 8014080: 4601 mov r1, r0
  46969. 8014082: ab03 add r3, sp, #12
  46970. 8014084: 4805 ldr r0, [pc, #20] @ (801409c <fiprintf+0x20>)
  46971. 8014086: f853 2b04 ldr.w r2, [r3], #4
  46972. 801408a: 6800 ldr r0, [r0, #0]
  46973. 801408c: 9301 str r3, [sp, #4]
  46974. 801408e: f7ff fd4f bl 8013b30 <_vfiprintf_r>
  46975. 8014092: b002 add sp, #8
  46976. 8014094: f85d eb04 ldr.w lr, [sp], #4
  46977. 8014098: b003 add sp, #12
  46978. 801409a: 4770 bx lr
  46979. 801409c: 2400003c .word 0x2400003c
  46980. 080140a0 <__swhatbuf_r>:
  46981. 80140a0: b570 push {r4, r5, r6, lr}
  46982. 80140a2: 460c mov r4, r1
  46983. 80140a4: f9b1 100e ldrsh.w r1, [r1, #14]
  46984. 80140a8: 2900 cmp r1, #0
  46985. 80140aa: b096 sub sp, #88 @ 0x58
  46986. 80140ac: 4615 mov r5, r2
  46987. 80140ae: 461e mov r6, r3
  46988. 80140b0: da0d bge.n 80140ce <__swhatbuf_r+0x2e>
  46989. 80140b2: 89a3 ldrh r3, [r4, #12]
  46990. 80140b4: f013 0f80 tst.w r3, #128 @ 0x80
  46991. 80140b8: f04f 0100 mov.w r1, #0
  46992. 80140bc: bf14 ite ne
  46993. 80140be: 2340 movne r3, #64 @ 0x40
  46994. 80140c0: f44f 6380 moveq.w r3, #1024 @ 0x400
  46995. 80140c4: 2000 movs r0, #0
  46996. 80140c6: 6031 str r1, [r6, #0]
  46997. 80140c8: 602b str r3, [r5, #0]
  46998. 80140ca: b016 add sp, #88 @ 0x58
  46999. 80140cc: bd70 pop {r4, r5, r6, pc}
  47000. 80140ce: 466a mov r2, sp
  47001. 80140d0: f000 f848 bl 8014164 <_fstat_r>
  47002. 80140d4: 2800 cmp r0, #0
  47003. 80140d6: dbec blt.n 80140b2 <__swhatbuf_r+0x12>
  47004. 80140d8: 9901 ldr r1, [sp, #4]
  47005. 80140da: f401 4170 and.w r1, r1, #61440 @ 0xf000
  47006. 80140de: f5a1 5300 sub.w r3, r1, #8192 @ 0x2000
  47007. 80140e2: 4259 negs r1, r3
  47008. 80140e4: 4159 adcs r1, r3
  47009. 80140e6: f44f 6380 mov.w r3, #1024 @ 0x400
  47010. 80140ea: e7eb b.n 80140c4 <__swhatbuf_r+0x24>
  47011. 080140ec <__smakebuf_r>:
  47012. 80140ec: 898b ldrh r3, [r1, #12]
  47013. 80140ee: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
  47014. 80140f0: 079d lsls r5, r3, #30
  47015. 80140f2: 4606 mov r6, r0
  47016. 80140f4: 460c mov r4, r1
  47017. 80140f6: d507 bpl.n 8014108 <__smakebuf_r+0x1c>
  47018. 80140f8: f104 0347 add.w r3, r4, #71 @ 0x47
  47019. 80140fc: 6023 str r3, [r4, #0]
  47020. 80140fe: 6123 str r3, [r4, #16]
  47021. 8014100: 2301 movs r3, #1
  47022. 8014102: 6163 str r3, [r4, #20]
  47023. 8014104: b003 add sp, #12
  47024. 8014106: bdf0 pop {r4, r5, r6, r7, pc}
  47025. 8014108: ab01 add r3, sp, #4
  47026. 801410a: 466a mov r2, sp
  47027. 801410c: f7ff ffc8 bl 80140a0 <__swhatbuf_r>
  47028. 8014110: 9f00 ldr r7, [sp, #0]
  47029. 8014112: 4605 mov r5, r0
  47030. 8014114: 4639 mov r1, r7
  47031. 8014116: 4630 mov r0, r6
  47032. 8014118: f7ff fc54 bl 80139c4 <_malloc_r>
  47033. 801411c: b948 cbnz r0, 8014132 <__smakebuf_r+0x46>
  47034. 801411e: f9b4 300c ldrsh.w r3, [r4, #12]
  47035. 8014122: 059a lsls r2, r3, #22
  47036. 8014124: d4ee bmi.n 8014104 <__smakebuf_r+0x18>
  47037. 8014126: f023 0303 bic.w r3, r3, #3
  47038. 801412a: f043 0302 orr.w r3, r3, #2
  47039. 801412e: 81a3 strh r3, [r4, #12]
  47040. 8014130: e7e2 b.n 80140f8 <__smakebuf_r+0xc>
  47041. 8014132: 89a3 ldrh r3, [r4, #12]
  47042. 8014134: 6020 str r0, [r4, #0]
  47043. 8014136: f043 0380 orr.w r3, r3, #128 @ 0x80
  47044. 801413a: 81a3 strh r3, [r4, #12]
  47045. 801413c: 9b01 ldr r3, [sp, #4]
  47046. 801413e: e9c4 0704 strd r0, r7, [r4, #16]
  47047. 8014142: b15b cbz r3, 801415c <__smakebuf_r+0x70>
  47048. 8014144: f9b4 100e ldrsh.w r1, [r4, #14]
  47049. 8014148: 4630 mov r0, r6
  47050. 801414a: f000 f81d bl 8014188 <_isatty_r>
  47051. 801414e: b128 cbz r0, 801415c <__smakebuf_r+0x70>
  47052. 8014150: 89a3 ldrh r3, [r4, #12]
  47053. 8014152: f023 0303 bic.w r3, r3, #3
  47054. 8014156: f043 0301 orr.w r3, r3, #1
  47055. 801415a: 81a3 strh r3, [r4, #12]
  47056. 801415c: 89a3 ldrh r3, [r4, #12]
  47057. 801415e: 431d orrs r5, r3
  47058. 8014160: 81a5 strh r5, [r4, #12]
  47059. 8014162: e7cf b.n 8014104 <__smakebuf_r+0x18>
  47060. 08014164 <_fstat_r>:
  47061. 8014164: b538 push {r3, r4, r5, lr}
  47062. 8014166: 4d07 ldr r5, [pc, #28] @ (8014184 <_fstat_r+0x20>)
  47063. 8014168: 2300 movs r3, #0
  47064. 801416a: 4604 mov r4, r0
  47065. 801416c: 4608 mov r0, r1
  47066. 801416e: 4611 mov r1, r2
  47067. 8014170: 602b str r3, [r5, #0]
  47068. 8014172: f7ec fd10 bl 8000b96 <_fstat>
  47069. 8014176: 1c43 adds r3, r0, #1
  47070. 8014178: d102 bne.n 8014180 <_fstat_r+0x1c>
  47071. 801417a: 682b ldr r3, [r5, #0]
  47072. 801417c: b103 cbz r3, 8014180 <_fstat_r+0x1c>
  47073. 801417e: 6023 str r3, [r4, #0]
  47074. 8014180: bd38 pop {r3, r4, r5, pc}
  47075. 8014182: bf00 nop
  47076. 8014184: 24019d8c .word 0x24019d8c
  47077. 08014188 <_isatty_r>:
  47078. 8014188: b538 push {r3, r4, r5, lr}
  47079. 801418a: 4d06 ldr r5, [pc, #24] @ (80141a4 <_isatty_r+0x1c>)
  47080. 801418c: 2300 movs r3, #0
  47081. 801418e: 4604 mov r4, r0
  47082. 8014190: 4608 mov r0, r1
  47083. 8014192: 602b str r3, [r5, #0]
  47084. 8014194: f7ec fd04 bl 8000ba0 <_isatty>
  47085. 8014198: 1c43 adds r3, r0, #1
  47086. 801419a: d102 bne.n 80141a2 <_isatty_r+0x1a>
  47087. 801419c: 682b ldr r3, [r5, #0]
  47088. 801419e: b103 cbz r3, 80141a2 <_isatty_r+0x1a>
  47089. 80141a0: 6023 str r3, [r4, #0]
  47090. 80141a2: bd38 pop {r3, r4, r5, pc}
  47091. 80141a4: 24019d8c .word 0x24019d8c
  47092. 080141a8 <_sbrk_r>:
  47093. 80141a8: b538 push {r3, r4, r5, lr}
  47094. 80141aa: 4d06 ldr r5, [pc, #24] @ (80141c4 <_sbrk_r+0x1c>)
  47095. 80141ac: 2300 movs r3, #0
  47096. 80141ae: 4604 mov r4, r0
  47097. 80141b0: 4608 mov r0, r1
  47098. 80141b2: 602b str r3, [r5, #0]
  47099. 80141b4: f7ec fcf8 bl 8000ba8 <_sbrk>
  47100. 80141b8: 1c43 adds r3, r0, #1
  47101. 80141ba: d102 bne.n 80141c2 <_sbrk_r+0x1a>
  47102. 80141bc: 682b ldr r3, [r5, #0]
  47103. 80141be: b103 cbz r3, 80141c2 <_sbrk_r+0x1a>
  47104. 80141c0: 6023 str r3, [r4, #0]
  47105. 80141c2: bd38 pop {r3, r4, r5, pc}
  47106. 80141c4: 24019d8c .word 0x24019d8c
  47107. 080141c8 <abort>:
  47108. 80141c8: b508 push {r3, lr}
  47109. 80141ca: 2006 movs r0, #6
  47110. 80141cc: f000 f82c bl 8014228 <raise>
  47111. 80141d0: 2001 movs r0, #1
  47112. 80141d2: f7ec fcb9 bl 8000b48 <_exit>
  47113. 080141d6 <_raise_r>:
  47114. 80141d6: 291f cmp r1, #31
  47115. 80141d8: b538 push {r3, r4, r5, lr}
  47116. 80141da: 4605 mov r5, r0
  47117. 80141dc: 460c mov r4, r1
  47118. 80141de: d904 bls.n 80141ea <_raise_r+0x14>
  47119. 80141e0: 2316 movs r3, #22
  47120. 80141e2: 6003 str r3, [r0, #0]
  47121. 80141e4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff
  47122. 80141e8: bd38 pop {r3, r4, r5, pc}
  47123. 80141ea: 6bc2 ldr r2, [r0, #60] @ 0x3c
  47124. 80141ec: b112 cbz r2, 80141f4 <_raise_r+0x1e>
  47125. 80141ee: f852 3021 ldr.w r3, [r2, r1, lsl #2]
  47126. 80141f2: b94b cbnz r3, 8014208 <_raise_r+0x32>
  47127. 80141f4: 4628 mov r0, r5
  47128. 80141f6: f000 f831 bl 801425c <_getpid_r>
  47129. 80141fa: 4622 mov r2, r4
  47130. 80141fc: 4601 mov r1, r0
  47131. 80141fe: 4628 mov r0, r5
  47132. 8014200: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr}
  47133. 8014204: f000 b818 b.w 8014238 <_kill_r>
  47134. 8014208: 2b01 cmp r3, #1
  47135. 801420a: d00a beq.n 8014222 <_raise_r+0x4c>
  47136. 801420c: 1c59 adds r1, r3, #1
  47137. 801420e: d103 bne.n 8014218 <_raise_r+0x42>
  47138. 8014210: 2316 movs r3, #22
  47139. 8014212: 6003 str r3, [r0, #0]
  47140. 8014214: 2001 movs r0, #1
  47141. 8014216: e7e7 b.n 80141e8 <_raise_r+0x12>
  47142. 8014218: 2100 movs r1, #0
  47143. 801421a: f842 1024 str.w r1, [r2, r4, lsl #2]
  47144. 801421e: 4620 mov r0, r4
  47145. 8014220: 4798 blx r3
  47146. 8014222: 2000 movs r0, #0
  47147. 8014224: e7e0 b.n 80141e8 <_raise_r+0x12>
  47148. ...
  47149. 08014228 <raise>:
  47150. 8014228: 4b02 ldr r3, [pc, #8] @ (8014234 <raise+0xc>)
  47151. 801422a: 4601 mov r1, r0
  47152. 801422c: 6818 ldr r0, [r3, #0]
  47153. 801422e: f7ff bfd2 b.w 80141d6 <_raise_r>
  47154. 8014232: bf00 nop
  47155. 8014234: 2400003c .word 0x2400003c
  47156. 08014238 <_kill_r>:
  47157. 8014238: b538 push {r3, r4, r5, lr}
  47158. 801423a: 4d07 ldr r5, [pc, #28] @ (8014258 <_kill_r+0x20>)
  47159. 801423c: 2300 movs r3, #0
  47160. 801423e: 4604 mov r4, r0
  47161. 8014240: 4608 mov r0, r1
  47162. 8014242: 4611 mov r1, r2
  47163. 8014244: 602b str r3, [r5, #0]
  47164. 8014246: f7ec fc77 bl 8000b38 <_kill>
  47165. 801424a: 1c43 adds r3, r0, #1
  47166. 801424c: d102 bne.n 8014254 <_kill_r+0x1c>
  47167. 801424e: 682b ldr r3, [r5, #0]
  47168. 8014250: b103 cbz r3, 8014254 <_kill_r+0x1c>
  47169. 8014252: 6023 str r3, [r4, #0]
  47170. 8014254: bd38 pop {r3, r4, r5, pc}
  47171. 8014256: bf00 nop
  47172. 8014258: 24019d8c .word 0x24019d8c
  47173. 0801425c <_getpid_r>:
  47174. 801425c: f7ec bc6a b.w 8000b34 <_getpid>
  47175. 08014260 <_init>:
  47176. 8014260: b5f8 push {r3, r4, r5, r6, r7, lr}
  47177. 8014262: bf00 nop
  47178. 8014264: bcf8 pop {r3, r4, r5, r6, r7}
  47179. 8014266: bc08 pop {r3}
  47180. 8014268: 469e mov lr, r3
  47181. 801426a: 4770 bx lr
  47182. 0801426c <_fini>:
  47183. 801426c: b5f8 push {r3, r4, r5, r6, r7, lr}
  47184. 801426e: bf00 nop
  47185. 8014270: bcf8 pop {r3, r4, r5, r6, r7}
  47186. 8014272: bc08 pop {r3}
  47187. 8014274: 469e mov lr, r3
  47188. 8014276: 4770 bx lr