Re: JFFS2

2018-07-12 Thread Joel Sherrill
On Thu, Jul 12, 2018, 5:51 PM Russell Haley  wrote:

> While this is maybe not a currently viable alternative, it's most likely
> port-able (meaning could be ported) to work with libbsd?
>
> https://en.wikipedia.org/wiki/CHFS
>
> For what it's worth
>

It's worth something. :)

It came up before and I added a ticket so it shows up as a potential
project. It seems to be a good alternative.

>
> Russ
>
> On Thu, Jul 12, 2018 at 1:27 PM, Sebastian Huber <
> sebastian.hu...@embedded-brains.de> wrote:
>
>> Hello,
>>
>> for NAND flashes you can use YAFFS2:
>>
>> https://git.rtems.org/sebh/rtems-yaffs2.git/
>>
>> You need a license for commercial products:
>>
>> https://yaffs.net/yaffs-licence-faqs
>> ___
>> 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: JFFS2

2018-07-12 Thread Russell Haley
While this is maybe not a currently viable alternative, it's most likely
port-able (meaning could be ported) to work with libbsd?

https://en.wikipedia.org/wiki/CHFS

For what it's worth,

Russ

On Thu, Jul 12, 2018 at 1:27 PM, Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> Hello,
>
> for NAND flashes you can use YAFFS2:
>
> https://git.rtems.org/sebh/rtems-yaffs2.git/
>
> You need a license for commercial products:
>
> https://yaffs.net/yaffs-licence-faqs
> ___
> 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: JFFS2

2018-07-12 Thread Sebastian Huber
Hello,

for NAND flashes you can use YAFFS2:

https://git.rtems.org/sebh/rtems-yaffs2.git/

You need a license for commercial products:

https://yaffs.net/yaffs-licence-faqs
___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users


JFFS2

2018-07-12 Thread mbenson
Does JFFS2 provide bad block management and wear leveling?  If so, is there 
anything we need to do to enable it?

Sent from my iPhone
___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users


Re: CPU utilization

2018-07-12 Thread Mathew Benson
I like this idea.  I signed up for the mailing list.  I'll try to submit
something in the next few days.  Thanks.

On Thu, Jul 12, 2018 at 12:56 PM, Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> - Am 12. Jul 2018 um 19:48 schrieb Mathew Benson
> mathew.ben...@gmail.com:
>
> > I assume symbols prefixed with "_" are to be considered part of the
> private
> > API.  What are the guidelines and legalities, if any, of bringing in
> these
> > private symbols into our own code?
>
> Functions, variables, and so on starting with an underscore "_" should
> never be used by application code. If a certain functionality is not
> provided by a public API in RTEMS, then a public API for this functionality
> should be proposed to de...@rtems.org (or via a ticket). It should be
> documented and tested.
> ___
> users mailing list
> users@rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>



-- 
*Mathew Benson*
CEO | Chief Engineer
Windhover Labs, LLC
832-640-4018


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

Re: CPU utilization

2018-07-12 Thread Sebastian Huber
- Am 12. Jul 2018 um 19:48 schrieb Mathew Benson mathew.ben...@gmail.com:

> I assume symbols prefixed with "_" are to be considered part of the private
> API.  What are the guidelines and legalities, if any, of bringing in these
> private symbols into our own code?

Functions, variables, and so on starting with an underscore "_" should never be 
used by application code. If a certain functionality is not provided by a 
public API in RTEMS, then a public API for this functionality should be 
proposed to de...@rtems.org (or via a ticket). It should be documented and 
tested.
___
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users


Re: CPU utilization

2018-07-12 Thread Mathew Benson
I assume symbols prefixed with "_" are to be considered part of the private
API.  What are the guidelines and legalities, if any, of bringing in these
private symbols into our own code?

On Thu, Jul 12, 2018 at 11:10 AM, Fabrício de Novaes Kucinskis <
fabricio.kucins...@inpe.br> wrote:

> Hi Mathew and Joel,
>
>
>
> On the past, I’ve used the following code to get individual task usage and
> monitor tasks behavior through time. It’s completely based on
> rtems_cpu_usage_report_with_plugin and I know it’s not the best way to do
> it, but worked for me 😊.
>
>
>
> Regards,
>
>
>
> Fabrício.
>
>
>
> /**
>
> * Returns the task usage in us. If the taskId is zero, returns the time
> since boot.
>
> * Code based on ‘rtems_cpu_usage_report_with_plugin’.
>
> **/
>
> uint64_t *TasksStatusList::GetCpuUsagePerTask*(*const* rtems_id &taskId)
>
> {
>
> *if* (taskId == 0)
>
> {
>
>*struct* timespec uptime;
>
>*struct* timespec total;
>
>
>
>*rtems_clock_get_uptime*(&uptime);
>
>
> *_Timespec_Subtract*(&CPU_usage_Uptime_at_last_reset,
> &uptime, &total);
>
>
>
>uint64_t totalCpuUsageInUs = (total.tv_sec
> * *static_cast*(100)) + (total.tv_nsec / *static_cast*<
> uint64_t>(1000));
>
>
>
>*return* totalCpuUsageInUs;
>
> }
>
> *else*
>
> {
>
>Objects_Information *ptObjInformation =
> NULL;
>
>Thread_Control
> *ptThread = NULL;
>
>Thread_CPU_usage_t timeRan;
>
>
>
>*for* (uint32_t i = 1; i <=
> OBJECTS_APIS_LAST; i++)
>
>{
>
>*if*
> (!_Objects_Information_table[i])
>
>{
>
>*continue*;
> // that’s ugly, but it works
>
>}
>
>
>
>ptObjInformation =
> _Objects_Information_table[i][1];
>
>
>
>*if* (ptObjInformation !=
> NULL)
>
>{
>
>*for* (
> uint32_t j = 1; j <= ptObjInformation->maximum; j++)
>
>{
>
>
> ptThread = *reinterpret_cast*(ptObjInformation->local_
> table[j]);
>
>
>
>
> *if* (ptThread == NULL)
>
>
> {
>
>
>  *continue*; // still
> ugly, still works
>
>
> }
>
>
>
>
> // if the caller task asks for its own cpu usage, the time since the last
> context switch will not be computed
>
>
> *if* (ptThread->Object.id == taskId)
>
>
> {
>
>
>   timeRan = ptThread->cpu_time_used;
>
>
>
>
>   uint64_t cpuUsageInUs =
> (_Timestamp_Get_seconds(&timeRan) * *static_cast*(100)) +
> (_Timestamp_Get_nanoseconds(&timeRan) / *static_cast*(1000));
>
>
>
>
>   *return* cpuUsageInUs;
>
>
> }
>
>}
>
>}
>
>}
>
>
>
>// if the rtemsId doesn’t exist...
>
>*return* 0;
>
> }
>
> }
>
>
>
> *De:* users [mailto:users-boun...@rtems.org] *Em nome de *Joel Sherrill
> *Enviada em:* quinta-feira, 12 de julho de 2018 11:37
> *Para:* Mathew Benson 
> *Cc:* RTEMS 
> *Assunto:* Re: CPU utilization
>
>
>
>
>
>
>
> On Tue, Jul 10, 2018 at 2:30 PM, Mathew Benson 
> wrote:
>
> What would be the recommend way to read CPU utilization?  Am I correct in
> saying, the best way would be to call rtems_cpu_usage_report_with_plugin()?
> Its ill advised to access the private symbols utilized by the
> rtems_cpu_usage_report_with_plugin() call directly, right?  Is there
> another function that I can call to return a structure rather than parsing
> it with the rtems_printer plugin?  I haven't dug into the rtems_printer
> object yet, but I'm assuming I could use it and parse a string sent to it.
>
>
>
>
>
> Yes. You could use the printer_object passed in to parse it.
>
>
>
> There isn't a call to get this information (yet) and similarly, there
> isn't an
>
> API to get the stack usage.
>
>
>
> Proposals and code welcomed. :)
>
>
>
> --joel
>
>
>
>
> --
>
> *Mathew Benson*
>
> CEO | Chief Engineer
>
> Windhover Labs, LLC
> 832-640-4018
>
> [image:
> https://drive.google.com/a/windhoverlabs.com/uc?id=1cLDczWESrU667xKgEJlFhHa2yjq5UVhJ&export=download]
>
> www.windhoverlabs.com
>
>
> _

RES: CPU utilization

2018-07-12 Thread Fabrício de Novaes Kucinskis
Hi Mathew and Joel,

 

On the past, I’ve used the following code to get individual task usage and 
monitor tasks behavior through time. It’s completely based on 
rtems_cpu_usage_report_with_plugin and I know it’s not the best way to do it, 
but worked for me 😊.

 

Regards,

 

Fabrício.

 

/**

* Returns the task usage in us. If the taskId is zero, returns the time since 
boot.

* Code based on ‘rtems_cpu_usage_report_with_plugin’.

**/

uint64_t TasksStatusList::GetCpuUsagePerTask(const rtems_id &taskId)

{

if (taskId == 0)

{

   struct timespec uptime;

   struct timespec total;

 

   rtems_clock_get_uptime(&uptime);

   
_Timespec_Subtract(&CPU_usage_Uptime_at_last_reset, &uptime, &total);

 

   uint64_t totalCpuUsageInUs = (total.tv_sec * 
static_cast(100)) + (total.tv_nsec / static_cast(1000));

 

   return totalCpuUsageInUs;

}

else

{

   Objects_Information *ptObjInformation = NULL;

   Thread_Control*ptThread 
= NULL;

   Thread_CPU_usage_t timeRan;

 

   for (uint32_t i = 1; i <= OBJECTS_APIS_LAST; i++)

   {

   if 
(!_Objects_Information_table[i])

   {

   continue; // 
that’s ugly, but it works

   }

 

   ptObjInformation = 
_Objects_Information_table[i][1];

 

   if (ptObjInformation != NULL)

   {

   for (uint32_t j 
= 1; j <= ptObjInformation->maximum; j++)

   {

   
ptThread = reinterpret_cast(ptObjInformation->local_table[j]);

 

   
if (ptThread == NULL)

   {


   continue; // still ugly, still works

   }

 

   
// if the caller task asks for its own cpu usage, the time since the last 
context switch will not be computed

   
if (ptThread->Object.id == taskId)

   {


  timeRan = ptThread->cpu_time_used;

 


  uint64_t cpuUsageInUs = (_Timestamp_Get_seconds(&timeRan) * 
static_cast(100)) + (_Timestamp_Get_nanoseconds(&timeRan) / 
static_cast(1000));

 


  return cpuUsageInUs;

   }

   }

   }

   }

 

   // if the rtemsId doesn’t exist...

   return 0;

}

}

 

De: users [mailto:users-boun...@rtems.org] Em nome de Joel Sherrill
Enviada em: quinta-feira, 12 de julho de 2018 11:37
Para: Mathew Benson 
Cc: RTEMS 
Assunto: Re: CPU utilization

 

 

 

On Tue, Jul 10, 2018 at 2:30 PM, Mathew Benson < 
 mben...@windhoverlabs.com> wrote:

What would be the recommend way to read CPU utilization?  Am I correct in 
saying, the best way would be to call rtems_cpu_usage_report_with_plugin()?  
Its ill advised to access the private symbols utilized by the 
rtems_cpu_usage_report_with_plugin() call directly, right?  Is there another 
function that I can call to return a structure rather than parsing it with the 
rtems_printer plugin?  I haven't dug into the rtems_printer object yet, but I'm 
assuming I could use it and parse a string sent to it.

 

 

Yes. You could use the printer_object passed in to parse it. 

 

There isn't a call to get this information (yet) and similarly, there isn't an

API to get the stack usage. 

 

Proposals 

Re: CPU utilization

2018-07-12 Thread Joel Sherrill
On Tue, Jul 10, 2018 at 2:30 PM, Mathew Benson 
wrote:

> What would be the recommend way to read CPU utilization?  Am I correct in
> saying, the best way would be to call rtems_cpu_usage_report_with_plugin()?
> Its ill advised to access the private symbols utilized by the
> rtems_cpu_usage_report_with_plugin() call directly, right?  Is there
> another function that I can call to return a structure rather than parsing
> it with the rtems_printer plugin?  I haven't dug into the rtems_printer
> object yet, but I'm assuming I could use it and parse a string sent to it.
>
>
Yes. You could use the printer_object passed in to parse it.

There isn't a call to get this information (yet) and similarly, there isn't
an
API to get the stack usage.

Proposals and code welcomed. :)

--joel


>
> --
> *Mathew Benson*
> CEO | Chief Engineer
> Windhover Labs, LLC
> 832-640-4018
>
>
> www.windhoverlabs.com
>
>
> ___
> 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