I have "my" PicoC C-code-interpreter running on Portenta H7
(it uses and needs the SDRAM for C-code scripts, all 8MB used for C-code, as text, huge space for "C-code scripts").
What is PicoC?
It is a C-code-interpreter (not a compiler, it does not need any other tools).
It runs natively on target (here Portenta H7).
It interprets input on UART (USB-C with UART terminal), from SD Card as C-code statements (text lines and files, decoded and interpreted as C-code).
It executes the C-code statements:
no need to compile, interactive (see immediately if statement is wrong and why), not so fast
on execution (it is interpreted), but very fast on code writing and turnaround to modify C-code.
(not any compiler or external tool needed).
Very convenient to write new scripts like C-programs and let them run.
It is like writing C-code programs (including to load "scripts" from SD Card, use "#include ..." with files on SD Card etc.).
Enter C-code on command line, without a need to compile, no need to have a compiler involved, nothing to install: all comes with the MCU board and UART terminal.
It is "interpreted" (text parsing and execution if correct), not compiled.
Benefit: you can add your own C-functions as new "commands", all available as full source code, it runs on small MCUs (and could be ported to WIN32 as well - I have it also running in a Nokia Qt GUI App for Windows, MacOS).
Who does want to use?
Who wants to use "PicoC" on Portenta H7?
It is almost ready: I had to fix some issues with using gets(), reading files from SD Card (e.g. RunScript(executeScript), #include files).
And clean up the code plus more comments for integration on other targets.
Afterwards, I will release a project and BIN file to flash on Portenta H7.
Here a screenshot (UART) how it looks like to use PicoC:
BTW:
I know, there is also MicroPython. But:
it seems to come with a full binary installation. And I do not have any clue how to add my own functions to it. For instance: I need SPI commands, I2C read and write, user GPIO pins (set and read) etc. No idea how to extend a MicroPython system with my own code and stuff, at least
how to implement new user functions.
PicoC is full source code. It uses available BSP (system), e.g. for UART line in, print line on UART, SD Card.
And very easy to add a new function definition, e.g. doing a SPI transaction, available as a new
function which can be called on command line, in "C-code" scripts.
The good news (for me): the code is small enough to fit with all my BSP functions into Portenta H7 flash memory. Potentially, I can also enable the math functions (e.g. coming via math.h).
It behaves like a real C-code compiler, just: it executes immediately after entering a correct statement (interpreted immediately). No need to wait for compile, to flash code etc.
Just place it on SD card or transfer via UART (or network). And ready to execute C-code-programs/applications.