|
From: | KHMan |
Subject: | Re: [Tinycc-devel] Resources/questions for porting? |
Date: | Tue, 26 Sep 2017 12:20:28 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 9/26/2017 11:36 AM, Daniel Glöckner wrote:
Forgive me the brevity of my reply, but I should be asleep right now. On Mon, Sep 25, 2017 at 09:16:12PM -0400, Charles Lohr wrote:To do this, I need to port TCC to xtensa specifically lx6 with no floating point.It won't be easy to support floating point without floating point registers. TinyCC is not prepared to keep floating point values in integer registers. And you will need a soft float library like libgcc that probably can't be built with TinyCC unless you also implement an assembler.
Not a problem, the aforementioned ESP8266 is a hobbyist IoT favourite. Standard toolchain is gcc and newlib.
For a C app in firmware, most things can be done without floating point. Most old skool embedded coders will be doing fixed-point calculations. However, there are a few scripting platforms for ESP8266 (and more coming up), and platforms want to offer the most convenient scripting environment for possibly first-time coders who just want to get down to writing their app. So floats can be desirable or critical, depending on your target app demographic.
For NodeMCU on ESP8266, they should switch to Lua 5.3 and so avoid floats by using integers as much as possible while possibly retaining convenient float capability with a library such as Berkeley SoftFloat. For MicroPython, last I checked they didn't seem to be in a hurry to implement floats.
One advantage of tcc on ESP8266 would be that even the current tcc code quality will be much faster than Python or Lua scripts running on a VM.
References for convenience: https://en.wikipedia.org/wiki/ESP8266 https://github.com/esp8266/esp8266-wiki/wiki/Toolchain https://github.com/pfalcon/esp-open-sdk https://docs.micropython.org/en/latest/esp8266/esp8266/general.html https://en.wikipedia.org/wiki/MicroPython https://en.wikipedia.org/wiki/NodeMCU https://github.com/nodemcu/nodemcu-firmware -- Cheers, Kein-Hong Man (esq.) Selangor, Malaysia
[Prev in Thread] | Current Thread | [Next in Thread] |