2017-03-21 05:28 AM
&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 #stm82017-03-21 07:34 AM
Which Compiler are you using??
2017-03-21 08:53 AM
Thanks for your reply roy...I am using IAR work bench IDE..
2017-03-21 09:24 AM
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.
2017-03-21 10:01 AM
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
2017-03-27 06:59 AM
if you use windows 7 or upper,run IAR as administrator.I think the IAR can't access to files