Author Topic: Getting Started with Eclipse and ARM  (Read 1768 times)

0 Members and 1 Guest are viewing this topic.

Offline Eric_the_EETopic starter

  • Contributor
  • Posts: 33
  • Country: us
Getting Started with Eclipse and ARM
« on: July 05, 2017, 04:58:23 pm »
Hey all,
To date, my firmware development has been limited to PICs  using MPLAB X and ICD3s. I am about to transition to ARM-based projects featuring Cortex-M as well as some legacy ARM7 designs. My plan is to use Eclipse (not vendor specific IDEs), a JTAG connection, the Segger JLINK, and GNU ARM toolchain. This approach appears that it will work without too much headache, but having never actually done a project of the sort, I wanted to ask you all: what caveats, pitfalls, "gotchas", and traps for young players should I look out for? Perhaps other beginners would also benefit from such a discussion on here. How have your experiences been with this development setup?
 

Offline colorado.rob

  • Frequent Contributor
  • **
  • Posts: 419
  • Country: us
Re: Getting Started with Eclipse and ARM
« Reply #1 on: July 05, 2017, 05:27:30 pm »
This is what I use when doing development for STM32 ARM Cortex-M MCUs:

  • Linux (Fedora <latest>)
  • Eclipse (from Fedora)
  • ARM GCC/binutils toolchain (from Fedora)
  • newlib nano (from Fedora)
  • OpenOCD (built from source)
  • ST/Link programmer/debugger from a STM32 Nucleo-64 board
  • STM32CubeMX (Eclipse-based, from ST)

This works really well, with very few caveats.  The only biggest caveats come into play if you are using a code generator such as STM32CubeMX.  We can have that discussion if necessary.  For now I will focus on the generic ARM stuff.

The default OpenOCD will work fine if you are using older, well-established chips.  I've been targeting newer STM32L4 chips that are only ever supported in unreleased versions, which is why I have been building it from source.

OpenOCD has limited support for SWV and Eclipse has none.  You'll need to manage that externally if you intend to use ITM output.  I can do a quick write up later on how to use it for low-cost logging.

The basics work very well with few changes necessary.  It's not any more complex than setting up a native C/C++ project, and the debugger setup is about as complex as configuring native remote debugging.
 
The following users thanked this post: Eric_the_EE

Online alm

  • Super Contributor
  • ***
  • Posts: 2855
  • Country: 00
Re: Getting Started with Eclipse and ARM
« Reply #2 on: July 05, 2017, 06:02:58 pm »
You may want to consider using the embedded ARM gcc toolchain directly from ARM. Should receive more testing for Cortex M series than stock gcc. Not sure about Fedora, but they have a convenient repository with packages for Ubuntu.

Edit: You will probably not be using OpenOCD, at least not their GDB server, with the J-Link. Their own GDB server has more features and may be more up-to-date on new devices. Pretty sure SWV support is better, and there may even be some rudimentary support for SWV using the J-Link server in the GNU ARM Eclipse debugging extension.
« Last Edit: July 05, 2017, 06:32:23 pm by alm »
 
The following users thanked this post: Eric_the_EE

Offline colorado.rob

  • Frequent Contributor
  • **
  • Posts: 419
  • Country: us
Re: Getting Started with Eclipse and ARM
« Reply #3 on: July 05, 2017, 07:43:25 pm »
You are right that the Segger support is far superior to the OpenOCD support in Eclipse.  The Eclipse still does not have support for OpenOCD SWV.  And thanks for adding the ARM Eclipse plugin link.  That's a glaring omission in my list.
 
The following users thanked this post: Eric_the_EE

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1667
  • Country: us
Re: Getting Started with Eclipse and ARM
« Reply #4 on: July 05, 2017, 10:25:24 pm »
If you want support for viewing peripheral registers in Eclipse you need something like EmbSysRegView.

http://embsysregview.sourceforge.net/
Complexity is the number-one enemy of high-quality code.
 
The following users thanked this post: Eric_the_EE


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf