After much messing about, I finally decided how to do my STM32 ARM development. While there is a certain amount of appeal in the DIY approach, in the end I just want to write code for my processor and not battle to make sure the tools are properly configured. To this end, I have now paid for a personal licence for Rowley Crossworks for the ARM. This cross-platform toolset and IDE will run pretty much identically on Windows, Linux, Solaris and the mac. The compiler is one of the GCC releases and you get almost everything you need in one hit…

The IDE can talk to a variety of JTAG devices for debugging. The list includes:

  • ARM simulator
  • Olimex ARM-USB-OCD
  • Olimex ARM-USB-TINY
  • Amontec JTAGkey
  • xVerve Signalyzer
  • Luminary USB Debug
  • STR9-comStick
  • USB CrossConnect for ARM
  • Hitex STR9-comStick
  • Hitex LPC-Stick
  • Generic FT2232 Device

This is a wide range and much less restrictive than othe toochain suppliers. It would be nice if it could have used the Segger JLink that I have or the Keil uLink but I am not complaining. There is support for the Segger JLink but it seems to need a separate license or driver file that riuns in Windows. The Crossconnect Lite from Rowley is ideal for small scale work and gives you a full JTAG program and debug capability for a reasonable price. It appears to differ from the full Crossconnect only in the maximum data transfer. Not a real problem either way.

Processor support is more ARM devices than I knew existed and includes ARM7, ARM9, XScale and Cortex M3 devices.

Another advantage of the product is that you can download a free trial of the full product and see if it suits you.

Installation is very simple but you will want to download a couple of extras before you can do any serious work. I want to develop for the STM32 Cortex-M3 processors so I needed to grab the STMicroelectronics STM32 CPU Support Package (v2.2). This provides a number of STM32 project templates and the appropriate processor definitions, linker information and so on. You also get a number of sample projects to get you going. These include the following:

  • IAR_STM32F103ZE_SK Shared Samples
  • Keil_MCBSTM32 Shared Samples
  • Keil_MCBSTM32E Shared Samples
  • ST_STM3210B_EVAL Shared Samples
  • ST_STM3210C_EVAL Shared Samples
  • ST_STM3210E_EVAL Shared Samples
  • ST_STM3210E_EVAL External Flash Loader Solution

I also wanted to use the ARM CMSIS and the ST Standard Peripheral Library to save having to write to much low level stuff. When I am more familiar with the chip, that notion may change but for now, the first step is to download the current version of the library from ST:

http://www.st.com/mcu/modules.php?name=mcu&file=familiesdocs&FAM=110#Firmware

This needs to go somewhere suitable on your computer. I chose to put it in /Library/Arm on my iMac. You will need to remember where it went for the next step which is to go back to Crossworks and install the other Package you will need – The STMicroelectronics STM32F10x Standard Peripherals Library Updates (v1.0).

Once you have that, you will be all set to create projects based on CMSIS and the Peripheral Library.

I found the business of actually working out how to create a project a bit hard but I now think I have it sorted out. the thing is that the Peripheral Library consists of a number of header and source files, most of which you would be mad to edit. After all, they would not be very standard then would they. However, some files need to be in the project directory and modified to suit your project. the guidance on what to put where is pretty thin and it seems that most people just copy the library source files into their project and have done with it. The problem with that is that, should the library sources change, there will potentially be several different versions in different projects. On the other hand, if you point to the library files in their original positions, any subsequent projects may conceivably fail after a re-compile because the sources are different. I really don’t know what is best but I have, for now, opted to point to the library source files and only have in the project folder, those files that need to be there because they are project dependant.

At this point you should be good to go. All the sofawre components are installed and and you just need to start creating projects. Next post will be creating a simple project for a suitable target board.


This Post Has 4 Comments

  1. Rolf Segger

    Reg. support for the Segger J-Link, there should not be any license required. Rowley uses the J-Link as a simple, dumb “JTAG-blaster”, so Crossworks generates all the JTAG sequences. This has the disadvantage of somewhat lower performance and also is not as robust as using the “intelligence” in the J-Link, but it works well under most circumstances. In this mode, no additional license is required.

    If you are experiencing problems, can you let either us at Segger or Rowley inform about it?
    If there is a problem, I would like to get it fixed. There definitly should not be a license problem.

  2. peteh

    Ah – right. I will give it a try. May have to edit the post though thinking about it. My JLink is an IAR one which is, I believe, made by Segger but may not behave the same?

  3. Edo. Franzi

    Hi Peter, I hope that your crossworks runs fine on your Mac. OSX is a unix machine, so why not to use the free gcc packages and install them? Personally I did the exercice for different microprocessors and everything is working perfectly. The difficult part of the job is to tuneup the right toolchains. I did the job for Mac/Win/Linux.
    If someone would like to try to install these free gcc packages, just check on my web site … http://www.ukos.ch
    everything is available:

    Toolchains for 32-bit cpus (ARM cortex M3, M4, blackfin, cpu32, coldfire, …)
    http://www.ukos.ch/ukos/Tools_files/Toolchains%20for%2032-bits%20CPUs.pdf

    Toolchain for 8-bits cpus (AVR, Pics, etc
    http://www.ukos.ch/ukos/Tools_files/Toolchains%20for%208,16-bits%20CPUs.pdf

    The usable scripts are at this location:
    http://www.ukos.ch/ukos/Download_files/Scripts.zip

    For cortex I use openocd (jtag or j-link)

    So, for any problems, just contact me.
    Edo

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.