Re: the difference between posix user and c user

2018-01-11 Thread Sebastian Huber

On 12/01/18 02:28, Russell Haley wrote:

On Wed, Jan 10, 2018 at 8:50 AM, Gedare Bloom  wrote:

On Thu, Dec 28, 2017 at 9:35 PM,bin.w...@qkmtech.com
  wrote:

is the posix api and the c api used together?


POSIX and ISO-C tend to go together.

With RTEMS, you can also use ISO-C with the "Classic API", which
consists of interface functions accessible from C programs as
described in the "C User Guide".


sorry . i am also confused about this two things . because i find that when
i config the rtems kernel ,there is a option which is  --enable posix.


Most new development and ports of existing software probably use POSIX
anyway, except for the simplest applications. This configure option
was provided historically as a way to avoid compiling the POSIX
library into an application, but modern compilers are able to remove
the unused code any way.

I really liked the cleanliness of the "Classic API". Are there
limitations to it? Is there an advantage to the POSIX API other than
compatibility? (I just threw up a little in my mouth)

Is the Classic API going to be fully supported going forward?


We removed already some Classic API functions in RTEMS 4.11 and 5. See 
the "Deprecated and Removed Directives" section in the manual, e.g.


https://docs.rtems.org/branches/master/c-user/task_manager.html#deprecated-and-removed-directives

I guess the remaining Classic API will only change if we start to 
support quantum computers.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Re: Device Interrupt Handler CPU Load Anaysis Method.

2018-01-11 Thread Sebastian Huber

On 12/01/18 02:38, Thomas Kim wrote:

Dear Sir,

As I checked until now, thread(task, pthread) cpu load analysis method 
using "cpuuse" is perfect !


At this time, I am doing multiple device interrupt hander stress 
testing. but, there is not CPU load anaysis method about multiple 
device interrupt handler.


Is there any method for checking CPU load about multiple device 
interrupt handlers ?


The is limited support for this. You can try to use enable the profiling 
option:


cpukit/sapi/include/rtems/profiling.h

For interrupt profiling a BSP support is necessary. I think it is only 
implemented on ARM, PowerPC and SPARC currently.


The RTEMS trace linker is also an option.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Device Interrupt Handler CPU Load Anaysis Method.

2018-01-11 Thread Thomas Kim
Dear Sir,

As I checked until now, thread(task, pthread) cpu load analysis method
using "cpuuse" is perfect !

At this time, I am doing multiple device interrupt hander stress testing.
but, there is not CPU load anaysis method about multiple device interrupt
handler.

Is there any method for checking CPU load about multiple device interrupt
handlers ?

Best Regards,
Thomas Kim
___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Re: Re: the difference between posix user and c user

2018-01-11 Thread Russell Haley
On Wed, Jan 10, 2018 at 8:50 AM, Gedare Bloom  wrote:
> On Thu, Dec 28, 2017 at 9:35 PM, bin.w...@qkmtech.com
>  wrote:
>> is the posix api and the c api used together?
>>
> POSIX and ISO-C tend to go together.
>
> With RTEMS, you can also use ISO-C with the "Classic API", which
> consists of interface functions accessible from C programs as
> described in the "C User Guide".
>
>> sorry . i am also confused about this two things . because i find that when
>> i config the rtems kernel ,there is a option which is  --enable posix.
>>
> Most new development and ports of existing software probably use POSIX
> anyway, except for the simplest applications. This configure option
> was provided historically as a way to avoid compiling the POSIX
> library into an application, but modern compilers are able to remove
> the unused code any way.

I really liked the cleanliness of the "Classic API". Are there
limitations to it? Is there an advantage to the POSIX API other than
compatibility? (I just threw up a little in my mouth)

Is the Classic API going to be fully supported going forward?

Russ

