June 20, 2024, 02:55:25 PM

BB-STM32WL GITHUB project fails

Started by airheadbit, April 15, 2022, 09:04:05 PM

Previous topic - Next topic

airheadbit

The current github project for the BB-STM32WL failed to compile, I fixed main.c and got it to compile but the debug session fails to start:

Problem:
Error in final launch sequence:

Failed to execute MI command:
target extended-remote localhost:3333

Error message from debugger back end:
localhost:3333: Connection timed out.
Failed to execute MI command:
target extended-remote localhost:3333

Error message from debugger back end:
localhost:3333: Connection timed out.
localhost:3333: Connection timed out.

Console
Open On-Chip Debugger 0.11.0+dev-00443-gcf12591 (2022-02-09-13:33) [ST Internal]
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
Info : DEPRECATED 'tpiu config' command: Using STM32WLE5CCUx.tpiu
Info : DEPRECATED 'tpiu config' command: Running: 'STM32WLE5CCUx.tpiu disable'
Error: The 'STM32WLE5CCUx.tpiu disable' command must be used after 'init'.


Note: STM32CubeMX is version 6.5.0 and it will only work with STM32Cube_FW_WL_V1.2.0 - You can tell it to use V1.0.0 or 1.1.0 but it doesn't.

STM32CubeIDE is Version 1.9.0, the MX engine inside of STM32CubeIDE is currently broken, it will not generate code based on boards like the STM32WL55C1/2.


LubOlimex

Technical support and documentation manager at Olimex

JeanBonnot

I had the same problem after "migrate" the project after import.

re-git and choose "continue" not "migrate"

kovacsbalazs

Almost same problem...

Unfortunately, it (migrate/continue) doesn't help, there's something wrong with the demo. Or at least a description of what makes it special...
Clean, fresh install, freshly downloaded, unzipped zip. So far, all his attempts have always led to the same error.

"
./Core/Src/subghz.o:C:/stm32cube/LoRa-STM32WL-DevKIT-main/SOFTWARE/BB-STM32WLE-WAN/Debug/../Core/Src/subghz.c:27: multiple definition of ` hsubghz'; ./Core/Src/main.o:C:/stm32cube/LoRa-STM32WL-DevKIT-main/SOFTWARE/BB-STM32WLE-WAN/Debug/../Core/Src/main.c:60: first defined here
"

JeanBonnot

Hi i've follow the issues here https://github.com/OLIMEX/LoRa-STM32WL-DevKIT/pulls
and now it compile... BUT still have the debug issue :

For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : DEPRECATED 'tpiu config' command: Using STM32WLE5CCUx.tpiu
Info : DEPRECATED 'tpiu config' command: Running: 'STM32WLE5CCUx.tpiu disable'
Error: The 'STM32WLE5CCUx.tpiu disable' command must be used after 'init'.

then openocd close  >:(

LubOlimex

Technical support and documentation manager at Olimex

LubOlimex

Quote from: kovacsbalazs on September 17, 2023, 12:22:35 PMAlmost same problem...

Unfortunately, it (migrate/continue) doesn't help, there's something wrong with the demo. Or at least a description of what makes it special...
Clean, fresh install, freshly downloaded, unzipped zip. So far, all his attempts have always led to the same error.

"
./Core/Src/subghz.o:C:/stm32cube/LoRa-STM32WL-DevKIT-main/SOFTWARE/BB-STM32WLE-WAN/Debug/../Core/Src/subghz.c:27: multiple definition of ` hsubghz'; ./Core/Src/main.o:C:/stm32cube/LoRa-STM32WL-DevKIT-main/SOFTWARE/BB-STM32WLE-WAN/Debug/../Core/Src/main.c:60: first defined here
"

This is because the project was made with older version of STM32CubeIDE, and version 1.11.0 introduced some major changes to compiler. In order to compile the project successfully (e.g. make the environment behave like it used to), do the following:

- In the Project Explorer right-click over the name of the project and go to "Properties" at the bottom;
- New window will pop up and under "C/C++ Build select Settings";
- Go under "MCU GCC Compiler" and select "Miscellaneous";
- Add new flag from the small green plus sign named "Add..";
- add "-fcommon" and save and "Apply and Close".

Then clean the project and then build it. There should be a few warnings that can be ignored but now the project will compile and work fine.

It is this issue, for more info read here for a lot of people and projects that had same problem:

https://community.st.com/t5/stm32cubeide-mcus/multiple-definition-error-after-stm32cubeide-1-9-0-update/td-p/130147

Alternatively, you can just use older version of STM32CubeIDE. I think previously I used 1.10.0 without issues.
Technical support and documentation manager at Olimex