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

*** [.pioenvs\stm8sblue\libFrameworkArduinoVariant.lib] Error 309 #12

Open
xfdr0805 opened this issue Jun 10, 2019 · 10 comments
Open

*** [.pioenvs\stm8sblue\libFrameworkArduinoVariant.lib] Error 309 #12

xfdr0805 opened this issue Jun 10, 2019 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@xfdr0805
Copy link

win10 x64

Executing task: C:\Users\xfdr0.platformio\penv\Scripts\platformio.exe run <

Processing stm8sblue (platform: ststm8; board: stm8sblue; framework: arduino)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm8/stm8sblue.html
PLATFORM: ST STM8 > ST STM8S103F3 Breakout Board
HARDWARE: STM8S103F3P6 16MHz 1KB RAM (8KB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 15 compatible libraries
Scanning dependencies...
No dependencies
Compiling .pioenvs\stm8sblue\src\main.c.rel
Archiving .pioenvs\stm8sblue\libFrameworkArduinoVariant.lib
Compiling .pioenvs\stm8sblue\FrameworkArduino\HardwareSerial.c.rel
Compiling .pioenvs\stm8sblue\FrameworkArduino\Print-float.c.rel
Compiling .pioenvs\stm8sblue\FrameworkArduino\Print.c.rel
Compiling .pioenvs\stm8sblue\FrameworkArduino\SPI.c.rel
Compiling .pioenvs\stm8sblue\FrameworkArduino\WInterrupts.c.rel
*** [.pioenvs\stm8sblue\libFrameworkArduinoVariant.lib] Error 309
Compiling .pioenvs\stm8sblue\FrameworkArduino\WMath.c.rel
C:\users\xfdr0.platformio\packages\framework-arduinoststm8\cores\sduino\WInterrupts.c:73: warning 85: in function attachInterrupt unreferenced function argument : 'mode'
C:\users\xfdr0.platformio\packages\framework-arduinoststm8\cores\sduino\HardwareSerial.c:38:2: warning: #warning "using uart1 for HardwareSerial"
===================================================== [ERROR] Took 3.38 seconds =====================================================

@hicham-barhoumi
Copy link

Me too, any fix please ? Is it really possible to compile cpp in stm8s ?

@xfdr0805
Copy link
Author

xfdr0805 commented Jul 2, 2019

possible

main.cpp --->main.c
in another pc can build success,but in my pc can not still build success,I have no idea too

@Anangdp
Copy link

Anangdp commented Sep 24, 2019

Me too,

@odudex
Copy link

odudex commented Sep 24, 2019

Having the same here.
Also tried spl platform without success, since blink LED example gave me 10KB of program size

@lulersoft
Copy link

Me too,

@cednik
Copy link

cednik commented May 14, 2020

Me too - trying to build new empty project on Windows using PIO Core 4.3.3 in VSCode.
Renaming main.cpp ->main.c doesn't help.
And also compiler treat warnings as fatal error and stops compilation on the first warning ("using uart1 for HardwareSerial" from HardwareSerial.c in my case).

@Santi-hr
Copy link

Santi-hr commented Nov 8, 2020

I'm having the same problems in PIO Core 5.0.2 in Visual Studio Code

@Vampir8
Copy link

Vampir8 commented Nov 10, 2020

Me too.

PlatformIO Core             5.0.2
Python                      3.7.7-final.0
System Type                 windows_amd64
Platform                    Windows-10
File System Encoding        utf-8
Locale Encoding             cp1250
PlatformIO Core Directory   C:\Users\admin\.platformio
PlatformIO Core Executable  C:\Users\admin\.platformio\penv\Scripts\platformio.exe
Python Executable           c:\users\admin\.platformio\penv\scripts\python.exe
Global Libraries            54
Development Platforms       5
Tools & Toolchains          31

Renaming main.cpp ->main.c doesn't help.

> Executing task in folder test_stm8: C:\Users\admin\.platformio\penv\Scripts\platformio.exe run <

Processing stm8sdisco (platform: ststm8; board: stm8sblack; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm8/stm8sblack.html
PLATFORM: ST STM8 (1.0.2) > ST STM8S105K4T6 Breakout Board
HARDWARE: STM8S105K4T6 16MHz, 2KB RAM, 16KB 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 66 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Archiving .pio\build\stm8sdisco\libFrameworkArduinoVariant.lib
Compiling .pio\build\stm8sdisco\FrameworkArduino\wiring_shift.c.rel
*** [.pio\build\stm8sdisco\libFrameworkArduinoVariant.lib] Error 309
============================================================================================= [FAILED] Took 1.27 seconds =============================================================================================
The terminal process "C:\Users\admin\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

@maxgerhardt
Copy link
Contributor

@valeros please help

@HelloDB
Copy link

HelloDB commented Jan 17, 2021

@valeros请帮助

@maxgerhardt

Use sdcc-4.0.0 to overwrite .platformio\packages\toolchain-sdcc, you can download sdcc-4.0.0 here->https://sourceforge.net/projects/sdcc/files/
Also need to modify main.cpp->main.c, and add in the program: void main(void); void (*dummy_variable) () = main;
main.c

#include <Arduino.h>

/* compilation fix. reference main function. */
void main(void);
void (*dummy_variable) () = main;

/* actual code.. */
void setup(){}
void loop(){}

platformio.ini

[env:stm8sblue]
platform = ststm8
board = stm8sblue
framework = arduino

I verified this method on windows10

https://community.platformio.org/t/error-309-arduino-fade-all-pins-for-the-platform-st-stm8/13690/21

@valeros valeros added the help wanted Extra attention is needed label Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests