Latest ColdFireLite demo firmware supports serial flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Latest ColdFireLite demo firmware supports serial flash

2,427 Views
ericgregori
Contributor I
I posted the latest ColdFire Lite firmware about a month ago.  If you were at FTF,  and took my ColdFireLite class you allready have the code.
 
This latest code adds support for serial flash.  Using serial flash you can have up to 4 Megabytes of web pages, all updatable over ethernet.
 
I also re-wrote the flash file systems API to support mutiple flash file systems.
 
The project includes a sample SPI driver, and IIC driver.
 
The Freescale HTTP server supports:
 
Up to 4 simutaneous connections,
Keep alive,
3 flash file systems,
web page uploading over ethernet using port 80,
Dynamic HTML
 
and its all free and public source.
 
Message Edited by t.dowe on 2009-10-21 02:40 AM
Labels (1)
0 Kudos
Reply
2 Replies

506 Views
Richly
Contributor III
Hi. Thanks for posting your HTTP server code. It's an incredible help to me and, I'm sure, to many others.

I'm trying to understand the code for freescale_http_upload_file, because the compiler quite properly generates a complaint about using the variable j without its being initialized.

It looks like you intended to replace the inline code that writes to flash by a call to emg_web_write using an #if 0, but you left the tail end of the original code, which relies on having j set by the prior for j loop. IIRC, this is not generally a safe practice anyway, and in any case, the code won't work correctly if USE_SERIAL_FLASH is defined. So, skipping around this code would be a good idea. Am I correct in my presumption that moving the #endif corresponding to the #if 0 down to be just above the line
if( (freescale_http_sessions[session].file_size == 0) ||
would be the right thing to do?

This all assumes that that emg_web_write writes out the entire packet that m_recv gathered, but I don't understand why it necessarily does.

My confusion comes down to this: is there some reason to believe that the value returned by m_recv (i.e., the number of bytes it got) is a multiple of 4? If not, then what happens to the last few bytes in the buffer? It looks like they don't get copied. One consequence would be that freescale_http_sessions[session].file_size is never set to zero, and this seems to imply that the upload appears to hang and never complete. If the length is guaranteed to be a multiple of 4, then a comment to that effect - along with at least a hint of the reason - would be a big help.

Thanks,
Richard
0 Kudos
Reply

506 Views
jvantol
Contributor I
Eric,

Is there a snippet of schematic, parts list, etc of a known working implementation of SPI or I2C flash?
0 Kudos
Reply