1 CENG 255 Laboratory Experiment #0 Tutorial: Introduction to Eclipse Eclipse is an integrated development environment (IDE) that can be used to develop applications with various programming languages such as C and C++. With the proper plug-ins, one can develop ARM assembly applications in Eclipse and execute/debug programs on ARM development boards. This is a tutorial to introduce Eclipse and the process of developing C and assembly programs to be executed on the STM32F0 Discovery Boards in the lab. Part 1: Create a Blinky C Project 1. Configure Eclipse for STM32F0 You develop and store your source code as projects. To create a project, go to Eclipse menu, File ->New, and select C Project:
20
Embed
CENG 255 Laboratory Experiment #0 Tutorial: …kinli/ceng255/CENG-255-2017-Lab0-v1.pdf1 CENG 255 Laboratory Experiment #0 Tutorial: Introduction to Eclipse Eclipse is an integrated
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
CENG255LaboratoryExperiment#0
Tutorial:IntroductiontoEclipse
Eclipse is an integrated development environment (IDE) that can beusedtodevelopapplicationswithvariousprogramminglanguagessuchasCandC++.Withtheproperplug-ins,onecandevelopARMassemblyapplications in Eclipse and execute/debug programs on ARMdevelopment boards. This is a tutorial to introduce Eclipse and theprocessofdevelopingCandassemblyprogramstobeexecutedontheSTM32F0DiscoveryBoardsinthelab.
The debugging configuration wizard creates a debug setting for the Blinky project. The result ofdebugging installs the binary of the project into theARMboard (that is, the executable binary file isdownloaded to thememory onboard). At the beginning of debugprocess, the program stops at themainfunctionwaitingfortheprogrammertodebugtheprogram.
15
The icons labeledbelow inthetoolbarofEclipsearetheonesusedmost frequently indebuggingandtheyhelptheprogrammertointeractwiththedebugger.Experimentandplaywiththeseiconsandseehowtheywork.
During the debugging process you will be examining registers in the processor. You can change thedisplayedformatofaregisterbyrightclickingonthespecificregisterandselectingtheNumberFormatoptionasshowninthefigurebelow.Youcanalsochangeagroupofregisters.Iftheregistertabisnotthere,youcandisplayitbyselectingtheWindowoptiononthemainmenuthenShowView->Registers.
Thememorybrowser allows you toexamine sectionsofmemory in youprogram. The cell size is thenumberEclipseuses in theMemoryBrowser tab.Tochangeyourcell size rightclickon thedisplayeddata inyourMemoryBrowser tabandselect theCellSizeoption, thenselect thecell size tobeused.Thisisshownintheimagebelow.
During the debugging process when the debugger steps or encounters a break point it will printinformation on the console tab. When this occurs Eclipse will automatically switch to the consolewindowtodisplay this information. In specificCENG255 labs suchas thebubble sort lab itwouldbemoreconvenienttonothaveEclipseswitchtotheconsoleandjusttostayintheMemoryBrowsertab.Therearetwowaystoachievethis.
The first is todisableconsoleswitching.Thisoptioncanbe found in thewindows->preferencesdialogbox. InthepreferencesdialogexpandtheRun/Debugsectionandselectconsole.Unselecttheoptions
19
“Showwhenprogramwrites to standardout”and “Showwhenprogramwrites to standarderror”asshownintheimagebelow.ThisisaglobalsettingandwillapplytoallprojectsintheEclipseworkspace.
ThesecondmethodisbydraggingtheMemorybrowsertoavacantareaonthescreennotbeingusedbyanyprogram.Eclipsewill automatically createanewwindowspecifically for thememorybrowser.ThisfeaturecanbeusedwithanyviewinEclipse.
20
E.Disassemblynotshowingindisassemblywindow:
If you are using the disassembly view there is a known issuewith this feature.When you first enterdebug mode you will notice that the window does not update. See picture on the left. The simpleresolution is toclose thecurrentdisassembly tabandopen it fromthemainmenu. Windows->ShowView->Disassembly.Seepicturetotheright.