summaryrefslogtreecommitdiff
path: root/dev-embedded/stm32flash
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-09-09 12:30:03 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-09-09 12:30:03 +0100
commitd8a7472fc6314625f7d16e0427004eb448412908 (patch)
tree0dba2e223a5a5e200a4b84a4a5e3ff690e5059e7 /dev-embedded/stm32flash
parent8e49340ce0aaf205556648d8fa27dd30e8cf4435 (diff)
gentoo auto-resync : 09:09:2024 - 12:30:03
Diffstat (limited to 'dev-embedded/stm32flash')
-rw-r--r--dev-embedded/stm32flash/Manifest5
-rw-r--r--dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-01fbb65.patch28
-rw-r--r--dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-17a24f8.patch65
-rw-r--r--dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-b079cd0.patch103
-rw-r--r--dev-embedded/stm32flash/stm32flash-0.6.ebuild30
5 files changed, 0 insertions, 231 deletions
diff --git a/dev-embedded/stm32flash/Manifest b/dev-embedded/stm32flash/Manifest
index 163be1341cd9..7e8cb5919b56 100644
--- a/dev-embedded/stm32flash/Manifest
+++ b/dev-embedded/stm32flash/Manifest
@@ -1,8 +1,3 @@
-AUX stm32flash-0.6-fix-i2c-erase-01fbb65.patch 897 BLAKE2B 1b0885926d95c828dfa3ae04050ce7c1b4a10cac22e0d33776a2ab2e2e32fbdce825d05dd21dcbecc60a4bd88e7b302103b7809e999084bc881b724dce56c2a4 SHA512 3646b737bdd8d7f1ad750d230b6d975a92557f3204261b8637aaef75fad311c6b43717c4a989e23d566a9d37c4a464a8ef0736acee1e2be15683f2c8d17bb07e
-AUX stm32flash-0.6-fix-i2c-erase-17a24f8.patch 2355 BLAKE2B 450e7bf2da49e38eeeabfb380ef6f30bf8154226ed12e0392dd00a01cd37e423957a37d63ebcb35ddebbd84899b07f0ed730e8bd79b2e8eacf9594757e917afc SHA512 b97d2a303a218622587e08a369e5971d4df4502f0088b10746d97ed4950a44460e5856d51ad90f787975d701a0166b0f15718e8e05b35755e4a4b9b92d0bcab0
-AUX stm32flash-0.6-fix-i2c-erase-b079cd0.patch 3165 BLAKE2B a3a6c78bfae85e3fad0c8e4d8a7f2b0759d5baac7c1001c5f45dac012258f9fa05f1c8191e58a424e3462d6b24a8dacf4ca761ccb952522e4d8eade93a2824f5 SHA512 a1619ab49943047b47a6e96137a9157dffbeb43d06b801642c6c822427cd86ea6025dfea4d202d7998c062309f33a04802d08e8c13fbeae059de979e80a2d7d6
-DIST stm32flash-0.6.tar.gz 376186 BLAKE2B 82e479b4fad2c3ff832aea9d0d62d556500fd8c0530e879690b9b83cdf05f078b0051e1e104e7cb64b9c360ef84415904639ee67ee147045ce8e15ca3f6c61e1 SHA512 2d92ecf4f82b8a702b596cbf3c4ff594f67083f7dcec82c064555f73b47834b41a918efa1846e47fc8740ae63fa818b16dfb5b38fa242c17f465666a651eee3a
DIST stm32flash-0.7.tar.gz 380166 BLAKE2B 98522968072821e3cf110e62486a3b9ee90ac6c7e600f6633acbfac904024390157743f0895cae181fc9b20f4f14dc5b833c36e02de4adbfc644c797abd12d63 SHA512 328254dd043dc707cf8c3edf8ddd4a9441c85d9cb2ca1682bcb3f5301d526b04ed6fb335e72a94e3d26341f18bef45968bf321f0ffeb80eaa0c3add6701349ff
-EBUILD stm32flash-0.6.ebuild 671 BLAKE2B 4c8404006fd8ccf66ebb3094b14dc9698dbec00fbb701a1a316952e7b9264e4d049873a88249925be894e39b8ac589dec23f1846a31e443134feb5a4f00ab798 SHA512 4ff141435294dc82302afa7ce56262cfde1f00f26c806fc2fa9d7d01ab937c338a83c40fa0083e3d2561f292a08a0cb6cf7757b8b8afd8da9b5fbb1c31278c3a
EBUILD stm32flash-0.7.ebuild 372 BLAKE2B c0a9506d4872553d0dee7b5ca9d9a13ac417d87f22cb73d9d3cc57df4da1b6499fae498e3ac40faf8b886414e1f5232095489091fcf8c584f216c9ecd0b81186 SHA512 4a2c637b3b5c4969436a6e7af32b265a2722d3dc2b1ab6eab1d58fcf6a9a8d263a81e4876ee5519ddf48cbae3acc8e32dc3963c68a7ee181de5386c0af8a8213
MISC metadata.xml 248 BLAKE2B 62a02d1d6c2528ce44a3f3cb59d494b6e2707d195f38d2b0e6641cb11270bde3a3ddc2a0e1d52ebe354f832590af24b122e6c8c2a2356a802e0bcdc039585d88 SHA512 9ad0817759b2a2ccc47f9f1ba2eae5438dcaf2c685ba752c80dad2df5008bd513f050409be11124e5ea61a9605643ccf591443d275fe6e22b3fe33aa3210c55c
diff --git a/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-01fbb65.patch b/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-01fbb65.patch
deleted file mode 100644
index c4c7a2a7fedc..000000000000
--- a/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-01fbb65.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 01fbb65d4626e1c122e329075526bd6035cb0be6 Mon Sep 17 00:00:00 2001
-From: Tormod Volden <debian.tormod@gmail.com>
-Date: Thu, 2 Sep 2021 16:25:57 +0200
-Subject: [PATCH 06/15] stm32: Fix typo from recent commit
-
-Oops, I got this wrong while amending commit b079cd09.
-
-Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
----
- stm32.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/stm32.c b/stm32.c
-index 6e2e402..0edaf01 100644
---- a/stm32.c
-+++ b/stm32.c
-@@ -851,7 +851,7 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
- buf[i++] = pages - 1;
- cs ^= (pages-1);
- /* For I2C send a checksum after the number of pages (AN4221) */
-- if (port->flags && PORT_NPAG_CSUM) {
-+ if (port->flags & PORT_NPAG_CSUM) {
- buf[i++] = cs;
- p_err = port->write(port, buf, i);
- if (p_err != PORT_ERR_OK) {
---
-2.33.0.309.g3052b89438-goog
-
diff --git a/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-17a24f8.patch b/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-17a24f8.patch
deleted file mode 100644
index e0b519c48413..000000000000
--- a/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-17a24f8.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 17a24f873122b96481adefaadc128bd1abba594f Mon Sep 17 00:00:00 2001
-From: Tormod Volden <debian.tormod@gmail.com>
-Date: Sat, 21 Aug 2021 13:06:34 +0200
-Subject: [PATCH 02/15] stm32: Consistent and unique erase error messages
-
-Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
----
- stm32.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/stm32.c b/stm32.c
-index 82fa26a..e071905 100644
---- a/stm32.c
-+++ b/stm32.c
-@@ -797,7 +797,7 @@ static stm32_err_t stm32_mass_erase(const stm32_t *stm)
- return STM32_ERR_OK;
- }
-
-- /* extended erase */
-+ /* extended erase (0x44 or 0x45) */
- buf[0] = 0xFF; /* 0xFFFF the magic number for mass erase */
- buf[1] = 0xFF;
- buf[2] = 0x00; /* checksum */
-@@ -870,11 +870,12 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
- p_err = port->write(port, buf, i);
- free(buf);
- if (p_err != PORT_ERR_OK) {
-- fprintf(stderr, "Erase failed.\n");
-+ fprintf(stderr, "Erase failed sending list of pages.\n");
- return STM32_ERR_UNKNOWN;
- }
- s_err = stm32_get_ack_timeout(stm, pages * STM32_PAGEERASE_TIMEOUT);
- if (s_err != STM32_ERR_OK) {
-+ fprintf(stderr, "Erase failed.\n");
- if (port->flags & PORT_STRETCH_W)
- stm32_warn_stretching("erase");
- return STM32_ERR_UNKNOWN;
-@@ -882,7 +883,7 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
- return STM32_ERR_OK;
- }
-
-- /* extended erase */
-+ /* extended erase (0x44 or 0x45) */
- buf = malloc(2 + 2 * pages + 1);
- if (!buf)
- return STM32_ERR_UNKNOWN;
-@@ -925,13 +926,13 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
- p_err = port->write(port, buf, i);
- free(buf);
- if (p_err != PORT_ERR_OK) {
-- fprintf(stderr, "Page-by-page erase error.\n");
-+ fprintf(stderr, "Extended erase failed sending list of pages.\n");
- return STM32_ERR_UNKNOWN;
- }
-
- s_err = stm32_get_ack_timeout(stm, pages * STM32_PAGEERASE_TIMEOUT);
- if (s_err != STM32_ERR_OK) {
-- fprintf(stderr, "Page-by-page erase failed. Check the maximum pages your device supports.\n");
-+ fprintf(stderr, "Extended erase failed. Check the maximum pages your device supports.\n");
- if ((port->flags & PORT_STRETCH_W)
- && stm->cmd->er != STM32_CMD_EE_NS)
- stm32_warn_stretching("erase");
---
-2.33.0.309.g3052b89438-goog
-
diff --git a/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-b079cd0.patch b/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-b079cd0.patch
deleted file mode 100644
index dcd7299570c5..000000000000
--- a/dev-embedded/stm32flash/files/stm32flash-0.6-fix-i2c-erase-b079cd0.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From b079cd09bc942b4a489cad29524418441a44fc82 Mon Sep 17 00:00:00 2001
-From: Yann Sionneau <ysionneau@kalray.eu>
-Date: Wed, 28 Apr 2021 14:16:01 +0200
-Subject: [PATCH 01/15] Follow bootloader protocol for page-by-page erase over
- I2C
-
-For I2C the protocol is slighly different than for USART,
-requiring a checksum after the number of pages.
-
-https://sourceforge.net/p/stm32flash/tickets/98/
-
-Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
-[Tormod: Add port flag, no wait, amend messages]
-Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
----
- i2c.c | 2 +-
- port.h | 1 +
- stm32.c | 37 +++++++++++++++++++++++++++++++++++++
- 3 files changed, 39 insertions(+), 1 deletion(-)
-
-diff --git a/i2c.c b/i2c.c
-index bb99545..8425b41 100644
---- a/i2c.c
-+++ b/i2c.c
-@@ -204,7 +204,7 @@ static port_err_t i2c_flush(struct port_interface __unused *port)
-
- struct port_interface port_i2c = {
- .name = "i2c",
-- .flags = PORT_STRETCH_W,
-+ .flags = PORT_STRETCH_W | PORT_NPAG_CSUM,
- .open = i2c_open,
- .close = i2c_close,
- .flush = i2c_flush,
-diff --git a/port.h b/port.h
-index 4e728d7..1a28dc6 100644
---- a/port.h
-+++ b/port.h
-@@ -34,6 +34,7 @@ typedef enum {
- #define PORT_CMD_INIT (1 << 2) /* use INIT cmd to autodetect speed */
- #define PORT_RETRY (1 << 3) /* allowed read() retry after timeout */
- #define PORT_STRETCH_W (1 << 4) /* warning for no-stretching commands */
-+#define PORT_NPAG_CSUM (1 << 5) /* checksum after number of pages to erase */
-
- /* all options and flags used to open and configure an interface */
- struct port_options {
-diff --git a/stm32.c b/stm32.c
-index 966048b..82fa26a 100644
---- a/stm32.c
-+++ b/stm32.c
-@@ -843,6 +843,25 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
-
- buf[i++] = pages - 1;
- cs ^= (pages-1);
-+ /* For I2C send a checksum after the number of pages (AN4221) */
-+ if (port->flags && PORT_NPAG_CSUM) {
-+ buf[i++] = cs;
-+ p_err = port->write(port, buf, i);
-+ if (p_err != PORT_ERR_OK) {
-+ fprintf(stderr, "Erase failed sending number of pages.");
-+ free(buf);
-+ return STM32_ERR_UNKNOWN;
-+ }
-+ s_err = stm32_get_ack(stm);
-+ if (s_err != STM32_ERR_OK) {
-+ fprintf(stderr, "Erase failed, no ack after number of pages.");
-+ free(buf);
-+ return STM32_ERR_UNKNOWN;
-+ }
-+ cs = 0;
-+ i = 0;
-+ }
-+
- for (pg_num = spage; pg_num < (pages + spage); pg_num++) {
- buf[i++] = pg_num;
- cs ^= pg_num;
-@@ -876,6 +895,24 @@ static stm32_err_t stm32_pages_erase(const stm32_t *stm, uint32_t spage, uint32_
- buf[i++] = pg_byte;
- cs ^= pg_byte;
-
-+ if (port->flags & PORT_NPAG_CSUM) {
-+ buf[i++] = cs;
-+ p_err = port->write(port, buf, i);
-+ if (p_err != PORT_ERR_OK) {
-+ fprintf(stderr, "Extended erase failed sending number of pages.");
-+ free(buf);
-+ return STM32_ERR_UNKNOWN;
-+ }
-+ s_err = stm32_get_ack(stm);
-+ if (s_err != STM32_ERR_OK) {
-+ fprintf(stderr, "Extended erase failed, no ack after number of pages.");
-+ free(buf);
-+ return STM32_ERR_UNKNOWN;
-+ }
-+ cs = 0;
-+ i = 0;
-+ }
-+
- for (pg_num = spage; pg_num < spage + pages; pg_num++) {
- pg_byte = pg_num >> 8;
- cs ^= pg_byte;
---
-2.33.0.309.g3052b89438-goog
-
diff --git a/dev-embedded/stm32flash/stm32flash-0.6.ebuild b/dev-embedded/stm32flash/stm32flash-0.6.ebuild
deleted file mode 100644
index 34348ceabecc..000000000000
--- a/dev-embedded/stm32flash/stm32flash-0.6.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="Open source flash program for STM32 using the ST serial bootloader"
-HOMEPAGE="https://sourceforge.net/projects/stm32flash/"
-SRC_URI="https://downloads.sourceforge.net/project/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-PATCHES=(
- "${FILESDIR}/stm32flash-0.6-fix-i2c-erase-b079cd0.patch"
- "${FILESDIR}/stm32flash-0.6-fix-i2c-erase-17a24f8.patch"
- "${FILESDIR}/stm32flash-0.6-fix-i2c-erase-01fbb65.patch"
-)
-
-src_prepare() {
- default
- tc-export CC
-}
-
-src_install() {
- dobin ${PN}
- doman ${PN}.1
-}