Skip to content

board: Initial import of stm32f4discovery board#1191

Merged
haukepetersen merged 4 commits intoRIOT-OS:masterfrom
haukepetersen:board_stm32f4discovery
Jul 16, 2014
Merged

board: Initial import of stm32f4discovery board#1191
haukepetersen merged 4 commits intoRIOT-OS:masterfrom
haukepetersen:board_stm32f4discovery

Conversation

@haukepetersen
Copy link
Copy Markdown
Contributor

This is still WIP, left TODOs are:

  • testing of GPIO, UART and timers
  • removing compiler warnings
  • cleaning up documentation (and comment styles)
  • disabling newlib-nano specs by default
  • handling of FPU (saving and restoring FPU context) -> see issue FPU support for the Cortex-M4F family #1366
  • remodel cortexm_common into cortex-m4_common

@haukepetersen haukepetersen added this to the Release NEXT MAJOR milestone May 16, 2014
@Kijewski
Copy link
Copy Markdown
Contributor

Can't you feature test if newlib-nano is available? Compare Makefile.cflags.

@haukepetersen
Copy link
Copy Markdown
Contributor Author

That is actually a good idea, will look into this.

@mehlis
Copy link
Copy Markdown
Contributor

mehlis commented May 30, 2014

@haukepetersen can we this PR as a goal for IOTweek?

@haukepetersen
Copy link
Copy Markdown
Contributor Author

sure

@haukepetersen
Copy link
Copy Markdown
Contributor Author

Ok nano-specs are now optional. Will test and make this PR ready next week.

@LudwigKnuepfer
Copy link
Copy Markdown
Member

can you make the TODOs a checkbox list?

 - [ ] foo

@haukepetersen
Copy link
Copy Markdown
Contributor Author

Certainly

@LudwigKnuepfer
Copy link
Copy Markdown
Member

great =)

@haukepetersen
Copy link
Copy Markdown
Contributor Author

Rebased this branch and did some fixes - still some parts to do, though...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

guess what. :)

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.

I see I see :-)

@haukepetersen haukepetersen mentioned this pull request Jun 11, 2014
@haukepetersen
Copy link
Copy Markdown
Contributor Author

Adressed @Kijewski issues, fixed compiler warnings, cleaned up task-switching code and rebased.

@LudwigKnuepfer
Copy link
Copy Markdown
Member

Your license header is not known - I suggest you use the old-style header and let it be fixed in #1329 .

@LudwigKnuepfer
Copy link
Copy Markdown
Member

Otherwise you could also add this new pattern to dist/tools/licenses/patterns/...

@haukepetersen
Copy link
Copy Markdown
Contributor Author

Ok, I will reverse to the old header once I have time.

@LudwigKnuepfer
Copy link
Copy Markdown
Member

@haukepetersen see haukepetersen#1

@haukepetersen
Copy link
Copy Markdown
Contributor Author

nice, merged it into this PR.

@LudwigKnuepfer
Copy link
Copy Markdown
Member

rebase!

@haukepetersen
Copy link
Copy Markdown
Contributor Author

rebased.

@haukepetersen haukepetersen changed the title board: Initial import of stm32f4discovery board (WIP) board: Initial import of stm32f4discovery board Jul 3, 2014
@haukepetersen
Copy link
Copy Markdown
Contributor Author

Not WIP anymore: now finally fully tested and functioning, please test!

@haukepetersen
Copy link
Copy Markdown
Contributor Author

Regarding the licenses, there are two files, (i) stm32f4xx.h in cpu/include and (ii) system_stm32f4xx.c.
for (i) is a pure header file, and if I remember correctly, header files are not copyrightable?!
for (ii) the file doesn't really have a copyright notice, as its generated code from some excel sheet

OpenCM3 doesn't really supply an alternative, as they are using their complete own scheme for header files. This I would's like to use, as the vendor header files we use all follow the same scheme, which makes it nice when switching between ST, Frescale, NXP etc...

