Howto use BaCon in Android
May 28, 2014 20:45:43 GMT 1
Post by Pjot on May 28, 2014 20:45:43 GMT 1
All,
Updated instructions to get BaCon working on Android.
Note that your device does not need to be jailbreaked or 'rooted' for BaCon to work!
I noticed that in some Android versions the archiver has a different name. Therefore it should be made configurable from the BaCon commandline. The below instructions can be used with TerminalIDE but similar environments work in a similar way.
(1) Download and install TerminalIDE from Playstore
(2) Start it, install the default 'system'. Then open a shell, run the script 'install_gcc' to install the C compiler environment.
(3) Download the latest BaCon beta, gunzip and untar.
(4) Compile BaCon as follows:
This should give you the 'libbacon.a' archive, and a 'bacon' binary.
(5) Copy the 'libbacon.a' archive to ~/android-gcc-4.4.0/sysroot/usr/lib
(6) Copy the 'bacon' binary to ~/system/bin
Now you're set to compile, for BaCon programs you have to use the following options:
For example, after installing BaCon you could start as follows:
This downloads and compiles 'fetch'. When executed, it will download a bunch of programs from the BaCon website.
Note that it is also possible to store the BaCon command lines options permanently in a configuration file. For this, supply option '-w' one time to the commandline:
From now on, subsequent compilations will apply those options automatically - so from now on, simply run 'bacon <yourprogram.bac>' as usual.
BR
Peter
Updated instructions to get BaCon working on Android.
Note that your device does not need to be jailbreaked or 'rooted' for BaCon to work!
I noticed that in some Android versions the archiver has a different name. Therefore it should be made configurable from the BaCon commandline. The below instructions can be used with TerminalIDE but similar environments work in a similar way.
(1) Download and install TerminalIDE from Playstore
(2) Start it, install the default 'system'. Then open a shell, run the script 'install_gcc' to install the C compiler environment.
(3) Download the latest BaCon beta, gunzip and untar.
(4) Compile BaCon as follows:
# bash ./bacon.sh -a -b "arm-eabi-ar -r" -c terminal-gcc bacon
This should give you the 'libbacon.a' archive, and a 'bacon' binary.
(5) Copy the 'libbacon.a' archive to ~/android-gcc-4.4.0/sysroot/usr/lib
(6) Copy the 'bacon' binary to ~/system/bin
Now you're set to compile, for BaCon programs you have to use the following options:
# bacon -c terminal-gcc -o -fPIC <yourprogram.bac>
For example, after installing BaCon you could start as follows:
# bacon -c terminal-gcc -o -fPIC http: //www.basic-converter.org/fetch.bac
This downloads and compiles 'fetch'. When executed, it will download a bunch of programs from the BaCon website.
Note that it is also possible to store the BaCon command lines options permanently in a configuration file. For this, supply option '-w' one time to the commandline:
# bacon -c terminal-gcc -o -fPIC -w <yourprogram.bac>
From now on, subsequent compilations will apply those options automatically - so from now on, simply run 'bacon <yourprogram.bac>' as usual.
BR
Peter