Commit Graph

965 Commits

Author SHA1 Message Date
Abdelatif Guettouche
609a5fa4f0 arch/: Add the ARCH_SRC directory to the context and clean_context
targets

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-17 22:46:27 +09:00
Xiang Xiao
1e94367eb2 tools/Config.mk: Don't set HOSTEXEEXT to .exe for Ubuntu on Windows
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-16 18:03:38 +01:00
Fotis Panagiotopoulos
3eee887d87 Typo fix. 2020-10-06 19:44:56 -03:00
Xiang Xiao
09a2c37daf tools/parsecallstack: Fix the style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-27 11:10:49 -07:00
qiaowei
0d761b6db1 tools/parsecallstack.py: A tool to parse the callstack
Signed-off-by: qiaowei <qiaowei@xiaomi.com>
Change-Id: Ieb13cdf6ca36c0858f66c79629f2a96d8845612e
2020-09-27 11:10:49 -07:00
liuhaitao
8685dcbfc5 [WIP] do DIRUNLINK in clean_context instead of in disctclean
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-09-27 08:20:35 -06:00
Xiang Xiao
6a84d96bca tools/mkdeps: Fix EOVERFLOW returned by stat when CONFIG_SIM_M32=y
by define _FILE_OFFSET_BITS to 64 described here:
https://man7.org/linux/man-pages/man2/stat.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I19c079294b79a541fbcc0bf5acbf7377067acf98
2020-09-25 20:41:22 -03:00
Masayuki Ishikawa
a92e394884 tools: Fix nuttx-gdbinit for armv7-m without FPU
Summary:
- I noticed that call stack for Cortex-M3 was incorrect
- This commit fixes this issue

Impact:
- Affects nuttx-gdbinit for armv7-m without FPU

Testing:
- Tested with lm3s6965-ek:discover (qemu)
- Tested with spresense:wifi
- Tested with sim

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-23 02:58:33 -07:00
Gregory Nutt
5ffb1c6a0b Fix Cygwin build broken by commit 34b34e2d45
Commit 34b34e2d45 uses the full path to libapps.a and introduced the use of the Make notdir command.  That command breaks the Cygwin build because when a native Windows toolchain is used, the full path to libapps.a is a Windows-sytle path and the Make notdir command (like most other GNU Make commands) fails if it is passed a Windows-style path.  This commit replaces the Make notdir command with the Bash basename command which can handle Windows paths.
2020-09-22 17:12:00 -03:00
Matias N
c695a5924f configure.sh/sethost.sh: add set -e so that the script aborts on any error 2020-09-16 20:09:44 -07:00
Xiang Xiao
6b7180fe87 tools/Config.mk: Replace tab with space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-16 10:13:25 -07:00
Matias N
9ce4de634d support building external code into the OS, similar to how "external" apps work
This works by having the build system look for nuttx/external/Kconfig
to determine whether this directory is present or not. nuttx/external
is gitignored in order to be added by the final user but not to be
commited into the repo. Tipically this will by a symbolic link, just like
apps/external.

Inside external/ a Makefile should be placed with the same structure
than any nuttx/ subdirectory (eg: nuttx/drivers/). The
nuttx/external/Kconfig will be sourced and any options defined there will
appear at the bottom of menuconfig (unless options are conditioned on
menus, in which case they will appear accordingly).

The purpose is to allow arch/board independent code, which for any
reason is not to be upstreamed (propietary, not relevant for mainline,
testing, etc), to be built into the OS during OS building stage. This
way the user does not need to fork the NuttX repo to do so. This feature
complements well with external apps and custom board support.
2020-09-15 21:14:46 -07:00
Matias N
166242c171 use "export" to expose TOPDIR to all child make instead of passing it around every time 2020-09-15 21:11:33 -07:00
Matias N
34b34e2d45 Fix: ensure archive files do not carry object files from prior builds
In some cases, when NuttX configuration changes and this makes the
object list used to build one of the .a libraries change as well,
since the command used to build it is "ar crs" and this simply appends
the list of object files, the library could still include object
files from prior builds. This commit modifies the ARCHIVE macro to
erase the .a file if it already exists.

Since in some cases this behavior was actually expected (object
files from a subdirectory were appended to a library created one
level above) I added a ARCHIVE_ADD which works as ARCHIVE did.

This change should greatly improve behavior of building after
configuration changes.
2020-09-14 15:54:18 +08:00
Matias N
7d16090d11 Fix testbuild.sh to actually fail when using -x. Leave -x out for CI
so that we detect all possible build errors for a job.
2020-09-13 10:29:13 -07:00
Xiang Xiao
b0797263ca libc/stdio: Allocate file_struct dynamically
1.Reduce the default size of task_group_s(~512B each task)
2.Scale better between simple and complex application

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia872137504fddcf64d89c48d6f0593d76d582710
2020-09-11 17:58:17 +08:00
Masayuki Ishikawa
2c8aa8629e tools: Add nuttx-gdbinit for nuttx thread debugging
Summary:
- This commit enables nuttx thread debugging without openocd-nuttx
- To use this script, gdb must support python
- To show all thread, use 'info_nxthreads'
- To switch thread, use 'nxthread pid'
- To continue, use 'nxcontinue'

