Regarding intrinsics.h file

581 views
Skip to first unread message

Sudar Muthu

unread,
Jun 1, 2012, 12:09:01 PM6/1/12
to openc...@googlegroups.com
(I am getting my hands dirty with OpenChronos for the first time, so
pardon me if I am making any newbie mistakes ;) )

I am trying to build OpenChronos in ubuntu. In the readme file[1] it
is specified that we must copy gcc/intrinsics.h into
[msp430-gcc-path]/msp430/include/intrinsics.h But the latest commit
[2] has removed the intrinsics.h file [2]. So I am assuming that we no
longer need to copy the file, if we are using the latest msp430
toolchain to build.

But when I try to do make it still gives me a error that intrinsics.h
is missing. Attached the error message below.

I installed the msp430 toolchain in Ubuntu by using the following command

apt-get install gcc-msp430

Can someone kindly tell me if I am missing something. Thanks for your time.

sudar@sudar-desktop:~/code/watch/openchronos$ make
Assembling even_in_range in one step for MSP430...
msp430-gcc -D_GNU_ASSEMBLER_ -x assembler-with-cpp -c even_in_range.s
-o even_in_range.o
msp430-gcc -mmcu=cc430f6137 -D__MSP430_6137__ -DMRFI_CC430
-D__CC430F6137__ -DELIMINATE_BLUEROBIN -I./ -I./include/ -I./driver/
-I./logic/ -I./bluerobin/ -I./simpliciti/
-I./simpliciti/Components/bsp -I./simpliciti/Components/bsp/drivers
-I./simpliciti/Components/bsp/boards/CC430EM
-I./simpliciti/Components/mrfi -I./simpliciti/Components/nwk
-I./simpliciti/Components/nwk_applications -Os -Wall
-fomit-frame-pointer -fno-force-addr -finline-limit=1
-fno-schedule-insns -Wl,-Map=output.map -DISM_LF -c
logic/acceleration.c -o logic/acceleration.o
In file included from logic/acceleration.c:43:0:
./include/project.h:42:24: fatal error: intrinsics.h: No such file or directory
compilation terminated.
make: *** [logic/acceleration.o] Error 1


[1] - https://gitorious.org/openchronos/openchronos/blobs/master/README
[2] - https://gitorious.org/openchronos/openchronos/commit/8b6196e8921423fbb17b966fb21493cc403d5642

With Regards,
Sudar

http://SudarMuthu.com
http://twitter.com/sudarmuthu

Angelo Arrifano

unread,
Jun 1, 2012, 12:20:00 PM6/1/12
to openc...@googlegroups.com
On Fri, Jun 1, 2012 at 6:09 PM, Sudar Muthu <su...@sudarmuthu.com> wrote:
> (I am getting my hands dirty with OpenChronos for the first time, so
> pardon me if I am making any newbie mistakes ;) )

No worries, have you also looked at openchronos-ng?
http://sourceforge.net/projects/openchronos-ng/

>
> I am trying to build OpenChronos in ubuntu. In the readme file[1] it
> is specified that we must copy gcc/intrinsics.h into
> [msp430-gcc-path]/msp430/include/intrinsics.h But the latest commit
> [2] has removed the intrinsics.h file [2]. So I am assuming that we no
> longer need to copy the file, if we are using the latest msp430
> toolchain to build.

You are correct about that.
>
> But when I try to do make it still gives me a error that intrinsics.h
> is missing. Attached the error message below.

The commit that removes it is recent, maybe Aljaz pushed the commit
without testing :p Have you tried commenting out the #include?
I don't have a toolchain here so I cannot push a fix right now.
>
> I installed the msp430 toolchain in Ubuntu by using the following command
>
> apt-get install gcc-msp430
>
> Can someone kindly tell me if I am missing something. Thanks for your time.

Just check that that msp430 version is not the deprecated mspgcc4.

Regards,
Angelo

Sudar Muthu

unread,
Jun 1, 2012, 12:47:07 PM6/1/12
to openc...@googlegroups.com
> No worries, have you also looked at openchronos-ng?
> http://sourceforge.net/projects/openchronos-ng/

I checked it out and I really liked the way things are separated out
into modules. Right now I am going through the code. May be once I get
an handle of the code, will be able to contribute to it.

>>
>> But when I try to do make it still gives me a error that intrinsics.h
>> is missing. Attached the error message below.
>
> The commit that removes it is recent, maybe Aljaz pushed the commit
> without testing :p Have you tried commenting out the #include?
> I don't have a toolchain here so I cannot push a fix right now.

The instrinsics.h header file was included in the following 4 files.

ack-grep intrinsics.h
simpliciti/Components/bsp/bsp.h
42:/*#include <intrinsics.h>*/

simpliciti/Components/bsp/mcus/bsp_msp430_defs.h
80:/*#include <intrinsics.h>*/
122:/*#include <intrinsics.h>*/
136:/*#include <intrinsics.h>*/

simpliciti/Components/nwk/nwk_QMgmt.c
40://#include <intrinsics.h>

include/project.h
42:/*#include <intrinsics.h>*/

I commented out all of them, but then get the following error

