Skip to content

tyoshid/libopenstm32l1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

------------------------------------------------------------------------------
README
------------------------------------------------------------------------------

The libopenstm32l1 project derives from the libopenstm32 project which is the
ancestor of the libopencm3 project.

------------------------------------------------------------------------------

The libopenstm32l1 project aims to create an open-source firmware library for
STM32L1 ARM Cortex-M3 microcontroller.

The library is written completely from scratch based on the vendor datasheets,
programming manuals, and application notes. The code is meant to be used with
a GCC toolchain for ARM (gcc-arm-embedded
https://launchpad.net/gcc-arm-embedded), programming the Flash memory in a
microcontroller can be done using the OpenOCD ARM JTAG software.


Status
--------------

The libopenstm32l1 project supports only the STM32L151xx and STM32L152xx
medium density devices now. Medium+ and high density devices are not
supported, yet.


Building
--------

 $ make

For a more verbose build you can use

 $ make V=1


Installation
------------

 $ make install

This will install the library in your toolchain directory. If you want to
install it elsewhere, use the following syntax:

 $ make DESTDIR=/home/mydir/mylib install


Example projects
----------------

The library ships with a few small example projects which illustrate how
individual subsystems of the microcontrollers can be configured and used with
libopenstm32l1.

For writing the 'miniblink' example to the Flash memory (after you built and
installed libopenstm32l1 by typing 'make install' at the top-level directory)
you can execute:

 $ cd examples/stm32/l1/stm32-h152/miniblink
 $ make
    text    data     bss     dec     hex filename
    1132       0       0    1132     46c miniblink.elf
 $ su
 Password:
 # make flash
 wrote 4096 bytes from file miniblink.hex in 0.513844s (7.784 KiB/s)
 #

The Makefiles of the examples are configured to use a certain OpenOCD JTAG
adapter, you might need to change some of the variables in the openocd.cfg if
you use a different one.

You can also write manually like this:

 # export OOCD_INTERFACE=jtagkey-tiny
 # openocd -f ../openocd.cfg &
 # telnet localhost 4444
 > reset halt
 > flash write_image erase foobar.hex
 > shutdown

Replace the "jtagkey-tiny" with whatever JTAG adapter you are using. Replace
"foobar.hex" with the file name of the image you want to write.

After programming the Flash memory you must once power off (disconnect USB
connector) and then power on again (reconnect USB connector), do power-on
reset.


Coding style and development guidelines
---------------------------------------

See HACKING.


License
-------

The libopenstm32l1 code is released under the terms of the GNU General Public
License (GPL), version 3 or later.

See COPYING for details.

About

Simple C library for STM32L1 ARM Cortex-M3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages