AnsweredAssumed Answered

uClinux on LPC4337 with Wifi/BT device

Question asked by lpcware Employee on Jun 15, 2016

Content originally posted in LPCWare by bomellberg on Fri Nov 28 02:15:34 MST 2014
Hi,

 

I'm working on a custom board with LPC4337 and uClinux. I am hoping on using this thread as a diary on how to get uClinux up and running with a Wifi device.

 

I have already gotten a lot of help from Wolfgang at Denx (to get U-boot up) and Vlad at Emcraft (to get uCLinux up). I bought the BSD package for the LPC4550 as a starting point.

 

If I can assist in any way, feel free to ask questions in this thread. I have attached the board.c-file and the ea-lpc4357.h (for U-boot) that are tuned to my custom board.

 


Now, my current issue is getting the USB drivers for uClinux to work, but first, does anyone know why I get dual console messages at boot of uClinux?:

 

 

U-Boot 2010.03 (nov 25 2014 - 08:13:54)

CPU  : LPC43xx series (Cortex-M4/M0)
Freqs: SYSTICK=204MHz,CCLK=204MHz
Board: Physio-Control 200130-00 1
DRAM:  32 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
SPIFI lib found at address 0x1A01C000
Hit any key to stop autoboot:  0
EA-LPC4357-EVAL> setenv bootargs lpc18xx_platform=ea-lpc4357 console=ttyS1,115200 panic=10
EA-LPC4357-EVAL> bootm 0x80001000
## Booting kernel from Legacy Image at 80001000 ...
   Image Name:   Linux-2.6.33-arm1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3706368 Bytes =  3.5 MB
   Load Address: 30008000
   Entry Point:  30008001
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

<5>Linux version 2.6.33-arm1 (bosse@bolinux) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189) ) #39 Thu Nov 27 15:52:29 CET 2014
CPU: ARMv7-M Processor [410fc241] revision 1 (ARMv7M)
CPU: NO data cache, NO instruction cache
Machine: NXP LPC18xx
<7>On node 0 totalpages: 8192
<7>free_area_init_node: node 0, pgdat 30390764, node_mem_map 303a1000
<7>  Normal zone: 64 pages used for memmap
<7>  Normal zone: 0 pages reserved
<7>  Normal zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 8128
<5>Kernel command line: lpc18xx_platform=ea-lpc4357 console=ttyS1,115200 panic=10
<6>PID hash table entries: 128 (order: -3, 512 bytes)
<6>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
<6>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
<6>Memory: 32MB = 32MB total
<5>Memory: 28804k/28804k available, 3964k reserved, 0K highmem
<5>Virtual kernel memory layout:
    vector  : 0x00000000 - 0x00001000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0x00000000 - 0xffffffff   (4095 MB)
    lowmem  : 0x30000000 - 0x32000000   (  32 MB)
    modules : 0x30000000 - 0x50000000   ( 512 MB)
      .init : 0x30008000 - 0x30237000   (2236 kB)
      .text : 0x30237000 - 0x3037a000   (1292 kB)
      .data : 0x3037a000 - 0x30390e00   (  92 kB)
<6>Hierarchical RCU implementation.
<6>NR_IRQS:53
<4>lpc18xx_clock_init: unsupported platform 2
<6>Calibrating delay loop... <c>53.04 BogoMIPS (lpj=265216)
Mount-cache hash table entries: 512
<6>NET: Registered protocol family 16
bio: create slab <bio-0> at 0
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>Switching to clocksource cm3-systick
<6>NET: Registered protocol family 2
<6>IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP established hash table entries: 1024 (order: 1, 8192 bytes)
<6>TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP: Hash tables configured (established 1024 bind 1024)
<6>TCP reno registered
<6>RPC: Registered udp transport module.
<6>RPC: Registered tcp transport module.
<6>RPC: Registered tcp NFSv4.1 backchannel transport module.
<6>JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
<6>alg: No test for stdrng (krng)
<6>Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
<6>io scheduler noop registered
<6>io scheduler deadline registered
<6>io scheduler cfq registered (default)
<6>Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
<6>serial8250.2: ttyS0 at MMIO 0x400c1000 (irq = 26) is a 16550A
ÿ<6>serial8250.3: ttyS1 at MMIO 0x400c2000 (irq = 27) is a 16550A
Linux version 2.6.33-arm1 (bosse@bolinux) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189) ) #39 Thu Nov 27 15:52:29 CET 2014
CPU: ARMv7-M Processor [410fc241] revision 1 (ARMv7M)
CPU: NO data cache, NO instruction cache
Machine: NXP LPC18xx
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 8128
Kernel command line: lpc18xx_platform=ea-lpc4357 console=ttyS1,115200 panic=10
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 28804k/28804k available, 3964k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0x00000000 - 0x00001000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0x00000000 - 0xffffffff   (4095 MB)
    lowmem  : 0x30000000 - 0x32000000   (  32 MB)
    modules : 0x30000000 - 0x50000000   ( 512 MB)
      .init : 0x30008000 - 0x30237000   (2236 kB)
      .text : 0x30237000 - 0x3037a000   (1292 kB)
      .data : 0x3037a000 - 0x30390e00   (  92 kB)
Hierarchical RCU implementation.
NR_IRQS:53
lpc18xx_clock_init: unsupported platform 2
Calibrating delay loop... 53.04 BogoMIPS (lpj=265216)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource cm3-systick
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
serial8250.2: ttyS0 at MMIO 0x400c1000 (irq = 26) is a 16550A
serial8250.3: ttyS1 at MMIO 0x400c2000 (irq = 27) is a 16550A
<6>console [ttyS1] enabled
console [ttyS1] enabled
<6>usbcore: registered new interface driver ub
usbcore: registered new interface driver ub
<6>TCP cubic registered
TCP cubic registered
<6>NET: Registered protocol family 17
NET: Registered protocol family 17
<6>lib80211: common routines for IEEE802.11 drivers
lib80211: common routines for IEEE802.11 drivers
<7>lib80211_crypt: registered algorithm 'NULL'
<6>ARMv7-M VFP Extension supported
ARMv7-M VFP Extension supported
<6>Freeing init memory: 2236K
Freeing init memory: 2236K
init started: BusyBox v1.17.0 (2014-11-27 15:52:02 CET)
~ #

 

 

As you can see, "Linux version ..." comes twice, and a lot of the console messages are doubled??

 

Thanks,

 

/Bo

Original Attachment has been moved to: board_0.c.zip

Original Attachment has been moved to: ea-lpc4357_0.h.zip

Outcomes