On Sun, Sep 14, 2014 at 7:36 AM, Michael Andersen <m.ander...@berkeley.edu>
wrote:

> Hi
>
> On Sun, Sep 14, 2014 at 12:48 AM, Eric Decker <cire...@gmail.com> wrote:
>
>>
>>
>> On Sat, Sep 13, 2014 at 11:16 PM, Michael Andersen <
>> m.ander...@berkeley.edu> wrote:
>>
>>> Hi
>>>
>>> I am working on the git master,
>>>
>>
>> I assume you mean gh:tinyos/tinyos-main,  yes?
>>
>
> Yeah, sorry.
>

are you current?  Current tip is 7e33e35.   When talking about being on a
repository, one should always report what SHA one is on.   The identifies
explicitly where one is working.


>
>
>>
>> Also do you have a cloned fork?   If you publish on github I can look at
>> what you have done so far.
>>
>
Can you publish your tree or is it private?


>
>>
>>> and I am working on a new cortex based platform.
>>>
>>
>> sweet.
>>
>
>>
>>> The problems arose because the in-tree lib/printf does not play nicely
>>> with the arm libc functions, so I wrote a replacement that handles
>>> everything cleanly, but I would like to force it to be included before
>>> lib/printf.
>>>
>>
>> lib/printf only gets included when pulled in via a platform file.
>>
>
> Unfortunately, this is not quite true, and therein lies the rub. If I
> compile say NullC, which has no additional goals in the makefile, then the
> nescc invocation looks like this:
>
> apps/Null$ make storm
> [INFO] compiling NullAppC to a  binary
> nescc -o build//main.exe  -Os -gcc=arm-none-eabi-gcc -Wnesc-all
> -fnesc-include=tos
> -fnesc-scheduler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask
> -fnesc-cfile=build//app.c -fnesc-separator=__ *<includes and stuff from
> platform file>*
>
>  however if I compile say UDPEcho, then it looks like this:
>

How do you compile UDPEcho?

Is it...

cd apps/UDPEcho

make storm blip


????


Try doing...

export TOSMAKE_FIRST_FLAGS += -I%T/platform/storm/lib/printf
make storm blip



> nescc -o build//main.exe  -Os* <stuff from makefile>* -gcc=arm-none-eabi-gcc
> -Wnesc-all -fnesc-include=tos
> -fnesc-scheduler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask
> -fnesc-cfile=build//app.c -fnesc-separator=__ -
> *<stuff from blip: *-DCC2420_HW_ACKNOWLEDGEMENTS
> -DCC2420_HW_ADDRESS_RECOGNITION -DPACKET_LINK -DTOSH_DATA_LENGTH=112
> -I../../tos/lib/net/ *-I../../tos/lib/printf/*
> -I../../tools/tinyos/c/blip/ -I../../tos/lib/net/blip/
> -I../../tos/lib/net/blip/interfaces/ -I../../tos/lib/net/blip/nwprog/
> -I../../tos/lib/net/blip/shell/ -I../../tos/lib/net/blip/serial/
> -I../../tos/lib/net/blip/platform/ -I../../tos/lib/net/blip/icmp/
> -I../../tos/lib/net/blip/dhcp/ -I../../tos/lib/net/rpl *>* *<stuff from
> platform file>*
>
> so you see, blip adds flags to nescc that have higher priority than the
> platform file, including tos/lib/printf.
>
>
>> so you could put your new printf into say tos/lib/printf_arm or
>> tos/lib/printf_new and then change what the platform file invokes.
>>
>> That should work.
>>
>
> I have my changes in -I../../tos/platforms/storm/lib/printf/ where I
> override printf.h and SerialPrintfC, so as long as /tos/lib/printf is not
> included, it works fine.
>
>
>>
>>> The alternative is to modify lib/printf to be aware of my platform, but
>>> I would like to avoid that if possible.
>>>
>>
>> yeah you really don't want to do that.
>>
>>
>>
>>
>>> Regards
>>> Michael
>>>
>>> On Sat, Sep 13, 2014 at 8:36 PM, Eric Decker <cire...@gmail.com> wrote:
>>>
>>>> First, what code body are you working on?
>>>>
>>>> The answer is different for the development trunk than the last
>>>> released TinyOS (2.1.2).
>>>>
>>>> Also what platform are you actually working on?
>>>>
>>>> On Sat, Sep 13, 2014 at 4:13 PM, Michael Andersen <
>>>> m.ander...@berkeley.edu> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I am wanting to change the "printf.h" that is used by blip, but any
>>>>> PFLAGS include paths added in the foo.platform file in
>>>>> support/make/platforms/ appear after the include flags for the goals added
>>>>> in the application makefile, leading to them being ignored. How do I solve
>>>>> this in the correct way?
>>>>>
>>>>> This is just a specific example of a more general question of how to
>>>>> add includes that are higher priority than those specified by extras like
>>>>> blip.
>>>>>
>>>>> Thanks
>>>>> Michael
>>>>>
>>>>> _______________________________________________
>>>>> Tinyos-help mailing list
>>>>> Tinyos-help@millennium.berkeley.edu
>>>>>
>>>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Eric B. Decker
>>>> Senior (over 50 :-) Researcher
>>>>
>>>>
>>>
>>
>>
>> --
>> Eric B. Decker
>> Senior (over 50 :-) Researcher
>>
>>
>


-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to