Hi friends,
May you please give me some times to help.
I am trying to debug stm32f407 using Eclipse, openocd, and stlink.
During the debug, I got that error (image file)
Do you know the reason for that problem, I think problem is in halInit() function.
Thank you so much.
Debugging Error of STM32f407 using Linux Ubuntu and openocd
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: Debugging Error of STM32f407 using Linux Ubuntu and openocd
I think, you are using GDB for x86, this is why it fails.
Not sure, are you using ChibiStudio or a self built toolchain? You may try our pre-configured VM and verify differences.
Giovanni
Not sure, are you using ChibiStudio or a self built toolchain? You may try our pre-configured VM and verify differences.
Giovanni
Re: Debugging Error of STM32f407 using Linux Ubuntu and openocd
Giovanni wrote:I think, you are using GDB for x86, this is why it fails.
Not sure, are you using ChibiStudio or a self built toolchain? You may try our pre-configured VM and verify differences.
Giovanni
Hello Giovanni.
I am not using ChibiStudio. I am using Eclipse Luna, Openocd 0.10 and Chibios 3.0.2. So, I built toolchain by myself.
Yesday, when I tried to program for led blink, but the program did work incorrectly. In this program, for thread function, I just blink 1 led, and in the main loop, just checked button status. Then the led could not blink. So, I think there are some problem in configuration or init, but I did not know where.
How can I use your pre-configured VM?
Thanks
- 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: Debugging Error of STM32f407 using Linux Ubuntu and openocd
Self-built toolchains are a common cause of problems, we recommend using GCC built by ARM, they do patching on top of release code:
https://launchpad.net/gcc-arm-embedded
The VM is available here, all you need is VirtualBox, user/pass are chibios/chibios, launchers are in the task bar:
https://osdn.net/projects/chibios/releases/71386
You need to combine the 3 files in a single file:
cat VM_*.7z.* > VM_LinuxMint19.2_with_ChibiStudioP2.7z
Please see the whole discussion here, there are hints: viewtopic.php?f=3&t=5176
Giovanni
https://launchpad.net/gcc-arm-embedded
The VM is available here, all you need is VirtualBox, user/pass are chibios/chibios, launchers are in the task bar:
https://osdn.net/projects/chibios/releases/71386
You need to combine the 3 files in a single file:
cat VM_*.7z.* > VM_LinuxMint19.2_with_ChibiStudioP2.7z
Please see the whole discussion here, there are hints: viewtopic.php?f=3&t=5176
Giovanni
Re: Debugging Error of STM32f407 using Linux Ubuntu and openocd
Giovanni wrote:Self-built toolchains are a common cause of problems, we recommend using GCC built by ARM, they do patching on top of release code:
https://launchpad.net/gcc-arm-embedded
The VM is available here, all you need is VirtualBox, user/pass are chibios/chibios, launchers are in the task bar:
https://osdn.net/projects/chibios/releases/71386
You need to combine the 3 files in a single file:
cat VM_*.7z.* > VM_LinuxMint19.2_with_ChibiStudioP2.7z
Please see the whole discussion here, there are hints: viewtopic.php?f=3&t=5176
Giovanni
Thank you so much for your rapid reply.
how can I install VM in VirtualBox? Do you have any tutorial?
I will try VM.
Re: Debugging Error of STM32f407 using Linux Ubuntu and openocd
Giovanni wrote:Self-built toolchains are a common cause of problems, we recommend using GCC built by ARM, they do patching on top of release code:
https://launchpad.net/gcc-arm-embedded
The VM is available here, all you need is VirtualBox, user/pass are chibios/chibios, launchers are in the task bar:
https://osdn.net/projects/chibios/releases/71386
You need to combine the 3 files in a single file:
cat VM_*.7z.* > VM_LinuxMint19.2_with_ChibiStudioP2.7z
Please see the whole discussion here, there are hints: viewtopic.php?f=3&t=5176
Giovanni
Before I use ChibiOS. I tried to program stm32f407 for led blink using Eclipse, openocd, and arm-none-eabi-gcc. And it worked well. But for now, I made that error.
So I think the the problem is from gcc.
what do you think about that?
Re: Debugging Error of STM32f407 using Linux Ubuntu and openocd
That is a real possibility. There is a wide range of compilers that Giovanni is not happy with because they mess up the "task switching code" or something like that.
- 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: Debugging Error of STM32f407 using Linux Ubuntu and openocd
In the past it happened several times that self-built GCCs or GCCs included in various Linux distros repositories didn't work very well.
This is why ChibiStudio exists, we are not interested in creating a toolchain, its purpose is to provide a known starting point for everybody.
Anyway, better start from a known compiler: https://launchpad.net/gcc-arm-embedded , it is maintained by ARM developers so it is the safest choice.
Giovanni
This is why ChibiStudio exists, we are not interested in creating a toolchain, its purpose is to provide a known starting point for everybody.
Anyway, better start from a known compiler: https://launchpad.net/gcc-arm-embedded , it is maintained by ARM developers so it is the safest choice.
Giovanni
Who is online
Users browsing this forum: No registered users and 17 guests