cancel
Showing results for 
Search instead for 
Did you mean: 

Toolchains for STM32

sholojda
Associate III

Hi. I am a little bit confused.

Why there is so many toolchains for ARM and what are the differences betwen them?

Lastly i heard abot Yagarto, and also these is WinARM, arm-gcc, arm-none-eabi-gcc. Are they all the same? which toolchain should i use?

I also heard about somethink called cygwin, what is that?

25 REPLIES 25
berendi
Principal

> Why there is so many toolchains for ARM

For the same reason as there are so many different cars, shoes, airlines, and whiskey brands.

> what are the differences betwen them?

Some of them are free, others cost some money, some are rip-offs. Some produce faster code, some are more robust, packed with more features, or useless memory and cpu hogs. Some are better for beginners, others are for experts. Some of them are certified for automotive/military/healthcare etc.

> Lastly i heard abot Yagarto,

I thought it was abandoned a couple of years ago.

> which toolchain should i use?

STM32CubeIDE is free, provides a hassle-free installation, and has almost everything that a beginner would need, i.e. an IDE to write, compile, upload and debug code.

It has a code generator feature, but do not ever assume that code generated by it, or the barely documented library functions actually work. Stick to the register interface which is extensively documented in the reference manual and the datasheet.

Ozone
Lead

arm-none-eabi-gcc is a gcc for a ARM architecture, non-OS environment, using ARM's EABI.

I think arm-gcc is a more generic term.

Cygwin is a Windows package to emulate the Unix/Linux environment (POSIX).

I would consider Keil and IAR as well, their toolchainsproduce better code, they are less buggy, and not restricted to one vendor. I think only codesize-restricted versions are free.

And Crossworks for ARM offers an affordable private license, and a good & stable toolchain for Win, Mac, and Linux hosts.

Keil and IAR produce better code because some very effective optimizations in gcc are disabled or made difficult to access in STM32CubeIDE, to hide some obvious bugs in HAL.

The difference in real life projects, with full optimizations enabled, is barely perceptible.

> some very effective optimizations in gcc are disabled or made difficult to access in STM32CubeIDE, to hide some obvious bugs in HAL.

Do you have an example?

There is -lto on my mind, which is effectively inlining functions located in another .c file.

Enabling it would break HAL code, which has a habit of using non-volatile buffers for interrupt and DMA transfers.

sholojda
Associate III

Thank for anwering.

I like CubeIIDE but it has an inconvenience (defect). It is on 64-bit windows only and most of time i spend at 32bit windows. 64bit i have on laptop which i do not use so often.

And what is this cygwin and corss complier? Is it the same as arm-none-eabi-gcc (another name)?

BTW what is -none- in the toolchain name?

I see.

Here is a gcc+ Makefile example: https://gitlab.com/stm32mcu/blinky_makefile

There is a make.exe for Windows, and a arm-none-eabi-gcc toolchain. Don't know about 32-bit. cygwin is a *nix like enviroment for windows. Check their website for the supported tools. Haven't needed it for a decade.

If you think of hardware debugging, you want more tools, maybe openOCD, gdb. It will give you a hard time.

sholojda
Associate III

Do I need cygwin at all?