I have to update it, I will try to do this soon, I'm using:

-mmemory-model=medium
-ffunction-sections
-fdata-sections
-mcode-region=far
-gc-sections

Hope this helps,

--Antonio

On Thursday, August 8, 2013, Flemming Nyboe <[email protected]>
wrote:
> Solved.
> I had not defined a memory model.
> Adding   -mmemory-model=medium to my .platform file helped.
> I noticed the Z1 .platform file does not have this, though.
> Regards
> Flemming Nyboe
>
> On 8 August 2013 11:02, Flemming Nyboe <[email protected]> wrote:
>>
>> Hello,
>> I can compile using 4.7.0 as long as my code fits in rom (without far
rom). However, once my code grows to need far rom, 4.7.0 seems to overflow
rom instead.
>> I know that far rom has been used successfully by others for over a year
now, so I must be doing something wrong and would appreciate your comments.
Output:
>> -----------
>>     compiling RootAppC to a WEBSTechSR300 binary
>> ncc -o build/WEBSTechSR300/main.exe  -Os -fnesc-separator=__ -Wall
-Wshadow -Wnesc-all -target=WEBSTechSR300
-fnesc-cfile=build/WEBSTechSR300/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22
-DDELUGE_BASESTATION -DUART1_DMA_ENABLE -I/opt/tinyos-main/tos/lib/ftsp
-I/opt/tinyos-main/tos/lib/net/ -I/opt/tinyos-main/tos/lib/net/ctp
-I/opt/tinyos-main/tos/lib/net/4bitle -Wno-unused-but-set-variable
-Wno-strict-aliasing -DIDENT_APPNAME=\"RootAppC\"
-DIDENT_USERNAME=\"flemming\" -DIDENT_HOSTNAME=\"ProBookVirtualU\"
-DIDENT_USERHASH=0xbe1da9c6L -DIDENT_TIMESTAMP=0x52035dbeL
-DIDENT_UIDHASH=0xac8a73beL -DDELUGE -I/opt/tinyos-main/tos/lib/net
-I/opt/tinyos-main/tos/lib/net/drip -I/opt/tinyos-main/tos/lib/net/Deluge
-I/opt/tinyos-main/tos/lib/net/Deluge/FlashVolumeManager
-I/opt/tinyos-main/tos/lib/net/Deluge/BlockStorageManager
-I/opt/tinyos-main/tos/lib/net/Deluge/extra
-I/opt/tinyos-main/tos/lib/net/Deluge/extra/msp430
-I/opt/tinyos-main/tos/lib/net/Deluge/extra/WEBSTechSN
-Wl,--undefined=__init_stack -Wl,--undefined=__low_level_init
-Wl,--undefined=__do_copy_data -Wl,--undefined=__do_clear_bss
-Wl,--undefined=__stop_progExec__ -Wl,--undefined=_endless_loop__
-Wl,--undefined=__watchdog_support
-Wl,--section-start=.text=0x3B00,--defsym=_reset_vector__=0x3100
RootAppC.nc -lm
>> /opt/tinyos-main/tos/platforms/WEBSTechSN100/Msp430DcoFllC.nc:27:2:
warning: #warning "Accessing TimerA for DCO cal"
>> /opt/msp430-47/bin/../lib/gcc/msp430/4.7.0/../../../../msp430/bin/ld:
build/WEBSTechSR300/main.exe section `.rodata' will not fit in region `rom'
>> /opt/msp430-47/bin/../lib/gcc/msp430/4.7.0/../../../../msp430/bin/ld:
section .vectors loaded at [0000ffc0,0000ffff] overlaps section .rodata
loaded at [0000f6c0,000104c2]
>> /opt/msp430-47/bin/../lib/gcc/msp430/4.7.0/../../../../msp430/bin/ld:
region `rom' overflowed by 1390 bytes
>>
/opt/msp430-47/bin/../lib/gcc/msp430/4.7.0/mcpu-430x/mmpy-16/libcrt0.a(_copy_data.o):
In function `__do_copy_data':
>>
/home/cire/mm/w/tp/tinyos-2.x/tools/platforms/msp430/toolchain-47/gcc-4.7.0/build/msp430/mcpu-430x/mmpy-16/libgcc/../../../../../libgcc/config/msp430/crt0.S:208:(.init4+0x12):
relocation truncated to fit: R_MSP430_16_BYTE against symbol
`__data_load_start' defined in *ABS* section in build/WEBSTechSR300/main.exe
>> /tmp/ccEr8KdH.o: In function `Stm25pSectorP__Sector__computeCrc':
>> app.c:(.text+0x1ba2): relocation truncated to fit: R_MSP430_16_BYTE
against `no symbol'
>> <and similar>
>> -----------
>> Specialities:
>> * I'm using a custom MSP430F2617 platform.
>> * Using Deluge, I set section-start=.text=0x3B00 om tosboot.extra.
Thinking this might be the problem, I have tried reverting that to the
standard 0x3100, but this did not help.
>> The two questions I have are:
>> 1) Why does 4.7.0 seem to overflow rom instead of using far rom?
>> 2) Is it an error that I see a reference
to /home/cire/mm/w/tp/tinyos-2.x/tools.... in my output?
>> Setup:
>> * ubuntu 12.04
>> * TinyOS install yesterday, as per instructions
http://tinyos.stanford.edu/tinyos-wiki/index.php/Automatic_installation
>> including msp430-47
>> * PATH is
/opt/msp430-47/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
>> Regards
>> Flemming Nyboe
>

-- 
--
Antonio Liñán Colina
R+D Engineer
@: [email protected]
@: [email protected]
------------------------------
Advancare
Ph.: +34 935 511 403
http://www.advancare.com
http://www.zolertia.com
http://zolertia.sourceforge.net
http://webshop.zolertia.com
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to