ywaby / keil2sdcc Goto Github PK
View Code? Open in Web Editor NEWconvert c51 program to sdcc
License: MIT License
convert c51 program to sdcc
License: MIT License
also would you consider a pull request to put the f""
syntax into a "".format()
syntax , so that your program is compatible with python3.5 ? (which most of us are stuck with on our distro :) )
thanks again for your repository
#ifndef __STC15F2K60S2_H_
#define __STC15F2K60S2_H_
/////////////////////////////////////////////////
//注意: STC15W4K32S4系列的芯片,上电后所有与PWM相关的IO口均为
// 高阻态,需将这些口设置为准双向口或强推挽模式方可正常使用
//相关IO: P0.6/P0.7/P1.6/P1.7/P2.1/P2.2
// P2.3/P2.7/P3.7/P4.2/P4.4/P4.5
/////////////////////////////////////////////////
...
Traceback (most recent call last):
File "C:\Users\WHC\Desktop\keil2sdcc\keil2sdcc\__main__ - 副本.py", line 2, in <module>
C51_2_SDCC(r"D:\PlatformIO_Projects\Test8051\include\STC15F.h", r"./out.h")
File "C:\Users\WHC\Desktop\keil2sdcc\keil2sdcc\c512sdcc.py", line 39, in __init__
self.convert_file()
File "C:\Users\WHC\Desktop\keil2sdcc\keil2sdcc\c512sdcc.py", line 46, in convert_file
sdcc_lines += self.__convert_line(line)
File "C:\Users\WHC\Desktop\keil2sdcc\keil2sdcc\c512sdcc.py", line 110, in __convert_line
indent, statements_words, statements_line_end, comments = self.__parse_line(
File "C:\Users\WHC\Desktop\keil2sdcc\keil2sdcc\c512sdcc.py", line 87, in __parse_line
statements_line, comments = c_line.split("//")
ValueError: too many values to unpack (expected 2)
Quick and dirty solution: change here
keil2sdcc/keil2sdcc/c512sdcc.py
Line 87 in 6cf8b91
to
statements_line, comments = c_line[:c_line.find("//")], c_line[c_line.find("//") + 2:]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.