7
« on: February 14, 2009, 10:34:50 AM »
Yes I changed the lib to arm-elf-gcc and that fixed it. Thanks.
I added my usual warnings, opt, and debug options. Your code is pretty clean, but you have a number of local variables defined identical to global names. Not good practice. For example, take a look at fnSendHTTP_windows() in HTTP.C. You have a function parameter defined as "ucPush", and then you define another local variable inside the routine with the same identical name "ucPush". If you reference "ucPush" later, are you talking about the function parameter or the local variable? This is needlessly confusing. I get about 40 warnings most of which could be easily eliminated.
I am most interested to test your TCP/IP stack. I had been running FreeRTOS. I ported lwIP-1.3 over, and it has many problems/bugs. Was not impressed. Next I ported NicheLite-LPC. The Niche code is extremely good, but unfortunately it appears to have it's arms tied behind its back in several places deliberately. Interniche offered to resolve the issue if I purchased their $2400 yearly support. Not so free after all. More like bait and switch.
However the Niche stack code is ultra high performance, runs 90-100Mbps TCP with the LPC2468. Virtually full line speed. They do several things that are interesting: (a) They use dual sized DMA packet buffers (192 bytes and 1536 bytes). IP traffic is either ARP/SYN/ACK/... small packets, or large TCP/FTP/... bulk data packets. They prevent small packets from using up the big buffers. (b) They dynamically allocate the DMA buffers. For example, rather than having say fixed 4-RX and 4-TX buffers, they have a pool of 8 buffers that can be used entirely for either RX or TX. They float back and forth dynamically. (c) They have a pure ASM hand coded routine for checksum. (d) they have zero data copy. Good stuff. Third generation code.
Your package seems to have a lot of bang for the buck. A lot more coverage of different functions and utilities than I expected. I need to study your files and figure out where everything is at, then port the pins to my product PCB, and mod the PHY code. A couple questions:
- Does your SPI routines use DMA?
- Does you USB routines use DMA?
Thanks, Chris.