Impact:
- No impact

Testing:
- Tested with spresense (Cortex-M4F), sim (x86_64), lm3s6965-ek (Cortex-M3)
- Tested with GNU Tools for Arm Embedded Processors 9-2019-q4-major
- Tested with GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-10 08:53:15 +02:00
Johannes Schock
77b32a721d Removed -w option from MKEXPORT_ARGS. 2020-09-05 21:25:31 +08:00
Brennan Ashton
6d3269a69d CI: Fix check patch to handle renames / deletes
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-03 20:05:57 -03:00
Ouss4
7c83c63d8e tools/configure.sh: Add -L option to list all available
configurations.
Mention this option when Make is run on an unconfiugred project.
2020-09-02 17:19:34 -07:00
Xiang Xiao
528cfb8457 tools/mkexport.sh: Remove WINTOOL and related option
since it isn't used anymore after:
commit bd656888f2
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Mon May 18 22:18:15 2020 +0800

    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-08-31 09:54:13 +02:00
Xiang Xiao
ae356001cf Change all files come from Xiaomi/Pinecone to Apache License 2.0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-22 17:37:21 -06:00
Ouss4
f2af90d1bd tools/configure: Align the .c and the .sh versions. 2020-08-21 21:23:13 -05:00
Ouss4
1c295aff19 tools/configure.sh: Don't distclean if no config was already in place. 2020-08-21 21:23:13 -05:00
Gustavo Henrique Nihei
b90c8914f3 tools/configure.sh: Create -E command for distcleaning regardless of
configuration changes

According to the usage documentation, [-e] option should "enforce
distclean if already configured". This behavior was broken due to the -e
option being evaluated only if the current defconfig is different from
the backup defconfig. The new -E command inherits this behavior.
2020-08-20 15:53:16 +01:00
Xiang Xiao
d43bf7717e sched: Support config the argument passed to init
it is useful to pass the nonempty argument to change the init task behaviour

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I684e9c76b9eac54404d0e4e63ab78e51e039c9a8
2020-08-17 12:52:28 -06:00
Gustavo Henrique Nihei
c9748395f8 make/export: Fix mkexport silently failing on missing tools 2020-08-13 16:13:32 +01:00
Gregory Nutt
b256b2055f Add support to hard links to CROMFS
This will resolve numerous problems with the way that hard links, in particular "." and ".." are handled.  Instead of trying to fudge the stat flags, the correct implementation is to follow the hard link to the final link target node.  That is what must determine the attributes of the directory entry.
2020-08-11 07:48:08 -07:00
David Sidrane
562be9e4c7 gencromfs:Fix mode flags seperate code points for DIR LNK 2020-08-10 11:04:13 -06:00
Xiang Xiao
8807a52de6 tools/gencromfs: Change the generated code to Apache license
and ensure the code confirm the coding style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-09 14:43:56 +01:00
Xiang Xiao
4de69080d0 tools/gencromfs: Call dump_nextline immediately after dump_hexbuffer
to handle the temporary file switch correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-09 14:43:56 +01:00
David Sidrane
b6194bc0bf tools/gencromfs: partial fix coding standard violation
Remaining violation seem to be an issue with the
   tool parsing  outptr[- lit - 1] = lit - 1
2020-08-06 08:36:03 -05:00
David Sidrane
fbd5712761 Fix Breakage from 91ed14c6
PR 1372 vfs/stat: Make the flag defintion more confirm POSIX
   standard. Silently broke the cromfs. This was due to the
   necessary replication of the S_xxxx flags of the NuttX
   sys/stat.h. The unfortunate outcome was most likely caused by
   fact, that a grep of S_xxxx did not match the tools/gencromfs.c

   To insure this sort of thing does not happen again, comments
   have been added the will match search.
2020-08-06 08:36:03 -05:00
Ouss4
e79298bc34 tools/Config.mk: Unquote the custom board path before using it in
Makefile functions.
2020-07-30 00:10:29 -05:00
Ouss4
708daf2c3d tools/Config.mk: Remove CONFIG_ARCH_BOARD from BOARD_DIR when using a
custom board.

Custom boards don't set CONFIG_ARCH_BOARD since the full path is given
during configuration.
Furthermore this creates problems when when referencing other
folders using BOARD_DIR because a trailing DELIM will be present.
2020-07-30 00:10:29 -05:00
Xiang Xiao
6be8dd420c tools/incdir: Fix the memory leak
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I9bf57071b5e967a3db55c7e473e84a8bad44cd2a
2020-07-23 15:49:08 +01:00
YAMAMOTO Takashi
9f8d52830f tools/incdir: Assume GCC compatibility for unknown compilers
A use case:
    intercept-build --override-compiler make CC=intercept-cc
    cf. https://github.com/rizsotto/scan-build
