Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nuttx-apps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
nuttx-apps
Commits
c0e4184a
Commit
c0e4184a
authored
11 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
More Zmodem tweaks
parent
4303ec02
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
system/zmodem/Makefile.host
+16
-1
16 additions, 1 deletion
system/zmodem/Makefile.host
system/zmodem/README.txt
+63
-45
63 additions, 45 deletions
system/zmodem/README.txt
with
79 additions
and
46 deletions
system/zmodem/Makefile.host
+
16
−
1
View file @
c0e4184a
...
...
@@ -32,7 +32,22 @@
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
# TOPDIR and APPDIR must be defined on the make command line
############################################################################
# USAGE:
#
# 1. TOPDIR and APPDIR must be defined on the make command line: TOPDIR
# is the full path to the nuttx/ directory; APPDIR is the full path to
# the apps/ directory. For example:
#
# make -f Makefile.host TOPDIR=/home/me/projects/nuttx
# APPDIR=/home/me/projects/apps
#
# 2. Add CONFIG_DEBUG=1 to the make command line to enable debug output
# 3. Make sure to clean old target .o files before making new host .o
# files.
#
############################################################################
-include
$(TOPDIR)/.config
-include
$(TOPDIR)/Make.defs
...
...
This diff is collapsed.
Click to expand it.
system/zmodem/README.txt
+
63
−
45
View file @
c0e4184a
README
======
Contents
========
o Buffering Notes
- Hardware Flow Control
- RX Buffer Size
- Buffer Recommendations
o Using NuttX Zmodem with a Linux Host
- Sending Files from the Target to the Linux Host PC
- Receiving Files on the Target from the Linux Host PC
o Building the Zmodem Tools to Run Under Linux
o Status
Buffering Notes
===============
...
...
@@ -135,49 +148,54 @@ Using NuttX Zmodem with a Linux Host
If you don't have the az command on your Linux box, the package to
install rzsz (or possibily lrzsz).
STATUS
2013-7-15: I have tested with the configs/olimex-lpc1766stk
configuration. I have been able to send large and small files with
the sz command. I have been able to receive small files, but there
are problems receiving large files: The Linux SZ does not obey the
buffering limits and continues to send data while rz is writing
the previously received data to the file and the serial driver's RX
buffer is overrun by a few bytes while the write is in progress.
As a result, when it reads the next buffer of data, a few bytes may
be missing (maybe 10). The symptom of this missing data is a CRC check
failure.
Either (1) we need a more courteous host application, or (2) we
need to greatly improve the target side buffering capability!
Either (1) we need a more courteous host application, or (2) we
need to greatly improve the target side buffering capability!
My thought now is to implement the NuttX sz and rz commands as
PC side applications as well. Matching both sides and obeying
the handshaking will solve the issues. Another option might be
to fix the serial driver hardware flow control somehow.
sz has several command line options which one would think would
alleviate these problems. But as of yet, I have not found a
combination of options that does so:
-L N, --packetlen N
Use ZMODEM sub-packets of length N. A larger N (32 <= N <= 1024)
gives slightly higher throughput, a smaller N speeds error
recovery. The default is 128 below 300 baud, 256 above 300 baud,
or 1024 above 2400 baud.
-l N, --framelen N
Wait for the receiver to acknowledge correct data every N
(32 <= N <= 1024) characters. This may be used to avoid network
overrun when XOFF flow control is lacking.
-w N, --windowsize N
Limit the transmit window size to N bytes (ZMODEM).
UPDATE: I have verified that with debug off and at lower serial
BAUD (2400), the transfers of large fails succeed without errors.
You may need the Linux sz -O option to keep it from timing out
in these low BAUD transfers. I do not consider this a "solution"
to the problem.
Building the Zmodem Tools to Run Under Linux
============================================
Build support has been added so that the NuttX Zmodem implementation can be executed on a Linux host PC. This can be done by
- Change to the apps/systems/zmodem directory
- Make using the special makefile, Makefile.host
NOTES:
1. TOPDIR and APPDIR must be defined on the make command line: TOPDIR is
the full path to the nuttx/ directory; APPDIR is the full path to the
apps/ directory. For example, if you installed nuttx at
/home/me/projects/nuttx and apps at /home/me/projects/apps, then the
correct make command line would be:
make -f Makefile.host TOPDIR=/home/me/projects/nuttx APPDIR=/home/me/projects/apps
2. Add CONFIG_DEBUG=1 to the make command line to enable debug output
3. Make sure to clean old target .o files before making new host .o files.
This build is untested as of 2013-7-16.
Status
======
2013-7-15: I have tested with the configs/olimex-lpc1766stk
configuration. I have been able to send large and small files with
the sz command. I have been able to receive small files, but there
are problems receiving large files: The Linux SZ does not obey the
buffering limits and continues to send data while rz is writing
the previously received data to the file and the serial driver's RX
buffer is overrun by a few bytes while the write is in progress.
As a result, when it reads the next buffer of data, a few bytes may
be missing. The symptom of this missing data is a CRC check
failure.
Either (1) we need a more courteous host application, or (2) we
need to greatly improve the target side buffering capability!
Either (1) we need a more courteous host application, or (2) we
need to greatly improve the target side buffering capability!
My thought now is to implement the NuttX sz and rz commands as
PC side applications as well. Matching both sides and obeying
the handshaking will solve the issues. Another option might be
to fix the serial driver hardware flow control somehow.
2013-7-16: I have verified that with debug off and at lower serial
BAUD (2400), the transfers of large succeed without errors. I do
not consider this a "solution" to the problem. I also found that
the LPC17xx hardware flow control caused strange hangs; Zmodem
works better with hardware flow control disabled on the LPC17xx.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment