Thursday 18 May 2017

ARM Toolchain Experience (1)


down voteaccepted
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-gcc
    The ARM toolchain
  • -T stm32l1xx.ld
    The linker document
  • -mthumb -mcpu=cortex-m3
    Tell GCC this is for an M3
  • -D STM32L1XX_MD -D USE_STDPERIPH_DRIVER
    Defines for the Standard Peripheral Driver
  • startup_stm32l1xx_md.s
    GCC oriented startup document.
  • system_stm32l1xx.c main.c [ sources ]
    List of my source files
  • -lm
    For Math.h(LibMath)
  • --specs=nosys.specs
    Don't use sytems calls like _exit.
  • -o Project.elf
    Output name


ref:
https://electronics.stackexchange.com/questions/95183/move-embedded-programming-from-keil-to-linux

Monday 15 May 2017

Install the flash player for Chromium in Ubuntu 16.04



Go to Software Center => Software & Updates(top left corner), and go to the "Other Software" tab.
enter image description here
then run:
sudo apt update
sudo apt install adobe-flashplugin

Friday 12 May 2017

Linux Serial Monitoring


(1) If you do need to know the identity of the serial port <devicename> use the command:
ls /dev/ttyACM*

(2) Connect using screen by typing the command screen:
sudo screen /dev/ttyACM0

Maybe you need to:
sudo screen /dev/ttyACM0 115200