We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
有 Python-on-a-Chip,但是请注意其“免责声明”:
因此,如果提问者对python的目标是避免处理8051的陌生性,这可能没有帮助。
特别是,8051是“哈佛”风格的体系结构,具有独立的RAM和ROM代码空间,并且内部RAM非常有限,而更大的外部RAM只能通过加载特殊的DPTR寄存器然后间接读取或写入来访问,再加上没有外部 RAM 堆栈支持,也没有对基于堆栈的变量的内在支持。因此,大多数“通用”高级语言需要大量定制和重新设计才能在 8051 上运行。
一个好的 8051 专用 C 编译器可以隐藏许多这些低级细节,但最终会消耗大量周期来运行在桌面 CPU 上甚至在大多数较新的嵌入式控制器架构上执行单指令操作,即使您可以忍受这种低效率水平,您仍然需要整理各种内存空间和其他细节。
因此,对于非常熟悉 8051 奇特架构的人来说,让 Python 在 8051 上运行可能是一个具有挑战性的项目。如果您的目标是将 python 转储到 8051 上以避免需要学习这些怪癖,我不确定这是否可能。 (但是,我想 C 编译器会变得越来越好......)
There is Python-on-a-Chip, but note its "disclaimer":
Thus, if the questioner's goal for python was to avoid dealing with the strangeness of the 8051, this may not help.
In particular, the 8051 is a "Harvard" style architecture, with separate RAM and ROM codespaces, and with very limited internal RAM, and larger external RAM that can be accessed only via loading the special DPTR register and then reading or writing indirectly, plus there's no external RAM stack support, nor intrinsic support for stack-based variables. Thus, most "general purpose" high-level languages need lots of customization and reworking to run on the 8051.
A good 8051-specific C-compiler can hide many of these low-level details, but you wind up burning lots of cycles to do things that are single instructions on desktop CPUs and even on most newer embedded controller architectures, and even if you can live with that level of in-efficiency, you still need to sort out the various memory spaces and other specifics.
So, getting Python to work on the 8051 is likely to be a challenging project for someone deeply familiar with its quirky architecture. If your goal is to dump a python onto the 8051 to avoid needing to learn these quirks, I'm not sure that is possible. (But, I suppose the C compilers keep getting better and better...)
Python-on-a-Chip 看起来和你一样接近我们将会得到。它可以运行一些比 8051 稍微强大一点的东西。
Python-on-a-Chip looks about as close as you're going to get. It can run on some things that are just a bit beefier than the 8051.