Commit Graph

37986 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
ba4a7107df fs/hostfs/hostfs.c: Remove a redundant assignment
Found by clang-check:

hostfs/hostfs.c:1081:3: warning: Value stored to 'ret' is never read
  ret = OK; /* Assume success */
  ^     ~~
1 warning generated.
2020-07-30 08:59:46 +02: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
Masayuki Ishikawa
336bd8c3a2 arch: lc823450: Fix style violations
Summary:
- Fix style violations under lc823450
- NOTE: still some files need to be fixed

Impact:
- Some register naming were changed but all files are included

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-30 00:07:31 -05:00
Masayuki Ishikawa
22a9b497b1 arch: lc823450: Fix style violations in lc823450_syscontrol.h
Summary:
- Fix style violations in lc823450_syscontrol.h

Impact:
- This commit affects register naming in syscontrol.
- So some files such as lc823450_start.c lc823450_mux.c were also changed.

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-30 00:07:31 -05:00
Masayuki Ishikawa
f255f4f97d boards: lc823450-xgevk: Fix style violations
Summary:
- Fix style violations under lc823450-xgevk

Impact:
- No impact

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-30 00:07:31 -05:00
YAMAMOTO Takashi
1a669e09cd drivers/syslog/syslog_write.c: nxstyle fix 2020-07-29 21:13:20 -07:00
YAMAMOTO Takashi
9274b67a45 syslog_default_write: Fix the return value
Found by clang-check:

syslog/syslog_write.c:96:7: warning: Value stored to 'nwritten' is never read
      nwritten = g_syslog_channel->sc_write(buffer, buflen);
      ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
2020-07-29 21:13:20 -07:00
YAMAMOTO Takashi
9dcc6f6da6 fs/driver/fs_blockproxy.c: Fix an error handling
Found by clang-check:

driver/fs_blockproxy.c:202:7: warning: Value stored to 'ret' is never read
      ret = -errno;
      ^     ~~~~~~
1 warning generated.
2020-07-29 21:13:20 -07:00
Xiang Xiao
b330b3ac0c arch/sim: Fix the linkage of up_irqinitialize mismatch
include/arch/irq.h💯20: note: previous declaration with ‘C++’ linkage
  100 | static inline void up_irqinitialize(void)
      |                    ^~~~~~~~~~~~~~~~
In file included from include/ctype.h:45,
                 from include/libcxx/ctype.h:38,
                 from include/libcxx/cctype:38,
                 from include/libcxx/cwctype:53,
                 from include/libcxx/cwchar:106,
                 from include/libcxx/string:510,
                 from libcxx/src/debug.cpp:13:
include/nuttx/arch.h:1343:6: error: conflicting declaration of ‘void up_irqinitialize()’ with ‘C’ linkage
 1343 | void up_irqinitialize(void);
      |      ^~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I0e0963a3465f9dabdaca6534a55b9c2c41f4bc64
2020-07-30 12:50:39 +09:00
Xiang Xiao
338244dbac procfs: Get version info from uname instead
unify the version into one place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I988fb40d3f460b0291114c60edb04db3aabb38f1
2020-07-30 10:33:08 +09:00
Xiang Xiao
3cff139b85 libc: Make gethostname as syscall instead of uname
simplify and symmetry the implementation in KERNEL/PROTECTED build

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iefdeea5f6ef6348c774b2ca9f7e45fe89c0c22dd
2020-07-30 10:33:08 +09:00
Matias N
0a6c81b19c main README converted to Markdown format 2020-07-29 11:52:15 -05:00
Matias N
5e95adfb76 rename README.txt to README.md 2020-07-29 11:52:15 -05:00
Xiang Xiao
1cb1fb427d libc: Replace all malloc/free to lib_malloc/lib_free
since libc can be built and used in kernel space,
we must call kmm_malloc and kmm_free in this case.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-29 10:14:27 +01:00
SPRESENSE
d2f75467b5 net/usrsock: Add flags to sendto/recvfrom in usrsock
Add flags argument into sendto() and recvfrom() APIs for MSG_* flags can
handling in the daemon.

