Picon

PWM example

Hi,


I'm working on STM32F4DISCOVERY and I'm trying to create an example where I have 4 drivers to provide PWM outputs 4 GPIOs. When trying to run the same example nsh this gives me the following error:

NuttShell (NSH)
nsh> test
pwm_main: open (null) failed: 2
nsh>

I do not know how to solve ..

I'm evil create the code for this my example or a problem to give me this error?

NunoR




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



__,_._,___
Picon

Cannot build toolchain with cortexm0-eabi-defconfig-4.6.3

Try to compile cross compile toolchains with cortexm0-eabi-defconfig-4.6.3, because I'm using kl25z MCU witch is Cortex m0+.  I think cortexm0-eabi-defconfig-4.6.3 is the closet toolchain to use. The compile failed with the following error:


misc/buildroot/toolchain_build_arm_nofpu/gcc-4.6.3/gcc/doc/cppopts.texi:772: <at> itemx must follow <at> item

make[3]: *** [doc/cpp.info] Error 1

make[3]: Leaving directory `/home/hm/dev/ntx/nuttx.git/misc/buildroot/toolchain_build_arm_nofpu/gcc-4.6.3-build/gcc'

make[2]: *** [all-gcc] Error 2

make[2]: Leaving directory `/home/hm/dev/ntx/nuttx.git/misc/buildroot/toolchain_build_arm_nofpu/gcc-4.6.3-build'

make[1]: *** [all] Error 2

make[1]: Leaving directo ry `/home/hm/dev/ntx/nuttx.git/misc/buildroot/toolchain_build_arm_nofpu/gcc-4.6.3-build'

make: *** [/home/hm/dev/ntx/nuttx.git/misc/buildroot/toolchain_build_arm_nofpu/gcc-4.6.3-build/.compiled] Error 2



I wonder whether I can use other version of toolchain for the cortex m0+ MCU? Such as, cortexm3-eabi-default-4.6.3, or 4.8.2?


Thanks

 



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



__,_._,___
Picon

New patches for lpc1768 (lpcxpresso, mbed, zkit-arm-1769, nucleus2g, etc..) [1 Attachment]

I was struggling for weeks with ethernet bugs on lpc1768 and i think that its now on the good way.

The attached patch contains theses mods :


warnings elimination in lpc176x_rtc.c

cosmetic changes to lpc17_mcpwm.c, lpc17_pwm.c,lpc17_timer.c, lpc17_dac.c

apps/NxWidgets/Kconfig : quote absent at end of line

lpc17_adc.c : Added burstmode ADC conversion mode, with CONFIG_ADC_BURSTMODE option in Kconfig.

    burst mode do the 8 channels conversions in one pass (one interrupt for the 8 channels).

lpc17_ethernet.c : added possibility to use the kernel worker thread to do most of the workload,

    with CONFIG_NET_WORKER_THREAD option in Kconfig,

    and eliminated a problem with PHY DP83848C : it doesnt need a specific initialization on mbed.

    Finally found a bug i was chasing for weeks : from time to time (after some hours) the ethernet receiver lost

    one receive interrupt and the ip stack never recover because

    there is no receive watchdog as the transmit watchdog ! (where could it be implemented ?)

Debugged the mbed implementation, added the ADC, PWM, timers drivers, nuttx is running now on my mbed board.


arch/arm/src/armv7-m/up_initialstate.c : initial state of tasks have interrupts disabled if

    CONFIG_SUPPRESS_INTERRUPTS is not selected (init value of zero disable the interrupts de facto

    if CONFIG_ARMV7M_USEBASEPRI is select ed). It is the case on cortex-m3, dont know for m4 ?


All these mods are tested on : lpcxpresso-lpc1768 and mbed, 

                          may run on : zkit-arm-1769, nucleus2g,

                          maybe on : olimex-lpc1766stk


Now nuttx become a more serious choice for my needs, the mini http server can now serve pages containing javascript code (doing htmlrpc aka ajax requests) permitting to make html5 canvas animated graphics on a web page.

I'll try to post an example in a few days, if somebody is interrested.




__._,_.___

Attachment(s) from himax-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org [nuttx] | View attachments on the web

1 of 1 File(s)

Posted by: himax-ur4TIblo6goN+BqQ9rBEUg@public.gmane.org



__,_._,___
Picon

NUTTX BUILD ECLIPSE


Hi All,

I'm newbie about NuttX. I'm very impressed with NuttX capability. I've already worked with other RTOSs(uCOS-II, FreeRTOS) and I aways build applications with Eclipse using GCC-ARM and debugged with JTAG(J-Lin using GDB Server). As I could see in the variuos tutorials in web the build of nuttx and apps are made by command line and make files. Did someone used eclipse to build
Nuttx and your Apps?

Regards

Wagner



__._,_.___
Posted by: Wagner Batista <wagnerbs7-/E1597aS9LRfJ/NunPodnw@public.gmane.org>



__,_._,___
Picon

KL25Z config UART1 case stack issue.

I compile KL25Z with UART0 as console, works fine. 


While I try to use UART1/2, kernel send stack issue with the following message.


nsh> Assertion failed at file:irq_unexpectedisr.c line: 86

sp:         1ffffbb8

stack base: 00000465

stack size: 00000465

ERROR: Stack pointer is not within allocated stack

R0: 4006b003 00000003 0000000c 0000000f 1ffff068 00000001 00000070 200005ac

R8: ffffffff ffffeb5f 0001fffe 00009400 00000f2e 1ffffc58 00000731 000006d2

xPSR: 01000200 PRIMASK: 00000001


Any idea or suggestions to solve this issue?


Thanks



n>



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



__,_._,___
Picon

RIOT OS

This looks pretty interesting:  RIOT - The friendly Operating System for the Internet of Things

 


Has anyone worked with it?


Greg



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



__,_._,___
Picon

Integrating math.h and libc.a

Hi All,


I am having some issues trying to integrate an external math library.


My toolchain uses newlib, and the link process fails because the libm.a library of my toolchain is built using newlib's libc library which uses a definition of errno different than the definition that nuttx libc uses. 

The error is the following: 


/dir/arm-none-eabi/lib/libm.a(lib_a-w_sqrt.o): In function `sqrt':