>> 
>> bin.w...@qkmtech.com
>>
>>
>> From: bin.w...@qkmtech.com
>> Date: 2017-12-29 09:25
>> To: Chris Johns; Users
>> Subject: Re: Re: the difference between posix user and c user
>> i google the posix .now i know that posix is the abbreviation of "the
>> Portable Operating System Interface" it is for software compatibility with
>> variants of Unix and other operating systems
>>
>> but you said, "POSIX and the Classic API are both C APIs."
>> than i think the posix is packaged on the basis of the standard C, is it
>> right ?
>> the classic api is the standard c interface , is it right?
>>
>> best wishes
>>
>> 
>> bin.w...@qkmtech.com
>>
>>
>> From: Chris Johns
>> Date: 2017-12-29 02:18
>> To: users
>> Subject: Re: the difference between posix user and c user
>> On 29/12/17 12:00 am, bin.w...@qkmtech.com wrote:
>>> hi everyone:
>>>
>>> i am new to linux and rtems. i do not understand
>>> what the difference between posix user and c user .
>>>
>>> i am confused about these two concept. which condition i should choose
>>> posix ?
>>> which condition i should choose c ?
>>>
>>
>> This is a good question and it is understandable why you do not understand
>> the
>> difference. The reason is specific to RTEMS and relates to it's history.
>>
>> The original RTEMS was written in Ada and C and the C API is what we now
>> call
>> the Classic API. It's manual was called the C User Guide hence the name.
>>
>> The Ada version of RTEMS was removed from the source tree and POSIX came a
>> while
>> later.
>>
>> POSIX and the Classic API are both C APIs. The C User manual is now called
>> the
>> RTEMS Classic API Guide. See:
>>
>> https://docs.rtems.org/
>>
>> Chris
>> ___
>> users mailing list
>> users@rtems.org
>> http://lists.rtems.org/mailman/listinfo/users
>>
>>
>> ___
>> users mailing list
>> users@rtems.org
>> http://lists.rtems.org/mailman/listinfo/users
> ___
> users mailing list
> users@rtems.org
> http://lists.rtems.org/mailman/listinfo/users
___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users


Re: Re: smp support

2018-01-11 Thread bin.w...@qkmtech.com
Did you add an extra > character for your response? It is messing with
my email client, which interprets these as "reply" nesting...

> sorry , i will  add an extra > character for my response on later reply. 
>i have know what you said ,thank you very much 



bin.w...@qkmtech.com
 
From: Gedare Bloom
Date: 2018-01-11 23:09
To: bin.w...@qkmtech.com
CC: Chris Johns; Users
Subject: Re: Re: smp support
On Wed, Jan 10, 2018 at 8:48 PM, bin.w...@qkmtech.com
 wrote:
>
>> another question:
>>
>>  if i use the smp configuration macro define,am i still need to do the
>> mutiprocessor configuration macro define  for  confdef.h ?
>>
> With SMP you have to enable SMP when you configure/build RTEMS, and
> you need to provide the CPP configuration macros to set up the SMP
> system and schedulers.
>
>>> what the CPP means?
C Preprocessor.
 
Did you add an extra > character for your response? It is messing with
my email client, which interprets these as "reply" nesting...
 
>>>in CONFIGURING A SYSTEM chapter in c user doc, i find the two
>>> configurations items .  one is 24.22 SMP Specific Configuration Parameters
>>> ,another is 24.24 Multiprocessing Configuration
>>>what i want to ask is if i want to use smp, do i need use the
>>> Multiprocessing Configuration?  or i just need use SMP Specific
>>> Configuration Parameters and do not need care about >>the Multiprocessing
>>> Configuration.
 
You do not need to care about Multiprocessing Configuration.
 
>
> "SMP means all cores are treated equally by the operating system."
> "AMP means cores are not treated the same by the OS, which can cover a lot
> of heterogeneous behavior."
>>>i know what you said
>>>so the basic problem which confused me is the difference betweent
>>> Multiprocessing Configuration and SMP Configuration,  not the concept of amp
>>> and smp
>>>in my point of view ,no matter AMP or  SMP is  all called Multiprocessing
>>> because they all use the muticore .is it right ? so if i want to use AMP
>>> mode ,than i need >>just Multiprocessing Configuration?
 
There is not support for AMP out of the box with RTEMS as far as I
know. This "Multiprocessing Configuration" stuff is about how to run a
distributed system of multiple RTEMS images, one on each processor,
that share a global object namespace. It is not the same as how to run
a single RTEMS image that manages multiple processors.
 
