Skip to main content
Visitor II
November 3, 2025
Question

Keil slash and backslash

  • November 3, 2025
  • 1 reply
  • 154 views

I generated an STM32 project using STM32CubeMX for Keil (MDK-ARM).
In Keil, functions like HAL_GPIO_TogglePin() don’t show up in code completion (IntelliSense).
I found that in Project → Options for Target → C/C++ → Include Paths, the paths use / (for example ../Drivers/STM32F1xx_HAL_Driver/Inc) instead of \.

If I manually change / to \, code completion works — but STM32CubeMX changes them back after every code regeneration.

How can I permanently fix or configure STM32CubeMX to generate Windows-style include paths (\) for Keil projects?

UV4_fLY8qK25Zr.png

1 reply

Andrew Neil
Super User
November 3, 2025

@FAngelgel wrote:

How can I permanently fix or configure STM32CubeMX to generate Windows-style include paths (\) for Keil projects?


The use of forward-slash as a "platform independent" path separator is well established in C practice.

Perhaps ask Keil how to configure their IDE so that it supports it?

https://community.arm.com/support-forums/f/keil-forum

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.