However, MSG_DONTWAIT should process in usrsock, so it unnecessary to pass to
the daemon like O_NONBLOCK.
2020-07-29 09:40:51 +02:00
Xiang Xiao
28eed285c8 sched: The secondary idle threads should call nx_idle_trampoline
because nx_task_idle doesn't call sched_note_start. To avoid the
same error happen again in the furture, nx_task_idle is removed.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-29 16:03:13 +09:00
SPRESENSE
a32506bbdf boards: s32k1xx: Remove SPITOOL_PROGNAME
Fix apps/system/spi/Kconfig default value, so no longer needed.
2020-07-29 00:48:48 -05:00
Masayuki Ishikawa
8a7ecf0858 drivers: wireless: Fix null pointer dereference in gs2200m.c
Summary:
- This PR fixes null pointer dereference in gs2200m.c

Impact:
- This PR affects gs2200m driver.

Testing:
- Use spresense:wifi and run gs2200m daemon in STA mode.
- Then execute 'renew eth0' to obtain DHCP address.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-28 23:02:20 -05:00
Xiang Xiao
7a32a396b0 arch/sim: Move share memory allocation to up_hostmemory.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-28 15:41:19 +01:00
Alan C. Assis
cb1d11a499 ESP32: Add driver support to I2C
This driver was implemented by Dong Heng <dongheng@espressif.com>
and modified to fix coding style by Alan Carvalho de Assis.

Co-authored-by: Abdelatif Guettouche <abdelatif.guettouche@gmail.com>
2020-07-28 14:31:55 +01:00
Masayuki Ishikawa
904ec767f7 arch: lc823450: Fix nxstyle violations
Summary:
- This PR fixes style violations for lc823450.
- NOTE: I will fix more style violations in separate PR later.

Impact:
- No impacts.

Testing:
- I checked build test only.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-28 06:07:31 -05:00
SPRESENSE
27835c8c0a ramlog: Add overwrite option to ramlog
Enable overwrite of circular buffer. If RAMLOG buffer overflows,
overwrite it from the top of buffer and always keep the latest log.
2020-07-28 04:00:18 -05:00
SPRESENSE
e249a2f82f Makefile: Fix Make.dep not updated by config changes
Make.dep file should be updated by .config changed after first make.
There are 2 cases affected for this problem:

 1) Add source files by config symbol
 2) Include header files in #ifdef directive

