[Tinyos-help] compiling to assembler
Cory Sharp
cory at moteiv.com
Tue Oct 3 10:02:28 PDT 2006
Also, as a quick hack, you can run this at the command line to produce a "
main.exe" that actually contains assembly text:
CFLAGS=-S make <target>
Cory
On 10/2/06, R. Steve McKown <rsmckown at yahoo.com> wrote:
>
> On Monday 02 October 2006 01:21 pm, jose m wrote:
> > Can be compiled the nesc code to assembler instead to hexadecimal?
>
> I created a make support file for tinyos-2.x to create map files from the
> linker stage, which I occasionally find handy. I threw together an extra
> file to emit assembly code just now. It isn't tested very well but seems
> to
> work ok.
>
> You can place the two files (shown below) into /opt/tinyos-2.x
> /support/make.
> Better yet, so that you don't corrupt the 'pristine' /opt/tinyos-2.x
> directory, create a local place for them, like someplace/support/make and
> include the following line in project makefiles to use them:
>
> TOSMAKE_PATH += someplace/support/make
>
> To create an assembly file, run:
>
> make <target> asm
>
> To create a binary as normal and also build a map file, run:
>
> make <target> map
>
> You can add other extra options with map when building, like:
>
> make <target> map sbsl,/dev/usb/tts/3 install
>
> The .asm and .map files, when built, are placed in the build/<target>
> directory.
>
> ------ map.extra -------
> # This extra builds a map file
> PFLAGS += -Wl,-Map=$(BUILDDIR)/main.map
> -----------------------
>
> ------ map.extra -------
> # Use this extra to emit assembly output
> BUILD_DEPS = tosasm
>
> tosasm: builddir FORCE
> @echo " compiling $(COMPONENT) to a $(PLATFORM) assembly file"
> $(NCC) -S -o $(BUILDDIR)/main.asm $(OPTFLAGS) $(PFLAGS) $(CFLAGS)
> $(WIRING_CHECK_FLAGS) $(COMPONENT).nc
> -----------------------
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20061003/a37e3444/attachment.htm
More information about the Tinyos-help
mailing list