Commit Graph

1042 Commits

Author SHA1 Message Date
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
Gregory Nutt
d6b4e90d70 arch/arm/src/s32k1xx: Support configuration and initialization of the flash configuration bytes. boards/arm/s32k1xx/s32k1**evb/scripts/flash.ld: Create a special FLASH section to hold the FLASH configuration bytes. 2019-10-19 13:14:02 -06:00
Gregory Nutt
759ed2d5c0 tools/indent.sh: Add a command line option to suppress reformatting of comments. This is useful when comments are already correct and/or contain formatted data such as tables or lists. 2019-10-19 09:01:20 -06:00
Xiang Xiao
2a271a5d62 tools/LibTargets.mk: Make libapps.a by the default target. 2019-10-17 11:37:44 -06:00
Anjana
fae7e63479 We have ported NuttX on Renesas RX65N Micro-controller. This port includes following interfaces
1. Serial (UART) driver (13 ports)
2. Ethernet driver

This port is provided on two boards
1. RSK RX65N-2MB
2. GR-Rose

The port is built on Cygwin environment.

As part of this port, we have created two documents
1. Readme.txt for each board
2. User manual to provide information about development environment setup
Both these documents are placed under
1. /boards/renesas/rx65n/rx65n-grrose
2. /boards/renesas/rx65n/rx65n-rsk2mb

We have run 'nxstyle' for coding guidelines and 'ostest' for testing NuttX features on test platform.
We have shared the log with no errors as confirmation of valid port.
2019-10-11 23:36:57 +08:00
Christian Clauss
3a28d2e6f7 Merged in chrisclauss/nuttx/Christian-Clauss/old-style-exceptions-new-style-for-pyth-1569067472774 (pull request #1036)
Old style exceptions --> new style for Python 3

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-08 16:28:53 +00:00
Bernd Walter
626c28dc30 tools/mkromfsimg.sh: Use sed to add const to ROMFS declarations so that they like in FLASH not RAM. 2019-10-07 21:52:55 -06:00
Xiang Xiao
8ffa77b167 tools/mkexport.sh: Should export full content for flat build even with CONFIG_BUILD_LOADABLE. 2019-10-03 14:08:32 -06:00
Gregory Nutt
8471da9dec tools/Config.mk: Update comments to indicate how to use the single-file compilation options. 2019-10-03 08:23:22 -06:00
Gregory Nutt
312a8c6851 tools/testbuild.sh: Reapply edb19474bc, it was an error to revert it. The cause of the problem appears to be elsewhere. 2019-10-03 08:03:30 -06:00
Gregory Nutt
a5fecf88dc Revert "tools/testbuild.sh: Use CPU option on 'make distclean' too, but not 'make olddefconfig."
This reverts commit edb19474bc.
2019-10-03 07:55:54 -06:00
Gregory Nutt
4c8854b3c6 tools/testbuild.sh: Remove a spurious semicolon that was causing some errors. 2019-10-03 07:52:16 -06:00
Xiang Xiao
37ef3c1cbc tools/Config.mk: Support the ability to change the CFLAGS for the compilation of a single file. Set special compiler options as follows the rule:
sourcefile + fixed suffix "_[A|C|CPP|CXX]FLAGS"

apps/examples/hello/Makefile:
  $(SRCDIR)/hello_main.c_CFLAGS = -DTEST
2019-10-03 06:49:17 -06:00
Gregory Nutt
edb19474bc tools/testbuild.sh: Use CPU option on 'make distclean' too, but not 'make olddefconfig. 2019-10-02 17:26:12 -06:00
Gregory Nutt
6371b4915c tools/testbuild.sh: Add an option to select the number of CPUs to use with 'make' 2019-10-02 17:11:33 -06:00
Xiang Xiao
61ec1d7a1d Makefiles: change ${shell pwd} to $(CURDIR) since pwd doesn't exist on Windows 2019-10-02 07:09:28 -06:00
Gregory Nutt
750df900d3 tools/README.txt: Trivial reference to a simulator README file added. 2019-10-01 11:10:16 -06:00
Xiang Xiao
c8cb2fe492 tools/mkexport.sh: Copy the essential build script files too and move Make.defs/gnu-elf.ld into scripts like board folder layout. 2019-10-01 07:54:11 -06:00
Gregory Nutt
e8542c844c tools/README.txt: Update to show new usage of mksymtab. 2019-09-30 13:46:33 -06:00
Gregory Nutt
0671ced130 tools/mksymtab.c: Fix a typo help introduced in last commit. Show default values. 2019-09-30 12:59:34 -06:00
Gregory Nutt
ba51027449 tools/mksymtab.c: Clean up syntax of help text. 2019-09-30 08:59:21 -06:00
Gregory Nutt
0cdc208b2c tools/Makefile.host: Add missing binaries from clean target 2019-09-30 08:29:38 -06:00
Xiang Xiao
0efd3e2e7f tools/Directories.mk: Remove FSDIRS/NOFSDIRS related logic/comments since the file system can no longer be disabled now. 2019-09-30 07:11:26 -06:00
Xiang Xiao
5f37226b6d tools/ Make fragments: Fix the various minor issue for NUTTXLIBS/USERLIBS
1. Remove libcxx duplication in FlatLibs.mk and from kernel space
2. Remove libpass1 from KernelLibs.mk since kernel build doesn't support the two pass mode
3. Remove FSDIR related comment since file system cannot be disabled now
2019-09-30 07:03:55 -06:00
Xiang Xiao
d4ca483edc tools/Makefile.unix: Make COMMON_DIR work with CONFIG_ARCH_BOARD_CUSTOM. 2019-09-30 06:49:20 -06:00
Nathan Hartman
46aaec7ba0 Fix minor typos in docs and comments. 2019-09-29 12:52:20 -06:00
Xiang Xiao
8e74365b96 ibs/libc, libs/symtab, tools/ build system: Move symbol table generation into libc since the address in symbol table should come from userspace binary for protect build, not kernel binary. 2019-09-28 11:14:48 -06:00
Xiang Xiao
4d7dac47f9 libs/symtab/Makefile and tools/mksymtab.c: Ensure that the generated symbol table name same as the configuration option. 2019-09-28 11:02:53 -06:00
Xiang Xiao
f96410b58e tools/simbridge.sh: Add simbridge.sh to simplify the simulator bridge creation. 2019-09-28 10:54:54 -06:00
Nathan Hartman
a83a609af9 Direct users to our kconfig-frontends snapshot instead of upstream.
It appears Yann Morin's kconfig-frontends project has gone offline and
the website at http://ymorin.is-a-geek.org/projects/kconfig-frontends
is not responding. Until we can identify a "proper" upstream project,
use the snapshot in NuttX tools repository.

Replace (almost) all links to Yann Morin's kconfig-frontends in the
docs to point to the NuttX tools snapshot instead, with the following
exceptions:

    nuttx/Changelog for version 6.17, 2012-04-14: Leave this historical
    information intact.

    nuttx/README.txt: Document the source of our snapshot.
2019-09-24 09:52:09 -06:00
David Alessio
500739de3a Merged in david_alessio/nuttx/bugfix/gitrev-portability (pull request #1035)
fix portability issue with date, hostname

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-20 16:46:04 +00:00
anchao
03ad77f45c tools/configure.sh and configure.c: Do not remove CONFIG_SIM_M32 if host is specified. 2019-09-19 18:27:22 -06:00
Juha Niskanen
ebc6f51641 Fix some typos 2019-09-17 10:46:23 -06:00
Gregory Nutt
ecb0b15fd0 libs/libc/math/Kconfig: Should select the NuttX float.h file automatically if the NuttX math library is selected. 2019-09-16 13:29:47 -06:00
Xiang Xiao
ba436b9434 tools/Makefile.unix: Fix build error when issue 'make -B'. mkdir: cannot create directory 'staging': File exists: tools/Makefile.unix:269: recipe for target 'staging' failed' 2019-09-16 07:41:25 -06:00
Xiang Xiao
bf3ffddf2f tools/configure.*: Add -s option to skip .config/Make.defs existence check. 2019-09-16 07:38:29 -06:00
Gregory Nutt
03fc3a2218 Fix a typo I introducted in the last commit. My bad. 2019-09-15 11:14:47 -06:00
Xiang Xiao
bf84868360 tools/Config.mk and Makefile.unix: Support the incremental build for configuration change. 2019-09-15 10:56:26 -06:00
anchao
7ce51e66b9 tools/Config.mk: Eliminate use of the built-in implicit rules. 2019-09-15 08:48:25 -06:00
Nathan Hartman
366053e464 Fix typos, 1 in a #define, others in comments. This changes one definition: _MQ_TIMEDRECIEVE is changed to _MQ_TIMEDRECEIVE. It appears this symbol is not used anywhere. 2019-09-11 08:56:56 -06:00
Pavel Pisa
f9e9f228cb tools/mkexport.sh: export LDSCRIPT and STRIP definition and align with Makefile.export. 2019-09-10 07:14:38 -06:00
Gregory Nutt
5707d01cc3 tools/version.h and Makefile.unix: Minor improvement to previous commit: Permit custom version strings that do not derive from the major and minor version number 2019-09-07 09:14:21 -06:00
Gregory Nutt
d07666c85b tools/Makefile.unix: Rethink creation of new .version file with GIT information. Cannot use 'sed -i' in its current form because that does not work on macOS, FreeBSD, or NetBSD. 2019-09-07 08:44:16 -06:00
Gregory Nutt
0b64e79736 tools/Makefile.win: Change of 8883623d07 needs to be applied to Makefile.win too. 2019-09-04 18:58:52 -06:00
jjlange
8883623d07 Merged in jjlange/nuttx/makefile_updates (pull request #1028)
Makefile updates

* Save CONFIG_ARCH_BOARD_CUSTOM when running 'make savedefconfig'

* Only use PCLKSEL0 for ADC on LPC176x family.

* Made grep search expression more specific.

* Added missing '=' to second grep

* Revert "Only use PCLKSEL0 for ADC on LPC176x family."

    This reverts commit 835b5e9d6fcbea02cb0203c063b0e121fa57ba9e.

* Revert "Added missing '=' to second grep"

    This reverts commit 38b51f0c6d9612de755c102a53846ca7488cdf14.

* Added a missing '=' in the second grep statement

* When linking $(ARCH_SRC)/drivers, print what is actually happening

* Save CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH when running "make savedefconfig"

* Revert changes to lines 607-608 related to CONFIG_ARCH_BOARD_CUSTOM

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-05 00:48:51 +00:00
Nathan Hartman
ce8fb54d07 Fix various typos 2019-09-03 17:00:22 -06:00
Gregory Nutt
89096d0fc7 tools/Makefile.win: Port changes of commit 3ed844640d to Makefile.win. Untested because I don't have a Windows native build platform setup. There have been a log of changes to the build system lately do to directory re-organization so likely the native build is broken. Certainly tools/configure.bat should be replaces with tools/configure.c. 2019-08-30 09:28:47 -06:00
Pavel Pisa
f1b2155efc tools/Makefile.* and tools/mkexport.sh: This change allows to export builtin applications registry into temporarily created directory where export archive content is prepared. If the Makefile in apps directory does not define export: target then error is print but export continues without interruption. It would be more logical to print warning but there is no way instruct apps make to not print error. 2019-08-30 07:19:15 -06:00
Pavel Pisa
316aafc04d tools/mkexport.sh: The export of gnu-elf.ld at least is required to build ELF loadable binaries. Option to link system into different memory locations (boot, application after boot-loader, RAM) without need to rebuild/reexport NuttX is useful as well. 2019-08-28 07:49:57 -06:00
Pavel Pisa
00039b7c2e tools/mkexport.sh: Export all variables to support architecture independent build against NSH. 2019-08-28 07:35:44 -06:00
Gregory Nutt
28b13e4ba1 tools/Makefile.unix: Simplify dependencies. 2019-08-26 12:56:54 -06:00
Gregory Nutt
4710ec1e77 tools/Makefile.unix: Remove some unnecessary conditional logic. 2019-08-26 11:19:39 -06:00
Gregory Nutt
8b62bc96f5 Updates from review and testing of commit a0867a7f4f. 2019-08-26 09:46:05 -06:00
David Alessio
a0867a7f4f Merged in david_alessio/nuttx/feature/add-git-revision (pull request #1020)
report git info on /proc/gitrev

* report git info on /proc/gitrev

    git info reported: branch, version, git hash, hostname, usr, build date

* use existing .version and procfs for git info

* reduce script's coupling

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-26 15:09:33 +00:00
Gregory Nutt
65aabe3048 libs/symtab: move symtab/ to libs/symtab. Let's no clutter up the top level directory. Shorten CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYSTAB to just CONFIG_EXECFUNCS_SYSTEM_SYMTAB. Some items in syscall/syscall.csv are only valid when CONFIG_LIB_SYSCALL is defined. That is always defined when really building the syatem calls, but causes errors in libs/symtab because they are not valid in the normal, FLAT build context. 2019-08-25 19:28:04 -06:00
Gregory Nutt
e4c333820a tools/refresh.sh: Fix some remaining breakage from the boards/ directory reorganization; boards/arm/s32k1xx: Add CONFIG_NSH_ARCHINIT=y to all NSH configurations. 2019-08-24 08:43:46 -06:00
Nathan Hartman
f7e3a82ecd tools/Makefile.unix: tools/Makefile.unix. 2019-08-23 13:23:31 -06:00
David Sidrane
6d42574619 Merged in david_s5/nuttx/master_fix_relitive_build (pull request #1017)
Fixed CONFIG_ARCH_BOARD_CUSTOM based builds

Essentially reverts Added a missing '=' in the second grep statement

	it was not missing it was deliberately not  in the second grep

	Adding a '=' in the second grep statement caused the "children"
	of CONFIG_ARCH_BOARD_CUSTOM;

	namely:
		CONFIG_ARCH_BOARD_CUSTOM_DIR
		CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH
		CONFIG_ARCH_BOARD_CUSTOM_NAME

	to be lost on a savedefconfig
	To see the issue run make oldconfig; make savedefconfig; make oldconfig

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-22 12:01:26 +00:00
Alin Jerpelea
3ed844640d Merged in alinjerpelea/nuttx (pull request #1015)
tools: unix: add support for common board folder

* tools: unix: add support for common board folder

    this patch adds support for a common board folder and simplifies the code
    and maintenance on boards that share the same code

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

* cxd56xx: migration to a common folder

    This is the first platform to be migrated to the new common folder
    structure.

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-21 17:25:16 +00:00
Alin Jerpelea
c6355f58d6 Merged in alinjerpelea/nuttx (pull request #1014)
boards: add stub drivers folder for later use

* boards: add stub drivers folder for later use

    The board/drivers folder is added for future use.

    In this folder we should place drives that are platform specific and
    depend on HW that is present only on a specific platform.

    NOTE: All shared drivers should go to the regular driver folder
    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* tools: shift BOARD_DIR one level up

    In preparation for drivers and common folders we are moving the
    BOARD_DIR path up one level.

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

* tools: add drivers/platform symlink

    Link the boards/<arch>/<chip>/drivers dir to drivers/platform

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

* drivers: add platform specifc drivers extension

    There are platforms that use specific drivers and we should be able to
    include those drivers in the build

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

* board: cxd56xx: drivers: add AK09912 driver for SCU

    This is a platform specific driver connected on the SCU unit.

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-21 13:39:29 +00:00