>>>if i want to use SMP mode,than i need Multiprocessing Configuration and
>>> SMP Configuration ?
>
>
>
>
>
> 
> bin.w...@qkmtech.com
>
>
> From: Gedare Bloom
> Date: 2018-01-11 00:43
> To: bin.w...@qkmtech.com
> CC: Chris Johns; Users
> Subject: Re: Re: smp support
> On Fri, Dec 29, 2017 at 3:55 AM, bin.w...@qkmtech.com
>  wrote:
>> thanks
>>
>> but i still confused about the smp configuration and the mutiprocessor
>> configuration .
>>
>> for example. for zynq ,they has two arm core.   if i use the mutiprocessor
>> configuration , Is  rtems  use the two cores in amp mode ? is the rtems
>> manage the two cores? if rtems manages two cores,i think it is in smp mode
>> because  i think the concept of smp mode  is the one system can manage
>> muticores which are  same cpu architecture。this is conflictive for my
>> point
>> of view
>>
> SMP means all cores are treated equally by the operating system.
>
> AMP means cores are not treated the same by the OS, which can cover a
> lot of heterogeneous behavior.
>
> RTEMS provides SMP capability.
>
>>  i think amp mode is rtems run in one core, another core is bare-metal or
>> linux. but the mutiprocessor configuration let me confused, it said as
>> follows
>>
>> "The RTEMS multiprocessor execution model is multiple instruction streams
>> with multiple data
>> streams (MIMD). This execution model has each of the processors executing
>> code independent
>> of the other processors. Because of this parallelism, the application
>> designer can more easily
>> guarantee deterministic behavior."
>>
> This statement is true regardless of SMP/AMP: in either case, program
> code runs independent of other processors.
>
>> is it means one rtems system instance run in one core ,and another rtems
>> system instance  run in another core? and they can excute code
>> independent?
>> sorry, i think maybe i have some concept confused
>>
> One RTEMS instances executes across both cores, and both cores can
> execute code independent. It is possible for both cores to be
> executing OS functions simultaneously, or one core to execute OS code
> while another runs application, or both cores to execute application
> code in parallel.
>
>> if just one rtems run in two core , how to put code into different core to
>> run ? how to realize the parrallelism?
>>
> If you select RTEMS with SMP and provide scheduler with two cores, the
> scheduler will assign tasks/threads to the cores according to its
> scheduler policy/algorithm.
>
>> another question:
>>
>>  if i use the smp configuration 

RTEMS on QEMU for raspberry pi 1

2018-01-11 Thread Raphaël TILLET
Hello all,

Since the last 3 days, I try unsuccessfully to execute a RTEMS exe (hello.exe 
or Ticker.exe) on QEMU for raspberry pi 1.

I tried the following command , but the screen stays always black :
qemu-system-arm -M raspi \
-serial stdio \ 
-kernel hello.exe

I did the same for a raspberrypi2, with the compilation of the right BSP, and 
by using the « -M raspi2 » option in the QEMU command line, and it works fine-> 
The screen display output messages.

For rPi1, I tried several tricks and tips, but none of them work :
- Such as convert the EXE to a kernel image through mkimage,
- Change the START_ADRR
- …..

Any idea or suggestion ?

Thanks for your time.
Raphaël.


___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Re: Re: smp support

2018-01-11 Thread Gedare Bloom
On Wed, Jan 10, 2018 at 8:48 PM, bin.w...@qkmtech.com
 wrote:
>
>> another question:
>>
>>  if i use the smp configuration macro define,am i still need to do the
>> mutiprocessor configuration macro define  for  confdef.h ?
>>
> With SMP you have to enable SMP when you configure/build RTEMS, and
> you need to provide the CPP configuration macros to set up the SMP
> system and schedulers.
>
>>> what the CPP means?
C Preprocessor.

Did you add an extra > character for your response? It is messing with
my email client, which interprets these as "reply" nesting...

>>>in CONFIGURING A SYSTEM chapter in c user doc, i find the two
>>> configurations items .  one is 24.22 SMP Specific Configuration Parameters
>>> ,another is 24.24 Multiprocessing Configuration
>>>what i want to ask is if i want to use smp, do i need use the
>>> Multiprocessing Configuration?  or i just need use SMP Specific
>>> Configuration Parameters and do not need care about >>the Multiprocessing
>>> Configuration.

You do not need to care about Multiprocessing Configuration.

>
> "SMP means all cores are treated equally by the operating system."
> "AMP means cores are not treated the same by the OS, which can cover a lot
> of heterogeneous behavior."
>>>i know what you said
>>>so the basic problem which confused me is the difference betweent
>>> Multiprocessing Configuration and SMP Configuration,  not the concept of amp
>>> and smp
>>>in my point of view ,no matter AMP or  SMP is  all called Multiprocessing
>>> because they all use the muticore .is it right ? so if i want to use AMP
>>> mode ,than i need >>just Multiprocessing Configuration?

There is not support for AMP out of the box with RTEMS as far as I
know. This "Multiprocessing Configuration" stuff is about how to run a
distributed system of multiple RTEMS images, one on each processor,
that share a global object namespace. It is not the same as how to run
a single RTEMS image that manages multiple processors.

>>>if i want to use SMP mode,than i need Multiprocessing Configuration and
>>> SMP Configuration ?
>
>
>
>
>
> 
> bin.w...@qkmtech.com
>
>
> From: Gedare Bloom
> Date: 2018-01-11 00:43
> To: bin.w...@qkmtech.com
> CC: Chris Johns; Users
> Subject: Re: Re: smp support
> On Fri, Dec 29, 2017 at 3:55 AM, bin.w...@qkmtech.com
>  wrote:
>> thanks
>>
>> but i still confused about the smp configuration and the mutiprocessor
>> configuration .
>>
>> for example. for zynq ,they has two arm core.   if i use the mutiprocessor
>> configuration , Is  rtems  use the two cores in amp mode ? is the rtems
>> manage the two cores? if rtems manages two cores,i think it is in smp mode
>> because  i think the concept of smp mode  is the one system can manage
>> muticores which are  same cpu architecture。this is conflictive for my
>> point
>> of view
>>
> SMP means all cores are treated equally by the operating system.
>
> AMP means cores are not treated the same by the OS, which can cover a
> lot of heterogeneous behavior.
>
> RTEMS provides SMP capability.
>
>>  i think amp mode is rtems run in one core, another core is bare-metal or
>> linux. but the mutiprocessor configuration let me confused, it said as
>> follows
>>
>> "The RTEMS multiprocessor execution model is multiple instruction streams
>> with multiple data
>> streams (MIMD). This execution model has each of the processors executing
>> code independent
>> of the other processors. Because of this parallelism, the application
>> designer can more easily
>> guarantee deterministic behavior."
>>
> This statement is true regardless of SMP/AMP: in either case, program
> code runs independent of other processors.
>
>> is it means one rtems system instance run in one core ,and another rtems
>> system instance  run in another core? and they can excute code
>> independent?
>> sorry, i think maybe i have some concept confused
>>
> One RTEMS instances executes across both cores, and both cores can
> execute code independent. It is possible for both cores to be
> executing OS functions simultaneously, or one core to execute OS code
> while another runs application, or both cores to execute application
> code in parallel.
>
>> if just one rtems run in two core , how to put code into different core to
>> run ? how to realize the parrallelism?
>>
> If you select RTEMS with SMP and provide scheduler with two cores, the
> scheduler will assign tasks/threads to the cores according to its
> scheduler policy/algorithm.
>
>> another question:
>>
>>  if i use the smp configuration macro define,am i still need to do the
>> mutiprocessor configuration macro define  for  confdef.h ?
>>
> With SMP you have to enable SMP when you configure/build RTEMS, and
> you need to provide the CPP configuration macros to set up the SMP
> system and schedulers.
>
>> 
>> bin.w...@qkmtech.com
>>
>>
>> From: Chris Johns
>> Date: 2017-12-29 14:21
>> To: