Porting Python to an embedded system

前端 未结 6 1935
渐次进展
渐次进展 2021-02-05 05:28

I am working with an ARM Cortex M3 on which I need to port Python (without operating system). What would be my best approach? I just need the core Python and basic I/O.

6条回答
  •  轮回少年
    2021-02-05 05:31

    fyi I just ported CPython 2.7x to non-POSIX OS. That was easy. You need write pyconfig.h in right way, remove most of unused modules. Disable unused features. Then fix compile, link errors. Then it just works after fixing some simple problems on run. If You have no some POSIX header, write one by yourself. Implement all POSIX functions, that needed, such as file i/o. Took 2-3 weeks in my case. Although I have heavily customized Python core. Unfortunately cannot opensource it :(.

    After that I think Python can be ported easily to any platform, that has enough RAM.

提交回复
热议问题