[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] TFTP init
From: |
Stephen Cowell |
Subject: |
Re: [lwip-users] TFTP init |
Date: |
Wed, 18 Jan 2017 15:02:12 -0600 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
Nick... I'm using the same ftp... and the same processor... I wrote sftp
but it's actually ftpd, from toelke.
Some confusion... your board, your design, is an FTP server? You are
pushing files from a PC client to an embedded server.
I'm assuming no OS... raw, in other words.
Do you have the SAM4E-EK? or the Explained? kit? Or are you already on
custom hardware? Always easiest to start with a kit.
Looking at fatfs's conf_access.h file, I see this entry:
<>
/*! \name Activation of Logical Unit Numbers
*/
//! @{
#ifdef VIRTUAL_MEMORY_ENABLE
#define LUN_0 ENABLE //!< Enable On-Chip Virtual Memory.
#else
#define LUN_0 DISABLE //!< Disable On-Chip Virtual Memory.
#endif
</>
.. so it looks like FatFS will do virtual memory. I don't expect that
you'll be able to get on-chip flash working easily... this seems more
designed for RAM. How big are the files you're moving? You say
'image'... these are bitmaps, or iso's? Using on-chip flash is
complicated. Use RAM if at all possible. Open the fatfs docs (you'll
have to tell AtmelStudio to use a browser, this is silly of course) and
find the f_mount() function... follow what it does. They have a user forum,
http://elm-chan.org/fsw/ff/bd/
I created an example project for LWIP using the
THIRDPARTY_RAW_BASIC_HTTP example, then I created other example projects
for SD Card, then diffed the projects and added the pieces into my first
project. Now I have an SD card that is an FTP server with NTP-based
clock. It was not easy... use every cheat you can find. If you have to
add a USB stick or an SD card to get it going, do so.
__
Steve
.
On 1/18/2017 9:20 AM, nrichard wrote:
Stephen Cowell wrote
What ftp library are you using? I successfully used sftp with lwip
1.4.1 and fatFS, no OS needed, to be an FTP server for an SD card.
Are you being a server or a client? Sounds like client. Pretty sure
all the ftp things need a file system to work.
Using a file system is going to be easier than hacking an FTP client I
think. Your goal is to use as much already-done code as possible.
Choose hardware with a rich set of example projects... Atmel SAM4E
helped me a lot.
--
Stephen Cowell
I'm actually using a SAM4E myself (specifically Sam4e16e). I'm using this
library for FTP: https://github.com/toelke/lwip-ftpd
You are correct, I am the client on my local PC and the board will be the
server running elsewhere. I would like to avoid using an SD card and have
the FTP server transfer to flash memory. I only need to transfer 2 image
files to 2 locations in memory, nothing else.
With the library above, FatFs wants to use up all my memory for some reason,
so I need to figure out how I can not use up all my memory, or be able to
modify the vfs files to not use FatFs at all.
-Nick
--
View this message in context:
http://lwip.100.n7.nabble.com/TFTP-init-tp28231p28409.html
Sent from the lwip-users mailing list archive at Nabble.com.
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
- Re: [lwip-users] TFTP init, nrichard, 2017/01/17
- Re: [lwip-users] TFTP init, contact, 2017/01/17
- Re: [lwip-users] TFTP init, nrichard, 2017/01/18
- Re: [lwip-users] TFTP init, contact, 2017/01/18
- Re: [lwip-users] TFTP init, nrichard, 2017/01/18
- Re: [lwip-users] TFTP init, Stephen Cowell, 2017/01/18
- Re: [lwip-users] TFTP init, nrichard, 2017/01/18
- Re: [lwip-users] TFTP init,
Stephen Cowell <=
- Re: [lwip-users] TFTP init, nrichard, 2017/01/18
- Re: [lwip-users] TFTP init, Jan Menzel, 2017/01/18
- Re: [lwip-users] TFTP init, Ajay Bhargav, 2017/01/18
- Re: [lwip-users] TFTP init, nrichard, 2017/01/18