These 2 cases may not be included in Make.dep and this may prevent the
differential build from working correctly.
2020-07-28 03:59:45 -05:00
SPRESENSE
d560ce65ff cxd56xx: spresense: Add some improvements and fix bugs for Spresense board
- Add new functions of GNSS
- Support the lower PWM frequency
- Add CONFIG_CPUFREQ_RELEASE_LOCK
- Add high speed ADC support
- Add HPADC input gain configuration
- Add eMMC device
- Frame buffer support
- Fix SD/GNSS/sensor drivers not worked
- Build errors
- Fix nxstyle issues
2020-07-28 09:13:05 +02:00
SPRESENSE
500ead8101 drivers/modem/altair: Update altair modem driver
- Add board specific logic to altair modem dirver
- Fix issue that SPI4 RX frequency violated AC Spec
- Remove dummy buffer in altair driver
- Fix priority of SPI transfer task is too low
- Remove unnecessary configuration
- Modify timeout value for RX ready
- Fix minor bugs
2020-07-28 09:09:18 +02:00
Masayuki Ishikawa
524f18c4cd libs: termios: Replace license header with Apache License 2.0
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-28 00:47:39 -05:00
Masayuki Ishikawa
41e6ce2beb include: audio: Replace license header with Apache License 2.0
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-28 00:47:39 -05:00
Masayuki Ishikawa
b6218c67f8 drivers: audio: Replace license header with Apache License 2.0
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-28 00:47:39 -05:00
Masayuki Ishikawa
996e93da0c sched: Replace license header with Apache License 2.0
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-28 00:47:39 -05:00
Xiang Xiao
33ec242caf Implement proposed POSIX _clockwait variants of existing _timedwait functions
Here is the related glibc patchset:
https://patchwork.ozlabs.org/project/glibc/cover/cover.b0c66849a87ca79889a49f2f1f2563b1a8a15d8b.1551291557.git-series.mac@mcrowe.com/

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I0095cb34cef3d0d88a100255053da79266b73ff2
2020-07-27 20:39:59 -03:00
Xiang Xiao
78862c51dc arch/sim: Fix the wrong sleep time calculation in sim_idle_trampoline
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-28 08:37:19 +09:00
Xiang Xiao
53f33a7ea2 arch/sim: Synchronize the creation of idle thread by semaphore
it's wrong to synchronize with mutex here

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-28 08:37:19 +09:00
Xiang Xiao
71a9d2402d arch/sim: Replace sigprocmask with pthread_sigmask in main thread
like other idle thread

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-28 08:37:19 +09:00
Xiang Xiao
f2446ecb90 arch/sim: unify the prefix(g_cpu_) for SMP related variables
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-28 08:37:19 +09:00
Masayuki Ishikawa
a58193aa9a arch: imxrt: Fix style violations in imxrt_enet.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-26 21:49:52 -07:00
Masayuki Ishikawa
9079d48646 arch: imxrt: Fix auto negotiation for KSZ8081 PHY
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-26 21:49:52 -07:00
Xiang Xiao
cc00d2b2b0 arch/sim: Call sched_note_cpu_* when SCHED_INSTRUMENTATION equal true
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-26 12:24:57 +01:00
Johanne Schock
8792ade0fe Several USB improvements.
Kinetis: Reworked USB driver for setup out data phase.
Freedom K28: New config nshsdusb, with RNDIS support
PL2303: Try to avoid clone detection.
General: various nxstyle fixes
General: license changed
2020-07-24 13:24:53 -03:00
Xiang Xiao
a5ef3731b1 drivers/video: fb_read/fb_write need consider the current file position
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id3a475dac928ed3dff4eee96150badadf5210f44
2020-07-24 10:49:37 +02:00
Xiang Xiao
f044c82dae drivers/lcd: Remove the redundant LCD_HWCURSOR
reuse FB_HWCURSOR instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I568104a87b9c08308374a9723c248287332bc9e4
2020-07-24 10:47:02 +02:00
Xiang Xiao
da6bb94740 drivers/lcd: Don't select NX_LCDDRIVER automatically
since graphics/Kconfig already do the similar thing

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib2c1955a6b027cfa4e83c3b81ddfb505902dd85d
2020-07-24 10:47:02 +02: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
Xiang Xiao
131535dfe4 drivers/lcd: Fix the memory leak when board_graphics_setup fail
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I08a7ecc48b2c28b1c8c97f74e7a163ca67de6fca
2020-07-23 13:05:58 +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
ac34ac9f5c Add g_funcnames declaration in syscall.h 2020-07-22 12:01:40 -05:00
Nakamura, Yuuichi
02718f0827 Syscall instrumentation build system support for Arm and RISC-V 2020-07-22 12:01:40 -05:00
Nakamura, Yuuichi
376786288e Create wrapper library for system call instrumentation 2020-07-22 12:01:40 -05:00
Nakamura, Yuuichi
2b4d2cd4a3 Fix note structure members types 2020-07-22 11:55:21 -05:00
SPRESENSE
e4b50c4ba0 drivers/mmcsd: Fix minor bugs
- Add missing cancel process when the send command fails
- Make it possible to recover from SD initialization error
- Reduce time in changing transfer mode to 5msec from 500msec.
  Replace usleep function instead of up_udelay in other to avoid
  blocking other tasks from working.
2020-07-22 09:51:54 -05:00