chThdSleepX stucks while debugging on STM32F030x4 Topic is solved
Moderators: RoccoMarco, barthess
- 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: chThdSleepX stucks while debugging on STM32F030x4
Hi,
The last safe GCC version for Cortex-M0 is 5.4.1. This problem does not affect other Cortex cores.
I will add it to 18.2.x too.
Giovanni
The last safe GCC version for Cortex-M0 is 5.4.1. This problem does not affect other Cortex cores.
I will add it to 18.2.x too.
Giovanni
Re: chThdSleepX stucks while debugging on STM32F030x4
For those who face with this problem in the future:
1. Compiling the gcc-arm-none-eabi-5.4.1 from source seems very complicated and currently I've no success: https://unix.stackexchange.com/q/511072/65781
2. Downloading the precompiled toolchain from https://launchpad.net/gcc-arm-embedded/ ... -q3-update and setting the $PATH variable accordingly doesn't work either. Context switch still doesn't work.
3. The best bet (currently working solution) is finding an old Linux installation and using this under a virtual machine.
1. Compiling the gcc-arm-none-eabi-5.4.1 from source seems very complicated and currently I've no success: https://unix.stackexchange.com/q/511072/65781
2. Downloading the precompiled toolchain from https://launchpad.net/gcc-arm-embedded/ ... -q3-update and setting the $PATH variable accordingly doesn't work either. Context switch still doesn't work.
3. The best bet (currently working solution) is finding an old Linux installation and using this under a virtual machine.
- 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: chThdSleepX stucks while debugging on STM32F030x4
Hi,
The compiler is available from here: https://developer.arm.com/tools-and-sof ... /downloads
It is also included in ChibiStudio.
No need to build anything.
Giovanni
The compiler is available from here: https://developer.arm.com/tools-and-sof ... /downloads
It is also included in ChibiStudio.
No need to build anything.
Giovanni
Re: chThdSleepX stucks while debugging on STM32F030x4
Hi Giovanni,
I downloaded https://developer.arm.com/-/media/Files ... -q1-update which is the same binary as I downloaded from Launchpad and is not working correctly.
I prefer not to use ChibiStudio since I've created a workflow based on using ChibiOS in command line, so using ChibiStudio is not an option in my case.
Isn't it sufficient to prepend the "/path/to/extracted-toolchain-location/bin" path in front of the PATH environment variable? In my case correct compiler path is resolved:
however context switch still doesn't work. Should I need to make another preparation other then modifying PATH variable?
I downloaded https://developer.arm.com/-/media/Files ... -q1-update which is the same binary as I downloaded from Launchpad and is not working correctly.
I prefer not to use ChibiStudio since I've created a workflow based on using ChibiOS in command line, so using ChibiStudio is not an option in my case.
Isn't it sufficient to prepend the "/path/to/extracted-toolchain-location/bin" path in front of the PATH environment variable? In my case correct compiler path is resolved:
Code: Select all
(gdb) shell arm-none-eabi-gcc -dumpversion
5.3.1
however context switch still doesn't work. Should I need to make another preparation other then modifying PATH variable?
- 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: chThdSleepX stucks while debugging on STM32F030x4
No other preparation, just make sure you are invoking the right compiler if you have multiple instances. It should just work.
Giovanni
Giovanni
Re: chThdSleepX stucks while debugging on STM32F030x4
Seems to be resolved in new GCC release.
Code: Select all
From 6c916b07ff6010d1d7c597927be546682ac598bb Mon Sep 17 00:00:00 2001
From: Cerem Cem ASLAN <cem@aktos.io>
Date: Fri, 24 Apr 2020 03:34:41 +0300
Subject: [PATCH] updated GCC bug warning related to Cortex-M0 regarding to the
fix
---
os/common/ports/ARMCMx/chcore_v6m.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/os/common/ports/ARMCMx/chcore_v6m.h b/os/common/ports/ARMCMx/chcore_v6m.h
index e43f5030cf..78e76c7576 100644
--- a/os/common/ports/ARMCMx/chcore_v6m.h
+++ b/os/common/ports/ARMCMx/chcore_v6m.h
@@ -128,9 +128,9 @@
/* Handling a GCC problem impacting ARMv6-M.*/
#if defined(__GNUC__) && !defined(PORT_IGNORE_GCC_VERSION_CHECK)
-#if __GNUC__ > 5
+#if __GNUC__ > 5 && __GNUC__ < 8
#warning "This compiler has a know problem with Cortex-M0, see bugs: 88167, 88656."
-#warning "*** Use GCC version 5 or below ***"
+#warning "*** Use GCC version (5 or below) or (8 or above) ***"
#endif
#endif
--
2.20.1
- 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: chThdSleepX stucks while debugging on STM32F030x4
Hi,
Careful, GCC version 9-2019-q4 is still affected by the problem.
Giovanni
Careful, GCC version 9-2019-q4 is still affected by the problem.
Giovanni
Re: chThdSleepX stucks while debugging on STM32F030x4
Giovanni wrote:Hi,
Careful, GCC version 9-2019-q4 is still affected by the problem.
Giovanni
Oh, there was an already opened thread for that: viewtopic.php?t=5449&p=37460
Is this a new bug or those fixes didn't fix the problem correctly? Currently my test application performs the context switch correctly. Is it still the same context switch problem?
- 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: chThdSleepX stucks while debugging on STM32F030x4
It is the same problem, context switch thread-to-thread works but it does not reschedule after an interrupt.
Giovanni
Giovanni
Who is online
Users browsing this forum: No registered users and 34 guests