Commit Graph

36413 Commits

Author SHA1 Message Date
chao.an
d07afc934e fcntl: add O_CLOEXEC/FD_CLOEXEC support 2020-02-20 08:20:38 -06:00
Gregory Nutt
c015e42602 boards/z80/ez80: Update compiler support
boards/z80/ez80:  Update to latest ZDS-II verstion 5.3.3 compiler
arch/z80/src/ez80:  Fix some regressions on ez80f91 build due to ez80f92
changes.
2020-02-20 08:18:39 -06:00
Masayuki Ishikawa
9909b7636c boards: spresense: Add CONFIG_NSH_FILE_APPS=y to rndis and wifi configs
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-20 08:49:23 +01:00
YAMAMOTO Takashi
43e9608a14 sama5d4-ek: Fix typos in README 2020-02-20 08:48:16 +01:00
YAMAMOTO Takashi
b363bd0841 Update the comments (the location of trampoline code)
Also, fix typos and copy-and-paste errors.
2020-02-20 14:21:16 +08:00
Masayuki Ishikawa
28ec6ca729 boards: sabre-6quad: Update defconfig for smp
Enable optimization and generate debug symbols.
Enable scheduler instrumentation and spinlock irq.
Add applications such as hello, ostest and taskset.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-19 20:04:58 -06:00
Masayuki Ishikawa
6ccf08a778 arch: imx6: Add imx_idle.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-19 20:04:58 -06:00
Masayuki Ishikawa
f38f39d410 arch: arm: Select ARCH_GLOBAL_IRQDISABLE for iMX6
NOTE: SMP related behaviour will be same as armv7-m SMP

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-19 20:04:58 -06:00
Masayuki Ishikawa
bbefad449c arch: armv7-a: Apply armv7-m SMP related logic to armv7-a
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-19 20:04:58 -06:00
Gregory Nutt
90839b41f9 Revert some changes from a previous PR
I was over-zealous in arch/z80/src/ez80/ez80f91_handlers.asm.  I added space separatros around the '+' operators.  Turns out that the ZDS-II assembler can't handle the spaces in that context.
2020-02-20 01:05:28 +01:00
Ouss4
f8801e1bd8 libs/libc/unistd/lib_alarm.c,sched/timer/timer_getitimer.c: Silence a
warning with struct initialization.
2020-02-19 18:02:25 -06:00
Gregory Nutt
b403bfecd5 arch/z80/src/ez80/ez80f92.h: Fix some bad copy-paste. 2020-02-20 00:25:19 +01:00
Gregory Nutt
647f2f44df Run arch files through nxstyle. 2020-02-20 00:03:48 +01:00
Gregory Nutt
77b4fa936b New files need Apache 2.0 license. 2020-02-20 00:03:48 +01:00
Gregory Nutt
2fca67c421 arch/z80/src/ez80 and include/ez80: Add ez80f92 support
The ez80f92 is similar to the currently supported ez80f91 except that is:

1. Has no PLL and has a maximum CPU frequency of only 20MHz
2. Has no Ethernet controller
3. Timers are different
4. Has no GPIO Port A
5. Timers are different
6. It comes in a smaller package

and other small differences.

This provided the architecture (only) support for the forthcoming z20x port.
2020-02-20 00:03:48 +01:00
Gregory Nutt
d202e2ef61 libs/libc/time/lib_gmtimer.c: Fix compile problem from PR317
PR317 removed definitions for SEC_PER_MIN, SEC_PER_HOUR, and SEC_PER_DAY because these were duplicates of definitions in include/nuttx/clock.h.  However, the PR did not include nuttx/clock.h so the removal of these definitions resulted in compilation failures.

Noted by Ouss4
2020-02-19 23:09:45 +01:00
Gregory Nutt
2ec59121fb Fix non C89 noncompliant code that was causing the ZDS-II compile to fail. 2020-02-19 23:09:10 +01:00
chao.an
4d6e275fc4 libs/libc/time/lib_gmtimer.c: Remove duplicate definition
time/lib_gmtimer.c:54: warning: "SEC_PER_MIN" redefined
   54 | #define SEC_PER_MIN  ((time_t)60)
      |
In file included from nuttx/include/nuttx/semaphore.h:48,
                 from nuttx/include/pthread.h:56,
                 from nuttx/include/signal.h:50,
                 from nuttx/include/sys/select.h:46,
                 from nuttx/include/sys/types.h:305,
                 from nuttx/include/time.h:46,
                 from time/lib_gmtimer.c:44:
