Git Product home page Git Product logo

builder-framework-libopencm3's Introduction

PlatformIO Core

CI Build for PlatformIO Core CI Build for Docs CI Build for dev-platform examples CI Build for the Community Projects Latest Version PlatformIO Labs

Quick Links: Homepage | PlatformIO IDE | Registry | Project Examples | Docs | Donate | Contact Us

Social: LinkedIn | Twitter | Facebook | Community Forums

https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-ide-laptop.png

PlatformIO: Your Gateway to Embedded Software Development Excellence.

Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success.

  • Open source, maximum permissive Apache 2.0 license
  • Cross-platform IDE and Unified Debugger
  • Static Code Analyzer and Remote Unit Testing
  • Multi-platform and Multi-architecture Build System
  • Firmware File Explorer and Memory Inspection

Get Started

Solutions

Advanced

Registry

Contributing

See contributing guidelines.

Telemetry / Privacy Policy

Share minimal diagnostics and usage information to help us make PlatformIO better. It is enabled by default. For more information see:

License

Copyright (c) 2014-present PlatformIO <[email protected]>

The PlatformIO is licensed under the permissive Apache 2.0 license, so you can use it in both commercial and personal projects with confidence.

SWUbanner

builder-framework-libopencm3's People

Contributors

edenbarby avatar ivankravets avatar manuelbl avatar valeros avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

builder-framework-libopencm3's Issues

Command line option is valid for C/ObjC but not for C++

Working with C++ and libopencm3 might be less usual but it works nicely – except I get warnings in the latest PlatformIO release (run with pio run -v):

...
arm-none-eabi-g++ -o .pio/build/genericSTM32F042F6/src/common.o -c -fno-rtti -fno-exceptions -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m0 -DPLATFORMIO=40304 -DSTM32F042x6 -DSTM32F042F6 -DSTM32F0 -DF_CPU=48000000L -Iinclude -Isrc -I/Users/me/.platformio/packages/framework-libopencm3 -I/Users/me/.platformio/packages/framework-libopencm3/include src/common.cpp
cc1plus: warning: command line option '-Wimplicit-function-declaration' is valid for C/ObjC but not for C++
cc1plus: warning: command line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
arm-none-eabi-g++ -o .pio/build/genericSTM32F042F6/src/main.o -c -fno-rtti -fno-exceptions -Os -ffunction-sections -fdata-sections -Wall -Wextra -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -mthumb -mcpu=cortex-m0 -DPLATFORMIO=40304 -DSTM32F042x6 -DSTM32F042F6 -DSTM32F0 -DF_CPU=48000000L -Iinclude -Isrc -I/Users/me/.platformio/packages/framework-libopencm3 -I/Users/me/.platformio/packages/framework-libopencm3/include src/main.cpp
cc1plus: warning: command line option '-Wimplicit-function-declaration' is valid for C/ObjC but not for C++
cc1plus: warning: command line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
...

The error message says it all.

The minor problem can be reproduced with the PlatformIO project at https://github.com/manuelbl/usb-serial (subdirectory firmware).

Support for more variants

Is libopencm3 still supported on PlatformIO? There are a lot STM32 µCs which are not listed.
From the README on GitHub:

ST STM32F0xx/F1xx/F2xx/F30x/F37x/F4xx/F7xx/L0xx/L1xx/L4xx series

E.g. the F429, F7xx, L0xx, and L4xx. See also the examples.

Apps built with libopencm3 have little runtime overhead (an empty main is < 1K), yet with a lot support for different devices, including USART and USB. The well-known Black Magic Probe is based on libopencm3.

Given that this repository only contains a single file, how does one include more variants? Is it simply a matter or re-running that script and re-registering its results with PIO?

libopencm3 framework updates

Hi,

I use libopencm3 for a couple of PIO projects.
It seems this framework was not recently updated and libopencm3 code seems outdated.

Do you plan to update it ?

Do you have advices or solutions to fix this issue ?

Today, I'm not very confident with using PIO if frameworks are not properly maintained :-(

Thanks
Olivier

The build_unflags does not work for as-flags

Configuration

Operating system:
MacOS

PlatformIO Version (platformio --version):
PlatformIO Core, version 5.2.5

Description of problem

The "-mfloat-abi=hard" is set by libopencm3 and we want to change it to "-mfloat-abi=soft". Thus, we need to override the default flags via build_unflags.

The build_unflags can remove the gcc (cflags) and ld flags for c files. But it does not work for the as-flags for .S files. The "-mfloat-abi=hard" failed to be removed when using arm-none-eabi-as asflags.

arm-none-eabi-gcc -P -E /Users/fripside/.platformio/packages/framework-libopencm3/ld/linker.ld.S -o .pio/build/nucleo_f429zi/generated.stm32f429zi.ld 

-mfloat-abi=soft -mfpu=fpv4-sp-d16 -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16

Both "-mfloat-abi=soft" and "-mfloat-abi=hard" exists and lead to an error.

arm-none-eabi-gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together

Steps to Reproduce

  1. Build

Actual Results

arm-none-eabi-gcc -P -E /Users/fripside/.platformio/packages/framework-libopencm3/ld/linker.ld.S -o .pio/build/nucleo_f429zi/generated.stm32f429zi.ld -DSTM32F4 -DSTM32F4CCM -DSTM32F429ZI -D_ROM=2048K -D_RAM=192K -D_CCM=64K -D_CCM_OFF=0x10000000 -D_ROM_OFF=0x08000000 -D_RAM_OFF=0x20000000 -mfloat-abi=soft -mfpu=fpv4-sp-d16 -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16

arm-none-eabi-gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together

Expected Results

The flags should be removed by build_unflags at all stages of compiling.

If problems with PlatformIO Build System:

The content of platformio.ini:

Insert here...
[env:disco_f429zi]
platform = ststm32
board = disco_f429zi
framework = libopencm3
build_unflags = 
	-mfloat-abi=hard
	-mfpu=fpv4-sp-d16 
build_flags = 
	-DSYS_CORTEX_M4
	-DDEV_STM32_F429_DISCO
	-mfloat-abi=soft 
	-mfpu=fpv4-sp-d16 
	-w

Source file to reproduce issue:

Insert here...

Additional info

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.