![]() On the other hand, a bare-metal port, seems to be easier to do, leaves us more memory to work with, and we can use usb storage as well as usb serial, while the DMCP API does not seem to provide the latter (=> no REPL ). And you can switch back and forth without any additional hardware, which is nice. Using the DMCP OS makes it easier for less experienced people to try out MicroPython, because it's easier to just switch programs than to fully reflash the calculator with dfu-util. I haven't completely made up my mind about that yet though.īoth approaches have their pros and cons: Okay, I'll try to make this work for a bit longer, but come to think of it, a bare-metal port might be a viable plan b, or maybe even the better choice in the first place. I'll investigate further hints are always welcome. Not sure yet what's up with mman.h though.Īlso, I had to reduce the heap size to ~6k, otherwise I would get "section `.bss' will not fit in region `RAM'" errors. I think I'll have to implement my own dirent.h that acts as an interface to the DMCP API. I think the dirent.h problem comes from the fact that the arm toolchain is intended for bare metal use, so there wouldn't be any fiesystem support. ![]() Make: Leaving directory '/home/fnord/data/Develop/DMPY/DMCP_SDK' Make: *** Deleting file 'build/genhdr/qstr.i.last' home/fnord/data/Develop/DMPY/micropython/ports/unix/alloc.c:31:10: fatal error: sys/mman.h: No such file or directory usr/arm-none-eabi/include/sys/dirent.h:10:2: error: #error " not supported" the embedding example, I'm aware there was some discussion about it recently on github (see and ) (edit: this looks like it's related to my recent change so I will take a look ASAP).Ĭode: Select all In file included from /usr/arm-none-eabi/include/dirent.h:39,įrom /home/fnord/data/Develop/DMPY/micropython/ports/unix/modos.c:34: To some extent the Unix port is the same thing but has so much other complexity going on that it isn't really a good base. Basically you can initialize the VM, give it some heap and stack memory, and then start providing implementations of the various OS-level functionality (like file IO, stdio, etc). Probably the best way to get started is to look at the "embedding" example, which covers how to add MicroPython to an existing program (which is kind of what you're doing here). I seem to remember that the calculator itself is based on a STM32L4 so a bare-metal port would be fairly straightforward, but yeah not terribly useful. I've had my eye on one of these for a while but just can't justify the $$$ so I just use Free42 on my phone. So, if anyone could help me setting up a way to bulid MicroPython as a program for the DMCP OS, or just point me in the right direction, that would be greatly appreciated. py files from the DMCP filesystem, and a module to access the display and keyboard through the DMCP API. PGM file for the calculator that contains the MicroPython interpreter which can then load. PGM files for the calculator, and I have also successfully built the unix and pyboard ports of MicroPython, but I'm at a loss at how to put the two systems together. Using the DMCP platform (instead of targeting the hardware directly) would have the benefit of being able to switch easily between the Free42 emulator and MicroPython, without having to reflash the device. I'm working on a Python based RPN Calculator design (currently using PyQt, but the UI layer will be interchangable), and I would love to bring it to the DM42 hardware using MicroPython. The emulator is one of potentially multiple programs on the device's FAT filesystem. On top of that runs a modified version of Thomas Okken's Free42 emulator. It uses a basic operating system called DMCP whis is documented here. It's not made (but apparently toleraded) by HP. ![]() I would like to port MicroPython to the DMCP platform, and I need a little help getting started.Ī bit of background: The SwissMicros DM42 Calculator is an improved version of HPs classic HP42s scientific RPN pocket calculator.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |