Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/stm32-based: use shared configuration snippets #8549

Merged
merged 4 commits into from
Jun 12, 2018

Conversation

haukepetersen
Copy link
Contributor

Contribution description

This is another change cut from #8044 to reduce the vast code duplication in the (STM32) board configurations.

Presented in this PR in my idea for using shared configuration snippets in the board's periph_conf.h files. This is demonstrated so far only for some selected stm32f4-based boards, and focused on their clock configuration only. Once we agree for this approach, we can optimize the configuration for more STM32-based boards, in small, easily revieweable steps...

Issues/PRs references

continuation of merging #8044 in small steps...

@haukepetersen haukepetersen changed the title Opt boards stm32 clk f4 180 boards/stm32-based: use shared configuration snippets Feb 13, 2018
@haukepetersen haukepetersen added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: boards Area: Board ports labels Feb 13, 2018
Copy link
Member

@vincent-d vincent-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea! And it looks quite good except the missing include. I unfortunately don't have any of theses board to test it.

@@ -22,42 +22,12 @@
#define PERIPH_CONF_H

#include "periph_cpu.h"
#include "f4/cfg_clock_168_8_1.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing #include "cfg_spi_divtable.h"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ups, will fix

@haukepetersen
Copy link
Contributor Author

fixed missing include

@haukepetersen
Copy link
Contributor Author

also fixed header guards

Copy link
Member

@vincent-d vincent-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested ACK (I don't have any of these boards). Please squash

@haukepetersen
Copy link
Contributor Author

rebased

@haukepetersen
Copy link
Contributor Author

and squashed...

@vincent-d vincent-d added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 22, 2018
* @author Hauke Petersen <[email protected]>
*/

#ifndef PERIPH_CFG_SPI_DIVTABLE_H
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header guard is still wrong according to Murdock

@haukepetersen
Copy link
Contributor Author

fixed the header guard issue (squashed right in) and rebased.

@haukepetersen
Copy link
Contributor Author

@vincent-d would you mind to give this one last look and press the big green button?! Thanks!

@vincent-d
Copy link
Member

I'm OK to merge if nobody objects (is there any potential conflict with i2c refactoring?) @aabadie @dylad ?

@dylad
Copy link
Member

dylad commented Jun 11, 2018

It may introduces some conflicts with the I2C refactoring. @aabadie will be able to confirm it better than me.

@aabadie
Copy link
Contributor

aabadie commented Jun 11, 2018

is there any potential conflict with i2c refactoring?

I don't know, it needs to be confirmed locally first I would say.

@vincent-d
Copy link
Member

I tried to merge #9202 and this one in master and there is no conflicts, so I guess we can merge. @aabadie ?

@aabadie
Copy link
Contributor

aabadie commented Jun 12, 2018

I tried to merge #9202 and this one in master and there is no conflicts, so I guess we can merge.

Let's go then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants