How do I make a port of MicroPython for Casio calculators?
Posted: Mon Jul 30, 2018 8:45 pm
Hi everyone,
I'd like to make a port of MicroPython for Casio calculators. Like TI calculators, they have their own filesystem, and ways to program an editor in C.
I managed to compile MPy for SH3 (architecture of Casio calculators), using the minimal port. To make a successful port, I need to :
- Initialize Micropython (I obviously need to call the main() method in main.c, but do I call it once when the user launches my editor, or do I call it every time the user runs the program?)
- Send code to micropython (as I understand, it is done with the uart_code.c file, using the mp_hal_stdin_rx_chr() function; does this function execute periodically, do I need to do anything for this function to execute periodically?)
- Receive print() statements from python code (also done with the uart_code.c file, using mp_hal_stdout_tx_strn() function)
- Receive input() interrupts (no idea how to do this)
- Override import statement to use Casio-specific functions, as the filesystem is different (no idea either; I guess it is in the builtinimport.c file, but I can't find anything I need to modify)
Any idea of how to do these things? I'd appreciate help a lot as there is a lot of source code. Thanks in advance
I'd like to make a port of MicroPython for Casio calculators. Like TI calculators, they have their own filesystem, and ways to program an editor in C.
I managed to compile MPy for SH3 (architecture of Casio calculators), using the minimal port. To make a successful port, I need to :
- Initialize Micropython (I obviously need to call the main() method in main.c, but do I call it once when the user launches my editor, or do I call it every time the user runs the program?)
- Send code to micropython (as I understand, it is done with the uart_code.c file, using the mp_hal_stdin_rx_chr() function; does this function execute periodically, do I need to do anything for this function to execute periodically?)
- Receive print() statements from python code (also done with the uart_code.c file, using mp_hal_stdout_tx_strn() function)
- Receive input() interrupts (no idea how to do this)
- Override import statement to use Casio-specific functions, as the filesystem is different (no idea either; I guess it is in the builtinimport.c file, but I can't find anything I need to modify)
Any idea of how to do these things? I'd appreciate help a lot as there is a lot of source code. Thanks in advance