From 0a7653012ac170df06e8741de67c8d7c7c70fd27 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Thu, 30 Dec 2021 10:19:16 +0100 Subject: [PATCH 01/19] :fire: (cmake): Remove CODE_ANALYSIS CODE_ANALYSIS was done using cppcheck. Now that we have SonarCloud, we can remove local code analysis. --- CMakeLists.txt | 24 ------------------------ Makefile | 12 ++---------- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d3b36a5d14..fda48281ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,30 +11,6 @@ if(CCACHE) set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE}") endif(CCACHE) -# Activate code analysis -option(ENABLE_CODE_ANALYSIS "Run code analysis" OFF) -message(STATUS "ENABLE_CODE_ANALYSIS --> ${ENABLE_CODE_ANALYSIS}") - -if(ENABLE_CODE_ANALYSIS) - find_program(CPPCHECK "cppcheck") - if(CPPCHECK) - set(CMAKE_CXX_CPPCHECK "${CPPCHECK}" - "--platform=${CMAKE_CURRENT_SOURCE_DIR}/tools/config/cppcheck_leka_platform.xml" - "--std=c++17" - "--cppcheck-build-dir=build/cppcheck" - "--enable=all" - "--inconclusive" - "--inline-suppr" - "--quiet" - "--suppress=unmatchedSuppression" - "--suppress=missingIncludeSystem" - "--suppress=*:*extern/mbed-os\*" - "--template=πŸ”₯ warning: {id} ({severity}): {message}\\n in {file}:{line}\\n{code}" - # "--check-config" - ) - endif(CPPCHECK) -endif(ENABLE_CODE_ANALYSIS) - # Activate LogKit option(ENABLE_LOG_DEBUG "Enable LogKit output" OFF) message(STATUS "ENABLE_LOG_DEBUG --> ${ENABLE_LOG_DEBUG}") diff --git a/Makefile b/Makefile index b81366d571..9da716c83f 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,6 @@ TARGET_BOARD ?= LEKA_V1_2_DEV # ENABLE_LOG_DEBUG ?= OFF -ENABLE_CODE_ANALYSIS ?= OFF BUILD_TARGETS_TO_USE_WITH_BOOTLOADER ?= OFF # @@ -122,12 +121,12 @@ config_tools_target: mkdir_cmake_config config_cmake_build: mkdir_tools_config @echo "" @echo "πŸƒ Running cmake configuration script for target $(TARGET_BOARD) πŸ“" - @cmake -S . -B $(TARGET_BUILD_DIR) -GNinja -DCMAKE_CONFIG_DIR="$(CMAKE_CONFIG_DIR)" -DTARGET_BOARD="$(TARGET_BOARD)" -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_LOG_DEBUG=$(ENABLE_LOG_DEBUG) -DENABLE_CODE_ANALYSIS=$(ENABLE_CODE_ANALYSIS) -DBUILD_TARGETS_TO_USE_WITH_BOOTLOADER=$(BUILD_TARGETS_TO_USE_WITH_BOOTLOADER) + @cmake -S . -B $(TARGET_BUILD_DIR) -GNinja -DCMAKE_CONFIG_DIR="$(CMAKE_CONFIG_DIR)" -DTARGET_BOARD="$(TARGET_BOARD)" -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_LOG_DEBUG=$(ENABLE_LOG_DEBUG) -DBUILD_TARGETS_TO_USE_WITH_BOOTLOADER=$(BUILD_TARGETS_TO_USE_WITH_BOOTLOADER) config_tools_build: mkdir_tools_config @echo "" @echo "πŸƒ Running cmake configuration script for target $(TARGET_BOARD) πŸ“" - @cmake -S . -B $(CMAKE_TOOLS_BUILD_DIR) -GNinja -DCMAKE_CONFIG_DIR="$(CMAKE_TOOLS_CONFIG_DIR)" -DTARGET_BOARD="$(TARGET_BOARD)" -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_LOG_DEBUG=ON -DENABLE_CODE_ANALYSIS=$(ENABLE_CODE_ANALYSIS) + @cmake -S . -B $(CMAKE_TOOLS_BUILD_DIR) -GNinja -DCMAKE_CONFIG_DIR="$(CMAKE_TOOLS_CONFIG_DIR)" -DTARGET_BOARD="$(TARGET_BOARD)" -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_LOG_DEBUG=ON @ln -sf $(CMAKE_TOOLS_BUILD_DIR)/compile_commands.json ./ # @@ -243,13 +242,6 @@ clang_tidy_diff_fix: | grep -E -v "_test" | grep -E "^A|^M" | sed "s/^[AM]\t//g" | grep -E "\.h\$$|\.cpp\$$" \ | xargs /usr/local/opt/llvm/bin/clang-tidy -p=. --quiet --fix --fix-errors -code_analysis: mkdir_build - @echo "" - @echo "πŸƒβ€β™‚οΈ Running cppcheck code analysis πŸ”¬" - @mkdir -p $(PROJECT_BUILD_DIR)/cppcheck - cmake -S . -B $(PROJECT_BUILD_DIR)/cppcheck -GNinja -DTARGET_BOARD="$(TARGET_BOARD)" -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_CODE_ANALYSIS=ON - cmake --build $(PROJECT_BUILD_DIR)/cppcheck - # # MARK: - Mbed targets # From c96fc144c0ecf542b9d4ae174e3a987e313540be Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 7 Jan 2022 16:12:41 +0100 Subject: [PATCH 02/19] :adhesive_bandage: (targets): Fix device names with good values from arm_pack_manager --- targets/custom_targets.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/custom_targets.json b/targets/custom_targets.json index 21f91cc1cf..826cb44bb6 100644 --- a/targets/custom_targets.json +++ b/targets/custom_targets.json @@ -37,7 +37,7 @@ "USBDEVICE", "QSPI" ], - "device_name": "STM32F769NI", + "device_name": "STM32F769NIHx", "overrides": { "network-default-interface-type": "ETHERNET" } @@ -165,7 +165,7 @@ "SPISLAVE", "CAN" ], - "device_name": "STM32F769NI", + "device_name": "STM32F769BITx", "overrides": { "network-default-interface-type": "WIFI", "lse_available": false From 572ea0877c5d0abb4a4afad4911484fc034c6f9c Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 7 Jan 2022 16:46:44 +0100 Subject: [PATCH 03/19] :wastebasket: (targets): Remove old unused dev hardware targets --- CMakeLists.txt | 5 +- mbed_app.json | 6 - targets/TARGET_LEKA_V1_0_DEV/CMakeLists.txt | 18 - .../TARGET_LEKA_V1_0_DEV/PeripheralNames.h | 120 --- targets/TARGET_LEKA_V1_0_DEV/PeripheralPins.c | 521 ---------- targets/TARGET_LEKA_V1_0_DEV/PinNames.h | 515 ---------- targets/TARGET_LEKA_V1_0_DEV/PinNames.orig | 414 -------- .../pins/Leka-MCU_Pins-v1.0.0.ioc | 881 ----------------- .../pins/Leka-MCU_Pins-v1.0.0.reference.csv | 209 ---- targets/TARGET_LEKA_V1_0_DEV/system_clock.c | 211 ---- targets/TARGET_LEKA_V1_1_DEV/CMakeLists.txt | 18 - .../TARGET_LEKA_V1_1_DEV/PeripheralNames.h | 120 --- targets/TARGET_LEKA_V1_1_DEV/PeripheralPins.c | 521 ---------- targets/TARGET_LEKA_V1_1_DEV/PinNames.h | 515 ---------- targets/TARGET_LEKA_V1_1_DEV/PinNames.orig | 414 -------- .../pins/Leka-MCU_Pins-v1.1.ioc | 913 ------------------ .../pins/Leka-MCU_Pins-v1.1.reference.csv | 209 ---- targets/TARGET_LEKA_V1_1_DEV/system_clock.c | 211 ---- targets/custom_targets.json | 86 -- 19 files changed, 4 insertions(+), 5903 deletions(-) delete mode 100644 targets/TARGET_LEKA_V1_0_DEV/CMakeLists.txt delete mode 100644 targets/TARGET_LEKA_V1_0_DEV/PeripheralNames.h delete mode 100644 targets/TARGET_LEKA_V1_0_DEV/PeripheralPins.c delete mode 100644 targets/TARGET_LEKA_V1_0_DEV/PinNames.h delete mode 100644 targets/TARGET_LEKA_V1_0_DEV/PinNames.orig delete mode 100644 targets/TARGET_LEKA_V1_0_DEV/pins/Leka-MCU_Pins-v1.0.0.ioc delete mode 100644 targets/TARGET_LEKA_V1_0_DEV/pins/Leka-MCU_Pins-v1.0.0.reference.csv delete mode 100644 targets/TARGET_LEKA_V1_0_DEV/system_clock.c delete mode 100644 targets/TARGET_LEKA_V1_1_DEV/CMakeLists.txt delete mode 100644 targets/TARGET_LEKA_V1_1_DEV/PeripheralNames.h delete mode 100644 targets/TARGET_LEKA_V1_1_DEV/PeripheralPins.c delete mode 100644 targets/TARGET_LEKA_V1_1_DEV/PinNames.h delete mode 100644 targets/TARGET_LEKA_V1_1_DEV/PinNames.orig delete mode 100644 targets/TARGET_LEKA_V1_1_DEV/pins/Leka-MCU_Pins-v1.1.ioc delete mode 100644 targets/TARGET_LEKA_V1_1_DEV/pins/Leka-MCU_Pins-v1.1.reference.csv delete mode 100644 targets/TARGET_LEKA_V1_1_DEV/system_clock.c diff --git a/CMakeLists.txt b/CMakeLists.txt index fda48281ca..f7fcdf5947 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,9 +69,12 @@ set(INCLUDE_DIR ${ROOT_DIR}/include) set(BOOTLOADER_DIR ${ROOT_DIR}/app/bootloader) # Add custom target subdirectory -set(AVAILABLE_CUSTOM_TARGETS DISCO_ORIGINAL LEKA_V1_0_DEV LEKA_V1_1_DEV LEKA_V1_2_DEV) +set(AVAILABLE_CUSTOM_TARGETS LEKA_DISCO LEKA_V1_2_DEV) if (${TARGET_BOARD} IN_LIST AVAILABLE_CUSTOM_TARGETS) + message(STATUS "Add subdirectory for hardware target ${TARGET_BOARD}") add_subdirectory(${TARGETS_DIR}/TARGET_${TARGET_BOARD}) +else() + message(FATAL_ERROR "Target ${TARGET_BOARD} is not available.") endif() include_directories(BEFORE diff --git a/mbed_app.json b/mbed_app.json index c2f36be7e0..cab54900e3 100644 --- a/mbed_app.json +++ b/mbed_app.json @@ -33,12 +33,6 @@ "LEKA_DISCO": { "target_name": "\"LEKA_DISCO\"" }, - "LEKA_V1_0_DEV": { - "target_name": "\"LEKA_V1_0_DEV\"" - }, - "LEKA_V1_1_DEV": { - "target_name": "\"LEKA_V1_1_DEV\"" - }, "LEKA_V1_2_DEV": { "target_name": "\"LEKA_V1_2_DEV\"" } diff --git a/targets/TARGET_LEKA_V1_0_DEV/CMakeLists.txt b/targets/TARGET_LEKA_V1_0_DEV/CMakeLists.txt deleted file mode 100644 index 8e749e4877..0000000000 --- a/targets/TARGET_LEKA_V1_0_DEV/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Leka - LekaOS -# Copyright 2020 APF France handicap -# SPDX-License-Identifier: Apache-2.0 - -add_library(target_LEKA_V1_0_DEV STATIC) - -target_include_directories(target_LEKA_V1_0_DEV - PUBLIC - . -) - -target_sources(target_LEKA_V1_0_DEV - PRIVATE - PeripheralPins.c - system_clock.c -) - -target_link_libraries(target_LEKA_V1_0_DEV mbed-os) diff --git a/targets/TARGET_LEKA_V1_0_DEV/PeripheralNames.h b/targets/TARGET_LEKA_V1_0_DEV/PeripheralNames.h deleted file mode 100644 index 23cf005de7..0000000000 --- a/targets/TARGET_LEKA_V1_0_DEV/PeripheralNames.h +++ /dev/null @@ -1,120 +0,0 @@ -/* mbed Microcontroller Library - ******************************************************************************* - * Copyright (c) 2016, STMicroelectronics - * All rights reserved. - * - * 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. - ******************************************************************************* - */ -#ifndef MBED_PERIPHERALNAMES_H -#define MBED_PERIPHERALNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum -{ - ADC_1 = (int)ADC1_BASE, - ADC_2 = (int)ADC2_BASE, - ADC_3 = (int)ADC3_BASE -} ADCName; - -typedef enum -{ - DAC_1 = DAC_BASE -} DACName; - -typedef enum -{ - UART_1 = (int)USART1_BASE, - UART_2 = (int)USART2_BASE, - UART_3 = (int)USART3_BASE, - UART_4 = (int)UART4_BASE, - UART_5 = (int)UART5_BASE, - UART_6 = (int)USART6_BASE, - UART_7 = (int)UART7_BASE, - UART_8 = (int)UART8_BASE -} UARTName; - -#define DEVICE_SPI_COUNT 6 -typedef enum -{ - SPI_1 = (int)SPI1_BASE, - SPI_2 = (int)SPI2_BASE, - SPI_3 = (int)SPI3_BASE, - SPI_4 = (int)SPI4_BASE, - SPI_5 = (int)SPI5_BASE, - SPI_6 = (int)SPI6_BASE -} SPIName; - -typedef enum -{ - I2C_1 = (int)I2C1_BASE, - I2C_2 = (int)I2C2_BASE, - I2C_3 = (int)I2C3_BASE, - I2C_4 = (int)I2C4_BASE -} I2CName; - -typedef enum -{ - PWM_1 = (int)TIM1_BASE, - PWM_2 = (int)TIM2_BASE, - PWM_3 = (int)TIM3_BASE, - PWM_4 = (int)TIM4_BASE, - PWM_5 = (int)TIM5_BASE, - PWM_8 = (int)TIM8_BASE, - PWM_9 = (int)TIM9_BASE, - PWM_10 = (int)TIM10_BASE, - PWM_11 = (int)TIM11_BASE, - PWM_12 = (int)TIM12_BASE, - PWM_13 = (int)TIM13_BASE, - PWM_14 = (int)TIM14_BASE -} PWMName; - -typedef enum -{ - CAN_1 = (int)CAN1_BASE, - CAN_2 = (int)CAN2_BASE, - CAN_3 = (int)CAN3_BASE -} CANName; - -typedef enum -{ - QSPI_1 = (int)QSPI_R_BASE, -} QSPIName; - -typedef enum -{ - USB_FS = (int)USB_OTG_FS_PERIPH_BASE, - USB_HS = (int)USB_OTG_HS_PERIPH_BASE -} USBName; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/targets/TARGET_LEKA_V1_0_DEV/PeripheralPins.c b/targets/TARGET_LEKA_V1_0_DEV/PeripheralPins.c deleted file mode 100644 index ff5ca65966..0000000000 --- a/targets/TARGET_LEKA_V1_0_DEV/PeripheralPins.c +++ /dev/null @@ -1,521 +0,0 @@ -/* mbed Microcontroller Library - * SPDX-License-Identifier: BSD-3-Clause - ****************************************************************************** - * - * Copyright (c) 2016-2020 STMicroelectronics. - * All rights reserved. - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - * - * Automatically generated from STM32CubeMX/db/mcu/STM32F769B(G-I)Tx.xml - */ - -#include "PeripheralPins.h" -#include "mbed_toolchain.h" - -//============================================================================== -// Notes -// -// - The pins mentioned Px_y_ALTz are alternative possibilities which use other -// HW peripheral instances. You can use them the same way as any other "normal" -// pin (i.e. PwmOut pwm(PA_7_ALT0);). These pins are not displayed on the board -// pinout image on mbed.org. -// -// - The pins which are connected to other components present on the board have -// the comment "Connected to xxx". The pin function may not work properly in this -// case. These pins may not be displayed on the board pinout image on mbed.org. -// Please read the board reference manual and schematic for more information. -// -// - Warning: pins connected to the default STDIO_UART_TX and STDIO_UART_RX pins are commented -// See https://os.mbed.com/teams/ST/wiki/STDIO for more information. -// -//============================================================================== - - -//*** ADC *** - -MBED_WEAK const PinMap PinMap_ADC[] = { - {PA_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 // Connected to MCU_SYS_WAKE_UP - {PA_0_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 // Connected to MCU_SYS_WAKE_UP - {PA_0_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 // Connected to MCU_SYS_WAKE_UP - {PA_1, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 // Connected to MOTOR_LEFT_PWM - {PA_1_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 // Connected to MOTOR_LEFT_PWM - {PA_1_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 // Connected to MOTOR_LEFT_PWM - {PA_2, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 // Connected to MOTOR_RIGHT_PWM - {PA_2_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 // Connected to MOTOR_RIGHT_PWM - {PA_2_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 // Connected to MOTOR_RIGHT_PWM -// {PA_3, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 // Connected to STDIO_UART_RX -// {PA_3, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 // Connected to STDIO_UART_RX -// {PA_3, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 // Connected to STDIO_UART_RX - {PA_4, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 // Connected to MCU_SOUND_OUT - {PA_4_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 // Connected to MCU_SOUND_OUT - {PA_5, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 // Connected to SD_SPI_SCK - {PA_5_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 // Connected to SD_SPI_SCK - {PA_6, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 // Connected to SD_SPI_MISO - {PA_6_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 // Connected to SD_SPI_MISO - {PA_7, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 // Connected to SD_SPI_MOSI - {PA_7_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 // Connected to SD_SPI_MOSI - {PB_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 - {PB_0_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 - {PB_1, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_1_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 // Connected to SENSOR_LIGHT_ADC_INPUT - {PC_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 // Connected to BATTERY_CHARGE_STATUS - {PC_0_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 // Connected to BATTERY_CHARGE_STATUS - {PC_0_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 // Connected to BATTERY_CHARGE_STATUS - {PC_1, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 // Connected to MOTOR_LEFT_VOLTAGE - {PC_1_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 // Connected to MOTOR_LEFT_VOLTAGE - {PC_1_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 // Connected to MOTOR_LEFT_VOLTAGE - {PC_2, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 // Connected to MOTOR_RIGHT_VOLTAGE - {PC_2_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 // Connected to MOTOR_RIGHT_VOLTAGE - {PC_2_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 // Connected to MOTOR_RIGHT_VOLTAGE - {PC_3, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 // Connected to BATTERY_VOLTAGE - {PC_3_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 // Connected to BATTERY_VOLTAGE - {PC_3_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 // Connected to BATTERY_VOLTAGE - {PC_4, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 // Connected to SD_SPI_CS - {PC_4_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 // Connected to SD_SPI_CS - {PC_5, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 - {PC_5_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 - {PF_3, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_IN9 // Connected to FMC_SRAM_A3 - {PF_4, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC3_IN14 // Connected to FMC_SRAM_A4 - {PF_5, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC3_IN15 // Connected to FMC_SRAM_A5 - {PF_6, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_IN4 // Connected to BLE_SPI_NSS - {PF_7, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_IN5 // Connected to BLE_SPI_SCK - {PF_8, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_IN6 // Connected to BLE_SPI_MISO - {PF_9, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC3_IN7 // Connected to BLE_SPI_MOSI - {PF_10, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC3_IN8 // Connected to MCU_MIC_INPUT - {NC, NC, 0} -}; - -// !!! SECTION TO BE CHECKED WITH DEVICE REFERENCE MANUAL -MBED_WEAK const PinMap PinMap_ADC_Internal[] = { -// {ADC_TEMP, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, -// {ADC_VREF, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 17, 0)}, -// {ADC_VBAT, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, - {NC, NC, 0} -}; - -//*** DAC *** - -MBED_WEAK const PinMap PinMap_DAC[] = { - {PA_4, DAC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 // Connected to MCU_SOUND_OUT - {PA_5, DAC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 // Connected to SD_SPI_SCK - {NC, NC, 0} -}; - -//*** I2C *** - -MBED_WEAK const PinMap PinMap_I2C_SDA[] = { - {PB_7, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Connected to BATTERY_BMS_I2C_SDA - {PB_7_ALT0, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF11_I2C4)}, // Connected to BATTERY_BMS_I2C_SDA - {PB_9, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_9_ALT0, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C4)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_11, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, - {PC_9, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PD_13, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to QSPI_FLASH_IO3 - {PF_0, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to FMC_SRAM_A0 - {PF_15, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to FMC_SRAM_A9 - {PH_5, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to FMC_SRAM_SDNWE - {PH_8, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Connected to FMC_SRAM_D12 - {PH_12, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to FMC_SRAM_D16 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_I2C_SCL[] = { - {PA_8, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Connected to SOUND_ENABLE - {PB_6, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_6_ALT0, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF11_I2C4)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_8, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_8_ALT0, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C4)}, // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_10, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to QSPI_FLASH_nCS - {PD_12, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to QSPI_FLASH_nCS_1 - {PF_1, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to FMC_SRAM_A1 - {PF_14, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to FMC_SRAM_A8 - {PH_4, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to DEBUG_LED - {PH_7, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Connected to SENSOR_PROXIMITY_MUX_I2C_SCL - {PH_11, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to FMC_SRAM_D15 - {NC, NC, 0} -}; - -//*** PWM *** - -// TIM5 cannot be used because already used by the us_ticker -// (update us_ticker_data.h file if another timer is chosen) -MBED_WEAK const PinMap PinMap_PWM[] = { - {PA_0, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 // Connected to MCU_SYS_WAKE_UP -// {PA_0, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 // Connected to MCU_SYS_WAKE_UP - {PA_1, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 // Connected to MOTOR_LEFT_PWM -// {PA_1, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 // Connected to MOTOR_LEFT_PWM - {PA_2, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 // Connected to MOTOR_RIGHT_PWM -// {PA_2, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 // Connected to MOTOR_RIGHT_PWM - {PA_2_ALT0, PWM_9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 // Connected to MOTOR_RIGHT_PWM -// {PA_3, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 // Connected to STDIO_UART_RX -// {PA_3, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 // Connected to STDIO_UART_RX -// {PA_3, PWM_9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 // Connected to STDIO_UART_RX - {PA_5, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 // Connected to SD_SPI_SCK - {PA_5_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N // Connected to SD_SPI_SCK - {PA_6, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 // Connected to SD_SPI_MISO - {PA_6_ALT0, PWM_13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 // Connected to SD_SPI_MISO - {PA_7, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N // Connected to SD_SPI_MOSI - {PA_7_ALT0, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 // Connected to SD_SPI_MOSI - {PA_7_ALT1, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N // Connected to SD_SPI_MOSI - {PA_7_ALT2, PWM_14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 // Connected to SD_SPI_MOSI - {PA_8, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 // Connected to SOUND_ENABLE -// {PA_9, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 // Connected to STDIO_UART_TX -// {PA_10, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 // Connected to STDIO_UART_RX - {PA_11, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 // Connected to RFID_UART_RX - {PA_15, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 // Connected to SENSOR_MAGNETO_IRQ - {PB_0, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - {PB_0_ALT0, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 - {PB_0_ALT1, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N - {PB_1, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_1_ALT0, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_1_ALT1, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_3, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 // Connected to SYS_PROG_SWO - {PB_4, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - {PB_5, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 // Connected to SENSOR_TEMPERATURE_IRQ - {PB_6, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 // Connected to BATTERY_BMS_I2C_SCL - {PB_7, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 // Connected to BATTERY_BMS_I2C_SDA - {PB_8, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_8_ALT0, PWM_10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_9, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_9_ALT0, PWM_11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_10, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 // Connected to QSPI_FLASH_nCS - {PB_11, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 - {PB_13, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N // Connected to LED_EARS_SPI_SCK - {PB_14, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N // Connected to SCREEN_BACKLIGHT_PWM - {PB_14_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N // Connected to SCREEN_BACKLIGHT_PWM - {PB_14_ALT1, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 // Connected to SCREEN_BACKLIGHT_PWM - {PB_15, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N // Connected to LED_EARS_SPI_MOSI - {PB_15_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N // Connected to LED_EARS_SPI_MOSI - {PB_15_ALT1, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 // Connected to LED_EARS_SPI_MOSI - {PC_6, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 // Connected to BT_UART_TX - {PC_6_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 // Connected to BT_UART_TX - {PC_7, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 // Connected to BT_UART_RX - {PC_7_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 // Connected to BT_UART_RX - {PC_8, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 // Connected to BT_RESET - {PC_8_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 // Connected to BT_RESET - {PC_9, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PC_9_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PD_12, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 // Connected to QSPI_FLASH_nCS_1 - {PD_13, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 // Connected to QSPI_FLASH_IO3 - {PD_14, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 // Connected to FMC_SRAM_D0 - {PD_15, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 // Connected to FMC_SRAM_D1 - {PE_5, PWM_9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 // Connected to MOTOR_RIGHT_DIRECTION_2 - {PE_6, PWM_9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - {PE_8, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N // Connected to FMC_SRAM_D5 - {PE_9, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 // Connected to FMC_SRAM_D6 - {PE_10, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N // Connected to FMC_SRAM_D7 - {PE_11, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 // Connected to FMC_SRAM_D8 - {PE_12, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N // Connected to FMC_SRAM_D9 - {PE_13, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 // Connected to FMC_SRAM_D10 - {PE_14, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 // Connected to FMC_SRAM_D11 - {PF_6, PWM_10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 // Connected to BLE_SPI_NSS - {PF_7, PWM_11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 // Connected to BLE_SPI_SCK - {PF_8, PWM_13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 // Connected to BLE_SPI_MISO - {PF_9, PWM_14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 // Connected to BLE_SPI_MOSI - {PH_6, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 // Connected to QSPI_FLASH_nCS_2 - {PH_9, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 // Connected to FMC_SRAM_D13 -// {PH_10, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 // Connected to FMC_SRAM_D14 -// {PH_11, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 // Connected to FMC_SRAM_D15 -// {PH_12, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 // Connected to FMC_SRAM_D16 - {PH_13, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N // Connected to FMC_SRAM_D21 - {PH_14, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N // Connected to FMC_SRAM_D22 - {PH_15, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N // Connected to FMC_SRAM_D23 -// {PI_0, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 // Connected to FMC_SRAM_D24 - {PI_2, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 // Connected to FMC_SRAM_D26 - {PI_5, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 // Connected to FMC_SRAM_NBL3 - {PI_6, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 // Connected to FMC_SRAM_D28 - {PI_7, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 // Connected to FMC_SRAM_D29 - {NC, NC, 0} -}; - -//*** SERIAL *** - -MBED_WEAK const PinMap PinMap_UART_TX[] = { - {PA_0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to MCU_SYS_WAKE_UP - {PA_2, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to MOTOR_RIGHT_PWM - {PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to STDIO_UART_TX - {PA_12, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, // Connected to RFID_UART_TX - {PA_15, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_UART7)}, // Connected to SENSOR_MAGNETO_IRQ - {PB_4, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_UART7)}, - {PB_6, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_6_ALT0, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_UART5)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_9, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_10, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to QSPI_FLASH_nCS - {PB_13, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // Connected to LED_EARS_SPI_SCK - {PB_14, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, // Connected to SCREEN_BACKLIGHT_PWM - {PC_6, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to BT_UART_TX - {PC_10, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to QSPI_FLASH_IO1 - {PC_10_ALT0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to QSPI_FLASH_IO1 - {PC_12, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // Connected to WIFI_ENABLE - {PD_1, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D2 - {PD_5, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to STDIO_UART_TX - {PD_8, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to FMC_SRAM_D13 - {PE_1, UART_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, // Connected to FMC_SRAM_NBL1 - {PE_8, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to FMC_SRAM_D5 - {PF_7, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to BLE_SPI_SCK - {PG_14, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to LED_BELT_SPI_MOSI - {PH_13, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D21 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_UART_RX[] = { - {PA_1, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to MOTOR_LEFT_PWM - {PA_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to STDIO_UART_RX - {PA_8, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_UART7)}, // Connected to SOUND_ENABLE - {PA_10, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to STDIO_UART_RX - {PA_11, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, // Connected to RFID_UART_RX - {PB_3, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_UART7)}, // Connected to SYS_PROG_SWO - {PB_5, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_UART5)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_7, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to BATTERY_BMS_I2C_SDA - {PB_8, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_11, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - {PB_12, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, - {PB_15, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, // Connected to LED_EARS_SPI_MOSI - {PC_7, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to BT_UART_RX - {PC_11, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - {PC_11_ALT0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, - {PD_0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D2 - {PD_2, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // Connected to WIFI_ACTIVATE_UPDATE - {PD_6, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - {PD_9, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to FMC_SRAM_D14 - {PE_0, UART_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, // Connected to FMC_SRAM_NBL0 - {PE_7, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to FMC_SRAM_D4 - {PF_6, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to BLE_SPI_NSS - {PG_9, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to SENSOR_IMU_IRQ - {PH_14, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D22 - {PI_9, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D30 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_UART_RTS[] = { - {PA_1, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to MOTOR_LEFT_PWM - {PA_12, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to RFID_UART_TX - {PA_15, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to SENSOR_MAGNETO_IRQ - {PB_14, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to SCREEN_BACKLIGHT_PWM - {PB_14_ALT0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to SCREEN_BACKLIGHT_PWM - {PC_8, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, // Connected to BT_RESET - {PD_4, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to WIFI_USART_RTS - {PD_12, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to QSPI_FLASH_nCS_1 - {PD_15, UART_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, // Connected to FMC_SRAM_D1 - {PE_9, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to FMC_SRAM_D6 - {PF_8, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to BLE_SPI_MISO - {PG_8, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to FMC_SRAM_SDCLK - {PG_12, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_UART_CTS[] = { - {PA_0, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to MCU_SYS_WAKE_UP - {PA_11, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to RFID_UART_RX - {PB_0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, - {PB_13, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to LED_EARS_SPI_SCK - {PB_15, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to LED_EARS_SPI_MOSI - {PC_9, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PD_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to WIFI_USART_CTS - {PD_11, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to QSPI_FLASH_IO0 - {PD_14, UART_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, // Connected to FMC_SRAM_D0 - {PE_10, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to FMC_SRAM_D7 - {PF_9, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to BLE_SPI_MOSI - {PG_13, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to LED_BELT_SPI_SCK - {PG_15, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to FMC_SRAM_SDNCAS - {NC, NC, 0} -}; - -//*** SPI *** - -MBED_WEAK const PinMap PinMap_SPI_MOSI[] = { - {PA_7, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SD_SPI_MOSI - {PA_7_ALT0, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SD_SPI_MOSI - {PB_2, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SPI3)}, // Connected to QSPI_FLASH_CLK - {PB_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_5_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_5_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_15, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to LED_EARS_SPI_MOSI - {PC_1, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to MOTOR_LEFT_VOLTAGE - {PC_3, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to BATTERY_VOLTAGE - {PC_12, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to WIFI_ENABLE - {PD_6, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI3)}, - {PD_7, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, - {PE_6, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, - {PE_14, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to FMC_SRAM_D11 - {PF_9, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to BLE_SPI_MOSI - {PF_11, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to FMC_SRAM_SDNRAS - {PG_14, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI6)}, // Connected to LED_BELT_SPI_MOSI - {PI_3, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to FMC_SRAM_D27 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_SPI_MISO[] = { - {PA_6, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SD_SPI_MISO - {PA_6_ALT0, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SD_SPI_MISO - {PB_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, - {PB_4_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, - {PB_4_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, - {PB_14, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to SCREEN_BACKLIGHT_PWM - {PC_2, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to MOTOR_RIGHT_VOLTAGE - {PC_11, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, - {PE_5, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to MOTOR_RIGHT_DIRECTION_2 - {PE_13, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to FMC_SRAM_D10 - {PF_8, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to BLE_SPI_MISO - {PG_9, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SENSOR_IMU_IRQ - {PG_12, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI6)}, - {PH_7, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to SENSOR_PROXIMITY_MUX_I2C_SCL - {PI_2, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to FMC_SRAM_D26 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_SPI_SCLK[] = { - {PA_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SD_SPI_SCK - {PA_5_ALT0, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SD_SPI_SCK -// {PA_9, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to STDIO_UART_TX - {PA_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to RFID_UART_TX - {PB_3, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SYS_PROG_SWO - {PB_3_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to SYS_PROG_SWO - {PB_3_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SYS_PROG_SWO - {PB_10, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to QSPI_FLASH_nCS - {PB_13, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to LED_EARS_SPI_SCK - {PC_10, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to QSPI_FLASH_IO1 - {PD_3, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to WIFI_USART_CTS - {PE_2, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to QSPI_FLASH_IO2 - {PE_12, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to FMC_SRAM_D9 - {PF_7, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to BLE_SPI_SCK - {PG_11, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, - {PG_13, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI6)}, // Connected to LED_BELT_SPI_SCK - {PH_6, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to QSPI_FLASH_nCS_2 - {PI_1, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to FMC_SRAM_D25 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_SPI_SSEL[] = { - {PA_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to MCU_SOUND_OUT - {PA_4_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to MCU_SOUND_OUT - {PA_4_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to MCU_SOUND_OUT - {PA_11, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to RFID_UART_RX - {PA_15, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SENSOR_MAGNETO_IRQ - {PA_15_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to SENSOR_MAGNETO_IRQ - {PA_15_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SPI6)}, // Connected to SENSOR_MAGNETO_IRQ - {PB_4, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SPI2)}, - {PB_9, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, - {PE_4, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to MOTOR_RIGHT_DIRECTION_1 - {PE_11, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to FMC_SRAM_D8 - {PF_6, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to BLE_SPI_NSS - {PG_8, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI6)}, // Connected to FMC_SRAM_SDCLK - {PG_10, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SENSOR_PROXIMITY_MUX_IRQB - {PH_5, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to FMC_SRAM_SDNWE - {PI_0, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to FMC_SRAM_D24 - {NC, NC, 0} -}; - -//*** CAN *** - -MBED_WEAK const PinMap PinMap_CAN_RD[] = { - {PA_8, CAN_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_CAN3)}, // Connected to SOUND_ENABLE - {PA_11, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to RFID_UART_RX - {PB_3, CAN_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_CAN3)}, // Connected to SYS_PROG_SWO - {PB_5, CAN_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_8, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_12, CAN_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, - {PD_0, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D2 - {PH_14, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D22 - {PI_9, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D30 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_CAN_TD[] = { - {PA_12, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to RFID_UART_TX - {PA_15, CAN_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_CAN3)}, // Connected to SENSOR_MAGNETO_IRQ - {PB_4, CAN_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_CAN3)}, - {PB_6, CAN_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_9, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_13, CAN_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, // Connected to LED_EARS_SPI_SCK - {PD_1, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D2 - {PH_13, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D21 - {NC, NC, 0} -}; - -//*** QUADSPI *** - -MBED_WEAK const PinMap PinMap_QSPI_DATA0[] = { - {PC_9, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO0 // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PD_11, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO0 // Connected to QSPI_FLASH_IO0 - {PF_8, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_IO0 // Connected to BLE_SPI_MISO - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_DATA1[] = { - {PC_10, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO1 // Connected to QSPI_FLASH_IO1 - {PD_12, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO1 // Connected to QSPI_FLASH_nCS_1 - {PF_9, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_IO1 // Connected to BLE_SPI_MOSI - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_DATA2[] = { - {PE_2, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO2 // Connected to QSPI_FLASH_IO2 - {PF_7, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO2 // Connected to BLE_SPI_SCK - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_DATA3[] = { - {PA_1, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO3 // Connected to MOTOR_LEFT_PWM - {PD_13, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO3 // Connected to QSPI_FLASH_IO3 - {PF_6, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO3 // Connected to BLE_SPI_NSS - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_SCLK[] = { - {PB_2, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_CLK // Connected to QSPI_FLASH_CLK - {PF_10, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_CLK // Connected to MCU_MIC_INPUT - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_SSEL[] = { - {PB_6, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_NCS // Connected to BATTERY_BMS_I2C_SCL - {PB_10, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_NCS // Connected to QSPI_FLASH_nCS - {NC, NC, 0} -}; - -//*** USBDEVICE *** - -MBED_WEAK const PinMap PinMap_USB_FS[] = { -// {PA_8, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF // Connected to SOUND_ENABLE -// {PA_9, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS // Connected to STDIO_UART_TX -// {PA_10, USB_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID // Connected to STDIO_UART_RX - {PA_11, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM // Connected to RFID_UART_RX - {PA_12, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP // Connected to RFID_UART_TX - {NC, NC, 0} -}; - -//*** USBDEVICE *** - -MBED_WEAK const PinMap PinMap_USB_HS[] = { -#if (MBED_CONF_TARGET_USB_SPEED == USE_USB_HS_IN_FS) -// {PA_4, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_SOF // Connected to MCU_SOUND_OUT - {PB_12, USB_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID - {PB_13, USB_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS // Connected to LED_EARS_SPI_SCK - {PB_14, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM // Connected to SCREEN_BACKLIGHT_PWM - {PB_15, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP // Connected to LED_EARS_SPI_MOSI -#else /* MBED_CONF_TARGET_USB_SPEED */ -// {PA_3, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0 // Connected to STDIO_UART_RX - {PA_5, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_CK // Connected to SD_SPI_SCK - {PB_0, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D1 - {PB_1, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D2 // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_5, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D7 // Connected to SENSOR_TEMPERATURE_IRQ - {PB_10, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D3 // Connected to QSPI_FLASH_nCS - {PB_11, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D4 - {PB_12, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D5 - {PB_13, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D6 // Connected to LED_EARS_SPI_SCK - {PC_0, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_STP // Connected to BATTERY_CHARGE_STATUS - {PC_2, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR // Connected to MOTOR_RIGHT_VOLTAGE - {PC_3, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT // Connected to BATTERY_VOLTAGE - {PH_4, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT // Connected to DEBUG_LED - {PI_11, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR // Connected to BLE_IRQ -#endif /* MBED_CONF_TARGET_USB_SPEED */ - {NC, NC, 0} -}; diff --git a/targets/TARGET_LEKA_V1_0_DEV/PinNames.h b/targets/TARGET_LEKA_V1_0_DEV/PinNames.h deleted file mode 100644 index ef325fa174..0000000000 --- a/targets/TARGET_LEKA_V1_0_DEV/PinNames.h +++ /dev/null @@ -1,515 +0,0 @@ -/* mbed Microcontroller Library - * SPDX-License-Identifier: BSD-3-Clause - ****************************************************************************** - * - * Copyright (c) 2016-2020 STMicroelectronics. - * All rights reserved. - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - * - * Automatically generated from STM32CubeMX/db/mcu/STM32F769B(G-I)Tx.xml - */ - -#ifndef MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "PinNamesTypes.h" -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum -{ - ALT0 = 0x100, - ALT1 = 0x200, - ALT2 = 0x300, - ALT3 = 0x400, - ALT4 = 0x500 -} ALTx; - -typedef enum -{ - // Not connected - NC = (int)0xFFFFFFFF, - - PA_0 = 0x00, - PA_0_ALT0 = PA_0 | ALT0, // same pin used for alternate HW - PA_0_ALT1 = PA_0 | ALT1, // same pin used for alternate HW - PA_1 = 0x01, - PA_1_ALT0 = PA_1 | ALT0, // same pin used for alternate HW - PA_1_ALT1 = PA_1 | ALT1, // same pin used for alternate HW - PA_2 = 0x02, - PA_2_ALT0 = PA_2 | ALT0, // same pin used for alternate HW - PA_2_ALT1 = PA_2 | ALT1, // same pin used for alternate HW - PA_3 = 0x03, - PA_4 = 0x04, - PA_4_ALT0 = PA_4 | ALT0, // same pin used for alternate HW - PA_4_ALT1 = PA_4 | ALT1, // same pin used for alternate HW - PA_5 = 0x05, - PA_5_ALT0 = PA_5 | ALT0, // same pin used for alternate HW - PA_6 = 0x06, - PA_6_ALT0 = PA_6 | ALT0, // same pin used for alternate HW - PA_7 = 0x07, - PA_7_ALT0 = PA_7 | ALT0, // same pin used for alternate HW - PA_7_ALT1 = PA_7 | ALT1, // same pin used for alternate HW - PA_7_ALT2 = PA_7 | ALT2, // same pin used for alternate HW - PA_8 = 0x08, - PA_9 = 0x09, - PA_10 = 0x0A, - PA_11 = 0x0B, - PA_12 = 0x0C, - PA_13 = 0x0D, - PA_14 = 0x0E, - PA_15 = 0x0F, - PA_15_ALT0 = PA_15 | ALT0, // same pin used for alternate HW - PA_15_ALT1 = PA_15 | ALT1, // same pin used for alternate HW - PB_0 = 0x10, - PB_0_ALT0 = PB_0 | ALT0, // same pin used for alternate HW - PB_0_ALT1 = PB_0 | ALT1, // same pin used for alternate HW - PB_1 = 0x11, - PB_1_ALT0 = PB_1 | ALT0, // same pin used for alternate HW - PB_1_ALT1 = PB_1 | ALT1, // same pin used for alternate HW - PB_2 = 0x12, - PB_3 = 0x13, - PB_3_ALT0 = PB_3 | ALT0, // same pin used for alternate HW - PB_3_ALT1 = PB_3 | ALT1, // same pin used for alternate HW - PB_4 = 0x14, - PB_4_ALT0 = PB_4 | ALT0, // same pin used for alternate HW - PB_4_ALT1 = PB_4 | ALT1, // same pin used for alternate HW - PB_5 = 0x15, - PB_5_ALT0 = PB_5 | ALT0, // same pin used for alternate HW - PB_5_ALT1 = PB_5 | ALT1, // same pin used for alternate HW - PB_6 = 0x16, - PB_6_ALT0 = PB_6 | ALT0, // same pin used for alternate HW - PB_7 = 0x17, - PB_7_ALT0 = PB_7 | ALT0, // same pin used for alternate HW - PB_8 = 0x18, - PB_8_ALT0 = PB_8 | ALT0, // same pin used for alternate HW - PB_9 = 0x19, - PB_9_ALT0 = PB_9 | ALT0, // same pin used for alternate HW - PB_10 = 0x1A, - PB_11 = 0x1B, - PB_12 = 0x1C, - PB_13 = 0x1D, - PB_14 = 0x1E, - PB_14_ALT0 = PB_14 | ALT0, // same pin used for alternate HW - PB_14_ALT1 = PB_14 | ALT1, // same pin used for alternate HW - PB_15 = 0x1F, - PB_15_ALT0 = PB_15 | ALT0, // same pin used for alternate HW - PB_15_ALT1 = PB_15 | ALT1, // same pin used for alternate HW - PC_0 = 0x20, - PC_0_ALT0 = PC_0 | ALT0, // same pin used for alternate HW - PC_0_ALT1 = PC_0 | ALT1, // same pin used for alternate HW - PC_1 = 0x21, - PC_1_ALT0 = PC_1 | ALT0, // same pin used for alternate HW - PC_1_ALT1 = PC_1 | ALT1, // same pin used for alternate HW - PC_2 = 0x22, - PC_2_ALT0 = PC_2 | ALT0, // same pin used for alternate HW - PC_2_ALT1 = PC_2 | ALT1, // same pin used for alternate HW - PC_3 = 0x23, - PC_3_ALT0 = PC_3 | ALT0, // same pin used for alternate HW - PC_3_ALT1 = PC_3 | ALT1, // same pin used for alternate HW - PC_4 = 0x24, - PC_4_ALT0 = PC_4 | ALT0, // same pin used for alternate HW - PC_5 = 0x25, - PC_5_ALT0 = PC_5 | ALT0, // same pin used for alternate HW - PC_6 = 0x26, - PC_6_ALT0 = PC_6 | ALT0, // same pin used for alternate HW - PC_7 = 0x27, - PC_7_ALT0 = PC_7 | ALT0, // same pin used for alternate HW - PC_8 = 0x28, - PC_8_ALT0 = PC_8 | ALT0, // same pin used for alternate HW - PC_9 = 0x29, - PC_9_ALT0 = PC_9 | ALT0, // same pin used for alternate HW - PC_10 = 0x2A, - PC_10_ALT0 = PC_10 | ALT0, // same pin used for alternate HW - PC_11 = 0x2B, - PC_11_ALT0 = PC_11 | ALT0, // same pin used for alternate HW - PC_12 = 0x2C, - PC_13 = 0x2D, - PC_14 = 0x2E, - PC_15 = 0x2F, - PD_0 = 0x30, - PD_1 = 0x31, - PD_2 = 0x32, - PD_3 = 0x33, - PD_4 = 0x34, - PD_5 = 0x35, - PD_6 = 0x36, - PD_7 = 0x37, - PD_8 = 0x38, - PD_9 = 0x39, - PD_10 = 0x3A, - PD_11 = 0x3B, - PD_12 = 0x3C, - PD_13 = 0x3D, - PD_14 = 0x3E, - PD_15 = 0x3F, - PE_0 = 0x40, - PE_1 = 0x41, - PE_2 = 0x42, - PE_3 = 0x43, - PE_4 = 0x44, - PE_5 = 0x45, - PE_6 = 0x46, - PE_7 = 0x47, - PE_8 = 0x48, - PE_9 = 0x49, - PE_10 = 0x4A, - PE_11 = 0x4B, - PE_12 = 0x4C, - PE_13 = 0x4D, - PE_14 = 0x4E, - PE_15 = 0x4F, - PF_0 = 0x50, - PF_1 = 0x51, - PF_2 = 0x52, - PF_3 = 0x53, - PF_4 = 0x54, - PF_5 = 0x55, - PF_6 = 0x56, - PF_7 = 0x57, - PF_8 = 0x58, - PF_9 = 0x59, - PF_10 = 0x5A, - PF_11 = 0x5B, - PF_12 = 0x5C, - PF_13 = 0x5D, - PF_14 = 0x5E, - PF_15 = 0x5F, - PG_0 = 0x60, - PG_1 = 0x61, - PG_2 = 0x62, - PG_3 = 0x63, - PG_4 = 0x64, - PG_5 = 0x65, - PG_6 = 0x66, - PG_7 = 0x67, - PG_8 = 0x68, - PG_9 = 0x69, - PG_10 = 0x6A, - PG_11 = 0x6B, - PG_12 = 0x6C, - PG_13 = 0x6D, - PG_14 = 0x6E, - PG_15 = 0x6F, - PH_0 = 0x70, - PH_1 = 0x71, - PH_2 = 0x72, - PH_3 = 0x73, - PH_4 = 0x74, - PH_5 = 0x75, - PH_6 = 0x76, - PH_7 = 0x77, - PH_8 = 0x78, - PH_9 = 0x79, - PH_10 = 0x7A, - PH_11 = 0x7B, - PH_12 = 0x7C, - PH_13 = 0x7D, - PH_14 = 0x7E, - PH_15 = 0x7F, - PI_0 = 0x80, - PI_1 = 0x81, - PI_2 = 0x82, - PI_3 = 0x83, - PI_4 = 0x84, - PI_5 = 0x85, - PI_6 = 0x86, - PI_7 = 0x87, - PI_8 = 0x88, - PI_9 = 0x89, - PI_10 = 0x8A, - PI_11 = 0x8B, - PI_12 = 0x8C, - PI_13 = 0x8D, - PI_14 = 0x8E, - PI_15 = 0x8F, - PJ_0 = 0x90, - PJ_1 = 0x91, - PJ_2 = 0x92, - PJ_3 = 0x93, - PJ_4 = 0x94, - PJ_5 = 0x95, - PJ_12 = 0x9C, - PJ_13 = 0x9D, - PJ_14 = 0x9E, - PJ_15 = 0x9F, - PK_3 = 0xA3, - PK_4 = 0xA4, - PK_5 = 0xA5, - PK_6 = 0xA6, - PK_7 = 0xA7, - - /**** ADC internal channels ****/ - - ADC_TEMP = 0xF0, // Internal pin virtual value - ADC_VREF = 0xF1, // Internal pin virtual value - ADC_VBAT = 0xF2, // Internal pin virtual value - -// Arduino Uno(Rev3) Header pin connection naming -// A0 = Px_x, -// A1 = Px_x, -// A2 = Px_x, -// A3 = Px_x, -// A4 = Px_x, -// A5 = Px_x, -// D0 = Px_x, -// D1 = Px_x, -// D2 = Px_x, -// D3 = Px_x, -// D4 = Px_x, -// D5 = Px_x, -// D6 = Px_x, -// D7 = Px_x, -// D8 = Px_x, -// D9 = Px_x, -// D10 = Px_x, -// D11 = Px_x, -// D12 = Px_x, -// D13 = Px_x, -// D14 = Px_x, -// D15 = Px_x, - -// STDIO for console print -#ifdef MBED_CONF_TARGET_STDIO_UART_TX -// STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX, -#else -// STDIO_UART_TX = PA_9, -#endif -#ifdef MBED_CONF_TARGET_STDIO_UART_RX -// STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX, -#else -// STDIO_UART_RX = PA_3, -#endif - - // USBTX = STDIO_UART_TX, // used for greentea tests - // USBRX = STDIO_UART_RX, // used for greentea tests - - // I2C signals aliases - // I2C_SDA = D14, - // I2C_SCL = D15, - - // SPI signals aliases - // SPI_CS = D10, - // SPI_MOSI = D11, - // SPI_MISO = D12, - // SPI_SCK = D13, - - // Standardized LED and button names - // LED1 = PB_13, // LED_EARS_SPI_SCK - // LED2 = PG_14, // LED_BELT_SPI_MOSI - // LED3 = PH_4, // DEBUG_LED - // LED4 = PB_15, // LED_EARS_SPI_MOSI - // LED5 = PG_13, // LED_BELT_SPI_SCK - // BUTTON1 = Px_x, - - // Backward legacy names - // USER_BUTTON = PA_0, - // PWM_OUT = D3, - - /**** USB FS pins ****/ - // USB_OTG_FS_DM = PA_11, - // USB_OTG_FS_DP = PA_12, - // USB_OTG_FS_ID = PA_10, - // USB_OTG_FS_SOF = PA_8, - // USB_OTG_FS_VBUS = PA_9, - - /**** USB HS pins ****/ - // USB_OTG_HS_DM = PB_14, - // USB_OTG_HS_DP = PB_15, - // USB_OTG_HS_ID = PB_12, - // USB_OTG_HS_SOF = PA_4, - // USB_OTG_HS_ULPI_CK = PA_5, - // USB_OTG_HS_ULPI_D0 = PA_3, - // USB_OTG_HS_ULPI_D1 = PB_0, - // USB_OTG_HS_ULPI_D2 = PB_1, - // USB_OTG_HS_ULPI_D3 = PB_10, - // USB_OTG_HS_ULPI_D4 = PB_11, - // USB_OTG_HS_ULPI_D5 = PB_12, - // USB_OTG_HS_ULPI_D6 = PB_13, - // USB_OTG_HS_ULPI_D7 = PB_5, - // USB_OTG_HS_ULPI_DIR = PC_2, - // USB_OTG_HS_ULPI_DIR_ALT0 = PI_11, - // USB_OTG_HS_ULPI_NXT = PC_3, - // USB_OTG_HS_ULPI_NXT_ALT0 = PH_4, - // USB_OTG_HS_ULPI_STP = PC_0, - // USB_OTG_HS_VBUS = PB_13, - - /**** ETHERNET pins ****/ - // ETH_COL = PH_3, - // ETH_COL_ALT0 = PA_3, - // ETH_CRS = PA_0, - // ETH_CRS_ALT0 = PH_2, - // ETH_CRS_DV = PA_7, - // ETH_MDC = PC_1, - // ETH_MDIO = PA_2, - // ETH_PPS_OUT = PG_8, - // ETH_PPS_OUT_ALT0 = PB_5, - // ETH_REF_CLK = PA_1, - // ETH_RXD0 = PC_4, - // ETH_RXD1 = PC_5, - // ETH_RXD2 = PB_0, - // ETH_RXD2_ALT0 = PH_6, - // ETH_RXD3 = PB_1, - // ETH_RXD3_ALT0 = PH_7, - // ETH_RX_CLK = PA_1, - // ETH_RX_DV = PA_7, - // ETH_RX_ER = PI_10, - // ETH_RX_ER_ALT0 = PB_10, - // ETH_TXD0 = PB_12, - // ETH_TXD0_ALT0 = PG_13, - // ETH_TXD1 = PB_13, - // ETH_TXD1_ALT0 = PG_14, - // ETH_TXD2 = PC_2, - // ETH_TXD3 = PE_2, - // ETH_TXD3_ALT0 = PB_8, - // ETH_TX_CLK = PC_3, - // ETH_TX_EN = PB_11, - // ETH_TX_EN_ALT0 = PG_11, - - /**** OSCILLATOR pins ****/ - RCC_OSC32_IN = PC_14, - RCC_OSC32_OUT = PC_15, - RCC_OSC_IN = PH_0, - RCC_OSC_OUT = PH_1, - - /**** DEBUG pins ****/ - SYS_JTCK_SWCLK = PA_14, - SYS_JTDI = PA_15, - SYS_JTDO_SWO = PB_3, - SYS_JTMS_SWDIO = PA_13, - SYS_JTRST = PB_4, - SYS_TRACECLK = PE_2, - SYS_TRACED0 = PE_3, - SYS_TRACED0_ALT0 = PC_1, - SYS_TRACED0_ALT1 = PG_13, - SYS_TRACED1 = PE_4, - SYS_TRACED1_ALT0 = PC_8, - SYS_TRACED1_ALT1 = PG_14, - SYS_TRACED2 = PE_5, - SYS_TRACED2_ALT0 = PD_2, - SYS_TRACED3 = PE_6, - SYS_TRACED3_ALT0 = PC_12, - SYS_WKUP1 = PA_0, - SYS_WKUP2 = PA_2, - SYS_WKUP3 = PC_1, - SYS_WKUP4 = PC_13, - SYS_WKUP5 = PI_8, - SYS_WKUP6 = PI_11, - - // Leka Pin Names - BATTERY_CHARGE_STATUS = PC_0, - BATTERY_VOLTAGE = PC_3, - - BLE_IRQ = PI_11, - BLE_RESET = PE_3, - BLE_SPI_MISO = PF_8, - BLE_SPI_MOSI = PF_9, - BLE_SPI_NSS = PF_6, - BLE_SPI_SCK = PF_7, - - BT_RESET = PC_8, - BT_UART_RX = PC_7, - BT_UART_TX = PC_6, - BT_WAKE_UP = PG_7, - - DEBUG_LED = PH_4, - - HSE_IN = PH_0, - HSE_OUT = PH_1, - - LED_BELT_SPI_MOSI = PG_14, - LED_BELT_SPI_SCK = PG_13, - LED_EARS_SPI_MOSI = PB_15, - LED_EARS_SPI_SCK = PB_13, - - LSE_IN = PC_14, - LSE_OUT = PC_15, - - MCU_MIC_INPUT = PF_10, - MCU_SOUND_OUT = PA_4, - MCU_SYS_WAKE_UP = PA_0, - - MOTOR_LEFT_DIRECTION_1 = PC_13, - MOTOR_LEFT_DIRECTION_2 = PI_8, - MOTOR_LEFT_PWM = PA_1, - MOTOR_LEFT_VOLTAGE = PC_1, - MOTOR_RIGHT_DIRECTION_1 = PE_4, - MOTOR_RIGHT_DIRECTION_2 = PE_5, - MOTOR_RIGHT_PWM = PA_2, - MOTOR_RIGHT_VOLTAGE = PC_2, - - QSPI_FLASH_CLK = PB_2, - QSPI_FLASH_IO0 = PD_11, - QSPI_FLASH_IO1 = PC_10, - QSPI_FLASH_IO2 = PE_2, - QSPI_FLASH_IO3 = PD_13, - QSPI_FLASH_nCS = PB_10, - - RFID_UART_RX = PA_11, - RFID_UART_TX = PA_12, - - SCREEN_BACKLIGHT_PWM = PB_14, - - SD_SPI_CS = PC_4, - SD_SPI_MISO = PA_6, - SD_SPI_MOSI = PA_7, - SD_SPI_SCK = PA_5, - - SENSOR_IMU_IRQ = PG_9, - SENSOR_IMU_TH_I2C_SCL = PB_8, - SENSOR_IMU_TH_I2C_SDA = PB_9, - SENSOR_LIGHT_ADC_INPUT = PB_1, - SENSOR_MAGNETO_IRQ = PA_15, - SENSOR_PROXIMITY_MUX_I2C_SCL = PH_7, - SENSOR_PROXIMITY_MUX_I2C_SDA = PC_9, - SENSOR_PROXIMITY_MUX_IRQA = PI_13, - SENSOR_PROXIMITY_MUX_IRQB = PG_10, - SENSOR_PROXIMITY_MUX_RESET = PI_12, - SENSOR_TEMPERATURE_IRQ = PB_5, - - SOUND_ENABLE = PA_8, - - SYS_POWER_CHECKUP_3V3 = PJ_0, - SYS_POWER_CHECKUP_5V = PJ_1, - SYS_PROG_SWCLK = PA_14, - SYS_PROG_SWDIO = PA_13, - SYS_PROG_SWO = PB_3, - SYS_PROG_VCP_RX = PA_10, - SYS_PROG_VCP_TX = PA_9, - - WIFI_ACTIVATE_UPDATE = PD_2, - WIFI_ENABLE = PC_12, - WIFI_RESET = PJ_3, - WIFI_USART_CTS = PD_3, - WIFI_USART_RTS = PD_4, - WIFI_USART_RX = PA_3, - WIFI_USART_TX = PD_5, - - STDIO_UART_TX = SYS_PROG_VCP_TX, - STDIO_UART_RX = SYS_PROG_VCP_RX, - - USBTX = STDIO_UART_TX, - USBRX = STDIO_UART_RX, - - LED1 = DEBUG_LED, - LED2 = NC, - LED3 = NC, - - USER_BUTTON = NC, - -} PinName; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/targets/TARGET_LEKA_V1_0_DEV/PinNames.orig b/targets/TARGET_LEKA_V1_0_DEV/PinNames.orig deleted file mode 100644 index 779ddd6e96..0000000000 --- a/targets/TARGET_LEKA_V1_0_DEV/PinNames.orig +++ /dev/null @@ -1,414 +0,0 @@ -/* mbed Microcontroller Library - * SPDX-License-Identifier: BSD-3-Clause - ****************************************************************************** - * - * Copyright (c) 2016-2020 STMicroelectronics. - * All rights reserved. - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - * - * Automatically generated from STM32CubeMX/db/mcu/STM32F769B(G-I)Tx.xml - */ - -#ifndef MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "PinNamesTypes.h" -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum -{ - ALT0 = 0x100, - ALT1 = 0x200, - ALT2 = 0x300, - ALT3 = 0x400, - ALT4 = 0x500 -} ALTx; - -typedef enum -{ - // Not connected - NC = (int)0xFFFFFFFF, - - PA_0 = 0x00, - PA_0_ALT0 = PA_0 | ALT0, // same pin used for alternate HW - PA_0_ALT1 = PA_0 | ALT1, // same pin used for alternate HW - PA_1 = 0x01, - PA_1_ALT0 = PA_1 | ALT0, // same pin used for alternate HW - PA_1_ALT1 = PA_1 | ALT1, // same pin used for alternate HW - PA_2 = 0x02, - PA_2_ALT0 = PA_2 | ALT0, // same pin used for alternate HW - PA_2_ALT1 = PA_2 | ALT1, // same pin used for alternate HW - PA_3 = 0x03, - PA_4 = 0x04, - PA_4_ALT0 = PA_4 | ALT0, // same pin used for alternate HW - PA_4_ALT1 = PA_4 | ALT1, // same pin used for alternate HW - PA_5 = 0x05, - PA_5_ALT0 = PA_5 | ALT0, // same pin used for alternate HW - PA_6 = 0x06, - PA_6_ALT0 = PA_6 | ALT0, // same pin used for alternate HW - PA_7 = 0x07, - PA_7_ALT0 = PA_7 | ALT0, // same pin used for alternate HW - PA_7_ALT1 = PA_7 | ALT1, // same pin used for alternate HW - PA_7_ALT2 = PA_7 | ALT2, // same pin used for alternate HW - PA_8 = 0x08, - PA_9 = 0x09, - PA_10 = 0x0A, - PA_11 = 0x0B, - PA_12 = 0x0C, - PA_13 = 0x0D, - PA_14 = 0x0E, - PA_15 = 0x0F, - PA_15_ALT0 = PA_15 | ALT0, // same pin used for alternate HW - PA_15_ALT1 = PA_15 | ALT1, // same pin used for alternate HW - PB_0 = 0x10, - PB_0_ALT0 = PB_0 | ALT0, // same pin used for alternate HW - PB_0_ALT1 = PB_0 | ALT1, // same pin used for alternate HW - PB_1 = 0x11, - PB_1_ALT0 = PB_1 | ALT0, // same pin used for alternate HW - PB_1_ALT1 = PB_1 | ALT1, // same pin used for alternate HW - PB_2 = 0x12, - PB_3 = 0x13, - PB_3_ALT0 = PB_3 | ALT0, // same pin used for alternate HW - PB_3_ALT1 = PB_3 | ALT1, // same pin used for alternate HW - PB_4 = 0x14, - PB_4_ALT0 = PB_4 | ALT0, // same pin used for alternate HW - PB_4_ALT1 = PB_4 | ALT1, // same pin used for alternate HW - PB_5 = 0x15, - PB_5_ALT0 = PB_5 | ALT0, // same pin used for alternate HW - PB_5_ALT1 = PB_5 | ALT1, // same pin used for alternate HW - PB_6 = 0x16, - PB_6_ALT0 = PB_6 | ALT0, // same pin used for alternate HW - PB_7 = 0x17, - PB_7_ALT0 = PB_7 | ALT0, // same pin used for alternate HW - PB_8 = 0x18, - PB_8_ALT0 = PB_8 | ALT0, // same pin used for alternate HW - PB_9 = 0x19, - PB_9_ALT0 = PB_9 | ALT0, // same pin used for alternate HW - PB_10 = 0x1A, - PB_11 = 0x1B, - PB_12 = 0x1C, - PB_13 = 0x1D, - PB_14 = 0x1E, - PB_14_ALT0 = PB_14 | ALT0, // same pin used for alternate HW - PB_14_ALT1 = PB_14 | ALT1, // same pin used for alternate HW - PB_15 = 0x1F, - PB_15_ALT0 = PB_15 | ALT0, // same pin used for alternate HW - PB_15_ALT1 = PB_15 | ALT1, // same pin used for alternate HW - PC_0 = 0x20, - PC_0_ALT0 = PC_0 | ALT0, // same pin used for alternate HW - PC_0_ALT1 = PC_0 | ALT1, // same pin used for alternate HW - PC_1 = 0x21, - PC_1_ALT0 = PC_1 | ALT0, // same pin used for alternate HW - PC_1_ALT1 = PC_1 | ALT1, // same pin used for alternate HW - PC_2 = 0x22, - PC_2_ALT0 = PC_2 | ALT0, // same pin used for alternate HW - PC_2_ALT1 = PC_2 | ALT1, // same pin used for alternate HW - PC_3 = 0x23, - PC_3_ALT0 = PC_3 | ALT0, // same pin used for alternate HW - PC_3_ALT1 = PC_3 | ALT1, // same pin used for alternate HW - PC_4 = 0x24, - PC_4_ALT0 = PC_4 | ALT0, // same pin used for alternate HW - PC_5 = 0x25, - PC_5_ALT0 = PC_5 | ALT0, // same pin used for alternate HW - PC_6 = 0x26, - PC_6_ALT0 = PC_6 | ALT0, // same pin used for alternate HW - PC_7 = 0x27, - PC_7_ALT0 = PC_7 | ALT0, // same pin used for alternate HW - PC_8 = 0x28, - PC_8_ALT0 = PC_8 | ALT0, // same pin used for alternate HW - PC_9 = 0x29, - PC_9_ALT0 = PC_9 | ALT0, // same pin used for alternate HW - PC_10 = 0x2A, - PC_10_ALT0 = PC_10 | ALT0, // same pin used for alternate HW - PC_11 = 0x2B, - PC_11_ALT0 = PC_11 | ALT0, // same pin used for alternate HW - PC_12 = 0x2C, - PC_13 = 0x2D, - PC_14 = 0x2E, - PC_15 = 0x2F, - PD_0 = 0x30, - PD_1 = 0x31, - PD_2 = 0x32, - PD_3 = 0x33, - PD_4 = 0x34, - PD_5 = 0x35, - PD_6 = 0x36, - PD_7 = 0x37, - PD_8 = 0x38, - PD_9 = 0x39, - PD_10 = 0x3A, - PD_11 = 0x3B, - PD_12 = 0x3C, - PD_13 = 0x3D, - PD_14 = 0x3E, - PD_15 = 0x3F, - PE_0 = 0x40, - PE_1 = 0x41, - PE_2 = 0x42, - PE_3 = 0x43, - PE_4 = 0x44, - PE_5 = 0x45, - PE_6 = 0x46, - PE_7 = 0x47, - PE_8 = 0x48, - PE_9 = 0x49, - PE_10 = 0x4A, - PE_11 = 0x4B, - PE_12 = 0x4C, - PE_13 = 0x4D, - PE_14 = 0x4E, - PE_15 = 0x4F, - PF_0 = 0x50, - PF_1 = 0x51, - PF_2 = 0x52, - PF_3 = 0x53, - PF_4 = 0x54, - PF_5 = 0x55, - PF_6 = 0x56, - PF_7 = 0x57, - PF_8 = 0x58, - PF_9 = 0x59, - PF_10 = 0x5A, - PF_11 = 0x5B, - PF_12 = 0x5C, - PF_13 = 0x5D, - PF_14 = 0x5E, - PF_15 = 0x5F, - PG_0 = 0x60, - PG_1 = 0x61, - PG_2 = 0x62, - PG_3 = 0x63, - PG_4 = 0x64, - PG_5 = 0x65, - PG_6 = 0x66, - PG_7 = 0x67, - PG_8 = 0x68, - PG_9 = 0x69, - PG_10 = 0x6A, - PG_11 = 0x6B, - PG_12 = 0x6C, - PG_13 = 0x6D, - PG_14 = 0x6E, - PG_15 = 0x6F, - PH_0 = 0x70, - PH_1 = 0x71, - PH_2 = 0x72, - PH_3 = 0x73, - PH_4 = 0x74, - PH_5 = 0x75, - PH_6 = 0x76, - PH_7 = 0x77, - PH_8 = 0x78, - PH_9 = 0x79, - PH_10 = 0x7A, - PH_11 = 0x7B, - PH_12 = 0x7C, - PH_13 = 0x7D, - PH_14 = 0x7E, - PH_15 = 0x7F, - PI_0 = 0x80, - PI_1 = 0x81, - PI_2 = 0x82, - PI_3 = 0x83, - PI_4 = 0x84, - PI_5 = 0x85, - PI_6 = 0x86, - PI_7 = 0x87, - PI_8 = 0x88, - PI_9 = 0x89, - PI_10 = 0x8A, - PI_11 = 0x8B, - PI_12 = 0x8C, - PI_13 = 0x8D, - PI_14 = 0x8E, - PI_15 = 0x8F, - PJ_0 = 0x90, - PJ_1 = 0x91, - PJ_2 = 0x92, - PJ_3 = 0x93, - PJ_4 = 0x94, - PJ_5 = 0x95, - PJ_12 = 0x9C, - PJ_13 = 0x9D, - PJ_14 = 0x9E, - PJ_15 = 0x9F, - PK_3 = 0xA3, - PK_4 = 0xA4, - PK_5 = 0xA5, - PK_6 = 0xA6, - PK_7 = 0xA7, - - /**** ADC internal channels ****/ - - ADC_TEMP = 0xF0, // Internal pin virtual value - ADC_VREF = 0xF1, // Internal pin virtual value - ADC_VBAT = 0xF2, // Internal pin virtual value - - // Arduino Uno(Rev3) Header pin connection naming - A0 = Px_x, - A1 = Px_x, - A2 = Px_x, - A3 = Px_x, - A4 = Px_x, - A5 = Px_x, - D0 = Px_x, - D1 = Px_x, - D2 = Px_x, - D3 = Px_x, - D4 = Px_x, - D5 = Px_x, - D6 = Px_x, - D7 = Px_x, - D8 = Px_x, - D9 = Px_x, - D10 = Px_x, - D11 = Px_x, - D12 = Px_x, - D13 = Px_x, - D14 = Px_x, - D15 = Px_x, - -// STDIO for console print -#ifdef MBED_CONF_TARGET_STDIO_UART_TX - STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX, -#else - STDIO_UART_TX = PA_9, -#endif -#ifdef MBED_CONF_TARGET_STDIO_UART_RX - STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX, -#else - STDIO_UART_RX = PA_3, -#endif - - USBTX = STDIO_UART_TX, // used for greentea tests - USBRX = STDIO_UART_RX, // used for greentea tests - - // I2C signals aliases - I2C_SDA = D14, - I2C_SCL = D15, - - // SPI signals aliases - SPI_CS = D10, - SPI_MOSI = D11, - SPI_MISO = D12, - SPI_SCK = D13, - - // Standardized LED and button names - LED1 = PB_13, // LED_EARS_SPI_SCK - LED2 = PG_14, // LED_BELT_SPI_MOSI - LED3 = PH_4, // DEBUG_LED - LED4 = PB_15, // LED_EARS_SPI_MOSI - LED5 = PG_13, // LED_BELT_SPI_SCK - BUTTON1 = Px_x, - - // Backward legacy names - USER_BUTTON = PA_0, - PWM_OUT = D3, - - /**** USB FS pins ****/ - USB_OTG_FS_DM = PA_11, - USB_OTG_FS_DP = PA_12, - USB_OTG_FS_ID = PA_10, - USB_OTG_FS_SOF = PA_8, - USB_OTG_FS_VBUS = PA_9, - - /**** USB HS pins ****/ - USB_OTG_HS_DM = PB_14, - USB_OTG_HS_DP = PB_15, - USB_OTG_HS_ID = PB_12, - USB_OTG_HS_SOF = PA_4, - USB_OTG_HS_ULPI_CK = PA_5, - USB_OTG_HS_ULPI_D0 = PA_3, - USB_OTG_HS_ULPI_D1 = PB_0, - USB_OTG_HS_ULPI_D2 = PB_1, - USB_OTG_HS_ULPI_D3 = PB_10, - USB_OTG_HS_ULPI_D4 = PB_11, - USB_OTG_HS_ULPI_D5 = PB_12, - USB_OTG_HS_ULPI_D6 = PB_13, - USB_OTG_HS_ULPI_D7 = PB_5, - USB_OTG_HS_ULPI_DIR = PC_2, - USB_OTG_HS_ULPI_DIR_ALT0 = PI_11, - USB_OTG_HS_ULPI_NXT = PC_3, - USB_OTG_HS_ULPI_NXT_ALT0 = PH_4, - USB_OTG_HS_ULPI_STP = PC_0, - USB_OTG_HS_VBUS = PB_13, - - /**** ETHERNET pins ****/ - ETH_COL = PH_3, - ETH_COL_ALT0 = PA_3, - ETH_CRS = PA_0, - ETH_CRS_ALT0 = PH_2, - ETH_CRS_DV = PA_7, - ETH_MDC = PC_1, - ETH_MDIO = PA_2, - ETH_PPS_OUT = PG_8, - ETH_PPS_OUT_ALT0 = PB_5, - ETH_REF_CLK = PA_1, - ETH_RXD0 = PC_4, - ETH_RXD1 = PC_5, - ETH_RXD2 = PB_0, - ETH_RXD2_ALT0 = PH_6, - ETH_RXD3 = PB_1, - ETH_RXD3_ALT0 = PH_7, - ETH_RX_CLK = PA_1, - ETH_RX_DV = PA_7, - ETH_RX_ER = PI_10, - ETH_RX_ER_ALT0 = PB_10, - ETH_TXD0 = PB_12, - ETH_TXD0_ALT0 = PG_13, - ETH_TXD1 = PB_13, - ETH_TXD1_ALT0 = PG_14, - ETH_TXD2 = PC_2, - ETH_TXD3 = PE_2, - ETH_TXD3_ALT0 = PB_8, - ETH_TX_CLK = PC_3, - ETH_TX_EN = PB_11, - ETH_TX_EN_ALT0 = PG_11, - - /**** OSCILLATOR pins ****/ - RCC_OSC32_IN = PC_14, - RCC_OSC32_OUT = PC_15, - RCC_OSC_IN = PH_0, - RCC_OSC_OUT = PH_1, - - /**** DEBUG pins ****/ - SYS_JTCK_SWCLK = PA_14, - SYS_JTDI = PA_15, - SYS_JTDO_SWO = PB_3, - SYS_JTMS_SWDIO = PA_13, - SYS_JTRST = PB_4, - SYS_TRACECLK = PE_2, - SYS_TRACED0 = PE_3, - SYS_TRACED0_ALT0 = PC_1, - SYS_TRACED0_ALT1 = PG_13, - SYS_TRACED1 = PE_4, - SYS_TRACED1_ALT0 = PC_8, - SYS_TRACED1_ALT1 = PG_14, - SYS_TRACED2 = PE_5, - SYS_TRACED2_ALT0 = PD_2, - SYS_TRACED3 = PE_6, - SYS_TRACED3_ALT0 = PC_12, - SYS_WKUP1 = PA_0, - SYS_WKUP2 = PA_2, - SYS_WKUP3 = PC_1, - SYS_WKUP4 = PC_13, - SYS_WKUP5 = PI_8, - SYS_WKUP6 = PI_11, - -} PinName; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/targets/TARGET_LEKA_V1_0_DEV/pins/Leka-MCU_Pins-v1.0.0.ioc b/targets/TARGET_LEKA_V1_0_DEV/pins/Leka-MCU_Pins-v1.0.0.ioc deleted file mode 100644 index 09fc2a8104..0000000000 --- a/targets/TARGET_LEKA_V1_0_DEV/pins/Leka-MCU_Pins-v1.0.0.ioc +++ /dev/null @@ -1,881 +0,0 @@ -#MicroXplorer Configuration settings - do not modify -PF7.GPIOParameters=GPIO_Label -PB13.GPIOParameters=GPIO_Label -PD12.GPIO_Label=QSPI_FLASH_CS_1 -SH.FMC_D0_DA0.ConfNb=1 -PC7.GPIOParameters=GPIO_Label -SH.FMC_A8.ConfNb=1 -PI7.GPIOParameters=GPIO_Label -SH.FMC_A0.ConfNb=1 -SH.FMC_D6_DA6.ConfNb=1 -SH.FMC_D9_DA9.ConfNb=1 -SH.FMC_A0.0=FMC_A0 -PE11.GPIOParameters=GPIO_Label -PH15.GPIO_Label=FMC_SRAM_D23 -PG8.Signal=FMC_SDCLK -PG8.Locked=true -PG0.Locked=true -RCC.PLLQCLKFreq_Value=96000000 -PG0.Signal=FMC_A10 -PC7.Locked=true -PD8.Locked=true -PD0.Locked=true -SH.FMC_SDNWE.ConfNb=1 -PG14.GPIOParameters=GPIO_Label -SH.FMC_D5_DA5.0=FMC_D5 -PJ2.GPIOParameters=GPIO_Label -PA2.GPIOParameters=GPIO_Label -SH.FMC_D9_DA9.0=FMC_D9 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false -DSIHOST_D0P.Signal=DSIHOST_D0P -SH.FMC_D25.0=FMC_D25 -SH.FMC_NBL2.ConfNb=1 -PG15.GPIO_Label=FMC_SRAM_SDNCAS -DSIHOST_D0P.Locked=true -PF7.Signal=SPI5_SCK -SH.FMC_SDNWE.0=FMC_SDNWE -PH9.Signal=FMC_D17 -SH.FMC_D11_DA11.0=FMC_D11 -PB6.Signal=I2C4_SCL -PC7.Signal=USART6_RX -PD0.Signal=FMC_D2_DA2 -PD8.Signal=FMC_D13_DA13 -PE1.Signal=FMC_NBL1 -PE14.Locked=true -RCC.PLLSAIRCLKFreq_Value=96000000 -ProjectManager.ProjectBuild=false -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PA8.Locked=true -PF1.GPIO_Label=FMC_SRAM_A1 -PI4.GPIO_Label=FMC_SRAM_NBL2 -PD1.GPIO_Label=FMC_SRAM_D2 -ProjectManager.FirmwarePackage=STM32Cube FW_F7 V1.16.0 -PF12.GPIO_Label=FMC_SRAM_A6 -PI7.Locked=true -ProjectManager.BackupPrevious=false -PC4.GPIO_Label=SD_SPI_CS -PE9.Signal=FMC_D6_DA6 -DSIHOST_D1N.Signal=DSIHOST_D1N -PI2.Locked=true -SH.FMC_A2.0=FMC_A2 -PE9.Locked=true -PB1.GPIO_Label=SENSOR_LIGHT_ADC_INPUT -PE4.GPIO_Label=MOTOR_RIGHT_DIRECTION -PG4.GPIO_Label=FMC_SRAM_BA0 -PF10.Locked=true -PF13.Locked=true -PA8.Signal=GPIO_Output -PF2.Locked=true -SH.FMC_D1_DA1.0=FMC_D1 -PE1.Locked=true -PB6.Locked=true -ProjectManager.HalAssertFull=false -Mcu.Package=LQFP208 -PB9.Signal=I2C1_SDA -PB1.Signal=ADCx_IN9 -PA5.Locked=true -PD12.Signal=GPIO_Output -SH.FMC_SDNCAS.ConfNb=1 -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -SH.FMC_A11.ConfNb=1 -PJ3.Locked=true -PA10.Signal=USART1_RX -SH.FMC_D27.0=FMC_D27 -PE12.GPIO_Label=FMC_SRAM_D9 -PH6.Locked=true -PF7.Locked=true -PH9.Locked=true -DSIHOST_D1P.GPIO_Label=MIPI_DSI_D1P -PJ0.Locked=true -PD5.Locked=true -PA4.GPIO_Label=MCU_SOUND_OUT -PD15.Signal=FMC_D1_DA1 -PJ1.GPIO_Label=SYS_POWER_CHECKUP_5V -RCC.PLLSAIQCLKFreq_Value=96000000 -SH.FMC_D3_DA3.ConfNb=1 -PA6.GPIOParameters=GPIO_Label -SH.GPXTI10.0=GPIO_EXTI10 -Mcu.Pin80=DSIHOST_D1P -Mcu.Pin81=DSIHOST_D1N -SH.FMC_A4.0=FMC_A4 -ProjectManager.ProjectFileName=Leka-MCU_Pins-v1.0.0.ioc -SH.FMC_A5.ConfNb=1 -PH13.Locked=true -PH13.Signal=FMC_D21 -Mcu.Pin79=DSIHOST_CKN -PI10.Locked=true -Mcu.PinsNb=132 -Mcu.Pin73=PD13 -Mcu.Pin74=PD14 -Mcu.Pin71=PD11 -Mcu.Pin72=PD12 -PG5.Locked=true -Mcu.Pin77=DSIHOST_D0N -Mcu.Pin78=DSIHOST_CKP -PG5.Signal=FMC_A15_BA1 -Mcu.Pin75=PD15 -Mcu.Pin76=DSIHOST_D0P -SH.FMC_D10_DA10.0=FMC_D10 -PD3.Signal=USART2_CTS -Mcu.Pin70=PD10 -PH1/OSC_OUT.GPIOParameters=GPIO_Label -PI12.Signal=GPIO_Output -SH.FMC_D16.0=FMC_D16 -Mcu.Pin68=PD8 -Mcu.Pin69=PD9 -PB14.Locked=true -Mcu.Pin62=PH10 -PG14.Locked=true -Mcu.Pin63=PH11 -Mcu.Pin60=PH8 -Mcu.Pin61=PH9 -Mcu.Pin66=PB14 -Mcu.Pin67=PB15 -Mcu.Pin64=PH12 -Mcu.Pin65=PB13 -PF8.GPIO_Label=BLE_SPI_MISO -PD10.Signal=FMC_D15_DA15 -PB8.GPIO_Label=SENSOR_IMU_TH_I2C_SCL -PJ3.Signal=GPIO_Output -PA15.Locked=true -PA8.GPIO_Label=SOUND_ENABLE -Mcu.Pin59=PH7 -SH.FMC_D29.0=FMC_D29 -Mcu.Pin57=PJ5 -Mcu.Pin58=PH6 -PH11.GPIOParameters=GPIO_Label -Mcu.Pin51=PE10 -Mcu.Pin52=PE11 -Mcu.Pin50=PE9 -RCC.PLLDSIVCOFreq_Value=1000000000 -Mcu.Pin55=PE14 -Mcu.Pin56=PE15 -Mcu.Pin53=PE12 -PE8.GPIO_Label=FMC_SRAM_D5 -Mcu.Pin54=PE13 -PH11.GPIO_Label=FMC_SRAM_D15 -PB9.Locked=true -PI12.Locked=true -Mcu.Pin48=PE7 -PI3.GPIOParameters=GPIO_Label -Mcu.Pin49=PE8 -Mcu.Pin46=PG0 -PH13.GPIOParameters=GPIO_Label -Mcu.Pin47=PG1 -PF3.GPIOParameters=GPIO_Label -PB14.Signal=GPIO_Analog -Mcu.Pin40=PJ4 -PA5.Signal=SPI1_SCK -Mcu.Pin41=PF11 -PE13.GPIOParameters=GPIO_Label -Mcu.Pin44=PF14 -Mcu.Pin45=PF15 -Mcu.Pin42=PF12 -Mcu.Pin43=PF13 -PJ4.GPIO_Label=QSPI_FLASH_CS_3 -PE1.GPIO_Label=FMC_SRAM_NBL1 -PI7.Signal=FMC_D29 -SH.FMC_A6.0=FMC_A6 -PE14.Signal=FMC_D11_DA11 -Mcu.Pin37=PJ1 -Mcu.Pin38=PJ2 -Mcu.Pin35=PB2 -PB15.GPIO_Label=LED_EARS_SPI_MOSI -Mcu.Pin36=PJ0 -RCC.PLLI2SPCLKFreq_Value=96000000 -SH.FMC_D14_DA14.ConfNb=1 -Mcu.Pin39=PJ3 -PG7.GPIO_Label=BT_WAKE_UP -PI2.Signal=FMC_D26 -PF4.GPIO_Label=FMC_SRAM_A4 -Mcu.Pin30=PA5 -PA1.GPIO_Label=MOTOR_LEFT_PWM -Mcu.Pin33=PC4 -Mcu.Pin34=PB1 -DSIHOST_CKN.GPIOParameters=GPIO_Label -Mcu.Pin31=PA6 -Mcu.Pin32=PA7 -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PF13.Signal=FMC_A7 -PC10.GPIOParameters=GPIO_Label -PJ15.GPIO_Label=MIPI_DSI_RESET -SH.FMC_NBL2.0=FMC_NBL2 -PC9.GPIOParameters=GPIO_Label -PF9.GPIOParameters=GPIO_Label -RCC.PLLI2SQCLKFreq_Value=96000000 -PI9.GPIOParameters=GPIO_Label -Mcu.Pin26=PH3 -SH.FMC_D18.0=FMC_D18 -Mcu.Pin27=PH5 -Mcu.Pin24=PA2 -SH.FMC_D21.ConfNb=1 -Mcu.Pin25=PH2 -Mcu.Pin28=PA3 -PC7.GPIO_Label=BT_UART_RX -Mcu.Pin29=PA4 -PD14.GPIOParameters=GPIO_Label -Mcu.Pin22=PA0/WKUP -Mcu.Pin23=PA1 -Mcu.Pin20=PH0/OSC_IN -ADC1.master=1 -Mcu.Pin21=PH1/OSC_OUT -PA3.Locked=true -PJ0.GPIOParameters=GPIO_Label -PD10.Locked=true -PA5.GPIO_Label=SD_SPI_SCK -PA10.Locked=true -NVIC.ForceEnableDMAVector=true -PA14.GPIOParameters=GPIO_Label -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PE5.GPIO_Label=MOTOR_RIGHT_ENABLE -PC12.GPIO_Label=WIFI_ENABLE -PD15.Locked=true -PJ0.GPIO_Label=SYS_POWER_CHECKUP_3V3 -SH.FMC_SDNRAS.ConfNb=1 -ProjectManager.HeapSize=0x200 -Mcu.Pin15=PF6 -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -Mcu.Pin16=PF7 -DSIHOST_CKP.GPIO_Label=MIPI_DSI_CKP -Mcu.Pin13=PF4 -Mcu.Pin14=PF5 -PH6.Signal=GPIO_Output -PF10.GPIOParameters=GPIO_Label -Mcu.Pin19=PF10 -SH.GPXTI15.ConfNb=1 -Mcu.Pin17=PF8 -Mcu.Pin18=PF9 -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -Mcu.Pin11=PI13 -PF0.GPIO_Label=FMC_SRAM_A0 -Mcu.Pin12=PF3 -PG0.GPIOParameters=GPIO_Label -PD0.GPIOParameters=GPIO_Label -Mcu.Pin10=PI12 -SH.GPXTI10.ConfNb=1 -PI11.GPIO_Label=BLE_IRQ -PE3.Signal=GPIO_Output -PF4.Signal=FMC_A4 -DSIHOST_D0P.GPIO_Label=MIPI_DSI_D0P -SH.FMC_D26.ConfNb=1 -RCC.SDMMC2Freq_Value=16000000 -PI1.GPIO_Label=FMC_SRAM_D25 -PG15.Locked=true -Mcu.Family=STM32F7 -ProjectManager.MainLocation=Src -SH.FMC_A6.ConfNb=1 -SH.FMC_A8.0=FMC_A8 -PG9.GPIOParameters=GPIO_Label -ProjectManager.KeepUserCode=true -PH14.Signal=FMC_D22 -PH10.Signal=FMC_D18 -SH.FMC_D14_DA14.0=FMC_D14 -PE11.GPIO_Label=FMC_SRAM_D8 -PF0.GPIOParameters=GPIO_Label -PA12.GPIOParameters=GPIO_Label -PA9.GPIOParameters=GPIO_Label -PA11.GPIOParameters=GPIO_Label -PD0.GPIO_Label=FMC_SRAM_D2 -PH10.Locked=true -SH.FMC_A14_BA0.0=FMC_BA0 -SH.FMC_A11.0=FMC_A11 -PB13.GPIO_Label=LED_EARS_SPI_SCK -PG5.GPIO_Label=FMC_SRAM_BA1 -PB15.Signal=SPI2_MOSI -PF12.GPIOParameters=GPIO_Label -PH5.GPIOParameters=GPIO_Label -PJ5.GPIO_Label=SCREEN_PWM -PG15.Signal=FMC_SDNCAS -PB5.GPIOParameters=GPIO_Label -PD13.Signal=QUADSPI_BK1_IO3 -Mcu.IP4=RCC -Mcu.IP5=SYS -PD13.Locked=true -Mcu.IP2=DAC -Mcu.IP3=NVIC -PA15.GPIO_Label=SENSOR_MAGNETO_IRQ -Mcu.IP0=ADC1 -Mcu.IP1=CORTEX_M7 -PE4.GPIOParameters=GPIO_Label -PJ2.Signal=DSIHOST_TE -PF9.Locked=true -PH3.Locked=true -PF1.GPIOParameters=GPIO_Label -RCC.SDMMCFreq_Value=16000000 -Mcu.Pin130=PI7 -Mcu.Pin131=VP_SYS_VS_Systick -ProjectManager.PreviousToolchain= -PF1.Locked=true -PG8.GPIOParameters=GPIO_Label -SH.FMC_NBL1.0=FMC_NBL1 -PA8.GPIOParameters=GPIO_Label -ADC1.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_9 -RCC.HSE_VALUE=25000000 -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -SH.FMC_A14_BA0.ConfNb=1 -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -PH1/OSC_OUT.GPIO_Label=MOTOR_LEFT_ENABLE -PI4.Locked=true -RCC.VCOInputFreq_Value=1000000 -PH7.GPIO_Label=SENSOR_PROXIMITY_MUX_I2C_SCL -PE8.Locked=true -PF11.Signal=FMC_SDNRAS -DSIHOST_D1P.Signal=DSIHOST_D1P -PE3.GPIOParameters=GPIO_Label -PE3.Locked=true -PB7.Signal=I2C4_SDA -PH6.GPIOParameters=GPIO_Label -PF11.GPIOParameters=GPIO_Label -SH.FMC_D27.ConfNb=1 -PB6.GPIOParameters=GPIO_Label -SH.FMC_D16.ConfNb=1 -PA13.GPIOParameters=GPIO_Label -PB7.GPIO_Label=BATTERY_BMS_I2C_SDA -PD13.GPIO_Label=QSPI_FLASH_IO3 -PA6.Signal=SPI1_MISO -SH.FMC_D4_DA4.ConfNb=1 -PD5.GPIO_Label=WIFI_USART_TX -ProjectManager.ToolChainLocation= -RCC.DSIFreq_Value=62500000 -PA15.Signal=GPXTI15 -PF8.Signal=SPI5_MISO -PG0.GPIO_Label=FMC_SRAM_A10 -SH.FMC_D30.ConfNb=1 -PI0.GPIO_Label=FMC_SRAM_D24 -Mcu.Pin95=PA12 -Mcu.Pin96=PA13 -PF4.Locked=true -Mcu.Pin93=PA10 -Mcu.Pin94=PA11 -Mcu.Pin99=PH15 -PB5.GPIO_Label=SENSOR_TEMPERATURE_IRQ -Mcu.Pin97=PH13 -Mcu.Pin98=PH14 -DSIHOST_CKN.Signal=DSIHOST_CKN -Mcu.Pin91=PA8 -Mcu.Pin92=PA9 -Mcu.Pin90=PC9 -PD3.GPIO_Label=WIFI_USART_CTS -PE7.Signal=FMC_D4_DA4 -PF3.GPIO_Label=FMC_SRAM_A3 -SH.FMC_D22.ConfNb=1 -PF15.GPIOParameters=GPIO_Label -PE2.GPIO_Label=QSPI_FLASH_IO2 -PE12.Locked=true -Mcu.Pin84=PG6 -Mcu.Pin85=PG7 -Mcu.Pin82=PG4 -PB15.Locked=true -Mcu.Pin83=PG5 -PA3.Signal=USART2_RX -Mcu.Pin88=PC7 -Mcu.Pin89=PC8 -Mcu.Pin86=PG8 -Mcu.Pin87=PC6 -SH.FMC_A3.ConfNb=1 -RCC.I2SFreq_Value=96000000 -SH.FMC_D20.0=FMC_D20 -PH8.GPIOParameters=GPIO_Label -PH15.Locked=true -PD15.GPIO_Label=FMC_SRAM_D1 -PG7.Locked=true -PB8.GPIOParameters=GPIO_Label -PG7.Signal=GPIO_Output -PE14.GPIOParameters=GPIO_Label -PH12.GPIO_Label=FMC_SRAM_D16 -PC9.GPIO_Label=SENSOR_PROXIMITY_MUX_I2C_SDA -PC8.Signal=GPIO_Output -SH.FMC_D31.0=FMC_D31 -ProjectManager.DefaultFWLocation=true -PE14.GPIO_Label=FMC_SRAM_D11 -PD9.Signal=FMC_D14_DA14 -ProjectManager.DeletePrevious=true -DSIHOST_CKP.GPIOParameters=GPIO_Label -PA12.GPIO_Label=RFID_UART_TX -RCC.FamilyName=M -DSIHOST_CKN.Locked=true -PE15.GPIOParameters=GPIO_Label -PD8.GPIO_Label=FMC_SRAM_D13 -PB9.GPIOParameters=GPIO_Label -SH.GPXTI6.0=GPIO_EXTI6 -PG8.GPIO_Label=FMC_SRAM_SDCLK -PA13.Signal=SYS_JTMS-SWDIO -SH.FMC_A15_BA1.ConfNb=1 -PJ5.Locked=true -PH7.GPIOParameters=GPIO_Label -PF6.Signal=SPI5_NSS -PH8.Locked=true -PF6.Locked=true -SH.FMC_D13_DA13.0=FMC_D13 -PH8.Signal=FMC_D16 -PB7.GPIOParameters=GPIO_Label -PE2.GPIOParameters=GPIO_Label -PG10.GPIOParameters=GPIO_Label -PE0.Locked=true -RCC.USBFreq_Value=96000000 -PF9.GPIO_Label=BLE_SPI_MOSI -PI5.GPIOParameters=GPIO_Label -PD10.GPIO_Label=FMC_SRAM_D15 -SH.FMC_D24.ConfNb=1 -PA1.Signal=GPIO_Analog -RCC.VCOI2SOutputFreq_Value=192000000 -PH9.GPIOParameters=GPIO_Label -DSIHOST_CKP.Signal=DSIHOST_CKP -RCC.PLLSAIPCLKFreq_Value=96000000 -board=custom -RCC.VCOOutputFreq_Value=192000000 -PF14.GPIOParameters=GPIO_Label -PI9.Signal=FMC_D30 -PI9.Locked=true -PI13.GPIO_Label=SENSOR_PROXIMITY_MUX_IRQA -SH.FMC_D22.0=FMC_D22 -MxCube.Version=5.6.1 -DSIHOST_D1N.Locked=true -PJ4.GPIOParameters=GPIO_Label -PI4.Signal=FMC_NBL2 -PA10.GPIOParameters=GPIO_Label -PD4.GPIOParameters=GPIO_Label -VP_SYS_VS_Systick.Mode=SysTick -SH.FMC_D12_DA12.0=FMC_D12 -PF15.GPIO_Label=FMC_SRAM_A9 -SH.FMC_D29.ConfNb=1 -PF14.Locked=true -PE5.Locked=true -SH.FMC_D18.ConfNb=1 -PF1.Signal=FMC_A1 -SH.FMC_D11_DA11.ConfNb=1 -RCC.IPParameters=CECFreq_Value,DFSDMFreq_Value,DSIFreq_Value,DSITXEscFreq_Value,FamilyName,HSE_VALUE,HSI_VALUE,I2SFreq_Value,LCDTFTFreq_Value,LSE_VALUE,LSI_VALUE,PLLCLKFreq_Value,PLLDSIVCOFreq_Value,PLLI2SPCLKFreq_Value,PLLI2SQCLKFreq_Value,PLLI2SRCLKFreq_Value,PLLQCLKFreq_Value,PLLSAIPCLKFreq_Value,PLLSAIQCLKFreq_Value,PLLSAIRCLKFreq_Value,PLLSAIoutputFreq_Value,RNGFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMC2Freq_Value,SDMMCFreq_Value,SPDIFRXFreq_Value,USBFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAIOutputFreq_Value -PJ0.Signal=GPIO_Input -ProjectManager.AskForMigrate=true -PE0.Signal=FMC_NBL0 -PE7.GPIO_Label=FMC_SRAM_D4 -PE12.Signal=FMC_D9_DA9 -PB2.Locked=true -ProjectManager.CoupleFile=false -DSIHOST_CKN.GPIO_Label=MIPI_DSI_CKN -PA1.Locked=true -KeepUserPlacement=false -PJ5.Signal=GPIO_Analog -PA13.Locked=true -SH.GPXTI9.ConfNb=1 -PB2.GPIO_Label=QSPI_FLASH_CLK -PF13.GPIOParameters=GPIO_Label -PC6.GPIOParameters=GPIO_Label -RCC.HSI_VALUE=16000000 -PH0/OSC_IN.GPIO_Label=MOTOR_LEFT_DIRECTION -PI6.GPIOParameters=GPIO_Label -PH3.Signal=FMC_SDNE0 -PI3.GPIO_Label=FMC_SRAM_D27 -SH.GPXTI15.0=GPIO_EXTI15 -PB7.Locked=true -PC8.Locked=true -SH.FMC_D8_DA8.ConfNb=1 -PD9.Locked=true -PJ2.GPIO_Label=MIPI_DSI_TE -PE1.GPIOParameters=GPIO_Label -PA3.GPIO_Label=WIFI_USART_RX -PA6.Locked=true -SH.FMC_D7_DA7.0=FMC_D7 -DSIHOST_D0N.GPIOParameters=GPIO_Label -SH.FMC_D24.0=FMC_D24 -SH.FMC_A4.ConfNb=1 -PH12.Signal=FMC_D20 -PH12.Locked=true -PC12.Locked=true -SH.GPXTI9.0=GPIO_EXTI9 -PG4.Signal=FMC_A14_BA0 -PG4.Locked=true -RCC.PLLCLKFreq_Value=96000000 -PC12.Signal=GPIO_Output -PB14.GPIO_Label=SCREEN_BACKLIGHT_PWM -PH6.GPIO_Label=QSPI_FLASH_CS_2 -PA14.GPIO_Label=SYS_PROG_SWCLK -PD3.GPIOParameters=GPIO_Label -PJ3.GPIOParameters=GPIO_Label -PC6.GPIO_Label=BT_UART_TX -PI11.Locked=true -PA3.GPIOParameters=GPIO_Label -PA6.GPIO_Label=SD_SPI_MISO -PB6.GPIO_Label=BATTERY_BMS_I2C_SCL -PI6.GPIO_Label=FMC_SRAM_D28 -PD4.Locked=true -PB13.Signal=SPI2_SCK -PG13.Signal=SPI6_SCK -PinOutPanel.RotationAngle=0 -PF6.GPIO_Label=BLE_SPI_NSS -SH.GPXTI13.0=GPIO_EXTI13 -SH.FMC_A15_BA1.0=FMC_BA1 -PH5.Signal=FMC_SDNWE -PD15.GPIOParameters=GPIO_Label -RCC.LCDTFTFreq_Value=48000000 -PD4.Signal=USART2_RTS -SH.FMC_D10_DA10.ConfNb=1 -PH1/OSC_OUT.Signal=GPIO_Output -SH.FMC_D17.ConfNb=1 -RCC.SAI2Freq_Value=96000000 -PE5.Signal=GPIO_Output -PE10.Locked=true -PF10.GPIO_Label=MCU_MIC_INPUT -PB13.Locked=true -PH10.GPIO_Label=FMC_SRAM_D14 -PG13.Locked=true -PB2.Signal=QUADSPI_CLK -PA4.Locked=true -PD1.GPIOParameters=GPIO_Label -PH0/OSC_IN.Locked=true -PG1.GPIOParameters=GPIO_Label -MxDb.Version=DB.5.0.60 -PE15.Locked=true -PE0.GPIOParameters=GPIO_Label -PA1.GPIOParameters=GPIO_Label -SH.FMC_D26.0=FMC_D26 -PJ1.GPIOParameters=GPIO_Label -PI6.Signal=FMC_D28 -PI3.Signal=FMC_D27 -PH1/OSC_OUT.Locked=true -SH.FMC_D15_DA15.ConfNb=1 -PE2.Signal=QUADSPI_BK1_IO2 -SH.GPXTI11.ConfNb=1 -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PF3.Signal=FMC_A3 -SH.FMC_D25.ConfNb=1 -PE10.Signal=FMC_D7_DA7 -ADC1.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_3CYCLES -PC8.GPIOParameters=GPIO_Label -PH10.GPIOParameters=GPIO_Label -PF8.GPIOParameters=GPIO_Label -SH.GPXTI11.0=GPIO_EXTI11 -PD11.Locked=true -PG13.GPIOParameters=GPIO_Label -PG5.GPIOParameters=GPIO_Label -PJ5.GPIOParameters=GPIO_Label -PE10.GPIOParameters=GPIO_Label -SH.COMP_DAC1_group.ConfNb=1 -PA14.Locked=true -PD5.GPIOParameters=GPIO_Label -DSIHOST_D1N.GPIO_Label=MIPI_DSI_D1N -PJ4.Signal=GPIO_Output -RCC.DFSDMFreq_Value=16000000 -PA5.GPIOParameters=GPIO_Label -SH.ADCx_IN9.0=ADC1_IN9,IN9 -PB14.GPIOParameters=GPIO_Label -SH.FMC_A1.0=FMC_A1 -PH2.Signal=FMC_SDCKE0 -SH.FMC_SDCLK.0=FMC_SDCLK -RCC.CECFreq_Value=32786.88524590164 -PF14.Signal=FMC_A8 -PI4.GPIOParameters=GPIO_Label -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -SH.ADCx_IN9.ConfNb=1 -PI11.Signal=GPXTI11 -PE10.GPIO_Label=FMC_SRAM_D7 -SH.FMC_D3_DA3.0=FMC_D3 -ProjectManager.CustomerFirmwarePackage= -PC4.GPIOParameters=GPIO_Label -PF4.GPIOParameters=GPIO_Label -PI10.GPIO_Label=FMC_SRAM_D31 -PH12.GPIOParameters=GPIO_Label -PA0/WKUP.GPIOParameters=GPIO_Label -SH.FMC_A7.ConfNb=1 -PH15.Signal=FMC_D23 -SH.FMC_A1.ConfNb=1 -PJ15.GPIOParameters=GPIO_Label -ADC1.Rank-0\#ChannelRegularConversion=1 -SH.FMC_D28.0=FMC_D28 -PD9.GPIO_Label=FMC_SRAM_D14 -PA15.GPIOParameters=GPIO_Label -ADC1.IPParameters=Rank-0\#ChannelRegularConversion,master,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,NbrOfConversionFlag -PG9.Locked=true -PG9.Signal=GPXTI9 -PA9.GPIO_Label=SYS_PROG_VCP_TX -PC6.Signal=USART6_TX -PD13.GPIOParameters=GPIO_Label -PD1.Signal=FMC_D3_DA3 -PA11.GPIO_Label=RFID_UART_RX -PF14.GPIO_Label=FMC_SRAM_A8 -PF13.GPIO_Label=FMC_SRAM_A7 -PG13.GPIO_Label=LED_BELT_SPI_SCK -DSIHOST_CKP.Locked=true -PG10.Signal=GPXTI10 -PG10.Locked=true -SH.FMC_A3.0=FMC_A3 -SH.GPXTI6.ConfNb=1 -PA11.Locked=true -SH.FMC_D31.ConfNb=1 -SH.FMC_D15_DA15.0=FMC_D15 -PC6.Locked=true -PA9.Signal=USART1_TX -PB5.Locked=true -PI1.Locked=true -PE9.GPIO_Label=FMC_SRAM_D6 -SH.FMC_D17.0=FMC_D17 -PH9.GPIO_Label=FMC_SRAM_D13 -PJ15.Signal=GPIO_Output -PI9.GPIO_Label=FMC_SRAM_D30 -ProjectManager.LastFirmware=true -Mcu.Pin116=PG13 -PI2.GPIOParameters=GPIO_Label -Mcu.Pin117=PG14 -PF2.GPIOParameters=GPIO_Label -Mcu.Pin118=PG15 -Mcu.Pin119=PB3 -PI6.Locked=true -SH.FMC_D20.ConfNb=1 -PE15.Signal=FMC_D12_DA12 -PE8.Signal=FMC_D5_DA5 -PI1.Signal=FMC_D25 -RCC.RNGFreq_Value=96000000 -Mcu.Pin112=PD5 -Mcu.Pin113=PJ15 -Mcu.Pin114=PG9 -PF11.Locked=true -PF12.Locked=true -DSIHOST_D1P.Locked=true -Mcu.Pin115=PG10 -PA0/WKUP.GPIO_Label=MCU_SYS_WAKE_UP -Mcu.Pin110=PD3 -Mcu.Pin111=PD4 -PA9.Locked=true -Mcu.Pin127=PI4 -Mcu.Pin128=PI5 -Mcu.Pin129=PI6 -PI0.Locked=true -PE7.Locked=true -SH.FMC_SDNCAS.0=FMC_SDNCAS -PG14.GPIO_Label=LED_BELT_SPI_MOSI -ProjectManager.FreePins=false -SH.FMC_NBL1.ConfNb=1 -PJ1.Locked=true -ProjectManager.UnderRoot=false -PE13.Locked=true -SH.FMC_D7_DA7.ConfNb=1 -PH14.GPIO_Label=FMC_SRAM_D22 -Mcu.Pin123=PB8 -PJ15.Locked=true -Mcu.Pin124=PB9 -PA4.Signal=COMP_DAC1_group -Mcu.Pin125=PE0 -Mcu.Pin126=PE1 -PB5.Signal=GPXTI5 -PG15.GPIOParameters=GPIO_Label -Mcu.Pin120=PB5 -Mcu.Pin121=PB6 -PE13.GPIO_Label=FMC_SRAM_D10 -Mcu.Pin122=PB7 -PD11.Signal=QUADSPI_BK1_IO0 -SH.FMC_A10.ConfNb=1 -ProjectManager.CompilerOptimize=6 -SH.FMC_A5.0=FMC_A5 -PA11.Signal=UART4_RX -PH5.Locked=true -PF8.Locked=true -ProjectManager.ComputerToolchain=false -PF9.Signal=SPI5_MOSI -Mcu.Pin109=PD1 -PE2.Locked=true -PF3.Locked=true -Mcu.Pin105=PA15 -Mcu.Pin106=PC10 -Mcu.Pin107=PC12 -Mcu.Pin108=PD0 -PE12.GPIOParameters=GPIO_Label -SH.FMC_NBL3.0=FMC_NBL3 -SH.FMC_D12_DA12.ConfNb=1 -PD1.Locked=true -SH.FMC_D19.0=FMC_D19 -PA7.GPIOParameters=GPIO_Label -PH2.GPIO_Label=FMC_SRAM_SDCKE0 -PG7.GPIOParameters=GPIO_Label -PG10.GPIO_Label=SENSOR_PROXIMITY_MUX_IRQB -Mcu.Pin101=PI1 -Mcu.Pin102=PI2 -Mcu.Pin103=PI3 -PH0/OSC_IN.GPIOParameters=GPIO_Label -Mcu.Pin104=PA14 -Mcu.Pin100=PI0 -RCC.SAI1Freq_Value=96000000 -SH.FMC_A2.ConfNb=1 -PG6.Signal=GPXTI6 -PH14.Locked=true -PI10.GPIOParameters=GPIO_Label -Mcu.UserName=STM32F769BITx -PD9.GPIOParameters=GPIO_Label -DSIHOST_D1P.GPIOParameters=GPIO_Label -PC10.Locked=true -PG6.Locked=true -PC10.Signal=QUADSPI_BK1_IO1 -SH.FMC_NBL0.0=FMC_NBL0 -PI13.Locked=true -ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true -SH.FMC_D6_DA6.0=FMC_D6 -PA0/WKUP.Signal=SYS_WKUP1 -PC9.Locked=true -RCC.PLLI2SRCLKFreq_Value=96000000 -PH5.GPIO_Label=FMC_SRAM_SDNWE -PI5.GPIO_Label=FMC_SRAM_NBL3 -PI0.GPIOParameters=GPIO_Label -PE5.GPIOParameters=GPIO_Label -ProjectManager.StackSize=0x400 -PI11.GPIOParameters=GPIO_Label -SH.FMC_A7.0=FMC_A7 -PA12.Locked=true -PA12.Signal=UART4_TX -Mcu.UserConstants= -PH7.Locked=true -PI1.GPIOParameters=GPIO_Label -PF5.Locked=true -SH.GPXTI13.ConfNb=1 -Mcu.ThirdPartyNb=0 -PD11.GPIO_Label=QSPI_FLASH_IO0 -Mcu.IPNb=6 -RCC.SPDIFRXFreq_Value=96000000 -PF11.GPIO_Label=FMC_SRAM_SDNRAS -PA0/WKUP.Locked=true -PF12.Signal=FMC_A6 -PD8.GPIOParameters=GPIO_Label -Mcu.Pin6=PI11 -PH15.GPIOParameters=GPIO_Label -Mcu.Pin7=PF0 -Mcu.Pin8=PF1 -Mcu.Pin9=PF2 -RCC.VCOSAIOutputFreq_Value=192000000 -PI13.Signal=GPXTI13 -PJ2.Locked=true -SH.FMC_A10.0=FMC_A10 -Mcu.Pin0=PE2 -Mcu.Pin1=PE3 -GPIO.groupedBy=Group By Peripherals -Mcu.Pin2=PE4 -Mcu.Pin3=PE5 -Mcu.Pin4=PI9 -PD10.GPIOParameters=GPIO_Label -Mcu.Pin5=PI10 -SH.FMC_D8_DA8.0=FMC_D8 -SH.FMC_D2_DA2.0=FMC_D2 -PE13.Signal=FMC_D10_DA10 -PF7.GPIO_Label=BLE_SPI_SCK -PI5.Locked=true -PI5.Signal=FMC_NBL3 -PI0.Signal=FMC_D24 -File.Version=6 -PA10.GPIO_Label=SYS_PROG_VCP_RX -SH.FMC_D5_DA5.ConfNb=1 -PB3.GPIOParameters=GPIO_Label -PH3.GPIOParameters=GPIO_Label -SH.FMC_D2_DA2.ConfNb=1 -PB8.Locked=true -SH.FMC_SDNRAS.0=FMC_SDNRAS -PE4.Signal=GPIO_Output -PI12.GPIOParameters=GPIO_Label -ProjectManager.ProjectName=Leka-MCU_Pins-v1.0.0 -DSIHOST_D1N.GPIOParameters=GPIO_Label -PA7.Locked=true -SH.FMC_D0_DA0.0=FMC_D0 -PA2.GPIO_Label=MOTOR_RIGHT_PWM -PD14.Locked=true -RCC.LSI_VALUE=32000 -PF5.GPIO_Label=FMC_SRAM_A5 -SH.GPXTI5.ConfNb=1 -SH.FMC_A9.0=FMC_A9 -PJ1.Signal=GPIO_Input -SH.FMC_D4_DA4.0=FMC_D4 -DSIHOST_D0N.Locked=true -PI12.GPIO_Label=SENSOR_PROXIMITY_MUX_RESET -PE0.GPIO_Label=FMC_SRAM_NBL0 -PF5.Signal=FMC_A5 -PH3.GPIO_Label=FMC_SRAM_SDNE0 -PH7.Signal=I2C3_SCL -PJ3.GPIO_Label=WIFI_RESET -SH.FMC_D19.ConfNb=1 -PC4.Locked=true -SH.FMC_D30.0=FMC_D30 -PF0.Signal=FMC_A0 -PI2.GPIO_Label=FMC_SRAM_D26 -SH.FMC_NBL0.ConfNb=1 -PB3.Locked=true -PH14.GPIOParameters=GPIO_Label -PA2.Locked=true -PB3.GPIO_Label=SYS_PROG_SWO -SH.COMP_DAC1_group.0=DAC_OUT1,DAC_OUT1 -SH.GPXTI5.0=GPIO_EXTI5 -PE8.GPIOParameters=GPIO_Label -SH.FMC_A9.ConfNb=1 -PB9.GPIO_Label=SENSOR_IMU_TH_I2C_SCL -PC10.GPIO_Label=QSPI_FLASH_IO1 -PH11.Signal=FMC_D19 -ProjectManager.NoMain=false -PG1.Signal=FMC_A11 -PG1.Locked=true -SH.FMC_SDCLK.ConfNb=1 -PC4.Signal=GPIO_Output -PI10.Signal=FMC_D31 -PD5.Signal=USART2_TX -PI13.GPIOParameters=GPIO_Label -PE9.GPIOParameters=GPIO_Label -PD12.Locked=true -RCC.DSITXEscFreq_Value=15625000 -PH13.GPIO_Label=FMC_SRAM_D21 -PC8.GPIO_Label=BT_RESET -PC12.GPIOParameters=GPIO_Label -SH.FMC_D21.0=FMC_D21 -PH8.GPIO_Label=FMC_SRAM_D12 -SH.FMC_NBL3.ConfNb=1 -PE15.GPIO_Label=FMC_SRAM_D12 -PD12.GPIOParameters=GPIO_Label -ProjectManager.TargetToolchain=Makefile -PE7.GPIOParameters=GPIO_Label -SH.FMC_D1_DA1.ConfNb=1 -PF15.Locked=true -PB2.GPIOParameters=GPIO_Label -PE4.Locked=true -PF2.Signal=FMC_A2 -PF5.GPIOParameters=GPIO_Label -PH2.GPIOParameters=GPIO_Label -PH11.Locked=true -SH.FMC_D28.ConfNb=1 -RCC.PLLSAIoutputFreq_Value=96000000 -PE11.Signal=FMC_D8_DA8 -DSIHOST_D0P.GPIOParameters=GPIO_Label -RCC.LSE_VALUE=32768 -PD3.Locked=true -PB1.Locked=true -PG9.GPIO_Label=SENSOR_IMU_IRQ -PG14.Signal=SPI6_MOSI -PG1.GPIO_Label=FMC_SRAM_A11 -PD11.GPIOParameters=GPIO_Label -PH0/OSC_IN.Signal=GPIO_Output -SH.FMC_D13_DA13.ConfNb=1 -PG4.GPIOParameters=GPIO_Label -PI3.Locked=true -PD4.GPIO_Label=WIFI_USART_RTS -PF10.Signal=GPIO_Input -PI7.GPIO_Label=FMC_SRAM_D29 -PF15.Signal=FMC_A9 -PD14.GPIO_Label=FMC_SRAM_D0 -PA4.GPIOParameters=GPIO_Label -PF0.Locked=true -PB15.GPIOParameters=GPIO_Label -PE11.Locked=true -Mcu.Name=STM32F769B(G-I)Tx -PA2.Signal=GPIO_Analog -DSIHOST_D0N.GPIO_Label=MIPI_DSI_D0N -PA13.GPIO_Label=SYS_PROG_SWDIO -SH.FMC_D23.ConfNb=1 -PD14.Signal=FMC_D0_DA0 -PB3.Signal=SYS_JTDO-SWO -PA7.GPIO_Label=SD_SPI_MOSI -SH.FMC_D23.0=FMC_D23 -PJ4.Locked=true -PA14.Signal=SYS_JTCK-SWCLK -DSIHOST_D0N.Signal=DSIHOST_D0N -PF6.GPIOParameters=GPIO_Label -PH2.Locked=true -ADC1.NbrOfConversionFlag=1 -PB8.Signal=I2C1_SCL -PE3.GPIO_Label=BLE_RESET -PC9.Signal=I2C3_SDA -ProjectManager.DeviceId=STM32F769BITx -ProjectManager.LibraryCopy=0 -PB1.GPIOParameters=GPIO_Label -PA7.Signal=SPI1_MOSI -PF2.GPIO_Label=FMC_SRAM_A2 diff --git a/targets/TARGET_LEKA_V1_0_DEV/pins/Leka-MCU_Pins-v1.0.0.reference.csv b/targets/TARGET_LEKA_V1_0_DEV/pins/Leka-MCU_Pins-v1.0.0.reference.csv deleted file mode 100644 index ccff79fb00..0000000000 --- a/targets/TARGET_LEKA_V1_0_DEV/pins/Leka-MCU_Pins-v1.0.0.reference.csv +++ /dev/null @@ -1,209 +0,0 @@ -Position,Name,Type,Signal,Label -1,PE2,,QUADSPI_BK1_IO2,QSPI_FLASH_IO2 -2,PE3,,GPIO_Output,BLE_RESET -3,PE4,,GPIO_Output,MOTOR_RIGHT_DIRECTION -4,PE5,,GPIO_Output,MOTOR_RIGHT_ENABLE -5,PE6,,Reset_State, -6,VBAT,,Power, -7,PI8,,Reset_State, -8,PC13,,Reset_State, -9,PC14/OSC32_IN,,Reset_State, -10,PC15/OSC32_OUT,,Reset_State, -11,PI9,,FMC_D30,FMC_SRAM_D30 -12,PI10,,FMC_D31,FMC_SRAM_D31 -13,PI11,,GPIO_EXTI11,BLE_IRQ -14,VSS,,Power, -15,VDD,,Power, -16,PF0,,FMC_A0,FMC_SRAM_A0 -17,PF1,,FMC_A1,FMC_SRAM_A1 -18,PF2,,FMC_A2,FMC_SRAM_A2 -19,PI12,,GPIO_Output,SENSOR_PROXIMITY_MUX_RESET -20,PI13,,GPIO_EXTI13,SENSOR_PROXIMITY_MUX_IRQA -21,PI14,,Reset_State, -22,PF3,,FMC_A3,FMC_SRAM_A3 -23,PF4,,FMC_A4,FMC_SRAM_A4 -24,PF5,,FMC_A5,FMC_SRAM_A5 -25,VSS,,Power, -26,VDD,,Power, -27,PF6,,SPI5_NSS,BLE_SPI_NSS -28,PF7,,SPI5_SCK,BLE_SPI_SCK -29,PF8,,SPI5_MISO,BLE_SPI_MISO -30,PF9,,SPI5_MOSI,BLE_SPI_MOSI -31,PF10,,GPIO_Input,MCU_MIC_INPUT -32,PH0/OSC_IN,,GPIO_Output,MOTOR_LEFT_DIRECTION -33,PH1/OSC_OUT,,GPIO_Output,MOTOR_LEFT_ENABLE -34,NRST,,Reset_State, -35,PC0,,Reset_State, -36,PC1,,Reset_State, -37,PC2,,Reset_State, -38,PC3,,Reset_State, -39,VDD,,Power, -40,VSSA,,Power, -41,VREF+,,Power, -42,VDDA,,Power, -43,PA0/WKUP,,SYS_WKUP1,MCU_SYS_WAKE_UP -44,PA1,,GPIO_Analog,MOTOR_LEFT_PWM -45,PA2,,GPIO_Analog,MOTOR_RIGHT_PWM -46,PH2,,FMC_SDCKE0,FMC_SRAM_SDCKE0 -47,PH3,,FMC_SDNE0,FMC_SRAM_SDNE0 -48,PH4,,Reset_State, -49,PH5,,FMC_SDNWE,FMC_SRAM_SDNWE -50,PA3,,USART2_RX,WIFI_USART_RX -51,VSS,,Power, -52,VDD,,Power, -53,PA4,,DAC_OUT1,MCU_SOUND_OUT -54,PA5,,SPI1_SCK,SD_SPI_SCK -55,PA6,,SPI1_MISO,SD_SPI_MISO -56,PA7,,SPI1_MOSI,SD_SPI_MOSI -57,PC4,,GPIO_Output,SD_SPI_CS -58,PC5,,Reset_State, -59,VDD,,Power, -60,VSS,,Power, -61,PB0,,Reset_State, -62,PB1,,ADC1_IN9,SENSOR_LIGHT_ADC_INPUT -63,PB2,,QUADSPI_CLK,QSPI_FLASH_CLK -64,PI15,,Reset_State, -65,PJ0,,GPIO_Input,SYS_POWER_CHECKUP_3V3 -66,PJ1,,GPIO_Input,SYS_POWER_CHECKUP_5V -67,PJ2,,DSIHOST_TE,MIPI_DSI_TE -68,PJ3,,GPIO_Output,WIFI_RESET -69,PJ4,,GPIO_Output,QSPI_FLASH_CS_3 -70,PF11,,FMC_SDNRAS,FMC_SRAM_SDNRAS -71,PF12,,FMC_A6,FMC_SRAM_A6 -72,VSS,,Power, -73,VDD,,Power, -74,PF13,,FMC_A7,FMC_SRAM_A7 -75,PF14,,FMC_A8,FMC_SRAM_A8 -76,PF15,,FMC_A9,FMC_SRAM_A9 -77,PG0,,FMC_A10,FMC_SRAM_A10 -78,PG1,,FMC_A11,FMC_SRAM_A11 -79,PE7,,FMC_D4,FMC_SRAM_D4 -80,PE8,,FMC_D5,FMC_SRAM_D5 -81,PE9,,FMC_D6,FMC_SRAM_D6 -82,VSS,,Power, -83,VDD,,Power, -84,PE10,,FMC_D7,FMC_SRAM_D7 -85,PE11,,FMC_D8,FMC_SRAM_D8 -86,PE12,,FMC_D9,FMC_SRAM_D9 -87,PE13,,FMC_D10,FMC_SRAM_D10 -88,PE14,,FMC_D11,FMC_SRAM_D11 -89,PE15,,FMC_D12,FMC_SRAM_D12 -90,PB10,,Reset_State,SCREEN_I2C_SCL -91,PB11,,Reset_State,SCREEN_I2C_SDA -92,VCAP_1,,Power, -93,VSS,,Power, -94,VDD,,Power, -95,PJ5,,GPIO_Analog,SCREEN_PWM -96,PH6,,GPIO_Output,QSPI_FLASH_CS_2 -97,PH7,,I2C3_SCL,SENSOR_PROXIMITY_MUX_I2C_SCL -98,PH8,,FMC_D16,FMC_SRAM_D12 -99,PH9,,FMC_D17,FMC_SRAM_D13 -100,PH10,,FMC_D18,FMC_SRAM_D14 -101,PH11,,FMC_D19,FMC_SRAM_D15 -102,PH12,,FMC_D20,FMC_SRAM_D16 -103,VDD,,Power, -104,PB12,,Reset_State, -105,PB13,,SPI2_SCK,LED_EARS_SPI_SCK -106,PB14,,GPIO_Analog,SCREEN_BACKLIGHT_PWM -107,PB15,,SPI2_MOSI,LED_EARS_SPI_MOSI -108,PD8,,FMC_D13,FMC_SRAM_D13 -109,PD9,,FMC_D14,FMC_SRAM_D14 -110,PD10,,FMC_D15,FMC_SRAM_D15 -111,PD11,,QUADSPI_BK1_IO0,QSPI_FLASH_IO0 -112,PD12,,GPIO_Output,QSPI_FLASH_CS_1 -113,PD13,,QUADSPI_BK1_IO3,QSPI_FLASH_IO3 -114,VSS,,Power, -115,VDD,,Power, -116,PD14,,FMC_D0,FMC_SRAM_D0 -117,PD15,,FMC_D1,FMC_SRAM_D1 -118,VDDDSI,,Power, -119,VCAPDSI,,Power, -120,DSIHOST_D0P,,DSIHOST_D0P,MIPI_DSI_D0P -121,DSIHOST_D0N,,DSIHOST_D0N,MIPI_DSI_D0N -122,VSSDSI,,Power, -123,DSIHOST_CKP,,DSIHOST_CKP,MIPI_DSI_CKP -124,DSIHOST_CKN,,DSIHOST_CKN,MIPI_DSI_CKN -125,VDD12DSI,,Power, -126,DSIHOST_D1P,,DSIHOST_D1P,MIPI_DSI_D1P -127,DSIHOST_D1N,,DSIHOST_D1N,MIPI_DSI_D1N -128,VSSDSI,,Power, -129,PG2,,Reset_State, -130,PG3,,Reset_State,SCREEN_GPIO -131,PG4,,FMC_BA0,FMC_SRAM_BA0 -132,PG5,,FMC_BA1,FMC_SRAM_BA1 -133,PG6,,Reset_State,SCREEN_IRQ -134,PG7,,GPIO_Output,BT_WAKE_UP -135,PG8,,FMC_SDCLK,FMC_SRAM_SDCLK -136,VSS,,Power, -137,VDDUSB,,Power, -138,PC6,,USART6_TX,BT_UART_TX -139,PC7,,USART6_RX,BT_UART_RX -140,PC8,,GPIO_Output,BT_RESET -141,PC9,,I2C3_SDA,SENSOR_PROXIMITY_MUX_I2C_SDA -142,PA8,,GPIO_Output,SOUND_ENABLE -143,PA9,,USART1_TX,SYS_PROG_VCP_TX -144,PA10,,USART1_RX,SYS_PROG_VCP_RX -145,PA11,,UART4_RX,RFID_UART_RX -146,PA12,,UART4_TX,RFID_UART_TX -147,PA13,,SYS_JTMS-SWDIO,SYS_PROG_SWDIO -148,VCAP_2,,Power, -149,VSS,,Power, -150,VDD,,Power, -151,PH13,,FMC_D21,FMC_SRAM_D21 -152,PH14,,FMC_D22,FMC_SRAM_D22 -153,PH15,,FMC_D23,FMC_SRAM_D23 -154,PI0,,FMC_D24,FMC_SRAM_D24 -155,PI1,,FMC_D25,FMC_SRAM_D25 -156,PI2,,FMC_D26,FMC_SRAM_D26 -157,PI3,,FMC_D27,FMC_SRAM_D27 -158,VDD,,Power, -159,PA14,,SYS_JTCK-SWCLK,SYS_PROG_SWCLK -160,PA15,,GPIO_EXTI15,SENSOR_MAGNETO_IRQ -161,PC10,,QUADSPI_BK1_IO1,QSPI_FLASH_IO1 -162,PC11,,Reset_State, -163,PC12,,GPIO_Output,WIFI_ENABLE -164,PD0,,FMC_D2,FMC_SRAM_D2 -165,PD1,,FMC_D3,FMC_SRAM_D2 -166,PD2,,Reset_State, -167,PD3,,USART2_CTS,WIFI_USART_CTS -168,PD4,,USART2_RTS,WIFI_USART_RTS -169,PD5,,USART2_TX,WIFI_USART_TX -170,VSS,,Power, -171,VDDSDMMC,,Power, -172,PD6,,Reset_State, -173,PD7,,Reset_State, -174,PJ12,,Reset_State, -175,PJ13,,Reset_State, -176,PJ14,,Reset_State, -177,PJ15,,GPIO_Output,MIPI_DSI_RESET -178,PG9,,GPIO_EXTI9,SENSOR_IMU_IRQ -179,PG10,,GPIO_EXTI10,SENSOR_PROXIMITY_MUX_IRQB -180,PG11,,Reset_State, -181,PG12,,Reset_State, -182,PG13,,SPI6_SCK,LED_BELT_SPI_SCK -183,PG14,,SPI6_MOSI,LED_BELT_SPI_MOSI -184,VSS,,Power, -185,VDD,,Power, -186,PK3,,Reset_State, -187,PK4,,Reset_State, -188,PK5,,Reset_State, -189,PK6,,Reset_State, -190,PK7,,Reset_State, -191,PG15,,FMC_SDNCAS,FMC_SRAM_SDNCAS -192,PB3,,SYS_JTDO-SWO,SYS_PROG_SWO -193,PB4,,Reset_State, -194,PB5,,GPIO_EXTI5,SENSOR_TEMPERATURE_IRQ -195,PB6,,I2C4_SCL,BATTERY_BMS_I2C_SCL -196,PB7,,I2C4_SDA,BATTERY_BMS_I2C_SDA -197,BOOT0,,Reset_State, -198,PB8,,I2C1_SCL,SENSOR_IMU_TH_I2C_SCL -199,PB9,,I2C1_SDA,SENSOR_IMU_TH_I2C_SCL -200,PE0,,FMC_NBL0,FMC_SRAM_NBL0 -201,PE1,,FMC_NBL1,FMC_SRAM_NBL1 -202,VSS,,Power, -203,PDR_ON,,Reset_State, -204,VDD,,Power, -205,PI4,,FMC_NBL2,FMC_SRAM_NBL2 -206,PI5,,FMC_NBL3,FMC_SRAM_NBL3 -207,PI6,,FMC_D28,FMC_SRAM_D28 -208,PI7,,FMC_D29,FMC_SRAM_D29 diff --git a/targets/TARGET_LEKA_V1_0_DEV/system_clock.c b/targets/TARGET_LEKA_V1_0_DEV/system_clock.c deleted file mode 100644 index 8ec0545a73..0000000000 --- a/targets/TARGET_LEKA_V1_0_DEV/system_clock.c +++ /dev/null @@ -1,211 +0,0 @@ -/* mbed Microcontroller Library -* Copyright (c) 2006-2019 ARM Limited -* -* SPDX-License-Identifier: Apache-2.0 -* -* Licensed 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. -*/ - -/** - * This file configures the system clock as follows: - *-------------------------------------------------------------------- - * System clock source | 1- USE_PLL_HSE_EXTC (external 25 MHz clock) - * | 2- USE_PLL_HSE_XTAL (external 25 MHz xtal) - * | 3- USE_PLL_HSI (internal 16 MHz clock) - *-------------------------------------------------------------------- - * SYSCLK(MHz) | 216 - * AHBCLK (MHz) | 216 - * APB1CLK (MHz) | 54 - * APB2CLK (MHz) | 108 - * USB capable (48 MHz) | YES - *-------------------------------------------------------------------- -**/ - -#include "stm32f7xx.h" -#include "mbed_error.h" - -// clock source is selected with CLOCK_SOURCE in json config -#define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO) -#define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default) -#define USE_PLL_HSI 0x2 // Use HSI internal clock - -#if ( ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) || ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) ) -uint8_t SetSysClock_PLL_HSE(uint8_t bypass); -#endif /* ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) || ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) */ - -#if ((CLOCK_SOURCE) & USE_PLL_HSI) -uint8_t SetSysClock_PLL_HSI(void); -#endif /* ((CLOCK_SOURCE) & USE_PLL_HSI) */ - - -/** - * @brief Configures the System clock source, PLL Multiplier and Divider factors, - * AHB/APBx prescalers and Flash settings - * @note This function should be called only once the RCC clock configuration - * is reset to the default reset state (done in SystemInit() function). - * @param None - * @retval None - */ - -void SetSysClock(void) -{ -#if ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) - /* 1- Try to start with HSE and external clock */ - if (SetSysClock_PLL_HSE(1) == 0) -#endif - { -#if ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) - /* 2- If fail try to start with HSE and external xtal */ - if (SetSysClock_PLL_HSE(0) == 0) -#endif - { -#if ((CLOCK_SOURCE) & USE_PLL_HSI) - /* 3- If fail start with HSI clock */ - if (SetSysClock_PLL_HSI() == 0) -#endif - { - { - error("SetSysClock failed\n"); - } - } - } - } - - // Output clock on MCO2 pin(PC9) for debugging purpose - // Can be visualized on CN8 connector pin 4 - //HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_SYSCLK, RCC_MCODIV_4); // 216 MHz / 4 = 54 MHz -} - -#if ( ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) || ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) ) -/******************************************************************************/ -/* PLL (clocked by HSE) used as System clock source */ -/******************************************************************************/ -uint8_t SetSysClock_PLL_HSE(uint8_t bypass) -{ - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; - RCC_PeriphCLKInitTypeDef RCC_PeriphClkInitStruct; - - // Enable power clock - __PWR_CLK_ENABLE(); - __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); - - // Select HSI as system clock source to allow modification of the PLL configuration - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI; - HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0); - - // Enable HSE oscillator and activate PLL with HSE as source - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; - if (bypass == 0) { - RCC_OscInitStruct.HSEState = RCC_HSE_ON; /* External xtal on OSC_IN/OSC_OUT */ - } else { - RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; /* External clock on OSC_IN */ - } - // Warning: this configuration is for a 25 MHz xtal clock only - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; - RCC_OscInitStruct.PLL.PLLM = 25; // VCO input clock = 1 MHz (25 MHz / 25) - RCC_OscInitStruct.PLL.PLLN = 432; // VCO output clock = 432 MHz (1 MHz * 432) - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; // PLLCLK = 216 MHz (432 MHz / 2) - RCC_OscInitStruct.PLL.PLLQ = 9; // USB clock = 48 MHz (432 MHz / 9) --> OK for USB - RCC_OscInitStruct.PLL.PLLR = 2; - - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { - return 0; // FAIL - } - - // Activate the OverDrive to reach the 216 MHz Frequency - if (HAL_PWREx_EnableOverDrive() != HAL_OK) { - return 0; // FAIL - } - - /* Select PLLSAI output as USB clock source */ - RCC_PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48; - RCC_PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48SOURCE_PLLSAIP; - RCC_PeriphClkInitStruct.PLLSAI.PLLSAIN = 384; - RCC_PeriphClkInitStruct.PLLSAI.PLLSAIQ = 7; - RCC_PeriphClkInitStruct.PLLSAI.PLLSAIP = RCC_PLLSAIP_DIV8; - if (HAL_RCCEx_PeriphCLKConfig(&RCC_PeriphClkInitStruct) != HAL_OK) { - return 0; // FAIL - } - - // Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers - RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; // 216 MHz - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; // 216 MHz - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; // 54 MHz - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; // 108 MHz - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7) != HAL_OK) { - return 0; // FAIL - } - - return 1; // OK -} -#endif /* ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) || ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) */ - -#if ((CLOCK_SOURCE) & USE_PLL_HSI) -/******************************************************************************/ -/* PLL (clocked by HSI) used as System clock source */ -/******************************************************************************/ -uint8_t SetSysClock_PLL_HSI(void) -{ - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; - - // Enable power clock - __PWR_CLK_ENABLE(); - - // Select HSI as system clock source to allow modification of the PLL configuration - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI; - HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0); - - // Enable HSI oscillator and activate PLL with HSI as source - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSEState = RCC_HSE_OFF; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16) - RCC_OscInitStruct.PLL.PLLN = 432; // VCO output clock = 432 MHz (1 MHz * 432) - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; // PLLCLK = 216 MHz (432 MHz / 2) - RCC_OscInitStruct.PLL.PLLQ = 9; // USB clock = 48 MHz (432 MHz / 9) --> OK for USB - RCC_OscInitStruct.PLL.PLLR = 2; - - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { - return 0; // FAIL - } - - // Activate the OverDrive to reach the 216 MHz Frequency - if (HAL_PWREx_EnableOverDrive() != HAL_OK) { - return 0; // FAIL - } - - // Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers - RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; // 216 MHz - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; // 216 MHz - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; // 54 MHz - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; // 108 MHz - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7) != HAL_OK) { - return 0; // FAIL - } - - return 1; // OK - -} -#endif /* ((CLOCK_SOURCE) & USE_PLL_HSI) */ diff --git a/targets/TARGET_LEKA_V1_1_DEV/CMakeLists.txt b/targets/TARGET_LEKA_V1_1_DEV/CMakeLists.txt deleted file mode 100644 index a44fdc7edc..0000000000 --- a/targets/TARGET_LEKA_V1_1_DEV/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# Leka - LekaOS -# Copyright 2020 APF France handicap -# SPDX-License-Identifier: Apache-2.0 - -add_library(target_LEKA_V1_1_DEV STATIC) - -target_include_directories(target_LEKA_V1_1_DEV - PUBLIC - . -) - -target_sources(target_LEKA_V1_1_DEV - PRIVATE - PeripheralPins.c - system_clock.c -) - -target_link_libraries(target_LEKA_V1_1_DEV mbed-os) diff --git a/targets/TARGET_LEKA_V1_1_DEV/PeripheralNames.h b/targets/TARGET_LEKA_V1_1_DEV/PeripheralNames.h deleted file mode 100644 index 23cf005de7..0000000000 --- a/targets/TARGET_LEKA_V1_1_DEV/PeripheralNames.h +++ /dev/null @@ -1,120 +0,0 @@ -/* mbed Microcontroller Library - ******************************************************************************* - * Copyright (c) 2016, STMicroelectronics - * All rights reserved. - * - * 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. - ******************************************************************************* - */ -#ifndef MBED_PERIPHERALNAMES_H -#define MBED_PERIPHERALNAMES_H - -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum -{ - ADC_1 = (int)ADC1_BASE, - ADC_2 = (int)ADC2_BASE, - ADC_3 = (int)ADC3_BASE -} ADCName; - -typedef enum -{ - DAC_1 = DAC_BASE -} DACName; - -typedef enum -{ - UART_1 = (int)USART1_BASE, - UART_2 = (int)USART2_BASE, - UART_3 = (int)USART3_BASE, - UART_4 = (int)UART4_BASE, - UART_5 = (int)UART5_BASE, - UART_6 = (int)USART6_BASE, - UART_7 = (int)UART7_BASE, - UART_8 = (int)UART8_BASE -} UARTName; - -#define DEVICE_SPI_COUNT 6 -typedef enum -{ - SPI_1 = (int)SPI1_BASE, - SPI_2 = (int)SPI2_BASE, - SPI_3 = (int)SPI3_BASE, - SPI_4 = (int)SPI4_BASE, - SPI_5 = (int)SPI5_BASE, - SPI_6 = (int)SPI6_BASE -} SPIName; - -typedef enum -{ - I2C_1 = (int)I2C1_BASE, - I2C_2 = (int)I2C2_BASE, - I2C_3 = (int)I2C3_BASE, - I2C_4 = (int)I2C4_BASE -} I2CName; - -typedef enum -{ - PWM_1 = (int)TIM1_BASE, - PWM_2 = (int)TIM2_BASE, - PWM_3 = (int)TIM3_BASE, - PWM_4 = (int)TIM4_BASE, - PWM_5 = (int)TIM5_BASE, - PWM_8 = (int)TIM8_BASE, - PWM_9 = (int)TIM9_BASE, - PWM_10 = (int)TIM10_BASE, - PWM_11 = (int)TIM11_BASE, - PWM_12 = (int)TIM12_BASE, - PWM_13 = (int)TIM13_BASE, - PWM_14 = (int)TIM14_BASE -} PWMName; - -typedef enum -{ - CAN_1 = (int)CAN1_BASE, - CAN_2 = (int)CAN2_BASE, - CAN_3 = (int)CAN3_BASE -} CANName; - -typedef enum -{ - QSPI_1 = (int)QSPI_R_BASE, -} QSPIName; - -typedef enum -{ - USB_FS = (int)USB_OTG_FS_PERIPH_BASE, - USB_HS = (int)USB_OTG_HS_PERIPH_BASE -} USBName; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/targets/TARGET_LEKA_V1_1_DEV/PeripheralPins.c b/targets/TARGET_LEKA_V1_1_DEV/PeripheralPins.c deleted file mode 100644 index ff5ca65966..0000000000 --- a/targets/TARGET_LEKA_V1_1_DEV/PeripheralPins.c +++ /dev/null @@ -1,521 +0,0 @@ -/* mbed Microcontroller Library - * SPDX-License-Identifier: BSD-3-Clause - ****************************************************************************** - * - * Copyright (c) 2016-2020 STMicroelectronics. - * All rights reserved. - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - * - * Automatically generated from STM32CubeMX/db/mcu/STM32F769B(G-I)Tx.xml - */ - -#include "PeripheralPins.h" -#include "mbed_toolchain.h" - -//============================================================================== -// Notes -// -// - The pins mentioned Px_y_ALTz are alternative possibilities which use other -// HW peripheral instances. You can use them the same way as any other "normal" -// pin (i.e. PwmOut pwm(PA_7_ALT0);). These pins are not displayed on the board -// pinout image on mbed.org. -// -// - The pins which are connected to other components present on the board have -// the comment "Connected to xxx". The pin function may not work properly in this -// case. These pins may not be displayed on the board pinout image on mbed.org. -// Please read the board reference manual and schematic for more information. -// -// - Warning: pins connected to the default STDIO_UART_TX and STDIO_UART_RX pins are commented -// See https://os.mbed.com/teams/ST/wiki/STDIO for more information. -// -//============================================================================== - - -//*** ADC *** - -MBED_WEAK const PinMap PinMap_ADC[] = { - {PA_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 // Connected to MCU_SYS_WAKE_UP - {PA_0_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 // Connected to MCU_SYS_WAKE_UP - {PA_0_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 // Connected to MCU_SYS_WAKE_UP - {PA_1, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 // Connected to MOTOR_LEFT_PWM - {PA_1_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 // Connected to MOTOR_LEFT_PWM - {PA_1_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 // Connected to MOTOR_LEFT_PWM - {PA_2, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 // Connected to MOTOR_RIGHT_PWM - {PA_2_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 // Connected to MOTOR_RIGHT_PWM - {PA_2_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 // Connected to MOTOR_RIGHT_PWM -// {PA_3, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 // Connected to STDIO_UART_RX -// {PA_3, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 // Connected to STDIO_UART_RX -// {PA_3, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 // Connected to STDIO_UART_RX - {PA_4, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 // Connected to MCU_SOUND_OUT - {PA_4_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 // Connected to MCU_SOUND_OUT - {PA_5, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 // Connected to SD_SPI_SCK - {PA_5_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 // Connected to SD_SPI_SCK - {PA_6, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 // Connected to SD_SPI_MISO - {PA_6_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 // Connected to SD_SPI_MISO - {PA_7, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 // Connected to SD_SPI_MOSI - {PA_7_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 // Connected to SD_SPI_MOSI - {PB_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 - {PB_0_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 - {PB_1, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_1_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 // Connected to SENSOR_LIGHT_ADC_INPUT - {PC_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 // Connected to BATTERY_CHARGE_STATUS - {PC_0_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 // Connected to BATTERY_CHARGE_STATUS - {PC_0_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 // Connected to BATTERY_CHARGE_STATUS - {PC_1, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 // Connected to MOTOR_LEFT_VOLTAGE - {PC_1_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 // Connected to MOTOR_LEFT_VOLTAGE - {PC_1_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 // Connected to MOTOR_LEFT_VOLTAGE - {PC_2, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 // Connected to MOTOR_RIGHT_VOLTAGE - {PC_2_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 // Connected to MOTOR_RIGHT_VOLTAGE - {PC_2_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 // Connected to MOTOR_RIGHT_VOLTAGE - {PC_3, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 // Connected to BATTERY_VOLTAGE - {PC_3_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 // Connected to BATTERY_VOLTAGE - {PC_3_ALT1, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 // Connected to BATTERY_VOLTAGE - {PC_4, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 // Connected to SD_SPI_CS - {PC_4_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 // Connected to SD_SPI_CS - {PC_5, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 - {PC_5_ALT0, ADC_2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 - {PF_3, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_IN9 // Connected to FMC_SRAM_A3 - {PF_4, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC3_IN14 // Connected to FMC_SRAM_A4 - {PF_5, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC3_IN15 // Connected to FMC_SRAM_A5 - {PF_6, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_IN4 // Connected to BLE_SPI_NSS - {PF_7, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_IN5 // Connected to BLE_SPI_SCK - {PF_8, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_IN6 // Connected to BLE_SPI_MISO - {PF_9, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC3_IN7 // Connected to BLE_SPI_MOSI - {PF_10, ADC_3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC3_IN8 // Connected to MCU_MIC_INPUT - {NC, NC, 0} -}; - -// !!! SECTION TO BE CHECKED WITH DEVICE REFERENCE MANUAL -MBED_WEAK const PinMap PinMap_ADC_Internal[] = { -// {ADC_TEMP, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, -// {ADC_VREF, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 17, 0)}, -// {ADC_VBAT, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, - {NC, NC, 0} -}; - -//*** DAC *** - -MBED_WEAK const PinMap PinMap_DAC[] = { - {PA_4, DAC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 // Connected to MCU_SOUND_OUT - {PA_5, DAC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 // Connected to SD_SPI_SCK - {NC, NC, 0} -}; - -//*** I2C *** - -MBED_WEAK const PinMap PinMap_I2C_SDA[] = { - {PB_7, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Connected to BATTERY_BMS_I2C_SDA - {PB_7_ALT0, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF11_I2C4)}, // Connected to BATTERY_BMS_I2C_SDA - {PB_9, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_9_ALT0, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C4)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_11, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, - {PC_9, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PD_13, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to QSPI_FLASH_IO3 - {PF_0, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to FMC_SRAM_A0 - {PF_15, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to FMC_SRAM_A9 - {PH_5, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to FMC_SRAM_SDNWE - {PH_8, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Connected to FMC_SRAM_D12 - {PH_12, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to FMC_SRAM_D16 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_I2C_SCL[] = { - {PA_8, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Connected to SOUND_ENABLE - {PB_6, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_6_ALT0, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF11_I2C4)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_8, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_8_ALT0, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF1_I2C4)}, // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_10, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to QSPI_FLASH_nCS - {PD_12, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to QSPI_FLASH_nCS_1 - {PF_1, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to FMC_SRAM_A1 - {PF_14, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to FMC_SRAM_A8 - {PH_4, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Connected to DEBUG_LED - {PH_7, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Connected to SENSOR_PROXIMITY_MUX_I2C_SCL - {PH_11, I2C_4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, // Connected to FMC_SRAM_D15 - {NC, NC, 0} -}; - -//*** PWM *** - -// TIM5 cannot be used because already used by the us_ticker -// (update us_ticker_data.h file if another timer is chosen) -MBED_WEAK const PinMap PinMap_PWM[] = { - {PA_0, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 // Connected to MCU_SYS_WAKE_UP -// {PA_0, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 // Connected to MCU_SYS_WAKE_UP - {PA_1, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 // Connected to MOTOR_LEFT_PWM -// {PA_1, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 // Connected to MOTOR_LEFT_PWM - {PA_2, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 // Connected to MOTOR_RIGHT_PWM -// {PA_2, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 // Connected to MOTOR_RIGHT_PWM - {PA_2_ALT0, PWM_9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 // Connected to MOTOR_RIGHT_PWM -// {PA_3, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 // Connected to STDIO_UART_RX -// {PA_3, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 // Connected to STDIO_UART_RX -// {PA_3, PWM_9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 // Connected to STDIO_UART_RX - {PA_5, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 // Connected to SD_SPI_SCK - {PA_5_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N // Connected to SD_SPI_SCK - {PA_6, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 // Connected to SD_SPI_MISO - {PA_6_ALT0, PWM_13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 // Connected to SD_SPI_MISO - {PA_7, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N // Connected to SD_SPI_MOSI - {PA_7_ALT0, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 // Connected to SD_SPI_MOSI - {PA_7_ALT1, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N // Connected to SD_SPI_MOSI - {PA_7_ALT2, PWM_14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 // Connected to SD_SPI_MOSI - {PA_8, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 // Connected to SOUND_ENABLE -// {PA_9, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 // Connected to STDIO_UART_TX -// {PA_10, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 // Connected to STDIO_UART_RX - {PA_11, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 // Connected to RFID_UART_RX - {PA_15, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 // Connected to SENSOR_MAGNETO_IRQ - {PB_0, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - {PB_0_ALT0, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 - {PB_0_ALT1, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N - {PB_1, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_1_ALT0, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_1_ALT1, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_3, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 // Connected to SYS_PROG_SWO - {PB_4, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - {PB_5, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 // Connected to SENSOR_TEMPERATURE_IRQ - {PB_6, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 // Connected to BATTERY_BMS_I2C_SCL - {PB_7, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 // Connected to BATTERY_BMS_I2C_SDA - {PB_8, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_8_ALT0, PWM_10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_9, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_9_ALT0, PWM_11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_10, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 // Connected to QSPI_FLASH_nCS - {PB_11, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 - {PB_13, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N // Connected to LED_EARS_SPI_SCK - {PB_14, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N // Connected to SCREEN_BACKLIGHT_PWM - {PB_14_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N // Connected to SCREEN_BACKLIGHT_PWM - {PB_14_ALT1, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 // Connected to SCREEN_BACKLIGHT_PWM - {PB_15, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N // Connected to LED_EARS_SPI_MOSI - {PB_15_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N // Connected to LED_EARS_SPI_MOSI - {PB_15_ALT1, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 // Connected to LED_EARS_SPI_MOSI - {PC_6, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 // Connected to BT_UART_TX - {PC_6_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 // Connected to BT_UART_TX - {PC_7, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 // Connected to BT_UART_RX - {PC_7_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 // Connected to BT_UART_RX - {PC_8, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 // Connected to BT_RESET - {PC_8_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 // Connected to BT_RESET - {PC_9, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PC_9_ALT0, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PD_12, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 // Connected to QSPI_FLASH_nCS_1 - {PD_13, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 // Connected to QSPI_FLASH_IO3 - {PD_14, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 // Connected to FMC_SRAM_D0 - {PD_15, PWM_4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 // Connected to FMC_SRAM_D1 - {PE_5, PWM_9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 // Connected to MOTOR_RIGHT_DIRECTION_2 - {PE_6, PWM_9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - {PE_8, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N // Connected to FMC_SRAM_D5 - {PE_9, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 // Connected to FMC_SRAM_D6 - {PE_10, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N // Connected to FMC_SRAM_D7 - {PE_11, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 // Connected to FMC_SRAM_D8 - {PE_12, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N // Connected to FMC_SRAM_D9 - {PE_13, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 // Connected to FMC_SRAM_D10 - {PE_14, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 // Connected to FMC_SRAM_D11 - {PF_6, PWM_10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 // Connected to BLE_SPI_NSS - {PF_7, PWM_11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 // Connected to BLE_SPI_SCK - {PF_8, PWM_13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 // Connected to BLE_SPI_MISO - {PF_9, PWM_14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 // Connected to BLE_SPI_MOSI - {PH_6, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 // Connected to QSPI_FLASH_nCS_2 - {PH_9, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 // Connected to FMC_SRAM_D13 -// {PH_10, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 // Connected to FMC_SRAM_D14 -// {PH_11, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 // Connected to FMC_SRAM_D15 -// {PH_12, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 // Connected to FMC_SRAM_D16 - {PH_13, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N // Connected to FMC_SRAM_D21 - {PH_14, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N // Connected to FMC_SRAM_D22 - {PH_15, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N // Connected to FMC_SRAM_D23 -// {PI_0, PWM_5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 // Connected to FMC_SRAM_D24 - {PI_2, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 // Connected to FMC_SRAM_D26 - {PI_5, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 // Connected to FMC_SRAM_NBL3 - {PI_6, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 // Connected to FMC_SRAM_D28 - {PI_7, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 // Connected to FMC_SRAM_D29 - {NC, NC, 0} -}; - -//*** SERIAL *** - -MBED_WEAK const PinMap PinMap_UART_TX[] = { - {PA_0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to MCU_SYS_WAKE_UP - {PA_2, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to MOTOR_RIGHT_PWM - {PA_9, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to STDIO_UART_TX - {PA_12, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, // Connected to RFID_UART_TX - {PA_15, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_UART7)}, // Connected to SENSOR_MAGNETO_IRQ - {PB_4, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_UART7)}, - {PB_6, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_6_ALT0, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_UART5)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_9, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_10, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to QSPI_FLASH_nCS - {PB_13, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // Connected to LED_EARS_SPI_SCK - {PB_14, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, // Connected to SCREEN_BACKLIGHT_PWM - {PC_6, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to BT_UART_TX - {PC_10, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to QSPI_FLASH_IO1 - {PC_10_ALT0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to QSPI_FLASH_IO1 - {PC_12, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // Connected to WIFI_ENABLE - {PD_1, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D2 - {PD_5, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to STDIO_UART_TX - {PD_8, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to FMC_SRAM_D13 - {PE_1, UART_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, // Connected to FMC_SRAM_NBL1 - {PE_8, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to FMC_SRAM_D5 - {PF_7, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to BLE_SPI_SCK - {PG_14, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to LED_BELT_SPI_MOSI - {PH_13, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D21 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_UART_RX[] = { - {PA_1, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to MOTOR_LEFT_PWM - {PA_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to STDIO_UART_RX - {PA_8, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_UART7)}, // Connected to SOUND_ENABLE - {PA_10, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to STDIO_UART_RX - {PA_11, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, // Connected to RFID_UART_RX - {PB_3, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_UART7)}, // Connected to SYS_PROG_SWO - {PB_5, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_UART5)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_7, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to BATTERY_BMS_I2C_SDA - {PB_8, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_11, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - {PB_12, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, - {PB_15, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, // Connected to LED_EARS_SPI_MOSI - {PC_7, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to BT_UART_RX - {PC_11, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - {PC_11_ALT0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, - {PD_0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D2 - {PD_2, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // Connected to WIFI_ACTIVATE_UPDATE - {PD_6, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - {PD_9, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to FMC_SRAM_D14 - {PE_0, UART_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, // Connected to FMC_SRAM_NBL0 - {PE_7, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to FMC_SRAM_D4 - {PF_6, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to BLE_SPI_NSS - {PG_9, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to SENSOR_IMU_IRQ - {PH_14, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D22 - {PI_9, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to FMC_SRAM_D30 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_UART_RTS[] = { - {PA_1, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to MOTOR_LEFT_PWM - {PA_12, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to RFID_UART_TX - {PA_15, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to SENSOR_MAGNETO_IRQ - {PB_14, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to SCREEN_BACKLIGHT_PWM - {PB_14_ALT0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to SCREEN_BACKLIGHT_PWM - {PC_8, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, // Connected to BT_RESET - {PD_4, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to WIFI_USART_RTS - {PD_12, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to QSPI_FLASH_nCS_1 - {PD_15, UART_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, // Connected to FMC_SRAM_D1 - {PE_9, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to FMC_SRAM_D6 - {PF_8, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to BLE_SPI_MISO - {PG_8, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to FMC_SRAM_SDCLK - {PG_12, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_UART_CTS[] = { - {PA_0, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to MCU_SYS_WAKE_UP - {PA_11, UART_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // Connected to RFID_UART_RX - {PB_0, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, - {PB_13, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to LED_EARS_SPI_SCK - {PB_15, UART_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // Connected to LED_EARS_SPI_MOSI - {PC_9, UART_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PD_3, UART_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Connected to WIFI_USART_CTS - {PD_11, UART_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Connected to QSPI_FLASH_IO0 - {PD_14, UART_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, // Connected to FMC_SRAM_D0 - {PE_10, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to FMC_SRAM_D7 - {PF_9, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Connected to BLE_SPI_MOSI - {PG_13, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to LED_BELT_SPI_SCK - {PG_15, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Connected to FMC_SRAM_SDNCAS - {NC, NC, 0} -}; - -//*** SPI *** - -MBED_WEAK const PinMap PinMap_SPI_MOSI[] = { - {PA_7, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SD_SPI_MOSI - {PA_7_ALT0, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SD_SPI_MOSI - {PB_2, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SPI3)}, // Connected to QSPI_FLASH_CLK - {PB_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_5_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_5_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_15, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to LED_EARS_SPI_MOSI - {PC_1, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to MOTOR_LEFT_VOLTAGE - {PC_3, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to BATTERY_VOLTAGE - {PC_12, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to WIFI_ENABLE - {PD_6, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI3)}, - {PD_7, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, - {PE_6, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, - {PE_14, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to FMC_SRAM_D11 - {PF_9, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to BLE_SPI_MOSI - {PF_11, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to FMC_SRAM_SDNRAS - {PG_14, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI6)}, // Connected to LED_BELT_SPI_MOSI - {PI_3, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to FMC_SRAM_D27 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_SPI_MISO[] = { - {PA_6, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SD_SPI_MISO - {PA_6_ALT0, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SD_SPI_MISO - {PB_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, - {PB_4_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, - {PB_4_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, - {PB_14, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to SCREEN_BACKLIGHT_PWM - {PC_2, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to MOTOR_RIGHT_VOLTAGE - {PC_11, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, - {PE_5, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to MOTOR_RIGHT_DIRECTION_2 - {PE_13, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to FMC_SRAM_D10 - {PF_8, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to BLE_SPI_MISO - {PG_9, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SENSOR_IMU_IRQ - {PG_12, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI6)}, - {PH_7, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to SENSOR_PROXIMITY_MUX_I2C_SCL - {PI_2, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to FMC_SRAM_D26 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_SPI_SCLK[] = { - {PA_5, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SD_SPI_SCK - {PA_5_ALT0, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SD_SPI_SCK -// {PA_9, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to STDIO_UART_TX - {PA_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to RFID_UART_TX - {PB_3, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SYS_PROG_SWO - {PB_3_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to SYS_PROG_SWO - {PB_3_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to SYS_PROG_SWO - {PB_10, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to QSPI_FLASH_nCS - {PB_13, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to LED_EARS_SPI_SCK - {PC_10, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to QSPI_FLASH_IO1 - {PD_3, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to WIFI_USART_CTS - {PE_2, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to QSPI_FLASH_IO2 - {PE_12, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to FMC_SRAM_D9 - {PF_7, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to BLE_SPI_SCK - {PG_11, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, - {PG_13, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI6)}, // Connected to LED_BELT_SPI_SCK - {PH_6, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to QSPI_FLASH_nCS_2 - {PI_1, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to FMC_SRAM_D25 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_SPI_SSEL[] = { - {PA_4, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to MCU_SOUND_OUT - {PA_4_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to MCU_SOUND_OUT - {PA_4_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SPI6)}, // Connected to MCU_SOUND_OUT - {PA_11, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to RFID_UART_RX - {PA_15, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SENSOR_MAGNETO_IRQ - {PA_15_ALT0, SPI_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF6_SPI3)}, // Connected to SENSOR_MAGNETO_IRQ - {PA_15_ALT1, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SPI6)}, // Connected to SENSOR_MAGNETO_IRQ - {PB_4, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF7_SPI2)}, - {PB_9, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, - {PE_4, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to MOTOR_RIGHT_DIRECTION_1 - {PE_11, SPI_4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI4)}, // Connected to FMC_SRAM_D8 - {PF_6, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to BLE_SPI_NSS - {PG_8, SPI_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI6)}, // Connected to FMC_SRAM_SDCLK - {PG_10, SPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, // Connected to SENSOR_PROXIMITY_MUX_IRQB - {PH_5, SPI_5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI5)}, // Connected to FMC_SRAM_SDNWE - {PI_0, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)}, // Connected to FMC_SRAM_D24 - {NC, NC, 0} -}; - -//*** CAN *** - -MBED_WEAK const PinMap PinMap_CAN_RD[] = { - {PA_8, CAN_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_CAN3)}, // Connected to SOUND_ENABLE - {PA_11, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to RFID_UART_RX - {PB_3, CAN_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_CAN3)}, // Connected to SYS_PROG_SWO - {PB_5, CAN_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, // Connected to SENSOR_TEMPERATURE_IRQ - {PB_8, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to SENSOR_IMU_TH_I2C_SCL - {PB_12, CAN_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, - {PD_0, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D2 - {PH_14, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D22 - {PI_9, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D30 - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_CAN_TD[] = { - {PA_12, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to RFID_UART_TX - {PA_15, CAN_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_CAN3)}, // Connected to SENSOR_MAGNETO_IRQ - {PB_4, CAN_3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF11_CAN3)}, - {PB_6, CAN_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, // Connected to BATTERY_BMS_I2C_SCL - {PB_9, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to SENSOR_IMU_TH_I2C_SDA - {PB_13, CAN_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, // Connected to LED_EARS_SPI_SCK - {PD_1, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D2 - {PH_13, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, // Connected to FMC_SRAM_D21 - {NC, NC, 0} -}; - -//*** QUADSPI *** - -MBED_WEAK const PinMap PinMap_QSPI_DATA0[] = { - {PC_9, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO0 // Connected to SENSOR_PROXIMITY_MUX_I2C_SDA - {PD_11, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO0 // Connected to QSPI_FLASH_IO0 - {PF_8, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_IO0 // Connected to BLE_SPI_MISO - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_DATA1[] = { - {PC_10, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO1 // Connected to QSPI_FLASH_IO1 - {PD_12, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO1 // Connected to QSPI_FLASH_nCS_1 - {PF_9, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_IO1 // Connected to BLE_SPI_MOSI - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_DATA2[] = { - {PE_2, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO2 // Connected to QSPI_FLASH_IO2 - {PF_7, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO2 // Connected to BLE_SPI_SCK - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_DATA3[] = { - {PA_1, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO3 // Connected to MOTOR_LEFT_PWM - {PD_13, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO3 // Connected to QSPI_FLASH_IO3 - {PF_6, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO3 // Connected to BLE_SPI_NSS - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_SCLK[] = { - {PB_2, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_CLK // Connected to QSPI_FLASH_CLK - {PF_10, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_CLK // Connected to MCU_MIC_INPUT - {NC, NC, 0} -}; - -MBED_WEAK const PinMap PinMap_QSPI_SSEL[] = { - {PB_6, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_NCS // Connected to BATTERY_BMS_I2C_SCL - {PB_10, QSPI_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_NCS // Connected to QSPI_FLASH_nCS - {NC, NC, 0} -}; - -//*** USBDEVICE *** - -MBED_WEAK const PinMap PinMap_USB_FS[] = { -// {PA_8, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF // Connected to SOUND_ENABLE -// {PA_9, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS // Connected to STDIO_UART_TX -// {PA_10, USB_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID // Connected to STDIO_UART_RX - {PA_11, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM // Connected to RFID_UART_RX - {PA_12, USB_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP // Connected to RFID_UART_TX - {NC, NC, 0} -}; - -//*** USBDEVICE *** - -MBED_WEAK const PinMap PinMap_USB_HS[] = { -#if (MBED_CONF_TARGET_USB_SPEED == USE_USB_HS_IN_FS) -// {PA_4, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_SOF // Connected to MCU_SOUND_OUT - {PB_12, USB_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID - {PB_13, USB_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS // Connected to LED_EARS_SPI_SCK - {PB_14, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM // Connected to SCREEN_BACKLIGHT_PWM - {PB_15, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP // Connected to LED_EARS_SPI_MOSI -#else /* MBED_CONF_TARGET_USB_SPEED */ -// {PA_3, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0 // Connected to STDIO_UART_RX - {PA_5, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_CK // Connected to SD_SPI_SCK - {PB_0, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D1 - {PB_1, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D2 // Connected to SENSOR_LIGHT_ADC_INPUT - {PB_5, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D7 // Connected to SENSOR_TEMPERATURE_IRQ - {PB_10, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D3 // Connected to QSPI_FLASH_nCS - {PB_11, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D4 - {PB_12, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D5 - {PB_13, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D6 // Connected to LED_EARS_SPI_SCK - {PC_0, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_STP // Connected to BATTERY_CHARGE_STATUS - {PC_2, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR // Connected to MOTOR_RIGHT_VOLTAGE - {PC_3, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT // Connected to BATTERY_VOLTAGE - {PH_4, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT // Connected to DEBUG_LED - {PI_11, USB_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR // Connected to BLE_IRQ -#endif /* MBED_CONF_TARGET_USB_SPEED */ - {NC, NC, 0} -}; diff --git a/targets/TARGET_LEKA_V1_1_DEV/PinNames.h b/targets/TARGET_LEKA_V1_1_DEV/PinNames.h deleted file mode 100644 index ef325fa174..0000000000 --- a/targets/TARGET_LEKA_V1_1_DEV/PinNames.h +++ /dev/null @@ -1,515 +0,0 @@ -/* mbed Microcontroller Library - * SPDX-License-Identifier: BSD-3-Clause - ****************************************************************************** - * - * Copyright (c) 2016-2020 STMicroelectronics. - * All rights reserved. - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - * - * Automatically generated from STM32CubeMX/db/mcu/STM32F769B(G-I)Tx.xml - */ - -#ifndef MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "PinNamesTypes.h" -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum -{ - ALT0 = 0x100, - ALT1 = 0x200, - ALT2 = 0x300, - ALT3 = 0x400, - ALT4 = 0x500 -} ALTx; - -typedef enum -{ - // Not connected - NC = (int)0xFFFFFFFF, - - PA_0 = 0x00, - PA_0_ALT0 = PA_0 | ALT0, // same pin used for alternate HW - PA_0_ALT1 = PA_0 | ALT1, // same pin used for alternate HW - PA_1 = 0x01, - PA_1_ALT0 = PA_1 | ALT0, // same pin used for alternate HW - PA_1_ALT1 = PA_1 | ALT1, // same pin used for alternate HW - PA_2 = 0x02, - PA_2_ALT0 = PA_2 | ALT0, // same pin used for alternate HW - PA_2_ALT1 = PA_2 | ALT1, // same pin used for alternate HW - PA_3 = 0x03, - PA_4 = 0x04, - PA_4_ALT0 = PA_4 | ALT0, // same pin used for alternate HW - PA_4_ALT1 = PA_4 | ALT1, // same pin used for alternate HW - PA_5 = 0x05, - PA_5_ALT0 = PA_5 | ALT0, // same pin used for alternate HW - PA_6 = 0x06, - PA_6_ALT0 = PA_6 | ALT0, // same pin used for alternate HW - PA_7 = 0x07, - PA_7_ALT0 = PA_7 | ALT0, // same pin used for alternate HW - PA_7_ALT1 = PA_7 | ALT1, // same pin used for alternate HW - PA_7_ALT2 = PA_7 | ALT2, // same pin used for alternate HW - PA_8 = 0x08, - PA_9 = 0x09, - PA_10 = 0x0A, - PA_11 = 0x0B, - PA_12 = 0x0C, - PA_13 = 0x0D, - PA_14 = 0x0E, - PA_15 = 0x0F, - PA_15_ALT0 = PA_15 | ALT0, // same pin used for alternate HW - PA_15_ALT1 = PA_15 | ALT1, // same pin used for alternate HW - PB_0 = 0x10, - PB_0_ALT0 = PB_0 | ALT0, // same pin used for alternate HW - PB_0_ALT1 = PB_0 | ALT1, // same pin used for alternate HW - PB_1 = 0x11, - PB_1_ALT0 = PB_1 | ALT0, // same pin used for alternate HW - PB_1_ALT1 = PB_1 | ALT1, // same pin used for alternate HW - PB_2 = 0x12, - PB_3 = 0x13, - PB_3_ALT0 = PB_3 | ALT0, // same pin used for alternate HW - PB_3_ALT1 = PB_3 | ALT1, // same pin used for alternate HW - PB_4 = 0x14, - PB_4_ALT0 = PB_4 | ALT0, // same pin used for alternate HW - PB_4_ALT1 = PB_4 | ALT1, // same pin used for alternate HW - PB_5 = 0x15, - PB_5_ALT0 = PB_5 | ALT0, // same pin used for alternate HW - PB_5_ALT1 = PB_5 | ALT1, // same pin used for alternate HW - PB_6 = 0x16, - PB_6_ALT0 = PB_6 | ALT0, // same pin used for alternate HW - PB_7 = 0x17, - PB_7_ALT0 = PB_7 | ALT0, // same pin used for alternate HW - PB_8 = 0x18, - PB_8_ALT0 = PB_8 | ALT0, // same pin used for alternate HW - PB_9 = 0x19, - PB_9_ALT0 = PB_9 | ALT0, // same pin used for alternate HW - PB_10 = 0x1A, - PB_11 = 0x1B, - PB_12 = 0x1C, - PB_13 = 0x1D, - PB_14 = 0x1E, - PB_14_ALT0 = PB_14 | ALT0, // same pin used for alternate HW - PB_14_ALT1 = PB_14 | ALT1, // same pin used for alternate HW - PB_15 = 0x1F, - PB_15_ALT0 = PB_15 | ALT0, // same pin used for alternate HW - PB_15_ALT1 = PB_15 | ALT1, // same pin used for alternate HW - PC_0 = 0x20, - PC_0_ALT0 = PC_0 | ALT0, // same pin used for alternate HW - PC_0_ALT1 = PC_0 | ALT1, // same pin used for alternate HW - PC_1 = 0x21, - PC_1_ALT0 = PC_1 | ALT0, // same pin used for alternate HW - PC_1_ALT1 = PC_1 | ALT1, // same pin used for alternate HW - PC_2 = 0x22, - PC_2_ALT0 = PC_2 | ALT0, // same pin used for alternate HW - PC_2_ALT1 = PC_2 | ALT1, // same pin used for alternate HW - PC_3 = 0x23, - PC_3_ALT0 = PC_3 | ALT0, // same pin used for alternate HW - PC_3_ALT1 = PC_3 | ALT1, // same pin used for alternate HW - PC_4 = 0x24, - PC_4_ALT0 = PC_4 | ALT0, // same pin used for alternate HW - PC_5 = 0x25, - PC_5_ALT0 = PC_5 | ALT0, // same pin used for alternate HW - PC_6 = 0x26, - PC_6_ALT0 = PC_6 | ALT0, // same pin used for alternate HW - PC_7 = 0x27, - PC_7_ALT0 = PC_7 | ALT0, // same pin used for alternate HW - PC_8 = 0x28, - PC_8_ALT0 = PC_8 | ALT0, // same pin used for alternate HW - PC_9 = 0x29, - PC_9_ALT0 = PC_9 | ALT0, // same pin used for alternate HW - PC_10 = 0x2A, - PC_10_ALT0 = PC_10 | ALT0, // same pin used for alternate HW - PC_11 = 0x2B, - PC_11_ALT0 = PC_11 | ALT0, // same pin used for alternate HW - PC_12 = 0x2C, - PC_13 = 0x2D, - PC_14 = 0x2E, - PC_15 = 0x2F, - PD_0 = 0x30, - PD_1 = 0x31, - PD_2 = 0x32, - PD_3 = 0x33, - PD_4 = 0x34, - PD_5 = 0x35, - PD_6 = 0x36, - PD_7 = 0x37, - PD_8 = 0x38, - PD_9 = 0x39, - PD_10 = 0x3A, - PD_11 = 0x3B, - PD_12 = 0x3C, - PD_13 = 0x3D, - PD_14 = 0x3E, - PD_15 = 0x3F, - PE_0 = 0x40, - PE_1 = 0x41, - PE_2 = 0x42, - PE_3 = 0x43, - PE_4 = 0x44, - PE_5 = 0x45, - PE_6 = 0x46, - PE_7 = 0x47, - PE_8 = 0x48, - PE_9 = 0x49, - PE_10 = 0x4A, - PE_11 = 0x4B, - PE_12 = 0x4C, - PE_13 = 0x4D, - PE_14 = 0x4E, - PE_15 = 0x4F, - PF_0 = 0x50, - PF_1 = 0x51, - PF_2 = 0x52, - PF_3 = 0x53, - PF_4 = 0x54, - PF_5 = 0x55, - PF_6 = 0x56, - PF_7 = 0x57, - PF_8 = 0x58, - PF_9 = 0x59, - PF_10 = 0x5A, - PF_11 = 0x5B, - PF_12 = 0x5C, - PF_13 = 0x5D, - PF_14 = 0x5E, - PF_15 = 0x5F, - PG_0 = 0x60, - PG_1 = 0x61, - PG_2 = 0x62, - PG_3 = 0x63, - PG_4 = 0x64, - PG_5 = 0x65, - PG_6 = 0x66, - PG_7 = 0x67, - PG_8 = 0x68, - PG_9 = 0x69, - PG_10 = 0x6A, - PG_11 = 0x6B, - PG_12 = 0x6C, - PG_13 = 0x6D, - PG_14 = 0x6E, - PG_15 = 0x6F, - PH_0 = 0x70, - PH_1 = 0x71, - PH_2 = 0x72, - PH_3 = 0x73, - PH_4 = 0x74, - PH_5 = 0x75, - PH_6 = 0x76, - PH_7 = 0x77, - PH_8 = 0x78, - PH_9 = 0x79, - PH_10 = 0x7A, - PH_11 = 0x7B, - PH_12 = 0x7C, - PH_13 = 0x7D, - PH_14 = 0x7E, - PH_15 = 0x7F, - PI_0 = 0x80, - PI_1 = 0x81, - PI_2 = 0x82, - PI_3 = 0x83, - PI_4 = 0x84, - PI_5 = 0x85, - PI_6 = 0x86, - PI_7 = 0x87, - PI_8 = 0x88, - PI_9 = 0x89, - PI_10 = 0x8A, - PI_11 = 0x8B, - PI_12 = 0x8C, - PI_13 = 0x8D, - PI_14 = 0x8E, - PI_15 = 0x8F, - PJ_0 = 0x90, - PJ_1 = 0x91, - PJ_2 = 0x92, - PJ_3 = 0x93, - PJ_4 = 0x94, - PJ_5 = 0x95, - PJ_12 = 0x9C, - PJ_13 = 0x9D, - PJ_14 = 0x9E, - PJ_15 = 0x9F, - PK_3 = 0xA3, - PK_4 = 0xA4, - PK_5 = 0xA5, - PK_6 = 0xA6, - PK_7 = 0xA7, - - /**** ADC internal channels ****/ - - ADC_TEMP = 0xF0, // Internal pin virtual value - ADC_VREF = 0xF1, // Internal pin virtual value - ADC_VBAT = 0xF2, // Internal pin virtual value - -// Arduino Uno(Rev3) Header pin connection naming -// A0 = Px_x, -// A1 = Px_x, -// A2 = Px_x, -// A3 = Px_x, -// A4 = Px_x, -// A5 = Px_x, -// D0 = Px_x, -// D1 = Px_x, -// D2 = Px_x, -// D3 = Px_x, -// D4 = Px_x, -// D5 = Px_x, -// D6 = Px_x, -// D7 = Px_x, -// D8 = Px_x, -// D9 = Px_x, -// D10 = Px_x, -// D11 = Px_x, -// D12 = Px_x, -// D13 = Px_x, -// D14 = Px_x, -// D15 = Px_x, - -// STDIO for console print -#ifdef MBED_CONF_TARGET_STDIO_UART_TX -// STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX, -#else -// STDIO_UART_TX = PA_9, -#endif -#ifdef MBED_CONF_TARGET_STDIO_UART_RX -// STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX, -#else -// STDIO_UART_RX = PA_3, -#endif - - // USBTX = STDIO_UART_TX, // used for greentea tests - // USBRX = STDIO_UART_RX, // used for greentea tests - - // I2C signals aliases - // I2C_SDA = D14, - // I2C_SCL = D15, - - // SPI signals aliases - // SPI_CS = D10, - // SPI_MOSI = D11, - // SPI_MISO = D12, - // SPI_SCK = D13, - - // Standardized LED and button names - // LED1 = PB_13, // LED_EARS_SPI_SCK - // LED2 = PG_14, // LED_BELT_SPI_MOSI - // LED3 = PH_4, // DEBUG_LED - // LED4 = PB_15, // LED_EARS_SPI_MOSI - // LED5 = PG_13, // LED_BELT_SPI_SCK - // BUTTON1 = Px_x, - - // Backward legacy names - // USER_BUTTON = PA_0, - // PWM_OUT = D3, - - /**** USB FS pins ****/ - // USB_OTG_FS_DM = PA_11, - // USB_OTG_FS_DP = PA_12, - // USB_OTG_FS_ID = PA_10, - // USB_OTG_FS_SOF = PA_8, - // USB_OTG_FS_VBUS = PA_9, - - /**** USB HS pins ****/ - // USB_OTG_HS_DM = PB_14, - // USB_OTG_HS_DP = PB_15, - // USB_OTG_HS_ID = PB_12, - // USB_OTG_HS_SOF = PA_4, - // USB_OTG_HS_ULPI_CK = PA_5, - // USB_OTG_HS_ULPI_D0 = PA_3, - // USB_OTG_HS_ULPI_D1 = PB_0, - // USB_OTG_HS_ULPI_D2 = PB_1, - // USB_OTG_HS_ULPI_D3 = PB_10, - // USB_OTG_HS_ULPI_D4 = PB_11, - // USB_OTG_HS_ULPI_D5 = PB_12, - // USB_OTG_HS_ULPI_D6 = PB_13, - // USB_OTG_HS_ULPI_D7 = PB_5, - // USB_OTG_HS_ULPI_DIR = PC_2, - // USB_OTG_HS_ULPI_DIR_ALT0 = PI_11, - // USB_OTG_HS_ULPI_NXT = PC_3, - // USB_OTG_HS_ULPI_NXT_ALT0 = PH_4, - // USB_OTG_HS_ULPI_STP = PC_0, - // USB_OTG_HS_VBUS = PB_13, - - /**** ETHERNET pins ****/ - // ETH_COL = PH_3, - // ETH_COL_ALT0 = PA_3, - // ETH_CRS = PA_0, - // ETH_CRS_ALT0 = PH_2, - // ETH_CRS_DV = PA_7, - // ETH_MDC = PC_1, - // ETH_MDIO = PA_2, - // ETH_PPS_OUT = PG_8, - // ETH_PPS_OUT_ALT0 = PB_5, - // ETH_REF_CLK = PA_1, - // ETH_RXD0 = PC_4, - // ETH_RXD1 = PC_5, - // ETH_RXD2 = PB_0, - // ETH_RXD2_ALT0 = PH_6, - // ETH_RXD3 = PB_1, - // ETH_RXD3_ALT0 = PH_7, - // ETH_RX_CLK = PA_1, - // ETH_RX_DV = PA_7, - // ETH_RX_ER = PI_10, - // ETH_RX_ER_ALT0 = PB_10, - // ETH_TXD0 = PB_12, - // ETH_TXD0_ALT0 = PG_13, - // ETH_TXD1 = PB_13, - // ETH_TXD1_ALT0 = PG_14, - // ETH_TXD2 = PC_2, - // ETH_TXD3 = PE_2, - // ETH_TXD3_ALT0 = PB_8, - // ETH_TX_CLK = PC_3, - // ETH_TX_EN = PB_11, - // ETH_TX_EN_ALT0 = PG_11, - - /**** OSCILLATOR pins ****/ - RCC_OSC32_IN = PC_14, - RCC_OSC32_OUT = PC_15, - RCC_OSC_IN = PH_0, - RCC_OSC_OUT = PH_1, - - /**** DEBUG pins ****/ - SYS_JTCK_SWCLK = PA_14, - SYS_JTDI = PA_15, - SYS_JTDO_SWO = PB_3, - SYS_JTMS_SWDIO = PA_13, - SYS_JTRST = PB_4, - SYS_TRACECLK = PE_2, - SYS_TRACED0 = PE_3, - SYS_TRACED0_ALT0 = PC_1, - SYS_TRACED0_ALT1 = PG_13, - SYS_TRACED1 = PE_4, - SYS_TRACED1_ALT0 = PC_8, - SYS_TRACED1_ALT1 = PG_14, - SYS_TRACED2 = PE_5, - SYS_TRACED2_ALT0 = PD_2, - SYS_TRACED3 = PE_6, - SYS_TRACED3_ALT0 = PC_12, - SYS_WKUP1 = PA_0, - SYS_WKUP2 = PA_2, - SYS_WKUP3 = PC_1, - SYS_WKUP4 = PC_13, - SYS_WKUP5 = PI_8, - SYS_WKUP6 = PI_11, - - // Leka Pin Names - BATTERY_CHARGE_STATUS = PC_0, - BATTERY_VOLTAGE = PC_3, - - BLE_IRQ = PI_11, - BLE_RESET = PE_3, - BLE_SPI_MISO = PF_8, - BLE_SPI_MOSI = PF_9, - BLE_SPI_NSS = PF_6, - BLE_SPI_SCK = PF_7, - - BT_RESET = PC_8, - BT_UART_RX = PC_7, - BT_UART_TX = PC_6, - BT_WAKE_UP = PG_7, - - DEBUG_LED = PH_4, - - HSE_IN = PH_0, - HSE_OUT = PH_1, - - LED_BELT_SPI_MOSI = PG_14, - LED_BELT_SPI_SCK = PG_13, - LED_EARS_SPI_MOSI = PB_15, - LED_EARS_SPI_SCK = PB_13, - - LSE_IN = PC_14, - LSE_OUT = PC_15, - - MCU_MIC_INPUT = PF_10, - MCU_SOUND_OUT = PA_4, - MCU_SYS_WAKE_UP = PA_0, - - MOTOR_LEFT_DIRECTION_1 = PC_13, - MOTOR_LEFT_DIRECTION_2 = PI_8, - MOTOR_LEFT_PWM = PA_1, - MOTOR_LEFT_VOLTAGE = PC_1, - MOTOR_RIGHT_DIRECTION_1 = PE_4, - MOTOR_RIGHT_DIRECTION_2 = PE_5, - MOTOR_RIGHT_PWM = PA_2, - MOTOR_RIGHT_VOLTAGE = PC_2, - - QSPI_FLASH_CLK = PB_2, - QSPI_FLASH_IO0 = PD_11, - QSPI_FLASH_IO1 = PC_10, - QSPI_FLASH_IO2 = PE_2, - QSPI_FLASH_IO3 = PD_13, - QSPI_FLASH_nCS = PB_10, - - RFID_UART_RX = PA_11, - RFID_UART_TX = PA_12, - - SCREEN_BACKLIGHT_PWM = PB_14, - - SD_SPI_CS = PC_4, - SD_SPI_MISO = PA_6, - SD_SPI_MOSI = PA_7, - SD_SPI_SCK = PA_5, - - SENSOR_IMU_IRQ = PG_9, - SENSOR_IMU_TH_I2C_SCL = PB_8, - SENSOR_IMU_TH_I2C_SDA = PB_9, - SENSOR_LIGHT_ADC_INPUT = PB_1, - SENSOR_MAGNETO_IRQ = PA_15, - SENSOR_PROXIMITY_MUX_I2C_SCL = PH_7, - SENSOR_PROXIMITY_MUX_I2C_SDA = PC_9, - SENSOR_PROXIMITY_MUX_IRQA = PI_13, - SENSOR_PROXIMITY_MUX_IRQB = PG_10, - SENSOR_PROXIMITY_MUX_RESET = PI_12, - SENSOR_TEMPERATURE_IRQ = PB_5, - - SOUND_ENABLE = PA_8, - - SYS_POWER_CHECKUP_3V3 = PJ_0, - SYS_POWER_CHECKUP_5V = PJ_1, - SYS_PROG_SWCLK = PA_14, - SYS_PROG_SWDIO = PA_13, - SYS_PROG_SWO = PB_3, - SYS_PROG_VCP_RX = PA_10, - SYS_PROG_VCP_TX = PA_9, - - WIFI_ACTIVATE_UPDATE = PD_2, - WIFI_ENABLE = PC_12, - WIFI_RESET = PJ_3, - WIFI_USART_CTS = PD_3, - WIFI_USART_RTS = PD_4, - WIFI_USART_RX = PA_3, - WIFI_USART_TX = PD_5, - - STDIO_UART_TX = SYS_PROG_VCP_TX, - STDIO_UART_RX = SYS_PROG_VCP_RX, - - USBTX = STDIO_UART_TX, - USBRX = STDIO_UART_RX, - - LED1 = DEBUG_LED, - LED2 = NC, - LED3 = NC, - - USER_BUTTON = NC, - -} PinName; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/targets/TARGET_LEKA_V1_1_DEV/PinNames.orig b/targets/TARGET_LEKA_V1_1_DEV/PinNames.orig deleted file mode 100644 index 779ddd6e96..0000000000 --- a/targets/TARGET_LEKA_V1_1_DEV/PinNames.orig +++ /dev/null @@ -1,414 +0,0 @@ -/* mbed Microcontroller Library - * SPDX-License-Identifier: BSD-3-Clause - ****************************************************************************** - * - * Copyright (c) 2016-2020 STMicroelectronics. - * All rights reserved. - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - * - * Automatically generated from STM32CubeMX/db/mcu/STM32F769B(G-I)Tx.xml - */ - -#ifndef MBED_PINNAMES_H -#define MBED_PINNAMES_H - -#include "PinNamesTypes.h" -#include "cmsis.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum -{ - ALT0 = 0x100, - ALT1 = 0x200, - ALT2 = 0x300, - ALT3 = 0x400, - ALT4 = 0x500 -} ALTx; - -typedef enum -{ - // Not connected - NC = (int)0xFFFFFFFF, - - PA_0 = 0x00, - PA_0_ALT0 = PA_0 | ALT0, // same pin used for alternate HW - PA_0_ALT1 = PA_0 | ALT1, // same pin used for alternate HW - PA_1 = 0x01, - PA_1_ALT0 = PA_1 | ALT0, // same pin used for alternate HW - PA_1_ALT1 = PA_1 | ALT1, // same pin used for alternate HW - PA_2 = 0x02, - PA_2_ALT0 = PA_2 | ALT0, // same pin used for alternate HW - PA_2_ALT1 = PA_2 | ALT1, // same pin used for alternate HW - PA_3 = 0x03, - PA_4 = 0x04, - PA_4_ALT0 = PA_4 | ALT0, // same pin used for alternate HW - PA_4_ALT1 = PA_4 | ALT1, // same pin used for alternate HW - PA_5 = 0x05, - PA_5_ALT0 = PA_5 | ALT0, // same pin used for alternate HW - PA_6 = 0x06, - PA_6_ALT0 = PA_6 | ALT0, // same pin used for alternate HW - PA_7 = 0x07, - PA_7_ALT0 = PA_7 | ALT0, // same pin used for alternate HW - PA_7_ALT1 = PA_7 | ALT1, // same pin used for alternate HW - PA_7_ALT2 = PA_7 | ALT2, // same pin used for alternate HW - PA_8 = 0x08, - PA_9 = 0x09, - PA_10 = 0x0A, - PA_11 = 0x0B, - PA_12 = 0x0C, - PA_13 = 0x0D, - PA_14 = 0x0E, - PA_15 = 0x0F, - PA_15_ALT0 = PA_15 | ALT0, // same pin used for alternate HW - PA_15_ALT1 = PA_15 | ALT1, // same pin used for alternate HW - PB_0 = 0x10, - PB_0_ALT0 = PB_0 | ALT0, // same pin used for alternate HW - PB_0_ALT1 = PB_0 | ALT1, // same pin used for alternate HW - PB_1 = 0x11, - PB_1_ALT0 = PB_1 | ALT0, // same pin used for alternate HW - PB_1_ALT1 = PB_1 | ALT1, // same pin used for alternate HW - PB_2 = 0x12, - PB_3 = 0x13, - PB_3_ALT0 = PB_3 | ALT0, // same pin used for alternate HW - PB_3_ALT1 = PB_3 | ALT1, // same pin used for alternate HW - PB_4 = 0x14, - PB_4_ALT0 = PB_4 | ALT0, // same pin used for alternate HW - PB_4_ALT1 = PB_4 | ALT1, // same pin used for alternate HW - PB_5 = 0x15, - PB_5_ALT0 = PB_5 | ALT0, // same pin used for alternate HW - PB_5_ALT1 = PB_5 | ALT1, // same pin used for alternate HW - PB_6 = 0x16, - PB_6_ALT0 = PB_6 | ALT0, // same pin used for alternate HW - PB_7 = 0x17, - PB_7_ALT0 = PB_7 | ALT0, // same pin used for alternate HW - PB_8 = 0x18, - PB_8_ALT0 = PB_8 | ALT0, // same pin used for alternate HW - PB_9 = 0x19, - PB_9_ALT0 = PB_9 | ALT0, // same pin used for alternate HW - PB_10 = 0x1A, - PB_11 = 0x1B, - PB_12 = 0x1C, - PB_13 = 0x1D, - PB_14 = 0x1E, - PB_14_ALT0 = PB_14 | ALT0, // same pin used for alternate HW - PB_14_ALT1 = PB_14 | ALT1, // same pin used for alternate HW - PB_15 = 0x1F, - PB_15_ALT0 = PB_15 | ALT0, // same pin used for alternate HW - PB_15_ALT1 = PB_15 | ALT1, // same pin used for alternate HW - PC_0 = 0x20, - PC_0_ALT0 = PC_0 | ALT0, // same pin used for alternate HW - PC_0_ALT1 = PC_0 | ALT1, // same pin used for alternate HW - PC_1 = 0x21, - PC_1_ALT0 = PC_1 | ALT0, // same pin used for alternate HW - PC_1_ALT1 = PC_1 | ALT1, // same pin used for alternate HW - PC_2 = 0x22, - PC_2_ALT0 = PC_2 | ALT0, // same pin used for alternate HW - PC_2_ALT1 = PC_2 | ALT1, // same pin used for alternate HW - PC_3 = 0x23, - PC_3_ALT0 = PC_3 | ALT0, // same pin used for alternate HW - PC_3_ALT1 = PC_3 | ALT1, // same pin used for alternate HW - PC_4 = 0x24, - PC_4_ALT0 = PC_4 | ALT0, // same pin used for alternate HW - PC_5 = 0x25, - PC_5_ALT0 = PC_5 | ALT0, // same pin used for alternate HW - PC_6 = 0x26, - PC_6_ALT0 = PC_6 | ALT0, // same pin used for alternate HW - PC_7 = 0x27, - PC_7_ALT0 = PC_7 | ALT0, // same pin used for alternate HW - PC_8 = 0x28, - PC_8_ALT0 = PC_8 | ALT0, // same pin used for alternate HW - PC_9 = 0x29, - PC_9_ALT0 = PC_9 | ALT0, // same pin used for alternate HW - PC_10 = 0x2A, - PC_10_ALT0 = PC_10 | ALT0, // same pin used for alternate HW - PC_11 = 0x2B, - PC_11_ALT0 = PC_11 | ALT0, // same pin used for alternate HW - PC_12 = 0x2C, - PC_13 = 0x2D, - PC_14 = 0x2E, - PC_15 = 0x2F, - PD_0 = 0x30, - PD_1 = 0x31, - PD_2 = 0x32, - PD_3 = 0x33, - PD_4 = 0x34, - PD_5 = 0x35, - PD_6 = 0x36, - PD_7 = 0x37, - PD_8 = 0x38, - PD_9 = 0x39, - PD_10 = 0x3A, - PD_11 = 0x3B, - PD_12 = 0x3C, - PD_13 = 0x3D, - PD_14 = 0x3E, - PD_15 = 0x3F, - PE_0 = 0x40, - PE_1 = 0x41, - PE_2 = 0x42, - PE_3 = 0x43, - PE_4 = 0x44, - PE_5 = 0x45, - PE_6 = 0x46, - PE_7 = 0x47, - PE_8 = 0x48, - PE_9 = 0x49, - PE_10 = 0x4A, - PE_11 = 0x4B, - PE_12 = 0x4C, - PE_13 = 0x4D, - PE_14 = 0x4E, - PE_15 = 0x4F, - PF_0 = 0x50, - PF_1 = 0x51, - PF_2 = 0x52, - PF_3 = 0x53, - PF_4 = 0x54, - PF_5 = 0x55, - PF_6 = 0x56, - PF_7 = 0x57, - PF_8 = 0x58, - PF_9 = 0x59, - PF_10 = 0x5A, - PF_11 = 0x5B, - PF_12 = 0x5C, - PF_13 = 0x5D, - PF_14 = 0x5E, - PF_15 = 0x5F, - PG_0 = 0x60, - PG_1 = 0x61, - PG_2 = 0x62, - PG_3 = 0x63, - PG_4 = 0x64, - PG_5 = 0x65, - PG_6 = 0x66, - PG_7 = 0x67, - PG_8 = 0x68, - PG_9 = 0x69, - PG_10 = 0x6A, - PG_11 = 0x6B, - PG_12 = 0x6C, - PG_13 = 0x6D, - PG_14 = 0x6E, - PG_15 = 0x6F, - PH_0 = 0x70, - PH_1 = 0x71, - PH_2 = 0x72, - PH_3 = 0x73, - PH_4 = 0x74, - PH_5 = 0x75, - PH_6 = 0x76, - PH_7 = 0x77, - PH_8 = 0x78, - PH_9 = 0x79, - PH_10 = 0x7A, - PH_11 = 0x7B, - PH_12 = 0x7C, - PH_13 = 0x7D, - PH_14 = 0x7E, - PH_15 = 0x7F, - PI_0 = 0x80, - PI_1 = 0x81, - PI_2 = 0x82, - PI_3 = 0x83, - PI_4 = 0x84, - PI_5 = 0x85, - PI_6 = 0x86, - PI_7 = 0x87, - PI_8 = 0x88, - PI_9 = 0x89, - PI_10 = 0x8A, - PI_11 = 0x8B, - PI_12 = 0x8C, - PI_13 = 0x8D, - PI_14 = 0x8E, - PI_15 = 0x8F, - PJ_0 = 0x90, - PJ_1 = 0x91, - PJ_2 = 0x92, - PJ_3 = 0x93, - PJ_4 = 0x94, - PJ_5 = 0x95, - PJ_12 = 0x9C, - PJ_13 = 0x9D, - PJ_14 = 0x9E, - PJ_15 = 0x9F, - PK_3 = 0xA3, - PK_4 = 0xA4, - PK_5 = 0xA5, - PK_6 = 0xA6, - PK_7 = 0xA7, - - /**** ADC internal channels ****/ - - ADC_TEMP = 0xF0, // Internal pin virtual value - ADC_VREF = 0xF1, // Internal pin virtual value - ADC_VBAT = 0xF2, // Internal pin virtual value - - // Arduino Uno(Rev3) Header pin connection naming - A0 = Px_x, - A1 = Px_x, - A2 = Px_x, - A3 = Px_x, - A4 = Px_x, - A5 = Px_x, - D0 = Px_x, - D1 = Px_x, - D2 = Px_x, - D3 = Px_x, - D4 = Px_x, - D5 = Px_x, - D6 = Px_x, - D7 = Px_x, - D8 = Px_x, - D9 = Px_x, - D10 = Px_x, - D11 = Px_x, - D12 = Px_x, - D13 = Px_x, - D14 = Px_x, - D15 = Px_x, - -// STDIO for console print -#ifdef MBED_CONF_TARGET_STDIO_UART_TX - STDIO_UART_TX = MBED_CONF_TARGET_STDIO_UART_TX, -#else - STDIO_UART_TX = PA_9, -#endif -#ifdef MBED_CONF_TARGET_STDIO_UART_RX - STDIO_UART_RX = MBED_CONF_TARGET_STDIO_UART_RX, -#else - STDIO_UART_RX = PA_3, -#endif - - USBTX = STDIO_UART_TX, // used for greentea tests - USBRX = STDIO_UART_RX, // used for greentea tests - - // I2C signals aliases - I2C_SDA = D14, - I2C_SCL = D15, - - // SPI signals aliases - SPI_CS = D10, - SPI_MOSI = D11, - SPI_MISO = D12, - SPI_SCK = D13, - - // Standardized LED and button names - LED1 = PB_13, // LED_EARS_SPI_SCK - LED2 = PG_14, // LED_BELT_SPI_MOSI - LED3 = PH_4, // DEBUG_LED - LED4 = PB_15, // LED_EARS_SPI_MOSI - LED5 = PG_13, // LED_BELT_SPI_SCK - BUTTON1 = Px_x, - - // Backward legacy names - USER_BUTTON = PA_0, - PWM_OUT = D3, - - /**** USB FS pins ****/ - USB_OTG_FS_DM = PA_11, - USB_OTG_FS_DP = PA_12, - USB_OTG_FS_ID = PA_10, - USB_OTG_FS_SOF = PA_8, - USB_OTG_FS_VBUS = PA_9, - - /**** USB HS pins ****/ - USB_OTG_HS_DM = PB_14, - USB_OTG_HS_DP = PB_15, - USB_OTG_HS_ID = PB_12, - USB_OTG_HS_SOF = PA_4, - USB_OTG_HS_ULPI_CK = PA_5, - USB_OTG_HS_ULPI_D0 = PA_3, - USB_OTG_HS_ULPI_D1 = PB_0, - USB_OTG_HS_ULPI_D2 = PB_1, - USB_OTG_HS_ULPI_D3 = PB_10, - USB_OTG_HS_ULPI_D4 = PB_11, - USB_OTG_HS_ULPI_D5 = PB_12, - USB_OTG_HS_ULPI_D6 = PB_13, - USB_OTG_HS_ULPI_D7 = PB_5, - USB_OTG_HS_ULPI_DIR = PC_2, - USB_OTG_HS_ULPI_DIR_ALT0 = PI_11, - USB_OTG_HS_ULPI_NXT = PC_3, - USB_OTG_HS_ULPI_NXT_ALT0 = PH_4, - USB_OTG_HS_ULPI_STP = PC_0, - USB_OTG_HS_VBUS = PB_13, - - /**** ETHERNET pins ****/ - ETH_COL = PH_3, - ETH_COL_ALT0 = PA_3, - ETH_CRS = PA_0, - ETH_CRS_ALT0 = PH_2, - ETH_CRS_DV = PA_7, - ETH_MDC = PC_1, - ETH_MDIO = PA_2, - ETH_PPS_OUT = PG_8, - ETH_PPS_OUT_ALT0 = PB_5, - ETH_REF_CLK = PA_1, - ETH_RXD0 = PC_4, - ETH_RXD1 = PC_5, - ETH_RXD2 = PB_0, - ETH_RXD2_ALT0 = PH_6, - ETH_RXD3 = PB_1, - ETH_RXD3_ALT0 = PH_7, - ETH_RX_CLK = PA_1, - ETH_RX_DV = PA_7, - ETH_RX_ER = PI_10, - ETH_RX_ER_ALT0 = PB_10, - ETH_TXD0 = PB_12, - ETH_TXD0_ALT0 = PG_13, - ETH_TXD1 = PB_13, - ETH_TXD1_ALT0 = PG_14, - ETH_TXD2 = PC_2, - ETH_TXD3 = PE_2, - ETH_TXD3_ALT0 = PB_8, - ETH_TX_CLK = PC_3, - ETH_TX_EN = PB_11, - ETH_TX_EN_ALT0 = PG_11, - - /**** OSCILLATOR pins ****/ - RCC_OSC32_IN = PC_14, - RCC_OSC32_OUT = PC_15, - RCC_OSC_IN = PH_0, - RCC_OSC_OUT = PH_1, - - /**** DEBUG pins ****/ - SYS_JTCK_SWCLK = PA_14, - SYS_JTDI = PA_15, - SYS_JTDO_SWO = PB_3, - SYS_JTMS_SWDIO = PA_13, - SYS_JTRST = PB_4, - SYS_TRACECLK = PE_2, - SYS_TRACED0 = PE_3, - SYS_TRACED0_ALT0 = PC_1, - SYS_TRACED0_ALT1 = PG_13, - SYS_TRACED1 = PE_4, - SYS_TRACED1_ALT0 = PC_8, - SYS_TRACED1_ALT1 = PG_14, - SYS_TRACED2 = PE_5, - SYS_TRACED2_ALT0 = PD_2, - SYS_TRACED3 = PE_6, - SYS_TRACED3_ALT0 = PC_12, - SYS_WKUP1 = PA_0, - SYS_WKUP2 = PA_2, - SYS_WKUP3 = PC_1, - SYS_WKUP4 = PC_13, - SYS_WKUP5 = PI_8, - SYS_WKUP6 = PI_11, - -} PinName; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/targets/TARGET_LEKA_V1_1_DEV/pins/Leka-MCU_Pins-v1.1.ioc b/targets/TARGET_LEKA_V1_1_DEV/pins/Leka-MCU_Pins-v1.1.ioc deleted file mode 100644 index dfd738962f..0000000000 --- a/targets/TARGET_LEKA_V1_1_DEV/pins/Leka-MCU_Pins-v1.1.ioc +++ /dev/null @@ -1,913 +0,0 @@ -#MicroXplorer Configuration settings - do not modify -PF7.GPIOParameters=GPIO_Label -PB13.GPIOParameters=GPIO_Label -PD12.GPIO_Label=QSPI_FLASH_nCS_1 -SH.FMC_D0_DA0.ConfNb=1 -PC7.GPIOParameters=GPIO_Label -SH.FMC_A8.ConfNb=1 -PI7.GPIOParameters=GPIO_Label -SH.FMC_A0.ConfNb=1 -SH.FMC_D6_DA6.ConfNb=1 -SH.FMC_D9_DA9.ConfNb=1 -SH.FMC_A0.0=FMC_A0 -PE11.GPIOParameters=GPIO_Label -PH15.GPIO_Label=FMC_SRAM_D23 -PG8.Signal=FMC_SDCLK -PG8.Locked=true -PG0.Locked=true -RCC.PLLQCLKFreq_Value=96000000 -PG0.Signal=FMC_A10 -PC7.Locked=true -PD8.Locked=true -PD0.Locked=true -SH.FMC_SDNWE.ConfNb=1 -PG14.GPIOParameters=GPIO_Label -SH.FMC_D5_DA5.0=FMC_D5 -PJ2.GPIOParameters=GPIO_Label -PA2.GPIOParameters=GPIO_Label -SH.FMC_D9_DA9.0=FMC_D9 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false -DSIHOST_D0P.Signal=DSIHOST_D0P -SH.FMC_D25.0=FMC_D25 -SH.FMC_NBL2.ConfNb=1 -PG15.GPIO_Label=FMC_SRAM_SDNCAS -DSIHOST_D0P.Locked=true -PF7.Signal=SPI5_SCK -SH.FMC_SDNWE.0=FMC_SDNWE -PH9.Signal=FMC_D17 -SH.FMC_D11_DA11.0=FMC_D11 -PB6.Signal=I2C4_SCL -PC7.Signal=USART6_RX -PD0.Signal=FMC_D2_DA2 -PD8.Signal=FMC_D13_DA13 -PE1.Signal=FMC_NBL1 -PE14.Locked=true -RCC.PLLSAIRCLKFreq_Value=96000000 -ProjectManager.ProjectBuild=false -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PA8.Locked=true -PF1.GPIO_Label=FMC_SRAM_A1 -PI4.GPIO_Label=FMC_SRAM_NBL2 -PD1.GPIO_Label=FMC_SRAM_D2 -ProjectManager.FirmwarePackage=STM32Cube FW_F7 V1.16.0 -PF12.GPIO_Label=FMC_SRAM_A6 -PI7.Locked=true -ProjectManager.BackupPrevious=false -PC4.GPIO_Label=SD_SPI_CS -PE9.Signal=FMC_D6_DA6 -DSIHOST_D1N.Signal=DSIHOST_D1N -PI2.Locked=true -SH.FMC_A2.0=FMC_A2 -PE9.Locked=true -PB1.GPIO_Label=SENSOR_LIGHT_ADC_INPUT -PE4.GPIO_Label=MOTOR_RIGHT_DIRECTION_1 -PG4.GPIO_Label=FMC_SRAM_BA0 -PF10.Locked=true -PF13.Locked=true -PA8.Signal=GPIO_Output -PF2.Locked=true -SH.FMC_D1_DA1.0=FMC_D1 -PE1.Locked=true -PB6.Locked=true -PC15/OSC32_OUT.Locked=true -ProjectManager.HalAssertFull=false -Mcu.Package=LQFP208 -PB9.Signal=I2C1_SDA -PB1.Signal=ADCx_IN9 -PA5.Locked=true -PD12.Signal=GPIO_Output -SH.FMC_SDNCAS.ConfNb=1 -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -SH.FMC_A11.ConfNb=1 -PJ3.Locked=true -PA10.Signal=USART1_RX -SH.FMC_D27.0=FMC_D27 -PE12.GPIO_Label=FMC_SRAM_D9 -PH6.Locked=true -PF7.Locked=true -PH9.Locked=true -PC14/OSC32_IN.GPIO_Label=LSE_IN -DSIHOST_D1P.GPIO_Label=MIPI_DSI_D1P -PJ0.Locked=true -PD5.Locked=true -PA4.GPIO_Label=MCU_SOUND_OUT -PD15.Signal=FMC_D1_DA1 -PJ1.GPIO_Label=SYS_POWER_CHECKUP_5V -RCC.PLLSAIQCLKFreq_Value=96000000 -SH.FMC_D3_DA3.ConfNb=1 -PA6.GPIOParameters=GPIO_Label -SH.GPXTI10.0=GPIO_EXTI10 -Mcu.Pin80=PD15 -Mcu.Pin81=DSIHOST_D0P -SH.FMC_A4.0=FMC_A4 -ProjectManager.ProjectFileName=Leka-MCU_Pins-v1.1.0.ioc -SH.FMC_A5.ConfNb=1 -PH13.Locked=true -PH13.Signal=FMC_D21 -Mcu.Pin79=PD14 -PI10.Locked=true -Mcu.PinsNb=137 -Mcu.Pin73=PD8 -Mcu.Pin74=PD9 -Mcu.Pin71=PB14 -Mcu.Pin72=PB15 -PG5.Locked=true -Mcu.Pin77=PD12 -PC13.Locked=true -Mcu.Pin78=PD13 -PG5.Signal=FMC_A15_BA1 -Mcu.Pin75=PD10 -Mcu.Pin76=PD11 -SH.FMC_D10_DA10.0=FMC_D10 -PC13.Signal=GPIO_Output -PD3.Signal=USART2_CTS -Mcu.Pin70=PB13 -PH1/OSC_OUT.GPIOParameters=GPIO_Label -PI12.Signal=GPIO_Output -SH.FMC_D16.0=FMC_D16 -Mcu.Pin68=PH11 -Mcu.Pin69=PH12 -PB14.Locked=true -Mcu.Pin62=PJ5 -PG14.Locked=true -Mcu.Pin63=PH6 -Mcu.Pin60=PE15 -Mcu.Pin61=PB10 -Mcu.Pin66=PH9 -Mcu.Pin67=PH10 -Mcu.Pin64=PH7 -Mcu.Pin65=PH8 -PF8.GPIO_Label=BLE_SPI_MISO -PD10.Signal=FMC_D15_DA15 -PB8.GPIO_Label=SENSOR_IMU_TH_I2C_SCL -PJ3.Signal=GPIO_Output -PA15.Locked=true -PI8.GPIO_Label=MOTOR_LEFT_DIRECTION_1 -PA8.GPIO_Label=SOUND_ENABLE -Mcu.Pin59=PE14 -SH.FMC_D29.0=FMC_D29 -Mcu.Pin57=PE12 -Mcu.Pin58=PE13 -PH11.GPIOParameters=GPIO_Label -Mcu.Pin51=PG1 -Mcu.Pin52=PE7 -Mcu.Pin50=PG0 -RCC.PLLDSIVCOFreq_Value=1000000000 -Mcu.Pin55=PE10 -Mcu.Pin56=PE11 -Mcu.Pin53=PE8 -PE8.GPIO_Label=FMC_SRAM_D5 -Mcu.Pin54=PE9 -PH11.GPIO_Label=FMC_SRAM_D15 -PB9.Locked=true -PI12.Locked=true -Mcu.Pin48=PF14 -PI3.GPIOParameters=GPIO_Label -Mcu.Pin49=PF15 -Mcu.Pin46=PF12 -PH13.GPIOParameters=GPIO_Label -Mcu.Pin47=PF13 -PF3.GPIOParameters=GPIO_Label -PC14/OSC32_IN.GPIOParameters=GPIO_Label -PB14.Signal=GPIO_Analog -PA5.Signal=SPI1_SCK -Mcu.Pin40=PJ0 -Mcu.Pin41=PJ1 -PE13.GPIOParameters=GPIO_Label -Mcu.Pin44=PJ4 -Mcu.Pin45=PF11 -Mcu.Pin42=PJ2 -Mcu.Pin43=PJ3 -PJ4.GPIO_Label=QSPI_FLASH_nCS_3 -PE1.GPIO_Label=FMC_SRAM_NBL1 -PI7.Signal=FMC_D29 -SH.FMC_A6.0=FMC_A6 -PE14.Signal=FMC_D11_DA11 -Mcu.Pin37=PC4 -Mcu.Pin38=PB1 -Mcu.Pin35=PA6 -PB15.GPIO_Label=LED_EARS_SPI_MOSI -Mcu.Pin36=PA7 -RCC.PLLI2SPCLKFreq_Value=96000000 -SH.FMC_D14_DA14.ConfNb=1 -Mcu.Pin39=PB2 -PG7.GPIO_Label=BT_WAKE_UP -PI2.Signal=FMC_D26 -PF4.GPIO_Label=FMC_SRAM_A4 -Mcu.Pin30=PH3 -PA1.GPIO_Label=MOTOR_LEFT_PWM -Mcu.Pin33=PA4 -Mcu.Pin34=PA5 -DSIHOST_CKN.GPIOParameters=GPIO_Label -Mcu.Pin31=PH5 -Mcu.Pin32=PA3 -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PF13.Signal=FMC_A7 -PC10.GPIOParameters=GPIO_Label -PJ15.GPIO_Label=MIPI_DSI_RESET -SH.FMC_NBL2.0=FMC_NBL2 -PC9.GPIOParameters=GPIO_Label -PF9.GPIOParameters=GPIO_Label -RCC.PLLI2SQCLKFreq_Value=96000000 -PI9.GPIOParameters=GPIO_Label -Mcu.Pin26=PA0/WKUP -SH.FMC_D18.0=FMC_D18 -Mcu.Pin27=PA1 -Mcu.Pin24=PH0/OSC_IN -SH.FMC_D21.ConfNb=1 -Mcu.Pin25=PH1/OSC_OUT -Mcu.Pin28=PA2 -PC7.GPIO_Label=BT_UART_RX -Mcu.Pin29=PH2 -PD14.GPIOParameters=GPIO_Label -Mcu.Pin22=PF9 -Mcu.Pin23=PF10 -Mcu.Pin20=PF7 -ADC1.master=1 -PA3.Locked=true -Mcu.Pin21=PF8 -PJ0.GPIOParameters=GPIO_Label -PD10.Locked=true -PA5.GPIO_Label=SD_SPI_SCK -PA10.Locked=true -NVIC.ForceEnableDMAVector=true -PA14.GPIOParameters=GPIO_Label -PC14/OSC32_IN.Locked=true -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PE5.GPIO_Label=MOTOR_RIGHT_DIRECTION_2 -PC12.GPIO_Label=WIFI_ENABLE -PD15.Locked=true -PJ0.GPIO_Label=SYS_POWER_CHECKUP_3V3 -SH.FMC_SDNRAS.ConfNb=1 -ProjectManager.HeapSize=0x200 -Mcu.Pin15=PI13 -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -Mcu.Pin16=PF3 -DSIHOST_CKP.GPIO_Label=MIPI_DSI_CKP -Mcu.Pin13=PF2 -Mcu.Pin14=PI12 -PH6.Signal=GPIO_Output -Mcu.Pin19=PF6 -PF10.GPIOParameters=GPIO_Label -SH.GPXTI15.ConfNb=1 -Mcu.Pin17=PF4 -Mcu.Pin18=PF5 -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -Mcu.Pin11=PF0 -PF0.GPIO_Label=FMC_SRAM_A0 -Mcu.Pin12=PF1 -PG0.GPIOParameters=GPIO_Label -PD0.GPIOParameters=GPIO_Label -Mcu.Pin10=PI11 -SH.GPXTI10.ConfNb=1 -PI11.GPIO_Label=BLE_IRQ -PE3.Signal=GPIO_Output -PC15/OSC32_OUT.Signal=RCC_OSC32_OUT -PF4.Signal=FMC_A4 -DSIHOST_D0P.GPIO_Label=MIPI_DSI_D0P -SH.FMC_D26.ConfNb=1 -RCC.SDMMC2Freq_Value=16000000 -PI1.GPIO_Label=FMC_SRAM_D25 -PG15.Locked=true -Mcu.Family=STM32F7 -ProjectManager.MainLocation=Src -SH.FMC_A6.ConfNb=1 -SH.FMC_A8.0=FMC_A8 -PC15/OSC32_OUT.GPIO_Label=LSE_OUT -PG9.GPIOParameters=GPIO_Label -ProjectManager.KeepUserCode=true -PH14.Signal=FMC_D22 -PH10.Signal=FMC_D18 -SH.FMC_D14_DA14.0=FMC_D14 -PE11.GPIO_Label=FMC_SRAM_D8 -PF0.GPIOParameters=GPIO_Label -PA12.GPIOParameters=GPIO_Label -PA9.GPIOParameters=GPIO_Label -PA11.GPIOParameters=GPIO_Label -PD0.GPIO_Label=FMC_SRAM_D2 -PH10.Locked=true -SH.FMC_A14_BA0.0=FMC_BA0 -SH.FMC_A11.0=FMC_A11 -PB13.GPIO_Label=LED_EARS_SPI_SCK -PG5.GPIO_Label=FMC_SRAM_BA1 -PB15.Signal=SPI2_MOSI -PF12.GPIOParameters=GPIO_Label -PH5.GPIOParameters=GPIO_Label -PJ5.GPIO_Label=SCREEN_PWM -PG15.Signal=FMC_SDNCAS -PB5.GPIOParameters=GPIO_Label -PD13.Signal=QUADSPI_BK1_IO3 -Mcu.IP4=QUADSPI -Mcu.IP5=RCC -PD13.Locked=true -Mcu.IP2=DAC -Mcu.IP3=NVIC -PA15.GPIO_Label=SENSOR_MAGNETO_IRQ -Mcu.IP0=ADC1 -Mcu.IP1=CORTEX_M7 -PE4.GPIOParameters=GPIO_Label -PJ2.Signal=DSIHOST_TE -PF9.Locked=true -PH3.Locked=true -PF1.GPIOParameters=GPIO_Label -RCC.SDMMCFreq_Value=16000000 -Mcu.Pin134=PI6 -Mcu.Pin135=PI7 -Mcu.Pin136=VP_SYS_VS_Systick -Mcu.Pin130=PE0 -Mcu.Pin131=PE1 -Mcu.Pin132=PI4 -Mcu.Pin133=PI5 -ProjectManager.PreviousToolchain= -PF1.Locked=true -PG8.GPIOParameters=GPIO_Label -SH.FMC_NBL1.0=FMC_NBL1 -PA8.GPIOParameters=GPIO_Label -ADC1.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_9 -RCC.HSE_VALUE=25000000 -NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false -SH.FMC_A14_BA0.ConfNb=1 -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -PC15/OSC32_OUT.GPIOParameters=GPIO_Label -PH1/OSC_OUT.GPIO_Label=HSE_OUT -PI4.Locked=true -RCC.VCOInputFreq_Value=1000000 -PH7.GPIO_Label=SENSOR_PROXIMITY_MUX_I2C_SCL -PE8.Locked=true -PF11.Signal=FMC_SDNRAS -DSIHOST_D1P.Signal=DSIHOST_D1P -PE3.GPIOParameters=GPIO_Label -PE3.Locked=true -PB7.Signal=I2C4_SDA -PH6.GPIOParameters=GPIO_Label -PF11.GPIOParameters=GPIO_Label -SH.FMC_D27.ConfNb=1 -PB6.GPIOParameters=GPIO_Label -SH.FMC_D16.ConfNb=1 -PA13.GPIOParameters=GPIO_Label -PB7.GPIO_Label=BATTERY_BMS_I2C_SDA -PD13.GPIO_Label=QSPI_FLASH_IO3 -PA6.Signal=SPI1_MISO -SH.FMC_D4_DA4.ConfNb=1 -PD5.GPIO_Label=WIFI_USART_TX -ProjectManager.ToolChainLocation= -RCC.DSIFreq_Value=62500000 -PA15.Signal=GPXTI15 -PF8.Signal=SPI5_MISO -PG0.GPIO_Label=FMC_SRAM_A10 -SH.FMC_D30.ConfNb=1 -PI0.GPIO_Label=FMC_SRAM_D24 -Mcu.Pin95=PC9 -Mcu.Pin96=PA8 -PF4.Locked=true -Mcu.Pin93=PC7 -Mcu.Pin94=PC8 -Mcu.Pin99=PA11 -PB5.GPIO_Label=SENSOR_TEMPERATURE_IRQ -Mcu.Pin97=PA9 -Mcu.Pin98=PA10 -DSIHOST_CKN.Signal=DSIHOST_CKN -Mcu.Pin91=PG8 -Mcu.Pin92=PC6 -Mcu.Pin90=PG7 -PD3.GPIO_Label=WIFI_USART_CTS -PE7.Signal=FMC_D4_DA4 -PF3.GPIO_Label=FMC_SRAM_A3 -SH.FMC_D22.ConfNb=1 -PF15.GPIOParameters=GPIO_Label -PE2.GPIO_Label=QSPI_FLASH_IO2 -PE12.Locked=true -Mcu.Pin84=DSIHOST_CKN -Mcu.Pin85=DSIHOST_D1P -Mcu.Pin82=DSIHOST_D0N -PB15.Locked=true -Mcu.Pin83=DSIHOST_CKP -PA3.Signal=USART2_RX -Mcu.Pin88=PG5 -Mcu.Pin89=PG6 -Mcu.Pin86=DSIHOST_D1N -Mcu.Pin87=PG4 -SH.FMC_A3.ConfNb=1 -RCC.I2SFreq_Value=96000000 -SH.FMC_D20.0=FMC_D20 -PH8.GPIOParameters=GPIO_Label -PH15.Locked=true -PD15.GPIO_Label=FMC_SRAM_D1 -PG7.Locked=true -PB8.GPIOParameters=GPIO_Label -PG7.Signal=GPIO_Output -PE14.GPIOParameters=GPIO_Label -PH12.GPIO_Label=FMC_SRAM_D16 -PC9.GPIO_Label=SENSOR_PROXIMITY_MUX_I2C_SDA -PC8.Signal=GPIO_Output -PC10.Mode=Single Bank 1 -SH.FMC_D31.0=FMC_D31 -ProjectManager.DefaultFWLocation=true -PE14.GPIO_Label=FMC_SRAM_D11 -PD9.Signal=FMC_D14_DA14 -ProjectManager.DeletePrevious=true -PB10.Locked=true -DSIHOST_CKP.GPIOParameters=GPIO_Label -PA12.GPIO_Label=RFID_UART_TX -RCC.FamilyName=M -DSIHOST_CKN.Locked=true -PE15.GPIOParameters=GPIO_Label -PD8.GPIO_Label=FMC_SRAM_D13 -PB9.GPIOParameters=GPIO_Label -SH.GPXTI6.0=GPIO_EXTI6 -PG8.GPIO_Label=FMC_SRAM_SDCLK -PA13.Signal=SYS_JTMS-SWDIO -PJ5.Locked=true -SH.FMC_A15_BA1.ConfNb=1 -PH7.GPIOParameters=GPIO_Label -PF6.Signal=SPI5_NSS -PH8.Locked=true -PB10.GPIO_Label=QSPI_FLASH_nCS -PF6.Locked=true -SH.FMC_D13_DA13.0=FMC_D13 -PH8.Signal=FMC_D16 -PB7.GPIOParameters=GPIO_Label -PE2.GPIOParameters=GPIO_Label -PG10.GPIOParameters=GPIO_Label -PE0.Locked=true -RCC.USBFreq_Value=96000000 -PF9.GPIO_Label=BLE_SPI_MOSI -PI5.GPIOParameters=GPIO_Label -PD10.GPIO_Label=FMC_SRAM_D15 -SH.FMC_D24.ConfNb=1 -PA1.Signal=GPIO_Analog -RCC.VCOI2SOutputFreq_Value=192000000 -PH9.GPIOParameters=GPIO_Label -DSIHOST_CKP.Signal=DSIHOST_CKP -RCC.PLLSAIPCLKFreq_Value=96000000 -board=custom -RCC.VCOOutputFreq_Value=192000000 -PF14.GPIOParameters=GPIO_Label -PI9.Signal=FMC_D30 -PI9.Locked=true -PI13.GPIO_Label=SENSOR_PROXIMITY_MUX_IRQA -SH.FMC_D22.0=FMC_D22 -MxCube.Version=5.6.1 -DSIHOST_D1N.Locked=true -PJ4.GPIOParameters=GPIO_Label -PI4.Signal=FMC_NBL2 -PA10.GPIOParameters=GPIO_Label -PD4.GPIOParameters=GPIO_Label -VP_SYS_VS_Systick.Mode=SysTick -SH.FMC_D12_DA12.0=FMC_D12 -PF15.GPIO_Label=FMC_SRAM_A9 -SH.FMC_D29.ConfNb=1 -PF14.Locked=true -PE5.Locked=true -SH.FMC_D18.ConfNb=1 -PF1.Signal=FMC_A1 -SH.FMC_D11_DA11.ConfNb=1 -RCC.IPParameters=CECFreq_Value,DFSDMFreq_Value,DSIFreq_Value,DSITXEscFreq_Value,FamilyName,HSE_VALUE,HSI_VALUE,I2SFreq_Value,LCDTFTFreq_Value,LSE_VALUE,LSI_VALUE,PLLCLKFreq_Value,PLLDSIVCOFreq_Value,PLLI2SPCLKFreq_Value,PLLI2SQCLKFreq_Value,PLLI2SRCLKFreq_Value,PLLQCLKFreq_Value,PLLSAIPCLKFreq_Value,PLLSAIQCLKFreq_Value,PLLSAIRCLKFreq_Value,PLLSAIoutputFreq_Value,RNGFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMC2Freq_Value,SDMMCFreq_Value,SPDIFRXFreq_Value,USBFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAIOutputFreq_Value -PJ0.Signal=GPIO_Input -ProjectManager.AskForMigrate=true -PE0.Signal=FMC_NBL0 -PE7.GPIO_Label=FMC_SRAM_D4 -PE12.Signal=FMC_D9_DA9 -PB2.Locked=true -Mcu.IP6=SYS -ProjectManager.CoupleFile=false -DSIHOST_CKN.GPIO_Label=MIPI_DSI_CKN -PA1.Locked=true -KeepUserPlacement=false -PB2.Mode=Single Bank 1 -PJ5.Signal=GPIO_Analog -PA13.Locked=true -SH.GPXTI9.ConfNb=1 -PB2.GPIO_Label=QSPI_FLASH_CLK -PF13.GPIOParameters=GPIO_Label -PD11.Mode=Single Bank 1 -PC6.GPIOParameters=GPIO_Label -RCC.HSI_VALUE=16000000 -PH0/OSC_IN.GPIO_Label=HSE_IN -PI6.GPIOParameters=GPIO_Label -PH3.Signal=FMC_SDNE0 -PI3.GPIO_Label=FMC_SRAM_D27 -SH.GPXTI15.0=GPIO_EXTI15 -PB7.Locked=true -PC8.Locked=true -SH.FMC_D8_DA8.ConfNb=1 -PD9.Locked=true -PJ2.GPIO_Label=MIPI_DSI_TE -PE1.GPIOParameters=GPIO_Label -PA3.GPIO_Label=WIFI_USART_RX -PA6.Locked=true -SH.FMC_D7_DA7.0=FMC_D7 -DSIHOST_D0N.GPIOParameters=GPIO_Label -SH.FMC_D24.0=FMC_D24 -SH.FMC_A4.ConfNb=1 -PH12.Signal=FMC_D20 -PH12.Locked=true -PB10.Mode=Single Bank 1 -PC12.Locked=true -SH.GPXTI9.0=GPIO_EXTI9 -PG4.Signal=FMC_A14_BA0 -PG4.Locked=true -RCC.PLLCLKFreq_Value=96000000 -PC12.Signal=GPIO_Output -PB14.GPIO_Label=SCREEN_BACKLIGHT_PWM -PH6.GPIO_Label=QSPI_FLASH_nCS_2 -PA14.GPIO_Label=SYS_PROG_SWCLK -PD3.GPIOParameters=GPIO_Label -PJ3.GPIOParameters=GPIO_Label -PC6.GPIO_Label=BT_UART_TX -PI11.Locked=true -PA3.GPIOParameters=GPIO_Label -PA6.GPIO_Label=SD_SPI_MISO -PB6.GPIO_Label=BATTERY_BMS_I2C_SCL -PI6.GPIO_Label=FMC_SRAM_D28 -PD4.Locked=true -PB13.Signal=SPI2_SCK -PG13.Signal=SPI6_SCK -PinOutPanel.RotationAngle=0 -PF6.GPIO_Label=BLE_SPI_NSS -SH.GPXTI13.0=GPIO_EXTI13 -SH.FMC_A15_BA1.0=FMC_BA1 -PH5.Signal=FMC_SDNWE -PD15.GPIOParameters=GPIO_Label -RCC.LCDTFTFreq_Value=48000000 -PE2.Mode=Single Bank 1 -PD4.Signal=USART2_RTS -SH.FMC_D10_DA10.ConfNb=1 -PH1/OSC_OUT.Signal=RCC_OSC_OUT -SH.FMC_D17.ConfNb=1 -RCC.SAI2Freq_Value=96000000 -PE5.Signal=GPIO_Output -PE10.Locked=true -PF10.GPIO_Label=MCU_MIC_INPUT -PB13.Locked=true -PH10.GPIO_Label=FMC_SRAM_D14 -PG13.Locked=true -PB2.Signal=QUADSPI_CLK -PA4.Locked=true -PD1.GPIOParameters=GPIO_Label -PH0/OSC_IN.Locked=true -PG1.GPIOParameters=GPIO_Label -MxDb.Version=DB.5.0.60 -PE15.Locked=true -PE0.GPIOParameters=GPIO_Label -PA1.GPIOParameters=GPIO_Label -SH.FMC_D26.0=FMC_D26 -PJ1.GPIOParameters=GPIO_Label -PI6.Signal=FMC_D28 -PI3.Signal=FMC_D27 -PH1/OSC_OUT.Locked=true -SH.FMC_D15_DA15.ConfNb=1 -PE2.Signal=QUADSPI_BK1_IO2 -SH.GPXTI11.ConfNb=1 -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -PF3.Signal=FMC_A3 -SH.FMC_D25.ConfNb=1 -PE10.Signal=FMC_D7_DA7 -ADC1.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_3CYCLES -PC8.GPIOParameters=GPIO_Label -PH10.GPIOParameters=GPIO_Label -PF8.GPIOParameters=GPIO_Label -PI8.GPIOParameters=GPIO_Label -SH.GPXTI11.0=GPIO_EXTI11 -PD11.Locked=true -PG13.GPIOParameters=GPIO_Label -PG5.GPIOParameters=GPIO_Label -PJ5.GPIOParameters=GPIO_Label -PE10.GPIOParameters=GPIO_Label -SH.COMP_DAC1_group.ConfNb=1 -PA14.Locked=true -PD5.GPIOParameters=GPIO_Label -DSIHOST_D1N.GPIO_Label=MIPI_DSI_D1N -PJ4.Signal=GPIO_Output -RCC.DFSDMFreq_Value=16000000 -PA5.GPIOParameters=GPIO_Label -SH.ADCx_IN9.0=ADC1_IN9,IN9 -PB14.GPIOParameters=GPIO_Label -SH.FMC_A1.0=FMC_A1 -PH2.Signal=FMC_SDCKE0 -SH.FMC_SDCLK.0=FMC_SDCLK -RCC.CECFreq_Value=32786.88524590164 -PF14.Signal=FMC_A8 -PI4.GPIOParameters=GPIO_Label -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -SH.ADCx_IN9.ConfNb=1 -PB10.GPIOParameters=GPIO_Label -PI11.Signal=GPXTI11 -PE10.GPIO_Label=FMC_SRAM_D7 -SH.FMC_D3_DA3.0=FMC_D3 -ProjectManager.CustomerFirmwarePackage= -PC4.GPIOParameters=GPIO_Label -PF4.GPIOParameters=GPIO_Label -PI10.GPIO_Label=FMC_SRAM_D31 -PH12.GPIOParameters=GPIO_Label -PA0/WKUP.GPIOParameters=GPIO_Label -SH.FMC_A7.ConfNb=1 -PH15.Signal=FMC_D23 -SH.FMC_A1.ConfNb=1 -PJ15.GPIOParameters=GPIO_Label -ADC1.Rank-0\#ChannelRegularConversion=1 -SH.FMC_D28.0=FMC_D28 -PD9.GPIO_Label=FMC_SRAM_D14 -PA15.GPIOParameters=GPIO_Label -ADC1.IPParameters=Rank-0\#ChannelRegularConversion,master,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,NbrOfConversionFlag -PG9.Locked=true -PG9.Signal=GPXTI9 -PA9.GPIO_Label=SYS_PROG_VCP_TX -PC6.Signal=USART6_TX -PD13.GPIOParameters=GPIO_Label -PD1.Signal=FMC_D3_DA3 -PA11.GPIO_Label=RFID_UART_RX -PF14.GPIO_Label=FMC_SRAM_A8 -PF13.GPIO_Label=FMC_SRAM_A7 -PG13.GPIO_Label=LED_BELT_SPI_SCK -DSIHOST_CKP.Locked=true -PG10.Signal=GPXTI10 -PG10.Locked=true -SH.FMC_A3.0=FMC_A3 -SH.GPXTI6.ConfNb=1 -PA11.Locked=true -SH.FMC_D31.ConfNb=1 -SH.FMC_D15_DA15.0=FMC_D15 -PC6.Locked=true -PA9.Signal=USART1_TX -PB5.Locked=true -PI1.Locked=true -PE9.GPIO_Label=FMC_SRAM_D6 -SH.FMC_D17.0=FMC_D17 -PB10.Signal=QUADSPI_BK1_NCS -PH9.GPIO_Label=FMC_SRAM_D13 -PJ15.Signal=GPIO_Output -PI9.GPIO_Label=FMC_SRAM_D30 -ProjectManager.LastFirmware=true -Mcu.Pin116=PD4 -PI2.GPIOParameters=GPIO_Label -Mcu.Pin117=PD5 -PF2.GPIOParameters=GPIO_Label -Mcu.Pin118=PJ15 -Mcu.Pin119=PG9 -PI6.Locked=true -SH.FMC_D20.ConfNb=1 -PE15.Signal=FMC_D12_DA12 -PE8.Signal=FMC_D5_DA5 -PI1.Signal=FMC_D25 -RCC.RNGFreq_Value=96000000 -Mcu.Pin112=PC12 -Mcu.Pin113=PD0 -Mcu.Pin114=PD1 -PF11.Locked=true -PF12.Locked=true -DSIHOST_D1P.Locked=true -Mcu.Pin115=PD3 -PA0/WKUP.GPIO_Label=MCU_SYS_WAKE_UP -Mcu.Pin110=PA15 -Mcu.Pin111=PC10 -PA9.Locked=true -Mcu.Pin127=PB7 -Mcu.Pin128=PB8 -Mcu.Pin129=PB9 -PI0.Locked=true -PE7.Locked=true -PG14.GPIO_Label=LED_BELT_SPI_MOSI -SH.FMC_SDNCAS.0=FMC_SDNCAS -ProjectManager.FreePins=false -SH.FMC_NBL1.ConfNb=1 -PJ1.Locked=true -ProjectManager.UnderRoot=false -PE13.Locked=true -SH.FMC_D7_DA7.ConfNb=1 -PH14.GPIO_Label=FMC_SRAM_D22 -Mcu.Pin123=PG15 -PJ15.Locked=true -Mcu.Pin124=PB3 -PA4.Signal=COMP_DAC1_group -Mcu.Pin125=PB5 -Mcu.Pin126=PB6 -PB5.Signal=GPXTI5 -Mcu.Pin120=PG10 -PG15.GPIOParameters=GPIO_Label -Mcu.Pin121=PG13 -PE13.GPIO_Label=FMC_SRAM_D10 -Mcu.Pin122=PG14 -PD11.Signal=QUADSPI_BK1_IO0 -SH.FMC_A10.ConfNb=1 -ProjectManager.CompilerOptimize=6 -SH.FMC_A5.0=FMC_A5 -PA11.Signal=UART4_RX -PH5.Locked=true -PF8.Locked=true -ProjectManager.ComputerToolchain=false -PF9.Signal=SPI5_MOSI -Mcu.Pin109=PA14 -PE2.Locked=true -PF3.Locked=true -Mcu.Pin105=PI0 -Mcu.Pin106=PI1 -Mcu.Pin107=PI2 -Mcu.Pin108=PI3 -PE12.GPIOParameters=GPIO_Label -SH.FMC_NBL3.0=FMC_NBL3 -SH.FMC_D12_DA12.ConfNb=1 -PD1.Locked=true -SH.FMC_D19.0=FMC_D19 -PA7.GPIOParameters=GPIO_Label -PH2.GPIO_Label=FMC_SRAM_SDCKE0 -PG7.GPIOParameters=GPIO_Label -PG10.GPIO_Label=SENSOR_PROXIMITY_MUX_IRQB -Mcu.Pin101=PA13 -Mcu.Pin102=PH13 -Mcu.Pin103=PH14 -PH0/OSC_IN.GPIOParameters=GPIO_Label -Mcu.Pin104=PH15 -Mcu.Pin100=PA12 -RCC.SAI1Freq_Value=96000000 -SH.FMC_A2.ConfNb=1 -PG6.Signal=GPXTI6 -PH14.Locked=true -PI10.GPIOParameters=GPIO_Label -Mcu.UserName=STM32F769BITx -PD9.GPIOParameters=GPIO_Label -DSIHOST_D1P.GPIOParameters=GPIO_Label -PC10.Locked=true -PG6.Locked=true -PC10.Signal=QUADSPI_BK1_IO1 -SH.FMC_NBL0.0=FMC_NBL0 -PI13.Locked=true -ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true -SH.FMC_D6_DA6.0=FMC_D6 -PA0/WKUP.Signal=SYS_WKUP1 -PC9.Locked=true -RCC.PLLI2SRCLKFreq_Value=96000000 -PH5.GPIO_Label=FMC_SRAM_SDNWE -PI5.GPIO_Label=FMC_SRAM_NBL3 -PC13.GPIO_Label=MOTOR_LEFT_DIRECTION_2 -PI0.GPIOParameters=GPIO_Label -PE5.GPIOParameters=GPIO_Label -ProjectManager.StackSize=0x400 -PI11.GPIOParameters=GPIO_Label -SH.FMC_A7.0=FMC_A7 -PA12.Locked=true -PA12.Signal=UART4_TX -Mcu.UserConstants= -PH7.Locked=true -PI1.GPIOParameters=GPIO_Label -PF5.Locked=true -SH.GPXTI13.ConfNb=1 -Mcu.ThirdPartyNb=0 -PD11.GPIO_Label=QSPI_FLASH_IO0 -Mcu.IPNb=7 -RCC.SPDIFRXFreq_Value=96000000 -PF11.GPIO_Label=FMC_SRAM_SDNRAS -PA0/WKUP.Locked=true -PF12.Signal=FMC_A6 -PD8.GPIOParameters=GPIO_Label -Mcu.Pin6=PC14/OSC32_IN -PH15.GPIOParameters=GPIO_Label -Mcu.Pin7=PC15/OSC32_OUT -Mcu.Pin8=PI9 -Mcu.Pin9=PI10 -RCC.VCOSAIOutputFreq_Value=192000000 -PI13.Signal=GPXTI13 -PJ2.Locked=true -SH.FMC_A10.0=FMC_A10 -Mcu.Pin0=PE2 -Mcu.Pin1=PE3 -GPIO.groupedBy=Group By Peripherals -Mcu.Pin2=PE4 -Mcu.Pin3=PE5 -Mcu.Pin4=PI8 -PD10.GPIOParameters=GPIO_Label -Mcu.Pin5=PC13 -SH.FMC_D8_DA8.0=FMC_D8 -PI8.Signal=GPIO_Output -SH.FMC_D2_DA2.0=FMC_D2 -PE13.Signal=FMC_D10_DA10 -PF7.GPIO_Label=BLE_SPI_SCK -PI5.Locked=true -PI5.Signal=FMC_NBL3 -PI0.Signal=FMC_D24 -File.Version=6 -PA10.GPIO_Label=SYS_PROG_VCP_RX -SH.FMC_D5_DA5.ConfNb=1 -PB3.GPIOParameters=GPIO_Label -PH3.GPIOParameters=GPIO_Label -SH.FMC_D2_DA2.ConfNb=1 -PB8.Locked=true -SH.FMC_SDNRAS.0=FMC_SDNRAS -PE4.Signal=GPIO_Output -PI12.GPIOParameters=GPIO_Label -ProjectManager.ProjectName=Leka-MCU_Pins-v1.1.0 -DSIHOST_D1N.GPIOParameters=GPIO_Label -PA7.Locked=true -SH.FMC_D0_DA0.0=FMC_D0 -PC14/OSC32_IN.Signal=RCC_OSC32_IN -PA2.GPIO_Label=MOTOR_RIGHT_PWM -PD14.Locked=true -RCC.LSI_VALUE=32000 -PF5.GPIO_Label=FMC_SRAM_A5 -SH.GPXTI5.ConfNb=1 -SH.FMC_A9.0=FMC_A9 -PJ1.Signal=GPIO_Input -SH.FMC_D4_DA4.0=FMC_D4 -DSIHOST_D0N.Locked=true -PI12.GPIO_Label=SENSOR_PROXIMITY_MUX_RESET -PE0.GPIO_Label=FMC_SRAM_NBL0 -PF5.Signal=FMC_A5 -PH3.GPIO_Label=FMC_SRAM_SDNE0 -PH7.Signal=I2C3_SCL -PJ3.GPIO_Label=WIFI_RESET -SH.FMC_D19.ConfNb=1 -PC4.Locked=true -SH.FMC_D30.0=FMC_D30 -PF0.Signal=FMC_A0 -PI2.GPIO_Label=FMC_SRAM_D26 -SH.FMC_NBL0.ConfNb=1 -PB3.Locked=true -PH14.GPIOParameters=GPIO_Label -PA2.Locked=true -PB3.GPIO_Label=SYS_PROG_SWO -SH.COMP_DAC1_group.0=DAC_OUT1,DAC_OUT1 -SH.GPXTI5.0=GPIO_EXTI5 -PE8.GPIOParameters=GPIO_Label -SH.FMC_A9.ConfNb=1 -PB9.GPIO_Label=SENSOR_IMU_TH_I2C_SDA -PC10.GPIO_Label=QSPI_FLASH_IO1 -PH11.Signal=FMC_D19 -ProjectManager.NoMain=false -PG1.Signal=FMC_A11 -PG1.Locked=true -SH.FMC_SDCLK.ConfNb=1 -PC4.Signal=GPIO_Output -PI10.Signal=FMC_D31 -PD5.Signal=USART2_TX -PI13.GPIOParameters=GPIO_Label -PE9.GPIOParameters=GPIO_Label -PD12.Locked=true -RCC.DSITXEscFreq_Value=15625000 -PH13.GPIO_Label=FMC_SRAM_D21 -PC8.GPIO_Label=BT_RESET -PC12.GPIOParameters=GPIO_Label -SH.FMC_D21.0=FMC_D21 -PH8.GPIO_Label=FMC_SRAM_D12 -SH.FMC_NBL3.ConfNb=1 -PE15.GPIO_Label=FMC_SRAM_D12 -PD12.GPIOParameters=GPIO_Label -ProjectManager.TargetToolchain=Makefile -PE7.GPIOParameters=GPIO_Label -SH.FMC_D1_DA1.ConfNb=1 -PF15.Locked=true -PB2.GPIOParameters=GPIO_Label -PD13.Mode=Single Bank 1 -PE4.Locked=true -PF2.Signal=FMC_A2 -PF5.GPIOParameters=GPIO_Label -PH2.GPIOParameters=GPIO_Label -PH11.Locked=true -SH.FMC_D28.ConfNb=1 -RCC.PLLSAIoutputFreq_Value=96000000 -PE11.Signal=FMC_D8_DA8 -DSIHOST_D0P.GPIOParameters=GPIO_Label -RCC.LSE_VALUE=32768 -PD3.Locked=true -PB1.Locked=true -PG9.GPIO_Label=SENSOR_IMU_IRQ -PG14.Signal=SPI6_MOSI -PG1.GPIO_Label=FMC_SRAM_A11 -PD11.GPIOParameters=GPIO_Label -PH0/OSC_IN.Signal=RCC_OSC_IN -PI8.Locked=true -SH.FMC_D13_DA13.ConfNb=1 -PG4.GPIOParameters=GPIO_Label -PI3.Locked=true -PC13.GPIOParameters=GPIO_Label -PD4.GPIO_Label=WIFI_USART_RTS -PF10.Signal=GPIO_Input -PI7.GPIO_Label=FMC_SRAM_D29 -PF15.Signal=FMC_A9 -PD14.GPIO_Label=FMC_SRAM_D0 -PA4.GPIOParameters=GPIO_Label -PF0.Locked=true -PB15.GPIOParameters=GPIO_Label -PE11.Locked=true -Mcu.Name=STM32F769B(G-I)Tx -PA2.Signal=GPIO_Analog -DSIHOST_D0N.GPIO_Label=MIPI_DSI_D0N -PA13.GPIO_Label=SYS_PROG_SWDIO -SH.FMC_D23.ConfNb=1 -PD14.Signal=FMC_D0_DA0 -PB3.Signal=SYS_JTDO-SWO -PA7.GPIO_Label=SD_SPI_MOSI -SH.FMC_D23.0=FMC_D23 -PJ4.Locked=true -PA14.Signal=SYS_JTCK-SWCLK -DSIHOST_D0N.Signal=DSIHOST_D0N -PF6.GPIOParameters=GPIO_Label -PH2.Locked=true -ADC1.NbrOfConversionFlag=1 -PB8.Signal=I2C1_SCL -PE3.GPIO_Label=BLE_RESET -PC9.Signal=I2C3_SDA -ProjectManager.DeviceId=STM32F769BITx -ProjectManager.LibraryCopy=0 -PB1.GPIOParameters=GPIO_Label -PA7.Signal=SPI1_MOSI -PF2.GPIO_Label=FMC_SRAM_A2 diff --git a/targets/TARGET_LEKA_V1_1_DEV/pins/Leka-MCU_Pins-v1.1.reference.csv b/targets/TARGET_LEKA_V1_1_DEV/pins/Leka-MCU_Pins-v1.1.reference.csv deleted file mode 100644 index f7b9d95bf8..0000000000 --- a/targets/TARGET_LEKA_V1_1_DEV/pins/Leka-MCU_Pins-v1.1.reference.csv +++ /dev/null @@ -1,209 +0,0 @@ -Position,Name,Type,Signal,Label -1,PE2,,QUADSPI_BK1_IO2,QSPI_FLASH_IO2 -2,PE3,,GPIO_Output,BLE_RESET -3,PE4,,GPIO_Output,MOTOR_RIGHT_DIRECTION_1 -4,PE5,,GPIO_Output,MOTOR_RIGHT_DIRECTION_2 -5,PE6,,Reset_State, -6,VBAT,,Power, -7,PI8,,GPIO_Output,MOTOR_LEFT_DIRECTION_1 -8,PC13,,GPIO_Output,MOTOR_LEFT_DIRECTION_2 -9,PC14/OSC32_IN,,RCC_OSC32_IN,LSE_IN -10,PC15/OSC32_OUT,,RCC_OSC32_OUT,LSE_OUT -11,PI9,,FMC_D30,FMC_SRAM_D30 -12,PI10,,FMC_D31,FMC_SRAM_D31 -13,PI11,,GPIO_EXTI11,BLE_IRQ -14,VSS,,Power, -15,VDD,,Power, -16,PF0,,FMC_A0,FMC_SRAM_A0 -17,PF1,,FMC_A1,FMC_SRAM_A1 -18,PF2,,FMC_A2,FMC_SRAM_A2 -19,PI12,,GPIO_Output,SENSOR_PROXIMITY_MUX_RESET -20,PI13,,GPIO_EXTI13,SENSOR_PROXIMITY_MUX_IRQA -21,PI14,,Reset_State, -22,PF3,,FMC_A3,FMC_SRAM_A3 -23,PF4,,FMC_A4,FMC_SRAM_A4 -24,PF5,,FMC_A5,FMC_SRAM_A5 -25,VSS,,Power, -26,VDD,,Power, -27,PF6,,SPI5_NSS,BLE_SPI_NSS -28,PF7,,SPI5_SCK,BLE_SPI_SCK -29,PF8,,SPI5_MISO,BLE_SPI_MISO -30,PF9,,SPI5_MOSI,BLE_SPI_MOSI -31,PF10,,GPIO_Input,MCU_MIC_INPUT -32,PH0/OSC_IN,,RCC_OSC_IN,HSE_IN -33,PH1/OSC_OUT,,RCC_OSC_OUT,HSE_OUT -34,NRST,,Reset_State, -35,PC0,,Reset_State, -36,PC1,,Reset_State, -37,PC2,,Reset_State, -38,PC3,,Reset_State, -39,VDD,,Power, -40,VSSA,,Power, -41,VREF+,,Power, -42,VDDA,,Power, -43,PA0/WKUP,,SYS_WKUP1,MCU_SYS_WAKE_UP -44,PA1,,GPIO_Analog,MOTOR_LEFT_PWM -45,PA2,,GPIO_Analog,MOTOR_RIGHT_PWM -46,PH2,,FMC_SDCKE0,FMC_SRAM_SDCKE0 -47,PH3,,FMC_SDNE0,FMC_SRAM_SDNE0 -48,PH4,,Reset_State, -49,PH5,,FMC_SDNWE,FMC_SRAM_SDNWE -50,PA3,,USART2_RX,WIFI_USART_RX -51,VSS,,Power, -52,VDD,,Power, -53,PA4,,DAC_OUT1,MCU_SOUND_OUT -54,PA5,,SPI1_SCK,SD_SPI_SCK -55,PA6,,SPI1_MISO,SD_SPI_MISO -56,PA7,,SPI1_MOSI,SD_SPI_MOSI -57,PC4,,GPIO_Output,SD_SPI_CS -58,PC5,,Reset_State, -59,VDD,,Power, -60,VSS,,Power, -61,PB0,,Reset_State, -62,PB1,,ADC1_IN9,SENSOR_LIGHT_ADC_INPUT -63,PB2,,QUADSPI_CLK,QSPI_FLASH_CLK -64,PI15,,Reset_State, -65,PJ0,,GPIO_Input,SYS_POWER_CHECKUP_3V3 -66,PJ1,,GPIO_Input,SYS_POWER_CHECKUP_5V -67,PJ2,,DSIHOST_TE,MIPI_DSI_TE -68,PJ3,,GPIO_Output,WIFI_RESET -69,PJ4,,GPIO_Output,QSPI_FLASH_nCS_3 -70,PF11,,FMC_SDNRAS,FMC_SRAM_SDNRAS -71,PF12,,FMC_A6,FMC_SRAM_A6 -72,VSS,,Power, -73,VDD,,Power, -74,PF13,,FMC_A7,FMC_SRAM_A7 -75,PF14,,FMC_A8,FMC_SRAM_A8 -76,PF15,,FMC_A9,FMC_SRAM_A9 -77,PG0,,FMC_A10,FMC_SRAM_A10 -78,PG1,,FMC_A11,FMC_SRAM_A11 -79,PE7,,FMC_D4,FMC_SRAM_D4 -80,PE8,,FMC_D5,FMC_SRAM_D5 -81,PE9,,FMC_D6,FMC_SRAM_D6 -82,VSS,,Power, -83,VDD,,Power, -84,PE10,,FMC_D7,FMC_SRAM_D7 -85,PE11,,FMC_D8,FMC_SRAM_D8 -86,PE12,,FMC_D9,FMC_SRAM_D9 -87,PE13,,FMC_D10,FMC_SRAM_D10 -88,PE14,,FMC_D11,FMC_SRAM_D11 -89,PE15,,FMC_D12,FMC_SRAM_D12 -90,PB10,,QUADSPI_BK1_NCS,QSPI_FLASH_nCS -91,PB11,,Reset_State, -92,VCAP_1,,Power, -93,VSS,,Power, -94,VDD,,Power, -95,PJ5,,Reset_State, -96,PH6,,GPIO_Output,QSPI_FLASH_nCS_2 -97,PH7,,I2C3_SCL,SENSOR_PROXIMITY_MUX_I2C_SCL -98,PH8,,FMC_D16,FMC_SRAM_D12 -99,PH9,,FMC_D17,FMC_SRAM_D13 -100,PH10,,FMC_D18,FMC_SRAM_D14 -101,PH11,,FMC_D19,FMC_SRAM_D15 -102,PH12,,FMC_D20,FMC_SRAM_D16 -103,VDD,,Power, -104,PB12,,Reset_State, -105,PB13,,SPI2_SCK,LED_EARS_SPI_SCK -106,PB14,,GPIO_Analog,SCREEN_BACKLIGHT_PWM -107,PB15,,SPI2_MOSI,LED_EARS_SPI_MOSI -108,PD8,,FMC_D13,FMC_SRAM_D13 -109,PD9,,FMC_D14,FMC_SRAM_D14 -110,PD10,,FMC_D15,FMC_SRAM_D15 -111,PD11,,QUADSPI_BK1_IO0,QSPI_FLASH_IO0 -112,PD12,,GPIO_Output,QSPI_FLASH_nCS_1 -113,PD13,,QUADSPI_BK1_IO3,QSPI_FLASH_IO3 -114,VSS,,Power, -115,VDD,,Power, -116,PD14,,FMC_D0,FMC_SRAM_D0 -117,PD15,,FMC_D1,FMC_SRAM_D1 -118,VDDDSI,,Power, -119,VCAPDSI,,Power, -120,DSIHOST_D0P,,DSIHOST_D0P,MIPI_DSI_D0P -121,DSIHOST_D0N,,DSIHOST_D0N,MIPI_DSI_D0N -122,VSSDSI,,Power, -123,DSIHOST_CKP,,DSIHOST_CKP,MIPI_DSI_CKP -124,DSIHOST_CKN,,DSIHOST_CKN,MIPI_DSI_CKN -125,VDD12DSI,,Power, -126,DSIHOST_D1P,,DSIHOST_D1P,MIPI_DSI_D1P -127,DSIHOST_D1N,,DSIHOST_D1N,MIPI_DSI_D1N -128,VSSDSI,,Power, -129,PG2,,Reset_State, -130,PG3,,Reset_State, -131,PG4,,FMC_BA0,FMC_SRAM_BA0 -132,PG5,,FMC_BA1,FMC_SRAM_BA1 -133,PG6,,Reset_State, -134,PG7,,GPIO_Output,BT_WAKE_UP -135,PG8,,FMC_SDCLK,FMC_SRAM_SDCLK -136,VSS,,Power, -137,VDDUSB,,Power, -138,PC6,,USART6_TX,BT_UART_TX -139,PC7,,USART6_RX,BT_UART_RX -140,PC8,,GPIO_Output,BT_RESET -141,PC9,,I2C3_SDA,SENSOR_PROXIMITY_MUX_I2C_SDA -142,PA8,,GPIO_Output,SOUND_ENABLE -143,PA9,,USART1_TX,SYS_PROG_VCP_TX -144,PA10,,USART1_RX,SYS_PROG_VCP_RX -145,PA11,,UART4_RX,RFID_UART_RX -146,PA12,,UART4_TX,RFID_UART_TX -147,PA13,,SYS_JTMS-SWDIO,SYS_PROG_SWDIO -148,VCAP_2,,Power, -149,VSS,,Power, -150,VDD,,Power, -151,PH13,,FMC_D21,FMC_SRAM_D21 -152,PH14,,FMC_D22,FMC_SRAM_D22 -153,PH15,,FMC_D23,FMC_SRAM_D23 -154,PI0,,FMC_D24,FMC_SRAM_D24 -155,PI1,,FMC_D25,FMC_SRAM_D25 -156,PI2,,FMC_D26,FMC_SRAM_D26 -157,PI3,,FMC_D27,FMC_SRAM_D27 -158,VDD,,Power, -159,PA14,,SYS_JTCK-SWCLK,SYS_PROG_SWCLK -160,PA15,,GPIO_EXTI15,SENSOR_MAGNETO_IRQ -161,PC10,,QUADSPI_BK1_IO1,QSPI_FLASH_IO1 -162,PC11,,Reset_State, -163,PC12,,GPIO_Output,WIFI_ENABLE -164,PD0,,FMC_D2,FMC_SRAM_D2 -165,PD1,,FMC_D3,FMC_SRAM_D2 -166,PD2,,Reset_State, -167,PD3,,USART2_CTS,WIFI_USART_CTS -168,PD4,,USART2_RTS,WIFI_USART_RTS -169,PD5,,USART2_TX,WIFI_USART_TX -170,VSS,,Power, -171,VDDSDMMC,,Power, -172,PD6,,Reset_State, -173,PD7,,Reset_State, -174,PJ12,,Reset_State, -175,PJ13,,Reset_State, -176,PJ14,,Reset_State, -177,PJ15,,GPIO_Output,MIPI_DSI_RESET -178,PG9,,GPIO_EXTI9,SENSOR_IMU_IRQ -179,PG10,,GPIO_EXTI10,SENSOR_PROXIMITY_MUX_IRQB -180,PG11,,Reset_State, -181,PG12,,Reset_State, -182,PG13,,SPI6_SCK,LED_BELT_SPI_SCK -183,PG14,,SPI6_MOSI,LED_BELT_SPI_MOSI -184,VSS,,Power, -185,VDD,,Power, -186,PK3,,Reset_State, -187,PK4,,Reset_State, -188,PK5,,Reset_State, -189,PK6,,Reset_State, -190,PK7,,Reset_State, -191,PG15,,FMC_SDNCAS,FMC_SRAM_SDNCAS -192,PB3,,SYS_JTDO-SWO,SYS_PROG_SWO -193,PB4,,Reset_State, -194,PB5,,GPIO_EXTI5,SENSOR_TEMPERATURE_IRQ -195,PB6,,I2C4_SCL,BATTERY_BMS_I2C_SCL -196,PB7,,I2C4_SDA,BATTERY_BMS_I2C_SDA -197,BOOT0,,Reset_State, -198,PB8,,I2C1_SCL,SENSOR_IMU_TH_I2C_SCL -199,PB9,,I2C1_SDA,SENSOR_IMU_TH_I2C_SDA -200,PE0,,FMC_NBL0,FMC_SRAM_NBL0 -201,PE1,,FMC_NBL1,FMC_SRAM_NBL1 -202,VSS,,Power, -203,PDR_ON,,Reset_State, -204,VDD,,Power, -205,PI4,,FMC_NBL2,FMC_SRAM_NBL2 -206,PI5,,FMC_NBL3,FMC_SRAM_NBL3 -207,PI6,,FMC_D28,FMC_SRAM_D28 -208,PI7,,FMC_D29,FMC_SRAM_D29 \ No newline at end of file diff --git a/targets/TARGET_LEKA_V1_1_DEV/system_clock.c b/targets/TARGET_LEKA_V1_1_DEV/system_clock.c deleted file mode 100644 index 8ec0545a73..0000000000 --- a/targets/TARGET_LEKA_V1_1_DEV/system_clock.c +++ /dev/null @@ -1,211 +0,0 @@ -/* mbed Microcontroller Library -* Copyright (c) 2006-2019 ARM Limited -* -* SPDX-License-Identifier: Apache-2.0 -* -* Licensed 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. -*/ - -/** - * This file configures the system clock as follows: - *-------------------------------------------------------------------- - * System clock source | 1- USE_PLL_HSE_EXTC (external 25 MHz clock) - * | 2- USE_PLL_HSE_XTAL (external 25 MHz xtal) - * | 3- USE_PLL_HSI (internal 16 MHz clock) - *-------------------------------------------------------------------- - * SYSCLK(MHz) | 216 - * AHBCLK (MHz) | 216 - * APB1CLK (MHz) | 54 - * APB2CLK (MHz) | 108 - * USB capable (48 MHz) | YES - *-------------------------------------------------------------------- -**/ - -#include "stm32f7xx.h" -#include "mbed_error.h" - -// clock source is selected with CLOCK_SOURCE in json config -#define USE_PLL_HSE_EXTC 0x8 // Use external clock (ST Link MCO) -#define USE_PLL_HSE_XTAL 0x4 // Use external xtal (X3 on board - not provided by default) -#define USE_PLL_HSI 0x2 // Use HSI internal clock - -#if ( ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) || ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) ) -uint8_t SetSysClock_PLL_HSE(uint8_t bypass); -#endif /* ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) || ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) */ - -#if ((CLOCK_SOURCE) & USE_PLL_HSI) -uint8_t SetSysClock_PLL_HSI(void); -#endif /* ((CLOCK_SOURCE) & USE_PLL_HSI) */ - - -/** - * @brief Configures the System clock source, PLL Multiplier and Divider factors, - * AHB/APBx prescalers and Flash settings - * @note This function should be called only once the RCC clock configuration - * is reset to the default reset state (done in SystemInit() function). - * @param None - * @retval None - */ - -void SetSysClock(void) -{ -#if ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) - /* 1- Try to start with HSE and external clock */ - if (SetSysClock_PLL_HSE(1) == 0) -#endif - { -#if ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) - /* 2- If fail try to start with HSE and external xtal */ - if (SetSysClock_PLL_HSE(0) == 0) -#endif - { -#if ((CLOCK_SOURCE) & USE_PLL_HSI) - /* 3- If fail start with HSI clock */ - if (SetSysClock_PLL_HSI() == 0) -#endif - { - { - error("SetSysClock failed\n"); - } - } - } - } - - // Output clock on MCO2 pin(PC9) for debugging purpose - // Can be visualized on CN8 connector pin 4 - //HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_SYSCLK, RCC_MCODIV_4); // 216 MHz / 4 = 54 MHz -} - -#if ( ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) || ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) ) -/******************************************************************************/ -/* PLL (clocked by HSE) used as System clock source */ -/******************************************************************************/ -uint8_t SetSysClock_PLL_HSE(uint8_t bypass) -{ - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; - RCC_PeriphCLKInitTypeDef RCC_PeriphClkInitStruct; - - // Enable power clock - __PWR_CLK_ENABLE(); - __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); - - // Select HSI as system clock source to allow modification of the PLL configuration - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI; - HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0); - - // Enable HSE oscillator and activate PLL with HSE as source - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; - if (bypass == 0) { - RCC_OscInitStruct.HSEState = RCC_HSE_ON; /* External xtal on OSC_IN/OSC_OUT */ - } else { - RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; /* External clock on OSC_IN */ - } - // Warning: this configuration is for a 25 MHz xtal clock only - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; - RCC_OscInitStruct.PLL.PLLM = 25; // VCO input clock = 1 MHz (25 MHz / 25) - RCC_OscInitStruct.PLL.PLLN = 432; // VCO output clock = 432 MHz (1 MHz * 432) - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; // PLLCLK = 216 MHz (432 MHz / 2) - RCC_OscInitStruct.PLL.PLLQ = 9; // USB clock = 48 MHz (432 MHz / 9) --> OK for USB - RCC_OscInitStruct.PLL.PLLR = 2; - - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { - return 0; // FAIL - } - - // Activate the OverDrive to reach the 216 MHz Frequency - if (HAL_PWREx_EnableOverDrive() != HAL_OK) { - return 0; // FAIL - } - - /* Select PLLSAI output as USB clock source */ - RCC_PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48; - RCC_PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48SOURCE_PLLSAIP; - RCC_PeriphClkInitStruct.PLLSAI.PLLSAIN = 384; - RCC_PeriphClkInitStruct.PLLSAI.PLLSAIQ = 7; - RCC_PeriphClkInitStruct.PLLSAI.PLLSAIP = RCC_PLLSAIP_DIV8; - if (HAL_RCCEx_PeriphCLKConfig(&RCC_PeriphClkInitStruct) != HAL_OK) { - return 0; // FAIL - } - - // Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers - RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; // 216 MHz - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; // 216 MHz - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; // 54 MHz - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; // 108 MHz - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7) != HAL_OK) { - return 0; // FAIL - } - - return 1; // OK -} -#endif /* ((CLOCK_SOURCE) & USE_PLL_HSE_XTAL) || ((CLOCK_SOURCE) & USE_PLL_HSE_EXTC) */ - -#if ((CLOCK_SOURCE) & USE_PLL_HSI) -/******************************************************************************/ -/* PLL (clocked by HSI) used as System clock source */ -/******************************************************************************/ -uint8_t SetSysClock_PLL_HSI(void) -{ - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; - - // Enable power clock - __PWR_CLK_ENABLE(); - - // Select HSI as system clock source to allow modification of the PLL configuration - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI; - HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0); - - // Enable HSI oscillator and activate PLL with HSI as source - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSEState = RCC_HSE_OFF; - RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16) - RCC_OscInitStruct.PLL.PLLN = 432; // VCO output clock = 432 MHz (1 MHz * 432) - RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; // PLLCLK = 216 MHz (432 MHz / 2) - RCC_OscInitStruct.PLL.PLLQ = 9; // USB clock = 48 MHz (432 MHz / 9) --> OK for USB - RCC_OscInitStruct.PLL.PLLR = 2; - - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { - return 0; // FAIL - } - - // Activate the OverDrive to reach the 216 MHz Frequency - if (HAL_PWREx_EnableOverDrive() != HAL_OK) { - return 0; // FAIL - } - - // Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers - RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; // 216 MHz - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; // 216 MHz - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; // 54 MHz - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; // 108 MHz - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7) != HAL_OK) { - return 0; // FAIL - } - - return 1; // OK - -} -#endif /* ((CLOCK_SOURCE) & USE_PLL_HSI) */ diff --git a/targets/custom_targets.json b/targets/custom_targets.json index 826cb44bb6..d958b2e562 100644 --- a/targets/custom_targets.json +++ b/targets/custom_targets.json @@ -42,92 +42,6 @@ "network-default-interface-type": "ETHERNET" } }, - "LEKA_V1_0_DEV": { - "inherits": [ - "MCU_STM32F7" - ], - "extra_labels_add": [ - "STM32F769xI", - "CORDIO" - ], - "components_add": [ - "BlueNRG_MS", - "SD", - "QSPIF" - ], - "supported_form_factors": [], - "features": [ - "BLE" - ], - "config": { - "flash_dual_bank": { - "help": "Default board configuration is Single Bank Flash. If you enable Dual Bank with ST Link Utility, set value to 1", - "value": "0" - } - }, - "detect_code": [ - "1234" - ], - "macros_add": [ - "STM32F769xx", - "HSE_VALUE=25000000" - ], - "device_has_add": [ - "QSPI" - ], - "device_has_remove": [ - "SPISLAVE", - "CAN" - ], - "device_name": "STM32F769NI", - "overrides": { - "network-default-interface-type": "WIFI", - "lse_available": false - } - }, - "LEKA_V1_1_DEV": { - "inherits": [ - "MCU_STM32F7" - ], - "extra_labels_add": [ - "STM32F769xI", - "CORDIO" - ], - "components_add": [ - "BlueNRG_MS", - "SD", - "QSPIF" - ], - "supported_form_factors": [], - "features": [ - "BLE" - ], - "config": { - "flash_dual_bank": { - "help": "Default board configuration is Single Bank Flash. If you enable Dual Bank with ST Link Utility, set value to 1", - "value": "0" - } - }, - "detect_code": [ - "1234" - ], - "macros_add": [ - "STM32F769xx", - "HSE_VALUE=25000000" - ], - "device_has_add": [ - "QSPI" - ], - "device_has_remove": [ - "SPISLAVE", - "CAN" - ], - "device_name": "STM32F769NI", - "overrides": { - "network-default-interface-type": "WIFI", - "lse_available": false - } - }, "LEKA_V1_2_DEV": { "inherits": [ "MCU_STM32F7" From 51cbd436ca26bbc08645b6b4009699afa2e806be Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 7 Jan 2022 21:35:23 +0100 Subject: [PATCH 04/19] :recycle: (cmake): Move mcuboot compile definitions to bootutil target Using target_compile_definitions instead of add_compile_definitions prevents definitions from being applied to all targets. This will allow us in the future to have different bootloaders if needed. --- CMakeLists.txt | 7 ------ .../templates/Template_MCUBoot_CMakeLists.txt | 19 ---------------- .../Template_MCUBoot_mbed_CMakeLists.txt | 22 +++++++++++++++++++ 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f7fcdf5947..28340e4966 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,13 +94,6 @@ link_libraries( CriticalSection ) -# Add external libraries -add_compile_definitions(MCUBOOT_BOOTLOADER_SIZE=0x40000) -add_compile_definitions(MCUBOOT_SCRATCH_SIZE=0x40000) -add_compile_definitions(MCUBOOT_SCRATCH_START_ADDR=0x081C0000) -add_compile_definitions(MCUBOOT_RSA_SIGNATURE_LENGTH=2048) -add_compile_definitions(MCUBOOT_SLOT_SIZE=0x200000-MCUBOOT_BOOTLOADER_SIZE-MCUBOOT_SCRATCH_SIZE) - add_subdirectory(${MCUBOOT_DIR}) add_subdirectory(${MBED_HTTP_DIR}) diff --git a/cmake/templates/Template_MCUBoot_CMakeLists.txt b/cmake/templates/Template_MCUBoot_CMakeLists.txt index 3886e1f0cc..f6e3fc6170 100644 --- a/cmake/templates/Template_MCUBoot_CMakeLists.txt +++ b/cmake/templates/Template_MCUBoot_CMakeLists.txt @@ -3,24 +3,5 @@ # Copyright 2021 APF France handicap # SPDX-License-Identifier: Apache-2.0 -add_compile_definitions(MCUBOOT_BOOTLOADER_SIZE=0x40000) - -add_compile_definitions(MCUBOOT_SCRATCH_SIZE=0x40000) -add_compile_definitions(MCUBOOT_SCRATCH_START_ADDR=0x081C0000) - -add_compile_definitions(MCUBOOT_CRYPTO_BACKEND=MBEDTLS) -add_compile_definitions(MCUBOOT_SIGNATURE_ALGORITHM=SIGNATURE_TYPE_RSA) -add_compile_definitions(MCUBOOT_RSA_SIGNATURE_LENGTH=2048) - -add_compile_definitions(MCUBOOT_LOG_BOOTLOADER_ONLY=true) -add_compile_definitions(MCUBOOT_LOG_LEVEL=MCUBOOT_LOG_LEVEL_DEBUG) - -add_compile_definitions(MCUBOOT_PRIMARY_SLOT_START_ADDR=0x08040000) -add_compile_definitions(MCUBOOT_SLOT_SIZE=0x200000-MCUBOOT_BOOTLOADER_SIZE-MCUBOOT_SCRATCH_SIZE) -add_compile_definitions(MCUBOOT_VALIDATE_PRIMARY_SLOT=true) - -add_compile_definitions(MCUBOOT_READ_GRANULARITY=1) -add_compile_definitions(MCUBOOT_MAX_IMG_SECTORS=512) - add_subdirectory(${MCUBOOT_DIR}/bootutil) add_subdirectory(${MCUBOOT_DIR}/mbed) diff --git a/cmake/templates/Template_MCUBoot_mbed_CMakeLists.txt b/cmake/templates/Template_MCUBoot_mbed_CMakeLists.txt index abd8c25aa4..d4db5b9cff 100644 --- a/cmake/templates/Template_MCUBoot_mbed_CMakeLists.txt +++ b/cmake/templates/Template_MCUBoot_mbed_CMakeLists.txt @@ -3,6 +3,28 @@ # Copyright 2021 APF France handicap # SPDX-License-Identifier: Apache-2.0 +target_compile_definitions(bootutil + PUBLIC + MCUBOOT_BOOTLOADER_SIZE=0x40000 + + MCUBOOT_SCRATCH_SIZE=0x40000 + MCUBOOT_SCRATCH_START_ADDR=0x081C0000 + + MCUBOOT_CRYPTO_BACKEND=MBEDTLS + MCUBOOT_SIGNATURE_ALGORITHM=SIGNATURE_TYPE_RSA + MCUBOOT_RSA_SIGNATURE_LENGTH=2048 + + MCUBOOT_LOG_BOOTLOADER_ONLY=true + MCUBOOT_LOG_LEVEL=MCUBOOT_LOG_LEVEL_DEBUG + + MCUBOOT_PRIMARY_SLOT_START_ADDR=0x08040000 + MCUBOOT_SLOT_SIZE=0x200000-MCUBOOT_BOOTLOADER_SIZE-MCUBOOT_SCRATCH_SIZE + MCUBOOT_VALIDATE_PRIMARY_SLOT=true + + MCUBOOT_READ_GRANULARITY=1 + MCUBOOT_MAX_IMG_SECTORS=512 +) + target_include_directories(bootutil PUBLIC ./ From 1d391f54ae85bd77d90ed81d5d9835033dad30ea Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 7 Jan 2022 22:05:10 +0100 Subject: [PATCH 05/19] :truck: (cmake): Move & rename mbed cmake templates --- Makefile | 4 ++-- .../{Template_MbedOS_mbedignore.txt => mbed/.mbedignore} | 0 .../{Template_MbedOS_CMakelists.txt => mbed/CMakeLists.txt} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename cmake/templates/{Template_MbedOS_mbedignore.txt => mbed/.mbedignore} (100%) rename cmake/templates/{Template_MbedOS_CMakelists.txt => mbed/CMakeLists.txt} (100%) diff --git a/Makefile b/Makefile index 9da716c83f..2526046d25 100644 --- a/Makefile +++ b/Makefile @@ -266,8 +266,8 @@ mbed_curl: mbed_symlink_files: @echo "" @echo "πŸ”— Symlinking templates to Mbed OS directory πŸ—‚οΈ" - ln -srf $(CMAKE_DIR)/templates/Template_MbedOS_CMakelists.txt $(MBED_OS_DIR)/CMakeLists.txt - ln -srf $(CMAKE_DIR)/templates/Template_MbedOS_mbedignore.txt $(MBED_OS_DIR)/.mbedignore + ln -srf $(CMAKE_DIR)/templates/mbed/CMakeLists.txt $(MBED_OS_DIR)/CMakeLists.txt + ln -srf $(CMAKE_DIR)/templates/mbed/.mbedignore $(MBED_OS_DIR)/.mbedignore # # MARK: - Mcuboot targets diff --git a/cmake/templates/Template_MbedOS_mbedignore.txt b/cmake/templates/mbed/.mbedignore similarity index 100% rename from cmake/templates/Template_MbedOS_mbedignore.txt rename to cmake/templates/mbed/.mbedignore diff --git a/cmake/templates/Template_MbedOS_CMakelists.txt b/cmake/templates/mbed/CMakeLists.txt similarity index 100% rename from cmake/templates/Template_MbedOS_CMakelists.txt rename to cmake/templates/mbed/CMakeLists.txt From e2dc6d2eed59e9e9c51932c15d44678551f39892 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 7 Jan 2022 22:09:43 +0100 Subject: [PATCH 06/19] :truck: (cmake): Move & rename mcuboot cmake templates --- Makefile | 4 ++-- .../{Template_MCUBoot_CMakeLists.txt => mcuboot/boot.cmake} | 0 .../mbed.cmake} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename cmake/templates/{Template_MCUBoot_CMakeLists.txt => mcuboot/boot.cmake} (100%) rename cmake/templates/{Template_MCUBoot_mbed_CMakeLists.txt => mcuboot/mbed.cmake} (100%) diff --git a/Makefile b/Makefile index 2526046d25..105cafb021 100644 --- a/Makefile +++ b/Makefile @@ -284,8 +284,8 @@ mcuboot_clone: mcuboot_symlink_files: @echo "" @echo "πŸ”— Symlinking CMakeLists.txt to MCUBoot directory πŸ—‚οΈ" - ln -srf $(CMAKE_DIR)/templates/Template_MCUBoot_CMakeLists.txt $(MCUBOOT_DIR)/boot/CMakeLists.txt - ln -srf $(CMAKE_DIR)/templates/Template_MCUBoot_mbed_CMakeLists.txt $(MCUBOOT_DIR)/boot/mbed/CMakeLists.txt + ln -srf $(CMAKE_DIR)/templates/mcuboot/boot.cmake $(MCUBOOT_DIR)/boot/CMakeLists.txt + ln -srf $(CMAKE_DIR)/templates/mcuboot/mbed.cmake $(MCUBOOT_DIR)/boot/mbed/CMakeLists.txt # # MARK: - Utils targets diff --git a/cmake/templates/Template_MCUBoot_CMakeLists.txt b/cmake/templates/mcuboot/boot.cmake similarity index 100% rename from cmake/templates/Template_MCUBoot_CMakeLists.txt rename to cmake/templates/mcuboot/boot.cmake diff --git a/cmake/templates/Template_MCUBoot_mbed_CMakeLists.txt b/cmake/templates/mcuboot/mbed.cmake similarity index 100% rename from cmake/templates/Template_MCUBoot_mbed_CMakeLists.txt rename to cmake/templates/mcuboot/mbed.cmake From be59abe6f8f4001361c712f7486af2e2bc24b801 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 7 Jan 2022 22:36:43 +0100 Subject: [PATCH 07/19] :green_heart: (cache): Pull extern deps when hash of template files has changed --- .github/actions/setup/action.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index d05bcfc31e..1e16dab720 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -88,7 +88,14 @@ runs: path: | extern/mbed-os extern/mcuboot - key: ${{ runner.os }}-global_cache-extern_dependencies-${{ hashFiles('.mbed_version', '.mbed_git_url', '.mcuboot_version') }} + key: ${{ runner.os }}-global_cache-extern_dependencies-${{ hashFiles('.mbed_version', '.mbed_git_url', '.mcuboot_version', 'cmake/templates/mbed/.mbedignore', 'cmake/templates/mbed/CMakeLists.txt', 'cmake/templates/mcuboot/boot.cmake', 'cmake/templates/mcuboot/mbed.cmake') }} + + - name: Pull extern dependencies + if: steps.global_cache-extern_dependencies.outputs.cache-hit != 'true' + shell: bash + run: | + make mbed_curl + make mcuboot_clone - name: Cache ccache id: global_cache-ccache @@ -133,14 +140,3 @@ runs: mbed-cli --help mbed-tools --help imgtool --help - - # - # Mark: - Extern dependencies - # - - - name: Pull extern dependencies - if: steps.global_cache-extern_dependencies.outputs.cache-hit != 'true' - shell: bash - run: | - make mbed_curl - make mcuboot_clone From eb4745504675081e614befe3001a3ff365dd8d13 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Fri, 7 Jan 2022 23:23:38 +0100 Subject: [PATCH 08/19] :green_heart: (workflows): Curl extern deps if cache hit is false --- .github/actions/setup/action.yml | 2 +- .../ci-code_analysis-compare_bin_map_files.yml | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 1e16dab720..da021d7505 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -88,7 +88,7 @@ runs: path: | extern/mbed-os extern/mcuboot - key: ${{ runner.os }}-global_cache-extern_dependencies-${{ hashFiles('.mbed_version', '.mbed_git_url', '.mcuboot_version', 'cmake/templates/mbed/.mbedignore', 'cmake/templates/mbed/CMakeLists.txt', 'cmake/templates/mcuboot/boot.cmake', 'cmake/templates/mcuboot/mbed.cmake') }} + key: ${{ runner.os }}-global_cache-extern_dependencies-${{ hashFiles('.mbed_version', '.mbed_git_url', '.mcuboot_version', 'cmake/templates/**') }} - name: Pull extern dependencies if: steps.global_cache-extern_dependencies.outputs.cache-hit != 'true' diff --git a/.github/workflows/ci-code_analysis-compare_bin_map_files.yml b/.github/workflows/ci-code_analysis-compare_bin_map_files.yml index 10e5d93570..24d4543b2b 100644 --- a/.github/workflows/ci-code_analysis-compare_bin_map_files.yml +++ b/.github/workflows/ci-code_analysis-compare_bin_map_files.yml @@ -32,6 +32,7 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Setup CI + id: setup_ci uses: ./.github/actions/setup with: ccache_name: code_analysis-compare_files @@ -44,9 +45,8 @@ jobs: run: | git checkout ${{ env.BASE_REF }} make deep_clean - if [[ "$BASE_MBED_VERSION" != "$HEAD_MBED_VERSION" ]]; then - make mbed_curl VERSION=${{ env.BASE_MBED_VERSION }} - fi + make mbed_curl VERSION=${{ env.BASE_MBED_VERSION }} + make mcuboot_clone make config ${{ matrix.enable_log_debug }} make @@ -61,9 +61,8 @@ jobs: run: | git checkout ${{ env.HEAD_REF }} make deep_clean - if [[ "$BASE_MBED_VERSION" != "$HEAD_MBED_VERSION" ]]; then - make mbed_curl VERSION=${{ env.HEAD_MBED_VERSION }} - fi + make mbed_curl VERSION=${{ env.HEAD_MBED_VERSION }} + make mcuboot_clone make config ${{ matrix.enable_log_debug }} make From 004d4417005460958b2c322df8607363656c6264 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sat, 8 Jan 2022 00:21:56 +0100 Subject: [PATCH 09/19] :fire: (cmake): Delete MbedUnitTests related code/files --- cmake/MbedUnitTests.cmake | 79 -------------------- cmake/templates/mbed/CMakeLists.txt | 4 +- cmake/utils/AddMbedExecutable.cmake | 13 ---- cmake/utils/AddMbedUnitTestsExecutable.cmake | 25 ------- mbed-cmake.cmake | 27 +------ 5 files changed, 3 insertions(+), 145 deletions(-) delete mode 100644 cmake/MbedUnitTests.cmake delete mode 100644 cmake/utils/AddMbedUnitTestsExecutable.cmake diff --git a/cmake/MbedUnitTests.cmake b/cmake/MbedUnitTests.cmake deleted file mode 100644 index 164f302b73..0000000000 --- a/cmake/MbedUnitTests.cmake +++ /dev/null @@ -1,79 +0,0 @@ -# This file is called by mbed-src/CMakeLists.txt when unit tests are active -# and we only want to build a stub that contains all the headers. - -project(mbed-os) - -# Unit test stub include dirs (list adapted from mbed-src/UNITTESTS/CMakeLists.txt) -set(unittest_includes_base - "${ROOT_DIR}/extern/mbed-os/UNITTESTS/target_h" - "${ROOT_DIR}/extern/mbed-os/events/tests/UNITTESTS/target_h" - "${ROOT_DIR}/extern/mbed-os/events/tests/UNITTESTS/target_h/equeue" - "${ROOT_DIR}/extern/mbed-os/UNITTESTS/target_h/platform" - "${ROOT_DIR}/extern/mbed-os/UNITTESTS/target_h/platform/cxxsupport" - "${ROOT_DIR}/extern/mbed-os/UNITTESTS/target_h/drivers" - "${ROOT_DIR}/extern/mbed-os/UNITTESTS/target_h/rtos/include" - "${ROOT_DIR}/extern/mbed-os/UNITTESTS/stubs" - "${ROOT_DIR}/extern/mbed-os" - "${ROOT_DIR}/extern/mbed-os/features" - "${ROOT_DIR}/extern/mbed-os/platform/include" - "${ROOT_DIR}/extern/mbed-os/platform/include/platform" - "${ROOT_DIR}/extern/mbed-os/platform/mbed-trace/include" - "${ROOT_DIR}/extern/mbed-os/storage/filesystem/littlefs/include" - "${ROOT_DIR}/extern/mbed-os/storage/filesystem/fat/include" - "${ROOT_DIR}/extern/mbed-os/storage/blockdevice/include" - "${ROOT_DIR}/extern/mbed-os/storage/filesystem/include" - "${ROOT_DIR}/extern/mbed-os/storage/kvstore/include" - "${ROOT_DIR}/extern/mbed-os/storage/kvstore/kv_config" - "${ROOT_DIR}/extern/mbed-os/storage/kvstore/kv_config/include" - "${ROOT_DIR}/extern/mbed-os/drivers" - "${ROOT_DIR}/extern/mbed-os/drivers/include" - "${ROOT_DIR}/extern/mbed-os/drivers/include/drivers" - "${ROOT_DIR}/extern/mbed-os/drivers/include/drivers/internal" - "${ROOT_DIR}/extern/mbed-os/hal" - "${ROOT_DIR}/extern/mbed-os/hal/include" - "${ROOT_DIR}/extern/mbed-os/events/include" - "${ROOT_DIR}/extern/mbed-os/events/include/events/internal" - "${ROOT_DIR}/extern/mbed-os/events/source" - "${ROOT_DIR}/extern/mbed-os/rtos/include" - "${ROOT_DIR}/extern/mbed-os/features/frameworks" - "${ROOT_DIR}/extern/mbed-os/connectivity/libraries/nanostack-libservice" - "${ROOT_DIR}/extern/mbed-os/connectivity/libraries/nanostack-libservice/mbed-client-libservice" - "${ROOT_DIR}/extern/mbed-os/connectivity/netsocket/include" - "${ROOT_DIR}/extern/mbed-os/features/filesystem/fat" - "${ROOT_DIR}/extern/mbed-os/features/filesystem/fat/ChaN" - "${ROOT_DIR}/extern/mbed-os/features/filesystem/bd" - "${ROOT_DIR}/extern/mbed-os/features/filesystem/" - "${ROOT_DIR}/extern/mbed-os/features/filesystem/littlefs" - "${ROOT_DIR}/extern/mbed-os/features/filesystem/littlefs/littlefs" - "${ROOT_DIR}/extern/mbed-os/connectivity/cellular/include/cellular/framework/API" - "${ROOT_DIR}/extern/mbed-os/connectivity/cellular/include/cellular/framework/AT" - "${ROOT_DIR}/extern/mbed-os/connectivity/cellular/include/cellular/framework/device" - "${ROOT_DIR}/extern/mbed-os/connectivity/cellular/include/cellular/framework" - "${ROOT_DIR}/extern/mbed-os/connectivity/cellular/include/cellular/framework/common" - "${ROOT_DIR}/extern/mbed-os/connectivity" - "${ROOT_DIR}/extern/mbed-os/connectivity/lorawan/include/lorawan" - "${ROOT_DIR}/extern/mbed-os/connectivity/lorawan/lorastack" - "${ROOT_DIR}/extern/mbed-os/connectivity/lorawan/lorastack/mac" - "${ROOT_DIR}/extern/mbed-os/connectivity/lorawan/lorastack/phy" - "${ROOT_DIR}/extern/mbed-os/connectivity/lorawan" - "${ROOT_DIR}/extern/mbed-os/connectivity/mbedtls" - "${ROOT_DIR}/extern/mbed-os/connectivity/mbedtls/include" -) - -# create final library target which refers to MBed OS stubs -add_library(mbed-os INTERFACE) -target_compile_options(mbed-os INTERFACE -include${ROOT_DIR}/tests/unit/utest/mbed_config_utest.h) -target_include_directories(mbed-os INTERFACE ${unittest_includes_base}) - -# fix error with missing types when building for MinGW -set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h") -check_all_types(uid_t gid_t nlink_t) -if(NOT HAVE_UID_T) - target_compile_definitions(mbed-os INTERFACE uid_t=int) -endif() -if(NOT HAVE_GID_T) - target_compile_definitions(mbed-os INTERFACE gid_t=int) -endif() -if(NOT HAVE_NLINK_T) - target_compile_definitions(mbed-os INTERFACE nlink_t=int) -endif() diff --git a/cmake/templates/mbed/CMakeLists.txt b/cmake/templates/mbed/CMakeLists.txt index 359e8db917..fc929301c7 100644 --- a/cmake/templates/mbed/CMakeLists.txt +++ b/cmake/templates/mbed/CMakeLists.txt @@ -1,8 +1,6 @@ # include correct mbed-cmake buildfile based on toolchain -if(MBED_UNITTESTS) - include(MbedUnitTests) -elseif("${MBED_TOOLCHAIN_NAME}" STREQUAL "ARMC6") +if("${MBED_TOOLCHAIN_NAME}" STREQUAL "ARMC6") include(ToolchainArmClangBuild) elseif("${MBED_TOOLCHAIN_NAME}" STREQUAL "GCC_ARM") include(ToolchainGCCArmBuild) diff --git a/cmake/utils/AddMbedExecutable.cmake b/cmake/utils/AddMbedExecutable.cmake index 4446ef6c36..22df988124 100644 --- a/cmake/utils/AddMbedExecutable.cmake +++ b/cmake/utils/AddMbedExecutable.cmake @@ -96,16 +96,3 @@ function(add_mbed_executable EXECUTABLE) # gen_upload_target(${EXECUTABLE} ${BIN_FILE}) endfunction(add_mbed_executable) - -# When in not unit testing mode, we want buildfiles to still process OK. -# However, unit tests can't build for the MBed itself. -# So, add_mbed_unit_test is a no-op. -function(add_mbed_unit_test EXECUTABLE) - - # unit tests active -- create a dummy target that only exists so setting properties on it doesn't fail. - add_executable(${EXECUTABLE} ${MBED_CMAKE_SOURCE_DIR}/cmake/dummy.cpp) - - # prevent this target from being built during normal make commands - set_property(TARGET ${EXECUTABLE} PROPERTY EXCLUDE_FROM_ALL TRUE) - -endfunction(add_mbed_unit_test) diff --git a/cmake/utils/AddMbedUnitTestsExecutable.cmake b/cmake/utils/AddMbedUnitTestsExecutable.cmake deleted file mode 100644 index 7881b209ae..0000000000 --- a/cmake/utils/AddMbedUnitTestsExecutable.cmake +++ /dev/null @@ -1,25 +0,0 @@ - - -# When in unit testing mode, we want buildfiles to still process OK. -# However, executables can't link correctly because mbed-os is stubbed out as headers. -# So, while libraries build normally, add_mbed_executable is a no-op. -function(add_mbed_executable EXECUTABLE) - - # unit tests active -- create a dummy target that only exists so setting properties on it doesn't fail. - add_executable(${EXECUTABLE} ${MBED_CMAKE_SOURCE_DIR}/cmake/dummy.cpp) - - # prevent this target from being built during normal make commands - set_property(TARGET ${EXECUTABLE} PROPERTY EXCLUDE_FROM_ALL TRUE) - -endfunction(add_mbed_executable) - - -# Convenience function to add an executable containing GTest unit tests. -# CTest will be used to run the tests. -# When unit test mode is disabled, this becomes a no-op. -function(add_mbed_unit_test EXECUTABLE) - add_executable(${EXECUTABLE} ${ARGN}) - target_link_libraries(${EXECUTABLE} GMock::Main) - - gtest_discover_tests(${EXECUTABLE}) -endfunction(add_mbed_unit_test) \ No newline at end of file diff --git a/mbed-cmake.cmake b/mbed-cmake.cmake index 8095a1059e..a2b8d6937d 100644 --- a/mbed-cmake.cmake +++ b/mbed-cmake.cmake @@ -107,38 +107,15 @@ endif() find_package(Python3 COMPONENTS Interpreter) -# Configure unit tests -# ------------------------------------------------------------- - -if(MBED_UNITTESTS) - # Build internal GTest. - # We use an internal GTest because hardly any platform has a complete package available - # for it for some reason. - # add_subdirectory(${MBED_CMAKE_SOURCE_DIR}/gtest-external-project) - # include(GoogleTest) - # enable_testing() -endif() - # load the Mbed CMake functions # ------------------------------------------------------------- -if(MBED_UNITTESTS) - include(AddMbedUnitTestsExecutable) -else() - include(AddMbedExecutable) -endif() +include(AddMbedExecutable) # Configure upload methods # ------------------------------------------------------------- -if(NOT MBED_UNITTESTS) - set(CMAKE_EXECUTABLE_SUFFIX .elf) - - # find upload tools - # find_package(OpenOCD) - # find_package(JLINK) - # include(SetUploadMethod) -endif() +set(CMAKE_EXECUTABLE_SUFFIX .elf) # add Mbed OS source # ------------------------------------------------------------- From 8bd9f7c0e7322357883b055ed0301e6ef1d0374d Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sat, 8 Jan 2022 10:12:50 +0100 Subject: [PATCH 10/19] :fire: (cmake): Delete unused USCRPL/mbed-cmake files --- cmake/utils/CopyBinToMbedBoard.cmake | 26 --- cmake/utils/FindJLINK.cmake | 40 ---- cmake/utils/FindOpenOCD.cmake | 50 ---- cmake/utils/FindPython3_Backported.cmake | 203 ---------------- cmake/utils/SetUploadMethod.cmake | 281 ----------------------- 5 files changed, 600 deletions(-) delete mode 100644 cmake/utils/CopyBinToMbedBoard.cmake delete mode 100644 cmake/utils/FindJLINK.cmake delete mode 100644 cmake/utils/FindOpenOCD.cmake delete mode 100644 cmake/utils/FindPython3_Backported.cmake delete mode 100644 cmake/utils/SetUploadMethod.cmake diff --git a/cmake/utils/CopyBinToMbedBoard.cmake b/cmake/utils/CopyBinToMbedBoard.cmake deleted file mode 100644 index ecb677d509..0000000000 --- a/cmake/utils/CopyBinToMbedBoard.cmake +++ /dev/null @@ -1,26 +0,0 @@ - -# CMake script which is invoked at install time to copy a bin file onto the mbed - -# arguments: -# BIN_FILE bin file to install -# MBED_PATH path to Mbed virtual thumb drive on the computer - -if(NOT (IS_DIRECTORY "${MBED_PATH}" AND EXISTS "${MBED_PATH}")) - message(FATAL_ERROR "No mbed detected at MBED_PATH \"${MBED_PATH}\" \ -Did you set MBED_PATH in CMake? -Did you try turning it on and off again? -Is it plugged in?") - return() -endif() - -# remove all other bin files on the device -file(GLOB OLD_BIN_FILES "${MBED_PATH}/*.bin") - -foreach(FILE ${OLD_BIN_FILES}) - file(REMOVE "${FILE}") - message(STATUS "Removed old bin file: ${FILE}") -endforeach() - -# now copy the new bin file in place -message(STATUS "Installing to mbed: ${BIN_FILE}") -file(COPY ${BIN_FILE} DESTINATION ${MBED_PATH}) diff --git a/cmake/utils/FindJLINK.cmake b/cmake/utils/FindJLINK.cmake deleted file mode 100644 index 802a8280de..0000000000 --- a/cmake/utils/FindJLINK.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# ---------------------------------------------- -# CMake finder for SEGGER's J-Link upload tools -# -# -# This module defines: -# JLINK - full path to jlink flash executable -# JLINK_GDBSERVER - full path to JLink command line GDB server -# JLINK_FOUND - whether or not the JLink executable was found - -set(JLINK_EXE_NAME JLinkExe) -set(JLINK_PATH "") -set(GDBSERVER_EXE_NAME JLinkGDBServer) - -# try to figure out where JLink may be installed. -if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") - - # on Windows, the default install location is in Program Files, under a folder called SEGGER then another folder with JLink then the version number. - file(GLOB JLINK_PATH "C:/Program Files*/SEGGER/Jlink*") - - # if we found multiple paths, check the one with the highest version number first - list(SORT JLINK_PATH) - list(REVERSE JLINK_PATH) - - # on Windows, it's jlink.exe - set(JLINK_EXE_NAME JLink) - - # on Windows, they add a CL suffix to differentiate against the GUI version - set(GDBSERVER_EXE_NAME JLinkGDBServerCL) -elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") - - # symlinks are supposed to get created here - set(JLINK_PATH /usr/local/bin) -endif() - -find_program(JLINK NAMES ${JLINK_EXE_NAME} PATHS ${JLINK_PATH} DOC "Path to the JLink flash executable") -find_program(JLINK_GDBSERVER NAMES ${GDBSERVER_EXE_NAME} PATHS ${JLINK_PATH} DOC "Path to the JLink GDB server") - -find_package_handle_standard_args(JLINK FOUND_VAR JLINK_FOUND REQUIRED_VARS JLINK JLINK_GDBSERVER) - - diff --git a/cmake/utils/FindOpenOCD.cmake b/cmake/utils/FindOpenOCD.cmake deleted file mode 100644 index b134f856da..0000000000 --- a/cmake/utils/FindOpenOCD.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# ---------------------------------------------- -# CMake finder for OpenOCD -# -# -# This module defines: -# OpenOCD - full path to OpenOCD executable -# OpenOCD_SCRIPT_DIR - Path containing OpenOCD scripts -# OpenOCD_FOUND - whether or not the OpenOCD executable was found - -set(OpenOCD_PATHS "") - -# try to figure out where JLink may be installed. -if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") - - # on Windows, assume that the user extracted the binaries to Program Files - - # if the host is 64 bit, there will be a Program Files (x86) folder - if(EXISTS "C:/Program Files (x86)") - file(GLOB OpenOCD_PATHS "C:/Program Files*/openocd-*/bin-x64") - else() - file(GLOB OpenOCD_PATHS "C:/Program Files/openocd-*/bin") - endif() - - # if we found multiple paths, check the one with the highest version number first - list(SORT OpenOCD_PATHS) - list(REVERSE OpenOCD_PATHS) - -endif() - -find_program(OpenOCD NAMES openocd PATHS ${OpenOCD_PATHS} DOC "Path to the openocd executable") - -# guess a script dir for each path found -set(OpenOCD_SCRIPT_DIR_HINTS "") -if(NOT "${OpenOCD_PATHS}" STREQUAL "") - list(APPEND OpenOCD_SCRIPT_DIR_HINTS HINTS) - foreach(PATH ${OpenOCD_PATHS}) - # location relative to executable in Windows package - list(APPEND OpenOCD_SCRIPT_DIR_HINTS ${PATH}/../scripts) - endforeach() -endif() - -find_path(OpenOCD_SCRIPT_DIR - NAMES interface/cmsis-dap.cfg - ${OpenOCD_SCRIPT_DIR_HINTS} - PATHS /usr/share/openocd/scripts/ - DOC "Path to OpenOCD scripts folder. Should contain interface/cmsis-dap.cfg.") - -find_package_handle_standard_args(OpenOCD FOUND_VAR OpenOCD_FOUND REQUIRED_VARS OpenOCD OpenOCD_SCRIPT_DIR) - - diff --git a/cmake/utils/FindPython3_Backported.cmake b/cmake/utils/FindPython3_Backported.cmake deleted file mode 100644 index 9ce746704a..0000000000 --- a/cmake/utils/FindPython3_Backported.cmake +++ /dev/null @@ -1,203 +0,0 @@ -# HAMSTER: backport of FindPython3 for earlier CMake verisons - -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindPython3 ------------ - -Find Python 3 interpreter, compiler and development environment (include -directories and libraries). - -Three components are supported: - -* ``Interpreter``: search for Python 3 interpreter -* ``Compiler``: search for Python 3 compiler. Only offered by IronPython. -* ``Development``: search for development artifacts (include directories and - libraries) -* ``NumPy``: search for NumPy include directories. - -If no ``COMPONENTS`` is specified, ``Interpreter`` is assumed. - -To ensure consistent versions between components ``Interpreter``, ``Compiler``, -``Development`` and ``NumPy``, specify all components at the same time:: - - find_package (Python3 COMPONENTS Interpreter Development) - -This module looks only for version 3 of Python. This module can be used -concurrently with :module:`FindPython2` module to use both Python versions. - -The :module:`FindPython` module can be used if Python version does not matter -for you. - -.. note:: - - If components ``Interpreter`` and ``Development`` are both specified, this - module search only for interpreter with same platform architecture as the one - defined by ``CMake`` configuration. This contraint does not apply if only - ``Interpreter`` component is specified. - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module defines the following :ref:`Imported Targets ` -(when :prop_gbl:`CMAKE_ROLE` is ``PROJECT``): - -``Python3::Interpreter`` - Python 3 interpreter. Target defined if component ``Interpreter`` is found. -``Python3::Compiler`` - Python 3 compiler. Target defined if component ``Compiler`` is found. -``Python3::Python`` - Python 3 library. Target defined if component ``Development`` is found. -``Python3::NumPy`` - NumPy library for Python 3. Target defined if component ``NumPy`` is found. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module will set the following variables in your project -(see :ref:`Standard Variable Names `): - -``Python3_FOUND`` - System has the Python 3 requested components. -``Python3_Interpreter_FOUND`` - System has the Python 3 interpreter. -``Python3_EXECUTABLE`` - Path to the Python 3 interpreter. -``Python3_INTERPRETER_ID`` - A short string unique to the interpreter. Possible values include: - * Python - * ActivePython - * Anaconda - * Canopy - * IronPython -``Python3_STDLIB`` - Standard platform independent installation directory. - - Information returned by - ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=True)``. -``Python3_STDARCH`` - Standard platform dependent installation directory. - - Information returned by - ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=True)``. -``Python3_SITELIB`` - Third-party platform independent installation directory. - - Information returned by - ``distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False)``. -``Python3_SITEARCH`` - Third-party platform dependent installation directory. - - Information returned by - ``distutils.sysconfig.get_python_lib(plat_specific=True,standard_lib=False)``. -``Python3_Compiler_FOUND`` - System has the Python 3 compiler. -``Python3_COMPILER`` - Path to the Python 3 compiler. Only offered by IronPython. -``Python3_COMPILER_ID`` - A short string unique to the compiler. Possible values include: - * IronPython -``Python3_Development_FOUND`` - System has the Python 3 development artifacts. -``Python3_INCLUDE_DIRS`` - The Python 3 include directories. -``Python3_LIBRARIES`` - The Python 3 libraries. -``Python3_LIBRARY_DIRS`` - The Python 3 library directories. -``Python3_RUNTIME_LIBRARY_DIRS`` - The Python 3 runtime library directories. -``Python3_VERSION`` - Python 3 version. -``Python3_VERSION_MAJOR`` - Python 3 major version. -``Python3_VERSION_MINOR`` - Python 3 minor version. -``Python3_VERSION_PATCH`` - Python 3 patch version. -``Python3_NumPy_FOUND`` - System has the NumPy. -``Python3_NumPy_INCLUDE_DIRS`` - The NumPy include directries. -``Python3_NumPy_VERSION`` - The NumPy version. - -Hints -^^^^^ - -``Python3_ROOT_DIR`` - Define the root directory of a Python 3 installation. - -``Python3_USE_STATIC_LIBS`` - * If not defined, search for shared libraries and static libraries in that - order. - * If set to TRUE, search **only** for static libraries. - * If set to FALSE, search **only** for shared libraries. - -``Python3_FIND_REGISTRY`` - On Windows the ``Python3_FIND_REGISTRY`` variable determine the order - of preference between registry and environment variables. - The ``Python3_FIND_REGISTRY`` variable can be set to empty or one of the - following: - - * ``FIRST``: Try to use registry before environment variables. - This is the default. - * ``LAST``: Try to use registry after environment variables. - * ``NEVER``: Never try to use registry. - -``CMAKE_FIND_FRAMEWORK`` - On macOS the :variable:`CMAKE_FIND_FRAMEWORK` variable determine the order of - preference between Apple-style and unix-style package components. - - .. note:: - - Value ``ONLY`` is not supported so ``FIRST`` will be used instead. - -``Python3_FIND_VIRTUALENV`` - This variable defines the handling of virtual environments. It is meaningfull - only when a virtual environment is active (i.e. the ``activate`` script has - been evaluated). In this case, it takes precedence over - ``Python3_FIND_REGISTRY`` and ``CMAKE_FIND_FRAMEWORK`` variables. - The ``Python3_FIND_VIRTUALENV`` variable can be set to empty or one of the - following: - - * ``FIRST``: The virtual environment is used before any other standard - paths to look-up for the interpreter. This is the default. - * ``ONLY``: Only the virtual environment is used to look-up for the - interpreter. - * ``STANDARD``: The virtual environment is not used to look-up for the - interpreter. In this case, variable ``Python3_FIND_REGISTRY`` (Windows) - or ``CMAKE_FIND_FRAMEWORK`` (macOS) can be set with value ``LAST`` or - ``NEVER`` to select preferably the interpreter from the virtual - environment. - -Commands -^^^^^^^^ - -This module defines the command ``Python3_add_library`` (when -:prop_gbl:`CMAKE_ROLE` is ``PROJECT``), which has the same semantics as -:command:`add_library`, but takes care of Python module naming rules -(only applied if library is of type ``MODULE``), and adds a dependency to target -``Python3::Python``:: - - Python3_add_library (my_module MODULE src1.cpp) - -If library type is not specified, ``MODULE`` is assumed. -#]=======================================================================] - - -set(_PYTHON_PREFIX Python3) - -set(_Python3_REQUIRED_VERSION_MAJOR 3) - -include(${CMAKE_CURRENT_LIST_DIR}/FindPythonSupport.cmake) - -if (COMMAND __Python3_add_library) - macro (Python3_add_library) - __Python3_add_library (Python3 ${ARGV}) - endmacro() -endif() - -unset(_PYTHON_PREFIX) \ No newline at end of file diff --git a/cmake/utils/SetUploadMethod.cmake b/cmake/utils/SetUploadMethod.cmake deleted file mode 100644 index 4f38db27c9..0000000000 --- a/cmake/utils/SetUploadMethod.cmake +++ /dev/null @@ -1,281 +0,0 @@ -# CMakeLists file to handle the different upload methods to mbed targets - -# Step 1: determine supported upload methods -# ------------------------------------------------------------- - -set(UPLOAD_METHOD_DEFAULT NONE) - -# Start with NONE upload method which does not allow any uploading -set(SUPPORTED_UPLOAD_METHODS NONE) - -# Mbed is always supported -list(APPEND SUPPORTED_UPLOAD_METHODS MBED) - -# JLINK requires the J-link package -if(JLINK_FOUND) - list(APPEND SUPPORTED_UPLOAD_METHODS JLINK) -endif() - -# NXPPROG requires pyserial -check_python_package(serial HAVE_PYSERIAL) -if(HAVE_PYSERIAL) - list(APPEND SUPPORTED_UPLOAD_METHODS NXPPROG) -endif() - -# pyOCD requires pyocd -check_python_package(pyocd HAVE_PYOCD) -if(HAVE_PYOCD) - list(APPEND SUPPORTED_UPLOAD_METHODS PYOCD) -endif() - -# OPENOCD required openocd -if(OpenOCD_FOUND) - list(APPEND SUPPORTED_UPLOAD_METHODS OPENOCD) -endif() - - -# decide default method based on what can work -# ------------------------------------------------------------- - - -set(UPLOAD_METHOD "${UPLOAD_METHOD_DEFAULT}" CACHE STRING "Method for uploading programs to the mbed") - -if((NOT "${UPLOAD_METHOD}" STREQUAL "NONE") AND (NOT "${${UPLOAD_METHOD}_UPLOAD_ENABLED}")) - message(FATAL_ERROR "The upload method ${UPLOAD_METHOD} is not enabled for this project.") -endif() - -if(NOT "${UPLOAD_METHOD}" IN_LIST SUPPORTED_UPLOAD_METHODS) - message(FATAL_ERROR "The upload method ${UPLOAD_METHOD} cannot run on this system due to missing prerequisites. See its docs for details.") -endif() - -message(STATUS "Board upload method set to ${UPLOAD_METHOD}") - - -# path where the gdbinit file will be written -set(GDBINIT_PATH ${CMAKE_CURRENT_BINARY_DIR}/mbed-cmake.gdbinit) - - -# create function to upload code -# ------------------------------------------------------------- -if("${UPLOAD_METHOD}" STREQUAL NONE) - function(gen_upload_target TARGET_NAME BIN_FILE) - add_custom_target(flash-${TARGET_NAME} - COMMAND ${CMAKE_COMMAND} - -E echo "Cannot flash, no UPLOAD_METHOD configured!") - - add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME}) - - endfunction(gen_upload_target) - -elseif("${UPLOAD_METHOD}" STREQUAL MBED) - - set(MBED_PATH "" CACHE PATH "Path to mbed virtual device to upload to") - - function(gen_upload_target TARGET_NAME BIN_FILE) - - add_custom_target(flash-${TARGET_NAME} - COMMAND ${CMAKE_COMMAND} - -DBIN_FILE=${BIN_FILE} - -DMBED_PATH=${MBED_PATH} - -P ${MBED_CMAKE_SOURCE_DIR}/cmake/install_bin_file.cmake) - - add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME}) - - endfunction(gen_upload_target) - -elseif("${UPLOAD_METHOD}" STREQUAL "JLINK") - - set(GENERATE_GDBINIT TRUE) - - function(gen_upload_target TARGET_NAME BIN_FILE) - - # create command file for j-link - set(COMMAND_FILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/flash-${TARGET_NAME}.jlink) - file(GENERATE OUTPUT ${COMMAND_FILE_PATH} CONTENT -" -loadbin ${BIN_FILE}, 0x0 -r -exit -") - add_custom_target(flash-${TARGET_NAME} - COMMENT "Flashing ${TARGET_NAME} with J-Link..." - COMMAND ${JLINK} - -Device ${JLINK_CPU_NAME} - -Speed ${JLINK_JTAG_SPEED} - -if JTAG - -JTAGConf -1,-1 - -AutoConnect 1 - -ExitOnError - -CommandFile ${COMMAND_FILE_PATH}) - - - add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME}) - - # create debug target - add_custom_target(debug-${TARGET_NAME} - COMMENT "starting GDB to debug ${TARGET_NAME}..." - COMMAND arm-none-eabi-gdb - --command=${GDBINIT_PATH} - $) - - - add_dependencies(debug-${TARGET_NAME} ${TARGET_NAME}) - - endfunction(gen_upload_target) - - # also create a target to run GDB server - add_custom_target(start-gdbserver - COMMENT "Starting J-Link GDB server" - COMMAND - "${JLINK_GDBSERVER}" - -Select USB - -Device ${JLINK_CPU_NAME} - -Speed ${JLINK_JTAG_SPEED} - -endian little - -if JTAG - -JTAGConf -1,-1 - -LocalhostOnly - -noIR - -port ${GDB_PORT} - ) - -elseif("${UPLOAD_METHOD}" STREQUAL "PYOCD") - - set(GENERATE_GDBINIT TRUE) - - set(PYOCD_PROBE_ARGS "") - if(DEFINED PYOCD_PROBE_UID) - if(NOT "${PYOCD_PROBE_UID}" STREQUAL "") - set(PYOCD_PROBE_ARGS --probe ${PYOCD_PROBE_UID}) - endif() - endif() - - function(gen_upload_target TARGET_NAME BIN_FILE) - - add_custom_target(flash-${TARGET_NAME} - COMMENT "Flashing ${TARGET_NAME} with pyOCD..." - COMMAND ${Python3_EXECUTABLE} - -m pyocd - flash - -v - --no-wait - -t ${PYOCD_TARGET_NAME} - ${PYOCD_PROBE_ARGS} - ${BIN_FILE}) - - - add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME}) - - # create debug target - add_custom_target(debug-${TARGET_NAME} - COMMENT "starting GDB to debug ${TARGET_NAME}..." - COMMAND arm-none-eabi-gdb - --command=${GDBINIT_PATH} - $) - - - add_dependencies(debug-${TARGET_NAME} ${TARGET_NAME}) - - endfunction(gen_upload_target) - - # also create a target to run GDB server - add_custom_target(start-gdbserver - COMMENT "Starting pyOCD GDB server" - COMMAND - ${Python3_EXECUTABLE} - -m pyocd - gdbserver - -v - --no-wait - -t ${PYOCD_TARGET_NAME} - ${PYOCD_PROBE_ARGS} - -f ${PYOCD_JTAG_SPEED} - -p ${GDB_PORT} - --persist - --semihosting - ) - -elseif("${UPLOAD_METHOD}" STREQUAL "OPENOCD") - - set(GENERATE_GDBINIT TRUE) - - function(gen_upload_target TARGET_NAME BIN_FILE) - - add_custom_target(flash-${TARGET_NAME} - COMMENT "Flashing ${TARGET_NAME} with OpenOCD..." - COMMAND ${OpenOCD} - ${OPENOCD_CHIP_CONFIG_COMMANDS} - -c init - -c "reset init" - -c "program ${BIN_FILE} reset exit") - - - add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME}) - - # create debug target - add_custom_target(debug-${TARGET_NAME} - COMMENT "starting GDB to debug ${TARGET_NAME}..." - COMMAND arm-none-eabi-gdb - --command=${GDBINIT_PATH} - $) - - - add_dependencies(debug-${TARGET_NAME} ${TARGET_NAME}) - - endfunction(gen_upload_target) - - # also create a target to run GDB server - add_custom_target(start-gdbserver - COMMENT "Starting OpenOCD GDB server" - COMMAND - ${OpenOCD} - ${OPENOCD_CHIP_CONFIG_COMMANDS} - -c "gdb_port ${GDB_PORT}" - -c init - -c "reset init" - ) - - - -elseif("${UPLOAD_METHOD}" STREQUAL NXPPROG) - - set(NXPPROG_COM_PORT "" CACHE STRING "COM port for bootloader upload. Should be \"COMXX\" on Windows, and /dev/ttyXX on Linux/Mac") - - message(STATUS "COM port for bootloader upload: ${NXPPROG_COM_PORT}") - - function(gen_upload_target TARGET_NAME BIN_FILE) - - if("${NXPPROG_COM_PORT}" STREQUAL "") - add_custom_target(flash-${TARGET_NAME} - COMMAND ${CMAKE_COMMAND} - -E echo "ERROR: Cannot flash, no COM_PORT configured!") - else() - add_custom_target(flash-${TARGET_NAME} - COMMENT "Flashing ${TARGET_NAME} through bootloader..." - COMMAND ${Python3_EXECUTABLE} ${MBED_CMAKE_SOURCE_DIR}/scripts/nxpprog.py - --control - --oscfreq=${NXPPROG_OSCFREQ} - --baud=${NXPPROG_BAUD} - ${NXPPROG_COM_PORT} - ${BIN_FILE}) - endif() - - add_dependencies(flash-${TARGET_NAME} ${TARGET_NAME}) - - endfunction(gen_upload_target) - -endif() - -# Common actions -# ------------------------------------------------------------- - - -if(GENERATE_GDBINIT) - - # create init file for GDB client - file(GENERATE OUTPUT ${GDBINIT_PATH} CONTENT - " -# connect to GDB server -target remote localhost:${GDB_PORT} -") -endif() From c40150e29cf65c7b2c5ef95197ea6d4e77aee1d3 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sat, 8 Jan 2022 10:15:31 +0100 Subject: [PATCH 11/19] :fire: (cmake): Delete unused ArmClang toolchain files --- cmake/ToolchainArmClangBuild.cmake | 88 ----------------------------- cmake/ToolchainArmClangDefine.cmake | 76 ------------------------- 2 files changed, 164 deletions(-) delete mode 100644 cmake/ToolchainArmClangBuild.cmake delete mode 100644 cmake/ToolchainArmClangDefine.cmake diff --git a/cmake/ToolchainArmClangBuild.cmake b/cmake/ToolchainArmClangBuild.cmake deleted file mode 100644 index c0f79b8532..0000000000 --- a/cmake/ToolchainArmClangBuild.cmake +++ /dev/null @@ -1,88 +0,0 @@ -# This file is called by mbed-src/CMakeLists.txt when the ArmClang compiler is used. - -project(mbed-os) - -get_filename_component(LINKER_SCRIPT_FILENAME "${MBED_LINKER_SCRIPT}" NAME_WE) -get_filename_component(LINKER_SCRIPT_DIR ${MBED_LINKER_SCRIPT} DIRECTORY) -get_filename_component(LINKER_SCRIPT_EXT ${MBED_LINKER_SCRIPT} LAST_EXT) - -set(PREPROCESSED_LINKER_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/${LINKER_SCRIPT_FILENAME}_fixed${LINKER_SCRIPT_EXT}) - -# for Arm Compiler, all we need to do is replace the shebang at the top with the correct command line -set(PREPROCESS_ARGS ${MCU_COMPILE_OPTIONS} ${ARMCLANG_CPU_OPTION} -E -x c) - -# build the shebang command following the logic in arm.py -list_to_space_separated(SHEBANG_COMMAND ${PREPROCESS_ARGS}) -set(SHEBANG_COMMAND "#! \"${CMAKE_C_COMPILER}\" ${SHEBANG_COMMAND} -I\"${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_SCRIPT_DIR}\"") - -# now replace it into the file -file(READ ${MBED_LINKER_SCRIPT} LINKER_SCRIPT_CONTENTS) -string(REGEX REPLACE "^#![^\n]+(.*)$" "${SHEBANG_COMMAND}\\1" PREPROC_LINKER_SCRIPT_CONTENTS "${LINKER_SCRIPT_CONTENTS}") -file(GENERATE OUTPUT ${PREPROCESSED_LINKER_SCRIPT} CONTENT "${PREPROC_LINKER_SCRIPT_CONTENTS}") - -# force all compilations to include the compile definitions files -# note: SHELL prefixes are a workaround for an annoying CMake issue: https://gitlab.kitware.com/cmake/cmake/issues/15826 -set(MBED_COMPILE_OPTIONS "SHELL:-include \"${MBED_CMAKE_CONFIG_HEADERS_PATH}/mbed_config.h\"" "SHELL:-include \"${MBED_CMAKE_CONFIG_HEADERS_PATH}/mbed_target_config.h\"") - -# convert include args for passing to preprocessor manually -set(PREPROCESSOR_INCLUDE_ARGS - -include ${MBED_CMAKE_CONFIG_HEADERS_PATH}/mbed_config.h - -include ${MBED_CMAKE_CONFIG_HEADERS_PATH}/mbed_target_config.h) - -foreach(INCLUDE_DIR ${MBED_INCLUDE_DIRS}) - list(APPEND PREPROCESSOR_INCLUDE_ARGS "-I${INCLUDE_DIR}") -endforeach() - -# Annoyingly, the ARMC6 assembler does not do preprocessing. So we have to give it a little help. -# This finds all assembler files (.S) in the source list, and adds a custom command to preprocess them. -# Also, the assembler files need to be linked as objects into the final version (something with the provided linker scripts???), -# they can't be in a .a file, so we have to build them separately. -set(OLD_MBED_SOURCE_FILES ${MBED_SOURCE_FILES}) -set(MBED_SOURCE_FILES "") -set(ASM_SOURCE_FILES "") -foreach(SOURCE_FILE ${OLD_MBED_SOURCE_FILES}) - get_filename_component(SOURCE_EXT ${SOURCE_FILE} LAST_EXT) - - if("${SOURCE_EXT}" STREQUAL ".S") - - # ASM file -- time to go DIY - get_filename_component(SOURCE_FILENAME ${SOURCE_FILE} NAME_WE) - get_filename_component(SOURCE_DIR ${SOURCE_FILE} DIRECTORY) - - set(PREPROCESSED_SOURCE_FILE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_DIR}) - file(MAKE_DIRECTORY ${PREPROCESSED_SOURCE_FILE_DIR}) - set(PREPROCESSED_SOURCE_FILE ${PREPROCESSED_SOURCE_FILE_DIR}/${SOURCE_FILENAME}_preproc.S) - - add_custom_command( - OUTPUT ${PREPROCESSED_SOURCE_FILE} - MAIN_DEPENDENCY ${SOURCE_FILE} - COMMAND ${CMAKE_C_COMPILER} ${PREPROCESS_ARGS} ${PREPROCESSOR_INCLUDE_ARGS} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE} -o ${PREPROCESSED_SOURCE_FILE} - COMMENT "Preprocessing ${SOURCE_FILE}" - VERBATIM) - - list(APPEND ASM_SOURCE_FILES ${PREPROCESSED_SOURCE_FILE}) - - else() - # not ASM file, keep - list(APPEND MBED_SOURCE_FILES ${SOURCE_FILE}) - endif() -endforeach() - -# Let's just say that Arm Compiler is not a big fan of .a libraries, at least when they contain things like -# weak symbols and code that calls ASM. -# I tried using a static library at first, and that just sent things into a massive bootloop that poured a -# deluge of crash reports through my terminal. -# Soooo... let's NOT do that. - -add_library(mbed-os-obj OBJECT ${ASM_SOURCE_FILES} ${MBED_SOURCE_FILES}) -target_compile_options(mbed-os-obj PUBLIC ${MBED_COMPILE_OPTIONS}) -target_include_directories(mbed-os-obj PUBLIC ${MBED_INCLUDE_DIRS}) - -# create final library target (interface which contains objects, link options, and compile flags) -add_library(mbed-os INTERFACE) -target_link_libraries(mbed-os INTERFACE - --scatter ${PREPROCESSED_LINKER_SCRIPT} - ${MBED_LINK_OPTIONS}) -target_sources(mbed-os INTERFACE $) -target_compile_options(mbed-os INTERFACE ${MBED_COMPILE_OPTIONS}) -target_include_directories(mbed-os INTERFACE ${MBED_INCLUDE_DIRS}) \ No newline at end of file diff --git a/cmake/ToolchainArmClangDefine.cmake b/cmake/ToolchainArmClangDefine.cmake deleted file mode 100644 index c16a7082e5..0000000000 --- a/cmake/ToolchainArmClangDefine.cmake +++ /dev/null @@ -1,76 +0,0 @@ -# CMake toolchain file to set compiler for the ArmClang toolchain - -SET(CMAKE_SYSTEM_NAME Generic) -SET(CMAKE_SYSTEM_VERSION 1) - -# specify the cross compiler -set(CMAKE_C_COMPILER armclang) -set(CMAKE_CXX_COMPILER armclang) - -set(CMAKE_C_COMPILER_ID ARMClang) -set(CMAKE_CXX_COMPILER_ID ARMClang) - -set(OLD_MCU_COMPILE_OPTIONS ${MCU_COMPILE_OPTIONS}) -set(MCU_COMPILE_OPTIONS "") -foreach(OPTION ${OLD_MCU_COMPILE_OPTIONS}) - - # remove some Mbed flags that shouldn't be in build commands (CMake auto adds these) - if(("${OPTION}" STREQUAL "-c") OR - ("${OPTION}" STREQUAL "-MMD")) - # don't add - elseif("${OPTION}" MATCHES "--target=(.*)") - - # parse out CPU target and tell CMake about it - set(CMAKE_C_COMPILER_TARGET ${CMAKE_MATCH_1}) - set(CMAKE_CXX_COMPILER_TARGET ${CMAKE_MATCH_1}) - set(CMAKE_ASM_COMPILER_TARGET ${CMAKE_MATCH_1}) - - list(APPEND MCU_COMPILE_OPTIONS ${OPTION}) - - set(ARMCLANG_TARGET_OPTION ${OPTION}) - - elseif("${OPTION}" MATCHES "-mcpu=(.*)") - - # parse out CPU name and set CMAKE_SYSTEM_PROCESSOR to it to prevent CMake error - set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1}) - set(ARMCLANG_CPU_OPTION ${OPTION}) # used for the preprocessor command - - else() - - # no special handling for this arg - list(APPEND MCU_COMPILE_OPTIONS ${OPTION}) - endif() -endforeach() - -# convert list to space-separated for CMAKE_C_FLAGS etc. -list_to_space_separated(CHIP_FLAGS ${MCU_COMPILE_OPTIONS}) - -set(CHIP_LINKER_FLAGS "") - -# certain flags will only work if linking with Mbed OS, not for regular executables, so we need to strip those out so CMake can configure -set(MBED_LINK_OPTIONS "") - -foreach(FLAG ${MCU_LINK_OPTIONS}) - if("${FLAG}" IN_LIST MCU_COMPILE_FLAGS) - # duplicate flag, do nothing - else() - string(APPEND CHIP_LINKER_FLAGS " ${FLAG}") - endif() -endforeach() - -# also add config-specific link flags (these go with mbed-os since they need generator expressions) -foreach(BUILD_TYPE ${CMAKE_CONFIGURATION_TYPES}) - string(TOUPPER "${BUILD_TYPE}" BUILD_TYPE_UCASE) - foreach(OPTION ${MCU_LINK_OPTIONS_${BUILD_TYPE_UCASE}}) - if(NOT "${OPTION}" STREQUAL "") - list(APPEND MBED_LINK_OPTIONS $<$:${OPTION}>) - endif() - endforeach() -endforeach() - -#note: these initialize the cache variables on first configure -set(CMAKE_C_FLAGS_INIT "${CHIP_FLAGS} ") -set(CMAKE_CXX_FLAGS_INIT "${CHIP_FLAGS} ") -set(CMAKE_ASM_FLAGS_INIT "${CHIP_FLAGS} -x assembler -masm=auto -Wno-unused-command-line-argument ") - -set(CMAKE_EXE_LINKER_FLAGS_INIT "${CHIP_LINKER_FLAGS}") From b5f34e32ee3181993e6db2982ba77a572245c10b Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sat, 8 Jan 2022 10:28:56 +0100 Subject: [PATCH 12/19] :fire: (cmake): Remove ArmClang code and branches --- cmake/templates/mbed/CMakeLists.txt | 6 ++--- cmake/utils/AddMbedExecutable.cmake | 42 +++++++---------------------- mbed-cmake.cmake | 32 ++++++---------------- 3 files changed, 20 insertions(+), 60 deletions(-) diff --git a/cmake/templates/mbed/CMakeLists.txt b/cmake/templates/mbed/CMakeLists.txt index fc929301c7..4f34c4515d 100644 --- a/cmake/templates/mbed/CMakeLists.txt +++ b/cmake/templates/mbed/CMakeLists.txt @@ -1,7 +1,7 @@ # include correct mbed-cmake buildfile based on toolchain -if("${MBED_TOOLCHAIN_NAME}" STREQUAL "ARMC6") - include(ToolchainArmClangBuild) -elseif("${MBED_TOOLCHAIN_NAME}" STREQUAL "GCC_ARM") +if("${MBED_TOOLCHAIN_NAME}" STREQUAL "GCC_ARM") include(ToolchainGCCArmBuild) +else() + message(FATAL_ERROR "Unknown toolchain \"${MBED_TOOLCHAIN_NAME}\"") endif() diff --git a/cmake/utils/AddMbedExecutable.cmake b/cmake/utils/AddMbedExecutable.cmake index 22df988124..68caf871e8 100644 --- a/cmake/utils/AddMbedExecutable.cmake +++ b/cmake/utils/AddMbedExecutable.cmake @@ -11,22 +11,13 @@ if(NOT (HAVE_INTELHEX AND HAVE_PRETTYTABLE)) set(CAN_RUN_MEMAP FALSE) endif() -# Why doesn't memap use the same toolchain names as the rest of the Mbed build system? -# Don't ask me! -if("${MBED_TOOLCHAIN_NAME}" STREQUAL "ARMC6") - set(MEMAP_TOOLCHAIN_NAME "ARM_STD") -else() - set(MEMAP_TOOLCHAIN_NAME ${MBED_TOOLCHAIN_NAME}) -endif() +# Set memap toolchain name +set(MEMAP_TOOLCHAIN_NAME ${MBED_TOOLCHAIN_NAME}) + # figure out objcopy command get_filename_component(TOOLCHAIN_BIN_DIR ${CMAKE_C_COMPILER} DIRECTORY) - -if("${MBED_TOOLCHAIN_NAME}" STREQUAL "ARMC6") - set(OBJCOPY_NAME fromelf) -elseif("${MBED_TOOLCHAIN_NAME}" STREQUAL "GCC_ARM") - set(OBJCOPY_NAME arm-none-eabi-objcopy) -endif() +set(OBJCOPY_NAME arm-none-eabi-objcopy) find_program( OBJCOPY_EXECUTABLE @@ -48,25 +39,13 @@ function(add_mbed_executable EXECUTABLE) set(BIN_FILE ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}.bin) set(HEX_FILE ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}.hex) - if("${MBED_TOOLCHAIN_NAME}" STREQUAL "ARMC6") - # the ArmClang CMake platform files automatically generate a memory map - target_link_libraries(${EXECUTABLE} --info=totals --map) - set(MAP_FILE ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}${CMAKE_EXECUTABLE_SUFFIX}.map) - - set(OBJCOPY_ELF_TO_BIN_COMMAND ${OBJCOPY_EXECUTABLE} --bin -o ${BIN_FILE} $) - set(OBJCOPY_ELF_TO_HEX_COMMAND ${OBJCOPY_EXECUTABLE} --i32 -o ${HEX_FILE} $) + set(MAP_FILE ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}.map) - elseif("${MBED_TOOLCHAIN_NAME}" STREQUAL "GCC_ARM") + # add link options to generate memory map + target_link_libraries(${EXECUTABLE} -Wl,\"-Map=${MAP_FILE}\",--cref) - set(MAP_FILE ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}.map) - - # add link options to generate memory map - target_link_libraries(${EXECUTABLE} -Wl,\"-Map=${MAP_FILE}\",--cref) - - set(OBJCOPY_ELF_TO_BIN_COMMAND ${OBJCOPY_EXECUTABLE} -O binary $ ${BIN_FILE}) - set(OBJCOPY_ELF_TO_HEX_COMMAND ${OBJCOPY_EXECUTABLE} -O ihex $ ${HEX_FILE}) - - endif() + set(OBJCOPY_ELF_TO_BIN_COMMAND ${OBJCOPY_EXECUTABLE} -O binary $ ${BIN_FILE}) + set(OBJCOPY_ELF_TO_HEX_COMMAND ${OBJCOPY_EXECUTABLE} -O ihex $ ${HEX_FILE}) # generate .bin firmware file add_custom_command( @@ -92,7 +71,4 @@ function(add_mbed_executable EXECUTABLE) COMMENT "Displaying memory map for ${EXECUTABLE}") endif() - # add upload target - # gen_upload_target(${EXECUTABLE} ${BIN_FILE}) - endfunction(add_mbed_executable) diff --git a/mbed-cmake.cmake b/mbed-cmake.cmake index a2b8d6937d..956a3a7e39 100644 --- a/mbed-cmake.cmake +++ b/mbed-cmake.cmake @@ -62,10 +62,6 @@ if(NOT EXISTS ${MBED_CMAKE_GENERATED_CONFIG_PATH}/cmake/MbedOSConfig.cmake) message(FATAL_ERROR "Mbed config files and headers do not exist! You need to run mbed-cmake/configure_for_target.py from the top source dir!") endif() -# unit test config -# ------------------------------------------------------------- -option(MBED_UNITTESTS "If true, compile for the local system and run unit tests" FALSE) - # load compilers and flags # ------------------------------------------------------------- @@ -73,16 +69,7 @@ option(MBED_UNITTESTS "If true, compile for the local system and run unit tests" include(${MBED_CMAKE_GENERATED_CONFIG_PATH}/cmake/MbedOSConfig.cmake) # load toolchain -if(MBED_UNITTESTS) - message(STATUS "Unit tests enabled, not loading mbed-cmake toolchain file") -elseif("${MBED_TOOLCHAIN_NAME}" STREQUAL "ARMC6") - - if(${CMAKE_VERSION} VERSION_LESS 3.15.0) - message(FATAL_ERROR "CMake >= 3.15.0 is required for Arm Compiler support") - endif() - - include(ToolchainArmClangDefine) -elseif("${MBED_TOOLCHAIN_NAME}" STREQUAL "GCC_ARM") +if("${MBED_TOOLCHAIN_NAME}" STREQUAL "GCC_ARM") include(ToolchainGCCArmDefine) else() message(FATAL_ERROR "Unknown toolchain \"${MBED_TOOLCHAIN_NAME}\"") @@ -91,16 +78,13 @@ endif() # search for and load compilers enable_language(C CXX ASM) -if(NOT MBED_UNITTESTS) - # Set config-specific flags - # Note: unlike CMAKE_C_FLAGS etc, we need to set these AFTER the project() call in order to override CMake's default values for these flags. - # CMAKE_C_FLAGS_INIT etc need to be set BEFORE the project() call so that it's used when CMake scans compiler properties. - foreach(BUILD_TYPE RELWITHDEBINFO DEBUG RELEASE) - list_to_space_separated(CMAKE_C_FLAGS_${BUILD_TYPE} ${MCU_COMPILE_OPTIONS_${BUILD_TYPE}}) - list_to_space_separated(CMAKE_CXX_FLAGS_${BUILD_TYPE} ${MCU_COMPILE_OPTIONS_${BUILD_TYPE}}) - list_to_space_separated(CMAKE_ASM_FLAGS_${BUILD_TYPE} ${MCU_COMPILE_OPTIONS_${BUILD_TYPE}}) - endforeach() -endif() + +foreach(BUILD_TYPE RELWITHDEBINFO DEBUG RELEASE) + list_to_space_separated(CMAKE_C_FLAGS_${BUILD_TYPE} ${MCU_COMPILE_OPTIONS_${BUILD_TYPE}}) + list_to_space_separated(CMAKE_CXX_FLAGS_${BUILD_TYPE} ${MCU_COMPILE_OPTIONS_${BUILD_TYPE}}) + list_to_space_separated(CMAKE_ASM_FLAGS_${BUILD_TYPE} ${MCU_COMPILE_OPTIONS_${BUILD_TYPE}}) +endforeach() + # find python (used for memap and several upload methods) # ------------------------------------------------------------- From 6e94d1722c90db536de98d0afd41ae9691ac7cf3 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sat, 8 Jan 2022 14:10:58 +0100 Subject: [PATCH 13/19] :lipstick: (cmake): Clean up main CMakeLists.txt --- CMakeLists.txt | 106 ++++++++++++++++++++++---------- tests/functional/CMakeLists.txt | 10 +-- 2 files changed, 79 insertions(+), 37 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 28340e4966..04fef2292f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,40 +4,46 @@ cmake_minimum_required(VERSION 3.21) -# Activate ccache if available +# +# MARK: - External tools +# + find_program(CCACHE "ccache") if(CCACHE) set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE}") set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE}") endif(CCACHE) -# Activate LogKit -option(ENABLE_LOG_DEBUG "Enable LogKit output" OFF) -message(STATUS "ENABLE_LOG_DEBUG --> ${ENABLE_LOG_DEBUG}") -if(ENABLE_LOG_DEBUG) - add_definitions(-DENABLE_LOG_DEBUG) -endif(ENABLE_LOG_DEBUG) +# Compile commands database +set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") +if(CMAKE_EXPORT_COMPILE_COMMANDS) + set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) +endif() + +# +# MARK: - Compilation flags/options +# # Set C/C++ standard set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_EXTENSIONS TRUE) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_C_STANDARD 17) set(CMAKE_C_EXTENSIONS TRUE) +set(CMAKE_C_STANDARD_REQUIRED ON) + +set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY") # Add custom flags add_compile_options( + $<$:-Wno-register> + $<$:-Wno-volatile> -fdiagnostics-color=always ) -# Before all, set ROOT_DIR, MBED_OS_DIR -set(ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}) -set(MBED_OS_DIR ${ROOT_DIR}/extern/mbed-os) -set(MCUBOOT_DIR ${ROOT_DIR}/extern/mcuboot/boot) -set(MBED_HTTP_DIR ${ROOT_DIR}/extern/mbed-http) - -# Bootloader option +# Bootloader option(BUILD_TARGETS_TO_USE_WITH_BOOTLOADER "Build targets with padding to use with bootloader" OFF) -message(STATUS "Build targets with padding to use with bootloader --> ${BUILD_TARGETS_TO_USE_WITH_BOOTLOADER}") if (BUILD_TARGETS_TO_USE_WITH_BOOTLOADER) set(MBED_APP_FLAGS -DMBED_APP_START=0x08041000 @@ -45,29 +51,48 @@ if (BUILD_TARGETS_TO_USE_WITH_BOOTLOADER) ) endif(BUILD_TARGETS_TO_USE_WITH_BOOTLOADER) -# And include mbed-cmake.cmake -include(./mbed-cmake.cmake) +# Logger +option(ENABLE_LOG_DEBUG "Enable LogKit output" OFF) +if(ENABLE_LOG_DEBUG) + add_definitions(-DENABLE_LOG_DEBUG) +endif(ENABLE_LOG_DEBUG) -# Then configure name of the project -project(LekaOS LANGUAGES C CXX ASM) -# Generate compile commands database -set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") +# +# MARK: - Directories +# -if(CMAKE_EXPORT_COMPILE_COMMANDS) - set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) -endif() +# Before all +set(ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}) + +# extern +set(MBED_OS_DIR ${ROOT_DIR}/extern/mbed-os) +set(MCUBOOT_DIR ${ROOT_DIR}/extern/mcuboot/boot) +set(MBED_HTTP_DIR ${ROOT_DIR}/extern/mbed-http) + +# includes +set(LIBS_DIR ${ROOT_DIR}/libs) +set(DRIVERS_DIR ${ROOT_DIR}/drivers) +set(INCLUDE_DIR ${ROOT_DIR}/include) +set(TARGETS_DIR ${ROOT_DIR}/targets) -# For convenience you can define useful variables +# app set(OS_DIR ${ROOT_DIR}/app/os) -set(LIBS_DIR ${ROOT_DIR}/libs) -set(TESTS_DIR ${ROOT_DIR}/tests) -set(SPIKES_DIR ${ROOT_DIR}/spikes) -set(DRIVERS_DIR ${ROOT_DIR}/drivers) -set(TARGETS_DIR ${ROOT_DIR}/targets) -set(INCLUDE_DIR ${ROOT_DIR}/include) set(BOOTLOADER_DIR ${ROOT_DIR}/app/bootloader) +# spikes, functional tests +set(SPIKES_DIR ${ROOT_DIR}/spikes) +set(FUNCTIONAL_TESTS_DIR ${ROOT_DIR}/tests/functional) + +# +# MARK: - LekaOS Project +# + +# And include mbed-cmake.cmake +include(${ROOT_DIR}/mbed-cmake.cmake) + +project(LekaOS LANGUAGES C CXX ASM) + # Add custom target subdirectory set(AVAILABLE_CUSTOM_TARGETS LEKA_DISCO LEKA_V1_2_DEV) if (${TARGET_BOARD} IN_LIST AVAILABLE_CUSTOM_TARGETS) @@ -103,7 +128,7 @@ add_subdirectory(${LIBS_DIR}) # Add spikes, functional tests add_subdirectory(${SPIKES_DIR}) -add_subdirectory(${TESTS_DIR}/functional) +add_subdirectory(${FUNCTIONAL_TESTS_DIR}) # Add bootloader add_subdirectory(${BOOTLOADER_DIR}) @@ -113,3 +138,20 @@ add_subdirectory(${OS_DIR}) # Finally print the mbed-cmake build report mbed_cmake_print_build_report() + +# +# MARK: - Misc. options +# + +option(VERBOSE_BUILD "Have a verbose build process") +if(VERBOSE_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON) +endif() + +# Print options +message(STATUS "") +message(STATUS "CMAKE_EXPORT_COMPILE_COMMANDS --> ${CMAKE_EXPORT_COMPILE_COMMANDS}") +message(STATUS "ENABLE_LOG_DEBUG --> ${ENABLE_LOG_DEBUG}") +message(STATUS "BUILD_TARGETS_FOR_BOOTLOADER --> ${BUILD_TARGETS_TO_USE_WITH_BOOTLOADER}") +message(STATUS "CMAKE_VERBOSE_MAKEFILE --> ${VERBOSE_BUILD}") +message(STATUS "") diff --git a/tests/functional/CMakeLists.txt b/tests/functional/CMakeLists.txt index ef695f9af0..21c4175d65 100644 --- a/tests/functional/CMakeLists.txt +++ b/tests/functional/CMakeLists.txt @@ -2,11 +2,11 @@ # Copyright 2020 APF France handicap # SPDX-License-Identifier: Apache-2.0 -add_subdirectory(${TESTS_DIR}/functional/cert/emc_ble_bt_lcd_led_motors) -add_subdirectory(${TESTS_DIR}/functional/cert/emc_ble_led_motors) -add_subdirectory(${TESTS_DIR}/functional/cert/emc_lcd_led_motors) -add_subdirectory(${TESTS_DIR}/functional/cert/emc_bt_lcd_qspi_rfid_touch_wifi) -add_subdirectory(${TESTS_DIR}/functional/hardware/motors_test_reduction_and_wheels) +add_subdirectory(${FUNCTIONAL_TESTS_DIR}/cert/emc_ble_bt_lcd_led_motors) +add_subdirectory(${FUNCTIONAL_TESTS_DIR}/cert/emc_ble_led_motors) +add_subdirectory(${FUNCTIONAL_TESTS_DIR}/cert/emc_lcd_led_motors) +add_subdirectory(${FUNCTIONAL_TESTS_DIR}/cert/emc_bt_lcd_qspi_rfid_touch_wifi) +add_subdirectory(${FUNCTIONAL_TESTS_DIR}/hardware/motors_test_reduction_and_wheels) add_custom_target(tests_functional) add_dependencies(tests_functional From 98b5780a59b576a8e4e86462534c21ecb32d4349 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sat, 8 Jan 2022 15:07:01 +0100 Subject: [PATCH 14/19] :lipstick: (cmake): Clean up unit tests CMakeLists.txt --- Makefile | 2 +- tests/unit/CMakeLists.txt | 59 ++++++++++++++++++++++++++++++--------- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 105cafb021..f83a3d6a8b 100644 --- a/Makefile +++ b/Makefile @@ -196,7 +196,7 @@ run_unit_tests: config_unit_tests: mkdir_build_unit_tests @echo "" @echo "πŸƒ Running unit tests cmake configuration script πŸ“" - cmake -S ./tests/unit -B $(UNIT_TESTS_BUILD_DIR) -GNinja -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=True + cmake -S ./tests/unit -B $(UNIT_TESTS_BUILD_DIR) -GNinja -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON clean_unit_tests: @$(MAKE) rm_unit_tests diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 162f99e7a3..3a18c3d430 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -2,15 +2,28 @@ # Copyright 2020 APF France handicap # SPDX-License-Identifier: Apache-2.0 -cmake_minimum_required(VERSION 3.18) +cmake_minimum_required(VERSION 3.21) + +# +# MARK: - External tools +# -# Activate ccache if available find_program(CCACHE "ccache") if(CCACHE) - set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE}") - set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE}") + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE}") endif(CCACHE) +# Compile commands database +set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") +if(CMAKE_EXPORT_COMPILE_COMMANDS) + set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) +endif() + +# +# MARK: - Shiny output +# + message(STATUS "") message(STATUS [==[ ]==]) @@ -30,10 +43,15 @@ message(STATUS "") project(LekaOSUnitTests LANGUAGES C CXX) +# +# MARK: - Compilation flags/options +# + # Set C/C++ standard set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_EXTENSIONS TRUE) set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_C_STANDARD 17) set(CMAKE_C_EXTENSIONS TRUE) set(CMAKE_C_STANDARD_REQUIRED ON) @@ -45,12 +63,14 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") message(STATUS "Clang found! Adding -fcolor-diagnostics compile option") add_compile_options("-fcolor-diagnostics") +else() + message(FATAL_ERROR "No suitable compiler found...") endif() # Add code coverage if (COVERAGE) if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - message(WARNING "Non-debug build may result in misleading code coverage results.") + message(FATAL_ERROR "Non-debug build may result in misleading code coverage results.") endif() # Append coverage compiler flags @@ -62,11 +82,8 @@ endif(COVERAGE) # Enable logging for tests add_definitions(-DENABLE_LOG_DEBUG) -# Generate compile commands database -set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") - # -# Mark: - Define directories +# MARK: - Directories # set(UNIT_TESTS_DIR ${CMAKE_CURRENT_LIST_DIR}) @@ -118,7 +135,7 @@ enable_testing() add_executable(LekaOSUnitTestsExec) # -# Mark: - Define functions +# Mark: - Define macros, functions, custom commands # add_custom_command( @@ -167,14 +184,14 @@ include_directories(BEFORE SYSTEM # Mark: - Headers # -add_subdirectory(./headers) +add_subdirectory(${UNIT_TESTS_DIR}/headers) # # Mark: - Add fakes, stubs & mocks # -add_subdirectory(./stubs) -add_subdirectory(./mocks) +add_subdirectory(${UNIT_TESTS_DIR}/stubs) +add_subdirectory(${UNIT_TESTS_DIR}/mocks) # # Mark: - Register tests for util libraries @@ -240,3 +257,19 @@ target_link_libraries(LekaOSUnitTestsExec ) add_test(NAME LekaOSUnitTests COMMAND LekaOSUnitTestsExec) + +# +# MARK: - Options +# + +option(VERBOSE_BUILD "Have a verbose build process") +if(VERBOSE_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON) +endif() + +# Print options +message(STATUS "") +message(STATUS "CMAKE_EXPORT_COMPILE_COMMANDS --> ${CMAKE_EXPORT_COMPILE_COMMANDS}") +message(STATUS "CODE_COVERAGE --> ${COVERAGE}") +message(STATUS "CMAKE_VERBOSE_MAKEFILE --> ${VERBOSE_BUILD}") +message(STATUS "") From 4e69ee9ab55e209969ee1f5e84c796ef92864a47 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sat, 8 Jan 2022 22:13:34 +0100 Subject: [PATCH 15/19] :hammer: (make): Add bootloader make target --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index f83a3d6a8b..c8d1dd228b 100644 --- a/Makefile +++ b/Makefile @@ -78,6 +78,11 @@ os: @echo "πŸ—οΈ Building LekaOS πŸ€–" cmake --build $(TARGET_BUILD_DIR) -t LekaOS +bootloader: + @echo "" + @echo "πŸ—οΈ Building Bootloader πŸ€–" + cmake --build $(TARGET_BUILD_DIR) -t bootloader + spikes: @echo "" @echo "πŸ—οΈ Building spikes 🍱" From 71e6eafb9ee6c327b541c746d754182ecb592033 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sat, 8 Jan 2022 22:14:29 +0100 Subject: [PATCH 16/19] :recycle: (scripts): Clean up firmware scripts --- build_bootloader.sh | 21 ++++++--------------- build_firmware.sh | 12 +++++++----- build_os.sh | 5 +++-- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/build_bootloader.sh b/build_bootloader.sh index fbfac9a63a..6518247600 100755 --- a/build_bootloader.sh +++ b/build_bootloader.sh @@ -1,25 +1,16 @@ #!/bin/bash -mkdir _tmp > /dev/null 2> /dev/null - # Variables -BOOTLOADER_HEX_SOURCE="$1" -BOOTLOADER_HEX="$2" - -if [ -z "$BOOTLOADER_HEX_SOURCE" ]; then - echo "BOOTLOADER_HEX_SOURCE is unset" - BOOTLOADER_HEX_SOURCE="_build/LEKA_V1_2_DEV/app/bootloader/bootloader.hex" -fi +BOOTLOADER_HEX_SOURCE="_build/LEKA_V1_2_DEV/app/bootloader/bootloader.hex" +BOOTLOADER_HEX_DEST="_tmp/bootloader.hex" -if [ -z "$BOOTLOADER_HEX" ]; then - echo "BOOTLOADER_HEX is unset" - BOOTLOADER_HEX="_tmp/bootloader.hex" -fi +# Create dir +mkdir -p _tmp # Compile bootloader make deep_clean make config -make +make bootloader # Get bootloader binary -cp $BOOTLOADER_HEX_SOURCE $BOOTLOADER_HEX +cp $BOOTLOADER_HEX_SOURCE $BOOTLOADER_HEX_DEST diff --git a/build_firmware.sh b/build_firmware.sh index 6b2f60e091..1810eead3b 100755 --- a/build_firmware.sh +++ b/build_firmware.sh @@ -1,7 +1,7 @@ #!/bin/bash -mkdir _tmp > /dev/null 2> /dev/null -mkdir _release > /dev/null 2> /dev/null +mkdir -p _tmp +mkdir -p _release # Variables RECOMPILE_BOOTLOADER="false" @@ -12,25 +12,27 @@ do esac done -BOOTLOADER_HEX_SOURCE="_build/LEKA_V1_2_DEV/app/bootloader/bootloader.hex" BOOTLOADER_HEX="_tmp/bootloader.hex" APPLICATION_HEX_SOURCE="_build/LEKA_V1_2_DEV/spikes/lk_update_process_app_base/spike_lk_update_process_app_base.hex" APPLICATION_VERSION="1.2.3+4" APPLICATION_SIGNED_HEX="_tmp/application-signed.hex" -FIRMWARE_HEX="_tmp/firmwware.hex" +FIRMWARE_HEX="_tmp/firmware.hex" FIRMWARE_RELEASE="_release/firmware.bin" # Get bootloader if [ "$RECOMPILE_BOOTLOADER" = "true" ]; then - ./build_bootloader.sh $BOOTLOADER_HEX_SOURCE $BOOTLOADER_HEX + echo "Build bootloader" + ./build_bootloader.sh fi; # Get application +echo "Build application" ./build_os.sh $RECOMPILE_BOOTLOADER $APPLICATION_HEX_SOURCE $APPLICATION_VERSION $APPLICATION_SIGNED_HEX # Merge bootloader and application +echo "Merge bootloader & applications" hexmerge.py -o $FIRMWARE_HEX --no-start-addr $BOOTLOADER_HEX $APPLICATION_SIGNED_HEX arm-none-eabi-objcopy -I ihex -O binary $FIRMWARE_HEX $FIRMWARE_RELEASE diff --git a/build_os.sh b/build_os.sh index 7c22a79726..b02a75c910 100755 --- a/build_os.sh +++ b/build_os.sh @@ -1,7 +1,7 @@ #!/bin/bash -mkdir _tmp > /dev/null 2> /dev/null -mkdir _release > /dev/null 2> /dev/null +mkdir -p _tmp +mkdir -p _release # Variables RECOMPILE_APPLICATIONS="$1" @@ -33,6 +33,7 @@ then make deep_clean make config BUILD_TARGETS_TO_USE_WITH_BOOTLOADER=ON fi; + make # Get application binary From e302d67b1b2ff26d872473368c5bcab3248e9df4 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sun, 9 Jan 2022 00:10:43 +0100 Subject: [PATCH 17/19] :wrench: (cmake/vscode): Fix build dirs + combine compilation databases --- .vscode/settings.json | 15 +++++++++++---- Makefile | 11 ++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 61c2a06e5e..b4c1ad3211 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -71,12 +71,20 @@ ".cache": true, ".clangd": true }, + "cmake.ignoreKitEnv": true, + "cmake.configureOnOpen": true, "cmake.buildDirectory": "${workspaceFolder}/_build_cmake_tools", + "cmake.mergedCompileCommands": "${workspaceFolder}/compile_commands.json", "cmake.configureArgs": [ - "-DTARGET_BOARD=LEKA_V1_2_DEV", - "-DENABLE_LOG_DEBUG=ON", - "-DCMAKE_CONFIG_DIR=${workspaceFolder}/_build_cmake_tools/cmake_config" + "-GNinja", ], + "cmake.configureSettings": { + "TARGET_BOARD": "LEKA_V1_2_DEV", + "ENABLE_LOG_DEBUG": "ON", + "MBED_PATH": "${workspaceFolder}/extern/mbed-os", + "CMAKE_CONFIG_DIR": "${workspaceFolder}/_build_cmake_tools/cmake_config", + "CMAKE_BUILD_TYPE": "Debug" + }, "markdownlint.config": { "MD002": false, "MD007": { @@ -91,7 +99,6 @@ "MD033": false }, "editor.formatOnSave": true, - "cmake.configureOnOpen": true, "clangd.checkUpdates": true, "clangd.arguments": [ "--query-driver=/usr/local/bin/arm-none-eabi*", diff --git a/Makefile b/Makefile index c8d1dd228b..4f43ab46af 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ config: config_tools: @$(MAKE) config_tools_target - @$(MAKE) config_tools_build +# @$(MAKE) config_tools_build clean: @$(MAKE) rm_build @@ -118,12 +118,12 @@ config_cmake_target: mkdir_cmake_config @echo "πŸƒ Running configuration script for target $(TARGET_BOARD) πŸ“" python3 $(CMAKE_DIR)/scripts/configure_cmake_for_target.py $(TARGET_BOARD) -p $(CMAKE_CONFIG_DIR) -a $(ROOT_DIR)/mbed_app.json -config_tools_target: mkdir_cmake_config +config_tools_target: mkdir_tools_config @echo "" @echo "πŸƒ Running configuration script for VSCode CMake Tools πŸ“" python3 $(CMAKE_DIR)/scripts/configure_cmake_for_target.py $(TARGET_BOARD) -p $(CMAKE_TOOLS_CONFIG_DIR) -a $(ROOT_DIR)/mbed_app.json -config_cmake_build: mkdir_tools_config +config_cmake_build: mkdir_cmake_config @echo "" @echo "πŸƒ Running cmake configuration script for target $(TARGET_BOARD) πŸ“" @cmake -S . -B $(TARGET_BUILD_DIR) -GNinja -DCMAKE_CONFIG_DIR="$(CMAKE_CONFIG_DIR)" -DTARGET_BOARD="$(TARGET_BOARD)" -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_LOG_DEBUG=$(ENABLE_LOG_DEBUG) -DBUILD_TARGETS_TO_USE_WITH_BOOTLOADER=$(BUILD_TARGETS_TO_USE_WITH_BOOTLOADER) @@ -132,7 +132,6 @@ config_tools_build: mkdir_tools_config @echo "" @echo "πŸƒ Running cmake configuration script for target $(TARGET_BOARD) πŸ“" @cmake -S . -B $(CMAKE_TOOLS_BUILD_DIR) -GNinja -DCMAKE_CONFIG_DIR="$(CMAKE_TOOLS_CONFIG_DIR)" -DTARGET_BOARD="$(TARGET_BOARD)" -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_LOG_DEBUG=ON - @ln -sf $(CMAKE_TOOLS_BUILD_DIR)/compile_commands.json ./ # # MARK: - Tests targets @@ -202,6 +201,8 @@ config_unit_tests: mkdir_build_unit_tests @echo "" @echo "πŸƒ Running unit tests cmake configuration script πŸ“" cmake -S ./tests/unit -B $(UNIT_TESTS_BUILD_DIR) -GNinja -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON + @mkdir -p $(CMAKE_TOOLS_BUILD_DIR)/unit_tests + @ln -sf $(UNIT_TESTS_BUILD_DIR)/compile_commands.json $(CMAKE_TOOLS_BUILD_DIR)/unit_tests/compile_commands.json clean_unit_tests: @$(MAKE) rm_unit_tests @@ -300,7 +301,7 @@ mkdir_cmake_config: @mkdir -p $(CMAKE_CONFIG_DIR) mkdir_tools_config: - @mkdir -p $(CMAKE_CONFIG_DIR) + @mkdir -p $(CMAKE_TOOLS_CONFIG_DIR) mkdir_build_unit_tests: @mkdir -p $(UNIT_TESTS_BUILD_DIR) From 31273c3121d1f8743465beb0f93714abf2c297f2 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sun, 9 Jan 2022 23:19:01 +0100 Subject: [PATCH 18/19] :hammer: (make): Add pull_deps target to clone mbed & mcuboot --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 4f43ab46af..ebfdc0f24c 100644 --- a/Makefile +++ b/Makefile @@ -252,6 +252,10 @@ clang_tidy_diff_fix: # MARK: - Mbed targets # +pull_deps: + @$(MAKE) mbed_clone + @$(MAKE) mcuboot_clone + mbed_clone: @echo "" @echo "🧬 Cloning Mbed OS πŸ“¦" From 202a6b16e880f0e451a901b2b17cff040ea97f25 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Sun, 9 Jan 2022 23:52:42 +0100 Subject: [PATCH 19/19] :memo: (docs): Update & clean up install/how-to documentation - remove Linux/Ubuntu instructions - fix typos, old links, etc. - add vscode plugins and instructions --- docs/INSTALL.md | 99 +++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 52 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index ac6dc222e0..9f3cd7aaad 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -5,13 +5,13 @@ LekaOS repository is made to be easy to use: - simple directory structure -- CMake based with [USCRPL/mbed-cmake](https://github.com/USCRPL/mbed-cmake/) -- Code completion with VSCode + [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) +- compile with CMake (based on [USCRPL/mbed-cmake](https://github.com/USCRPL/mbed-cmake/)) +- code completion with VSCode + [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) + [clangd/vscode-clangd](https://github.com/clangd/vscode-clangd) - format with `.clang-format` and `.editorconfig` ## How to install -Before starting, make sure you've read the [mbed documentation](https://os.mbed.com/docs/mbed-os/v6.8/introduction/index.html). +Before starting, make sure you've read the [mbed documentation](https://os.mbed.com/docs/mbed-os/v6.15/introduction/index.html). We'll guide you in the process, just follow the steps. @@ -36,7 +36,7 @@ Then install the tools: ```bash # first install GNU core utilities brew install coreutils -# don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to your `$PATH` +# πŸ’‘ don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to your `$PATH` # then the prerequisites brew install git curl python @@ -45,21 +45,6 @@ brew install git curl python brew install make cmake ninja lcov gcovr stlink ccache open-ocd clang-format ``` -#### Ubuntu/Linux - -*Note: The following instructions have not really been tested, so you might need to modify the names of the packages.* - -```bash -# first update -sudo apt update - -# then the prerequisites -sudo apt install build-essential git python-minimal - -# and finally the needed tools -sudo apt install make cmake ninja-build lcov gcovr stlink ccache open-ocd -``` - ### 1. Clone the repository To start with: @@ -68,20 +53,15 @@ To start with: # Clone the repository git clone https://github.com/leka/LekaOS && cd LekaOS -# Clone or curl Mbed OS using the Makefile -make mbed_clone -# or -make mbed_curl - -# With mbed_clone You can specify a branch -make mbed_clone BRANCH=master +# Pull dependencies: mbed-os & mcuboot +make pull_deps ``` ### 2. Install mbed-cli & co I recommend the manual install. Make sure to follow the instructions from mbed: -> +> ```bash # install mbed-cli and mbed-tools (mbed-cli2) @@ -103,31 +83,12 @@ brew tap ArmMbed/homebrew-formulae brew install arm-none-eabi-gcc ``` -#### Ubuntu/Linux - -You can download the toolchain here: - -> - -The file to download should have a name looking like this: `gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2`, save it to your `$HOME` directory (or anywhere you can remember). - -Then do the following (you might need to change the name of the file depending on the version): - -```bash -# untar the new package in the directory of your choosing -tar -xjvf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 - -# add the new toolchain to your path -export PATH=$PATH:$HOME/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux/bin/ - -# test it works -arm-none-eabi-gcc --version -``` - ## How to use We put together an handy [`Makefile`](./Makefile) to make it easier to configure and compile your projects. +### Building the project + ```bash # first configure the project make config @@ -141,16 +102,50 @@ make ### Flashing the board -> ⚠️ // TODO - add instructions for openOCD +Make sure you have [OpenOCD](https://openocd.org/) installed. ```bash make flash BIN_PATH=_build/path/to/binary_file.bin ``` +### Building & running unit tests + +```bash +# first configure unit tests +make config_unit_tests + +# build and run them +make ut + +# if you want to see coverage +make utc +``` + ## LekaOS, spikes & tests -The main idea behind this template is to have your main source files (those for the big project you're working on) under the [`./src`](./src) directory. +The firmware of the robot is located in [`./app/os`](./app/os) & [`./app/bootloader`](./app/bootloader). + +> `firmware = bootloader + os` + +Sometimes, you might need to create a simple, very basic example project to test a new features, investigate a bug or try a different solution to a problem. + +These can be added to the [`spikes`](./spikes) directory inside their own directory. You'll need at leat a `main.cpp` and a `CMakeLists.txt`. See [`mbed_blinky`](./spikes/mbed_blinky) for a working example. + +## VSCode & useful tools + +We use VSCode and a handful of plugins to work on LekaOS: + +- [Better C++ Syntax](https://github.com/jeff-hykin/better-cpp-syntax) +- [Better Comments](https://github.com/aaron-bond/better-comments) +- [Clang-Format](https://github.com/xaverh/vscode-clang-format-provider) +- [clangd](https://github.com/clangd/vscode-clangd) +- [CMake](https://github.com/twxs/vs.language.cmake) +- [CMake Tools](https://github.com/microsoft/vscode-cmake-tools) +- [Cortex-Debug](https://github.com/Marus/cortex-debug) +- [EditorConfig for VSCode](https://github.com/editorconfig/editorconfig-vscode) + +It is highly recommended to install them for a better experience and to make sure you comply with our coding style. -Now, you sometimes need to create a simple, very basic example project to test a new features, investigate a bug or try a different solution to a problem. +Settings for those plugins are shared in the repos and should not be modified. -These can be added to the [`spikes`](./spikes) directory inside their own directory. You'll need at leat a `main.cpp` and a `CMakeLists.txt`. See [`blinky`](./spikes/blinky) for a working example. +To configure autocompletion and code checking using `clangd`, simply run `make config_tools` in your terminal. And then in VSCode, run `CMake: Configure`.