CubeMX: SPI4 + SDMMC1/FatFs + I2S6, audio BSP et debug VS Code (Linux)

Regeneration CubeMX (Appli) preparant le driver ST67W611M1 et la carte SD :
- SPI4 (PE12/13/14, CS PF8) + DMA GPDMA1 canaux 4/5, SPI_RDY (PD12/EXTI12),
  CHIP_EN (PD13) et BOOT (PD15) pour la X-NUCLEO-67W61M1 sur l'Arduino
- SDMMC1 + FatFs (appels d'init non generes dans main, IRQ SDMMC1 prio 14),
  PM14 en open-drain ; I2S6_CK sur PA5 pour liberer PC12 (SDMMC1_CK)
- HAL UART retire ; USE_BSP_COM_FEATURE=0
- Audio preserve : ADF 4/16/24, prio IRQ 2, DMA canal 0 en priorite haute,
  GPDMA1_Channel2_IRQHandler deplace dans audio_irq.c (hors fichiers generes),
  BSP_MX_I2S6_Init (renommage dans le BSP pour eviter le conflit avec CubeMX)
- Middlewares/ST/ST67W6X_Network_Driver, FatFs et sources HAL SPI/SD ajoutes
  (driver ST67 pas encore integre au build)

Build et debug sous Linux :
- gcc/toolchain-env.sh, gdbserver.sh, arm-gdb.sh : outils de STM32CubeIDE par
  glob ; flash.sh les retrouve ; ruby_compat.rb pour Ruby >= 3.2 (TouchGFX)
- makefile_appli : sources SD/SPI/FatFs/audio_irq ; chmod +x des .out TouchGFX
- Objets de build (*.o, *.d, *.su) retires de l'index (deja dans .gitignore)
- AGENTS.md : toolchain Linux, configs VS Code (cppdbg et ST stlinkgdbtarget),
  pieges de l'extension ST (.settings/ide.store.json, preRunCommands reset)

Verifie sur carte : audio OK, debug Appli/Boot OK.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
thomasandClaude Sonnet 5.5 committed 2026-10-23 22:49:06 +02:00
1 parent b119a6abd7
commit 66bb319423
1092 files changed
+172728 -133236

No files matched your search

@@ -0,0 +1,69 @@
/**
******************************************************************************
* @file sd_diskio_config.h
* @author MCD Application Team
* @brief Template for the sd_diskio_config.h. This file should be copied and
under project.
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the st_license.txt
* file in the root directory of this software component.
* If no st_license.txt file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
#ifndef SD_DISKIO_CONFIG_H
#define SD_DISKIO_CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32{family}xx_hal.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Maximum waiting time to do an operation in the HAL_SD_ReadBlocks() and HAL_SD_WriteBlocks() */
#define SD_TIMEOUT 30 * 1000
/*
* Depending on the usecase, the SD card initialization could be done at the
* application level, if it is the case define the flag below to enable
* the MX_SD_Init().
*/
#define ENABLE_SD_INIT 0
/*
* when using cacheable memory region, it may be needed to maintain the cache
* validity. Enable the define below to activate a cache maintenance at each
* read and write operation.
* Notice: This is applicable only for cortex M7 based platform.
*/
#define ENABLE_SD_DMA_CACHE_MAINTENANCE 1
extern SD_HandleTypeDef hsd_sdmmc1;
/* Default handle used in sd_diskio.c file */
#define sdmmc_handle hsd_sdmmc1
/* Default Init function of sdmmc IP used in sd_diskio.c file */
#if (ENABLE_SD_INIT == 1)
extern void MX_SDMMC1_SD_Init(void);
#define sdmmc_sd_init MX_SDMMC1_SD_Init
#endif
#ifdef __cplusplus
}
#endif
#endif /* SD_DISKIO_CONFIG_H */
@@ -0,0 +1,47 @@
/**
******************************************************************************
* @file sram_diskio_config.h
* @author MCD Application Team
* @brief Template for the sram_diskio_config.h. This file should be copied and
under project.
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the st_license.txt
* file in the root directory of this software component.
* If no st_license.txt file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
#ifndef SRAM_DISKIO_CONFIG_H
#define SRAM_DISKIO_CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32{family}xx_hal.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Block size */
#define BLOCK_SIZE 512
/* Base Address */
#define SRAM_DISK_BASE_ADDR 0x24000000
/* SRAM Disk size in bytes */
#define SRAM_DISK_SIZE (32 * 1024)
#ifdef __cplusplus
}
#endif
#endif /* SRAM_DISKIO_CONFIG_H */
@@ -0,0 +1,44 @@
/**
******************************************************************************
* @file usbh_diskio_config.h
* @author MCD Application Team
* @brief Template for the usbh_diskio_config.h. This file should be copied and
under project.
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the st_license.txt
* file in the root directory of this software component.
* If no st_license.txt file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
#ifndef USBH_DISKIO_CONFIG_H
#define USBH_DISKIO_CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbh_msc.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Block size */
#define USB_BLOCK_SIZE 512
extern USBH_HandleTypeDef hUsbHost;
/* Default handle used in usbh_diskio.c file */
#define hUsb_Host hUsbHost
#ifdef __cplusplus
}
#endif
#endif /* USBH_DISKIO_CONFIG_H */