Hi, I am trying to convert c file that compiled and debugged under IAR system into the gcc environment. Currently, i am running into the problem of that in gcc, it really doesn't recognize the msp430x140x.h file. Instead, I was told that there is a io.h file built in gcc. However, when I try to #include <io.h> in place of #include <msp430x140x.h>, gcc popped out this message: In file included from final_7.c:3, from testadc.c:2, from test_3.c:3: TimerB.c:30: io.h: No such file or directory In file included from TimerB.c:32, from final_7.c:3, from testadc.c:2, from test_3.c:3: TimerB.h:152: io.h: No such file or directory I am wondering if anyone know about how to solve this problem. One more question, what are some of things that gcc doesn't support that IAR does. We are currently using IAR system for our program, however, we are trying to convert our programs to be compiled under gcc. Thank you very much. Sincerely yiming yin
problems with transferring files from IAR system to gcc
Started by ●July 9, 2003
Reply by ●July 9, 20032003-07-09
Hello,
Are you sure it's <msp430x140x.h> and not <msp430x14x.h>? You
definitely
need to include that file. I believe there are some macros defined in
<io.h> and <signal.h> that are sometimes needed - like EINT().
Which model of MSP430 are you compiling for? What platform are you using to
run mspgcc? Windows, Linux, Unix? If it's Windows, did you install it in
the default directory (as is recommended) or did you install in a
different one?
If you don't figure out the problem right away, you should try the
mspgcc-users mailing list.
HTH,
Ale
yiming_yin said:
> Hi, I am trying to convert c file that compiled and debugged under IAR
> system into the gcc environment. Currently, i am running into the
> problem of that in gcc, it really doesn't recognize the msp430x140x.h
> file. Instead, I was told that there is a io.h file built in gcc.
> However, when I try to #include <io.h> in place of #include
> <msp430x140x.h>, gcc popped out this message:
>
> In file included from final_7.c:3,
> from testadc.c:2,
> from test_3.c:3:
> TimerB.c:30: io.h: No such file or directory
> In file included from TimerB.c:32,
> from final_7.c:3,
> from testadc.c:2,
> from test_3.c:3:
> TimerB.h:152: io.h: No such file or directory
>
> I am wondering if anyone know about how to solve this problem. One
> more question, what are some of things that gcc doesn't support that
> IAR does. We are currently using IAR system for our program, however,
> we are trying to convert our programs to be compiled under gcc. Thank
> you very much.
> Sincerely
> yiming yin
>
Reply by ●July 10, 20032003-07-10
Hello, thank you so much for replying. I am pretty sure that we are using msp430x14x.h, sorry I typed one more 0. We are running on the Windows and are using the msp430F149. Thank you for your advice, I really appreciate it. XY --- In msp430@msp4..., "Ale Avila" <ale@t...> wrote: > Hello, > > Are you sure it's <msp430x140x.h> and not <msp430x14x.h>? You definitely > need to include that file. I believe there are some macros defined in > <io.h> and <signal.h> that are sometimes needed - like EINT(). > > Which model of MSP430 are you compiling for? What platform are you using to > run mspgcc? Windows, Linux, Unix? If it's Windows, did you install it in > the default directory (as is recommended) or did you install in a > different one? > If you don't figure out the problem right away, you should try the > mspgcc-users mailing list. > > HTH, > Ale > > yiming_yin said: > > Hi, I am trying to convert c file that compiled and debugged under IAR > > system into the gcc environment. Currently, i am running into the > > problem of that in gcc, it really doesn't recognize the msp430x140x.h > > file. Instead, I was told that there is a io.h file built in gcc. > > However, when I try to #include <io.h> in place of #include > > <msp430x140x.h>, gcc popped out this message: > > > > In file included from final_7.c:3, > > from testadc.c:2, > > from test_3.c:3: > > TimerB.c:30: io.h: No such file or directory > > In file included from TimerB.c:32, > > from final_7.c:3, > > from testadc.c:2, > > from test_3.c:3: > > TimerB.h:152: io.h: No such file or directory > > > > I am wondering if anyone know about how to solve this problem. One > > more question, what are some of things that gcc doesn't support that > > IAR does. We are currently using IAR system for our program, however, > > we are trying to convert our programs to be compiled under gcc. Thank > > you very much. > > Sincerely > > yiming yin > >
Reply by ●July 13, 20032003-07-13
Hello, We also jump between the IAR and gcc compilers... the #include <msp430x14x.h> is needed by both. In your makefile, there should be lines similar to these : # # put the path name of the root of the MSP430 includes directory here INCLUDESROOT = "C:\Progra~1\mspgcc\msp430\include" # # gcc expects the C compiler to be declared in the variable CC and it's flags in CFLAGS CC= C:\Progra~1\mspgcc\bin\msp430-gcc CFLAGS= -mmcu=$(MCU) -g -Os -Wall -I$(INCLUDESROOT) -I$(INCLUDESROOT) \MSP430 -I$(INCLUDESROOT)\sys # # Basically, you're telling the compiler the path(s) to use when searching for files you #include. My guess is you have this set incorrectly - go to where you installed msp-gcc and find the file in question (mine are in "/msp430/include") and reference it's path in the INCLUDESROOT variable. Once you get the paths straight, you'll hit the more annoying problem - that gcc and IAR have different ideas about how interrupt handler functions should be declared. The easy fix is to use #ifdef __IAR IAR interrupt definitions go here #else ... gcc versions go here #endif and then put __IAR into the list of defined variables in IAR's compiler. Anyone got some macros written to automate this? hope this helped... --- In msp430@msp4..., "yiming_yin" <yiming_yin@y...> wrote: > Hello, thank you so much for replying. I am pretty sure that we are > using msp430x14x.h, sorry I typed one more 0. We are running on the > Windows and are using the msp430F149. Thank you for your advice, I > really appreciate it. > XY > --- In msp430@msp4..., "Ale Avila" <ale@t...> wrote: > > Hello, > > > > Are you sure it's <msp430x140x.h> and not <msp430x14x.h>? You > definitely > > need to include that file. I believe there are some macros > defined in > > <io.h> and <signal.h> that are sometimes needed - like EINT(). > > > > Which model of MSP430 are you compiling for? What platform are you > using to > > run mspgcc? Windows, Linux, Unix? If it's Windows, did you > install it in > > the default directory (as is recommended) or did you install in a > > different one? > > If you don't figure out the problem right away, you should try the > > mspgcc-users mailing list. > > > > HTH, > > Ale > > > > yiming_yin said: > > > Hi, I am trying to convert c file that compiled and debugged > under IAR > > > system into the gcc environment. Currently, i am running into the > > > problem of that in gcc, it really doesn't recognize the > msp430x140x.h > > > file. Instead, I was told that there is a io.h file built in gcc. > > > However, when I try to #include <io.h> in place of #include > > > <msp430x140x.h>, gcc popped out this message: > > > > > > In file included from final_7.c:3, > > > from testadc.c:2, > > > from test_3.c:3: > > > TimerB.c:30: io.h: No such file or directory > > > In file included from TimerB.c:32, > > > from final_7.c:3, > > > from testadc.c:2, > > > from test_3.c:3: > > > TimerB.h:152: io.h: No such file or directory > > > > > > I am wondering if anyone know about how to solve this problem. > One > > > more question, what are some of things that gcc doesn't support > that > > > IAR does. We are currently using IAR system for our program, > however, > > > we are trying to convert our programs to be compiled under gcc. > Thank > > > you very much. > > > Sincerely > > > yiming yin > > >