[PATCH] added missing STM32F103x8 definition Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
ceremcem
Posts: 67
Joined: Mon Aug 10, 2015 6:57 am
Has thanked: 7 times
Been thanked: 6 times

[PATCH] added missing STM32F103x8 definition  Topic is solved

Postby ceremcem » Wed Mar 06, 2019 1:36 pm

Regarding to the comment, I'm providing the patch here:

Code: Select all

From 6bc2bd8fc3871dea3c6410587b9ee4966096e15a Mon Sep 17 00:00:00 2001
From: Cerem Cem ASLAN <cem@aktos.io>
Date: Wed, 6 Mar 2019 15:29:32 +0300
Subject: [PATCH] added missing STM32F103x8 definition

---
 os/common/ext/ST/STM32F1xx/stm32f1xx.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/os/common/ext/ST/STM32F1xx/stm32f1xx.h b/os/common/ext/ST/STM32F1xx/stm32f1xx.h
index 333095bae..40e63e457 100644
--- a/os/common/ext/ST/STM32F1xx/stm32f1xx.h
+++ b/os/common/ext/ST/STM32F1xx/stm32f1xx.h
@@ -127,6 +127,10 @@
   * @{
   */
 
+#if defined(STM32F103x8)
+  #define STM32F103xB // see line 90
+#endif
+
 #if defined(STM32F100xB)
   #include "stm32f100xb.h"
 #elif defined(STM32F100xE)
--
2.20.1

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: [PATCH] added missing STM32F103x8 definition

Postby Giovanni » Sat Mar 16, 2019 4:51 pm

Hi,

Usually we do not fix vendor files, the fix would be lost next time we update the headers. Perhaps the best workaround is to define the x8 as an xB in board.h.

Giovanni

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: [PATCH] added missing STM32F103x8 definition

Postby faisal » Sat Mar 16, 2019 4:55 pm

Report issues with CMSIS files here:
https://github.com/ARM-software/CMSIS_5

Also, check if the latest trunk code already has the fix.


Submit bug report to STMicro, on their forums perhaps?
Last edited by faisal on Sat Mar 16, 2019 5:07 pm, edited 1 time in total.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: [PATCH] added missing STM32F103x8 definition

Postby Giovanni » Sat Mar 16, 2019 5:01 pm

faisal wrote:Report issues with CMSIS files here:
https://github.com/ARM-software/CMSIS_5

Also, check if the latest trunk code already has the fix.


The problem is in ST files, those are not handled there I believe.

Giovanni

ceremcem
Posts: 67
Joined: Mon Aug 10, 2015 6:57 am
Has thanked: 7 times
Been thanked: 6 times

Re: [PATCH] added missing STM32F103x8 definition

Postby ceremcem » Sat Mar 16, 2019 10:05 pm

Giovanni wrote:Hi,

Usually we do not fix vendor files, the fix would be lost next time we update the headers.
Giovanni


That's reasonable.


Perhaps the best workaround is to define the x8 as an xB in board.h.


Current examples in ChibiOS/demos stick to this approach. However, I find that quite confusing because it becomes very hard to remember which definition encapsulates what other definitions. In order to prevent typing errors (I'm not quite sure of this name) definitions in the header files should be same as the included files in the makefiles.

Another approach might be maintaining another repository for this files, like https://github.com/modm-io/cmsis-header-stm32 and applying this type of patches in that repository. When vendor makes an update, we can simply copy and paste all files into our "vendor" branch, either cherry pick all of our patches or create a "vendor update" patch, review them and finally apply everything to the "master" branch. This may seem a little bit complex, but it would consume a tiny amount of time per vendor update once it's put in order.

If you still find above approach cumbersome, I may propagate my own patches along with a ST-patches folder within chibi-project, my boilerplate for ChibiOS projects.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 37 guests