I talked further to @StefanPfeiffer, that on the long run it would make sense for us to re-implement the system_xx.c our self, as this could bring us some more opportunities towards variable clocks.

So in the end, for my opinion we should be fine with these two files, or is anyone strongly disagreeing?

@LudwigKnuepfer
Copy link
Copy Markdown
Member

Regarding the system_stm32f4xx.c:
In general, if a file does not have a license, you are not allowed to do anything with it (as that is what the license does)... not sure how that applies to generated content. In any case it has all those comments that are probably not generated.
Can we generate our own version?

@LudwigKnuepfer
Copy link
Copy Markdown
Member

I'd opt for implementing our own version.. one that abides to our coding conventions ;-)

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Jul 4, 2014

In general, if a file does not have a license, you are not allowed to do anything with it

At least in Germany.

@haukepetersen
Copy link
Copy Markdown
Contributor Author

Ok, so I guess re-implementing it is. I just looked into the CubeMX configuration-generation tool from ST (some windows-based f***), and this is generating code with this license:

  ******************************************************************************
  *
  * COPYRIGHT(c) 2014 STMicroelectronics
  *
  * Redistribution and use in source and binary forms, with or without modification,
  * are permitted provided that the following conditions are met:
  *   1. Redistributions of source code must retain the above copyright notice,
  *      this list of conditions and the following disclaimer.
  *   2. Redistributions in binary form must reproduce the above copyright notice,
  *      this list of conditions and the following disclaimer in the documentation
  *      and/or other materials provided with the distribution.
  *   3. Neither the name of STMicroelectronics nor the names of its contributors
  *      may be used to endorse or promote products derived from this software
  *      without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  ******************************************************************************

@LudwigKnuepfer
Copy link
Copy Markdown
Member

That's a regular 3 clause BSD license if I didn't overlook something.. it's already approved by our license checker =)

@thomaseichinger
Copy link
Copy Markdown
Member

I implemented a version compliant to our coding conventions for #1363 in system_stm32f1.c

@LudwigKnuepfer
Copy link
Copy Markdown
Member

Rebase on master and throw out the license commit (was already merged via #1396)

@haukepetersen
Copy link
Copy Markdown
Contributor Author

rebased. The licensing issue with the start-up code is on progress, will update as soon as this is ready.

@haukepetersen
Copy link
Copy Markdown
Contributor Author

adjusted PR for the the merged #856

@mehlis
Copy link
Copy Markdown
Contributor

mehlis commented Jul 10, 2014

@haukepetersen the BSD is absolutely no problem :) great!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd throw out the comments and the empty DIRS variable

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.

why throw out comments, they dont hurt... The DIRS I can throw out.

@haukepetersen
Copy link
Copy Markdown
Contributor Author

rebased and fixed error introduced from #1398

@haukepetersen
Copy link
Copy Markdown
Contributor Author

addressed comment from @Kijewski

@haukepetersen
Copy link
Copy Markdown
Contributor Author

Here we go, I implemented the clock-setup code myself, this should take care of the license issues. Also did the usual squashing/rebasing - this PR should now be ready to merge?!

@OlegHahm
Copy link
Copy Markdown
Member

Again here: Who's equipped with the right hardware and willing to test?

@OlegHahm
Copy link
Copy Markdown
Member

ACK - works with Launchpad ARM embedded toolchain.

@OlegHahm
Copy link
Copy Markdown
Member

Wanna squash something?

@haukepetersen
Copy link
Copy Markdown
Contributor Author

yapp, squash on the way

@haukepetersen
Copy link
Copy Markdown
Contributor Author

and go!

haukepetersen added a commit that referenced this pull request Jul 16, 2014
board: Initial import of stm32f4discovery board
@haukepetersen haukepetersen merged commit 86eb5c4 into RIOT-OS:master Jul 16, 2014
@haukepetersen haukepetersen deleted the board_stm32f4discovery branch July 16, 2014 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants