MSP430 >> MSP430

Pages: 1
Eugenio



Reged: Aug 05 2004
Posts: 56
Loc: El Bolson - Argentine
Compiled C Size question
      #27899 - Tue Jun 05 2007 09:16 AM

hi,
a customer ask about modify an existing C program for MSP430F135, but I never worked over It,
It was compiled with IAR 1.26, I am looking for new compiler tools,
I saw source program, but I do not compile yet.
Customer says executable occupies about 15 K, I see about 1000 lines of C code,
Sorry if this is a silly question, but... Could spread 1000 C code lines in 15 K of executable?
Only specific processor header and string.h are loaded.
Is there some logic rule about amount of code I should expect??
thanks
Eugenio


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dan HenryModerator
Guru
****

Reged: Oct 16 2003
Posts: 3387
Loc: Boulder, Colorado U.S.A.
Re: Compiled C Size question [Re: Eugenio]
      #27905 - Tue Jun 05 2007 01:20 PM

No consistent rules in my opinion. 15K for 1000 lines doesn't seem entirely out of line. It really depends on code complexity. Does the code use floating point or large tables?

Post Extras: Print Post   Remind Me!   Notify Moderator  
Eugenio



Reged: Aug 05 2004
Posts: 56
Loc: El Bolson - Argentine
Re: Compiled C Size question [Re: Dan Henry]
      #27910 - Tue Jun 05 2007 06:47 PM

hi Dan, kind as always,
no float math, all int and some char, no large tables
I guess 50 x 10 (not 50 tables of 10 units), the device read some variables each 5 mS,
and save onto flash if limits are passed, and up to 50 events are saved.
thanks
Eugenio


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dan HenryModerator
Guru
****

Reged: Oct 16 2003
Posts: 3387
Loc: Boulder, Colorado U.S.A.
Re: Compiled C Size question [Re: Eugenio]
      #27917 - Wed Jun 06 2007 08:23 AM

Quote:

hi Dan, kind as always,





Thinking about it a little more, I don't think that 15K for 1000 lines is unreasonable. The MSP430 uses 16-bit instructions, so that that's roughly 7 instructions per line.

You could download HI-TECH's demo version of the compiler and see how it does with the code.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Eugenio



Reged: Aug 05 2004
Posts: 56
Loc: El Bolson - Argentine
Re: Compiled C Size question [Re: Dan Henry]
      #28926 - Mon Jul 30 2007 03:47 PM

hi Dan, finally I am working about this program...
I saw several compilers, (HiTech, IAR, Cross Works and CCE from TI)
to begin I used a free 4 K IAR edition, and...after several changes It compiles (a lot of dudes of course)
It has 4386 bytes, this is to close the program size comment. (Why compiles if It is a 4096 edition? I do not know!)
I downloaded HiTech Demo as you pointed out, but I prefer to study
datasheets, manuals and program before activate the demo.
MSP430 seems to be a solid microntroller, I only regret the lack of information about this uP (comparing with PIC),
I read several post comparing PIC and MSP430.
Is really not possible to compare any PIC with MSP430 in current consumption?
thanks
Eugenio


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dan HenryModerator
Guru
****

Reged: Oct 16 2003
Posts: 3387
Loc: Boulder, Colorado U.S.A.
Re: Compiled C Size question [Re: Eugenio]
      #28931 - Tue Jul 31 2007 08:41 AM

Quote:

Is really not possible to compare any PIC with MSP430 in current consumption?



My clients, when doing very low power design, do seem to always go with the MSP430. The closest PIC comparables are Microchip's nanoWatt devices. They started that with some of their PIC18 devices.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Eugenio



Reged: Aug 05 2004
Posts: 56
Loc: El Bolson - Argentine
Re: Compiled C Size question [Re: Dan Henry]
      #28932 - Tue Jul 31 2007 09:39 AM

hi Dan, thanks your reply,
I was read your post by Jan 3, 2005,
in reply to lucky - ricardo, about PIC vs MSP430,
I would guess It could changed today!!
regards
Eugenio


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dan HenryModerator
Guru
****

Reged: Oct 16 2003
Posts: 3387
Loc: Boulder, Colorado U.S.A.
Re: Compiled C Size question [Re: Eugenio]
      #28954 - Tue Jul 31 2007 09:44 PM

Quote:

I saw several compilers, (HiTech, IAR, Cross Works and CCE from TI)



If you do move forward with the MSP430 devices, I would appreciate your feedback regarding your experiences trying out all these toolchains. I could compare them myself of course, but I like to assess and appreciate other developer's points of view.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:  ndouglas, jtemples, Dan Henry, Andrew L, mikerj, dave g, meisty, josh stevo 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is enabled
      UBBCode is enabled

Rating:
Topic views: 5343

Rate this topic

Jump to

Contact Us | Privacy statement HI-TECH Software

Powered by UBB.threads™ 6.5.5