Move embedded programming from Keil to Linux
Got it done. I figured I'd share my results so others can use it. Thanks for your time, everyone.



I used this ARM toolchain to build my project, and the texane/stlink library, which comes with the ./st-flash tool, to flash the binary to my STM32L1. While texane/stlink comes with GDB, I found I could get the building+flashing process done without it.

My Makefile ended up looking like this. It isn't very pretty or abstract, but it gets the job done.

all:
    arm-none-eabi-gcc -T stm32l1xx.ld -mthumb -mcpu=cortex-m3 -D STM32L1XX_MD -D USE_STDPERIPH_DRIVER startup_stm32l1xx_md.s system_stm32l1xx.c main.c [ sources ] -lm --specs=nosys.specs -o Project.elf


In which:


arm-none-eabi-gccThe ARM toolchain
-T stm32l1xx.ldThe linker document
-mthumb -mcpu=cortex-m3Tell GCC this is for an M3
-D STM32L1XX_MD -D USE_STDPERIPH_DRIVERDefines for the Standard Peripheral Driver
startup_stm32l1xx_md.sGCC oriented startup document.
system_stm32l1xx.c main.c [ sources ]List of my source files
-lmFor Math.h(LibMath)
--specs=nosys.specsDon't use sytems calls like _exit.
-o Project.elfOutput name