Skip to content

passingduck/embedded_rust

Repository files navigation

Nucleo-F746ZG Rust 프로젝트

STM32F746ZG 마이크로컨트롤러를 사용한 Nucleo-F746ZG 보드를 위한 Rust 임베디드 프로젝트입니다.

요구사항

다음 도구들이 설치되어 있어야 합니다:

  1. Rust 툴체인

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    rustup target add thumbv7em-none-eabihf
  2. ARM 툴체인

    # Ubuntu/Debian
    sudo apt install gcc-arm-none-eabi
    
    # 또는 ARM 공식 툴체인 다운로드
    # https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm
  3. ST-Link 유틸리티

    # Ubuntu/Debian
    sudo apt install stlink-tools
    
    # 또는 소스에서 빌드
    git clone https://github.com/stlink-org/stlink.git
    cd stlink
    make
    sudo make install

빌드 및 플래시

빌드

./build.sh

플래시

st-flash write nucleo-f746zg.bin 0x08000000

디버깅

터미널 1: ST-Link 서버 시작

st-util

터미널 2: GDB 연결

arm-none-eabi-gdb target/thumbv7em-none-eabihf/release/nucleo-f746zg

GDB가 자동으로 연결되고 main 함수에서 중단점이 설정됩니다.

프로젝트 구조

  • src/main.rs: 메인 애플리케이션 코드
  • memory.x: 메모리 맵 정의
  • .cargo/config.toml: Rust 빌드 설정
  • build.sh: 빌드 스크립트
  • .gdbinit: GDB 설정

기능

현재 프로젝트는 Nucleo-F746ZG 보드의 LD1 LED를 깜빡이는 기본 예제를 포함합니다.

하드웨어 연결

  • LD1 (PA5): 보드에 내장된 녹색 LED
  • 3.3V, GND: 전원 공급
  • SWDIO, SWCLK: 디버깅용 (ST-Link가 내장되어 있음)

About

Rust embedded project for Nucleo-F767ZI board with UART mirroring and LED control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published