Skip to content

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

Merged
aabadie merged 4 commits intoRIOT-OS:masterfrom
haukepetersen:opt_boards_stm32-clk-f4-180
Jun 12, 2018
Merged

boards/stm32-based: use shared configuration snippets#8549
aabadie merged 4 commits intoRIOT-OS:masterfrom
haukepetersen:opt_boards_stm32-clk-f4-180

Conversation

@haukepetersen
Copy link
Copy Markdown
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
Copy Markdown
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.

#define PERIPH_CONF_H

#include "periph_cpu.h"
#include "f4/cfg_clock_168_8_1.h"
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

fixed missing include

@haukepetersen
Copy link
Copy Markdown
Contributor Author

also fixed header guards

Copy link
Copy Markdown
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 haukepetersen force-pushed the opt_boards_stm32-clk-f4-180 branch from c54c43e to b7fbecf Compare April 6, 2018 13:56
@haukepetersen
Copy link
Copy Markdown
Contributor Author

rebased

@haukepetersen
Copy link
Copy Markdown
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
Copy Markdown
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 haukepetersen force-pushed the opt_boards_stm32-clk-f4-180 branch from b7fbecf to 079f3c0 Compare May 24, 2018 17:01
@haukepetersen
Copy link
Copy Markdown
Contributor Author

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

@haukepetersen
Copy link
Copy Markdown
Contributor Author

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

@vincent-d
Copy link
Copy Markdown
Member

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

@dylad
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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