Picon

Re: nsh shell stoped when start the hpthread task

Probably  not because sched_yield only yields the CPU to tasks with equal priority.

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



__,_._,___
Picon

There is an error when i make nuttx for the stm32f4discovery nsh + pwm test.



I just begin to try the nuttx. I use the stm32f4discovery. I make the nsh demo describe in the stm32f4discovery's readme. I select some configure to support pwm test.

=====================================================


    4. This example supports the PWM test (apps/examples/pwm) but this must

       be manually enabled by selecting:


       CONFIG_PWM=y              : Enable the generic PWM infrastructure

       CONFIG_STM32_TIM4=y       : Enable TIM4

       CONFIG_STM32_TIM4_PWM=y   : Use TIM4 to generate PWM output


       See also apps/examples/README.txt


       Special PWM-only debug options:


       CONFIG_DEBUG_PWM


=====================================================


But when i make the project, there has an error. The error's messages is below. Is there anything wrong? I search the project code, i found there is no "GPIO_TIM4_CH1OUT" define in the "stm32f40xxx_pinmap.h", it only has “GPIO_TIM4_CH1OUT_1” and "GPIO_TIM4_CH1OUT_2".

=====================================================

CC:  chip/stm32_pwm.c

chip/stm32_pwm.c:132:0: warning: "pwmlldbg" redefined

 #    define pwmlldbg(x...)

 ^

chip/stm32_pwm.c:126:0: note: this is the location of the previous definition

 #  define pwmlldbg            lldbg

 ^

In file included from chip/stm32_pwm.c:58:0:

chip/stm32_pwm.h:805:40: error: 'GPIO_TIM4_CH1OUT' undeclared here (not in a function)

 #    define PWM_TIM4_CH1CFG            GPIO_TIM4_CH1OUT

                                        ^

chip/stm32_pwm.c:407:18: note: in expansion of macro 'PWM_TIM4_CH1CFG'

       .pincfg  = PWM_TIM4_CH1CFG,

                  ^

chip/stm32_pwm.c: In function 'pwm_timer':

chip/stm32_pwm.c:1072:3: warning: implicit declaration of function 'pwmvdbg' [-Wimplicit-function-declaration]

   pwmvdbg("TIM%d channel: %d frequency: %d duty: %08x count: %d\n",

   ^

chip/stm32_pwm.c:1073:28: error: 'struct stm32_pwmtimer_s' has no member named 'channel'

           priv->timid, priv->channel, info->frequency,

                            ^

Makefile:186: recipe for target 'stm32_pwm.o' failed

make[1]: *** [stm32_pwm.o] Error 1

make[1]: Leaving directory '/cygdrive/c/syncdir/nuttx/nuttx/arch/arm/src'

LibTargets.mk:128: recipe for target 'arch/arm/src/libarch.a' failed

make: *** [arch/arm/src/libarch.a] Error 2

====================================================





__._,_.___
Posted by: zhangjianfei2005 <at> yahoo.com



__,_._,___
Picon

Bit-banging on an I2C device

Greetings

I've been trying to work on the sht10 temperature sensor.

The thing is this sensor uses the I2C bus but not the I2C protocol so i want to know exactly what is the proper way to bit-bang on the I2C bus?

Here is the sample code for the sensor sht11.c in stm32f4-webserver | source code search engine

I'll use this code to create my own sensor driver so the only question here is how do i actually send 0's and 1's to the SDA and SCL pin and convert the pin to input and output?


 



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



__,_._,___
Picon

Protected build Debugging

Hi. 

I'm Jeongchan.

I try to do protected build with STM32F429ZI board.


When I do protected build, as you know, I can get 2 types of file.

In your guide, I can concatenate the hex file like below.

cat nuttx.hex nuttx_user.hex > combined.hex

then flash the combined.hex to the board.

In that case, how can I debug with hex file?


or is there any method to debug protected build result?





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



__,_._,___
Picon

nuttx build on MacOS

Hi.

I played a bit with building NuttX on MacOS.
Basically, kconfig had a reference to a

  #define _(text) gettext(text) 

This prevented KConfig to be built, but after fixing that, I oould issue a first "make" on Nuttx.

This is the output:

 make
LN: include/arch/board to /Users/pmu/projects/nuttx/nuttx/configs/stm32f4discovery/include
LN: include/arch/chip to arch/arm/include/stm32
LN: arch/arm/src/chip to arch/arm/src/stm32
LN: include/apps to ../apps/include
make[3]: Nothing to be done for `context'.
make[3]: Nothing to be done for `context'.
LN: platform/board to /Users/pmu/projects/nuttx/apps/platform/stm32f4discovery
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[3]: Nothing to be done for `context'.
make[3]: Nothing to be done for `context'.
LN: platform/board to /Users/pmu/projects/nuttx/apps/platform/stm32f4discovery
make[2]: Nothing to be done for `depend'.
LN: platform/board to /Users/pmu/projects/nuttx/apps/platform/stm32f4discovery
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
Makefile:76: uClibc++/Make.defs: No such file or directory
make[1]: *** No rule to make target `uClibc++/Make.defs'.  Stop.
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[1]: Nothing to be done for `depend'.
make[1]: `libsched.a' is up to date.
make[1]: `libconfigs.a' is up to date.
make[1]: `libc.a' is up to date.
make[1]: `libmm.a' is up to date.
make[1]: `libarch.a' is up to date.
Makefile:76: uClibc++/Make.defs: No such file or directory
make[1]: *** No rule to make target `uClibc++/Make.defs'.  Stop.
make: *** [libxx/libcxx.a] Error 2

Not sure about whether to include uClibC++ ?

My goal would be to try the simple nsh app on an STM32F4 discovery board.

What more steps do I need to do?

Thanks!

Patrick


__._,_.___
Posted by: Patrick Mulder <mulder.patrick-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>



__,_._,___
Picon

uIP over LWIP


Hi,


Nuttx IP stack is derived from uIP stack.


But, I have read that lwip is faster than uIP and it is interrupt driven whereas uIP is polling based.


Is there any particular reason for adopting uIP stack?



Thanks & Regards,

Rajesh kumar S R



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



__,_._,___
Picon

nsh shell stoped when start the hpthread task

Hello


      When I uses the work_queue() of hpthread funcion to start an loop, but after it started, the nsh shell is stoped, why? How can I fix it?






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



__,_._,___
Picon

Atmel SAM AFEC driver consolidation

Greg,

As I've been porting the Atmel Software Framework AFEC driver, I noticed
that you have already written one for SAMA5 architectures.

Currently I've placed the driver in drivers/analog, given that I thought
the logic can span multiple Atmel architectures. The code has flags for
lot's of them.

Can and should these drivers be consolidated?
Should they been going in drivers/ or arch/?
Adapt your SAMA5 approach or go the Atmel Software Framework way?

Your guidance and coordination would be appreciated.

-- 
	SP

------------------------------------
Posted by: 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

shell app questions and problems

I am writing a small app that are supposed to run in the NuttX shell on a NuttX built in the FLAT mode. 


Getting the app to build etc was straight forward (I used the Hello World example app as base) but I have however run into some problems.


I use printf's to print a simple menu listing and then my plan was to use read(0,&ch, 1) to read single characters to identify which menu item that the user wanted (each item in the menu list has a letter assigned - a->z).

the main of my app can be described as:

int main() {

do {

   clearScreen();

   printMenu(); 

   read(0, &ch, 1);

  &n bsp;handleInputChar(ch); 

while(!exitPressed)

printf("bye");

return 0

}

 

1) First of all, when I run the app the first time from nsh it looks like the read() gets some random scramble in without the user ever pressing any keys. This means that my menu gets reprinted over and over again several times (actually it looks like it is printed on top op itself several times so some lines are there multiple times). 


2) when the user press a key (i.e. the key 'a') it is not always read correctly and nothing happens in the app. Other times when a key is pressed it prints the keys previously pressed on a new line (I have no code printing what is actually pressed) like aabax. Sometimes the key press i s recognized and just works - seems like the pattern is about every 4th key press even though I tell it to read a single char and flush stdin afterwards.

I have tried fgetc(), getchar(), read() fread() and sscanf()  for reading in the keypress from stdin but the result is pretty much the same


3) when the exit key is recognized (user press 'x'), it correctly gets out of the do-while loop and prints the "bye" text to screen. Then nothing happens until a key is pressed by the user and this seems to restart the app again. If I press enter when the "bye" text is shown, then it seems like it exits the app correctly. 

How can that be?


thanks in advance! 



__._,_.___
Posted by: kim-ppvRghqR8ddaa/9Udqfwiw@public.gmane.org



__,_._,___
Picon

problems with simple nuttX shell app.

I have a small nuttX setup running with NuttX shell and built in the "FLAT" mode. I want to create a simple app I can control via the serial console (using putty in my case). 


I have written a very small test app and compiled it without problems. It uses printf() lines to print a simple text "menu" and the plan was then to use read(0,&ch,1) to figure out which item in the menu the user selects (each item is assigned a letter from a to z). 

Several problems however exists:

The menu gets printed multiple times on the first run. I have added a simple "fake" clear screen (is there one available?) that prints 80 newlines. when activating the fake clear screen the menu gets printed correctly. 

I think that the multiple menu prints is due to the fact that the read() buffer is already filled with scramble when app is started.

In general it seems like the read has many problems. half of the times when I press a letter key it simply prints the previously pressed keys + R1 in front (i.e. R1aabc x) to the screen instead of reacting to the actual keypress. 

Another problem is that I have a do-while loop in my main function that loops over the menu print function call and the read(). I have set it to exit on the letter x. In the code this should exit the loop and simply go to the end of the main function. It is however not the case. It seems like it actually exits the loop, because a printf outside the loop gets triggered. After that I do however get back into the loop again like if the app was started over. 


Is there a good way to make simple text menu driven app for nuttX shell? right now the app seems more than normally unstable when it comes to input/output. 






__._,_.___
Posted by: kim-ppvRghqR8ddaa/9Udqfwiw@public.gmane.org



__,_._,___
Picon

Power management domains

Are there any hints or guidelines for the power domain to be used by a
driver?

I pressume one can increase the number of domains; but how can the
driver choose which domain to be part of? Should it be a configurable
integer?

Also, what do they activity priority numbers actually mean? Larger
values correspond to higher priorities, but how do I determine the
approrpiate one for the driver?

-- 
	SP

------------------------------------
Posted by: 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/


Gmane