Hi,
Martin Leopold schrieb:
> I'm trying to compile my port of TinyOS using SDCC*, but I'm running
> into some problems. One problem is the following: one program runs fine
> with the default memory mode (small i presume), but fails with the
> following error when switching to large:
>
> ...
> ?ASxxxx-Error-<mp> in line 4627 of build/cc2430em/app.asm
> <m> multiple definitions error
> <p> phase error: label location changing between passes 2
> and 3
> ?ASxxxx-Error-<m> in line 4630 of build/cc2430em/app.asm
> <m> multiple definitions error
> removing build/cc2430em/app.rel
> ...
>
> In the example above it turns out to be a char constant that ends up
> being multiply defined in the asm output. I've reproduced the problem
> int the attached .c file.
yes, this is a bug (please file a report). This is the corresponding
snippet from the asm output:
.area CONST (CODE)
__str_0:
.ascii "Booting"
.db 0x00
__str_0:
.ascii "Booting"
.db 0x00
As --model-large does not work with the cast before the string
using the option --stack-auto instead might be a workaround.
It causes much less overhead than --model-large and might free just
enough data memory:
Sizes and execution cycles (ticks) of the nightly regression tests
(Thanks Erik for having them run again!)
'mcs51-small': 5193 tests, 724 test cases, 877879 bytes, 71651136 ticks
'mcs51-large': 5188 tests, 724 test cases, 1182452 bytes, 137016648 ticks
'mcs51-stack-auto': 5193 tests, 724 test cases, 982857 bytes, 76536504 ticks
(as on one of the green symbols at the right on
http://sdcc.sourceforge.net/snap.php))
Can you trick NesC to output a storage class (like f.e. __pdata) for
(some or all) global variables so that the globals don't eat up __data space?
Greetings,
Frieder
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user