2020-07-23 00:55:24 -05:00
Nakamura, Yuuichi
376786288e Create wrapper library for system call instrumentation 2020-07-22 12:01:40 -05:00
Xiang Xiao
5ce84693d3 tools/mksyscall: Fix warning: '__builtin_strncpy' specified bound 256 equals destination size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-20 17:10:37 +01:00
Xiang Xiao
17bd5f3d1a tools/checkrelease.sh: auto import KEYS from the release server
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-18 11:29:27 -07:00
Xiang Xiao
ac7e5de5ae libxx: Integrate uClibc++ latest official release
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I05377a0a7674f1cbe461ce67960bd3dc62729337
2020-07-17 21:40:34 +01:00
Ouss4
34bcf39c68 tools/configure.c: Don't redirect the output of make. 2020-07-17 10:14:42 -05:00
Xiang Xiao
4910d43ab0 build: Move the toolchain library setting to the common place
so all boards support C++ automatically
2020-07-16 15:38:08 -03:00
liuhaitao
fc2e785165 testbuild.sh: suppress logs from configure stage in testbuild.sh
Since testbuild.sh called by nightly build and check build, it should
suppress logs from configure stage to keep all output clean.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-07-16 15:40:46 +01:00
liuhaitao
67589adfb7 sethost.sh: always print logs to ease identify problem in configure phase
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-07-16 15:40:46 +01:00
Xiang Xiao
ee875b2a26 boards: Move HOSTCC/HOSTCFLAGS to tools/Config.mk
Make.defs under board folder can still overwrite the default as needed

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1c300a8ace4b54d475ef8d398661ed65ca273a2e
2020-07-15 19:14:58 +01:00
Adam Feuer
11a8c3e035 checkrelease.sh now tries to build sim:nsh
Squashed commit of the following:

commit 2b7e2ef927462f492b94ce0f8f1ae248a4ff1609
Author: Adam Feuer <adam@starcat.io>
Date:   Wed Jul 15 10:15:37 2020 -0700

    remove duplicate method from bad merge

commit 31846cfcb5c61804ede3a31159c58dc9e627761e
Author: Adam Feuer <adam@starcat.io>
Date:   Tue Jul 14 14:20:36 2020 -0700

    fix --dir option by doing cp "$DIRECTORY"/* .

    - instead of cp "$DIRECTORY" .

commit 01d23a1a0bbaaf74f26c0589705b1f4a41c755bf
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Tue Jul 7 15:08:59 2020 -0700

    changes from xiaoxiang781216

    - remove verbose option
    - simplify

commit 3db107e6fdebfbf9b2afa16bfe89c846d1ec7352
Author: Adam Feuer <adam@starcat.io>
Date:   Tue Jul 14 10:39:42 2020 -0700

    simplify wget invocation; add slash to all URLS

commit fa6b14a649cd311e8316368992a709460823e756
Author: Adam Feuer <adam@starcat.io>
Date:   Tue Jul 14 10:19:26 2020 -0700

    quitting directly after unknown argument

    - with usage
    - also removed unneeded echo
    - as per PR feedback

commit bfda65a347a85959d516f05ba579b5539e953816
Author: Adam Feuer <adam@starcat.io>
Date:   Mon Jul 13 13:44:42 2020 -0700

    streamline argument processing as per PR feedback

commit b6a8d77ef8000a9be71d044aa929b309e8baca72
Author: Adam Feuer <adam@starcat.io>
Date:   Thu Jul 9 21:47:51 2020 -0700

    PR feedback changes

    - many

commit abf89d2ec28b0386d3dc4117e449c2f5893fca54
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Tue Jul 7 18:22:20 2020 -0700

    added --gpg-output / -G flag

    - to see GPG output

commit f0711df27e5eca2d1b9499d8c7532fc75cb0bc39
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Tue Jul 7 18:13:14 2020 -0700

    quiet wget; check URL exists before downloading

commit 9bc97e7c0dfe0d392e39f11419081cf48db3b8fd
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Tue Jul 7 15:08:59 2020 -0700

    checkrelease.sh script now builds sim:nsh

    Squashed commit of the following:

    commit 80d270b4d50ec10d912e7a67a0e86efe8ca95e98
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Tue Jul 7 15:06:48 2020 -0700

        checkrelease script can use url, release, or dir

    commit 6a7e8e3210d671d6aa2c60bd8a50701839924cf4
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Tue Jul 7 11:06:28 2020 -0700

        try to build sim:nsh

    commit 2cf777e062b99c8b3cb7184f55d1f82769c8f989
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Tue Jul 7 10:21:31 2020 -0700

        improved success and error messaging
2020-07-15 12:50:40 -05:00
Xiang Xiao
d32e9c38df boards: Move the C/C++ search path to the common place
so all boards support uClibc++/libc++ automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ibe6fafbec57f7acb26ea6188a3e9923ea82295c5
2020-07-13 15:11:12 -03:00
Xiang Xiao
cfc58d1913 nxstyle: Add some unwind name to the white list
we can't change the case because it is defined by ARM

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-11 10:34:22 -07:00
Ouss4
1a523e5519 tools/zipme.sh: Remove the option to exclude patterns based on the VCS'
"ignore" file.
2020-07-06 20:11:13 -07:00