/Sdir/arm/nuttx/build/arm-none-eabi/ne wlib/libm/math/../../../../../gcc-linaro-4.8-2013.07-1/newlib/libm/math/w_sqrt.c:83: undefined reference to `__errno'


in newlib, libc/include/sys/errno.h , errno is defined as:


#ifndef _REENT_ONLY

#define errno (*__errno())

extern int *__errno _PARAMS ((void));

#endif


whereas in nuttx it is defined as:


#  define errno *get_errno_ptr()


Am I missing something? or does nuttx libc only work with some other toolchain?


Has anyone successfully integrated an external math library with nuttx that you can share? 


Jaime 






__._,_.___
Posted by: jimbospace1-Qt13gs6zZMY@public.gmane.org



__,_._,___
Picon

Patches (NxWidgets, STM32_OTGFS)

Hi,

Long pause, but I have some more patches again :)

http://koti.kapsi.fi/jpa/stuff/other/nuttx-patches/patches_13/


0001-0003 are simple fixes (typos mostly)

0004-0008 are small NxWidgets improvements


0009 is for the STM32_OTGFS. I think everyone agrees that those sleeps inside interrupts are really not a good idea. But they are also difficult to remove with the current structure of the driver and shortcomings of the hardware documentation.

I was running into some issues with these, so I tried to shorte n the delays and split up the interrupt block areas where possible. The result works for me, and I think it's not worse than the previous one.


--

Petteri


PS. Finally finished my thesis, which was about the device where I use NuttX: http://dspace.cc.tut.fi/dpub/handle/123456789/22051

 



__._,_.___
Posted by: petteri.aimonen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

nettest host tool build with m32 [1 Attachment]

Hi again,


I have a tiny patch that adds the "-m32" flag to the host build linker flags for the nettest example application.


Without this, when using CONFIG_SIM_M32=y, building the host tool that is part of the nettest app will fail with the following error:


<<<

AR:   nettest.o nettest_client.o

CC:  host.c

CC:  nettest_server.c

LD:  host

/usr/bin/ld: i386 architecture of input file `host.hobj' is incompatible with i386:x86-64 output

/usr/bin/ld: i386 architecture of input file `nettest_server.hobj' is incompatible with i386:x86-64 output

collect2: error: ld ret urned 1 exit status

Makefile:112: recipe for target 'host' failed

make[2]: *** [host] Error 1

make[2]: Leaving directory '/home/lazlo/Workspace/nuttx/apps/examples/nettest'

Makefile:112: recipe for target 'examples/nettest' failed

make[1]: *** [examples/nettest] Error 2

make[1]: Leaving directory '/home/lazlo/Workspace/nuttx/apps'

Makefile.unix:603: recipe for target '../apps/libapps.a' failed

make: *** [../apps/libapps.a] Error 2

<<<


Lazlo



__._,_.___

Attachment(s) from dlsitzer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [nuttx] | View attachments on the web

1 of 1 File(s)

Posted by: dlsitzer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

include assert.h [2 Attachments]

Hi Greg,


I have a patch that adds '#include <assert.h>' to three files. Without

the include of assert.h, the linker will not find DEBUGASSERT and the build fails (in my case).


I'm using the sim/nettest configuration and I attached my .config if relevant. The only significant change from the defaultconfig is that I have set is CONFIG_SIM_M32=y


Lazlo




__._,_.___

Attachment(s) from dlsitzer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [nuttx] | View attachments on the web

2 of 2 File(s)

Posted by: dlsitzer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org



__,_._,___
Picon

MP3 Decoder

Hi, all,

It anyone aware of a tiny, BSD-license-compatible, MP3 decoder that could be used with NuttX?

Thanks, any tips would be appreciated,
Greg




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



__,_._,___

Gmane