Hello dear developers and maintainers of TCC,

I've started to be interested into trying to port the TCC compiler on a 
graphical calculator, the ones manufactured by NumWorks (a French startup).

NumWorks calculators use ARM micro-controllers (specifically, STM32 
micro-controllers).
As stated by the manufacturer: This chip combines an ARMv7-M Cortex-M7 core, 
clocked at 216 MHz and 256K of Static RAM.
(see 
https://www.numworks.com/engineering/hardware/electrical/parts/#stm32f730v8t6 
if needed)

I'm trying to understand on my own how I need to use TCC's `configure` and 
`make` commands, in order to produce a few files like libtcc.c/libtcc.h.
I would like to embed the awesome TCC's "load, compile & run" features, in a C 
application for this NumWorks calculator.

I have an app that reads a file locally edited on the calculator, and runs it 
on a Lua interpreter (or JavaScript), and the calculator ships with MicroPython 
already working well.
My goal is to offer the same kind of features but for a C program, which could 
be edited on the calculator, read and ran by the "TCC interpreter" application.

# Here are a few questions:


1. how to use libtcc on an embedded ARM 32bits micro-controller?

If I follow the ideas of the libtcc_test.c file 
(https://github.com/Tiny-C-Compiler/tinycc-mirror-repository/blob/mob/tests/libtcc_test.c),
 will it work directly if I cross-compile the resulting C program to my ARMv7-M 
CPU
architecture for my NumWorks calculator?

I see in the libtcc.c file that there is an option TCC_TARGET_ARM, so I should 
enable it, include libtcc.h and "that's it" ?
(https://github.com/Tiny-C-Compiler/tinycc-mirror-repository/blob/b6a16e3be4aff2d6b6e4870a1fde5e83707e9be4/libtcc.c#L36C22-L36C22)


2. Is there any documentation I can follow, by any chance? Regarding any of 
these questions.


3. Does anybody already tried such a thing, for instance for Texas Instrument 
or Casio calculators?

I saw that someone did port the GTC C compiler about 13 years ago, for Texas 
Instrument calculators, but I don't find any other mentions.
(here https://tiplanet.org/forum/archives_voir.php?id=1000)


Kind regards, and thanks in advance;
-- 
Lilian Besson,
  Professor of Computer Science at Lycée Kléber, in Strasbourg (France)
  web : https://Besson.link/ ; phone : +33628412257
  email. : lil...@besson.link or lilian.bes...@crans.org


_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to