Sie sind auf Seite 1von 34
0° CODE PROJECT len» Interet of Things» Sosa / Embedded devices» Goer How to run .Net Micro Framework 4.4 on STM32F4Discovery mS Alexandr Surkow, 60 2016 ove to build apd run Net Mico Famwork on STM2F4Dicovey bos Introduction Netivicr famewor i technology tht allows to te apptetions for micocontrlrsukng the power of managed code and Vins Sts. was founded ong ine 390 nd row it ig opensource project which ae rcenth moved to GHA, However, not boxed product et Work wth Net mir framework requres cet kl the lst, $i. Tote about how acts and ran semper” appeston onthe emultor fr Windows, Now | wl focus on how o wok withthe Net mero faere on StvszraDicovry board Rusia veson ths adel hee, Background ‘The boards quite common an can be puch for example hers Stating wt the wrsion 44th pot for this boar isincudedin the neminterprete rosin, Preval ested asepatte project ‘ou can fn some matril sbout he launch af Net ico framework on SIMBZF4Dacovery board but hey aero version 43, and they ue compiled stems ite about how to compile a un Net mic famewor vasion on STRS2F4bisovey board n deta. The aia il elon, since is necessary ofa few bss inthe dstiovon and oenloas and ital several utes snd cre Preparing for compilation ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir nas Fist ofall you nee to have that ditibution. ‘You anf th apoio hors. tan be downloded a3 rpetchie ar an be obtained using gi nerucons on howto get the rapostry an bud the inallon fs can be found hare. This ates base on these stctions Versions of te repostry assole th specie reeases canbe downloaded as a zp-tchve fom hee se these tes to get repastory sing at {Greate public copy of the epeitary in your Gu account on the Git servers with fork command Al pl equess must come fom a public GM repaston, 2 Gata local copy af the repostery by wing dane command Fr exam tt clone hesps://atthuo.con/ NETH S.tmporant nthe fle “hint ?aths$(SP0R0T)\Roots\wB6\CEDESIGNCODESION Subattter eI Tc/ntPaths ipo depjccomiicke!OT280tMon soc Na Mice Famer SMF Dacoeoply Pir a “Thins he ete i Without such replscement, ull ofthe repostory wil not succeed. Thi fxs needed only for NET Miro Framework vd Relesse To Web (TWN). Inthe tr, ‘the repository wil aleady contain comect le, You cn ret here abot hs ee 4 Yeu need to downlad the CMESIIbrary and puttin he older \CHSTS. Moreinfammaton about version a inks t the CRIS Lr can be found ‘hefle crepe folder>\CMSIS\ReadMe.nd Msi stands fr Cortex Mirocontol Scfware nterlace Standard. Tis bar doesnot depend on parca manuaclue nd intend to Work wth the Cote core. CMSIS supped and suppor by keel developers the ARM company. Using this rary allows you to smplty the creation of the pors for ferent mcoconlers am difren mamdectrers In cate of version of Net Mir Framework 44 you need to downlad CMSISverton 43 or wet The Bia x supplied as parchive(CMSIS-SP-0800-452-00reBzp. tan be downloaced at ARM web ste The coment of he archive shoul be ptin te folder \CMSIS, 5 Inthe top you need to install he Net Mico Framework Cryptographic Ube. Thee Ira at set sign the semble tht willbe executed onthe miroconol ‘Only executable Hes of yptogaphic Roa ae nected fr bul process. Buty can downined source cde too Libra te asia fie recommend intl hem nay convenient oles wewileallit) and then copy them tothe raat ofeach repository. or example 0: \NETHF \repo ane D: \NETHF\ repo master. ‘he repostoy it complex sructre wth It of crosrferences is combinel by am MSS. project Proje fils lek kan an pro ls for Vs Sto bu thy hive mote enpee suture side. That why Visa tka can't be ves for bulng. 1 discus the components and references inthe repstry a utters Bt fr nom you need to know that the STMSF4Dicovery pot i cated the ‘repo folder>\solutons\SS2FeDTSCOVERY sid ary a ex es wil fund ia oer ‘repo Folder» ui Ldoutput sul isa pt of Visa tui. The documentation for nat inteprete 4 stats that the vtsion of Visual Sudo 2018 Commun, Pro ad Una a supported 50 you need tonsa one of ham Next you nee a compiler for ARM. Net interpreter 4 supporting two compiles + SCCARW Embedded vow compilers part of sl MOK development tool Te fae version hin of 32 KB of ode But she pot has larger, be aur you get» eens. For exmpl, 7-03 MOK-Poersonal Wal iene, Yu can vad hve about el MOK setae, Feshould be nstaed iy default inthe folder C: \Ke_v5, Cis us butt ganarale the ernae tat his 10% gest size than those gnarated by the Resi compiles. GCC ARM Embedded can ba download ap lead Unspped to any deination Iwi ela flr wth coments ofp fle tools Targets icrosoft. spot. systen-nok targets ate vtion S06. To do tia the nes '(CNDILER_ TOO, VERSION) '=='POXS.05'*>"S(HDK_T0DL PATH) \ARAE\bin arn exe™ ‘(COIL ToOL“VERSION) =u‘ ROHS.05"*>S{HDKToOL_PATH)VAROKE\bim\arnec ete"P> ‘S{CARPILEATOOL_VERSION)'=='ROKS.05"*>°S{HDKT0OLPATH)VARAE\bim\arnasa. exe" (/AS> ‘S{CaNPILEAToOL“VERSION)=='ROKS.05"">°S{HDKf0OL“PATH) RAE \Bin\armainc exe") LINO ‘(CNL T0OU“VERSION} =u: POKS.05"*y°S(HDKTT0D1“PATH) ARIE \Bin\arnar ote" {Coven To0. VERSION)" MOKS.05"">"$ (HOE TOOL Pa AaHCCbLa\ Prone] exe" ‘Sr Sona" S{ CNPILEAT0OUVERSION = S$ (rbt_1001"Palt awe \bim\arnce exe" os Sons" S{ NPIL TOOUVERSION = S$ (nbt_"001"PaTH awe \bim arnsen- 686" C7953 etn Sone" S{CRPILERCTOOUVERSION = S$ (noe 1001—paTh awe \bim\ arm ines exe" /CING eA Conatione$ (COMPILER TOOL_VERSTON S$(nbe_v001_part swe \bim\arnar exe" \Solutions\STMB2FADISCOVERY) Fer example: (4 0: \WonKOIR etn etHFRepo\ repo Solu insbui 1d starts compilation dotnetaF. proj - sTMB2F4D1SCOVERY port project, Ip Flavorerelease - bull type jdebug/tessttm 741 -wite og tote te The lg fle will n the cet folder Gn my example path tis D: \WORKDIR\Ne MF \Ne MF Repo \repo\ Solutions \STA32FADISCOVERY, the logfile nat rece, /f1 an be removes pn caepj cick! 1TES0tMonsn cu Na loe Fama SMLF-DacoeopleyPert \botLdovtpvt\TAUNE2FP WOKS 6 Le FLASH\reLense\STHD2=4DISCOVERY bin inybooter hex “repondir>\bul.ovtpve\uMiaFP ORS \le\ FLASH reLenee\STHB2-4D2SC2V=RV\bin\ tiny -nex\ER_COM ‘repodir>\boldovtpue\ MUME2PP DRS Le\ FLASH reLenee\STMB2>4DISCOV=RY bin Enyce nex\ER-PLAST pn caepj cick! 1TES0tMonsn cu Na loe Fama SMLF-DacoeopleyPert 0} /pitlavoreretease /#1 Compile using GCC ARM Embedded “ «CC version \Solutions\STM32F4DISCOVERY) For example 4/4 0: WORKOIR\Net4e NeeHFRepo|repo\Solutons\STHI2FADTSCOVERY ssoulld dotnetnt. ro} /p:flavor-release /#2 insbuid starts compilation dotnetaf. proj -TMS2r4DISCOVERY port project Ip: flavorerelease - bull ype idebug/tessftm 11 -wite og tote fe pn caepj cick! 1TES0tMonsn cu Na loe Fama SMLF-DacoeopleyPert Compiling ates about 10 minutes forme pen caepj cami! 1TES0 Monn Na le Fama SMLF-DacoeopleyPert ‘repo dir> bul doutpue\ HUMEZFP\CCCS9\ie\FLASH\rease\STHS2FADTSCOVERY\bin\Tnyeter hex ‘repo dirs \buloutput\THMEDFP\CCCS.9\de\FLASH\reLease\STHS2F4DISCOVERY ain \tinyclr-nex\ ER CONFIG ‘rapo_dir> bul Lsoutpue\MMEDFP\CCCS,9\le\FLASI\release\STRB2FADISCOVERY\ain\eEnyeiFnex\ERLFLASH Uploading firmware to board ‘Wie have 3 fs Tinybooter hex, ER_CONFIG WER_FLASH,Tinybooter ss bovosder hs sed for CLR uplsing ER_CONFIG and ER_FLASH is CR at Als you wi need ations software 1. SIMS2 ST-UN Uuly lly fr Tote oload 2 Instales W rormorkSDK WSL a Net WS sles. The a contig the required aie and wits. the second contin net miro fimo tmp poets forvewl Sud 1. USS sever needed fr MicofnimmorkSDK ular Without thee, the er utes wi et recogni th board eno equiedfrWinsows 10, Do the folowing tuple frmware 1 Connect the boar to the computer via he mil USB cable: 2) Rn STN STALIN Uy an eet he man Tage» Connect ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir sae How orn Net Mo Franc an SMG2F4Dacovey-CodePoet amie, oe tt Mi eae Dacormest cmd oop ome Se eym Drop cP _sher connecting wth the board STAR ST-LINK Uy look ie this ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir saat sancorr Howoran Net so Famanerk4 an SINIDEADazovey -CodePraet ‘amen, - oe x ie Lat Yon Joy STU teat Hep Sel YE9S DO ae soe me es a IE i = [soreness one) cont ewe). fle... [mens aoe oon cen) feuait cucu Coie [socom ream MD pute TDA Foe Tue 2g. a 3) Risnecessaryto delete th caren frmware by selecting Target-> Erase Sectors ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir How orn Net Mo Franck an SMS2E4Dacovey -ColePoet sep oa coped yh een Open ake Nagsa. oe = Br Fhe zy ‘and there ck Select. ALL nathan Apply ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir aot Flash Memory Maping Pane Fi seaar0 Ziseesi Ei seear2 seca Zeon i secars scans Ziseosr seca era ‘The mirocontolr hah clearing proces at aldo ‘genen0n ‘nceaceon emer) ‘ucexzoon ge24000) ‘nceieoan a eK 18K eK 128k ue. 18k Ca ee “toes ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir ow orn Net Mo Franca SMS2F«Dacovey-CodePoet ad OSA S a= sete [Bae J: [SA] cam] RE _sr leaning STMA2ST-LINK Ut yw ok is thi ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir sancorr Howoran Net so Famanerk4 an SINIDEADazovey -CodePraet ‘usin == x eT Yew ope STU aaa Bee ad WEP B= Se —— 4) Ris neces to plead TnyBootrhexoy electing Target-> Program & Verify... ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir sna se smonstanniny -o x mech cE fare wee a Cn = [some open ‘thon select the tinybooten.hex fe snd pres Start Dewencad | Tinphooterhee] x Sit ataness ceo Fiosom :(iASHinhantSTWRFOIDONESAER Tinto ERS) (Vay ubecouanehns — Oa ate voxarwig ek Stat to posit ree a eg ana se | oe | plop! 1OT280tMon sae Ne Mice Famennn SMF Dacoedopy-Pir _e mate uploading STMS2 STINK Uy wil oo ke this ‘a us inci == x eT Yew ope STU aaa Bee ld WES a air: (Sn) am [Ss] oan (Some) [soxenis —[aeonto — onrme — comrne res Ass (Fs [socom —|rsaene—Fcry pute TD Foe Tw 29+ xo atk was puss "nage y [sims [oes stare as Sweep ppt. ! Se —— 5) nisnecessary to restart the board by paling out the mint Us cable passing the back Reset button 6) se the lero USB cable ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir Now SIW32 STINK Usiy canbe cbse Mini Ue cable wit be used anya wer supp 7)0n Windows 10 he diver isnstated stomatal, but for ther ason i request insta the USB ver manual ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir hearer — a x fan deeme Rat cope een F Eo mes } Baran 3 ear 2 eaereyopot » Tenens ree nsneyoosions ) SB hwrmeree 2 Pterpommss G tacpuarp oman apion Sree 2 Brame panna opens @acrsti 1 sncirosconny : 19 Now you need to run NET Mice Framework Deploy Teal ‘You can fi tin MiceFramaworsoX C:\Program Fes (xt6)\Wierorort NET Micra Franework\e4£\Too2=\REDepoy exe eines to steht the Ser interaeto USB: ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir a (@ NT Mie Famer Daly Tot =o x Thy Options Pun Hep once = fess Be | oe) "his wil show te name fthe bet You can ck the Ping button to check TnyBoetet. The console wll spay Pinging ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir + TinyBooter: (© Mire Fame Dale Tot - ox Tovgt Options Pugin Hep 5) Nex you nee to upload remaining wo les ER_CONFIG and ER_FLASH by wing NET Mico Framework Deployment Took Select them by cing the lower BOWS. « ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir (@ NT Mie Famer Daly Tot =o x Trp Options Phin ee ee : (ev Seemann are =] Be) ae cate = eri rete [WORDT Goce Rex moon MINES VLSI] CBSE] [bY fine. TiniBoseee lekthe Deploy burton to upload the fmmre ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir sancorr Howioran Net so Famanerkt a SINIDEADazovey -CodePaet @ Tess Open Pugin Hop oor | ‘You an press the Ping Suton again and make sre the CIR ployed on the oar after ploding ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir © ner cs Fone Deimos =o x and oie one : sev arson 2) a ee eR cones OWA neo np BRU THINEEP EC EZEASH ——OANORHR Onze basa HUNG PGC Now board ise for wok, Create blinky project by Visual Studio Now yu can bud sd un the proactin the Visual Stu, We make simp projec ky Aahing De ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir eas sancorr Howioran Net so Famanerkt a SINIDEADazovey -CodePaet Stet Vil Sto and crete 3 new rnc 9G) Sek oe: Mic eu Side Fie Et Vew Team Too’ _fachtecue Test ReSharper Arabae Window Help fen elo teeee eee Team Project Coton Fi. Ld Sve Set ame ous Project From isting Code Sve Stet er wP sees ccoesnites ay Epo Tempe care Source Conte! Gl joey Page St. ee ste = open Project. « > Pt cur pes eee Con festa cent ies, ° Recent Poet and Selon, i Peer Nev oe are Sesmit ae FSD and vitinslstion wae parton coract tere wile anew Mica Famawor projet template choose Cosa Apption ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir New eet Reset NET Fameven 432+ SenbyOeut sil AE a a enti Vince —_ ee ‘You can goto the projet popes ter seltoncentng COG|e-soaB|s— Arplication ! Search Soi plo (Ce PP aw [ip Solution ‘STM32F4015C_Test (1 project) Build Events i 2 SIMBRFADISC Test b & Properties, Oetog > a Reese emircee > e Progames ns GB Resourcesrese be Mtl G Select US in the Transport ld nthe NET Wie Famewor projet sens tb. Aer that the name ofthe boa should appear inthe Dele il ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir ae cen SLL) om SSN) tats oo nes — — ia Cinattny 1 Geeta iu frit thee Sve and lose the configuration Nxt you nee tose Reference tothe aera at Cr\Progran Flos (286)\Microrort MET Micro Franenork\ut.e\Rssenblses\ie\Rcrasof SPOT tareuare. dT [ Soluion'TMSRFSDISC Ten (I prjea) 2 STMBZFADISC Test sa mscerio > © Programs DB Resoucesress And tha a opin to modi the codein progras.-c5: sing System; ing Speen: Treading: anospace SIMBZFADISC_test purise class Progran t public static vote Maint) pn fepic.comiicke!1OT280tMon sae Na Mice Famer SMF Dscoedopy-Pir output?ore Lesseeen = now OutputPort{(cpu.Pin)S8, £2150): DutputPore ieavetiow = now Outautrart( (Cpu. Pinot, false): DutputPore ested = now Ovtputeare( (Cpu. Pla)é2, false); DutputPort Leadive = nou OutputPort{(eu-Pin)6s, f3i58)5 vette (true) edsrean ste eoueds Threoessieep( 590); Tesveliownrseeterve)s ‘Threae.sieep( 580); edrea-wrteet crue); Threse.sleep(590); Tededuesneste(erue); Threaa-Steepts30); Tederean nedte( false) deivellowsweste(falsed; dedned.arite( fats), edatuesuedte(’ ais); ShreaeSieepts20); > 2 Fun the project ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir Qs ec vid se fer Poet bat ng Tom Tok Aetecne totter Ane sow tp O- O(N GE )D-o-loun yw pana ME come acy = ooo. we 7 > prcocie peo ‘ad ster on seca the LEDs on the board wl star bling. Summary INET Micro Frameworks» quite complex areec. At the manent sil rages cen sil and knowledge, espcally whan working wth the repostoy. nti arch, | seca ‘iecaee 3 mach 3 porn dea whats eneunteredin baling the pots This information ae fr proving sction to new Bode, However, you can ey use NET Micro rimiork on STMEZEADgcoury by aking the asad eting fils Tnybootr hex ER_CONFIG and ER_FLASH. You cn downlod shen here Points of Interest Hove ate some tink about Net Miro Framework + Siti repository pon ctepiccomiicke!1OT280tMon sau Na Mice Famer SMF-Dscoedopley- Pir sa + -NeoiFtem bly 2 Neb from ci lacroies History License ‘hist, along wth ay sekocate source code and fle is eens uncer The Coxe Project Open canes (POW Share About the Author Alexandr Surkov Software Developer Senin » TD iesonroartonen ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir Meroe MV, Moscow lo? coment leader. You may also be interested in... Generate and add keyword variations using Serial Communication in NET Micro Framework ===— ‘AdWords APL Window Tabs QWndTabs) Add-In for DevStudio ey String Manipulation in the NET Micro Framework a FE saPrets- netscapectke Preferences Dialog ey OLE DB- First steps 2a Comments and Discussions (6 messages have been poste for ths article Vist https//www.codeproject.com/Artces/1078601/How-to-run-Net-Micra-Framework-on-STM-F-Discove to post and view commento ah or cic eres get apne ver ath merges Panaderia an ie ob Ach oh 2b Anan Suto Web? |28 170828.1 | Last Updated 6 Jun 2016 vanae everything ese Copyright © CodeProject, 1985-2017 ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir ipo lepic.comiicke!1OT280tMonsaeur Na Mice Famer SMF Dacor Pir

Das könnte Ihnen auch gefallen