cancel
Showing results for 
Search instead for 
Did you mean: 

Backslashes in F429DISCO BSP

lukas2399
Associate II
Posted on May 05, 2014 at 22:36

Hello Everybody,

in the process of compiling some of the Examples for the STM32F429DISCO on a linux machine I noticed that Include paths are specified using backslashes instead of slashes. Obviously, backslashes only work on Windows and I had to modify the BSP to use Slashes to make it Compile on linux.

Quote from K&R (via https://code.google.com/p/tageventor/wiki/pcscHeaders)

The characters in the name filename must not include > or newline, and the effect is undefined if it contains any of '', ', \, or /.

I'd appreciate if future Releases of the CubeMX software package used slashes for path separation. Slashes work on Windows, too.

Lukas
7 REPLIES 7
stm32cube-t
Senior III
Posted on May 09, 2014 at 10:42

Hi Lukas,

Can you please provide a file as example.

Thank you.

lukas2399
Associate II
Posted on May 13, 2014 at 20:47

Hi there,

take a look at the file ''Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery_lcd.c''

#include ''..\..\..\Utilities\Fonts\fonts.h''

This line (and all the others) should read like that

#include ''../../../Utilities/Fonts/fonts.h''

this way, it works on all operating systems.

Posted on May 14, 2014 at 18:45

Hi lukas,

I'm wondering with which compiler are you working on the linux machine ?

With regards.

Posted on May 14, 2014 at 20:50

I guess that goes to K&R's undefined behaviour.

I did confirm back when you originally posted that Keil uV 4.7x was tolerant of slashes in either direction. I don't know that's true for all C compilers, I'm sure the DOS/Windows compilers stumble over this format more frequently than the other way round, but tolerance is a two-way street, perhaps the Unix compilers should work either way too.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
lukas2399
Associate II
Posted on May 15, 2014 at 17:54

I'm using the GCC (also used by Attolic True Studio)

Concerning compilers not accepting slashes as path separators: That's not (or should not be) the compiler's business. The Compiler will pass the path to the Operating system.

http://en.wikipedia.org/wiki/Path_%28computing%29#MS-DOS.2FMicrosoft_Windows_style

Windows accepts both slashes and backslashes.

The STM32Cube package even contains Source files using #includes with slashes as path separators. (in LwIP, fatfs, freertos)

rihab150192
Associate II
Posted on May 17, 2014 at 16:56

Hi, i'm using stm32F429 and i and to display a variable which increment from 1 to 5 but it didn't work can please help me.This is the code

#include ''main.h''

void Delay(unsigned long period) {

  unsigned long j;

for(j=0;j<=period;j++);

}

int main(void)

{

uint8_t i;

  /* LCD initiatization */

  LCD_Init();

  

  /* LCD Layer initiatization */

 LCD_LayerInit();

    

  /* Enable the LTDC */

  LTDC_Cmd(ENABLE);

  

  /* Set LCD foreground layer */

  LCD_SetLayer(LCD_FOREGROUND_LAYER);

LCD_Clear(LCD_COLOR_WHITE);

  for(i=0;i<=5;i++)

{

LCD_DisplayStringLine(LINE(8), (uint8_t*)i);

Delay(3000000L);

}

}

#ifdef  USE_FULL_ASSERT

/**

  * @brief  Reports the name of the source file and the source line number

  *         where the assert_param error has occurred.

  * @param  file: pointer to the source file name

  * @param  line: assert_param error line source number

  * @retval None

  */

void assert_failed(uint8_t* file, uint32_t line)

{

  /* User can add his own implementation to report the file name and line number,

     ex: printf(''Wrong parameters value: file %s on line %d\r\n'', file, line) */

  /* Infinite loop */

  while (1)

  {

  }

}

#endif

/**

  * @}

  */ 

/**

  * @}

  */ 

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

Posted on May 23, 2014 at 17:49

Hi Rihab,

Please write a new forum post describing your problem.

With regards.