nuttx/include/nuttx/clock.h:125: note: this is the location of the previous definition
  125 | #define SEC_PER_MIN                   60L
      |
time/lib_gmtimer.c:55: warning: "SEC_PER_HOUR" redefined
   55 | #define SEC_PER_HOUR ((time_t)60 * SEC_PER_MIN)
      |
In file included from nuttx/include/nuttx/semaphore.h:48,
                 from nuttx/include/pthread.h:56,
                 from nuttx/include/signal.h:50,
                 from nuttx/include/sys/select.h:46,
                 from nuttx/include/sys/types.h:305,
                 from nuttx/include/time.h:46,
                 from time/lib_gmtimer.c:44:
nuttx/include/nuttx/clock.h:138: note: this is the location of the previous definition
  138 | #define SEC_PER_HOUR           (SEC_PER_MIN  * MIN_PER_HOUR)
      |
time/lib_gmtimer.c:56: warning: "SEC_PER_DAY" redefined
   56 | #define SEC_PER_DAY  ((time_t)24 * SEC_PER_HOUR)
      |
In file included from nuttx/include/nuttx/semaphore.h:48,
                 from nuttx/include/pthread.h:56,
                 from nuttx/include/signal.h:50,
                 from nuttx/include/sys/select.h:46,
                 from nuttx/include/sys/types.h:305,
                 from nuttx/include/time.h:46,
                 from time/lib_gmtimer.c:44:
nuttx/include/nuttx/clock.h:141: note: this is the location of the previous definition
  141 | #define SEC_PER_DAY            (HOURS_PER_DAY * SEC_PER_HOUR)
      |
2020-02-19 12:51:08 -06:00
chao.an
b438d529f1 libs/libc/stdio/lib_getdelim.c: Correct the character slash 2020-02-19 12:47:25 -06:00
chao.an
52484b1b8c sched/Kconfig: add PATH_MAX config 2020-02-19 12:43:34 -06:00
chao.an
c65d8e6a23 net/socket: add MSG_DONTWAIT support
MSG_DONTWAIT (since Linux 2.2)
  Enables nonblocking operation; if the operation would block, the
  call fails with the error EAGAIN or EWOULDBLOCK. This provides
  similar behavior to setting the O_NONBLOCK flag (via the fcntl(2)
  F_SETFL operation), but differs in that MSG_DONTWAIT is a per-call
  option, whereas O_NONBLOCK is a setting on the open file description
  (see open(2)), which will affect all threads in the calling process
  and as well as other processes that hold file descriptors referring
  to the same open file description.
2020-02-19 12:21:28 -06:00
chao.an
58599e8e2e fs/vfs/fs_ioctl.c: Add FIONBIO support 2020-02-19 12:08:08 -06:00
Nicholas Chin
0f284c3025 driver/ioexpander: adds driver for the PCA9538 I2C ioexpander 2020-02-19 11:53:08 -06:00
chao.an
5b750fdda0 inclue/sys/file.h: Dummy header for POSIX compliance 2020-02-19 11:48:49 -06:00
YAMAMOTO Takashi
2cd2a0af5a
arm hostfs: Compile only when enabled by config (#307)
* arch/arm/src/tiva/Make.defs: Compile only when enabled by configuration CONFIG_ARM_SEMIHOSTING_HOSTFS
*  arch/arm/src/common/up_hostfs.c:  Remove the ifdef conditional because it's redundant with the make logic.
2020-02-19 08:13:12 -06:00
Kevin Liu
7507f78a2f boards/arm/samv7: Fix undefined reference to _ramfuncs
Update linker scripts to provide _ramfuncs sections for SAMv7 based boards.  This corrects undefined reference to _ramfuncs when CONFIG_ARCH_RAMFUNCS is enabled (Issue #304)
2020-02-19 07:59:28 -06:00
YAMAMOTO Takashi
d5fc2458ba boards/arm/tiva/lm3s6965-ek: Add PROTECTED support
Largely copy-and-paste from stm32f4discovery.

Also arch/arm/src/armv7-m/mpu.h: Ensure RBAR alignment

  Fix crashes on init task startup I observed on qemu-system-arm -M lm3s6965evb.
2020-02-19 07:42:14 -06:00
Masayuki Ishikawa
b9682171f4 arch: armv7-a: Fix stack pointer alignment at startup
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-19 07:25:31 -06:00
Gregory Nutt
d06d8fbca2 Run all .c and .h files modified by PR301 through nxstyle. 2020-02-19 07:23:41 -06:00
Xiang Xiao
892290f76b syslog: Call syslog_rpmsg_init inside syslog_initialize like other syslog driver 2020-02-19 07:19:34 -06:00
Xiang Xiao
553f12b4e8 syslog: Remove SYSLOG_SERIAL_CONSOLE which isn't really used 2020-02-19 07:19:20 -06:00
Gregory Nutt
fdf673c5c7 arch/arm/src/kinetis/kinetis_serial.c: Correct build test failure.
Correct error:  'TTS0_DEV' undeclared
2020-02-19 10:31:04 +01:00
Nicholas Chin
85caee63b4 drivers/analog: Adds driver for the ADS7828 I2C analog to digital converter 2020-02-18 14:19:40 -06:00
Xiang Xiao
bff26dbe3a arch: Cleanup syslog_console_init usage
1. Remove the private declaration
2. Ensure nuttx/syslog/syslog_console.h gets included
3. Remove syslog_console.h inclusion if not really used
2020-02-18 13:06:53 -06:00
Xiang Xiao
51a2171c71 ramlog: Remove g_ramlog_syslog_channel since it's same as g_default_channel
And remove syslog_init_e because all initialization is later now and we don't
distinguish the initialition phase anymore after ramlog don't need special
initialize.
2020-02-18 13:04:45 -06:00
Xiang Xiao
dcaaf2d912 ramlog: Remove all ramlog_consoleinit related code
Because we can get the same function by CONSOLE_SYSLOG/syslog_console_init.
BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh
will read back what it send out which will surprise most people.
2020-02-18 12:57:43 -06:00
Xiang Xiao
f982ee43db drivers/serial: Remove the lowconsole driver
Replace with the syslog console driver which has more capability than lowconsole
2020-02-18 12:51:09 -06:00
Xiang Xiao
ad97c044a7 arch/z80: Remove z80_lowserial_initialize()
Since nothings calls the function z80_lowerserial_initialize() at all
2020-02-18 12:45:57 -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
Kevin Liu
6c31a72e2b boards/arm/samv7: Add automounter and reset
This commit adds automounter and BOARDCTRL_RESET support for SAMV71 and verified on Atmel SAMV71-XULT.  Also, some fixes of Kconfig and missing uerr/uinfo definition.
2020-02-18 07:51:04 -06:00
Xiang Xiao
6b77f73583 arch: Move iob_initialize into nx_start just after heap initialization
it doesn't make sense that iob initialization is in up_initialize
but other memory components initialization is called in nx_start

Change-Id: Id43aeaa995f340c5943f59a0067a483ff3ac34a2
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-18 10:26:19 -03:00
Xiang Xiao
a5c15c1098 arch/misoc: Remove unused lm32/types.h and minerva/types.h 2020-02-18 07:15:32 -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
Masayuki Ishikawa
e7d44ee16e arch: armv7-a: Fix heap corruption in SMP mode
Currently up_allocate_heap() assumes that g_idle_topstack points
top of the heap memory. However, g_idle_topstack pointed incorrect
address in SMP mode which resulted in heap corruption. This PR
moves g_idle_topstack at the end of .noinit to avoid this issue.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-18 07:06:12 -06:00
YAMAMOTO Takashi
7513cb6921 CONFIG_ARM_SEMIHOSTING_HOSTFS: mention limited support of directories 2020-02-18 17:11:59 +08:00
YAMAMOTO Takashi
9d4e9ce21e Make this build with CONFIG_ARM_SEMIHOSTING_HOSTFS=y 2020-02-18 13:46:33 +08:00
Nathan Hartman
239537fd9d arch/arm/include/tiva/chip.h: Fix typos 2020-02-17 16:50:03 -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
Juha Niskanen
ea72d84c4d /mm/mm_heap/mm_mallinfo.c: Fix assertion broken in 312ea9f9. 2020-02-17 08:06:46 -06:00
YAMAMOTO Takashi
5ebce26cc7 Fix "unused" warnings with CONFIG_TIVA_WITH_QEMU=y 2020-02-17 13:41:10 +08:00