platformio / platform-ststm8

ST STM8: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/ststm8
Apache License 2.0
40 stars 26 forks source link

New Project Buid Failed even after main.ccp -> main.c #21

Open piyushverma opened 4 years ago

piyushverma commented 4 years ago

Hello,

I have renamed main.cpp to main.c it let move compilation move forware but at end it faile without any clear error message. Here is log as below

platformio run -v Processing stm8sblue (platform: ststm8; board: stm8sblue; framework: arduino)

CONFIGURATION: https://docs.platformio.org/page/boards/ststm8/stm8sblue.html PLATFORM: ST STM8 1.0.2 > ST STM8S103F3 Breakout Board HARDWARE: STM8S103F3P6 16MHz, 1KB RAM, 8KB Flash PACKAGES:

Any Suggestion ?

valeros commented 4 years ago

Hi @piyushverma ! Are you able to compile your project using the same board in the Arduino IDE?

piyushverma commented 4 years ago

yes I follow instruction from https://github.com/tenbaht/sduino I can compile blink project. With more testing I notice, just by adding delay(1000); in loop function it build successfully. hope this information can help others.

Any idea how delay is effecting build success/fail ?

mtbspace commented 4 years ago

I've found the same here. A new project will not build. I can build if after completing the following steps:

  1. Rename main.cpp to main.c
  2. Add delay(1000); to loop function as suggested by piyushverma
mtbspace commented 4 years ago

Can anyone comment if we're doing something wrong, or does PlatformIO not work out the box with STM8 on some operating systems?

45gfg9 commented 3 years ago

This is weird, feels like something is broken

And, did anyone encounter problems with IntelliSense on header dependency (stdlib.h not found) problem?