cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube_FW_F3_V1.7.0: Problem building UART example

Prasant J
Associate III
Posted on April 11, 2017 at 14:49

Hi,

I have downloaded STM32Cube_FW_F3_V1.7.0 and I'm trying to build examples using 'System Workbench for STM32'. I have STM32F303 Nucleo 144 Development Board (F303ZE).

I'm trying the following example:

STM32Cube_FW_F3_V1.7.0\Projects\STM32F303ZE-Nucleo\Examples\UART\UART_Printf\SW4STM32\STM32F303ZE-Nucleo

I imported the project in System Workbench but the project does not build. It gives error:

make all

make: *** No rule to make target `all'. Stop.

* Are these example projects tested and verified to work with System Workbench?

* Is there any known bug with these examples?

* How to import the project into System Workbench? May be the way I import is wrong.

In my own custom project printf/UART is not working. So I'm trying to get this example to work such that I can use it as a reference.

Any inputs might be of help to me.

Regards, Pj

#uart #stm32cube_fw_f3
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on April 12, 2017 at 12:45

Hi

J.Prasant

,

Please refer to this link

https://community.st.com/0D50X00009XkfDjSAJ

-Nesrine-

View solution in original post

8 REPLIES 8
Nesrine M_O
Lead II
Posted on April 11, 2017 at 15:44

Hi

J.Prasant

,

I'am not able to reproduice your issue using

SW4STM32 V1.0

-Nesrine-

Posted on April 12, 2017 at 08:25

Hi

ELMHIRI.Syrine

‌,

Thanks for your response.

I'm able to build projects generated by STCubeMX with SystemWorkbench.In my projectUART/printf is not working. The project builds and get loaded on to the STM32F303 Nucleo 144 board but Uart does not work. Its very likely there is a bug in my software. I can check MCO pins and also change LEDs on my board but Uart is not working.

As my own project isnot working I started looking out for reference code and examples. I would like to try out UART_Printf example in STM32_Cube_F3 using 'System Workbench' and but the example project provided by STM does not build.

Could you please build UART_printf example from:

STM32Cube_FW_F3_V1.7.0\Projects\STM32F303ZE-Nucleo\Examples\UART\UART_Printf\SW4STM32\STM32F303ZE-Nucleo

Using SystemWorkbench (SW4STM32 v1.0) and confirm whether it builds or not?

Regards,Pj

Posted on April 12, 2017 at 11:13

Hi

J.Prasant

,

  • The UART Printf example under the STM32cubeF3 firmwarebuild without any issue with SW4STM

STM32Cube_FW_F3_V1.7.0\Projects\STM32F303ZE-Nucleo\Examples\UART\UART_Printf\SW4STM32

-Nesrine-

Posted on April 12, 2017 at 12:22

Hi

ELMHIRI.Syrine

‌,

Thanks for that info. This confirms I may be doing something wrong. But I'm just importing the project and trying to build and it fails. Not sure why it is not building.

I'm looking at the example to figureout how is printf linked to USART3. If I want to use UART4 instead of USART3 for printf where should I make this change (assuming I have setup UART4 pins and clocks correctly) ?

Regards, Pj

Posted on April 12, 2017 at 12:39

Update:

I see that this code makes the connection between printf and USART3:

PUTCHAR_PROTOTYPE

{

  HAL_UART_Transmit(&UartHandle, (uint8_t *)&ch, 1, 0xFFFF);

  return ch;

}

I somehow overlooked this function in main.c

Anyway.. in my project UART is working (I can send characters over UART using HAL_UART_TRANSMIT) but printf still does not work... even though I have defined the above function in my project and also defined PUTCHAR_PROTOTYPE.

Not sure what is the missing from my project.

Regards, Pj

Posted on April 12, 2017 at 12:45

Hi

J.Prasant

,

Please refer to this link

https://community.st.com/0D50X00009XkfDjSAJ

-Nesrine-

Posted on April 12, 2017 at 13:03

Hi

ELMHIRI.Syrine

‌,

Thanks for your response. From Ac6 forumsI found out that syscalls.c was the last missing thing from my project. I copied that from the example project into my project and printf started working.

Thanks for your help!

Regards, Pj

nrana
Associate