Skip to main content
JOsen
Associate II
Mar 15, 2019 3:11 AM UTC
Solved

STM32CubeMx + STM32WB55 Nucleo targeting TrueStudio - project does not compile

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?

This topic has been closed for replies.
EGuna
EGunaBest answer
Associate
Mar 18, 2019 6:29 AM UTC

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)

{

. . .

}

4 replies

EGuna
Associate
Mar 15, 2019 9:28 AM UTC

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
JOsenAuthor
Associate II
Mar 16, 2019 1:48 AM UTC

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
JOsenAuthor
Associate II
Mar 16, 2019 10:24 PM UTC

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
EGunaBest answer
Associate
Mar 18, 2019 6:29 AM UTC

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)

{

. . .

}