Has anyone used the gcc compiler and the Eclipse IDE platform to work with the Z-Stack? I do not see 8051 as one of the supported instruction sets for cross-compilation.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
gcc can't compile for 8051, but sdcc can. I'm using sdcc + Eclipse, but i've never used Z-Stack yet (there was no need)
There is a project called MSPGCC that currently has the best (that I am aware of)
open source compiler for the MSP430s, although I think it may not yet support the
CPUx variants fully, or some of the more flexible memory mapping modes.
For the CC2530 the SDCC and similar free 8051 compiler sets are the best
open source options that I am aware of.
Very disappointingly, however, neither of those open source compilers will help you
run Z-stack applications on either the CC2530 or the MSP430 MCUs; the
compilers could eventually be made to compile your application code and the
headers of the Z-stack files, but the Z-stack code is not made fully available in
source code form -- the core parts of it are binary libraries in a non-portable
format that is specific to certain versions of the IAR 8051 C compiler / librarian / linker.
So you couldn't actually link the Z-stack libraries into any project developed with
any compiler other than the supported versions of the IAR tool chain. That
rules out using Z-stack with all open source compilers as well as any alternative
commercial compilers like KEIL, Raisonance, et.al. I'm not aware of anyone
who has successfully even experimentally gotten Z-stack to work with any other
compiler tool chain, although a few people have inquired about and indicated an
interest in the possibility.
It seems like it wouldn't have been that much more work to make some kind of
portable open source wrapper code around Z-stack's API which would implement
the needed (compiler portable) calling conventions into a portable HEX format object module which contained the closed source Z-stack code so that you'd be able to just
use the precompiled hex object module loaded at some specified address plus the
port of the open source calling wrapper code to interface to it and thus have any
compiler/tool chain easily able to make use of Z-stack.
That or just make the source code available free but under the existing usage
license to permit better portability among customer's tool sets.
It is a bit odd that in 2009 some 20 years after the 8051 appeared that there isn't
supported portability of basic platform libraries across a diverse choice of compilers
as has long been the case for most other CPU/MCU devices like 68k, ARM, x86, et. al.
Yes, when I found the TI CC2430 I was surprised to see that it's based on the 8051 core. I was writing assembly language for that processor 25 years ago when I worked for NASA. Surprising that this core has had such a long life, though how much innovation can be had in an 8-bit processor instruction set once you've got the basics down. The big gain in this and its competitors has been in the integration of functions on one chip. No more clock chips, parallel IO, counter-timer, serial IO, etc chips.
I'm glad you pointed out the libraries that are incompatible with linkers. Would have missed those. Thanks