In the past a very low effort interface was used:
- All parmeters were treated as though they were type uinptr_t, and
- The maximum number of parmeters (6) was passed in all cases.
The first is potentially wrong and the second is very inefficient. This commit improves this by:
- Making tools/mksyscall.c more intelligent, and
- Extending the syntax for variadic functions.
For example, in syscall.cvs, the open() API was represened like this:
"open","fcntl.h","","int","const char*","int","..."
In reality, open may take only a single optional argument of type mode_t which is not the same size as uintptr_t. And there is not reason to pass 6 parameters in that case.
And this has been extended to:
"open","fcntl.h","","int","const char*","int","...","mode_t"
The existence of the "mode_t" tells tools/mksyscall that there is at most one optional parameter and, if present, it is of type mode_t.
There is case as below:
When do testbuild under Linux host, such as './tools/configure.sh stmf4discovery:nsh',
arch/arm/src/board is a symlink to boards/arm/stm32/stm32f3discovery/src. Then do
'./tools/refresh.sh --silent stmf4discovery:nsh' after build, it would break the board
symlink with copydir.sh instead of link.sh since defconfig with Windows host config.
So call sethost.sh to restore BOARD_DIR. Or it results in 'make distclean' not correctly.
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
In an older PR, the standard kconfig-tweak calls were replaced with sed edit. This is an incorrect change and results in invalid configurations. This change restores the use of kconfig-tweak and always generates correct configurations.
This change resolves issue #386
sed edits do not handle all of the dependencies correct and generates invalid configurations. Most defconfig files specify Linux by default, so you will only see the effect of the corruped configuration when sethost changes changes to a different configuration. Then, when 'make olddefconfig' is subsequentyly run, the corruption in the defconfig file is reflected by warnings such as:
$ tools/configure.sh -c stm32f4discovery:nsh
Copy files
Select CONFIG_HOST_WINDOWS=y
Select CONFIG_WINDOWS_CYGWIN=y
Refreshing...
.config:62:warning: override: reassigning to symbol HOST_WINDOWS
.config:62:warning: override: HOST_WINDOWS changes choice state
Those warnings are eliminated by this changed.
Tested by repeatedly doing:
tools/configure.sh -c stm32f4discovery:nsh
Commit 3b9efc95a2 introduced an error in the generation of include file paths. The logic that determined if cygpath should be called to create a Windows native path for the case of Cygwin using a native toolchain was incorrect. This corrects this warning:
./tools/configure.sh -c sim:nsh
$ make
<CUT>
make[1]: Entering directory '/home/btashton/apache/apps'
make[2]: Entering directory '/home/btashton/apache/apps/builtin'
./exec_builtin.c:54:10: fatal error: builtin/builtin.h: No such file or directory
54 | #include "builtin/builtin.h"
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ERROR: cc failed: 1
command: cc -MT ./exec_builtin.home.btashton.apache.apps.builtin.o -M -Wall -Wstrict-prototypes -Wshadow -Wundef -g -fno-builtin -fno-common -I. -isystem /home/btashton/apache/nuttx/include -D__KERNEL__ -pipe -I C:\cygwin64\home\btashton\apache\apps\include ./exec_builtin.c
make[2]: *** [/home/btashton/apache/apps/Application.mk:224: .depend] Error 1
make[2]: Leaving directory '/home/btashton/apache/apps/builtin'
make[1]: *** [Makefile:67: /home/btashton/apache/apps/builtin_depend] Error 2
In this case a Cygwin POSIX toolchain is being used by the path in the CFLAGS to apps/include is incorrectly a Windows native path. This error is corrected by this change to tools/incdir.sh
Remove tools/logparser.c. This tool converted 'git log' output into the format used by the obsoleted ChangeLog files. Since the ChangeLog files are obsoleted, the tool servers no purpose.
Since littlefs is in active development, it's not a good idea to use its
source code files directly. So upgrade littlefs v2.2.1 by using the littlefs
tar.gz release package instead.
Change-Id: I16d9cf0b6bca700a54ca86ed11d7c8c7f27a898f
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
since source code use these config as string constant not as variable name
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iaee3d32b100beb8b77d68711728a1e874b45ae3a
In https://github.com/apache/incubator-nuttx-apps/pull/179, there is a
removed graphics/littlevgl/lv_symbol_def.patch file whose content would be
treated abnormally and results in errors.
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Aim to let makefunc caller just pass in the target. So update makefunc to hardcode make/extra
flags options and redirection, meanwhile avoid the case in which makefunc would remove the quotes
for EXTRAFLAGS. Note that JOPTIONS should also hardcode once parallel build break finally fixed.
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Call 'tools/testbuild.sh -e -Wno-cpp testlist' would pass "EXTRAFLAGS=-Wno-cpp"
to make command line. Then it could suppress the warnings with pre-processor
directive #warning in GCC.
Change-Id: I61e5f9b3774149f64bdd625677cc9aabaa2fea90
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
So call 'make EXTRAFLAGS=-Wno-cpp' could suppress the warnings with pre-processor
directive #warning in GCC.
Change-Id: Iaa618238924c9969bf91db22117b39e6d2fc9bb6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>