Movatterモバイル変換


[0]ホーム

URL:


EmbeddedRelated.com
Forums
The 2026 Embedded Online Conference
   Forums    More Forums   comp.arch.embedded  

Where is "uint16x8_t" defined?

Started byUnknownJanuary 24, 2014
Hi,I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a Linaro toolchain works well for some time. Recently, I begin to write NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although the project can build, the eclipse complains these variables unresolved. I have tried many settings on eclipse, but I fail.One on line snippet uses header <stdint.h> with those uint variables. But on my Ubuntu, I do not find those declarations in several stdint.h files. I am working on a Cortex-A8 project. Could you help me to solve this problem?Thanks,
Reply byRobert WesselJanuary 24, 20142014-01-24
On Fri, 24 Jan 2014 13:43:18 -0800 (PST), rxjwg98@gmail.com wrote:
>Hi,>I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a Linaro toolchain works well for some time. Recently, I begin to write NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although the project can build, the eclipse complains these variables unresolved. I have tried many settings on eclipse, but I fail.>>One on line snippet uses header <stdint.h> with those uint variables. But on my Ubuntu, I do not find those declarations in several stdint.h files. I am working on a Cortex-A8 project. Could you help me to solve this problem?
You probably need to compile with -mfpu=neon and include arm_neon.h
Reply byJanuary 24, 20142014-01-24
On Friday, January 24, 2014 4:50:22 PM UTC-5, robert...@yahoo.com wrote:
> On Fri, 24 Jan 2014 13:43:18 -0800 (PST), rxjwg98@gmail.com wrote:> > > > >Hi,> > >I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a Linaro toolchain works well for some time. Recently, I begin to write NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although the project can build, the eclipse complains these variables unresolved. I have tried many settings on eclipse, but I fail.> > >> > >One on line snippet uses header <stdint.h> with those uint variables. But on my Ubuntu, I do not find those declarations in several stdint.h files. I am working on a Cortex-A8 project. Could you help me to solve this problem?> > > > > > You probably need to compile with -mfpu=neon and include arm_neon.h
Excuse me. I do have those two settings in the build. In fact, the build succeeds, but eclipse does not know those variables. Thanks.
Reply byJanuary 24, 20142014-01-24
On Friday, January 24, 2014 4:50:22 PM UTC-5, robert...@yahoo.com wrote:
> On Fri, 24 Jan 2014 13:43:18 -0800 (PST), rxjwg98@gmail.com wrote:> > > > >Hi,> > >I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a Linaro toolchain works well for some time. Recently, I begin to write NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although the project can build, the eclipse complains these variables unresolved. I have tried many settings on eclipse, but I fail.> > >> > >One on line snippet uses header <stdint.h> with those uint variables. But on my Ubuntu, I do not find those declarations in several stdint.h files. I am working on a Cortex-A8 project. Could you help me to solve this problem?> > > > > > You probably need to compile with -mfpu=neon and include arm_neon.h
Because the build can succeed, I would like to find the true declaration of those variables. The stdint.h under the cross tool chain has such short contents:#ifndef _GCC_WRAP_STDINT_H#if __STDC_HOSTED__# include_next <stdint.h>#else# include "stdint-gcc.h"#endif#define _GCC_WRAP_STDINT_H#endifI still do not know where those variables are declared.
Reply byJanuary 24, 20142014-01-24
On Friday, January 24, 2014 4:50:22 PM UTC-5, robert...@yahoo.com wrote:
> On Fri, 24 Jan 2014 13:43:18 -0800 (PST), rxjwg98@gmail.com wrote:> > > > >Hi,> > >I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a Linaro toolchain works well for some time. Recently, I begin to write NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although the project can build, the eclipse complains these variables unresolved. I have tried many settings on eclipse, but I fail.> > >> > >One on line snippet uses header <stdint.h> with those uint variables. But on my Ubuntu, I do not find those declarations in several stdint.h files. I am working on a Cortex-A8 project. Could you help me to solve this problem?> > > > > > You probably need to compile with -mfpu=neon and include arm_neon.h
The weird thing is that there are many similar variables in arm_neon.h, see below please. But it has no clue where those variables declared. Do you have some ideas?Below are excerpt from arm_neon.h:#ifndef _GCC_ARM_NEON_H#define _GCC_ARM_NEON_H 1typedef struct int8x8x2_t{ int8x8_t val[2];} int8x8x2_t;typedef struct int8x16x2_t{ int8x16_t val[2];} int8x16x2_t;typedef struct int16x4x2_t{ int16x4_t val[2];} int16x4x2_t;typedef struct int16x8x2_t{ int16x8_t val[2];} int16x8x2_t;typedef struct int32x2x2_t{ int32x2_t val[2];} int32x2x2_t;
Reply byRobert WesselJanuary 24, 20142014-01-24
On Fri, 24 Jan 2014 14:27:22 -0800 (PST), rxjwg98@gmail.com wrote:
>On Friday, January 24, 2014 4:50:22 PM UTC-5, robert...@yahoo.com wrote:>> On Fri, 24 Jan 2014 13:43:18 -0800 (PST), rxjwg98@gmail.com wrote:>> >> >> >> >Hi,>> >> >I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a Linaro toolchain works well for some time. Recently, I begin to write NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although the project can build, the eclipse complains these variables unresolved. I have tried many settings on eclipse, but I fail.>> >> >>> >> >One on line snippet uses header <stdint.h> with those uint variables. But on my Ubuntu, I do not find those declarations in several stdint.h files. I am working on a Cortex-A8 project. Could you help me to solve this problem?>> >> >> >> >> >> You probably need to compile with -mfpu=neon and include arm_neon.h>>The weird thing is that there are many similar variables in arm_neon.h, see below please. But it has no clue where those variables declared. Do you have some ideas?>>>>>Below are excerpt from arm_neon.h:>>>#ifndef _GCC_ARM_NEON_H>#define _GCC_ARM_NEON_H 1>>>typedef struct int8x8x2_t>{> int8x8_t val[2];>} int8x8x2_t;>>typedef struct int8x16x2_t>{> int8x16_t val[2];>} int8x16x2_t;>>typedef struct int16x4x2_t>{> int16x4_t val[2];>} int16x4x2_t;>>typedef struct int16x8x2_t>{> int16x8_t val[2];>} int16x8x2_t;>>typedef struct int32x2x2_t>{> int32x2_t val[2];>} int32x2x2_t;
Sure, they declare different SIMD (vector) types. You are, after all,using the Neon SIMD stuff. int16x4_t for example, is a four element(lane) vector of 16 bit ints. int16x4x2_t is an array of two ofthose. The others follow basically the same pattern.http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/BABDFJCI.html
Reply byRobert WesselJanuary 24, 20142014-01-24
On Fri, 24 Jan 2014 14:20:34 -0800 (PST), rxjwg98@gmail.com wrote:
>On Friday, January 24, 2014 4:50:22 PM UTC-5, robert...@yahoo.com wrote:>> On Fri, 24 Jan 2014 13:43:18 -0800 (PST), rxjwg98@gmail.com wrote:>> >> >> >> >Hi,>> >> >I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a Linaro toolchain works well for some time. Recently, I begin to write NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although the project can build, the eclipse complains these variables unresolved. I have tried many settings on eclipse, but I fail.>> >> >>> >> >One on line snippet uses header <stdint.h> with those uint variables. But on my Ubuntu, I do not find those declarations in several stdint.h files. I am working on a Cortex-A8 project. Could you help me to solve this problem?>> >> >> >> >> >> You probably need to compile with -mfpu=neon and include arm_neon.h>>Because the build can succeed, I would like to find the true declaration of those variables. The stdint.h under the cross tool chain has such short contents:>>>#ifndef _GCC_WRAP_STDINT_H>#if __STDC_HOSTED__># include_next <stdint.h>>#else># include "stdint-gcc.h">#endif>#define _GCC_WRAP_STDINT_H>#endif>>I still do not know where those variables are declared.
In arm_neon.h?
Reply byMike PerkinsJanuary 24, 20142014-01-24
On 24/01/2014 22:51, Robert Wessel wrote:
> On Fri, 24 Jan 2014 14:27:22 -0800 (PST), rxjwg98@gmail.com wrote:>>> On Friday, January 24, 2014 4:50:22 PM UTC-5, robert...@yahoo.com wrote:>>> On Fri, 24 Jan 2014 13:43:18 -0800 (PST), rxjwg98@gmail.com wrote:>>>>>>>>>>>>> Hi,>>>>>>> I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a Linaro toolchain works well for some time. Recently, I begin to write NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although the project can build, the eclipse complains these variables unresolved. I have tried many settings on eclipse, but I fail.>>>>>>>>>>>>>> One on line snippet uses header <stdint.h> with those uint variables. But on my Ubuntu, I do not find those declarations in several stdint.h files. I am working on a Cortex-A8 project. Could you help me to solve this problem?>>>>>>>>>>>>>>>>>> You probably need to compile with -mfpu=neon and include arm_neon.h>>>> The weird thing is that there are many similar variables in arm_neon.h, see below please. But it has no clue where those variables declared. Do you have some ideas?>>>>>>>>>> Below are excerpt from arm_neon.h:>>>>>> #ifndef _GCC_ARM_NEON_H>> #define _GCC_ARM_NEON_H 1>>>>>> typedef struct int8x8x2_t>> {>> int8x8_t val[2];>> } int8x8x2_t;>>>> typedef struct int8x16x2_t>> {>> int8x16_t val[2];>> } int8x16x2_t;>>>> typedef struct int16x4x2_t>> {>> int16x4_t val[2];>> } int16x4x2_t;>>>> typedef struct int16x8x2_t>> {>> int16x8_t val[2];>> } int16x8x2_t;>>>> typedef struct int32x2x2_t>> {>> int32x2_t val[2];>> } int32x2x2_t;>>> Sure, they declare different SIMD (vector) types. You are, after all,> using the Neon SIMD stuff. int16x4_t for example, is a four element> (lane) vector of 16 bit ints. int16x4x2_t is an array of two of> those. The others follow basically the same pattern.>>http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/BABDFJCI.html
I don't believe that is rxjwg98's issue. Eclipse has its own syntax checker and is quite good at highlighting trivial hard to find mistakes with big consequences. I presume that eclipse doesn't understand uint16x8_t and the like and throwing a small wobbly.To include the likes of "uint16x8_t" you need to find the appropriate header file, I assume "arm_neon.h" in this case and add it to the include directories path in:Project > C/C++ General > Paths and Symbols > Includes (or library paths)My recollection is a little hazy so I may be wrong.-- Mike PerkinsVideo Solutions Ltdwww.videosolutions.ltd.uk
Reply byTim WescottJanuary 25, 20142014-01-25
On Fri, 24 Jan 2014 14:09:52 -0800, rxjwg98 wrote:
> On Friday, January 24, 2014 4:50:22 PM UTC-5, robert...@yahoo.com wrote:>> On Fri, 24 Jan 2014 13:43:18 -0800 (PST), rxjwg98@gmail.com wrote:>> >> >> >> >Hi,>> >> >I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a>> >Linaro toolchain works well for some time. Recently, I begin to write>> >NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although>> >the project can build, the eclipse complains these variables>> >unresolved. I have tried many settings on eclipse, but I fail.>> >> >> >>> >One on line snippet uses header <stdint.h> with those uint variables.>> >But on my Ubuntu, I do not find those declarations in several stdint.h>> >files. I am working on a Cortex-A8 project. Could you help me to solve>> >this problem?>> >> >> >> >> >> You probably need to compile with -mfpu=neon and include arm_neon.h> > Excuse me. I do have those two settings in the build. In fact, the build> succeeds, but eclipse does not know those variables. Thanks.
Eclipse is easily confused, sometimes, and it's a pain to un-confuse it. I figure that the compiler has the final word on what's what.In general, if Eclipse things you're writing for your platform when you're writing for embedded, it's going to be looking at entirely the wrong set of header files, which helps it to get confused. If you really want to flog things, figure out how to point it at your tool chain's header files.-- Tim WescottControl system and signal processing consultingwww.wescottdesign.com
Reply byDavid BrownJanuary 25, 20142014-01-25
On 25/01/14 06:11, Tim Wescott wrote:
> On Fri, 24 Jan 2014 14:09:52 -0800, rxjwg98 wrote:>>> On Friday, January 24, 2014 4:50:22 PM UTC-5, robert...@yahoo.com wrote:>>> On Fri, 24 Jan 2014 13:43:18 -0800 (PST), rxjwg98@gmail.com wrote:>>>>>>>>>>>>> Hi,>>>>>>> I program on Ubuntu 12.04, 32bit for some ARM projects. On Ubuntu, a>>>> Linaro toolchain works well for some time. Recently, I begin to write>>>> NEON code. Some on line code uses uint16x8_t, uint32x4_t etc. Although>>>> the project can build, the eclipse complains these variables>>>> unresolved. I have tried many settings on eclipse, but I fail.>>>>>>>>>>>>>> One on line snippet uses header <stdint.h> with those uint variables.>>>> But on my Ubuntu, I do not find those declarations in several stdint.h>>>> files. I am working on a Cortex-A8 project. Could you help me to solve>>>> this problem?>>>>>>>>>>>>>>>>>> You probably need to compile with -mfpu=neon and include arm_neon.h>>>> Excuse me. I do have those two settings in the build. In fact, the build>> succeeds, but eclipse does not know those variables. Thanks.>> Eclipse is easily confused, sometimes, and it's a pain to un-confuse it.> I figure that the compiler has the final word on what's what.>> In general, if Eclipse things you're writing for your platform when> you're writing for embedded, it's going to be looking at entirely the> wrong set of header files, which helps it to get confused. If you really> want to flog things, figure out how to point it at your tool chain's> header files.>
I find I can usually get /most/ things to work in Eclipse by getting the include paths for the Eclipse project to match the real include paths for the compiler. But it's not uncommon that there are a few points that don't work, such as pre-defined macros in the compiler, or compiler extensions that the IDE doesn't know about. I solve these by making a defined symbol ECLIPSE in the project setup for the IDE, but not in the Makefile used for actual compilation. Then I have an include file that has Eclipse-friendly "definitions" of the items in question, surrounded by an #ifdef ECLIPSE / #endif pair. If you are using Eclipse's project manager to handle the build (I don't - I much prefer an external Makefile) then you can do the opposite - add a compiler flag "-DNOT_ECLIPSE" or similar.The same trick is very often used for Doxygen.
Previous12
The 2026 Embedded Online Conference

Sign in

Forgot username or password?  | Create account

Search forums

Free PDF Downloads

Memory allocation in C
Introduction to Arduino
Beginning Microcontrollers with the MSP430 - Tutorial

Blogs - Hall of Fame

So You Want To Be An Embedded Systems Developer

So You Want To Be AnEmbedded Systems Developer
Steve Branam

Introduction to Microcontrollers

Introduction toMicrocontrollers
Mike Silva

Important Programming Concepts (Even on Embedded Systems)

ImportantProgramming Concepts (Even on Embedded Systems)
Jason Sachs

How FPGAs Work and Why You'll Buy One

HowFPGAs Work and Why You'll Buy One
Yossi Krenin

MSP430 Launchpad Tutorial

MSP430 Launchpad Tutorial
Enrico Garante

Arduino Robotics

Arduino Robotics
Lonnie Honeycutt

Discussion Groups

Quick Links

About EmbeddedRelated.com

The Related Sites

Login

Before you can participate to the *related sites forums, you need to login orcreate an account.



Create free account |Forgot password?




I agree with theterms of use andprivacy policy.

Yes, I want to subscribe to your world famous newsletter and see for myself how great it is. I also understand that I can unsubscribe VERY easily!

[8]ページ先頭

©2009-2026 Movatter.jp