Commit Graph

1101 Commits

Author SHA1 Message Date
Xiang Xiao
b2f3a4b5f9 tools/nxstyle: Support the white list
and add _Exit to the white list

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-28 21:07:57 +01:00
chao.an
fd3be9eb37 make/export: support export extra library
Change-Id: Iaab5dc8fd61b55888dad59d9b1d8380d7bd44a58
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-27 22:45:41 +01:00
chao.an
41f434015b make/export: do not extract object from librarys
To avoid overriding of objects with duplicate file name

Change-Id: I83c964d161d23942cd3fc29eb738da44775cfc10
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-27 22:45:41 +01:00
chao.an
e82a9e0f48 make/export: copy mkdeps.c for export build
Change-Id: Ic1aa04d5d4dd2332cf4a13ec51c76cdb7d90736c
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-27 22:45:41 +01:00
chao.an
98f0b0afb5 build/export: correct the export path
Change-Id: Ia2e19f30d32154c3329f46c5d8362fafd6b7e274
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-27 22:45:41 +01:00
Xiang Xiao
f3c046175d tools/version.sh: Make it invokable from everywhere
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-23 00:49:27 -07:00
Xiang Xiao
8b9876830e tools/zipme.sh: Add executable bit
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-23 00:49:27 -07:00
Xiang Xiao
9bf4b55073 tools/zipme.sh: Don't move the directory to nuttx/Documentation
and remove the redundancy of "cd ${TRUNKDIR}"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-23 00:49:27 -07:00
Xiang Xiao
062373af20 tools/zipme.sh: Fix the typo error
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-23 00:49:27 -07:00
David Sidrane
3ec12a84c2 Makefile.unix:versioning insure it is a .git dir
An out-of-tree build may have a .git file that is from a
  submodule. Once we find a .git file check if this is
  really a working dir.
2020-06-18 10:29:51 +08:00
Xiang Xiao
dde25b0f80 tools/nxstyle: Fix AddressSanitizer error
=================================================================
==2474==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7fffb7e59b5f at pc 0x561fffec79f6 bp 0x7fffb7e59ac0 sp 0x7fffb7e59ab0
READ of size 1 at 0x7fffb7e59b5f thread T0
    #0 0x561fffec79f5 in block_comment_width /home/xiaoxiang/mirtos/nuttx/tools/nxstyle.c:355

Address 0x7fffb7e59b5f is located in stack of thread T0 at offset 31 in frame
    #0 0x561fffec7b90 in get_line_width /home/xiaoxiang/mirtos/nuttx/tools/nxstyle.c:419

  This frame has 1 object(s):
    [32, 544) 'line' (line 420) <== Memory access at offset 31 underflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-underflow /home/xiaoxiang/mirtos/nuttx/tools/nxstyle.c:355 in block_comment_width
Shadow bytes around the buggy address:
  0x100076fc3310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100076fc3320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100076fc3330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100076fc3340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100076fc3350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x100076fc3360: 00 00 00 00 00 00 00 00 f1 f1 f1[f1]00 00 00 00
  0x100076fc3370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100076fc3380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100076fc3390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x100076fc33a0: 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3
  0x100076fc33b0: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==2474==ABORTING

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie7dee3cdfdbbd04ea9cdb58e227afef07073cecd
2020-06-16 09:56:22 -06:00
Brennan Ashton
0430c6ccc8 Add problem matching for gcc and nxstyle to github actions 2020-06-11 00:52:55 +08:00
YAMAMOTO Takashi
44585eeaf8 mkdeps: Use %zu/%zd printf format instead of casts 2020-06-03 18:30:36 +08:00
YAMAMOTO Takashi
16884407eb mkdeps: Quote CFLAGS to be safe with the shell
mkdeps uses system() thus a shell to execute cc.
it doesn't work if you have something like

    CFLAGS   += -DMBEDTLS_USER_CONFIG_FILE="<mbedtls/user_config.h>"

because the shell interprets "<" as a redirect.

to fix it, we should do either

    * make it shell-quote arguments

    * or, stop using system()

this commit implements the former.

some platforms provide easy ways to do the former.
eg. https://netbsd.gw.com/cgi-bin/man-cgi?shquote++NetBSD-current
but unfortunately none of them seems available widely.

