Note that there are some explanatory texts on larger screens.

plurals
  1. POstm32f4 - discovery - Using the armcc compiler and setting include paths
    text
    copied!<p>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).</p> <p>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.</p> <p>this is my program im trying to compile </p> <pre><code>#include &lt;stm32f10x.h&gt; /* STM32F103 definitions */ /*---------------------------------------------------------------------------- wait function *----------------------------------------------------------------------------*/ void wait (void) { int d; for (d = 0; d &lt; 2000000; d++); /* only to delay for LED flashes */ } /*---------------------------------------------------------------------------- Main Program *----------------------------------------------------------------------------*/ int main (void) { unsigned int i; /* LED variable */ RCC-&gt;APB2ENR |= (1UL &lt;&lt; 3); /* Enable GPIOB clock */ GPIOB-&gt;CRH = 0x33333333; /* PB.8..16 defined as Outputs */ while (1) { /* Loop forever */ for (i = 1&lt;&lt;8; i &lt; 1&lt;&lt;15; i &lt;&lt;= 1) { /* Blink LED 0,1,2,3,4,5,6 */ GPIOB-&gt;BSRR = i; /* Turn LED on */ wait (); /* call wait function */ GPIOB-&gt;BRR = i; /* Turn LED off */ } for (i = 1&lt;&lt;15; i &gt; 1&lt;&lt;8; i &gt;&gt;=1 ) { /* Blink LED 7,6,5,4,3,2,1 */ GPIOB-&gt;BSRR = i; /* Turn LED on */ wait (); /* call wait function */ GPIOB-&gt;BRR = i; /* Turn LED off */ } } } </code></pre> <p>and this is my armcc compiler options. -</p> <p>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</p> <p>and the error i get is : Error 5: Cannot open source input file "stm32f10x.h" No such file or directory #include /* STM32F103 definitions */</p> <p>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!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload