- 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.2k
 
stm32 board revision in the config to address nucleo without HSE #54601
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Copyright (c) 2023 STMicroelecronics | ||
| # SPDX-License-Identifier: Apache-2.0 | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /* | ||
| * Copyright (c) 2023, STMicroelectronics | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
| 
     | 
||
| &clk_hse { | ||
| /* HSE not used on this board revision */ | ||
| status = "disabled"; | ||
| }; | ||
| 
     | 
||
| &clk_hsi { | ||
| /* use HSI */ | ||
| status = "okay"; | ||
| }; | ||
| 
     | 
||
| &pll { | ||
| /delete-property/ div-m; | ||
| div-m = <16>; | ||
| /delete-property/ clocks; | ||
| clocks = <&clk_hsi>; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| identifier: nucleo_f401re@C01 | ||
| name: ST Nucleo F401RE rev C-01 | ||
| type: mcu | ||
| arch: arm | ||
| toolchain: | ||
| - zephyr | ||
| - gnuarmemb | ||
| - xtools | ||
| supported: | ||
| - arduino_gpio | ||
| - arduino_i2c | ||
| - arduino_spi | ||
| - pwm | ||
| - counter | ||
| - gpio | ||
| - i2c | ||
| - spi | ||
| - adc | ||
| - watchdog | ||
| ram: 96 | ||
| flash: 512 | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Copyright (c) 2023 STMicroelecronics | ||
| # SPDX-License-Identifier: Apache-2.0 | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| board_check_revision( | ||
| FORMAT ALPHANUM | ||
| DEFAULT_REVISION C02 | ||
| ) | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -849,7 +849,9 @@ endfunction() | |
| # When `EXACT` is not specified, this function will set the Zephyr build system | ||
| # variable `ACTIVE_BOARD_REVISION` with the selected revision. | ||
| # | ||
| # FORMAT <LETTER | NUMBER | MAJOR.MINOR.PATCH>: Specify the revision format. | ||
| # FORMAT <ALPHANUM | LETTER | NUMBER | MAJOR.MINOR.PATCH>: Specify the revision format. | ||
| # ALPHANUM: Revision format is a single letter from A - Z | ||
| # followed by one or two integer number ('C02') | ||
| # LETTER: Revision format is a single letter from A - Z. | ||
| # NUMBER: Revision format is a single integer number. | ||
| # MAJOR.MINOR.PATCH: Revision format is three numbers, separated by `.`, | ||
| 
          
            
          
           | 
    @@ -915,7 +917,9 @@ function(board_check_revision) | |
| endif() | ||
| endif() | ||
| 
     | 
||
| if(BOARD_REV_FORMAT STREQUAL LETTER) | ||
| if(BOARD_REV_FORMAT STREQUAL ALPHANUM) | ||
| set(revision_regex "([A-Z][0-9]+)") | ||
| 
         
      Comment on lines
    
      +920
     to 
      +921
    
   
  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this  So far i'm not convinced we should extend the common helper for this case. What about a two letters +  numbers, or the opposite, number, like  Note, boards can use any revision format they like, but not everything need to have built-in support in the  For example, the legend board uses revisions   | 
||
| elseif(BOARD_REV_FORMAT STREQUAL LETTER) | ||
| set(revision_regex "([A-Z])") | ||
| elseif(BOARD_REV_FORMAT STREQUAL NUMBER) | ||
| set(revision_regex "([0-9]+)") | ||
| 
        
          
        
         | 
    @@ -935,7 +939,7 @@ function(board_check_revision) | |
| endif() | ||
| else() | ||
| message(FATAL_ERROR "Invalid format specified for \ | ||
| `board_check_revision(FORMAT <LETTER | NUMBER | MAJOR.MINOR.PATCH>)`") | ||
| `board_check_revision(FORMAT <ALPHANUM | LETTER | NUMBER | MAJOR.MINOR.PATCH>)`") | ||
| endif() | ||
| 
     | 
||
| if(NOT (BOARD_REVISION MATCHES "^${revision_regex}$")) | ||
| 
          
            
          
           | 
    ||
Uh oh!
There was an error while loading. Please reload this page.