i guess the latter approach is more common.
eg. 4464250282/usr.bin/mkdep/mkdep.c (L137-L154)
but i might be a burden for windows. (i don't know)
2020-06-03 18:30:36 +08:00
Gregory Nutt
0da3400009 ez80: Fix ez80 build problems.
arch/z80/src/Makefile:  Correct inclusion of non-existent file.  This was not a problem before because there was '-' before the include.  Problem revealed with '-' removed.

arch/z80/src/ez80/Toolchain.defs:  Apparently there are not too many '"' in path definition.

tools/incdir.c:  No space between -usrinc:  or -sysinc:  and the list of paths.
2020-06-02 13:20:51 -03:00
Gregory Nutt
18e4ab99cb Makefile: Build the tools/incdir binary immediately.
Before any other Make logic can be used, we must immediately build the tools/incdir binary.  It will be used as soon as Make.defs is included and will generate errors otherwise.

Remove the other locations in the tools/incdir binary was being build from tools/Makefile.unix and tools/Makefile.win
2020-05-31 15:05:23 +01:00
Ouss4
e018309e47 tools/Makefile*: Clean tools binaries at the end of distclean. 2020-05-31 15:05:23 +01:00
Gregory Nutt
e92c91cf09 tools/incdir.c: Various fixes to get a clean build
1. If config.c is compiled on any platform other than Cygwin, then the variable wintools is not used.
2. Add more debug output so we can see what is going on in the PR checks.
2020-05-30 01:05:34 +01:00
Gregory Nutt
5555070fc3 tools/: Hook incdir.c into build system.
incdir.c was added in PR 1148.  This PR hooks it into the build system.
2020-05-30 01:05:34 +01:00
Gregory Nutt
981734e577 tools/Makefile.host: Add incdir binary to Makefile.host
This was missed in PR 1148
2020-05-30 01:05:34 +01:00
Gregory Nutt
b111e135e0 tools/incdir.c: Add faster, C version of incdir.sh 2020-05-29 17:16:42 -03:00
liuhaitao
102c4c25e2 tools/testbuild.sh: Call makefunc with JOPTION directly
Also call configure.sh with JOPTION to enable parallel build

Change-Id: I32c4e77fb30c40d8d424159cc0871b8c3e3f10b6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-28 20:01:45 +08:00
liuhaitao
b5dc83748c build: Update make dependency to enable 'configure.sh config' parallel build
Note that 'configure.sh config -jn' with parallel build could reduce configure stage
time.

Change-Id: I3d63f1e316a7bc3437fc6c6c2da13c5313e69694
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-28 20:01:45 +08:00
liuhaitao
954d251dfe build: make sure nuttx bins generated after both pass1 and pass2 built done
Create the final NuttX executables after pass1 user libs and pass2 nuttx
libs built finished.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-27 06:28:05 -06:00
liuhaitao
6a9b3de0bb tools/testbuild.sh: fix testbuild.sh called without -e option fail issue
As in https://github.com/apache/incubator-nuttx/issues/1114 discuss, let
EXTRA_FLAGS="EXTRAFLAGS=" defaultly to avoid testbuild.sh called without
-e option fail issue. It also works well with -e "-Wno-cpp -Werror".

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-26 07:03:21 -06:00
liuhaitao
56e7a906e5 build: exit normaly once catch 'make depend' and 'make context' failure case
To be strict in check build, once any 'make depend' or 'make context' fails, exit normally.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-26 15:39:34 +08:00
Xiang Xiao
8b20b97d26 build: Remove the dummy drivers folder under boards
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao
e83c1400b6 build: Move BOARD_DIR definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao
7e5b0f81e9 build: Replace -I with INCDIR
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao
dd61d3d9f9 build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 18:00:40 +01:00
Xiang Xiao
02e028a595 tools/mkdeps: Fix the nxstyle problem
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 09:27:36 -06:00
Xiang Xiao
d2bb9bf2b4 tools/mkdeps: Always look in the current directory
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 09:27:36 -06:00
Xiang Xiao
2a2ffe41dd build: incdir.sh shouldn't check whether the path exist
since compiler never complain that the path(by -I) doesn't exist

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 09:27:15 -06:00
liuhaitao
adc0c3e459 build: parallel clean and distclean subdir build
Use absolute path for APPDIR which could be used by apps clean
and distclean subdir build. Parallel clean and distclean subdir
could save more build time.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-22 12:35:46 +01:00
Xiang Xiao
1a95cce1a3 build: Move .config check to the top Makefile
remove the workaround to handle the inexistence of .config/Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-20 17:57:34 +01:00
Gregory Nutt
3b62765edd nxstyle: Fix distinction be source and header file for long lines.
For some unknow reason, long lines were reported as WARNING is header files, but as ERRORS in C source file.  There are errors where ever they occur.
2020-05-19 20:09:57 -04:00
YAMAMOTO Takashi
48da64f9c2 Redo "Fix make target dependencies"
Change-Id: I7180145d90913fd3acc94487b9f7b9753dcdc8da
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-19 19:23:54 +01:00
Xiang Xiao
7faf3c0254 build: replace ${TOPDIR} with $(TOPDIR) in Makefile
make the usage consistence

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao
567962bd62 build: Move the extension definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao
5e7342bcf4 build: Move V definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao
8b42ee421a build: Move MKDEP definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao
9ec9431706 build: Move DIRLINK/DIRUNLINK definition to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao
6e94effeed build: Make all variables inside Configs.mk overwritable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Xiang Xiao
6c4ef7b1db build: mkexport.sh copy Config.mk to tools folder too
to avoid the duplication in apps/imports/Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 21:36:58 -06:00
Nathan Hartman
3334b40aef nxstyle: Allow Hz, KHz, GHz in identifiers
Per the coding standard, we allow MHz as one of the few allowed
exceptions to the identifier case rules.

However, because this exception specifically looked for "MHz" we
would generate undeserved nxstyle errors for Hz, KHz, GHz.

This change adds recognition of any Hz value by eliminating the
requirement for Hz to be preceded by M.

tools/nxstyle.c:

    * main(): Eliminate requirement for Hz to be preceded by M to
      match the rule for allowed mixed case identifier. Update
      relevant comments.

See:
https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#macros

Mailing list discussion archived at:
https://lists.apache.org/thread.html/r481b9d145f439c24c8d70992081bf670bc0e893167149e0017519439%40%3Cdev.nuttx.apache.org%3E
2020-05-18 18:00:10 -06:00
Xiang Xiao
5eae32577e build: Move INCDIROPT to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Xiang Xiao
bd656888f2 build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Xiang Xiao
3f83d2da30 tools/refresh.sh: replace cmpconfig with diff
since we want to catch the order difference too

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-11 12:24:58 -06:00
Xiang Xiao
b4dceaa88c tools/refresh.sh: shouldn't redirect "make oldconfig" to /dev/null
since kconfig need interact with user to make the selection

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-11 12:24:58 -06:00
Xiang Xiao
a6c82a27db tools/mksyscall: Unify the fixed and variable arguments process
Signed-off-by: Xiang Xiao <iaoxiang@xiaomi.com>
2020-05-08 10:38:05 -06:00
Xiang Xiao
e7e81dd74d tools/LibTargets.mk: Remove # from the action of syscall
this typo error make libstub.a is compiled without __KERNEL__

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-08 10:38:05 -06:00
liuhaitao
2c9f91205f tools/pic32: update pic32 scripts to fix jobserver unavailable warning
Always build mkpichex to make sure it newest, also correct target name.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-07 11:19:25 -03:00
Gregory Nutt
6906853f8e Improve proxy/stub parameter passing for variadic OS interfaces.
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.
2020-05-06 01:00:43 +01:00
YAMAMOTO Takashi
19cc84ed4a sim: Suppress no symbol warnings for macOS 2020-05-05 21:40:16 +08:00
Xiang Xiao
a2f657e4cb build: Move KDEFINE to a common place(tools/Config.mk)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 15:56:55 -06:00
Xiang Xiao
4b1dab84d1 tools/LibTargets.mk: Pass EXTRAFLAGS to all sub make
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 15:56:55 -06:00
Xiang Xiao
f2aba8d9b7 build: Remove 'u' prefix from userspace library
so user needn't link the different library because the build type change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 15:56:55 -06:00
Xiang Xiao
eca7059785 Refine __KERNEL__ and CONFIG_BUILD_xxx usage in the code base
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 10:43:47 -03:00
liuhaitao
6b4cc3011c Remove the residual files in distclean
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-01 04:43:15 +01:00
liuhaitao
97afe1c402 tools/refresh.sh: restore BOARD_DIR when refresh with a different host
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>
2020-04-28 21:28:15 -07:00
Xiang Xiao
f2f1d4de85 toots/testbuild.sh: Remove .version manually after distclean
since distclean has to keep this file for the release package

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-28 21:28:15 -07:00
Xiang Xiao
ee9daea586 Remove the residual files in the distclean action
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-28 21:28:15 -07:00
Xiang Xiao
0932f08b93 tools/zipme.sh: Let major.minor.patch argument optional
since version.sh can generate this information for us

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-28 18:34:49 +01:00
Xiang Xiao
7ffccf738c Makefile: Remove KERNEL variable which isn't really used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-28 09:01:58 -06:00
Gregory Nutt
100bd740cd tools/sethost.sh: Correct error in setting a different host.
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
2020-04-27 21:26:21 +01:00
Gregory Nutt
e11c1e7cb3 tools/incdir.sh: Correct error in select of include path
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
2020-04-27 16:11:26 +01:00
Gregory Nutt
6168f3ebf0 Remove tools/logparser.c
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.
2020-04-24 20:55:08 +01:00
liuhaitao
fe0ba38580 fs/littlefs: upgrade littlefs to v2.2.1
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>
2020-04-23 09:31:21 -06:00
Xiang Xiao
fc8522cc97 tools/testbuild.sh: check status after make distclean
ensure the distclean remove all generated stuff

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-21 16:15:48 -06:00
Xiang Xiao
816f624819 tools/Makefile.host: Initialize Q by inspecting V
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:07:32 -06:00
Xiang Xiao
95e5506637 tools/testbuild.sh: Verify nuttx/apps folder clean after build
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:07:32 -06:00
Xiang Xiao
48e6b97ca7 tools/testbuild.sh: Check defconfig in the canonical format
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:07:32 -06:00
Xiang Xiao
c153c31fbd tools/refresh.sh: Save defconfig and exit with 1 only when the difference exist
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:07:32 -06:00
Xiang Xiao
5c1497aeb1 tools: Remove the temp variable in checking program exit code
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:07:32 -06:00
Xiang Xiao
cf674ed51c checkpatch.sh: Simplify the code logic, no functional change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-20 07:07:32 -06:00
Ouss4
2c58b11e50 tools/: Update version generation tools to account for the patch number. 2020-04-18 11:47:37 -07:00
Xiang Xiao
b5a2c7a304 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-17 10:09:52 -06:00
Xiang Xiao
89ff9eb046 tools/cfgdefine.c: Remove some string config variable from the dequote list
since source code use these config as string constant not as variable name

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iaee3d32b100beb8b77d68711728a1e874b45ae3a
2020-04-17 10:09:52 -06:00
YAMAMOTO Takashi
e67062fd88 Config.mk: Provide the default MODULESTRIP
Similarly to MODULECC/MODULELD.
2020-04-16 16:04:11 -06:00
liuhaitao
773f540d74 tools/checkpatch.sh: enhance added files judgement with +++ at the line beginning
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>
2020-04-16 17:12:57 +08:00
YAMAMOTO Takashi
ac18fc0216
Merge pull request #792 from liuguo09/testbuild
tools/testbuild.sh: update makefunc to hardcode make/extra flags opti…
2020-04-15 15:50:06 +09:00
Nakamura, Yuuichi
d9472bb625 Fix nxstyle to mksyscall.c 2020-04-15 14:43:05 +08:00
liuhaitao
ed7d1dc611 tools/testbuild.sh: update makefunc to hardcode make/extra flags options and redirection
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>
2020-04-15 11:10:55 +08:00
liuhaitao
032a04f4d6 checkpatch: Update checkpatch readme and remove addition blank line
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-14 12:31:48 +08:00
Ouss4
e174f73010 tools/zipme.sh: Create the hashes unconditionally. 2020-04-12 07:54:32 -06:00
liuhaitao
2427febba9 tools/testbuild.sh: add -e option to append extra c/c++ flags build support
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>
2020-04-11 08:31:08 -06:00
liuhaitao
459ad99373 Use EXTRAFLAGS instead of EXTRADEFINES to be used by make via command line
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>
2020-04-11 08:31:08 -06:00
Abdelatif Guettouche
398175b2ae
tools/zipme.sh: Add the possibility to PGP sign the final tarballs. (#756)
* tools/zipme.sh: Add the possibility to PGP sign the final tarballs.
* tools/README.txt: Update the file to add zipme.sh's new commands.
2020-04-08 17:31:22 -06:00
hartmannathan
bfc153ca27
Fix typos in comments and documentation (#750)
* Fix typos in comments and documentation
2020-04-08 06:45:35 -06:00
Ouss4
13f0442b63 tools/zipme.sh: Improve the tool to make it usuable from a development repo
and for future Apache releases.

 - Rename the final tarball to add incubating and apache to their names

 - Make the tool usuable from a development repo.

 - Add a list of patterns(files and folders) to exclude and
a command line argument to pass aditional patterns.

 - Add a command to run silently.

 - If the build number was not provided let version.sh figure it out.
2020-04-07 11:14:18 -06:00
Gregory Nutt
58589db931 tools/nxstyle.c: Fix detection of long single line comments.
This resolves issue 718:  nxstyle line width check was ignoring the line width check for single line comments.

This turned out to be an artifact in parsing.  Usually when parsing character by character, the file character to be parsed was '/n'.  Howefver, in the case of parsing single line comments, the final character was the NUL terminator.  This means that the lenth check was not being performed in the case of single line comments.

NOTE:  Currently, I have suppressed error reports for single line right-hand comments.  My fear is that this will unmask more standard violations than we can cope with.  It is easy to re-enable and perhaps we should do that in the future:

          /* Check for long lines
           *
           * REVISIT:  Long line checks suppressed on right hand comments
           * for now.  This just prevents a large number of difficult-to-
           * fix complaints that we would have otherwise.
           */

          if (m > g_maxline && !rhcomment)  <-- remote the second condition
2020-04-06 19:47:57 +01:00
raiden00pl
15242a65b6 tools/nxstyle.c: handle scientific notation with a negative exponent (eg. 9e-10) 2020-04-03 10:47:32 -06:00
Ouss4
765833546c tools/: Fix trivial typos. 2020-04-03 10:42:09 -06:00
YAMAMOTO Takashi
8851d3a7d3 testbuild.sh: Make the use of "git clean" optional
Also, update the list of command line options in the help text.
2020-04-03 12:43:05 +08:00
Gregory Nutt
65739a38fb tools/nxstyle.c: Alloc MHz in pre-processor variable names.
The sub-string MHz is used frequently is pre-processor variable definitions.  The section "Lowercase Exceptions" permits reasonable use of lowercase characters in pre-processor variable names and, given the frequency of the use of MHz (no pun intended), it certainly should qualify.
2020-04-02 20:29:26 +01:00
YAMAMOTO Takashi
27142b2e3c testbuild.sh: Use git clean instead of make distclean
As the former is considerably faster.
2020-04-02 13:40:05 +08:00
Gregory Nutt
a34e5fc043 tools/nxstyle.c: All Public Function Prototypes in C files
Allow "Public Function Prototypes" sections in .c files.  Per the coding standard, all public function prototypes belong in .c files.  However, there are some situations when the public function prototype is needed in a .c file and it shoudld, most correctly, be placed in a "Public Function Prototypes" section.
2020-04-01 22:57:51 +01:00
YAMAMOTO Takashi
03715743a3 testbuild.sh: Add an option to show the list of configs
This was useful for me when tweaking testlists.
2020-04-01 14:04:37 +08:00
Gregory Nutt
7f510a61b4 tools/nxstyle.c: Add fixedmath.h defines to white-listed prefixes
Checking for white-listed prefixes is also simpler now because the check is table driver.  New data structure:  g_white_prefix[] and new function white_prefix().
2020-03-31 19:26:26 +01:00
YAMAMOTO Takashi
4c0783353a tools/testbuild.sh: Make blacklist work on macOS
I couldn't find where "\b" was documented.
I guess it's a zero-width word boundary or something like that.
Anyway, it doesn't seem to work on macOS.
2020-03-29 09:39:11 +01:00
YAMAMOTO Takashi
35e1aa82cb tools/testbuild.sh: Allow spaces in comments 2020-03-28 11:23:42 -05:00
YAMAMOTO Takashi
18c574d66a Config.mk: Provide the default MODULECC/MODULELD
In some cases, a separate toolchain is necessary to
build modules.
E.g. the sim on macOS, where the native format is Mach-O.

By default, just use CC/LD, which is appropriate for
the most of platforms.
2020-03-27 00:04:36 -05:00
Gregory Nutt
5c0e8e88b1 Revert "Makefile: move INCDIROPT to common place (#625)"
This reverts commit b9ace36fcc.

This change was added by PR 625 but has a serious logic flaw.  It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk:

    else ifeq ($(WINTOOL),y)
      DEFINE = "$(TOPDIR)/tools/define.sh"
      INCDIR = "$(TOPDIR)/tools/incdir.sh" -w

This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined.  As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain.
2020-03-26 08:50:29 -07:00
Xiang Xiao
b9ace36fcc
Makefile: move INCDIROPT to common place (#625) 2020-03-26 08:09:59 -06:00
liuhaitao
272a1460c5 Revert "tools/testbuild.sh: suppress lots of stdout log from configure.sh"
f6fc87bc36 commit silence configure.sh
make output defautly, so revert it.

This reverts commit f0267aff33.
2020-03-23 22:04:27 -05:00
Ouss4
f6fc87bc36 tools/sethost.sh & tools/configure.c: When no make argument is passed, silence the make output. 2020-03-23 19:56:11 -05:00
Xiang Xiao
e1385b1074 tools/Config.mk: CATFILE clear the existing file
To simplify the caller usage
2020-03-23 12:23:05 -06:00
Xiang Xiao
aaa32156df tools/Config.mk: implement a simple version of TESTANDREPLACEFILE for Windows 2020-03-23 12:22:50 -06:00
liuhaitao
f0267aff33 tools/testbuild.sh: suppress lots of stdout log from configure.sh
Redirect configure.sh stdout to /dev/null to suppress lots of log
since configure.sh behaviour updated.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-03-21 22:45:02 -05:00
Miguel Herranz
d410a29693 Support to run NuttX on ESP32 QEMU 2020-03-21 14:03:07 -06:00
Gregory Nutt
652e152d66 tools/nxstyle: Ignore stub names that begin with STUB_*
The names use for stub functions follows a non-standard convention:  They begin with STUB_
2020-03-21 19:06:32 +01:00
Xiang Xiao
0456b70cd5 tools: Remove ; after break for all shell script
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-03-21 09:48:57 -07:00
Xiang Xiao
580364362c tools/refresh.sh: Support passing the multiple configuration
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id3d4464e2d30871763b40067b3162b793e99c98f
2020-03-21 09:48:57 -07:00
Xiang Xiao
86e47534e6 tools: Remove -d option from configure.sh
since we can achieve the same effect by passing V=1 to make

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-03-21 09:48:57 -07:00
Xiang Xiao
a54a492dd2 tools/configure.sh: Support passing options to make
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I6c928ac4574721aacb87be27c979ca8ae146a4ce
2020-03-21 09:48:57 -07:00
Xiang Xiao
024024f468 tools: Sync Makefile.win with Makefile.unix
and fix the typo error and remove if/else nesting

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ife0c80d396417e8eb37e43d0883f272d4b9247a0
2020-03-21 09:48:57 -07:00
Xiang Xiao
76bfaecca6 tools/configure.c: Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-03-21 09:48:57 -07:00
Xiang Xiao
c4ea4e976d tools/configure.sh: Add -e option to invoke distclean if already configured
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I19eddc3d4e6650eace2482c3cce8fbb07aadc04b
2020-03-21 09:48:57 -07:00
Xiang Xiao
1653b29542 Revert "tools/configure.*: Add -s option to skip .config/Make.defs existence check."
This reverts commit bf3ffddf2f.

Change-Id: Ia858ca1aab79a6c599cf93d2701515951bdc7b80
2020-03-21 09:48:57 -07:00
Johannes Schock
898141300c Don't check position of comments right of code when separated by preprocessor line without comment. 2020-03-19 09:36:57 -06:00
Xiang Xiao
5d6d9eeb82 tools/refresh.sh: Invoke make with V=1 if receiving -d option 2020-03-19 07:55:25 -06:00
Xiang Xiao
6f3ef32feb tools/refresh.sh: Should detect Make.defs from config folder first 2020-03-19 07:55:10 -06:00
Xiang Xiao
6f9117eae2 tools/sethost.sh: Remove <config> argument
Since this argument generate the expanding(deprecated) defconfig
2020-03-19 07:54:57 -06:00
Xiang Xiao
b574ea8b73 tools/sethost.sh: Don't make clean_context explicitly
Since olddefconfig will do this automatically
2020-03-19 07:54:43 -06:00
Xiang Xiao
8a6d67d138 tools: Make sethost.sh can be invoke from any directory 2020-03-19 07:54:30 -06:00
Johanne Schock
cdf615855a Added assembly header detection. 2020-03-14 08:38:39 -06:00
Xiang Xiao
d06cacb2f7 tools/refresh.sh: ad --nocopy option to skip copy defconfig (#563)
So we can normalize and copy the current .config to defconfig
2020-03-13 09:45:20 -06:00
Johanne Schock
645cf6d547 Handling of struct initializers changed.
Break conditionals with || at the end.
2020-03-13 07:58:52 -06:00
Xiang Xiao
4686d7cf57 tools: Support invoke refresh.sh from any directory 2020-03-13 06:24:49 -06:00
johannes-nivus
45196cad17
tools/nxstyle.c: Check for missing space before closing comment faulty (#543)
*Addresses Issue #540, check for missing space before closing comment was faulty
2020-03-11 11:08:01 -06:00
David Sidrane
0db4529d8b Add some helpful documentation in checkpatch.sh. 2020-03-10 13:22:32 -05:00
liuhaitao
aa4052936c tools/nxstyle: clean up the no and unknown file extension info
Clean up the no and unknown file extension info since only .h and .c
files supported. Just ignore them quietly.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-03-10 08:43:23 -06:00
Johanne Schock
0b4ffa20a8 Checks for multiline comments right of #el..., changes message for a certain case of a comment following a right of code comment 2020-03-10 07:06:35 -06:00
liuhaitao
842b0c54d4 checkpatch: add checkpatch.sh README and correct some typos
Change-Id: Ib917dae235dc42fa2fa29e40c925f8fd048131df
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-03-10 11:13:03 +01:00
Johanne Schock
f764947c73 Signal error for multiline comment right of #if 2020-03-09 10:00:26 -06:00
Johanne Schock
745e0a4ca9 Some more fine tuning
Handle #define different than other preprocessor lines
Ignore backslash at the end of a comment right of a preprocessor line
2020-03-09 10:00:26 -06:00
Johanne Schock
5e5b6c2069 Finetuning false positive 2020-03-09 10:00:26 -06:00
Johanne Schock
fbe65a2d7d Restrict check of right of code comments to #define in case of preprocessor lines 2020-03-09 10:00:26 -06:00
Johanne Schock
46b8347217 Style 2020-03-09 10:00:26 -06:00
Johanne Schock
b324596bac Formatting 2020-03-09 10:00:26 -06:00
Johanne Schock
574344c56e Changes to nxstyle which address issue #120 and add checks for column position of right of code comments 2020-03-09 10:00:26 -06:00
Johanne Schock
62c2b4aac7 nxstyle fixes
fixed coloumn number of error messages PR #487
fixed lineno_min = lineno_min
2020-03-08 07:29:30 -06:00
Johanne Schock
77d02e98a0 Implemented comment processing for preprocessor lines 2020-03-08 06:36:54 -06:00
Ouss4
9be72e0706 tools/pic32: Make the post build process depend on INTELHEX_BINARY, as
it converts a hex file.
Build the tool if it didn't exist.
2020-03-07 09:34:52 -06:00
Xiang Xiao
0d02168d28 toos/testbuild.sh: Remove the below warnning in nightly build
====================================================================================
Configuration/Tool: lm3s6432-s2e/nsh,CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL

Change-Id: I95cd6f0c00f68c68f9175574d44e75e24c41bc12
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Copy files
  Select CONFIG_HOST_LINUX=y
  Refreshing...
  Disabling CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL
  Enabling CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL
  Refreshing...
.config:1542:warning: override: reassigning to symbol ARMV7M_TOOLCHAIN_GNU_EABIL
  Building NuttX...
------------------------------------------------------------------------------------
2020-03-07 09:32:39 -06:00
Ouss4
9daa8441e3 tools/pic32: Add the Config.mk file to execute the post build script.
Update Make.defs and README.txt files in boards directory accordingly.
2020-03-07 08:35:20 -06:00
Ouss4
0d88073644 toos/pic32: Some cosmetic changes.
- Rename the folder to PIC32.
  - Rename the Makefile to Makefile.host
  - Run nxstyle on the C file.
  - Change licenses to ALv2.
2020-03-07 08:35:20 -06:00
David Sidrane
c5b4d9b628 nxstyle:nxstyle should pass nxstyle checks! 2020-03-07 08:31:36 -06:00
David Sidrane
8b1dc2825f Update nxstyle.c 2020-03-06 15:49:59 -06:00
Gregory Nutt
3ee1af5bcc Build System: Resolve CPU-specific logic in common build files
* tools/Config.mk - Add empty definition POSTBUILD
* tools/Makefile.unix/win - Replace CXD56xx specific logic with $(call POSTBUILD)
* boards/arm/cxd56xx/scripts/Config.mk - Add POSTBUILD definitions with logic removed from Makefile.unix/win
* boards/arm/cxd56xx/spresense/scripts/Make.defs - Include the CXD56xx Config.mk immediately after tools/Config.mk so that the empty POSTBUILD definition will be replaced with the correct one

NOTE: There is a precedent for this approach.  This is the way that other architecture-specific build options are implemented.  See, for example, tools/zds/Config.mk
2020-03-06 11:44:53 -06:00
YAMAMOTO Takashi
45a8edd227 nxstyle: Output line numbers when complaining on block comments length 2020-03-06 07:25:52 -06:00
YAMAMOTO Takashi
0715ab3132 Revert "tools/nxstyle: Back out part of last commit. Logic to avoid some false alarms was causing real style problems from being reported."
If we are going to use this tool for things like
git pre-commit hook or CI workflow, it's critical to
avoid false alarms.

This reverts commit de764af9aa.
2020-03-06 07:25:11 -06:00
YAMAMOTO Takashi
4879f2225e nxstyle: Don't complain on ELF things like Elf32_Hdr 2020-03-05 21:18:12 -06:00
YAMAMOTO Takashi
e5ea0ac32d nxstyle: Don't parse a file if its type is unknown 2020-03-05 20:18:11 -06:00
YAMAMOTO Takashi
aa205b3732 mkexport: Deal with ARCHSCRIPT containing multiple files
This fixes "make export" for esp32-core.
2020-03-03 08:10:06 -06:00
liuhaitao
58318bbc28 tools/testbuild.sh: prevent grep from exiting in case of nomatch
Prevent grep from exiting in case of nomatch for blacklist when testbuild.sh called
with -x option which set -e in bash.
2020-03-03 08:06:40 -06:00
YAMAMOTO Takashi
aa40e28862 Make it clear the timestamp of pass1 directory is not important 2020-02-26 10:20:10 -06:00
Xiang Xiao
852fc8b9d9 Revert "Fix make target dependencies"
This reverts commit 5f540d79a1.
2020-02-26 07:31:40 -06:00
YAMAMOTO Takashi
5f540d79a1 Fix make target dependencies
"all" and "depend" targets should not be made concurrently.
I occasionally see APPDIR build failures because of this.
2020-02-25 21:09:32 -06:00
YAMAMOTO Takashi
f01953d364 mksyscall: Suppress "'noreturn' function does return" warnings 2020-02-25 04:07:02 -06:00
Xiang Xiao
cec7949a39
tools/checkpatch.sh: Add code spell check to checkpatch.sh (#371) 2020-02-25 10:28:05 +01:00
Adam Feuer
7fa1486181 simulator network host route helper script and docs
Squashed commit of the following:

commit 685951b5385062035ac558df1112353c9441c910
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:33:00 2020 -0800

    fixed typo in readme

commit ad1d3289b48af0de3095e3f365429017e57278b3
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:07:48 2020 -0800

    simulator host route helper script and docs

    Squashed commit of the following:

    commit cf5cddcf55a155303cb5abb1aa026f6dcaf369ca
    Author: Adam Feuer <adam@starcat.io>
    Date:   Mon Feb 24 15:50:40 2020 -0800

        syslog on console to fix compile error

    commit def1bb73fcfbc8b115c55d9f4544b97d583807f2
    Author: Adam Feuer <adam@starcat.io>
    Date:   Mon Feb 24 15:46:13 2020 -0800

        formatting as per PR feedback; removed ping

    commit b179fd8831b77fbbe85527a4ab3161e1f1ca1e43
    Author: Adam Feuer <adam@starcat.io>
    Date:   Mon Feb 24 15:45:49 2020 -0800

        formatting as per PR feedback

    commit e3280bede9798d9a00b118e126c02ceab497e33a
    Author: Adam Feuer <adam@starcat.io>
    Date:   Mon Feb 24 13:56:50 2020 -0800

        add simhostroute.sh description to readme

    commit 09a6b0ca3bacf005c2a79102141ae8cc3eb91849
    Author: Adam Feuer <adam@starcat.io>
    Date:   Sun Feb 23 17:38:40 2020 -0800

        fixed error in simhostroute.sh usage docs

    commit d838582119d43ee2002ce3808051c82b23e98c58
    Author: Adam Feuer <adam@starcat.io>
    Date:   Sun Feb 23 17:28:35 2020 -0800

        added tcpblaster defconfig and updated docs

    commit af3d2d6591f12d1127027fdd363858052094e624
    Author: Adam Feuer <adam@starcat.io>
    Date:   Sun Feb 23 17:21:29 2020 -0800

        added info about capabilities and running as root

    commit 6359cfdfedefc818b169455401942d3d33a59f41
    Author: Adam Feuer <adam@starcat.io>
    Date:   Sun Feb 23 17:20:42 2020 -0800

        updated network linux readme

    commit 47feb08aa74e4b1fc6c802567bc777d31e7c9a83
    Author: Adam Feuer <adam@starcat.io>
    Date:   Sun Feb 23 17:09:04 2020 -0800

        initial addition
2020-02-24 20:20:25 -06:00
Adam Feuer
511e548613 Ethernet Over USB net helper script and docs
- for CDC ECM driver

Squashed commit of the following:

commit aa9a715498e15ad46d43318a663d296f38160cf8
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:42:52 2020 -0800

    code formatting; removed ping

commit 56520b7f7e2b7f03697eacc2f2b5450b0f7af676
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:42:32 2020 -0800

    add description of netusb.sh helper script

commit afee3d33b1e66138afb7e9713d86b765ceab55b0
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Feb 24 16:41:40 2020 -0800

    readme formatting

commit 772e36021f4aee2ba1df408ad29d8b9adedeed9f
Author: Adam Feuer <adam@starcat.io>
Date:   Sun Feb 23 11:38:50 2020 -0800

    updated readme, removed redundant configs

commit 082785178aa6e0d1578034b4b163785fdcb61f22
Author: Adam Feuer <adam@starcat.io>
Date:   Sat Feb 22 17:40:05 2020 -0800

    README, defconfig, and helper script improvements
2020-02-24 20:13:31 -06:00
Gregory Nutt
90eed5c8f8 tools/zds/zdsar.c: Use shorter, relative paths
This tools needs to CD to directory holding the library because it requires that the library be in the current working directory when objects are inserted.  Previously, the tool did this by creating an absolute path to the object file itself.  So instead of the object file being in the current directory and the library in a directory at an absolute path, this tool used an abolte path to the object file with the library in the current directory.

For the most part, that worked fine.  However, in the apps directory the object file names are greatly extended in length.  In the object file name was extended to a full absolute path and these huge file names were were exceeding some internal limit within the ZDS-II librarian.  But useing shorter, relative paths, we were able to avoid hitting this limit and the entire build completed correctly.
2020-02-24 22:37:28 +01:00
Gregory Nutt
e6f545beab Extend revised ZDS-II support to z8 and z16f
* tools/zds/zds_Config.mk: Move  boards/z80/ez80/scripts/eZ80_Config.mk to tools/zds/zds_Config.mk where it can be shared by other ZDS-II platforms.
* boards/z16/z16f:  Duplicate changes for new ZDS-II support from ez80
* boards/z80/z8:  Duplicate changes for new ZDS-II support from ez80
* arch/z16/src/z16f/Toolchain.defs:  Create required Toolchain.defs file for Z16f
2020-02-24 22:37:28 +01:00
Gregory Nutt
d1a8a803e4 Build system: Get rid of the MOVEOBJ definition
Eliminate the MOVEOBJ definition from tools/Config.mk, Makefiles, and other locations.  The MOVEOBJ definition was used to work around the case where the object output of a compile or assemble is in a different directory than the source file.  The ZDS-II tools have no command line option to perform this move; MOVEOBJ handled the move as a post-compiler operation.

MOVEOBJ is no longer needed because this the ez80 COMPILE and ASSEMBLE definitions now handle all of the object file movement cases.
2020-02-24 22:37:28 +01:00
Gregory Nutt
75be4c5677 ZDS-II Object file relocations
tools/zds/zdsgen.c:  Remove this program.  It should have been a simpler way to manage ZDS-II compiler and assember differences.  However, the compiler arguments needed to pass through too many layers of bash command line modifications and, as a result, it was not possible to retain quotes on critical strings.  This approch was abandoned for an alternative approach.

boards/z80/ez80/scripts/eZ80_Config.mk:  Add definitions to move the object files as necessary.  This seems to work well and is implemented for both native and Cygwin Windows build -- but only for the Z20x.
2020-02-24 14:38:39 -03:00
Gregory Nutt
9cd188e3c7 tools/zds/zdsgen.c: WIP Compiler/Assembler Wrapper
And additional wrapper that is needed for the ZDS-II build is a wrapper for the compiler and assemble.  This is needed because the ZDS-II cannot control the name or location of the output of the output object file:  it is always in the same directory as the source file and with the same name as the source file except with the .obj extension.

This was handled in the past with the MOVEOBJ definition which was specifically called Makefiles to move the objects to the correct position.  However, now there is a new behavior:  Output object files may also be named differently with added decoration in the file name.  This is done in the current apps/ directory build.

There is currently some ugly implementation that includes a long sequence of Bash code to handle the moving and/or renaming.  There is nothing in place for the Windows native case.

This wrapper, when complete, will clean up the Makefiles, improve build performance, and provide a solution that is portable to both the Cywin/MSYS environment as well as to the Windows native environment.
2020-02-23 21:44:18 -06:00
Xiang Xiao
cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Gregory Nutt
55a7dfc9a7 tools/zds/zdsar.c: Fix several errors
This zdsar librarian wrapper is code complete and has no known bugs.
However, there are still some build instabilities so perhaps there
are still some bug to be identified.  Or perhaps there are other
undiscovered bugs unrelated to zdsar which appears to be behaving
correctly in all cases.

It will take some additional testing know for sure.
2020-02-23 18:15:24 -03:00
Gregory Nutt
4bf2a1ee91 tools/zds/zdsar.c: Correct memory corruption bug
A pointer to a string in a memory buffer was losing its value.  The reason was that the buffer was occasionally being used for other purposes.  The fix is to strdup() the string so that there is a private, protected copy.
2020-02-23 13:18:27 +01:00
Gregory Nutt
738819b053 tools/zds: Add build tools to simplify ZDS-II tool usage
tools/zds:  A new tool sub-directory intended to hold tools for making life working with the ZDS-II toolchain less painful.

tools/zds/zdsar.c:  This is a wrapper around the ZDS_II librarian.  It simplifies the build scripts by replacing large sequences of complex Bash script that were added to the build files.  Not only does this clean up the build files but it also improves performance and, more importantly, provides a common solution for the Windows native build case.  This tool should work with all ZDS-II based platforms including z8, zNeo, and ez80.

tools/README.txt:  Add a brief description about the zds sub-directory.  Also re-ordered some tool descriptions.  They are supposed to be in alphabetical order, but this seems to have fallen apart.

boards/z80/ez80/scripts/eZ80_Config.mk:  Updated to use tools/zds/zdsar.exe.
2020-02-22 19:33:35 -03:00
Xiang Xiao
bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Gregory Nutt
54be203107 boards/z80/ez80/scripts/eZ80_Config.mk: Fix ez80 build
This includes some fixes for the ez80 build including:

1. Ability to handle decorated object file names,
2. Ability to handle libraries described with absolute paths

This commit address only the POSIX build and needs to be updated
for the Windows native build.
2020-02-22 00:59:44 +01:00
Xiang Xiao
4d16eeb435 Make.defs: Fix flock: failed to execute @: No such file or directory
Remove $(Q) in ARCHIVE which is added back in commit fd3e2c5916 accidentally
2020-02-21 07:35:24 -06:00
Alan Carvalho de Assis
fd3e2c5916 Make.defs: Fix printed "|| { ar blablabla FAILED!" after $(Q) removed 2020-02-20 19:43:52 -06:00
Xiang Xiao
342f76a529 Makefile: Remove @echo from ARCHIVE
to avoid shell complain that @echo can't find if the variable expand in the compound
command(e.g. ARLOCK) and remove $(Q) before $AR so the result is almost same as before.
2020-02-20 08:32:09 -06:00
liuhaitao
ba265e90d6 tools/testbuild.sh: select size_t to different type by testlist
testbuild.sh select size_t to different type by testlist in which
CONFIG_ARCH_SIZET_LONG defined for ulong and -CONFIG_ARCH_SIZET_LONG
for uint.
2020-02-18 08:34:36 -06:00
Xiang Xiao
e7d9260014 arch: Customize the typedef of size_t instead of intptr_t
To ensure size_t same as toolchain definition in the first place and rename CXX_NEWLONG to ARCH_SIZET_LONG.  The change also check whether __SIZE_TYPE__ exist before CONFIG_ARCH_SIZET_LONG so our definition can align with toolchain(gcc/clang) definition automatically.
2020-02-18 07:15:19 -06:00
liuhaitao
05391da6b8 tools/checkpatch.sh: do full file check for commits and patches defaultly
Make 'checkpatch.sh -c commits' and 'checkpatch.sh -p patches' do full
file check as default, while 'checkpatch.sh -r -c commits' and 'checkpatch.sh
-r -p patches' do ranges check only.
2020-02-17 08:18:44 -06:00
Gregory Nutt
75e3af0985 tools/nxstyle: Allow mixed case system calls.
System calls have mixed case.  They begin with SYS_ but then are followed by the system function name in lower case.
2020-02-14 17:22:18 +01:00
YAMAMOTO Takashi
842392beda Makefile.host: Use generic name (cc) than GCC specific (gcc)
This makes it easier to use clang on ubuntu.
2020-02-13 15:25:15 +08:00
liuhaitao
7ec66ccf94 Get the full directory name of the testbuild.sh no matter where called from
Change-Id: I00cab8d97acb8e436622c0bdd4bc4bfe7374bca3
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-02-10 09:01:35 -06:00
Gregory Nutt
20f29e60e3 tools/testbuild.sh: Remove bad line from usage help. 2020-02-09 20:05:44 +01:00
liuhaitao
f4d8c184b0 tools/checkpatch.sh: make sure fail get the real return error value
Do not use pipeline way and make sure fail to record the real exit error value.
2020-02-09 07:51:27 -06:00
liuhaitao
48f1793a60 tools/testbuild.sh: make sure fail get the real return error value 2020-02-08 07:33:54 -06:00
Xiang Xiao
a8de37fbec Ensure all source code end with one and only one newline
by this command:
git ls-files -z | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2020-02-08 07:25:56 -06:00
liuhaitao
3b311ab895 tools/testbuild.sh: use function to call make and fail handle in common
Change-Id: I50cbc335254be0f2388b4bb6af8a874e74ba98c2
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-02-07 13:56:23 +01:00
YAMAMOTO Takashi
afd03f5a7e sethost: If no host options are specified, try to guess 2020-02-06 18:01:48 +08:00
Gregory Nutt
dfcbc42679 tools/nxstyle.c: Fix logic error in previous change. 2020-02-03 22:26:28 +01:00
Xiang Xiao
adbff7de81 tools/Config.mk: add DEFINE macro like INCDIR 2020-02-03 15:06:11 -06:00
Gregory Nutt
2483b65bfb tools/nxstyle.c: Ignore inttypes.h constants.
Eliminate warnings.  Ignore mixed case identifies beginning with PRIx.
These most likely come from inttypes.h and we nxstyle must tolerate
those definitions even though they do not follow the coding style.
2020-02-03 17:51:09 +01:00
liuhaitao
57099fe441 tools/testbuild.sh: update fail to return the error value instead 2020-02-02 08:13:15 -06:00
Xiang Xiao
68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
YAMAMOTO Takashi
aa8aadf18e Use "uname -s" where "uname -o" is not available
Namely this changes HOSTOS for macOS from "Other" to "Darwin".

Also, suppress the following harmless messages during a "make":
(Missing redirect in tools/Makefile.host)

	uname: illegal option -- o
	usage: uname [-amnprsv]
2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi
431317ef26 sethost.sh: Don't ignore "make olddefconfig" failure
I guess missing kconfig-conf is a common mistake for
newbies like me.  Bail out earlier instead of producing
random errors during a build.
2020-01-29 09:03:48 +01:00
Gregory Nutt
94483cf400 tools/nxstyle.c: Add logic to detect check for left brace in first column, but preceded by a blank line. That should never happen for the outermost opening branch (but could happen with internal compound statements).
Consider junk.c for example:

    /****************************************************************************
     * xx
     ****************************************************************************/

    /****************************************************************************
     * Private Types
     ****************************************************************************/

    struct foo_s

    {
      int bar;
    };

    /****************************************************************************
     * Public Functions
     ****************************************************************************/

    int dofoo(int barin)

    {
      barout = barin;
      return barout;
    }

nxstyle not detects these problems:

    $ tools/nxstyle.exe junk.c
    junk.c:11:0: error: Blank line before opening left brace
    junk.c:21:0: error: Blank line before opening left brace
2020-01-28 12:26:01 -03:00
Gregory Nutt
5a3da5ef50 tools/testbuild.sh: Restore ability to select type of new and delete operators
This capability was erroneously removed by a previous commit.  This setting is necessary when the C++ code generated by the compiler uses the new and delete operators provided in libs/libxx.

Here is an example of an error scenario where this capability is required:

1. CONFIG_CXX_NEWLONG=y in the defconfig file
2. This causes libs/libxx to to generate a delete operator of this form:

   void delete(void*, unsigned long);

3. But the compiler expects to link with a delete operator of this form:

   void delete(void*, unsigned int);

That results in a link-time failure and the ONLY solution for avoiding that link time failure (short of some complete redesign) is to have a control over the CONFIG_CXX_NEWLONG setting and make sture that it is always disabled for that toolchain.

Other toolchains will require that CONFIG_CXX_NEWLONG=y in all cases.  This cannot be predicted because it is dependndent on the definitions provided by C libraries and header files that were build into binary toolchain.
2020-01-24 11:21:14 -03:00
liuhaitao
c09071ffe8 tools/testbuild.sh: use fail to record build result
CI should know the build status of testbuild.sh, so use -k make flag option as default
instead of -i ignore-error option. Then use fail to record build result. In addition,
refresh .config if toolchain updated.

Change-Id: I182c2b2db489e6ccb0a79fdc664072d19974c3ca
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-23 10:29:56 -03:00
Xiang Xiao
4bd4f3b424 tools/refresh.sh: support to refresh all configuration by pseudo config 2020-01-22 20:41:53 -06:00
Xiang Xiao
d865500770 Enhance the syntax of testlist-file for testbuild.sh
1.Scan the folder under nuttx/boards by prefix /
2.Skip the specified configuration by prefix -

Change-Id: Ibb67f2c6b96cd8e439d94bf71d098c1fd9e5a79d
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-21 13:39:15 -03:00
chao.an
c709ed2464 tools/Makefile.unix and Makefile.won: In distclean target, unlink the dir after subdir clean
Ensure the linked dir can be clean complete in multi-job case
2020-01-21 08:37:59 -06:00
Xiang Xiao
e59f242f88 remove the dup kconfig tweak in configure.sh, testbuild.sh and sethost.sh
Change-Id: I2027b6be55609d8828ff39b568d1f8ddcf333e9a
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-20 08:04:21 -06:00
Xiang Xiao
f316c15769 Remove the size related option from sehost.sh and testbuild.sh
to aglin with configure.sh

Change-Id: I42f2621dff72b22ee6c51bd44cc4a1c3d81d128e
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-20 08:04:21 -06:00
Xiang Xiao
d0b34dec97 Fix the minor issue found in configure.sh, sethost.sh and testbuild.sh
1.The unused variable
2.The duplicated setting
3.The typo error

Change-Id: I8c129cce78d3e88856f1edcbc2c702c433daa61f
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-20 08:04:21 -06:00
Xiang Xiao
bb6c70bdcc Fix the comment header style in tools folder
Change-Id: I189a0e8b86f3af682111668ccdad64a52b48dcb4
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-20 08:04:21 -06:00
liuguo09
bcfb45dfa0 tools/testbuild.sh: kconfig-tweak disable CONFIG_TOOLCHAIN_WINDOWS under linux host (#130)
Make sure kconfig-tweak disables CONFIG_TOOLCHAIN_WINDOWS under linux host, or it would  break the build when using testbuild.sh for some configs.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-19 14:29:21 +01:00
Gregory Nutt
8b884a027f tools/Makefile.host: Fix several errors for native build
1. Can't pipe uname stderr output to /dev/null.  /dev/null does not exist in the Windows native enviornment.
2. Don't test if CONFIG_WINDOWS_NATIVE is defined.  Tht leads to a "chicken'n'egg" problem:  We need to build configure.c in order to configure the system, but we can't get the CONFIG_WINDOWS_NATIVE until after the system is configured.
3. The default name of the MinGW GCC compiler is mingw32-gcc.exe, not mingw-gcc.exe
2020-01-17 15:56:01 -03:00
patacongo
c600f6d6cf tools/Makefile.win and link.bat: Fix for 'make menuconfig' (#117) 2020-01-16 23:12:31 +01:00
patacongo
b3fd644f1b tools/configure.bat: Update configure.bat so that it works like configure.sh and integrates properly with configure.c. Also update the README.txt file with a few native build clarifications. 2020-01-16 18:22:36 +01:00
Xiang Xiao
bc8edaf6c2 tools/: Remove the hardcode arch/chip list from all tool scripts 2020-01-16 11:11:24 -06:00
Gregory Nutt
177c037aa9 tools/configure.c: Add missing k210 support.
Fix a minor but necessary addition to configure.c for the K210 port that was missed in commit e33fc3dc89
2020-01-16 06:38:59 -03:00
patacongo
0e77e3373e tools/nxstyle.c: Correct false alarm detection (#106)
Commit cf5d17f795 added logic to detect #define pre-processor definitions outside of the "Pre-processor Definitions" file section.  That commit was verified against numerous .c source files.  But not against any .h header files.

When run against a header file, that change causes a false alarm warning like:

  file:line:pos: warning: #define outside of 'Pre-processor Definitions' section

That is caused the idempotence, guard definition that must appear in the header file BEFORE the first file section.

This commit adds logic to nxstyle to ignore pre-processor definitions in header files that occur before the first file section is encountered.
2020-01-15 20:22:37 +00:00
patacongo
f00569816f Fix a few errors concerning use of section block comments in .c files: (#95)
1. No .c file should include a "Public Types" section.  Only a header file can define a public type.  A .c file can only define a private type.  Several files contained private type definitions.  The section that they were defined in, however, was incorrectly named "Public Types."  Those were easilty changed to "Private Types" which is what they are.

2. No .c file should include a "Public Function Prototypes" section.  All global function prototypes should be provided via a header file and never declared with a .c file.

For No. 2, I corrected as many cases as was reasonable for the time that I had available.  But there are still a dozen or so .c files that declare "Public Function Prototypes" within a .c file.  This is bad programming style.  These declarations should all be moved to the proper header files.
2020-01-14 00:37:54 +01:00
Gregory Nutt
cf5d17f795 tools/nxstyle: Added logic to parse section headers (#90)
* tools/nxstyle:  Added logic to parse section headers (like Included files, Pre-processor Definitions, etc.) and to assure that the section headers are correct for the file type.  Also (1) verify that #include appears only in the 'Included Files' section and that (2) #define only occurs in the Pre-processor definition section.

    Right now, there are several places where that rule is not followed.  I think most of these are acceptable so these failures only generate warnings, not errors.  The warning means that we need to go look at the offending #define or #include and decide if it is a acceptable usage or not.
2020-01-13 18:08:45 +00:00
Xiang Xiao
cd544b81b3 checkpatch remove -m 86 option since nxstyle can determine the max line length smart now
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-12 12:54:13 -06:00
Gregory Nutt
beae24c8c0 tools/nxstyle.c: Correct indexing error noted by Xaio Xaing in commit comments. 2020-01-12 14:52:48 -03:00
Gregory Nutt
6309165fe0 tools/nxstyle.c: Add automatic detection of line width based on examining
the width of all block comments. Includes a check to assure that all block
comments use the same line width.

Verified against all .c files under /sched.  There were a few cosmetic changes to the coding style under /sched to account to new, correctly detected problems in the /sched files.
2020-01-12 13:07:54 -03:00
liuguo09
1c53d2b616 Nxstyle checkpatch support (#47)
* tools/nxstyle.c: Donot check unknown file extension files

nxstyle only support c soure file and header file check, donot check
other unknown file extension files.

* tools/checkpatch.sh: Add checkpatch.sh script based on nxstyle tool

Usage:
checkpatch.sh patch-list // default as patch list
checkpatch.sh -p patch-list
checkpatch.sh -c commit-list
checkpatch.sh -f file-list
checkpatch.sh - // read from stdin, which used by git pre-commit hook

And git pre-commit hook could use checkpatch.sh as below:
git diff --cached | ./tools/checkpatch.sh -
2020-01-07 08:14:01 -06:00
Xiang Xiao
3b9efc95a2 Format all shell scripts in tools folder
Change-Id: Ieef2eb93d56c03972b4dc63a1c55aabf1fb0d169
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-06 00:51:49 +08:00
liuhaitao
7da409f3b5 tools/nxstyle.c: Add -r option to check specified range lines
Usage: ./nxstyle -r start,count filename

nxstyle with -r option used to parse the range lines rather than the whole file.

Change-Id: I58ec56511fde14d6ec914400a7849e69960a3711
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-04 07:58:00 -06:00
Xiang Xiao
6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Xiang Xiao
443255f348 Unify the c++ standard library name to libxx (#19)
libs/libxx/Makefile, and tools/*.mk:  Use common library name libxx.a, regardless of which libc++ library is selected.
2019-12-31 10:28:48 -06:00
Masayuki Ishikawa
e33fc3dc89 Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>

    Run all .c and .h modified in PR through nxstyle.

Author: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>

    feature k210 (#16)

    * arch: risc-v: Add support for __LP64__ to types.h
    * arch: risc-v: Add support for RV64GC to common files
    * arch: risc-v: Add support for Kendryte K210 processor (RV64GC)
    * boards: risk-v: Add support for Sipeed Maix Bit with K210
    * tools: Add support for Kendryte K210 processor
2019-12-31 09:06:20 -06:00
David Sidrane
002772c81e nxstyle improvements with No tooling (#12)
tools/nxstyle.c:  Output compiler like error format.  Added features

   Uses getops to pars command line.
   Supports
      -s silence all output
      -g provide a PASS fail message

* tools/README.txt:  Update with new nxstyle options
2019-12-30 21:01:41 -06:00
Xinhe Zhou
25b788a9ed fs/vfs/fs_open.c: Fix error in nx_vopen() function. 'va_start' is used in function with fixed args. 'va_start'/'va_end' should not be used in nx_vopen function, because it has fixed arguments. 2019-12-14 07:38:36 -06:00
Gregory Nutt
10b8c01abf tools/Makefile.unix: Fix a logic error in 3e4450e237. 2019-12-13 12:43:44 -06:00
Gregory Nutt
3e4450e237 tools/Makefile.unix and .win: Back out part of 1c91aec6ae (tools/ and fs/procfs: Simplify .version file generation). That change breaks the build if not in a git clone. noted by Nathan Hartman. 2019-12-13 12:34:17 -06:00
anchao
1c91aec6ae tools/ and fs/procfs: Simplify .version file generation
1.merge CONFIG_GIT_REVISION_STR into CONFIG_VERSION_BUILD
2.merge gen_getrev.sh into version.sh
3.generate version number if needed

Here is a sample output:
nsh> uname -a
NuttX  8.2 59fd8e12d3-dirty Dec 12 2019 15:48:00 sim sim
nsh> cat /proc/version
NuttX version 8.2 59fd8e12d3-dirty Dec 12 2019 15:48:01
2019-12-12 11:17:11 -06:00
Nathan Hartman
9655730ef8 Fix various typos and spelling errors. 2019-12-12 07:41:51 -06:00
Gregory Nutt
897378bc29 Remove support for generation of RRLOAD binary files. The RRLOAD binary format was used with Linux BSPs from www.ridgerun.com circa 2000-2001. It is still need by the the c5471 board if that bootloader is used. Removes the CONFIG_RRLOAD_BINARY option and tools/mkimage.sh
This change was motivated by the presence of the mkimage.sh file under tools.  That is the tool that created the RRLOAD binary format.  That bash script has a GPL license and, hence, may not be included in an Apache-licensed project.
2019-12-09 11:29:12 -06:00
Gregory Nutt
504b0e8b5b drivers/wireless: Run all wireless drivers through tools/nxstyle, correcting as many complaints as possible. 2019-12-05 11:49:12 -06:00
Gregory Nutt
f109c5b99c Numerous changes to last PR to conform to the NuttX coding standard. 2019-12-03 16:46:12 -06:00
Alin Jerpelea
338bc46f5e Merged in alinjerpelea/nuttx (pull request #1088)
add mkspk tool for cxd56 devices

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-03 22:17:31 +00:00
Gregory Nutt
d87295f328 tools/Directories.mk, Makefile.*: Extend the clean_context target so that it will remove the autogenerated files created during the context phase of the initial build. 2019-12-03 06:38:53 -06:00
Gregory Nutt
d2af57169b tools/nxstyle.c: Fix a rare false alarm that could occur if a variable or function name begins with the sub-string 'union' or 'struct'. misc fixes under fs/ and sched/ from application of current version of nxstyle. 2019-12-01 13:01:16 -06:00
Gregory Nutt
91d04837e9 tools/nxstyle.c: Eliminate some false alarms related to comments to the right of code about alignment and spacing. 2019-12-01 11:37:30 -06:00
Gregory Nutt
6b66ac0e04 Some minor changes from review of last PR. 2019-11-28 14:45:16 -06:00
Masayuki Ishikawa
7a8e9581ca Merged in masayuki2009/nuttx.nuttx/hifive1-qemu (pull request #1078)
HiFive1 with qemu

* arch: risc-v: Add include/.gitignore

* arch: risc-v: Add src/.gitignore

* arch: risc-v: Remove uncommon function prototypes in include/irq.h

* arch: risc-v: Add missing symbols and function prototypes in src/common/up_internal.h

* arch: risc-v: Add src/common/up_modifyreg32.c

* arch: risc-v: Enable include Make.dep in src/Makefile

* arch: risc-v: Fix stack coloration in common/up_createstack.c

* arch: risc-v: Add common/up_puts.c

* arch: risc-v: Add common/up_checkstack.c

* arch: rv32im: Move all logics from up_dumpstate.c to up_assert.c

    This change is same as other architectures like arm/src/armv7-m

* arch: Select ARCH_HAVE_STACKCHECK for RISC-V in Kconfig

* arch: risc-v: Add SiFive fe310 processor

    NOTE: Currently only tested with qemu

* boards: hifive1-revb: Add SiFive hifive1-revb board

    NOTE: Currently only tested with qemu

* tools: Add fe310 processor to configure.sh

Approved-by: Alan Carvalho de Assis <acassis@gmail.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-28 20:37:24 +00:00
Matias N
1a56fefb9f tools/configure.sh and configure.c: Debug option now also shows make olddefconfig output. 2019-11-23 14:47:59 -06:00
Gregory Nutt
8bc55d4396 tools/nxstyle.c: Trivial improvement to preceding change to allow white space separation. 2019-11-19 11:43:20 -06:00
Gregory Nutt
f3c2022b4e tools/nxstyle: Fix false alarm 'Garbage follows right bracket' on named structures that are fields of other structures or unions. 2019-11-19 11:32:57 -06:00
Gregory Nutt
a9ef2b4208 tools/nxstyle.c: Eliminate false positive 'Invalid character after asterisk in comment block'. 2019-11-09 12:10:43 -06:00
Matias Nitsche
e118d99bf5 drivers/power/pm: Historically, the NuttX PM subsystem has consisted of two functional components: (1) an "Upper" part that detects state changes based on a random walk driven by activity levels, and (2) and "lower" part that implementst the state changes.
This change decouples that upper activity-based logic from the lower random walk logic and allows use of other upper state detection logic (such as a custom, application-specific state machine).
2019-11-09 09:09:33 -06:00
Gregory Nutt
2ab4d635b4 tools/nxstyle.c: Correct detection of missing blank line following a block comment. 2019-11-09 08:15:12 -06:00
Guiding Li
8b92305265 This commit brings in the drivers needed to support OpenAMP. These changes were ported from https://github.com/FishsemiCode/nuttx. The current state: Most drivers do now compile but are not yet verfied.
This port was effort of a number of people, I rather arbitrarily gave authorship to Guiding Li because he has the largest number of fundamental quashed commits from the Xiamoi repository.

Squashed commit of the following:

Author: Xiang Xiao <xiaoxiang@pinecone.net>
    include/nuttx/b2c.h and libx/libc/string:  Add non-standard string functions to deal with cases where there are more than 8-bits in a type char.

Author: Gregory Nutt <gnutt@nuttx.org>
    Fix several build issues/missing definitiona needed for OpenAMP build in drivers/.
    Add OpenAMP code has been reviewed and ran through tools/nxstyle (with all reports accounted for).

Author: Xiang Xiao <xiaoxiang@xiaomi.com>
    tools/:  Fix the minor issue in Makefile

Author: Gregory Nutt <gnutt@nuttx.org>
    drivers/rptun/rptun.c:  Review for coding standard.  Run against tools/nxstyle.
    tools/LibTargets.mk:  Fix some TABs that were turned into spaces by a copy-paste.
    fs/hostfs:  Add configure and build support for hostfs RPC.
    drivers/timer:  Add configure and build support for syslog RTC.
    drivers/syslog:  Add configure and build support for syslog RPC.
    drivers/serial:  Add configure and build support for serial RPC.
    Kconfig, tools/*.mk. openamp/:  Add basic OpenAMP build support.
    drivers/rptun:  Add configure and build support for OpenAMP tunnel drivers.
    drivers/net:  Update Make.defs and Kconfig for OpenSDA support.
    Remove drivers/clk/clk-rpmsg.c drivers/power/rpmsg_regulator.c.  These depend on upstreaming support for a new subsystem based on the clk/regulator is model from Linux.  Removed because we want to separate the activities.  We will just try to get the basic OpenAMP support in place for now.
    Remove drivers/misc/misc_rpmsg.c and include/nuttx/misc/misc_rpmsg.h.  These are specific to the Xiaomi application.

Author: zhuyanlin <zhuyanlin@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Jianli Dong <dongjianli@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Guiding Li <liguiding@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.
2019-11-02 11:30:33 -06:00
Gregory Nutt
ad9dc2b608 tools/nxstyle.c: Eliminate false alarms when checking for alignment of comments to the right of code. Fix check for C++ style comments so that strings like http:// and https:// do not generate false alarms. 2019-10-27 11:45:33 -06:00
Gregory Nutt
a4997d6a2c tools/nxstyle.c: Eliminate false alarm errors on comments that are to the right of code when the comment terminator is on the same line as the last of the comment. 2019-10-25 12:34:42 -06:00
Gregory Nutt
b5111d2c38 tools/nxstyle.c: Add logic to detect if there is a blank line following the final right brace. sched/: Applied the modified nxstyle to all C file as a test. 2019-10-24 11:02:42 -06:00
Gregory Nutt
005a8a606f tools/nxstyle.c: Add detection of carriage returns. Improve reporting of TABs. 2019-10-23 12:49:27 -06:00