Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
piyushverma opened this issue Jun 1, 2020 · 5 comments
Open

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

piyushverma opened this issue Jun 1, 2020 · 5 comments

Comments

@piyushverma
Copy link

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:

  • framework-arduinoststm8 0.40.181216
  • tool-stm8binutils 0.230.0 (2.30)
  • toolchain-sdcc 1.30804.10766 (3.8.4)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 14 compatible libraries
    Scanning dependencies...
    No dependencies
    Building in release mode
    sdcc -o .pio/build/stm8sblue/firmware.elf -mstm8 --nostdlib --code-size 8192 --iram-size 1024 --out-fmt-elf .pio/build/stm8sblue/src/main.c.rel -L/home/piyush/.platformio/packages/toolchain-sdcc/share/sdcc/lib/stm8 -L/home/piyush/.platformio/packages/framework-arduinoststm8/STM8S_StdPeriph_Driver/lib .pio/build/stm8sblue/libFrameworkArduinoVariant.lib .pio/build/stm8sblue/libFrameworkArduino.lib -lstm8 -lSTM8S103
    ASlink-Warning-No definition of area SSEG
    *** [.pio/build/stm8sblue/firmware.elf] Error 1
    ============================ [FAILED] Took 0.72 seconds ============================

Any Suggestion ?

@valeros
Copy link
Member

valeros commented Jun 1, 2020

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

@piyushverma
Copy link
Author

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
Copy link

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
Copy link

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

@45gfg9
Copy link

45gfg9 commented Aug 28, 2020

This is weird, feels like something is broken

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants