File stm32flash.spec of Package stm32flash
#
# spec file for package stm32flash
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: stm32flash
Version: 0.7
Release: cae1bb8b08e3b71d62d185c924be0a3ca0093dd3
Summary: Flash Program for the STM32 Bootloader
License: GPL-2.0-or-later
Group: Hardware/Other
URL: https://sourceforge.net/p/stm32flash/wiki/Home
Source: https://download.sourceforge.net/stm32flash/stm32flash-%{version}.tar.gz
Patch0: 0001-hex-parser-Warn-about-large-gaps-and-detect-allocati.patch
Patch1: 0002-serial_posix-Fix-setup-from-odd-parity-or-two-stop-b.patch
Patch2: 0003-dev_table-Add-placeholders-for-all-devices-in-AN2606.patch
Patch3: 0004-dev_table-Add-support-for-device-0x497-STM32WLE5xx.patch
Patch4: 0005-dev_table.c-Add-STM32H72xxx-73xxx-Device-ID-0x483.patch
Patch5: 0006-dev_table.c-Add-STM32H7A3xx-B3xx-Device-ID-0x480.patch
Patch6: 0007-dev_table.c-Add-STM32U575xx-585xx-Device-ID-0x482.patch
Patch7: 0008-dev_table.c-Add-STM32WB30xx-50xx-Device-ID-0x495.patch
Patch8: 0009-dev_table.c-Add-STM32L4P5xx-Q5xx-Device-ID-0x471-dua.patch
Patch9: 0010-dev_table.c-Add-STM32L552xx-562xx-Device-ID-0x472-du.patch
Patch10: 0011-dev_table.c-Add-STM32WB10xx-15xx-Device-ID-0x494.patch
Patch11: 0012-main-Report-as-Option-bytes-and-System-memory.patch
Patch12: 0013-dev_table-Tighten-option-bytes-range-for-device-ID-0.patch
%description
Open source flash program for the STM32 ARM processors using the ST
serial bootloader over UART or I2C.
Features:
- UART and I2C transports supported
- device identification
- write to flash/ram
- read from flash/ram
- auto-detect Intel HEX or raw binary input format with option to force
binary
- flash from binary file
- save flash to binary file
- verify & retry up to N times on failed writes
- start execution at specified address
- software reset the device when finished if -R is specified
- resume already initialized connection (for when reset fails, UART only)
- GPIO signalling to enter bootloader mode (hardware dependent)
%prep
%autosetup -p1
%build
%make_build CFLAGS="-O2 %{optflags}" PREFIX=%{_prefix}
%install
make %{?_smp_mflags} CFLAGS="-O2 %{optflags}" PREFIX=%{_prefix} DESTDIR=%{buildroot} install
%check
%files
%license gpl-2.0.txt
%doc HOWTO I2C.txt protocol.txt TODO
%{_bindir}/stm32flash
%{_mandir}/man1/stm32flash.1*
%changelog