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:
1 parent
b119a6abd7
commit
66bb319423
1092 files changed
+172728
-133236
No files matched your search
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# Enveloppe pour arm-none-eabi-gdb : VS Code (miDebuggerPath) n'accepte pas de glob,
|
||||
# alors que le dossier du plugin CubeIDE change a chaque mise a jour.
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
source "$ROOT/gcc/toolchain-env.sh"
|
||||
exec arm-none-eabi-gdb "$@"
|
||||
@@ -23,6 +23,9 @@ BOOT_HEX="$ROOT/Boot/TouchGFX/build/bin/target.hex"
|
||||
APPLI_HEX="$ROOT/Appli/TouchGFX/build/bin/target.hex"
|
||||
LOADER="$ROOT/gcc/MX66UW1G45G_STM32H7S78-DK.stldr"
|
||||
|
||||
# Linux : outils de STM32CubeIDE installe dans ~/st (ST_PROGRAMMER_BIN, ST_GDBSERVER, PATH)
|
||||
[[ -f "$ROOT/gcc/toolchain-env.sh" ]] && source "$ROOT/gcc/toolchain-env.sh"
|
||||
|
||||
find_cli() {
|
||||
if [[ -n "${STM32_PROGRAMMER_CLI:-}" && -x "$STM32_PROGRAMMER_CLI" ]]; then
|
||||
echo "$STM32_PROGRAMMER_CLI"; return
|
||||
@@ -30,6 +33,9 @@ find_cli() {
|
||||
if command -v STM32_Programmer_CLI >/dev/null 2>&1; then
|
||||
command -v STM32_Programmer_CLI; return
|
||||
fi
|
||||
if [[ -x "${ST_PROGRAMMER_BIN:-}/STM32_Programmer_CLI" ]]; then
|
||||
echo "$ST_PROGRAMMER_BIN/STM32_Programmer_CLI"; return
|
||||
fi
|
||||
local candidates=(
|
||||
"/Applications/STMicroelectronics/programmer/STM32CubeProgrammer.app/Contents/MacOs/bin/STM32_Programmer_CLI"
|
||||
"/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/STM32_Programmer_CLI"
|
||||
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
# Lance ST-LINK_gdbserver pour le debug VS Code / GDB de la STM32H7S78-DK.
|
||||
#
|
||||
# Usage: gcc/gdbserver.sh <boot|appli> [port]
|
||||
#
|
||||
# boot Debug du Boot (flash interne 0x08000000), sans loader externe
|
||||
# appli Debug de l'Appli (flash externe 0x70000000), avec le loader externe
|
||||
# pour que "load" puisse programmer la flash OctoSPI
|
||||
#
|
||||
# Options imposees par la carte (cf. AGENTS.md) : -m 1 -k (acces port 1, connexion
|
||||
# sous reset). Sans elles : "Cannot connect to access port 1".
|
||||
# Un seul outil peut tenir le ST-Link : arrete flash.sh / CubeProgrammer avant.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
# shellcheck source=toolchain-env.sh
|
||||
source "$ROOT/gcc/toolchain-env.sh"
|
||||
|
||||
TARGET="${1:-}"
|
||||
PORT="${2:-61234}"
|
||||
LOADER="$ROOT/gcc/MX66UW1G45G_STM32H7S78-DK.stldr"
|
||||
|
||||
[[ -x "${ST_GDBSERVER:-}" ]] || { echo "error: ST-LINK_gdbserver introuvable (STM32CubeIDE dans ~/st ?)" >&2; exit 1; }
|
||||
[[ -d "${ST_PROGRAMMER_BIN:-}" ]] || { echo "error: dossier STM32CubeProgrammer introuvable" >&2; exit 1; }
|
||||
|
||||
ARGS=(-p "$PORT" --swd --halt -m 1 -k -cp "$ST_PROGRAMMER_BIN")
|
||||
|
||||
case "$TARGET" in
|
||||
boot) ;;
|
||||
appli) ARGS+=(-el "$LOADER") ;;
|
||||
*) echo "usage: $0 <boot|appli> [port]" >&2; exit 2 ;;
|
||||
esac
|
||||
|
||||
# Un ancien serveur reste parfois actif apres un debug interrompu : il tiendrait le ST-Link.
|
||||
pkill -f '[S]T-LINK_gdbserver' 2>/dev/null && sleep 0.5 || true
|
||||
|
||||
echo ">>> ST-LINK_gdbserver ($TARGET) sur le port $PORT"
|
||||
exec "$ST_GDBSERVER" "${ARGS[@]}"
|
||||
+531
-510
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,14 @@
|
||||
# Les scripts TouchGFX 4.26 (textconvert, videoconvert) appellent File.exists? /
|
||||
# Dir.exists?, supprimes en Ruby 3.2. Ce shim les restaure pour les Ruby recents.
|
||||
# Charge par gcc/makefile_appli via RUBYOPT.
|
||||
class File
|
||||
class << self
|
||||
alias_method :exists?, :exist? unless respond_to?(:exists?)
|
||||
end
|
||||
end
|
||||
|
||||
class Dir
|
||||
class << self
|
||||
alias_method :exists?, :exist? unless respond_to?(:exists?)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,23 @@
|
||||
# Source ce fichier pour retrouver les outils ARM de STM32CubeIDE (Linux).
|
||||
# source gcc/toolchain-env.sh
|
||||
# Exporte : PATH (arm-none-eabi-gcc/gdb), ST_GDBSERVER, ST_PROGRAMMER_BIN.
|
||||
# Les dossiers de plugins changent a chaque mise a jour de CubeIDE, d'ou les globs.
|
||||
# Surcharge possible : STM32CUBEIDE_DIR=/chemin/vers/stm32cubeide_x.y.z
|
||||
|
||||
_ide_dir="${STM32CUBEIDE_DIR:-$(ls -d "$HOME"/st/stm32cubeide_* 2>/dev/null | tail -1)}"
|
||||
|
||||
_first() { ls -d "$@" 2>/dev/null | tail -1; }
|
||||
|
||||
_gnu_bin=$(_first "$_ide_dir"/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.*/tools/bin)
|
||||
if [ -n "$_gnu_bin" ]; then
|
||||
case ":$PATH:" in *":$_gnu_bin:"*) ;; *) export PATH="$_gnu_bin:$PATH" ;; esac
|
||||
fi
|
||||
|
||||
export ST_GDBSERVER
|
||||
ST_GDBSERVER=$(_first "$_ide_dir"/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_*/tools/bin/ST-LINK_gdbserver)
|
||||
|
||||
export ST_PROGRAMMER_BIN
|
||||
ST_PROGRAMMER_BIN=$(_first "$_ide_dir"/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.linux64_*/tools/bin)
|
||||
|
||||
unset -f _first
|
||||
unset _ide_dir _gnu_bin
|
||||
Reference in new issue
Block a user