100 likes | 115 Views
Learn how to enhance debugging in Eclipse by adding breakpoints, connecting to debuggers, managing targets, and more, for efficient embedded development.
E N D
Code Composer Essentials 3.0 Extending CDT and Eclipse for Embedded Development Dobrin Alexiev: Texas Instruments
Project Launch Workflow • Create new project, write code, compile, debug • Last opened project is called Active • The Launch Dialog is not required • Projects may have debug properties • Creates and reuses Launch Configurations • Similar to other IDEs
Projectless Debugging Workflow • Connect to a multi core debugger • Connect to the desired target • Watch or modify memory, registers, disassembly • Load programs or symbols to different CPUs • Now we can see valid call stack and variables • Specify search path • Full source level debugging • Hides the Launch Dialog • Creates and reuses launch configurations
Breakpoint additions • Add hardware breakpoints support • Add combo box in the Breakpoint View • Add symbolic type breakpoints • Project-less and program-less debugging • Breakpoints are installed after target connect • Symbols can change dynamically
Breakpoint challenges • Having Resources for some but not all types • Fixed Hierarchy • Symbolic breakpoints • Hardware breakpoints • Association of breakpoint to targets and threads • A breakpoint can’t be set on multiple targets • What if the breakpoint has different properties on two targets • Install breakpoint after target is connected
Breakpoint Alternatives • A breakpoint is a set of properties • No need for hierarchy • All of the functionality is by set and get properties • A server can change the breakpoint properties at any time – function type becomes source type • A Debugger implementation can overlap with code that is in CBreakpointManager • Source editor shows breakpoints based on Current Debug Context • By default breakpoints are not shared by all targets • Each target has its own set of breakpoints
More Target States • Connected vs. Disconnected • The debugger is up but it doesn’t have a connection to the target • Symbols don’t have to be reloaded on connect • Breakpoint will be reinstalled on connect • Halt Requested • When CPU halts all OS thread are suspended • Only the current thread is really Halted • The rest will resume as soon the CPU runs • The user can request to Halt other threads
Multiple Targets and Threads • Launch or Debug Target per CPU? • Can each thread has its own symbols? • Breakpoints per target…
Views enhancements • Expression view • Modifiable expressions • Edit enums with a dropdown box • Run and Halt scroll the view • Disassembly view • Scrolling outside of the current function • Address selector dropdown • Opened automatically if limited debug info is available • Memory View • Shows physical vs. virtual memory • Address selector drop down • Breakpoint View • Add new breakpoints from a drop down • Source View • Add breakpoint not only from selection margin
GUI Testing Framework • Automates the workbench GUI using JUnit tests • Executes menus, toolbar and context menus IWorkbenchWindow wb = fScripting.getWorkbench(); wb.getMenuAction("File|New|Project...").asyncExecute(); • Synchronizes with the GUI elements getTopMostDialog().waitUntilDialogHasTitle("New Project“) • Select tree nodes, executes buttons, sets text in edit boxes control.selectNode(“Plug-in Project“) • Provide higher level interface for the Specific Views and Editors