Skip to content

Cannot compile for STM32F410Cx targets #907

Closed

Description

@MCUdude

There are a few STM32 targets I still would like to add to this project. One of them is the STM32F410Cx series.

I do have a working variants file for them. However, I'm not able to compile for either of them (STM32F410C8 or STM32F410CB). Here's the error I'm getting:

C:\Users\user\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\libraries\SrcWrapper\src\stm32\low_power.c: In function 'LowPower_EnableWakeUpPin':
C:\Users\user\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\libraries\SrcWrapper\src\stm32\low_power.c:124:7: error: duplicate case value
  124 |       case SYS_WKUP3 :
      |       ^~~~
C:\Users\user\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\libraries\SrcWrapper\src\stm32\low_power.c:114:7: note: previously used here
  114 |       case SYS_WKUP2 :
      |       ^~~~

This is the added boards.txt entry:

# Generic F410CB
GenF4.menu.pnum.Generic_F410CB=Generic F410CB
GenF4.menu.pnum.Generic_F410CB.upload.maximum_size=131072
GenF4.menu.pnum.Generic_F410CB.upload.maximum_data_size=32768
GenF4.menu.pnum.Generic_F410CB.build.board=GENERIC_F410CB
GenF4.menu.pnum.Generic_F410CB.build.product_line=STM32F410Cx
GenF4.menu.pnum.Generic_F410CB.build.variant=Generic_F410Cx

# Generic F410C8
GenF4.menu.pnum.Generic_F410C8=Generic F410C8
GenF4.menu.pnum.Generic_F410C8.upload.maximum_size=65536
GenF4.menu.pnum.Generic_F410C8.upload.maximum_data_size=32768
GenF4.menu.pnum.Generic_F410C8.build.board=GENERIC_F410C8
GenF4.menu.pnum.Generic_F410C8.build.product_line=STM32F410Cx
GenF4.menu.pnum.Generic_F410C8.build.variant=Generic_F410Cx

And attached you can find the variants file. once this is sorted out I can submit PR for this variant.
Generic_F410Cx.zip

Activity

  1. fpistm commented on Feb 3, 2020

    @fpistm
    Member

    @MCUdude
    This is due to missing SYS_WKUPx definition in the PinNamesVar.h.
    This file is generated thanks CubeMx XML description file anyway sometimes some WKUP pins are missing which leads to this issue as the one not found exists and defined to NC.
    In that case, you have to check in the MCU datasheet which one is missing and define it manually.

  2. MCUdude commented on Feb 3, 2020

    @MCUdude
    ContributorAuthor

    Thanks, that did the trick! You can expect a PR soon 🙂

  3. added
    question ❓
    on Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    answeredquestion ❓

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions