Updated :
Starting some documentation : http://www.midibox.org/dokuwiki/howto:dev:autotools-skeleton
New release: 1.9f-r1
Merry Christmas!
Cheers, Didier.
To Do :
- Cut libcmios in one object file per function
Changelog :
1.9f-r1 (2007-12-21)
- Made mios-pic16-toolchain, libcmios and the skeleton itself to follow the same version scheme (MIOS version - release number)
-
mios-pic16-toolchain
- Fixed installation of tool symbolic links
- Fixed management of installation prefix
[*]libcmios: Removed now unused mios_tables.inc
1.9f
[*]Initial release
Hi all,
Time maybe has come for me to publish a bit of my homework during the past months.
In my quest to simplify the C skeleton, i wanted to achieved the following goals:
-
Not having identical files in different applications
-
Having a makefile system that is easily extensible (don’t want to have to make rules for simple things and want to make simple rules for complex things), enables directory hierarchies, that encompass by default all my wanted targets (all, clean, install, dist, dist-check…)
-
Goal 1) required the mios wrapper itself to be put elsewhere than in the skeleton. Why not having a libcmios library ? Hopefully gplib can make shared libraries and gplink can grap object files from them and link them statically inside the application. Cool!
-
The mios-specific linker scripts also had to be put in a shared location. I decided to follow the usual rules of sharing for cross-compilation… having a directory that is specific for a host platform that contains headers and libraries. (${prefix}/host/)
-
The mios-specific asm fix script was a problem. But thinking about Goal 2) makes my try the autotools and I quickly understood how they were fullfiling Goal 2) completely. So I decided to make a wrapper script around sdcc, gpasm, gplib and gplink, that would take care of transparently fixing the asm, and that would use the GCC command line style:
C compiler to compile for target processor-vendor-os is processor-vendor-os-gcc
Asm compiler to compile for target processor-vendor-os is processor-vendor-os-as
Librarian tool to make libraries for target processor-vendor-os is processor-vendor-os-ar
Linker for target processor-vendor-os is processor-vendor-os-ld
So here is the result. You can find an attachement in this post that contains
libcmios-1.9f.tar.gz
mios-pic16-toolchain-0.1.tar.gz
mios-c-skeleton/
Possible targets/hosts are:
pic18f452-microchip-mios, pic18f4520-microchip-mios, pic18f4620-microchip-mios, pic18f4685-microchip-mios
Note that pic18f452-mios, pic18f4520-mios, pic18f4620-mios and pic18f4685-mios are automatically expanded.
I will document this better in the Wiki in some days.
Install the toolchain wrapper, libcmios and its linker scripts…:
$ cd mios-pic16-toolchain
$ ./configure --target=pic18f4685-mios --prefix=/usr
$ sudo make install
$ cd ../libcmios
$ ./configure --host=pic18f4685-mios
$ sudo make install
As for the skeleton itself… Modify the configure.in, Makefile.am, src/Makefile.am and main.c… and then configure and make the application :
$ autoreconf --install
$ ./configure --host=pic18f4685-mios
$ make
[mios-autotools-skeleton-1.9f-r1.zip](< base_url >/applications/core/interface/file/attachment.php?id=539)
[mios-autotools-skeleton-1.9f-r1.zip](< base_url >/applications/core/interface/file/attachment.php?id=3681)