shujaat: [SOLVED] Volatile Qualifier

User avatar
mrburnette
Posts: 2190
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: [SOLVED] Volatile Qualifier

Post by mrburnette » Fri Jan 19, 2018 4:04 pm

aster wrote:
Fri Jan 19, 2018 3:41 pm
... if it is easy, it works, why don't change it?
...
Two words, regression testing
Note: We are currently in the Maintenance period.
Bug Fixes must go into "Development" and ripple upward.

Image
Source


Many of our advanced users have their own github copies STM32duino. The github account is free and there are online documentation.

IF you want to branch Roger's github, please feel free.
You can then apply pull requests, design your own core code, and edit what you wish.
But Roger has taken on the responsibility of a central code repository. Code must be tested before release to the master branch... often this intermediate level is know as soaking or staging... if testers report no show stoppers, the migration to master is scheduled..


Ray

User avatar
Pito
Posts: 1729
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: [SOLVED] Volatile Qualifier

Post by Pito » Fri Jan 19, 2018 5:52 pm

OFF TOPIC: @Ray: your "corporate waterfall approach" will soon hit hard on the new "agile mindset" :P
Pukao Hats Cleaning Services Ltd.

stevestrong
Posts: 2043
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: [SOLVED] Volatile Qualifier

Post by stevestrong » Fri Jan 19, 2018 7:26 pm

Anyone interested in this issue: please submit a (clean) PR.
(I won't do it, my github activity history shows that I am not capable to submit clean PRs :? )

User avatar
mrburnette
Posts: 2190
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: [SOLVED] Volatile Qualifier

Post by mrburnette » Fri Jan 19, 2018 8:17 pm

Pito wrote:
Fri Jan 19, 2018 5:52 pm
OFF TOPIC: @Ray: your "corporate waterfall approach" will soon hit hard on the new "agile mindset" :P
I am familiar with Agile.
Image

I know many project disasters caused by SCRUM ... another innema up corporate's rear to sell methodology, training, and very expensive tools.

But, I was not promoting a mindset, rather a concept that a defined process exists and that doing a global search & replace on multiple files and issuing a pull request for Roger to update master is IMO foolish ...

To those that subscribe to different thinking, I respect that view... which is why I keep a snapshot of my local core before I update it... which is to say I prefer working with a safety net.

Ray

fpiSTM
Posts: 314
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: [SOLVED] Volatile Qualifier

Post by fpiSTM » Sat Jan 20, 2018 5:54 am

STM core use the

Code: Select all

__IO
which is defined in the CMSIS Cortex-M Core Peripheral Access Layer Header File (CMSIS/Include/core_cmx.h)
For F103 (based on cortex M3):
https://github.com/ARM-software/CMSIS/b ... cm3.h#L218

ST HAL/LL using the CMSIS so by default this syntax is used.
This is one of the advantage to use an standard layer/definition files maintained by ARM ;)

aster
Posts: 120
Joined: Thu Mar 30, 2017 2:41 pm
Location: bella italy
Contact:

Re: shujaat: [SOLVED] Volatile Qualifier

Post by aster » Wed Jan 24, 2018 7:38 pm

I made a pull request, i know that maybe it won't be merged but it could be useful in the future
https://github.com/rogerclarkmelbourne/ ... 2/pull/431

changed:
1295 hits in 125 files
i decided to change not only the F1 folder but all, in the F4 folder many file was already using the correct statement "__IO"

i checked before changing them and, except my eyes missed something, i didn't made any error
i tried to run eigenTest and it work
I also tried to use some "volatile" and "__IO" and them work
"__io" obviously doesn't work anymore

User avatar
RogerClark
Posts: 7680
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: shujaat: [SOLVED] Volatile Qualifier

Post by RogerClark » Wed Jan 24, 2018 8:36 pm

I saw the PR, and it changes hundreds of files. Hence is high risk, and would need extensive testing.

I think the best thing I can do is make a branch of the repo for this, so anyone who deploys by repo via git cloning, and pull the repo and switch that branch to test if these changes have any effect on their applications.

However this will take weeks, and in the mean time it i will process other, smaller and lower risk PRs, so this PR will need to need updated to include those changes

lacklustrlabs
Posts: 13
Joined: Fri May 05, 2017 12:35 pm

Re: shujaat: [SOLVED] Volatile Qualifier

Post by lacklustrlabs » Thu Jan 25, 2018 6:08 pm

So changing __io for __IO because of some naming conflict..
What happens the next time some major application/library uses __IO for some other purpose?
I always thought that __io was some smart conditional macro replacement for volatile, but it turns out its just a plain #define.
So why not change __io to just volatile? - A little longer but future proof.

User avatar
Rick Kimball
Posts: 1077
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: shujaat: [SOLVED] Volatile Qualifier

Post by Rick Kimball » Thu Jan 25, 2018 6:17 pm

I've got my github configured to watch the Roger's repo. When I saw a Pull Request looking to change 125 files for a case change, I had to see what this is all about. I just skimmed this thread and tried to figure out why this is being requested.

So it appears it all comes down to use a library called Eigen. The problem library is just some guy's hacking on a library created by someone else. The Arduino port is already 2 or 3 revs behind. The Arduino port is version 3.3.2 released last year. The official code is 3.3.4 released in June of this year getting active changes as we speak.

Looking at the github of the ported library, it is a sub project requirement of something else. So it is obviously not the guys primary focus. It states right from the get go:
A port of the Eigen linear algebra library for Arduino

This is a port of Eigen 3.3.2. This is a very early version of this library and should be considered "in development". It has undergone limited testing on a Teensy 3.6 device.
Why would stm32duino care about this or why it does or doesn't work with Roger's core? The code isn't even from the official group who wrote Eigen. The author doesn't seem to care about trying to keep up with the core project. Who knows, maybe the issue has gone away in the official code? The Arduino code is clearly only tested on the teensy.

The core borderflight project has exactly 1 watcher. The sub project Eigen has exactly 2 watchers. This isn't a popular thing. Why do we give this type of thing so many pages of posts?

Please don't even consider this change Roger.
-rick

stevestrong
Posts: 2043
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: shujaat: [SOLVED] Volatile Qualifier

Post by stevestrong » Thu Jan 25, 2018 6:54 pm

Rick, you can find the complete description of the issue here: viewtopic.php?f=2&t=3108&start=10#p40044
Me, I feel uncomfortable as well to change so many files.
Specially because there is a simpler solution to solve this issue (only edit two gcc lib file).

Post Reply