Author Topic: Ramblings about starting with ARM and Windows  (Read 5713 times)

0 Members and 1 Guest are viewing this topic.

Offline mcTopic starter

  • Regular Contributor
  • *
  • Posts: 155
  • Country: scotland
Ramblings about starting with ARM and Windows
« on: July 19, 2013, 11:50:52 pm »
After spending much of last year and the start of this year developing a product based on Arduino Megas*, I figure it's about time I learned some ARM, so along with an order for some other bits, I added a trio of STM Discovery boards to the order -

Now from searching for and reading various pages about setting up a tool chain on windows, I knew getting going via OpenSource wasn't going to be easy, but I never expected it to take anywhere as long as it did. I spent 2 evenings, and most of a day before i finally managed to actually edit and program anything. I'm certainly more IT savvy than alot of folks, however at several points I just had to walk away from the computer before something got broken!

Ideally I was looking to use Eclipse as the IDE as I already use Eclipse, along with the GCC Arm toolchain as it's officially supported,  and OpenOCD/GDB as it seems the most popular, but despite various searches and attempts to find solutions, I just couldn't get that combination to work.

In the end this guide finally let me get up and running with the STM32VLDiscovery - https://sites.google.com/site/stm32discovery/open-source-development-with-the-stm32-discovery/setting-up-eclipse-for-stm32-discovery-development
It does however mean I'm not running the latest version of Eclipse, or the GCC toolchain, or OpenOCD, but it does mean I have a working toolchain. For anybody else looking to get up and running using Eclipse, download the exact version that whatever guide you're following tells you to, as the settings change quite a bit between versions.

I think my next step will be to try and update to a newer version of Eclipse, then swap to the GCC toolchain, and then figure out how to get OpenOCD to work with STLink.

*Megas were used for multiple reasons. I already had plenty experience using Arduino and didn't have the time to learn anything else, the Due hadn't even been mentioned let alone been available when i started the project, and the UNO didn't have enough interrupts. Annoyingly, I did think of a method that could of dropped the number of interrupts to 2, but all the hardware had been designed by that point.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Ramblings about starting with ARM and Windows
« Reply #1 on: July 20, 2013, 12:50:39 am »
Similar journey here, but I decided to go my 1st Arm path on Texas Instrument, simply because of they use and build the complete tool chain natively on Eclipse.

Offline chickenHeadKnob

  • Super Contributor
  • ***
  • Posts: 1055
  • Country: ca
Re: Ramblings about starting with ARM and Windows
« Reply #2 on: July 20, 2013, 01:57:22 am »
Small warning, the first ST ARM discovery board, I think it is the VL (value line) has st-link v1.0 whereas the later boards have have st-link v2.0. This is the software in the 48 pin sTm32F103  that does the usb to jtag. There are significant problems with version 1 on linux because of the wonky way it handles USB, I would just avoid the value line boards. Don't know how it goes under windows. 
 

Offline mcTopic starter

  • Regular Contributor
  • *
  • Posts: 155
  • Country: scotland
Re: Ramblings about starting with ARM and Windows
« Reply #3 on: July 20, 2013, 06:18:22 pm »
I've just checked the specs, and you're right about VLDiscovery only having the original ST-Link, however I'm still using the official ST-Link Utility so it's not an issue at the moment.

I'm still just having a play at tweaking some of the demo scripts, and have gotten as far as adding two extra LEDs and using the button to switch between them (Exciting, I know!).
I'm also following some tutorials to get a grip of the basic set-up/programe structure needed, as having used Arduinos for the past couple of years, nearly all of that is done automatically.

It's not being helped that I've not done anything in C for quite some time, so I'm pretty much having to start from scratch.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Ramblings about starting with ARM and Windows
« Reply #4 on: July 20, 2013, 06:33:13 pm »
Have a look at CoIDE, it's a free development environment based on Eclipse and GCC. Device support isn't all that great, but it does support the STM32F051R (the Cortex-M0 part on the cheapest Discovery board).

Be aware that the latest version (1.7.3) still has a problem downloading code to this particular device - there's a bug which the developers seem to be struggling to fix. I'm running a much earlier version (1.5.something) which works fine.

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Ramblings about starting with ARM and Windows
« Reply #5 on: July 20, 2013, 07:55:33 pm »
I think I'm going to try and setup an Eclipse/GCC setup.  I started with ARM 6 years ago with ARM7 and I tried really hard to get the YAGARTO toolchain setup, but never managed and just turned to Rowley Crossworks, which was really easy.  I'm really surprised that this has not been streamlined for people just getting into it.
Mark Higgins
 

Offline ElectroIrradiator

  • Frequent Contributor
  • **
  • Posts: 614
  • Country: dk
  • More analog than digital.
Re: Ramblings about starting with ARM and Windows
« Reply #6 on: July 20, 2013, 11:33:03 pm »
An affordable, commercial IDE option may for some be the one paired with NXP's LPC ARM MCUs, of which many are available as inexpensive LPCXpresso boards from Embedded Artist in Sweden. The 'official' IDE for the LPC products is the Eclipse based Code Red Suite by Code Red Technologies (now owned by NXP). After registration the free version of Red Suite can generate code up to 128K in size. 512K limit cost ... $512.

