Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8687777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:11:46+00:00 2026-06-12T23:11:46+00:00

So, im trying to build my self a program that will compile all my

  • 0

So, im trying to build my self a program that will compile all my code and stuff in windows with gcc. (to use it with visual studio).

it have gone pretty good until now, when i have a include.
the problem is that it cant finde the .H file since it´s in another directory.
but even if i add the -Idir[PATH1,PATH2,PATH3] it still dosent find it.

this is my program im trying to compile

#include <stm32f10x.h>                      /* STM32F103 definitions         */

/*----------------------------------------------------------------------------
  wait function
 *----------------------------------------------------------------------------*/
void wait (void)  {
  int  d;

  for (d = 0; d < 2000000; d++);             /* only to delay for LED flashes */
}


/*----------------------------------------------------------------------------
  Main Program
 *----------------------------------------------------------------------------*/
int main (void) {
  unsigned int i;                            /* LED variable                  */

  RCC->APB2ENR |= (1UL << 3);                /* Enable GPIOB clock            */

  GPIOB->CRH    =  0x33333333;               /* PB.8..16 defined as Outputs   */

  while (1)  {                               /* Loop forever                  */
    for (i = 1<<8; i < 1<<15; i <<= 1) {     /* Blink LED 0,1,2,3,4,5,6       */
      GPIOB->BSRR = i;                       /* Turn LED on                   */
      wait ();                               /* call wait function            */
      GPIOB->BRR = i;                        /* Turn LED off                  */
    }
    for (i = 1<<15; i > 1<<8; i >>=1 ) {     /* Blink LED 7,6,5,4,3,2,1       */
      GPIOB->BSRR = i;                       /* Turn LED on                   */
      wait ();                               /* call wait function            */
      GPIOB->BRR = i;                        /* Turn LED off                  */
    }
  }
}

and this is my armcc compiler options. –

C:/Keil/ARM/ARMCC/bin/armcc.exe -c –dwarf2 –MD -O0 –cpu=cortex-m4 -Idir[,C:/Keil/ARM/INC/,C:/Keil/ARM/CMSIS/Include/,C:/Keil/ARM/INC/ST/STM32F10x/] -Jdir[,C:/Keil/ARM/INC/,C:/Keil/ARM/CMSIS/Include/,C:/Keil/ARM/INC/ST/STM32F10x/] Blinky.c

and the error i get is :
Error 5: Cannot open source input file “stm32f10x.h” No such file or directory
#include /* STM32F103 definitions */

Why do i get this error even if i include the paths?
Have i actualy included my pahts correctly?
any points, info or anything is more than welcome!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:11:47+00:00Added an answer on June 12, 2026 at 11:11 pm

    According to my reading of the Keil documentation for the -I option, your command line should look something like this:

     C:/Keil/ARM/ARMCC/bin/armcc.exe -c --dwarf2 --MD -O0 --cpu=cortex-m4 -IC:/Keil/ARM/INC/,C:/Keil/ARM/CMSIS/Include/,C:/Keil/ARM/INC/ST/STM32F10x/ -JC:/Keil/ARM/INC/,C:/Keil/ARM/CMSIS/Include/,C:/Keil/ARM/INC/ST/STM32F10x/ Blinky.c
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to build Xuggler under Windows. Xuggler is core native code functions wrapped into
I'm trying to build a static class called Logger that will upload the log
I'm trying to build a class which will initalise its self either by passing
I'm trying to build something that will only fire a command once per keyboard
I'm trying to build a search engine that will check a list and then
I'm trying to build a WCF self hosted service (eventually in a windows service)
I'm trying to build a ScrolledWindow that you can draw on using the mouse,
I am trying to build a self-updating collection. Each item in the collection has
I'm trying to build a sfx (self extracting archive) using winrar. I'm using VS2008
I'm trying to build a prototype application that consists of a table of data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.