-
Notifications
You must be signed in to change notification settings - Fork 1.5k
boards/arm: add nucleo-c092rc support #16168
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
Documentation/platforms/arm/stm32c0/boards/nucleo-c092rc/index.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| ================ | ||
| ST Nucleo C092RC | ||
| ================ | ||
|
|
||
| The Nucleo C092RC is a member of the Nucleo-64 board family. | ||
|
|
||
| CANFD not supported yet. | ||
|
|
||
| Buttons | ||
| ======= | ||
|
|
||
| B1 USER: the user button is connected to the I/O PC13 of the STM32 | ||
| microcontroller. | ||
|
|
||
| Serial Console | ||
| ============== | ||
|
|
||
| At default USART2 connected to "Virtual COM Port" is used as serial console. | ||
|
|
||
| Configurations | ||
| ============== | ||
|
|
||
| jumbo | ||
| ----- | ||
|
|
||
| This configuration enables many Apache NuttX features. This is | ||
| mostly to help provide additional code coverage in CI, but also | ||
| allows for a users to see a wide range of features that are | ||
| supported by the OS. | ||
|
|
||
| Enabled features: | ||
|
|
||
| - NSH | ||
|
|
||
| - ADC with DMA enabled using A0 and A1 pins | ||
|
|
||
| - button with software debouncing enabled (no RC filter on the board) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # ############################################################################## | ||
| # boards/arm/stm32f0l0g0/nucleo-c092rc/CMakeLists.txt | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more contributor | ||
| # license agreements. See the NOTICE file distributed with this work for | ||
| # additional information regarding copyright ownership. The ASF licenses this | ||
| # file to you under the Apache License, Version 2.0 (the "License"); you may not | ||
| # use this file except in compliance with the License. You may obtain a copy of | ||
| # the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| # License for the specific language governing permissions and limitations under | ||
| # the License. | ||
| # | ||
| # ############################################################################## | ||
|
|
||
| add_subdirectory(src) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # | ||
| # For a description of the syntax of this configuration file, | ||
| # see the file kconfig-language.txt in the NuttX tools repository. | ||
| # | ||
|
|
||
| if ARCH_BOARD_NUCLEO_C092RC | ||
|
|
||
| endif |
74 changes: 74 additions & 0 deletions
74
boards/arm/stm32f0l0g0/nucleo-c092rc/configs/jumbo/defconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # | ||
| # This file is autogenerated: PLEASE DO NOT EDIT IT. | ||
| # | ||
| # You can use "make menuconfig" to make any modifications to the installed .config file. | ||
| # You can then do "make savedefconfig" to generate a new defconfig file that includes your | ||
| # modifications. | ||
| # | ||
| # CONFIG_LIBC_LONG_LONG is not set | ||
| # CONFIG_NSH_ARGCAT is not set | ||
| # CONFIG_STM32F0G0L0_USE_LEGACY_PINMAP is not set | ||
| CONFIG_ADC=y | ||
| CONFIG_ANALOG=y | ||
| CONFIG_ARCH="arm" | ||
| CONFIG_ARCH_BOARD="nucleo-c092rc" | ||
| CONFIG_ARCH_BOARD_NUCLEO_C092RC=y | ||
| CONFIG_ARCH_BUTTONS=y | ||
| CONFIG_ARCH_CHIP="stm32f0l0g0" | ||
| CONFIG_ARCH_CHIP_STM32C092RC=y | ||
| CONFIG_ARCH_CHIP_STM32C092XX=y | ||
| CONFIG_ARCH_CHIP_STM32C0=y | ||
| CONFIG_ARCH_IRQBUTTONS=y | ||
| CONFIG_ARCH_STACKDUMP=y | ||
| CONFIG_BOARDCTL=y | ||
| CONFIG_BOARD_LATE_INITIALIZE=y | ||
| CONFIG_BOARD_LOOPSPERMSEC=3997 | ||
| CONFIG_BUILTIN=y | ||
| CONFIG_DEBUG_FEATURES=y | ||
| CONFIG_DEBUG_FULLOPT=y | ||
| CONFIG_DEBUG_SYMBOLS=y | ||
| CONFIG_DEV_GPIO=y | ||
| CONFIG_DISABLE_ENVIRON=y | ||
| CONFIG_DISABLE_MOUNTPOINT=y | ||
| CONFIG_DISABLE_MQUEUE=y | ||
| CONFIG_DISABLE_POSIX_TIMERS=y | ||
| CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y | ||
| CONFIG_EXAMPLES_ADC=y | ||
| CONFIG_EXAMPLES_ADC_GROUPSIZE=2 | ||
| CONFIG_EXAMPLES_ADC_SWTRIG=y | ||
| CONFIG_EXAMPLES_BUTTONS=y | ||
| CONFIG_EXAMPLES_HELLO=y | ||
| CONFIG_EXAMPLES_WATCHDOG=y | ||
| CONFIG_INIT_ENTRYPOINT="nsh_main" | ||
| CONFIG_INIT_STACKSIZE=1536 | ||
| CONFIG_INPUT=y | ||
| CONFIG_INPUT_BUTTONS=y | ||
| CONFIG_INPUT_BUTTONS_DEBOUNCE_DELAY=10 | ||
| CONFIG_INPUT_BUTTONS_LOWER=y | ||
| CONFIG_INTELHEX_BINARY=y | ||
| CONFIG_LINE_MAX=64 | ||
| CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 | ||
| CONFIG_NSH_BUILTIN_APPS=y | ||
| CONFIG_NSH_FILEIOSIZE=64 | ||
| CONFIG_NSH_READLINE=y | ||
| CONFIG_NUNGET_CHARS=0 | ||
| CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=1536 | ||
| CONFIG_PTHREAD_MUTEX_UNSAFE=y | ||
| CONFIG_PTHREAD_STACK_DEFAULT=1536 | ||
| CONFIG_RAM_SIZE=30720 | ||
| CONFIG_RAM_START=0x20000000 | ||
| CONFIG_RAW_BINARY=y | ||
| CONFIG_RR_INTERVAL=200 | ||
| CONFIG_SCHED_WAITPID=y | ||
| CONFIG_START_DAY=19 | ||
| CONFIG_START_MONTH=5 | ||
| CONFIG_START_YEAR=2013 | ||
| CONFIG_STDIO_DISABLE_BUFFERING=y | ||
| CONFIG_STM32F0L0G0_ADC1=y | ||
| CONFIG_STM32F0L0G0_DMA1=y | ||
| CONFIG_STM32F0L0G0_IWDG=y | ||
| CONFIG_STM32F0L0G0_USART2=y | ||
| CONFIG_STM32F0L0G0_WWDG=y | ||
| CONFIG_SYSTEM_NSH=y | ||
| CONFIG_TASK_NAME_SIZE=0 | ||
| CONFIG_USART2_SERIAL_CONSOLE=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,162 @@ | ||
| /**************************************************************************** | ||
| * boards/arm/stm32f0l0g0/nucleo-c092rc/include/board.h | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. The | ||
| * ASF licenses this file to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance with the | ||
| * License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| * License for the specific language governing permissions and limitations | ||
| * under the License. | ||
| * | ||
| ****************************************************************************/ | ||
|
|
||
| #ifndef __BOARDS_ARM_STM32F0L0G0_NUCLEO_C092RC_INCLUDE_BOARD_H | ||
| #define __BOARDS_ARM_STM32F0L0G0_NUCLEO_C092RC_INCLUDE_BOARD_H | ||
|
|
||
| /**************************************************************************** | ||
| * Included Files | ||
| ****************************************************************************/ | ||
|
|
||
| #include <nuttx/config.h> | ||
|
|
||
| #ifndef __ASSEMBLY__ | ||
| # include <stdint.h> | ||
| #endif | ||
|
|
||
| /**************************************************************************** | ||
| * Pre-processor Definitions | ||
| ****************************************************************************/ | ||
|
|
||
| /* Clocking *****************************************************************/ | ||
|
|
||
| /* HSI - Internal 48 MHz RC Oscillator | ||
| * LSI - 32 KHz RC | ||
| * HSE - 8 MHz from MCO output of ST-LINK (disabled by default) | ||
| * LSE - 32.768 kHz | ||
| */ | ||
|
|
||
| #define STM32_BOARD_XTAL 8000000ul /* 8MHz */ | ||
|
|
||
| #define STM32_HSI_FREQUENCY 48000000ul /* 48MHz */ | ||
| #define STM32_LSI_FREQUENCY 32000 /* Between 30kHz and 60kHz */ | ||
| #define STM32_HSE_FREQUENCY STM32_BOARD_XTAL | ||
| #define STM32_LSE_FREQUENCY 32768 /* X2 on board */ | ||
|
|
||
| /* Configure HSI48 clock division factor (48 MHz) */ | ||
|
|
||
| #define STM32_RCC_HSIDIV RCC_CR_HSIDIV_HSI | ||
|
|
||
| /* Use the HSI as SYSCLK source (48 MHz) */ | ||
|
|
||
| #define STM32_SYSCLK_SW RCC_CFGR_SW_HSI | ||
| #define STM32_SYSCLK_SWS RCC_CFGR_SWS_HSI | ||
| #define STM32_SYSCLK_FREQUENCY (STM32_HSI_FREQUENCY) | ||
|
|
||
| /* AHB clock (HCLK) is SYSCLK (48 MHz) */ | ||
|
|
||
| #define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK | ||
| #define STM32_HCLK_FREQUENCY STM32_SYSCLK_FREQUENCY | ||
|
|
||
| /* APB1 clock (PCLK) is HCLK (48 MHz) */ | ||
|
|
||
| #define STM32_RCC_CFGR_PPRE RCC_CFGR_PPRE_HCLK | ||
| #define STM32_PCLK1_FREQUENCY STM32_HCLK_FREQUENCY | ||
|
|
||
| /* LED definitions **********************************************************/ | ||
|
|
||
| /* LED index values for use with board_userled() */ | ||
|
|
||
| #define BOARD_LED1 0 /* User LD1 */ | ||
| #define BOARD_LED2 1 /* User LD2 */ | ||
| #define BOARD_NLEDS 2 | ||
|
|
||
| /* LED bits for use with board_userled_all() */ | ||
|
|
||
| #define BOARD_LED1_BIT (1 << BOARD_LED1) | ||
| #define BOARD_LED2_BIT (1 << BOARD_LED2) | ||
|
|
||
| /* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LED on the | ||
| * board. The following definitions describe how NuttX controls | ||
| * the LED: | ||
| * | ||
| * SYMBOL Meaning LED1 state | ||
| * ------------------ ----------------------- ---------- | ||
| * LED_STARTED NuttX has been started OFF | ||
| * LED_HEAPALLOCATE Heap has been allocated OFF | ||
| * LED_IRQSENABLED Interrupts enabled OFF | ||
| * LED_STACKCREATED Idle stack created ON | ||
| * LED_INIRQ In an interrupt No change | ||
| * LED_SIGNAL In a signal handler No change | ||
| * LED_ASSERTION An assertion failed No change | ||
| * LED_PANIC The system has crashed Blinking | ||
| * LED_IDLE STM32 is is sleep mode Not used | ||
| */ | ||
|
|
||
| #define LED_STARTED 0 | ||
| #define LED_HEAPALLOCATE 0 | ||
| #define LED_IRQSENABLED 0 | ||
| #define LED_STACKCREATED 1 | ||
| #define LED_INIRQ 2 | ||
| #define LED_SIGNAL 2 | ||
| #define LED_ASSERTION 2 | ||
| #define LED_PANIC 1 | ||
|
|
||
| /* Button definitions *******************************************************/ | ||
|
|
||
| /* Nucleo C092RC board supports two buttons; only one button is controllable | ||
| * by software: | ||
| * | ||
| * B1 USER: user button connected to STM32 I/O PC13. | ||
| * B2 RESET: push button connected to NRST; used to RESET the MCU. | ||
| */ | ||
|
|
||
| #define BUTTON_USER 0 /* User B1 */ | ||
| #define NUM_BUTTONS 1 | ||
|
|
||
| #define BUTTON_USER_BIT (1 << BUTTON_USER) | ||
|
|
||
| /* Alternate function pin selections ****************************************/ | ||
|
|
||
| /* USART */ | ||
|
|
||
| /* USART1 at arduino D0/D1: | ||
| * USART1_RX - PB6 | ||
| * USART1_TX - PB7 | ||
| */ | ||
|
|
||
| #define GPIO_USART1_RX (GPIO_USART2_RX_2|GPIO_SPEED_HIGH) /* PB6 */ | ||
| #define GPIO_USART1_TX (GPIO_USART2_TX_2|GPIO_SPEED_HIGH) /* PB7 */ | ||
|
|
||
| /* USART1 RS485_DIR - PA8 (arduino D7) | ||
| * (compatible with RS485 Waveshare shield) | ||
| */ | ||
|
|
||
| #define GPIO_USART1_RS485_DIR (GPIO_OUTPUT | GPIO_PUSHPULL | \ | ||
| GPIO_SPEED_HIGH | GPIO_OUTPUT_CLEAR | \ | ||
| GPIO_PORTA | GPIO_PIN8) | ||
|
|
||
| /* By default the USART2 is connected to STLINK Virtual COM Port: | ||
| * USART2_RX - PA3 | ||
| * USART2_TX - PA2 | ||
| */ | ||
|
|
||
| #define GPIO_USART2_RX (GPIO_USART2_RX_1|GPIO_SPEED_HIGH) /* PA3 */ | ||
| #define GPIO_USART2_TX (GPIO_USART2_TX_1|GPIO_SPEED_HIGH) /* PA2 */ | ||
|
|
||
| /* DMA channels *************************************************************/ | ||
|
|
||
| /* ADC */ | ||
|
|
||
| #define ADC1_DMA_CHAN DMAMAP_DMA1_ADC1 /* DMA1 */ | ||
|
|
||
| #endif /* __BOARDS_ARM_STM32F0L0G0_NUCLEO_C092RC_INCLUDE_BOARD_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| ############################################################################ | ||
| # boards/arm/stm32f0l0g0/nucleo-c092rc/scripts/Make.defs | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. The | ||
| # ASF licenses this file to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance with the | ||
| # License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| # License for the specific language governing permissions and limitations | ||
| # under the License. | ||
| # | ||
| ############################################################################ | ||
|
|
||
| include $(TOPDIR)/.config | ||
| include $(TOPDIR)/tools/Config.mk | ||
| include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs | ||
|
|
||
| LDSCRIPT = flash.ld | ||
| ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) | ||
|
|
||
| ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 | ||
|
|
||
| CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) | ||
| CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) | ||
| CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) | ||
| CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) | ||
| CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) | ||
| AFLAGS := $(CFLAGS) -D__ASSEMBLY__ | ||
|
|
||
| NXFLATLDFLAGS1 = -r -d -warn-common | ||
| NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections | ||
| LDNXFLATFLAGS = -e main -s 2048 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.