platformio / platform-intel_mcs51

Intel MCS-51 (8051): development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/intel_mcs51
Apache License 2.0
56 stars 44 forks source link

Python was not found but can be installed from the Micros #34

Closed aadog closed 3 years ago

aadog commented 3 years ago

What kind of issue is this?

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system: Win10 x64,python3.9(x64)

PlatformIO Version (platformio --version):PlatformIO, version 5.0.2b2

Description of problem

Steps to Reproduce

1.platformio.exe -c clion run --target upload -e stc89c52rc 2. 3.

Actual Results

Processing stc89c52rc (platform: intel_mcs51; board: stc89c52rc)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/intel_mcs51/stc89c52rc.html PLATFORM: Intel MCS-51 (8051) (1.2.2) > Generic STC89C52RC HARDWARE: STC89C52RC 11MHz, 512B RAM, 8KB Flash PACKAGES:

Expected Results

He can't recognize python well, my machine is installed python3.9 and has done env

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:stc89c52rc]
platform = intel_mcs51
board = stc89c52rc

Source file to reproduce issue:

#include <8051.h>
int main() {
// write your code here
}

Additional info

chenwangnec commented 3 years ago

Problem solving method

Modify C:\Users\user name.platformio\platforms\intel_mcs51\builder main.py

Line 156

UPLOADCMD="python3 %s $UPLOADERFLAGS $SOURCE"% stcgal)

change into

UPLOADCMD="python %s $UPLOADERFLAGS $SOURCE"% stcgal) Compile upload burn copy Mine is solved like this

翻译中文

问题解决方法

修改C:\Users\用户名.platformio\platforms\intel_mcs51\builder main.py

156行

UPLOADCMD="python3 %s $UPLOADERFLAGS $SOURCE" % stcgal )

修改为

UPLOADCMD="python %s $UPLOADERFLAGS $SOURCE" % stcgal ) 编译上传烧拷 我的就是这样解决的 我的环境也是winows 10 vscode+PlatformIO 8051-stc89c52rc 已经正常编译和烧拷固件

aadog commented 3 years ago

Thank you for your repair, now it is normal, so what should I do if I can’t find the c51 extension keyword and header file of stcc in clion