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



__,_._,___
Picon

Blink Led stm32f4

Hi,


I'm working on STM32F4 and wanted to use a GPIO to turn on and off an LED. How can I do?


Best regards,


Nuno



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



__,_._,___
Picon

SmartFS and CRC

Hey Greg,

I'm implementing CRC protection for sectors in SMART and trying to decide on an implementation issues.  For smaller logical sector sizes, a CRC-8 is probably sufficient (especially on NOR Flash), but for larger sectors, a CRC-16 or CRC-32 is better.  I have added a CRC-8 function to the library and plan to steal one of the two sequence number bytes in the header to use for CRC-8 when that option is selected.  This means CRC-8 could be added to an existing SMART volume without needing to reformat.

For CRC-16 and CRC-32, the header is different to support the CRC value.  I'm wondering if you think the code should be able to support devices / volumes with differing CRC sizes or is it sufficient to support this at compile time (i.e. #IF vs if).  One make the code smaller, the other allows multiple FLASH devices with different CRC configurations.

Ken


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



__,_._,___
Picon

lightweight queue/fifo

Hi,
I like to use lightweight queues or fifos to transfer serial data from 
interrupts to worker-threads and versa via. Many embedded RTOSes already 
provide some kind of lightweight queue/fifo implementations.

Does NuttX provide something like a lightweight queue for this kind of 
usage?

Thanks for tips.

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

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

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

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

A new batch of patches [1 Attachment]

Hi all !

The big renaming session have made some damages in the (little) uip webserver world :

- CONFIG_NETUTILS_HTTPD_SENDFILE seems to have been renamed to CONFIG_NET_SENDFILE

- CONFIG_NET_HAVE_SOLINGER > CONFIG_NET_SOLINGER

- NETUTILS_HTTPD_MAXPATH mistakefully defined as a bool in apps/netutils/webserver/Kconfig


Found a DEBUGASSERT in nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c that is placed there for an unclear reason. The code run ok after i commented it out.


In nuttx/libc/misc/lib_init.c, the streams buffer deallocation don't clear the buffer pointers.


So far, the webserver run ok with io buffers enabled. Tough i did not enabled tcp/ip write buffering.


HiMax



__._,_.___

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

Debugging ELF and NxFLAT Modules

I get a lot of questions in my private email.  I much prefer if people use the forum, however. This is an *open* source project.  Not only should the source code be open, but so should all discussions relating to it.

Here is one that got this morning.  I repost the reply here because other people might have the same question:

> i successfully run hello nxflat module on sdcard through nsh command
> line in kernel mode,but i do not know how to debug it by use gdb.
> currently, i use jlink gdb server + gdb client + ddd graphic client to
> debug nuttx kernel and nuttx_user.elf also include some builtin
> modules, but these experiences can not help me to do it. ...

I think this should work the same as with the old uClinux systems or with debugging kernel modules under linux.  See for example:

http://www.at.freebsd.org/doc/zh_TW/books/developers-handbook/kerneldebug-kld.html

This is how I used to do things with uClinux programs about 12 years ago:

1. Build the module with debug enabled.

2. You have to know where the program was loaded in memory.  You can do this with debug output or with a printf() in your application or with GDB.

3. You have to know the offset of the text section inside of the module.  Use 'readelf -S' or 'readnxflat' to find that offset.

4. Then you have to get control of the CPU:  Either halt the CPU with your application running or put a breakpoint in NuttX before your application has started (if you want to single ste p into main).  I have put infinite loop in code to in order to stop them until I have a chance to break in.

Use the text section offset to calculate the load address of the module text section.

5. The you run GDB:

- Start GDB

- Connect to the GDB server.  You should be able to use the J-Link GDB server

- Load the symbol file.  Here is the only trick.  Since the code was relocated into memory, the addresses in the symbol will all be wrong by an offset.  Fortunately, the GDB symbol-file command accepts a text address argument:

gdb> add-symbol-file nuttx 0xXXXXXXXX

Where 0xXXXXXXXX is the address of the text section in memory.

I have not tried that in years so that procedure might require some updates.
> ... i almost
> remember that the ecos os's gdb stub which built in the flash rom of
> arm cpu together with itself seems to do this.
> do you have a plan to implement a gdb stub or gdb server in nuttx?

No.  But that would be a great project if someone wants to contribute it.  GPL would be okay in this case.

Greg

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



__,_._,___
Picon

ProcFS data for SMARTFS

Greg,

I have made some additions to the smartfs_procfs.c file to enable access to some smartfs status information (and I have a couple of minor bug fixes to fs/procfs/fs_procfs.c that I will submit also).  The issue is that the data I want to access from the SmartFS layer is actually in the MTD layer and I need a private IOCTL code and struct definition to pass between the two layers.  This is data that is very specific to the SMART implementation and not really generic.

I was trying to decide where to put the sturct and IOCTL definition.  The data exists in the MTD layer and is being accessed by the FS layer.  I could do any of the following:

1.  Just add it to include/nuttx/fs/smart.h
2.  Add an include/nuttx/mtd/smart.h file and add it there
3.  Add it to both the drivers/mtd/smart.c and fs/smartfs/smartfs_procfs.c files individually and just let it be totally private.

Any suggestions?

Also, I have minimized the RAM requirement for accessing a 128MByte SPI Flash from 192K down to 13K.  I could squeeze another 3K out of this maybe, but it would be more work.  I'm actually looking into adding wear-leveling vs. trying to squeeze RAM more.

Thanks,
Ken


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



__,_._,___
Picon

Long filenames on STM32 F4 Discovery

Hi,

   I'm having issues with using long file names on the STM32F4Discovery configuration. At times it works and at other times it falls back to 8.3 file name. This is looking at the SD card on Windows. I'm also getting errors when I rename a file to a file with a long file name. I suspect it's renaming to an 8.3 file that already exists. Any ideas?? Thanks!

       - Gene




__._,_.___
Posted by: gened50-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org



__,_._,___

Gmane