tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Porting tcc to Xtensa and running it on the ESP32


From: Daniel Glöckner
Subject: Re: [Tinycc-devel] Porting tcc to Xtensa and running it on the ESP32
Date: Thu, 14 Feb 2019 18:35:46 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hello Lars,

On Thu, Feb 14, 2019 at 05:39:06PM +0100, Lars Hochstetter wrote:
> I (newbie) was wondering how difficult it would be to
> 
> 1. port tcc to the Tensilica Xtensa platform

one difficulty is that Xtensa processors are very configurable. When
someone synthesizes an Xtensa processor, the Tensilica tools generate
a bunch of C header files that tell you f.ex. which instructions are
enabled, which coprocessors exist and how many registers there are.
You might remember that it took some time for GCC to be ported to the
ESP8266. That was because it uses the uncommon call0 ABI variant as
Espressif did not enable register windows (XCHAL_HAVE_WINDOWS == 0).

But if you stick to the ESP32 and don't want to support all Xtensa
variants, this should not be a problem.

> Point 4 sounds pretty ambiguous - I don't know if I should use the
> FreeRTOS port for the ESP32 (tcc could run as a FreeRTOS task and
> receive input through e.g. the serial interface) or use an
> bare-metal approach.

I don't see where FreeRTOS would help you with tcc. Last time I
checked, FreeRTOS was only about task management and IPC. On the
other hand it takes just a few lines of code to put a bare metal
program that does not access peripherals into a FreeRTOS task.

RAM might become a problem. I have no idea how much RAM tcc needs.
You might want to do some experiments with valgrind --tool=massif
before trying to run it on the ESP32.

Best regards,

  Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]