The LPC-LINK programmer/debugger, embedded in every LPCXpresso board, can program and debug every MCU in the LPC range, including the rather spectacular LPC43xx devices.

Disclaimer: I have no affiliation with any of these companies, except as a paying customer.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Ramblings about starting with ARM and Windows
« Reply #7 on: July 20, 2013, 11:36:16 pm »
For STM32 I found the free version of Atollic truestudio to be an easy way to get started.

Not that I used that to get started, obviously. I first did the roll-your-own-eclipse environment, then tried out CMSIS and other libs, then got fed up with all the bullshit and installed Atollic. That worked out of the box, complete with examples. After getting some examples running I went back the DIY toolchain with some new insights and rebuilt it properly. So I guess the moral of this story is: use Atollic to get started and have a known to work system. After you are confident things are working, roll your own. Or stick with atollic if you don't mind the code size restriction.
 

Offline pyroesp

  • Regular Contributor
  • *
  • Posts: 180
  • Country: be
    • Nicolas Electronics
Re: Ramblings about starting with ARM and Windows
« Reply #8 on: July 22, 2013, 03:59:47 am »
I've used the CooCox CoIDE to program my value line discovery board and I never had a problem with it.
 

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Ramblings about starting with ARM and Windows
« Reply #9 on: July 22, 2013, 07:15:52 pm »
I only use Keil uVision. And NXP/STM and many more products are compatible with Keil uVision.
The LPCXpresso, or any other environment based on eclipse is kinda buggy, and more likely to crash on you, and being slow.

Keil unfortunately is very expensive the official way.
 

Offline M. András

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: hu
Re: Ramblings about starting with ARM and Windows
« Reply #10 on: July 22, 2013, 09:47:47 pm »
I only use Keil uVision. And NXP/STM and many more products are compatible with Keil uVision.
The LPCXpresso, or any other environment based on eclipse is kinda buggy, and more likely to crash on you, and being slow.

Keil unfortunately is very expensive the official way.
how hard is it to setup at the very first time? for the nxp parts and for a dev board embedded artist boards. i only played with the 2010 ms visual studio with so-so succes due to i never learned programming before. i doubt there is much difference between the free code limited and the 20k usd package regarding the basic operation of the software
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Ramblings about starting with ARM and Windows
« Reply #11 on: July 22, 2013, 10:03:00 pm »
The nice thing about the NXP parts is that you can program them from a serial port so you don't need JTAG (-ish) tools (hardware & software). Vanilla Eclipse CDT will do just fine. The latest (newer) Eclipse CDT version has support for cross platform (embedded) compilers so setting it up is pretty easy if you know a bit about Eclipse.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: us
Re: Ramblings about starting with ARM and Windows
« Reply #12 on: July 24, 2013, 03:55:30 am »
ST has a long way to go with support for their ARM line. They have some decent cheap demo boards  but the documentation is about as bad as I have seen.

There are a lot of ARM boards coming on the market and the price points keep falling the beagle bone black is  $45 and packs a ton of hardware in  something that has lots of application information.
http://beagleboard.org/Products/BeagleBone%20Black

Similar to the Raspberry pi but targeted more at people wanting more I/O abilities.
 

Offline millerb

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Re: Ramblings about starting with ARM and Windows
« Reply #13 on: July 26, 2013, 11:38:33 am »
I've been working with the STM32F051 for about a week now. I didn't get one of the discovery boards, I bought an stlink v2 programmer and the bare chips along with a few qfp proto boards. I started out with CooCox but was never able to get the debugger to work. I ended up going with Keil and everything worked right from jump. The 32KiB limitation exceeds my requirements so no problems there.

The STM32 line seems to have a lot going for it. The chip docs are pretty good and CMSIS is well commented. ST's website has a wealth of literature to review for this line of devices. Their MicroXplorer utility for configuring the pins and generating init code has been extremely useful as has their clock configuration utility.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Ramblings about starting with ARM and Windows
« Reply #14 on: July 26, 2013, 12:48:03 pm »
Sounds like you may have hit the same CoIDE bug that I did with the STM32F051.

Offline SolarSunrise

  • Regular Contributor
  • *
  • Posts: 93
  • Country: ua
  • Hi there!
Re: Ramblings about starting with ARM and Windows
« Reply #15 on: August 14, 2013, 09:35:47 am »
I've been programming my STM32F4Disc. board for about a year (using Assembler, believe it or not), Here are 2 important tips:
 - Do not use Windows or Mac when programming the board, you will get bunch of errors concerning tons of issues. Use Linux instead (Ubuntu or any Linux distributions will work fine, I use Arch Linux)

 - Use summon arm toolchain. You can find various websites detailing on the installation of this toolchain. I bet you've already found this though.

If you need any example codes (I've done SPI, interrupts, GPIO, Clock, and so on) in Assembly, let me know!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf