cancel
Showing results for 
Search instead for 
Did you mean: 

When I am trying to upload simple gpio code I am getting the following errors..can anyone help me please An error occurred while retrieving GDI features: gdi-error [40201]: Can't access configuration database Couldn't find STM8S003F3 in the list of

GURUMOORTHI KANDASAMY
Associate II
Posted on March 21, 2017 at 13:28

&sharpinclude <iostm8s003f3.h>

&sharpinclude <intrinsics.h>

int main()

{

//

// Initialise Port D.

//

PD_ODR = 0; // All pins are turned off.

PD_DDR_DDR4 = 1; // Port D, bit 4 is output.

PD_CR1_C14 = 1; // Pin is set to Push-Pull mode.

PD_CR2_C24 = 1; // Pin can run upto 10 MHz.

//

// Now lets toggle to IO line.

//

while (1)

{

PD_ODR_ODR4 = 1; // Turn Port D, Pin 4 on.

PD_ODR_ODR4 = 0; // Turn Port D, Pin 4 off.

}

}

#error #gpio #stm8
5 REPLIES 5
Chayan Roy
Associate III
Posted on March 21, 2017 at 15:34

Which Compiler are you using??

GURUMOORTHI KANDASAMY
Associate II
Posted on March 21, 2017 at 16:53

Thanks for your reply roy...I am using IAR work bench IDE..

Chayan Roy
Associate III
Posted on March 21, 2017 at 17:24

Although  I use  STVD compiler and not used IAR yet,but to  me  this  problem seems like the compiler not getting your targeted mcu's  information,it may be  the issue with include directory.  Look for STM8S003F3 header  file and also STM8S103F in the include  directory. See if  these files are their(if you are not using ST library for your development). Look for  header file declaration in your code. And the last error you said,look if you   have defined the correct Target MCU  in  your project setting.

Posted on March 21, 2017 at 17:01

After uninstall and reinstall the IAR ide those two errors are gone ...Now I am getting the following error

Failed to set configuration with MCU name STM8S003F3: SWIM error [30006]: Comm init error: chip does not answer

Hussein Jabbari
Associate
Posted on March 27, 2017 at 15:59

if you use windows 7 or upper,run IAR as administrator.I think the IAR can't access to files