1

TL; DR: how hard it is to port Python to new OS?

I want to use python to write applications for Verifone's VX 680. They are 32-bit ARM based devices with 128+MB of RAM. http://www.verifone.com/media/4300697/vx680_ds_ltr.pdf

My idea is to write a C application which calls Python interpreter. My application will be a bunch of python modules. The app needs to show graph rich UI, send HTTPS messages, access peripherals (e.g. WiFi radio, PinPad, thermal printer). Despite of my investigation, I'm completely lost still.

What is the list of things I need to address in order to be able to write python applications in this device?

Igor Gatis
  • 4,648
  • 10
  • 43
  • 66
  • Running the Python interpreter on ARM is routinely done (my very phone has Python installed), the problem may be with the integration with the underlying operating system (last time I compiled CPython in "bizarre" configurations most problems were on the platform-specific dynamic modules loading). But I wouldn't go with Python on a 400 MHz machine with 64 MB of actual RAM (the flier says 192, but 128 MBs are flash) - think Raspberry PI 1 but twice as slow and with 1/4 of the RAM. – Matteo Italia Mar 29 '15 at 22:02
  • My alternative approach is to embed webkit and write my APP in HTML + JavaScript. Is that worse then python? – Igor Gatis Mar 29 '15 at 23:10

1 Answers1

1

I have personally ported CPython for my own operating system; the real problem was the lack of cross-compiling support really - I found patches for 2.5.1 to make it cross-compile cleanly.

After it was compiling cleanly, I just needed to provide quite a minimal set of system calls to work. For anything serious at least a read-only filesystem is a must. In any case, if your libc is POSIXish, you shouldn't have too many problems to get started.

The set of system calls I had in the beginning was exit, open, close, read (for console and files), write (to file descriptors 1 and 2 only), stat, fstat and sbrk (for changing the heap size). I used the newlibc C library with libgloss - everything that wasn't mapped to these, returned just the error values or defaults.