[mc1322x] MC1322x, Contiki and Darjeeling
Mariano Alvira
mar at devl.org
Thu Jun 17 13:03:05 EDT 2010
On Thu, Jun 17, 2010 at 06:46:58PM +0200, Daniel Berenguer wrote:
> I've been intensively exchanging e-mails with Niels Brouwers, the
> creator of Darjeeling, a very compact Java Virtual Machine for
> microcontrollers:
> http://darjeeling.sourceforge.net/
>
> He's kindly compiled a virtual machine for us, mc1322x users, and is
> even willing to work in a more serious port once he gets access to
> some mc13224-based hardware. He even considered doing a dual port: one
> for Contiki+mc1322x and another for libmc1322x+mc1322x. At this
> moment, the current compilation should work only under Contiki though.
Neat! Niels, where are you located?
>
> This said, I need to test the first alpha-VM on my Econotags. The
> Virtual Machine comes in form of an ELF file and I need to link this
> file into the final binary like done with a library. I've created a
> simple example that just opens a virtual machine but this example has
> to be linked against Darjeeling's ELF file. Well, I first have to
> remember how to do this. Can I include the VM ELF file as any other
> library in the make command? Besides, the current mesh of makefiles ,
> makefile.includes and makefile.platforms in the Contiki project makes
> me wonder where to add the new compilation line. Is there any way to
> link the project to a new resource whilst keeping the current
> ../../Makefile.include dependency? Otherwise I should create a
> self-contained makefile like some examples do (ex: ravenusbstick).
The lines to look at are in Contiki, cpu/mc1322x/Makefile.mc1322x:
%.$(TARGET): $(OBJECTDIR)/board.h %.co $(PROJECT_OBJECTFILES)
contiki-$(TARGET\
).a $(STARTUP) $(OBJECTDIR)/symbols.o
$(CC) $(LDFLAGS) $(CFLAGS) -nostartfiles -o $@ $(filter-out
%.a,$^) $(f\
ilter %.a,$^) $(filter %.a,$^)
And in libmc1322x, Makefile.include:
%.$(TARGET): $(OBJECTDIR)/board.h %.co $(PROJECT_OBJECTFILES)
contiki-$(TARGET\
).a $(STARTUP) $(OBJECTDIR)/symbols.o
$(CC) $(LDFLAGS) $(CFLAGS) -nostartfiles -o $@ $(filter-out
%.a,$^) $(f\
ilter %.a,$^) $(filter %.a,$^)
Those are the rules that do final linking.
-Mar.
More information about the mc1322x
mailing list