You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Christopher Collins <cc...@apache.org> on 2017/01/18 23:12:05 UTC
Using Eclipse for Mynewt development
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().
Re: Using Eclipse for Mynewt development
Posted by Lm Chew <lm...@free2move.se>.
[https://tr.cloudmagic.com/h/v6/emailtag/tag/1485152681/e07327a00ce48c6feaf5c6318fd5666d/98148963e301c00d168ac75868cda51d/93bbf72599c74b2d1f7b08eb75875339/7d73f5719844943a877cfefbca240ecc/newton.gif]
Hi Andrzej,
Thanks, for the Tutorial!
I tried setting it up and it works flawlessly. :-)
Best Regards,
Chew
On Sat, Jan 21, 2017 at 6:19am, Andrzej Kaczmarek <an...@codecoup.pl>> wrote:
Hi all,
I managed to find some time to write down a short tutorial (with pictures!
;-) ) on how to use Eclipse as IDE for Mynewt. This is based on my own
experience and on what we use in our company with some "upgrades" after
reading through Chris' and Chew's posts. You can find tutorial here:
http://www.codecoup.pl/blog/hacking-mynewt-in-eclipse/ - it covers
configuration of indexer, builder and debugger.
*IMPORTANT*
I use this setup on develop branch since this is what I work with. In
theory, it should also work on master but there are at least two known
problems:
1. for some reason newt@master hangs when run from within Eclipse (stuck at
100% CPU usage) and this basically makes it useless; the newt@develop works
just fine...
2. compiler command line generated by newt@master includes only file name
of compiled file and this probably will confuse build output parser, but I
was not able to check it due to problem above; the newt@develop generates
nice command line with full path names
BTW: would be really nice if newt has some option to print only executed
commands during build - this could be then used instead of '-l debug' which
produces huge amount of logs; I'd actually add this, but my go skills are
less than basic ;-)
BR,
Andrzej
On Thu, Jan 19, 2017 at 12:12 AM, Christopher Collins <cc...@apache.org>
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().
>
Re: Using Eclipse for Mynewt development
Posted by aditi hilbert <ad...@runtime.io>.
Hi Andrzej,
> On Jan 20, 2017, at 2:19 PM, Andrzej Kaczmarek <an...@codecoup.pl> wrote:
>
> Hi all,
>
> I managed to find some time to write down a short tutorial (with pictures!
> ;-) ) on how to use Eclipse as IDE for Mynewt. This is based on my own
Thanks! This is a huge help. We will point to it in the documentation as well.
> experience and on what we use in our company with some "upgrades" after
> reading through Chris' and Chew's posts. You can find tutorial here:
> http://www.codecoup.pl/blog/hacking-mynewt-in-eclipse/ - it covers
> configuration of indexer, builder and debugger.
>
> *IMPORTANT*
> I use this setup on develop branch since this is what I work with. In
> theory, it should also work on master but there are at least two known
> problems:
> 1. for some reason newt@master hangs when run from within Eclipse (stuck at
> 100% CPU usage) and this basically makes it useless; the newt@develop works
> just fine...
> 2. compiler command line generated by newt@master includes only file name
> of compiled file and this probably will confuse build output parser, but I
> was not able to check it due to problem above; the newt@develop generates
> nice command line with full path names
>
> BTW: would be really nice if newt has some option to print only executed
> commands during build - this could be then used instead of '-l debug' which
> produces huge amount of logs; I'd actually add this, but my go skills are
> less than basic ;-)
>
I think that’s a useful addition - so I filed https://issues.apache.org/jira/browse/MYNEWT-553 <https://issues.apache.org/jira/browse/MYNEWT-553>
thanks,
aditi
> BR,
> Andrzej
>
>
> On Thu, Jan 19, 2017 at 12:12 AM, Christopher Collins <cc...@apache.org>
> 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().
>>
Re: Using Eclipse for Mynewt development
Posted by Andrzej Kaczmarek <an...@codecoup.pl>.
Hi all,
I managed to find some time to write down a short tutorial (with pictures!
;-) ) on how to use Eclipse as IDE for Mynewt. This is based on my own
experience and on what we use in our company with some "upgrades" after
reading through Chris' and Chew's posts. You can find tutorial here:
http://www.codecoup.pl/blog/hacking-mynewt-in-eclipse/ - it covers
configuration of indexer, builder and debugger.
*IMPORTANT*
I use this setup on develop branch since this is what I work with. In
theory, it should also work on master but there are at least two known
problems:
1. for some reason newt@master hangs when run from within Eclipse (stuck at
100% CPU usage) and this basically makes it useless; the newt@develop works
just fine...
2. compiler command line generated by newt@master includes only file name
of compiled file and this probably will confuse build output parser, but I
was not able to check it due to problem above; the newt@develop generates
nice command line with full path names
BTW: would be really nice if newt has some option to print only executed
commands during build - this could be then used instead of '-l debug' which
produces huge amount of logs; I'd actually add this, but my go skills are
less than basic ;-)
BR,
Andrzej
On Thu, Jan 19, 2017 at 12:12 AM, Christopher Collins <cc...@apache.org>
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().
>
Re: Using Eclipse for Mynewt development
Posted by Sudha Mahadik <su...@gmail.com>.
Hi Chris ,
Thanks for sharing the instructions on debugging in Eclipse.
I tried it with blinky project with nrf52 target.. When I add new project
and apply required settings .. it seems that there are many errors presents
during the compilation of the project like "could not resolve symbols"..etc.
I have attached the screen shot of it.
Could you please explain in detail .. how did you add the project in
eclipse IDE from your local path .. also how could you managed to build it
without errors?
Thanks ,
Sudha.
On Wed, Jan 18, 2017 at 8:41 PM, Lm Chew <lm...@free2move.se> wrote:
> 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 <cc...@apache.org>
> Sent: Thursday, 19 January, 2017 7:15:40 AM
> To: dev@mynewt.incubator.apache.org
> 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().
>
>
>
Re: Using Eclipse for Mynewt development
Posted by Lm Chew <lm...@free2move.se>.
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 <cc...@apache.org>
Sent: Thursday, 19 January, 2017 7:15:40 AM
To: dev@mynewt.incubator.apache.org
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().
Re: Using Eclipse for Mynewt development
Posted by Jitesh Shah <ji...@liveathos.com>.
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 <cc...@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.
Re: Using Eclipse for Mynewt development
Posted by Christopher Collins <cc...@apache.org>.
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().