There were several places where default sector and buffer sizes of 2048 were changed to DEFAULT_TASK_STACKSIZE. This is not correct. This was noted by Xiao Xiang.
userfs_main.c:547:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (*relpath == '\0')
^~~~~~~~~~~~~~~~
userfs_main.c:564:10: note: uninitialized use occurs here
return ret;
^~~
userfs_main.c:547:3: note: remove the 'if' if its condition is always false
if (*relpath == '\0')
^~~~~~~~~~~~~~~~~~~~~
userfs_main.c:543:10: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
test_motor.c:1068:14: warning: explicitly assigning value of variable of type 'float' to itself [-Wself-assign]
expected_e = expected_e;
~~~~~~~~~~ ^ ~~~~~~~~~~
This is the companion to PR #766. It removes the CONFIG_CAN_PASS_STRUCT option as recommended by Issue #620
NuttX PR #766 depends on PR being in place but not vice versa. This PR should be merge-able without #766 and then PR #766 should also pass its checks.
Where:
* Under examples and testing
* And the default value is less than 2048
Using a bit more memory for examples and tests should not
be a critical problem.
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.
For now, I left the following instances because it isn't
clear to me why they are using the different values.
Maybe they need one-by-one inspection.
examples/igmp/Makefile:STACKSIZE = 1024
examples/powerled/Makefile:STACKSIZE = 1024
examples/powermonitor/Makefile:STACKSIZE = 768
examples/relays/Makefile:STACKSIZE = 512
examples/smps/Makefile:STACKSIZE = 1024
graphics/screenshot/Makefile:STACKSIZE = 4096
system/flash_eraseall/Makefile:STACKSIZE = 1024
testing/cxxtest/Makefile:STACKSIZE = 4096
testing/smart_test/Makefile:STACKSIZE = 4096
It seems in the time window mksymtab.sh redirect to symtab.c, there is chance symtab.c
would also be built meantime. Then if built before symtab.c write done, link errors may
occur. So use rename and mv operation to reduce the possibility.
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
In parallel build, for example maix-bit:module config, it reports:
nm: 'a.out': No such file
This is caused by FSROOT not populated with chardev when symtab.c
generated. So update SYMTAB_SRC dependency to fix it.
Change-Id: I5bb5d17db41f3bba98ae70a2acdd2ec594736611
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
During generating symtab.c, compile seqeuence would start with
incomplete symtab.c. This change will fix such a situation.
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
During generating symtab.c, compile seqeuence would start with
incomplete symtab.c. This change will fix such a situation.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
tcpblaster_server.c: In function 'tcpblaster_server':
tcpblaster_server.c:256:71: warning: passing argument 1 of 'localtime' from incompatible pointer type [-Wincompatible-pointer-types]
strftime(timebuff, 100, "%Y-%m-%d %H:%M:%S.000", localtime (&curr));
^
In file included from tcpblaster_server.c:50:0:
/usr/include/time.h:123:19: note: expected 'const time_t * {aka const long int *}' but argument is of type 'struct timespec *'
extern struct tm *localtime (const time_t *__timer) __THROW;
^~~~~~~~~
tcpblaster_client.c: In function 'tcpblaster_client':
tcpblaster_client.c:230:71: warning: passing argument 1 of 'localtime' from incompatible pointer type [-Wincompatible-pointer-types]
strftime(timebuff, 100, "%Y-%m-%d %H:%M:%S.000", localtime (&curr));
^
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Correct symtab dependency from build to populate instead, or tests
subdirectory programs would be built twice which resulted in errors
as below:
arm-none-eabi-ld: hello++3.o: file not recognized: file truncated
- changed incorrect Kb to correct KB in program output
- added readme
Squashed commit of the following:
commit b81821fd788eb08ffdf5a3084ab3d128788b75da
Author: Adam Feuer <adam@starcat.io>
Date: Mon Feb 24 16:58:29 2020 -0800
formatting improvements
commit a70e7109dd90522e6d7f680790d80c9328a8ba9c
Author: Adam Feuer <adam@starcat.io>
Date: Mon Feb 24 16:58:13 2020 -0800
formatting improvements
commit c11a5b3c8ee38fe080d121db87b7d26c0baf9f93
Author: Adam Feuer <adam@starcat.io>
Date: Sun Feb 23 17:03:22 2020 -0800
remove printf debugging statement
commit 94bcaa89d2df326ed2b560e935d344932c46607d
Merge: fddb3ee4 d6604922
Author: Adam Feuer <adam@starcat.io>
Date: Sun Feb 23 16:58:35 2020 -0800
Merge branch 'master' into feature/tcpblaster-improvements
commit fddb3ee4ee9ba185f0f4e01c205620bbcb02e40e
Author: Adam Feuer <adam@starcat.io>
Date: Sat Feb 22 16:29:51 2020 -0800
fixed typo
commit d398d6f3803d81e849814548be9671ac33f08168
Author: Adam Feuer <adam@starcat.io>
Date: Sat Feb 22 16:29:04 2020 -0800
logging now has timestamp; improved configuration
If an external file system is used but is not mounted by the the ELF example, then a compilation error will occur. This configuration problem has existed for a long time but was unmasked by a recent PR. In the failure mode, CONFIG_EXAMPLES_ELF_FSTYPE would not be defined because it depends on CONFIG_EXAMPLES_ELF_FSMOUNT which is not defined. The resulting mountpoint, MOUNTPT, would therefore be left in an invalid state. Previous changes to conditional logic now allowed setenv() to run and to attempt to set the PATH variable to MOUNTPT, causing a compile time failure like this:
CC: elf_main.c
elf_main.c: In function 'elf_main':
elf_main.c:113:32: error: expected ')' before 'CONFIG_EXAMPLES_ELF_FSTYPE'
# define MOUNTPT "/mnt/" CONFIG_EXAMPLES_ELF_FSTYPE
^~~~~~~~~~~~~~~~~~~~~~~~~~
elf_main.c:364:18: note: in expansion of macro 'MOUNTPT'
setenv("PATH", MOUNTPT, 1);
^~~~~~~
elf_main.c:364:3: error: too few arguments to function 'setenv'
setenv("PATH", MOUNTPT, 1);
^~~~~~
In file included from elf_main.c:47:
D:\Spuda\Documents\projects\nuttx\master\nuttx-fork\include/stdlib.h:158:11: note: declared here
int setenv(FAR const char *name, FAR const char *value, int overwrite);
^~~~~~
This problem was found during manual build testing using configuration lx_cpu:nsh.
Cannot call up_cpu_index() or any other nonstandard OS application interface. This not only breaks the portable POSIX OS interface but also would break any PROTECTED or KERNEL mode SMP implementation.
If you want to do something like this in user space, the appropriate thing to do would be to extend prctl(). That is non-posix, but is at least Linux-like and will work in all build modes.
This reverts commit 715517b1a0.
The sendmail example hasn't been used in years. I am not sure it was ever debugged. It is so old that it still expects hand editted .config files. As a result, all of the configuration settings were missing from the Kconfig file.
This commit adds the missing apps/examples/sendmail configuration settings so that the example at least builds. I cannot test it because I have no smtp server that I am willing to spam.
This configuration also adds missing configuration dependencies and runs the C files in apps/examples/sendmail and apps/netutils/smtp through nxstyle.
This commit resolves an issue reported by surya prakash rased in the Google group: https://groups.google.com/forum/#!topic/nuttx/idr-M164Y24
In stm32f4discovery:posix_spawn and lc823450-xgevk:posix_spawn parallel build,
it failed since apps/examples/posix_spawn/filesystem/romfs/hello is not available
which is needed by examples/posix_spawn/filesystem/symtab.c.
Change-Id: I588317396f8e3ca4d69d4ec8db8ccad219207048
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
chardev bin may not availabe before make install in parallel build,
so add install dependency on chardev BIN here.
Change-Id: If28451ceeeed0a6463544d8c342871cecda5a057
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
apps/netutils/dhcpd/dhcpd.c: Fix unused const variable
dhcpd.c:273:29: warning: 'g_anyipaddr' defined but not used [-Wunused-const-variable=]
static const uint8_t g_anyipaddr[4] = {0, 0, 0, 0};
apps/netutils/dhcpd: Make dhcpd interface configurable
apps/netutils/dhcpd: Lease address directly if hit in address range
apps/netutils/netinit: Initialize dhcpc_state
update the addresses only on request success
NuttX commit 346336bb9e5c9199b82e34d08bf23dd1bc389460 make CONFIG_NET_TCP_READADHEAD unselectable and removed all references to CONFIG_NET_TCP_READHEAD from the the NuttX repositories. However, there was no corresponding removal of CONFIG_NET_TCP_READHEAD from the apps/ repository. As a result, there was logic that depended on the selection of CONFIG_NET_TCP_READHEAD that could never be enabled.
This was found during build testing using the configuration olimex-lpc1766stk/thttpd-binfs. THTTPD was not being build fully because it had dependencies on CONFIG_NET_TCP_READHEAD. There resulted int numerous new warnings and, finally, the error:
(.../apps.examples.thttpd.o): in function `thttp_main':
thttpd_main.c:(.text+0x104): undefined reference to `thttpd_main'
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro
Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
apps\include" -Dmain udpblaster_target.c -o udpblaster_target.o
<command-line>:0:6: error: expected identifier or '(' before numeric constant
udpblaster_target.c:196:5: note: in expansion of macro 'main'
int main(int argc, FAR char *argv[])
1. Check NSH_NETINIT for self network initialization
2. Check NSH_ARCHINIT for sel arch specific initialization
3. Always show help regardless of NSH_BUILTIN_APPS
4. Loop forever regardless of NSH_BUILTIN_APPS, user could:
a.change the default behavior by the command line argument
b.or ctrl+c to break out the loop
apps/examples/webserver: Fix to compile with CONFIG_NETUTILS_HTTPD_SENDFILE=y
Also, in this PR, some configs such as CONFIG_NETUTILS_HTTPDFILESTATS
can be selected by menuconfig.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
apps/graphics/twm4nx: Other toolbar buttons need to be disabled while resizing. Lots of problems if you decide to iconify or exit while resizing. CResize now disables all buttons except for the RESIZE button while resizing.
apps/graphics/twm4nx: Add an event and logic to support notification of changes in the size of a window to NxTerm.
Various updates to adapt to change in boardctl() interface.
apps/graphics/twm4nx: Correct an error in the NxTerm resize logic
apps/graphics/twm4nx: Update debug output when failures to send a message occur. The returned value of -1 is not interested, need to show the errno value instead.
apps/graphics/twm4nx: Correct the maximum size of a message. Recent changes caused message send failures because a message exceed that previous maximum size.
apps/graphics/twm4nx: Fix routing of redraw events.
include/ and netutils/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
nshlib/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
system/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
testing/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
examples/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
Squashed commit of the following:
apps/examples/pwlines: The example is complete and verified.
apps/examples/pwlines: A little more progress between distractions.
apps/examples/pwlines: Beginning of another per-window framebuffer test/examples.
apps/examples/pwfb: Solve a race condition by changin some relative priorities. Also removes a delay kludge that used as a workaround.
apps/examples/pwfb: Add rate control. Examples becomes unstable at high update rates.
Squashed commit of the following:
apps/examples/pwfb: Fixes compile and early debug issues.
apps/examples/pwfb: Code complete!
apps/examples/pwfb: Flesh out the motion logic.
apps/examples/pwfb: Add an example/test case that will, eventually be used verify the per-window framebuffer logic. This is not even code complete at this point.
The patch provided in issue 135, which adds support for HTTP Chunked Encoding, covers all paths in the webserver app except CGI callbacks. As a result, if a page being served happens to use CGI, it could generate stream content that does not comply with HTTP Chunked Encoding.
The patch attached amends the webserver app's CGI callbacks to use the HTTP Chunked Encoding sender function instead of using send() directly.
Reviewers note: Reviewing the changes I also see that these file did not follow the NuttX codings standard. I ran all files through nuttx/tools/indent.sh, manually reviewed all files for coding style issues. I also changed occurrences of non-standard types u8_t, u16_t, and u32_t to the standard uint8_t, uint16_t, and uint32_t.