I wanted to read a file from ftp. Currently it fetches the whole file from ftp and then stores it in RAM and then write it to the flash memory. I wanted to try reading a particular number of bytes of the file at a time store it in the RAM then write it to the flash, continue this action till the whole file is read. I'm using codewarrior MCF54416
Solved! Go to Solution.
Sure you can. How hard it is to get there from here depends on what protocol stack you're using and how much control it gives you.
For starters, it's going to be easier to do if the flash memory you're writing to isn't the flash memory you're executing code from. I've had an MCF51JM128 update itself via USB (including the USB stack) with no intermediate storage to work with and it was not fun.
Are you running an RTOS? Which one? What FTP implementation are you using? Worst case, you can write your own FTP client, but that's probably a little excessive.
If you're using an RTOS it might be easier to approach it from the file system side. Your RTOS might already have a suitable driver, but you could make one that writes directly to flash and use that as the destination for the FTP client.
Scott
Sure you can. How hard it is to get there from here depends on what protocol stack you're using and how much control it gives you.
For starters, it's going to be easier to do if the flash memory you're writing to isn't the flash memory you're executing code from. I've had an MCF51JM128 update itself via USB (including the USB stack) with no intermediate storage to work with and it was not fun.
Are you running an RTOS? Which one? What FTP implementation are you using? Worst case, you can write your own FTP client, but that's probably a little excessive.
If you're using an RTOS it might be easier to approach it from the file system side. Your RTOS might already have a suitable driver, but you could make one that writes directly to flash and use that as the destination for the FTP client.
Scott
Hi George,
is this question related to this other thread?
Thanks in advance!
Best Regards,
Carlos Mendoza
Technical Support Engineer