cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMx + STM32WB55 Nucleo targeting TrueStudio - project does not compile

JOsen
Associate III

I used STM32Cube to generate a project for TrueStudio on the STM32WB.

My target is the STM32WB55 Nucleo.

But the project will not compile. Other posts say check the project target settings. There is no selection for STM32WB.

Do I need to add another support package?

If so, how do I do that?

1 ACCEPTED SOLUTION

Accepted Solutions
EGuna
Associate II

You are welcome, and thank you for your confirmation.

One additional note:

To make the debug message (printf) sent through UART, you must check the .../Middlewares/STM32_WPAN/dbg_trace.c file, line 27:

size_t __write(int handle, const unsigned char * buf,size_t bufSize);

to 

size_t _write(int handle, const unsigned char * buf,size_t bufSize);

(reduce the underscore before write.)

Double underscore sign is used by IAR C Compiler. Atollic just need one underscore sign.

Check line 226 as well:

size_t _write(int handle, const unsigned char * buf,size_t bufSize)

{

. . .

}

View solution in original post

4 REPLIES 4
EGuna
Associate II

What is the version of your STM32CubeMX?

What is your compiler name and its version?

What is the error message shown?

I am using the STM32CubeMX 5.1.0 from https://www.st.com/en/development-tools/stm32cubemx.html

and Atollic TrueStudio 9.3.0 can compile the project files produced by the CubeMX.

To enable UART1 debug message, you need to modify the file ../Middlewares/STM32_WPAN/dbg_trace.c line 27 from:

size_t __write(int handle, const unsigned char * buf,size_t bufSize);

to 

size_t _write(int handle, const unsigned char * buf,size_t bufSize);

(reduce the underscore before write.)

Check also line 226 as well:

size_t _write(int handle, const unsigned char * buf,size_t bufSize)

{

}

Cheers,

Edy Gunawan

JOsen
Associate III

STMCubeMX: 5.1.0

Compiler? I am used to TI code composer, the compiler version is easy to find.

Toolchain is Atollic ARM tools, Atollic is at 9.1.0

I will update to 9.3.0, although I just loaded Atollic a few days ago.

OK, updating from 9.1.0 yielded nothing. I would have thought that was the way to update TrueStudio :(

I am downloading 9.3.0 now to see how it goes.

I will let you know. Thanks for the version update headsup.

JOsen
Associate III

9.3.0 fixes the issue. I need to pay better attention to my st.com emails. ST notified me of 9.3.0. But checking for updates from TrueStudio does not catch that the update is out there. Odd.

Thanks for the help.

EGuna
Associate II

You are welcome, and thank you for your confirmation.

One additional note:

To make the debug message (printf) sent through UART, you must check the .../Middlewares/STM32_WPAN/dbg_trace.c file, line 27:

size_t __write(int handle, const unsigned char * buf,size_t bufSize);

to 

size_t _write(int handle, const unsigned char * buf,size_t bufSize);

(reduce the underscore before write.)

Double underscore sign is used by IAR C Compiler. Atollic just need one underscore sign.

Check line 226 as well:

size_t _write(int handle, const unsigned char * buf,size_t bufSize)

{

. . .

}