STM32L0 Snippets with GCC ARM Toolchain

Currently I try to use the STM32L0 microcontroller series. I found that ST offers a low-level C program collection called STM32SnippetsL0 too, parallel with their complex STM32CubeMX based HAL API. Unfortunately I can not use the codes under GNU/Linux because it supports only EWARM and MDK-ARM toolchains. Are there any possibilities to run this code with the GCC ARM Embedded toolchain?

• sounds like a stackoverflow question. why cant you use ewarm? what libraries are not working? can you link in the other libraries? ewarm is a gnu compiler toolchain as well yes? so you should be able to link them in. – old_timer Dec 25 '15 at 22:35
• Thank you for your hints @dwelch. AFAIK EWARM is based on the C compiler of IAR Systems. It runs only under Windows and I want to find a GNU/Linux based solution. – kaliczp Dec 26 '15 at 7:38
• ahh sorry I was thinking of a different compiler, a gnu based cross compiler for windows, nevermind...you might still be able to link, and/or if they have the source code to the library you can re-compile. I cant imagine that st delivers the board/chip support package without sources somewere and/or without a gnu based set of libraries. If they dont offer that then I wouldnt bother with it and find another solution – old_timer Dec 26 '15 at 14:13

arm-none-eabi-gcc -DSTM32L053xx -Wall -g -mthumb -mcpu=cortex-m0plus -march=armv6-m -mlittle-endian -Isnippets/Drivers/CMSIS/Include -Isnippets/Drivers/CMSIS/Device/ST/STM32L0xx/Include -Wl,--gc-sections,-Map=main.map -Tstm32l053xx.ld -L. system_stm32l0xx.c startup_stm32l053xx.s main.c -o main.elf

arm-none-eabi-objcopy -O binary main.elf main.bin