Hi Chris,
Thanks for the instruction on setting debugging on eclipse.
Manage to get it to work with minor changes to the steps you provide.
For this step:
5. File -> New -> New Project -> C/C++ -> C Project ->
Makefile project -> Empty Project
I did this instead,
File->New->Project->C/C++->Makefile Project with Existing Code
Then select the Existing Code Location and select <none> for toolchain.
Before this step:
23. The board will be in a bad state and requires a reset. Type
"monitor reset" in the Console panel
I need to send the "interrupt" command before i can send monitor reset.
Now I noticed there is a lot of Symbol could not be resolved errors in eclipse.
What other settings i need to set to remove these error?
Best Regards,
Chew
________________________________
From: Christopher Collins <[email protected]>
Sent: Thursday, 19 January, 2017 7:15:40 AM
To: [email protected]
Subject: Re: Using Eclipse for Mynewt development
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().