Questions tagged [libopencm3]

This tag is for questions about using libopencm3 library. This includes coding using libopencm3 library and library code itself.

libopencm3 is a library written in C. It provides framework for abstracting hardware interfaces of various ARM Cortex-M3 controllers. So it's in some way a HAL (Hardware Abstraction Layer) for creating more unified firmwares code that can be easily ported to another Cortex-M3 controllers. This library also simplifies programming, providing high-level API to hardware.

libopencm3 replaces CMSIS and STM32 Standard Peripheral Library.

Links:

[1] Official site

[2] Git repository

[3] Examples

[4] Documentation

[5] Wiki page

40 questions
0
votes
2 answers

What library or project generator to use for a first STM32F3 project?

I'm about to start my first STM32 project. (I have previously used atmega MCUs, and have decades of experience with C, mostly server-side.) There seem to be three choices, given that I want to develop on the command-line in Linux, using make. an…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
0
votes
1 answer

STM32L0xx: Get the clock speed

For the life of me, I cannot find a way to get the clock speed for STM32L0 chips in libopencm3. There's got to be a way, right? In STM32Cube, there's the SystemCoreClock variable. In ChibiOs, there's the STM32_SYSCLK variable. Is there no variable…
Jeremy Gillick
  • 2,560
  • 3
  • 27
  • 35
0
votes
1 answer

Section `text` will not fit after upgrading `arm-none-eabi-gcc`

I have an open source micromouse robot project. For easier compilation, I use containers (both Podman and Docker should be fine): make image make libopencm3 make This works just fine and generates a main.elf file about 874 kB in size. But that is…
Peque
  • 13,638
  • 11
  • 69
  • 105
0
votes
1 answer

Unable to use PC15 as GPIO input on stm32f030rc

I'm working on a project using an stm32f030rc. I need to use PC15 as a GPIO input but it appears I'm unable to. I understand the couple PC14/PC15 is shared with the LFE oscillator, but of course I'm not using that function. Moreover, I am able to…
Maldus
  • 10,548
  • 4
  • 24
  • 36
0
votes
1 answer

AWK different versions behavior when using regex pattern

Background: Recently I have tried to build libopencm3-examples on Ubuntu 14.04 and encountered a build error (while for Ubuntu 16.04.1 LTS it works ok). I started digging in order to find the reason. As I have discovered, libopencm3 uses specific…
Alex Hoppus
  • 3,821
  • 4
  • 28
  • 47
0
votes
1 answer

Eclipse is compiling with with libopencm3 for STM32F0 but not for STM32F1

I managed it to get a working blink template with libopencm3 for the STM32F051 (@ stmf0discovory). Then I wanted to get a working one for my Maple Mini (with STM32F103 = cortex-m3) so I copied the first one and changed the cpu flag from…
milkpirate
  • 267
  • 1
  • 18
0
votes
1 answer

Can I use libopencm3 to write an i2c program on my STM32L0?

I am trying to create a very simple i2c test program to run on my STM32L0 (discovery kit). I have modified the miniblink program in libopencm3-examples/examples/stm32/l0/stm32l0538-disco. But if I just include the i2c header file: #include…
k212
  • 88
  • 7
0
votes
2 answers

undefined reference to function in c++

I did search and none of the answers really explained what I am seeing. I had a file that was compiling correctly, and added a new include: #include "libopencm3/stm32/usart.h" Compile again and fine. Now, I add a function: void…
Troy Cosentino
  • 4,658
  • 9
  • 37
  • 59
0
votes
1 answer

Static library linking issues (no reference to main, or no reference)

I have some code that I reuse for different embedded projects so I decided to create a library. The library is built on another, much more extensive static library (libopencm3) I just have one (for now) c file compiled to one object file that is…
Yakubs
  • 161
  • 2
  • 11
0
votes
1 answer

Makefile not working for multiple c files but works for single c file

This makefile is for making hex file for an ARM micro-controller. My makefile takes all the c files kept in the folder and generates the hex file. The hex file, .obj files etc. are placed in the bin folder. My makefiles works fine(i.e I am able to…
robomon
  • 269
  • 2
  • 16
1 2
3