Skip to content

boards/nucleo: factorize code of the different board types (32 pins, 144 pins)#6705

Merged
vincent-d merged 8 commits intoRIOT-OS:masterfrom
aabadie:nucleo32_common
Mar 16, 2017
Merged

boards/nucleo: factorize code of the different board types (32 pins, 144 pins)#6705
vincent-d merged 8 commits intoRIOT-OS:masterfrom
aabadie:nucleo32_common

Conversation

@aabadie
Copy link
Copy Markdown
Contributor

@aabadie aabadie commented Mar 6, 2017

This PR also adds/fixes Arduino support for nucleo-32 boards.

The serial configuration is shared between the different nucleo board types: 32, 64 and 144 pins.

We can even more factorize : move cpp feature to nucleo-common and share it with nucleo32 and nucleo144. The inheritance tree could also be improved with a common folder for all nucleo types, then a common for each board type (32, 64, 144), this is not what is done here but it can be changed if it makes more sense to the reviewers.

@aabadie aabadie added Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation labels Mar 6, 2017
@aabadie aabadie added this to the Release 2017.04 milestone Mar 6, 2017
@aabadie aabadie changed the title boards/nucleo: factorize code of the different board family (32 pins, 144 pins) boards/nucleo: factorize code of the different board types (32 pins, 144 pins) Mar 6, 2017
/*
* Copyright (C) 2017 Inria
* 2017 OTA keys
* Copyright (C) Inria 2017
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.

Copyright date switch

@@ -1,13 +1,13 @@
/*
* Copyright (C) 2017 Inria
* Copyright (C) Inria 2017
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.

same here

@lebrush
Copy link
Copy Markdown
Member

lebrush commented Mar 7, 2017

I like this refactoring 👍 and codewise looks good.

Are you planning to include the 64 pin boards (there are many more of these more than of 32/144)?

# load the common Makefile.include for Nucleo boards
include $(RIOTBOARD)/nucleo-common/Makefile.include
# include nucleo common serial configuration
include $(RIOTBOARD)/nucleo-common/Makefile.include.serial
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.

looking at my changes again, this line is not required as it's already include by indirectly by the line above. I'll update this for others.

# include nucleo common serial configuration
include $(RIOTBOARD)/nucleo-common/Makefile.include.serial

# load the common Makefile.include for Nucleo-32 boards
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.

nucleo-144 (auto-review ;) )

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 7, 2017

@lebrush thanks for having a look.

Are you planning to include the 64 pin boards (there are many more of these more than of 32/144)?

In fact, the 64 pins are taken as reference as they are many more. So I think I'll keep it as it is in this PR.
I'll fix the copyright issue and a few other inconsistencies I just found.

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 7, 2017

@lebrush I directly rebased and force push.

{
.name = "B1(User button)",
.pin = BTN_B1_PIN,
.mode = GPIO_IN_PU
Copy link
Copy Markdown
Member

@vincent-d vincent-d Mar 7, 2017

Choose a reason for hiding this comment

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

On nucleo144, the pin is pulled-down externally, so it should be either GPIO_IN or GPIO_IN_PD

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.

Thanks ! I changed it to GPIO_IN_PD

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 8, 2017

Looks like I broke a few things with gpio params, will fix.

@aabadie aabadie force-pushed the nucleo32_common branch 3 times, most recently from 8c1054d to 7b95c71 Compare March 13, 2017 22:21
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 13, 2017

Rebased on master with #6714 inside. Related boards need to be tested (using saul in examples/default):

  • Nucleo 32
    • nucleo32-l031
    • nucleo32-f031
    • nucleo32-f042
    • nucleo32-f303
  • Nucleo 144
    • nucleo144-f207
    • nucleo144-f413

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 14, 2017

Tested nucleo32-f042 and nucleo-f303 : works

@vincent-d
Copy link
Copy Markdown
Member

I'll test the nucleo144-f207 and nucleo144-f413 by the end of the week if you don't have them.

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 15, 2017

I have the 207 but not the 413, thanks

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 15, 2017

nucleo144-f207 works

@vincent-d
Copy link
Copy Markdown
Member

examples/default works on nucleo144-f413 (tested saul and rtc)

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 16, 2017

Works also with nucleo32-f031 and nucleo32-l031. If someone (@vincent-d, @lebrush) could ACK that would be great.

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.

ACK

@vincent-d vincent-d merged commit 164d055 into RIOT-OS:master Mar 16, 2017
@vincent-d
Copy link
Copy Markdown
Member

And go!

@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 16, 2017
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 16, 2017

@vincent-d thanks ! but you forgot to wait for Murdock :)

@vincent-d
Copy link
Copy Markdown
Member

@aabadie I saw only green on my screen...either a github lag, or my eyes. Sorry!

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Mar 16, 2017

np @vincent-d, it's just that Murdock is our "official" CI. Check that "Ready for CI build" label is set before pressing the green button ;)

@aabadie aabadie deleted the nucleo32_common branch February 26, 2018 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants