![]() |
#1 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6
Karma: 100000
Join Date: Jul 2025
Device: none
|
[Release] TinyC - TCC for armhf hard float
Okay, sorted through all the issues. Attached is a release of the TCC program that runs on Kindles with hard float. This was built from the open source TCC mob branch and assembled with other contents and sometimes with changes as described below.
INSTALLATION Prerequisites: A jailbroken Kindle. Said Kindle on a higher SW version that uses hardfloat. A way to transfer this package to the Kindle. A way to have a terminal on the kindle. Spoiler:
Same installation routine as geekmaster's package, so copying verbatim but only changing the package name. 1) download and extract kindlehf-tcc-1.0-0928.tar.gz (below) to /mnt/us (USB drive) 2) install: "/mnt/us/tcc/install" 3) compile: "tccmake demo" 4) run: "./demo" 5) Watch the kindle draw square and round tubes on its eink screen. FILE CONTENTS The file contains the following, structured as name followed by description: 1) tcc - The program which was newly built for arm hard float using kox toolkit from tcc mob branch sources with changes From geekmaster's package, some with changes 2) tccmake - a convenience makefile 3) install - script to install it so you can just run tcc or tccmake from anywhere 4) uninstall - script to undo the installation of tcc and tccmake 5) tcc.libc.so - C Library helper to address full path to libc 6) tcc.libpthread.so - C Library helper to address full path to libc 7) demo - executable demo program of dithermatron (screenshot from colorsoft attached) 8) demo.c - the source of the program, so your installation can be quickly tested by compiling it 9) lib directory and contents - C runtime initialization objects. 10) include (stdarg.h and stddef.h, i think) - the root include of kox lacked these, so i grabbed from here From kox toolkit: 11) include directory (except the two files above) - So tcc has heads to reference for compilations History, Changes, and Tech Notes Spoiler:
FINAL NOTES TCC is a single pass compiler, so you can get much faster code with GCC. However, it is small and is fairly easy to build, so it's good to put on a jailbroken kindle and execute directly on it. It has some support for debugging, since kindle has gdb. Just put -g option into your makefile. Sometimes things get a little weird in gdb though. Not implemented: If you come across the tcc -run option or programmatically embedding C into your program to on the fly compile and executing it, well that's unfortunately not going to work on this. Maybe later. I did not compile libtcc1.a. Even if libtcc1.a is compiled and put somewhere, I probably broke the loader for it to ensure I could get this functional, so it will likely need a new tcc executable along with the libtcc1.a. Maybe will do this change by making tcc on kindlehf compile for kindlehf and remove the kox toolkit from the equation. |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6
Karma: 100000
Join Date: Jul 2025
Device: none
|
Fixed two things. Is it possible to edit the original post and attachment?
The fixes were: 1. The crt i used was not compatible, it messed up argc and argv in main. Therefore, i debugged the registers and memory at the start of execution to find argc and argv then modified the assembly, compiled it, put on the kindle and it worked well. More description down bottom. 2. Since above, it unlocked the ability to compile tcc with tcc directly on the kindle. Used that ability to troubleshoot why tcc -run - was not working and it was due to a missing object. Built that object, placed on kindle, and verified tcc can on the fly build and execute now. I'll upload a new package after learning if editing is possible, outgrow I'll put in a new reply in this thread. before fix 1, int main(int arg, char * argv[]) was impossible to use argc and argv since they were sourced from the wrong location in the crt that's used in the package. This made a tcc built on kindle unworkable since all the options and code needs to come in through argv |
![]() |
![]() |
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,798
Karma: 103362673
Join Date: Apr 2011
Device: pb360
|
It is possible for members to edit their own posts and manage attachments.
Over the years many anti-spam measures have had to be put into place, especially for new members. If you are being affected by this and don't want to wait for time and total posts to increase, you can open a thread in the Feedback forum. After the moderators review your posting history they might grant your request. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TinyC TCC for armhf hard float | smbgaiden | Kindle Developer's Corner | 2 | 07-28-2025 12:38 AM |
Screensavers hack for armhf firmwares | qqqqqqqqqqqz | Kindle Developer's Corner | 0 | 05-20-2025 05:25 AM |
ARMhf on the Kindle(s) | knc1 | Kindle Developer's Corner | 83 | 07-16-2017 09:34 AM |
The operator >> is undefined for the argument type(s) float, float | twobob | Kindle Developer's Corner | 10 | 09-05-2012 12:50 PM |
tcc on iriver Story HD | jmseight | iRiver Story | 2 | 05-02-2012 02:23 AM |