Picon

Static Code Analysis

I have just started doing some static code analysis on the code base and am putting the results as I do runs up at
https://s3.amazonaws.com/omb-nuttx-static/index.html


right now this is just the results of the sim/nsh example.  There are a few things that could be fixed for corner cases that are unlikely to happen.  I expect that as I enable more network and app testing more bugs will pop up.

I am going to see about getting clang to work against some arm ports but that is a little more work.

--Brennan


__._,_.___
Posted by: Brennan Ashton <bashton-0oLt8/ynpYLymLLLnPiPsAC/G2K4zDHf@public.gmane.org>



__,_._,___
Picon

[HELP] Cannot make nuttx on teensy-lc

Hello,


I'm frustrated because I spend like many hours to make nuttx work for teensy-lc and still no success !


I follow the read me file but and when I try to make nuttx , I've got this error :


arm-none-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
ERROR: arm-none-eabi-gcc failed: 1
       command: arm-none-eabi-gcc -M -fno-builtin -Wall -Wstrict-prototypes -Wshadow -g -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -mcpu=cortex-m0 -mthumb -march=armv6-m -mfloat-abi=soft -I. -isystem /home/max/Nuttxworkspace/nuttx/include -D__KERNEL__ -pipe ./bu iltin.c
Makefile:119: recipe for target '.depend' failed


What happened ? :( 


I'm pretty newbie with RTOS and Linux and I don't have 5Go of space to make it on Windows ... 


info : I uses a Linux Jessie 64 bit on virtual machine




__._,_.___
Posted by: zmax1234-/E1597aS9LQAvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

sem_wait: assert in ISR context



Hello.

I'm trying to port one of the Faraday's based device (Moxa NP51x0-series) to the NuttX. And I've faced a problem with network driver on one of poll expirity event.

My repos:
https://github.com/ya-mouse/nuttx

https://github.com/ya-mouse/nuttx-boards

https://github.com/ya-mouse/nuttx-arch

The bootlog:
http://pastebin.com/aDkr8CXL

The binary:

http://mayc.ru/nuttx-np51x0.elf


Right after the devif_timer() called in ftmac100_poll_expiry() the Assertion takes place. The ftmac100_poll_expiry() has been called in ISR context (current_regs is not NULL). Regarding to IRQ STATUS register it's a Timer interrupt. I use Timer0 in MoxaRT for ticks source.


A bit more on IRQ status:


ftmac100_poll_expiry: POLLTEXPIRY: 0003a450 00000000
ftmac100_poll_expiry:
=============================================================
ftmac100_poll_expiry: TM CNTL=00000003 INTRS=00000003 MASK=000001fe LOAD=00000000 COUNT=00000000 M1=00000000
ftmac100_poll_expiry: IRQ STATUS=00080000 MASK=82080000 MODE=80080000 LEVEL=00000000
ftmac100_poll_expiry: FIQ STATUS=00000000 MASK=00000000 MODE=00000000 LEVEL=00080400
ftmac100_poll_expiry: =============================================================
ftmac100_poll_expiry: SYSTIMER: 00000095
up_assert: Assertion failed at file:semaphore/sem_wait.c line: 105



I fight for two days to solve this issue and doesn't have any ideas…


Any help would be appreciate!



__._,_.___
Posted by: mouse <at> mayc.ru



__,_._,___
Picon

Nuttx library

Hi Greg,


I am trying to built Nuttx as a library. I have done some changes but its not working.


Please tell me how to make NUTTX as a single library. 

What are the makefile changes to be done for this 



Thanx a lot !!



__._,_.___
Posted by: rohitsaraf733-/E1597aS9LQAvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

Wiki link broken

Link for FreeModBus is broken on homepage, since BerliOS has closed [1]:
"ModBus support provided by built-in FreeModBus version 1.5.0."

I had a look on SF but couldn't be sure if it was there. Same for
Github. Maybe someone more familiar can conclusively say if the project
has been moved and where.

[1]: https://en.wikipedia.org/wiki/BerliOS#Closure

-- 
    SP

------------------------------------
Posted by: SP <sp@...>
------------------------------------

------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/nuttx/join
    (Yahoo! ID required)

<*> To change settings via email:
    nuttx-digest@... 
    nuttx-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    nuttx-unsubscribe@...

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Picon

arch/ submodule split

Hello Greg,

you probably have good reasons to do that, but I was surprised by the recent
arch/ split into a submodule.

I was thinking that architectures were a vital part of NuttX, since they contain
important drivers, initialization code, and such.

Best regards,

-- 
S├ębastien Lorquet

------------------------------------
Posted by: Sebastien Lorquet <sebastien@...>
------------------------------------

------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/nuttx/join
    (Yahoo! ID required)

<*> To change settings via email:
    nuttx-digest@... 
    nuttx-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    nuttx-unsubscribe@...

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Picon

User provided irq_initialize implementation

Greg,

Hey, I have an application where I'm using NuttX on a very RAM constrained ARM device and looking to squeeze as much RAM as possible.  I noticed the irq_vector table on this part is taking up 196 bytes of RAM in order to support dynamic irq_attach operations.

For my embedded application, all irq dispatch routines will be known at compile time, and I'm looking to convert to a statically allocated and populated irq_vector table instead.  I'm wondering if this is something I should just plan to support in my local branch(es) or if I should implement it with a CONFIG setting and push back to the repository.

Thoughts?
Ken


__._,_.___
Posted by: Ken Pettit <pettitkd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>



__,_._,___
Picon

SCHED_OTHER?

NuttX supports two, similar scheduling policies:  SCHED_FIFO and SCHED_RR.  SCHED_FIFO is required for
real time response (SCHED_RR is not recommended for real time behavior).  These policies are great for a
responsive system, but might not be desirable in all applications.

The alternative is SCHED_OTHER.  This is not a well defined policy, but for Unix this means a traditional
scheduling policy that is optimized for non-real-time, multi-user support.  I am thinking about adding
support for a traditional scheduling policy in NuttX.  Here is what I am thinking (based primarily on my
recollection of how Linux did things some years ago):

- Divide the priority space in half:  All threads running with real time scheduling policies are higher
priority than any traditionally scheduled thread.  Thus, the traditional threads cannot interfere with
the real-time threads.

- This lower priority range can be biased by "nice-ness": nice threads start with lower priority than those
not-so-nice threads.

- Within this range of lower priorities, things still work based on priority but priorities are no longer
fixed, but can "age."  If a thread has not executed for some time, its priority is bumped up.  In this way,
eventually every thread will get a shot to run.

Why would you want something this in an RTOS?  You might because pure real-time scheduling has some
penalties:  An RTOS with pure real-time scheduling is very responsive, there are many context switches,
as events trigger immediate responses at various priorities.  The result is that there may be a very high
overhead in context switching and some longer tasks may have difficulty in progressing.

As an analogy, think about filtering:  With no filtering the signal will be noisy and difficult to
interpret, but the signal can respond instantly to step changes.  With filtering, the signal is stable and
clean but then lags when there is an abrupt step change.  So if you wanted immediate response to a step
change, you would not want filtering.  If you wanted a stable signal, would would filter and live with some lags.

I once heard of some measurements using Linux with real-time options (again, my recollection of things): 
Real time scheduling certainly improved responsiveness, but with a penalty of *reduced* throughput. 
The responsive system is not as good as the traditional system when it comes to pure data processing.

Fixed priority scheduling also means that higher priority threads can hog the CPU and the lower priority
tasks never get a chance to run.

People have asked me in the past if I though NuttX would be a good choice to use as a desktop operating system.  I
hemmed and hawed, but eventually said yes.  But in the back of my mind, I was thinking about just these issue: 
How would a desktop behave with only real-time scheduling?  I suspect it might be quirky.

Right now, I am only thinking about making such an addition to NuttX.  I am not sure that it would even have
value in an embedded system.  What do you think?  Thoughts, preferences, recommendations, corrections
... are encouraged.

Greg

------------------------------------
Posted by: spudarnia@...
------------------------------------

------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/nuttx/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/nuttx/join
    (Yahoo! ID required)

<*> To change settings via email:
    nuttx-digest@... 
    nuttx-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    nuttx-unsubscribe@...

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Picon

Interrupt port issues SAMA5D3-xplained

Hi,


I have been working on an R4 port and have been facing data/prefetch and undefined instruction aborts with returning from the ISR.


Can I get some help on what I should be doing to eliminate such exceptions from happening? I am using the SAMA5D3-xplained port as my base reference since R architecture is pretty similar to A with the exception of having no MMU and some resemblance to the classical series of ARM7TDMI.


The SoC I am using has no VIC and I need to handle interrupt status and clear it manually.


Thanks in advance.



__._,_.___
Posted by: bhaumikbhatt3-/E1597aS9LQAvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

Creating a Thread

Hi,    

       I was using the api thread_create to create a new thread and saved the returned pid value to be used later at some other place where I would be getting the tcb of the thread by passing this saved pid value to sched_gettcb()


But I faced an issue. Can I submit a quick fix for this issue which could be reviewed by the maintainers and taken to the project if its meaningful?


Thanks,

Ashrafi



__._,_.___
Posted by: ashrafi_gm-jtpRmYsQNJU@public.gmane.org



__,_._,___
Picon

Porting Driverts to the STM32 F&

New wiki page explains how to port STM32 F4 drivers to the STM32 F7: http://www.nuttx.org/doku.php?id=wiki:howtos:port-drivers_stm32f7

 



__._,_.___
Posted by: spudarnia-/E1597aS9LQAvxtiuMwx3w@public.gmane.org



__,_._,___

Gmane