Now you told me that i just realized something weird... i am no using the
CFLAGS.. but if i change the -O1 to -O2 it makes difference (still cant
build anyway)

Any ideal why thats happening? And even using CFLAGS as

${NAME}.elf: ${OBJECTS}

${CC} ${CFLAGS} -o $@ ${OBJECTS}

 i get the same result...



On Wed, Mar 9, 2011 at 9:15 AM, Matthias Hartmann <
[email protected]> wrote:

> If i got it right, the resulting call to gcc will be
>
> msp430-gcc -mmcu=msp430x2232
> no -O switch so the -O default of gcc 3 and gcc 4 will be used, which may
> give different results.
> the CFLAGS definition below is not used as far as i can see.
> try
> CC = msp430-gcc -O1
> or
> CC = msp430-gcc -Os
> instead of
> CC = msp430-gcc
> And see if this changes the results.
>
>
> Am 09.03.2011 12:49, schrieb Luis Rossi:
>
>>  I am having a problem with a very big difference on the build size of
>> the
>> mspgcc-3.2.3 and actual release of mspgcc4 pointed me by Matthias.
>>
>> Its very simple to switch between both, just got to change Enviromental
>> Variables. I made the test with couple codes here for both. On the 3.2.3
>> run
>> i used msp430x2013 and on the mspgcc4 i used msp430x2231 for the Code-2
>> and
>> msp430x2232 with the 2231 header file inputed for the Code-1 becouse it
>> was
>> overflowing the msp430g2231 memory.  The makefile is exactly the same with
>> just the CPU as the difference.
>>
>> And here the results:
>>
>>                  mspgcc-3.2.3           mspgcc4
>>
>> Code-1         1596 bytes             2304 bytes
>>
>> Code-2          402 bytes              878 bytes
>>
>> Woa .. big difference.. something is really wrong. How the old mspgcc is
>> so
>> optimized compared to the new one?
>>
>> The Makefile i am using on Eclipse with the first code is the following
>> (it
>> is attached to the e-mail too)
>>
>>
>>
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> # makfile configuration
>>
>> NAME = LP_TEST
>>
>> OBJECTS = main.o Soft_UART.o MMA7455.o SPI_lib.o
>>
>> CPU = msp430x2232
>>
>> CFLAGS = -mmcu=${CPU} -O1 -Wall
>>
>> #switch the compiler (for the internal make rules)
>>
>> CC = msp430-gcc
>>
>> .PHONY: all FORCE clean download download-jtag download-bsl dist
>>
>> #all should be the first target. it's built when make is run without args
>>
>> all: ${NAME}.elf ${NAME}.a43 ${NAME}.lst
>>
>> #confgigure the next line if you want to use the serial download
>>
>> download: download-jtag
>>
>> #download: download-bsl
>>
>> #additional rules for files
>>
>> ${NAME}.elf: ${OBJECTS}
>>
>> ${CC} -mmcu=${CPU} -o $@ ${OBJECTS}
>>
>> ${NAME}.a43: ${NAME}.elf
>>
>> msp430-objcopy -O ihex $^ $@
>>
>> ${NAME}.lst: ${NAME}.elf
>>
>> msp430-objdump -dSt $^>$@
>>
>> download-jtag: all
>>
>> msp430-jtag –spy-bi-wire -lpt=USBFET -e ${NAME}.elf
>>
>> download-bsl: all
>>
>> msp430-bsl -e ${NAME}.elf
>>
>> clean:
>>
>> rm -f ${NAME}.elf ${NAME}.a43 ${NAME}.lst ${OBJECTS}
>>
>> #backup archive
>>
>> dist:
>>
>> tar czf dist.tgz *.c *.h *.txt makefile
>>
>> #dummy target as dependecy if something has to be build everytime
>>
>> FORCE:
>>
>> #project dependencies
>>
>> main.o: main.c HardwareDescriptor.h Soft_UART.h MMA7455.h SPI_lib.h
>>
>> Soft_UART.o: Soft_UART.c Soft_UART.h
>>
>> MMA7455.o: MMA7455.c MMA7455.h SPI_lib.h
>>
>> SPI_lib.o: SPI_lib.c SPI_lib.h
>>
>>
>> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Mar 9, 2011 at 7:09 AM, Matthias Hartmann<
>> [email protected]>  wrote:
>>
>> I compared the linker scripts "msp430\lib\ldscripts\msp430x2231.x" and
>>> "msp430\lib\ldscripts\msp430x2013.x" the look the same.
>>> What happens if you are using msp430x2013 with the mingw32 20110213
>>> build?
>>> Any differences compared with the linker scripted you used with the old
>>> version?
>>>
>>> Am 08.03.2011 22:44, schrieb Luis Rossi:
>>>
>>> Thats weird, I was using a code with CPU as msp430x2013 for msp430g2231,
>>> but now, if i use msp430x2231 it says the region texts is overflowed by
>>> 318
>>> bytes.. Any idea?
>>>
>>> On Tue, Mar 8, 2011 at 6:05 PM, Luis Rossi<[email protected]>
>>>  wrote:
>>>
>>> Hmm i am going to take a try with your build. Do you know any known bug
>>>> or
>>>> issue?
>>>>
>>>>
>>>> On Tue, Mar 8, 2011 at 5:32 PM, Matthias Hartmann<
>>>> [email protected]>  wrote:
>>>>
>>>> Luis,
>>>>> The last WIndows build on sourcforge is build with cygwin, so ure
>>>>> experience is right.
>>>>>
>>>>> I am using an mingw32 build of mspgcc4 20110213 with Eclipse on Windows
>>>>> 7
>>>>> 64
>>>>> I use this version:
>>>>>
>>>>> url: http://www.mydrive.ch/login
>>>>> user: guest@Hutch67
>>>>> pw: mspgcc4!mingw32
>>>>> path :
>>>>>
>>>>> mspgcc4/msp430-gcc-4.4.5_gdb_7.2_insight-6.8.1_TI_20110213_mingw32.tar.bz2
>>>>>
>>>>> Best, Matthias
>>>>>
>>>>> Am 08.03.2011 19:11, schrieb Luis Rossi:
>>>>>
>>>>>  I really cant get most of what you guys are saying as i never did any
>>>>>> build
>>>>>> of a gcc-like compiler. Just a question i could read on the discussion
>>>>>> about
>>>>>> to use mingw or cygwin. I was not able to use mspgcc4 available on the
>>>>>> website with mingw, it just crash (on Vista 64). But I could make it
>>>>>> work
>>>>>> with cygwint. Is that suposed to be the right behavior? Is there any
>>>>>> way
>>>>>> to
>>>>>> make it work with Mingw? Becouse i am using Eclipse as IDE, and i dont
>>>>>> see
>>>>>> how to make it work with cygwin. On the latest version are the value
>>>>>> line
>>>>>> devices suported? if yes, is there any way to make that work for the
>>>>>> build
>>>>>> available on the sourceforge? For now i am using an equivalent
>>>>>> device....
>>>>>>
>>>>>>
>>>>>> Thank you!
>>>>>>
>>>>>>
>>>>>> On Mon, Feb 28, 2011 at 8:30 AM, JMGross<[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> ----- Ursprüngliche Nachricht -----
>>>>>>> Von: Aaron Spike
>>>>>>> An: Mike Van Emmerik
>>>>>>> Gesendet am: 27 Feb 2011 01:52:03
>>>>>>>
>>>>>>> What do we, mingw users, use to flash the chips once we have a
>>>>>>> working
>>>>>>>
>>>>>>>> compiler? I've used mspdebug on linux, but from what I gather that
>>>>>>>> doesn't work on windows without cygwin.
>>>>>>>>
>>>>>>>> There's a really good flashing tool from eplrotronic (Lite
>>>>>>> FET-Pro430)
>>>>>>> which
>>>>>>> allows flashing of all MSPs with many special features (like detailed
>>>>>>> setings
>>>>>>> of what to erase before flashing etc.). The full version also
>>>>>>> supports
>>>>>>> serial numbers etc. and is fully scriptable.
>>>>>>>
>>>>>>> The free version, however, allows specifying a config file on the
>>>>>>> commandline
>>>>>>> (makefile), so it loads project-specific settings.
>>>>>>> You'll need, however, to press the 'program' button after the tool
>>>>>>> has
>>>>>>> been
>>>>>>> loaded
>>>>>>> andclose it after the job is done..
>>>>>>> Well, since it does support the MSPs which are not supported by the
>>>>>>> 3.x
>>>>>>> msp430-jtag, I've learned to do thess additional clicks :)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Free Software Download: Index, Search&   Analyze Logs and other IT
>>>>>>> data
>>>>>>> in
>>>>>>> Real-Time with Splunk. Collect, index and harness all the fast moving
>>>>>>> IT
>>>>>>> data
>>>>>>> generated by your applications, servers and devices whether physical,
>>>>>>> virtual
>>>>>>> or in the cloud. Deliver compliance at lower cost and gain new
>>>>>>> business
>>>>>>> insights. http://p.sf.net/sfu/splunk-dev2dev
>>>>>>> _______________________________________________
>>>>>>> Mspgcc-users mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> What You Don't Know About Data Connectivity CAN Hurt You
>>>>>> This paper provides an overview of data connectivity, details
>>>>>> its effect on application quality, and explores various alternative
>>>>>> solutions. http://p.sf.net/sfu/progress-d2d
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mspgcc-users mailing list
>>>>>> [email protected]
>>>>>> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>>>>>>
>>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> What You Don't Know About Data Connectivity CAN Hurt You
>>>>> This paper provides an overview of data connectivity, details
>>>>> its effect on application quality, and explores various alternative
>>>>> solutions. http://p.sf.net/sfu/progress-d2d
>>>>> _______________________________________________
>>>>> Mspgcc-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>>>>>
>>>>>
>>>>>
>>>>  --
>>>> Luís Filipe Rossi
>>>> Electrical Engineer
>>>> Biomechatronics Lab. / Grupo de Sensores Integráveis e Sistemas
>>>> Escola Politécnica
>>>> Universidade de São Paulo
>>>> Cel. +55 (11) 7662-9234
>>>>
>>>>
>>>>
>>> --
>>> Luís Filipe Rossi
>>> Electrical Engineer
>>> Biomechatronics Lab. / Grupo de Sensores Integráveis e Sistemas
>>> Escola Politécnica
>>> Universidade de São Paulo
>>> Cel. +55 (11) 7662-9234
>>>
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Colocation vs. Managed Hosting
>> A question and answer guide to determining the best fit
>> for your organization - today and in the future.
>> http://p.sf.net/sfu/internap-sfd2d
>>
>>
>>
>> _______________________________________________
>> Mspgcc-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>>
>
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>


-- 
Luís Filipe Rossi
Electrical Engineer
Biomechatronics Lab. / Grupo de Sensores Integráveis e Sistemas
Escola Politécnica
Universidade de São Paulo
Cel. +55 (11) 7662-9234
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to