cancel
Showing results for 
Search instead for 
Did you mean: 

problem to start en.x-cube-wifi1_firmware prject VCOM in debug (keil)

yoann LBY
Senior
Posted on March 17, 2017 at 15:49

i'm using the STM32L053R8 (nucleo_board) with SPWF01SC wifi expansion module. i run some examples from  STM32CubeExpansion_WIFI1_V2.1.1 code but only using drag and drop file.bin on Nucleo drive. if i open project (Wifi_VCOM) with keil, compile/link is ok, load is ok but when i run, the program is locked in instruction:

printf('\r\n\n/********************************************************\n');

i tried to remove define USART_PRINT_MSG but locked again. I don't know what is the problem?

Thanks

#en.x-cube-wifi1_firmware-+-spwf01sc #spwf01sc
5 REPLIES 5
Posted on March 18, 2017 at 15:29

Hi,

is printf retargeted to standard output function? Is 'int fputc(int ch, FILE *f)' implemented inside the project? There are examples inside 'Retarget.c' files, under 'Keil\ARM\Examples' install directory.

This is the idea: printf calls fputc, fputc calls uartSendChar, uartSendChar calls HAL_UART_Transmit, and in the end HAL_UART_Transmit calls STM32 low level driver for UART send byte.

Printf calls proper standard output function, based on compiler (__IAR_SYSTEMS_ICC__, __CC_ARM, __GNUC__).

yoann LBY
Senior
Posted on March 20, 2017 at 09:38

hi,

thanks for your response but i didn't modify the code \en.x-cube-wifi1_firmware\STM32CubeExpansion_WIFI1_V2.1.1\Projects\Multi\Applications\WiFi_VCOM\MDK-ARM\STM32L053R8-Nucleo\. The binary \en.x-cube-wifi1_firmware\STM32CubeExpansion_WIFI1_V2.1.1\Projects\Multi\Applications\WiFi_VCOM\Binary\STM32L053R8-Nucleo\Project.bin works well (drag and drop Project.bin on Nucleo drive). Binary generated by Keil uVision toolchain doesn't work (drag and drop and in debug). I think it's a option to activate/disactivate in the toolchain or a define in the code ! Someone did try to test Application Wifi_VCOM in debug? Another solution? Thks

Posted on March 22, 2017 at 11:15

Hi,

xcube 'Retarget.c' file is called 'console.c' (in folder 'src'). Please add it to the project, compile again, and flash.

It contains low level putc retarget for stdio library (needed by printf).

Posted on March 22, 2017 at 17:56

hi,

It works. Thanks

Posted on March 27, 2017 at 17:09

XCUBE-WIFI1 v3.0.1 has been released.

It solves this issue, and it's also a starting point for SPWF04S new wifi module.