To add to that, we use the GNU ARM Eclipse plugin (
http://gnuarmeclipse.github.io/) to get the peripherals view while
debugging.

The website (http://gnuarmeclipse.github.io/plugins/packs-manager/) has
good documentation of how to get it up and running. We couldn't get it to
work on Neon, but the plugin works fine on Eclipse Mars.

The only downside is you can associate only one device with every project.
It would be great to tie a target device with a debug configuration instead
of a project, but that doesn't exist yet.

Jitesh

On Wed, Jan 18, 2017 at 3:15 PM, Christopher Collins <ccoll...@apache.org>
wrote:

> Oops, it looks like the screenshots didn't go through.  I am attaching
> them now.
>
> Chris
>
> On Wed, Jan 18, 2017 at 03:12:05PM -0800, Christopher Collins wrote:
> > Here are some of my notes for getting Mynewt to work with eclipse.  I
> > wrote these a while back, so there may be a few inaccuracies.  Also,
> > these notes assume you are building bletiny for the nRF52dk BSP, so you
> > may need to adjust accordingly.
> >
> > Thanks,
> > Chris
> >
> > *** Setup
> >
> > 1. Download Eclipse Neon (https://www.eclipse.org/downloads/).
> >
> > 2. Start Eclipse.
> >
> > 3. Eclipse -> Preferences -> C/C++ -> Environment; Add a "PATH" Variable
> >    with the value "/usr/local/bin" (or wherever arm-none-eabi-gdb is
> >    located on your machine).
> >
> > 4. In your newt project directory, overwrite
> >    repos/apache-mynewt-core/hw/bsp/nrf52dk/nrf52dk_debug.sh with the
> >    attached version.
> >
> > *** New project
> >
> > 5. File -> New -> New Project -> C/C++ -> C Project ->
> >    Makefile project -> Empty Project
> >
> > 6. Select "-- Other Toolchain --" in the Toolchains panel.
> >
> > 7. Type your project's name in the "Project name" field.
> >
> > 8. Select your newt project directory in the "Location" field.
> >
> > (see "new-project.png").
> >
> > 9. Click Finish.
> >
> > *** Debug configuration
> >
> > 10. Right-click your project and select "Debug As..." ->
> >     "Debug Configurations".
> >
> > 11. Double click "C/C++ Remote Application" to create a new debug
> >     configuration.  The new configuration should now be selected.
> >
> > 12. At the bottom of the window, you should see: "Using GDB (DSF)
> >     Automatic Remote Debugging Launcher - Select other...".  Click the
> >     "Select other..." link.
> >
> > 13. Check "Use configuration specific settings"
> >
> > 14. Select "GDB (DSF) Manual Remote Debugging Launcher"
> >
> > (see "select-launcher.png").
> >
> > 15. Click OK.
> >
> > 16. (Main tab) In the "C/C++ Application" field, select the .elf file
> >     corresponding to your newt target.
> >
> > 17. (Main tab) Check "Disable auto build"
> >
> > (see "debug-main.png").
> >
> > 18. (Debugger, Main tab) In the "GDB debugger" field, type:
> >     arm-none-eabi-gdb
> >
> > (see "debug-debugger-main.png").
> >
> > 19. (Debugger, Connection tab) In the "Port number" field, type: 3333
> >
> > (see "debug-debugger-connection.png").
> >
> > 20. Click Apply and Close.
> >
> > *** Debugging
> >
> > 21. In a shell, run "newt run <target-name> 0".  JLinkGDBServer should
> >     start up and listen for a connection from gdb.
> >
> > 21. Select your project in the Project Explorer.
> >
> > 22. Click the icon with a picture of a bug.  The debugger should start.
> >
> > 23. The board will be in a bad state and requires a reset.  Type
> >     "monitor reset" in the Console pane
> >
> > (see "monitor-reset.png")
> >
> > 24. Click the Resume button (play button with a yellow rectangle on its
> >     left).  The program should now halt at the start of main().
>
>
>

-- 
This email including attachments contains Mad Apparel, Inc. DBA Athos 
privileged, confidential, and proprietary information solely for the use 
for the addressed recipients. If you are not the intended recipient, please 
be aware that any review, disclosure, copying, distribution, or use of the 
contents of this message is strictly prohibited. If you have received this 
in error, please delete it immediately and notify the sender. All rights 
reserved by Mad Apparel, Inc. 2012. The information contained herein is the 
exclusive property of Mad Apparel, Inc. and should not be used, 
distributed, reproduced, or disclosed in whole or in part without prior 
written permission of Mad Apparel, Inc.

Reply via email to