Getting Started with Eclipse and ARM - Page 1
Forum section: electronics / general

author: Eric_the_EE
author_rank: Contributor
timestamp: July 05, 2017, 04:58:23 pm
content: 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?

author: colorado.rob
author_rank: Frequent Contributor
timestamp: July 05, 2017, 05:27:30 pm
content: 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 boardSTM32CubeMX (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.

author: alm
author_rank: Super Contributor
timestamp: July 05, 2017, 06:02:58 pm
content: You may want to consider using theembedded ARM gcc toolchaindirectly from ARM. Should receive more testing for Cortex M series than stock gcc. Not sure about Fedora, but they have aconvenient 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 theGNU ARM Eclipsedebugging extension.

author: colorado.rob
author_rank: Frequent Contributor
timestamp: July 05, 2017, 07:43:25 pm
content: 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.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: July 05, 2017, 10:25:24 pm
content: If you want support for viewing peripheral registers in Eclipse you need something like EmbSysRegView.http://embsysregview.sourceforge.net/