stm32-hal | This library provides access to STM32 peripherals in Rust
kandi X-RAY | stm32-hal Summary
kandi X-RAY | stm32-hal Summary
This library provides access to STM32 peripherals in Rust.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stm32-hal
stm32-hal Key Features
stm32-hal Examples and Code Snippets
Community Discussions
Trending Discussions on stm32-hal
QUESTION
I posted the same question in the STM32 community forum as well, but didn't receive an answer.
I am using stm32 HAL library in a project with C++14 enabled. It issues me the following warning which I can't get rid of.
../platform/stm32/l4/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc.h:735:57:
warning: conversion to void will not access object of type 'volatile uint32_t {aka volatile long unsigned int}' UNUSED(tmpreg); \
This happens, when a call to __GPIOX_CLK_ENABLE() or __HAL_RCC_GPIOX_CLK_ENABLE is called.
Has anyone been able to get rid of the above warning leaving the HAL source code intact.
Or any ideas as what is possible to be done.
The current warning level is -Wall.
I've experienced the above issue with both l4 & f4 series code.
An Example code:
...ANSWER
Answered 2018-Mar-02 at 14:54The problem is -std=c++14
changing the semantics of a volatile
expression cast to (void)
, and introducing an apparently* unconditional warning for it, and a coder at ST trying to make "triple sure" that a register read would take place.
The definition of the UNUSED()
macro is
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stm32-hal
Install the compilation target for your MCU. Eg run rustup target add thumbv7em-none-eabihf. You'll need to change the last part if using a Cortex-M0, Cortex-M33, (Eg Stm32G0 or L5 respectively) or if you don't want to use hardware floats.
Install flash and debug tools: cargo install flip-link, cargo install probe-run.
Clone the quickstart repo: git clone https://github.com/David-OConnor/stm32-hal-quickstart.
Change the following lines to match your MCU. Post an issue if you need help with this: Cargo.toml: stm32-hal2 = { version = "^1.4.0", features = ["l4x3", "l4rt"]} memory.x: FLASH and RAM lines .cargo/config.toml: runner and target lines.
Connect your device. Run cargo run --release to compile and flash.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page