Ramblings about starting with ARM and Windows - Page 1
Forum section: electronics / general

author: mc
author_rank: Regular Contributor
timestamp: July 19, 2013, 11:50:52 pm
content: 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-developmentIt 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.

author: BravoV
author_rank: Super Contributor
timestamp: July 20, 2013, 12:50:39 am
content: 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.

author: chickenHeadKnob
author_rank: Super Contributor
timestamp: July 20, 2013, 01:57:22 am
content: 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.

author: mc
author_rank: Regular Contributor
timestamp: July 20, 2013, 06:18:22 pm
content: 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.

author: AndyC_772
author_rank: Super Contributor
timestamp: July 20, 2013, 06:33:13 pm
content: 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.

author: TheDirty
author_rank: Frequent Contributor
timestamp: July 20, 2013, 07:55:33 pm
content: 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.

author: ElectroIrradiator
author_rank: Frequent Contributor
timestamp: July 20, 2013, 11:33:03 pm
content: An affordable, commercial IDE option may for some be the one paired with NXP's LPC ARM MCUs, of which many are available as inexpensiveLPCXpresso boardsfrom Embedded Artist in Sweden. The 'official' IDE for the LPC products is the Eclipse basedCode Red Suiteby 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 spectacularLPC43xx devices.Disclaimer: I have no affiliation with any of these companies, except as a paying customer.

author: mrflibble
author_rank: Super Contributor
timestamp: July 20, 2013, 11:36:16 pm
content: 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.

author: pyroesp
author_rank: Regular Contributor
timestamp: July 22, 2013, 03:59:47 am
content: I've used the CooCox CoIDE to program my value line discovery board and I never had a problem with it.

author: Jeroen3
author_rank: Super Contributor
timestamp: July 22, 2013, 07:15:52 pm
content: 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.

author: M. András
author_rank: Super Contributor
timestamp: July 22, 2013, 09:47:47 pm
content: Quote from: Jeroen3 on July 22, 2013, 07:15:52 pmhow 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

author: nctnico
author_rank: Super Contributor
timestamp: July 22, 2013, 10:03:00 pm
content: 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.

author: ptricks
author_rank: Frequent Contributor
timestamp: July 24, 2013, 03:55:30 am
content: 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%20BlackSimilar to the Raspberry pi but targeted more at people wanting more I/O abilities.

author: millerb
author_rank: Regular Contributor
timestamp: July 26, 2013, 11:38:33 am
content: 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.

author: AndyC_772
author_rank: Super Contributor
timestamp: July 26, 2013, 12:48:03 pm
content: Sounds like you may have hit the same CoIDE bug that I did with the STM32F051.

author: SolarSunrise
author_rank: Regular Contributor
timestamp: August 14, 2013, 09:35:47 am
content: 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!