Open xfdr0805 opened 5 years ago
Me too, any fix please ? Is it really possible to compile cpp in stm8s ?
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
Me too,
Having the same here. Also tried spl platform without success, since blink LED example gave me 10KB of program size
Me too,
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).
I'm having the same problems in PIO Core 5.0.2 in Visual Studio Code
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.
@valeros please help
@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
win10 x64
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 =====================================================