Skip to content

Commit

Permalink
weact stm32h743vit6 usbconsole fix
Browse files Browse the repository at this point in the history
fix previous problemc

added defconfig for weact-stm32h743:nshusb

board.h
Wrong column position or missing blank line before comment: FIX

hopefully last commit
  • Loading branch information
TOMASHEVSKIYIVAN authored and xiaoxiang781216 committed Sep 28, 2024
1 parent fa6d414 commit b538223
Show file tree
Hide file tree
Showing 6 changed files with 482 additions and 1 deletion.
56 changes: 56 additions & 0 deletions boards/arm/stm32h7/weact-stm32h743/configs/nshusb/defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# 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_NSH_DISABLE_IFCONFIG is not set
# CONFIG_NSH_DISABLE_PS is not set
# CONFIG_STANDARD_SERIAL is not set
# CONFIG_STM32H7_USE_LEGACY_PINMAP is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="weact-stm32h743"
CONFIG_ARCH_BOARD_WEACT_STM32H743=y
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32H743VI=y
CONFIG_ARCH_CHIP_STM32H7=y
CONFIG_ARCH_CHIP_STM32H7_CORTEXM7=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARMV7M_DCACHE=y
CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y
CONFIG_ARMV7M_DTCM=y
CONFIG_ARMV7M_ICACHE=y
CONFIG_BOARDCTL_IOCTL=y
CONFIG_BOARDCTL_USBDEVCTRL=y
CONFIG_BOARD_LOOPSPERMSEC=43103
CONFIG_BUILTIN=y
CONFIG_CDCACM=y
CONFIG_CDCACM_CONSOLE=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_EXPERIMENTAL=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
CONFIG_MM_REGIONS=4
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_RAM_SIZE=245760
CONFIG_RAM_START=0x20010000
CONFIG_RAW_BINARY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_SPI=y
CONFIG_START_DAY=11
CONFIG_START_MONTH=5
CONFIG_START_YEAR=2024
CONFIG_STM32H7_HSI48=y
CONFIG_STM32H7_OTGFS=y
CONFIG_STM32H7_USART1=y
CONFIG_SYSTEM_NSH=y
CONFIG_TASK_NAME_SIZE=0
CONFIG_USBDEV=y
6 changes: 6 additions & 0 deletions boards/arm/stm32h7/weact-stm32h743/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,12 @@
#define GPIO_USART1_RX (GPIO_USART1_RX_1 | GPIO_SPEED_100MHz) /* PB15 */
#define GPIO_USART1_TX (GPIO_USART1_TX_1 | GPIO_SPEED_100MHz) /* PB14 */

/* OTGFS */

#define GPIO_OTGFS_DM (GPIO_OTGFS_DM_0|GPIO_SPEED_100MHz) /* PA11 */
#define GPIO_OTGFS_DP (GPIO_OTGFS_DP_0|GPIO_SPEED_100MHz) /* PA12 */
#define GPIO_OTGFS_ID (GPIO_OTGFS_ID_0|GPIO_SPEED_100MHz) /* PA10 */

/****************************************************************************
* Public Data
****************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/stm32h7/weact-stm32h743/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

include $(TOPDIR)/Make.defs

CSRCS = stm32_boot.c stm32_bringup.c
CSRCS = stm32_boot.c stm32_bringup.c stm32_usb.c stm32_ioctl.c

ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += stm32_autoleds.c
Expand Down
74 changes: 74 additions & 0 deletions boards/arm/stm32h7/weact-stm32h743/src/stm32_ioctl.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/****************************************************************************
* boards/arm/stm32h7/weact-stm32h743/src/stm32_ioctl.c
*
* 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.
*
****************************************************************************/

/****************************************************************************
* Included Files
****************************************************************************/

#include <nuttx/config.h>

#include <sys/types.h>
#include <stdint.h>
#include <errno.h>

#include <nuttx/board.h>

#include "weact-stm32h743.h"

#ifdef CONFIG_BOARDCTL_IOCTL

/****************************************************************************
* Public Functions
****************************************************************************/

/****************************************************************************
* Name: board_ioctl
*
* Description:
* The "landing site" for much of the boardctl() interface. Generic board-
* control functions invoked via ioctl() get routed through here.
*
* Since we don't do anything unusual at the moment, this function
* accomplishes nothing except avoid a missing-function linker error if
* CONFIG_BOARDCTL_IOCTL is selected.
*
* Input Parameters:
* cmd - IOCTL command being requested.
* arg - Arguments for the IOCTL.
*
* Returned Value:
* we don't yet support any boardctl IOCTLs. This function always returns
* -ENOTTY which is the standard IOCTL return value when a command is not
* supported
*
****************************************************************************/

int board_ioctl(unsigned int cmd, uintptr_t arg)
{
switch (cmd)
{
default:
return -ENOTTY;
}

return OK;
}

#endif /* CONFIG_BOARDCTL_IOCTL */
Loading

0 comments on commit b538223

Please sign in to comment.