driver/rf1a.o: In function `ReadSingleReg':
rf1a.c:(.text+0x6): undefined reference to `__get_interrupt_state'
rf1a.c:(.text+0x1a): undefined reference to `__set_interrupt_state'
driver/rf1a.o: In function `WriteSingleReg':
rf1a.c:(.text+0x2e): undefined reference to `__get_interrupt_state'
rf1a.c:(.text+0x60): undefined reference to `__set_interrupt_state'
driver/rf1a.o: In function `Strobe':
rf1a.c:(.text+0x84): undefined reference to `__get_interrupt_state'
rf1a.c:(.text+0x100): undefined reference to `__set_interrupt_state'
driver/rf1a.o: In function `ReadBurstReg':
rf1a.c:(.text+0x130): undefined reference to `__get_interrupt_state'
rf1a.c:(.text+0x172): undefined reference to `__set_interrupt_state'
driver/rf1a.o: In function `WriteBurstReg':
rf1a.c:(.text+0x18a): undefined reference to `__get_interrupt_state'
rf1a.c:(.text+0x1cc): undefined reference to `__set_interrupt_state'
driver/rf1a.o: In function `WritePATable':
rf1a.c:(.text+0x1dc): undefined reference to `__get_interrupt_state'
rf1a.c:(.text+0x240): undefined reference to `__set_interrupt_state'
collect2: ld returned 1 exit status
make: *** [main] Error 1

So I think, we can't just comment out all the includes.

Let me try to compile after reverting the last commit

>>
>> I installed the msp430 toolchain in Ubuntu by using the following command
>>
>> apt-get install gcc-msp430
>>
>> Can someone kindly tell me if I am missing something. Thanks for your time.
>
> Just check that that msp430 version is not the deprecated mspgcc4.

The version I am using is msp430-gcc (GNU GCC patched mspgcc-20110716)
4.5.3. I think this is not the deprecated one.

Sudar Muthu

unread,
Jun 1, 2012, 12:58:34 PM6/1/12
to openc...@googlegroups.com
>
> Let me try to compile after reverting the last commit
>

I am able to compile the code properly if I reverted the last commit.

Aljaž Srebrnič

unread,
Jun 2, 2012, 1:47:14 AM6/2/12
to openc...@googlegroups.com
On 01/giu/2012, at 18:58, Sudar Muthu wrote:
>>
>> Let me try to compile after reverting the last commit
>>
>
> I am able to compile the code properly if I reverted the last commit.


Hello!
That last commit I made eliminated intrinsics.h because it comes with the LTS compiler, and if intrinsics is present, it clashes with msp430-gcc's intrinsics.h. If the commit before mine works for you, you can:
1) Just use the commit before mine:)
2) update to the latest LTS version of the compiler
3) Use openchronos-ng

Thanks,
Aljaž Srebrnič
-- --
My public key: http://bit.ly/g5pw_pubkey

Sudar Muthu

unread,
Jun 2, 2012, 4:56:30 AM6/2/12
to openc...@googlegroups.com
> 2) update to the latest LTS version of the compiler

Can you kindly tell me what you mean my LTS version of the compiler? I
installed my msp430 toolchain using package manager in ubuntu.

Running msp430-gcc --version gives me the following version string

msp430-gcc (GNU GCC patched mspgcc-20110716) 4.5.3


Aljaž Srebrnič

unread,
Jun 2, 2012, 12:12:07 PM6/2/12
to openc...@googlegroups.com
On 02/giu/2012, at 10:56, Sudar Muthu wrote:
>> 2) update to the latest LTS version of the compiler
>
> Can you kindly tell me what you mean my LTS version of the compiler? I
> installed my msp430 toolchain using package manager in ubuntu.

Well, then the package maintainer is a bit late, the latest LTS version is @4.6.3-20120406

>
> Running msp430-gcc --version gives me the following version string
>
> msp430-gcc (GNU GCC patched mspgcc-20110716) 4.5.3
>
>
> With Regards,
> Sudar
>
> http://SudarMuthu.com
> http://twitter.com/sudarmuthu



Paolo Di Prodi

unread,
Jun 2, 2012, 12:15:24 PM6/2/12
to openc...@googlegroups.com
Damn.
Could he patch his version to the newer one or better to install from zero?
--
Dr. Paolo Di Prodi


Aljaž Srebrnič

unread,
Jun 2, 2012, 12:16:52 PM6/2/12
to openc...@googlegroups.com
On 02/giu/2012, at 18:15, Paolo Di Prodi wrote:
Damn.
Could he patch his version to the newer one or better to install from zero?

Yes, that is possible, just install from source!


On 2 June 2012 17:12, Aljaž Srebrnič <a2pira...@gmail.com> wrote:
On 02/giu/2012, at 10:56, Sudar Muthu wrote:
>> 2) update to the latest LTS version of the compiler
>
> Can you kindly tell me what you mean my LTS version of the compiler? I
> installed my msp430 toolchain using package manager in ubuntu.

Well, then the package maintainer is a bit late, the latest LTS version is @4.6.3-20120406

>
> Running msp430-gcc --version gives me the following version string
>
> msp430-gcc (GNU GCC patched mspgcc-20110716) 4.5.3
>
>
> With Regards,
> Sudar
>
> http://SudarMuthu.com
> http://twitter.com/sudarmuthu



Aljaž Srebrnič

Sudar Muthu

unread,
Jun 2, 2012, 12:57:52 PM6/2/12
to openc...@googlegroups.com
> Well, then the package maintainer is a bit late, the latest LTS version is @4.6.3-20120406

Thanks for confirming it. Let me try to install the compiler from source.
Reply all
Reply to author
Forward
0 new messages