Commit Graph

985 Commits

Author SHA1 Message Date
Masayuki Ishikawa
3c11825cda tools: Fix nuttx-gdbinit for armv7-m with FPU
Summary:
- Brennan reported the script does not work with nucleo-h743zi:otg_fs_host
- Actually, the config uses FPU but the script did not detect it
- The script assumed that the nuttx contains fpuconfig symbol
- However, this assumption was incorrect
- This commit fixes this issue by detecting FPU with tcb->xcp.regs

Impact:
- Cortex-M targets

Testing:
- Tested with lm3s6965-ek:discover (Cortex-M3)
- Tested with spresense:wifi_smp (Cortex-M4F)
- Tested with sim:smp (x86_64)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-22 16:13:22 -08:00
Matias N
d5b6ec450f Parallelize depend file generation 2020-11-22 09:02:59 -03:00
Alin Jerpelea
48e6f2051d audio: libsamplerate: add initial audio Sample Rate Converter
Add audio sample rate conversion library from
http://www.mega-nerd.com/SRC/index.html

Source:
https://github.com/libsndfile/libsamplerate

Add needed patches for NuttX OS and embedded boards.

NOTE:
We must use master branch until next stable release
2020-11-19 18:05:47 -08:00
YAMAMOTO Takashi
5dd5174722 testbuild.sh: Add -C option to skip tree cleanness check
Build-testing a dirty tree is convenient during development.
2020-11-10 18:07:51 -08:00
YAMAMOTO Takashi
954115e097 nxstyle: Add more inttypes.h stuff to the whitelist 2020-11-05 15:19:31 +01:00
Alan C. Assis
30f862f651 Avoid messing the final binary nuttx.(bin,hex,...) compilation msg 2020-11-04 18:08:55 -08:00
Xiang Xiao
9208176f60 build: Move __NuttX__ definition to tools/Config.mk
ensure this critical macro get defined in all projects

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-02 13:22:39 -03:00
YAMAMOTO Takashi
1184502661 Retire CONFIG_WCHAR_BUILTIN
wchar_t is always a builtin type for C++.

Note: boards/arm/stm32/nucleo-f4x1re/scripts/Make.defs was broken.
(missing -)
2020-11-01 18:19:13 -08:00
Brennan Ashton
e56a7146c2 build: Fix testbuild.sh artifact copy on macOS
xargs for macOS does not support the '-a/--file-arg' flag so
build artifacts were not getting stored.  This change passes it in
via stdin which is more portable.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-29 00:14:19 -07:00
Brennan Ashton
162da1169e CI: Store artifacts durring build
Add new option -A is added to tools/testbuild.sh that will take the
created build executable and store it in a folder for the config
that generated it under $ARTIFACTDIR which can be set via an
environment variable or defaulted to $(TOPDIR)/buildartifacts

This is also helpful for local testing because you can now run
tools/testbuild.sh -A sim.dat and have all of the simulation
targets generated without having to rebuild along the way.

In the GitHub Actions workflow the artifacs are uploaded
two two bundles one for macOS and one for Linux

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-28 11:32:21 -07:00
Alin Jerpelea
bc8ea75580 tools: cxd56: mkspk: automate mkspk build
the mkspk tool will automaticaly be built if CONFIG_CXD56_BINARY
is set.

Test:
nuttx.spk was succesfully generated

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-10-28 12:50:02 +01:00
Xiang Xiao
7901ad6959 tools/testbuild.sh: Support regular expression in blacklist
and prepend 'uname -s' to config for filtering config by host

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-28 00:18:03 -07:00
Xiang Xiao
1aed34182a tools/testbuild.sh: Don't support to change size_t type in datlist
since it doesn't need anymore with the follow patch:
commit e7d9260014
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Mon Feb 17 20:19:25 2020 +0800

    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.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-26 21:45:11 -07:00
Matias N
04e8207e20 Add $(OBJS) and $(BIN) to CLEAN macro to clean objects also in subdirectories 2020-10-25 08:28:33 -07:00
liuhaitao
f2d9f5c43a configure.sh: update custom board config build
If Make.defs not found under boardconfig dir, then try
scripts/Make.defs.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-10-22 11:12:10 -03:00
Xiang Xiao
897b61b057 build: Change .external_dummy to dummy
to better align with the arch, boards and drivers naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 10:26:17 -03:00
Sara Souza
fde7c2bc19 xtensa/tools: Updated makefile to download the IDF stable version 2020-10-20 13:36:43 +01:00
Xiang Xiao
eb4121ce38 Change all 'Nuttx' to 'NuttX'
Unify the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
liuhaitao
d5c6bfe6cf arch: Add custom arch chip build support
Just like custom board build support, add custom arch chip build
support.

Change-Id: I71c87e6b2195501a1b1d728b71d7cbe344951057
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-10-20 14:48:16 +08:00
Xiang Xiao
a49a3eae51 tools: Remove the special handle for Ubuntu under Windows 10
since the Native Linux support could be reused for this case:
https://lists.apache.org/thread.html/r315682ed20bbeb2f1403cf592f892ef009274423189ffc5b3841a6a9%40%3Cdev.nuttx.apache.org%3E

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-18 11:48:19 -07:00
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