Commit Graph

119 Commits

Author SHA1 Message Date
Nathan Hartman d6f7821b15 Docs and comments: Change OSX -> macOS
Mac OS X was renamed to macOS at some point. Update references to
OSX, OS X, Mac OS X, Mac OSX, and other permutations, to macOS,
in README files and in comments of other files.
2020-04-26 07:48:33 -06:00
zhongan 648a76b3c1 risc-v: add pm initialization functions.
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-15 10:07:30 -03:00
Nathan Hartman 9b86305ad3 Fix copy/paste typo in various Kconfigs 2020-04-14 22:42:21 +01:00
Xiang Xiao 11705ffc71 Fix nxstyle issue 2020-04-14 13:02:00 -06:00
zhongan 0d3691a460 Add fpu support. 2020-04-14 13:01:47 -06:00
zhongan 957c14d95e Add initialization for idle task. 2020-04-14 13:01:34 -06:00
zhongan 38b4933e88 Change --start-group and '--end-group' as args. 2020-04-14 13:01:20 -06:00
zhongan 7262af219f rv32im/Toolchain.defs: when 'CONFIG_ARCH_FPU' enabled, add 'f' to match and mabi. 2020-04-14 13:01:08 -06:00
zhongan bf21c1b947 Risc-v: Fix the not supported options in the latest 'RISCV_TOOLCHAIN' in rv32im's Toolchain.defs. 2020-04-14 13:00:53 -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
ligd 231ad202ee global change: repace sched_xfree() to kxmm_free()
Changes:
sched_xfree() => kxmm_free()
remove garbage related APIs
remove ARCH_HAVE_GARBAGE

Cause garbage feature move to mm_heap, then don't need
garbage anymore.

Change-Id: If310790a3208155ca8ab319e8d038cb6ff92c518
Signed-off-by: ligd <liguiding@fishsemi.com>
2020-04-09 10:29:28 -06:00
Nathan Hartman 679b4fbee2 arch: Fix included directed -> included directly
This typo had been copied and pasted into numerous irq and syscall
headers.
2020-04-05 22:31:15 +01:00
YAMAMOTO Takashi 4ddb457c3e Fix a typo in comments 2020-04-01 00:03:31 +08:00
YAMAMOTO Takashi 1ffa009c8b Revert "Don't generate .depend anymore"
This reverts commit 79af7fbf4e.

Because:

* btashton reported some issues in local builds:

  https://github.com/apache/incubator-nuttx/pull/603#issuecomment-602264860

* this might be related to the current CI breakage:

  > /bin/sh: 1: /__w/incubator-nuttx/incubator-nuttx/nuttx/tools/mkdeps: not found
2020-03-22 23:07:29 -05:00
Xiang Xiao 79af7fbf4e
Don't generate .depend anymore 2020-03-22 18:15:29 +00:00
aenrbes d450f5ce77
Add support for Litex VexRiscV. 2020-03-21 06:01:56 +00:00
Nathan Hartman a5e643b0cd Fix typos in comments and documentation. 2020-03-16 20:01:11 -06:00
Masayuki Ishikawa 0cb7dfde79 arch: risc-v: Fix a warning in common/up_exit.c
common/up_exit.c:198:1: warning: 'noreturn' function does return
2020-02-27 08:55:55 +01:00
YAMAMOTO Takashi d52628979a Suppress "'noreturn' function does return" warnings
up_pthread_start and up_task_start.
2020-02-25 04:07:02 -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
liuhaitao b4cf5f5dab arch: refine up_serialinit/up_earlyserialinit/rpmsg_serialinit 2020-02-23 09:11:57 -06:00
liuhaitao c5eab0dc8f arch: use ifdef USE_EARLYSERIALINIT to include up_earlyserialinit
There are cases that USE_SERIALDRIVER is defined but USE_EARLYSERIALINIT not defined in some configs. So use ifdef USE_EARLYSERIALINIT to include up_earlyserialinit anyway.
2020-02-23 09:11:43 -06:00
liuhaitao 8ca4ca5ae8 arch: undef USE_SERIALDRIVER if CONFIG_CONSOLE_SYSLOG
An error was introduced from:

  commit f982ee43db
  Author: Xiang Xiao <xiaoxiang@xiaomi.com>
  Date:   Tue Feb 18 09:55:04 2020 +0800

    drivers/serial: Remove the lowconsole driver

    Replace with the syslog console driver which has more capability than lowconsole
2020-02-23 09:10:06 -06:00
Xiang Xiao bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06: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
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 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 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
Gregory Nutt 10623f65b0 arch/risc-v/src/k210/up_schedulesigaction.c: Fix some long lines. 2020-02-14 09:37:24 -06:00
Masayuki Ishikawa 382cc29c72 arch: risc-v: Add support for PROTECTED build to k210 2020-02-14 09:29:51 -06:00
Masayuki Ishikawa 5fcde14cd1 arch: risc-v: Add up_pthread_start.c and up_task_start.c to common dir 2020-02-14 09:29:51 -06:00
Masayuki Ishikawa 1a4ff4c4cd arch: risc-v: Add support for PROTECTED build to rv64gc 2020-02-14 09:29:51 -06:00
Juha Niskanen 15b78abccf Fix typos in comments 2020-02-14 08:50:45 -06:00
Xiang Xiao 6d69439f58 Call xxx_timer_initialize from clock subsystem
Call xxx_timer_initialize from clock subsystem to make timer ready for use as soon as possiblei and revert the workaround:

commit 0863e771a9
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Apr 26 07:24:57 2019 -0600

    Revert "sched/clock/clock_initialize.c:  clock_inittime() needs to be done with CONFIG_SCHED_TICKLESS and clock_initialize should skip clock_inittime() for external RTC case since the RTC isn't ready yet."

    This reverts commit 2bc709d4b9.

    Commit 2bc709d4b9 was intended to handle the case where up_timer_gettime may not start from zero case.  However, this change has the side-effect of breaking every implementation of tickless mode:  After this change the tickless timer structures are used before they are initialized in clock_inittime().  Initialization happens later when up_initialize is called() when arm_timer_initialize().

    Since the tickless mode timer is very special, one solution might be to

    1. Rename xxx_timer_initialize to up_timer_initialize
    2  Move up_timer_initialize to include/nuttx/arch.h
    3.  Call it from clock subsystem instead up_initialize

    Basically, this change make timer initialization almost same as rtc initialization(up_rtc_initialize).

    For now, however, we just need to revert the change.
2020-02-08 07:40:06 -06:00
Xiang Xiao 76bbed07a4 Call up_irqinitialize from irq subsystem
Call up_irqinitialize from irq subsystem to make the irq ready for use as soon as possible
2020-02-08 07:39:22 -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
Masayuki Ishikawa 81f1133174 ELF64 support (#220)
* include: Introduce elf64.h and elf.h

    Added elf64.h for 64bit ELF support and moved common definitions
    from elf32.h to elf.h. Also introduced Elf_xxx to be used in
    common libraries such as binfmt.

  * binfmt, include, modlib, module: Add support for ELF64

    Elf_xxx must be used instead of Elf32_xxx to support ELF64.
    To use ELF64, CONFIG_ELF_64BIT must be enabled.

  * binfmt, modlib: Add support for relocate address

  * arch: risc-v: Add include/elf.h

  * libs: machine: Add risc-v related files.

    NOTE: Currently only supports ELF64

  * boards: maix-bit: Add elf and posix_spawn configurations

  * boards: maix-bit: Add support for module configuration
2020-02-07 17:10:23 -06:00
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao 80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01: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
y-sugino cf756061f4 arch: fe310: Fix comments 2020-01-26 07:18:47 -06:00
Juha Niskanen a762c06ed9 Fix typos and some incorrect comments
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle against .c and .h files and fix it

Author: Juha Niskanen <juha.niskanen@haltian.com>

    Fix typos and some incorrect comments
2020-01-20 09:32:36 -03:00
Masayuki Ishikawa 29d3ed2ec1 Feature k210 smp (#71)
* arch: risc-v: Remove unused typedef for irqstate_t

    NOTE: irqstate_t is defined in arch/risc-v/include/types.h

  * arch: risc-v: Add typedef irqstate_t for __LP64__
  * arch: risc-v: Add SMP support to K210 (RV64GC) processor
  * boards: maxi-bit: Update READMEs and add smp/defconfig
2020-01-10 08:04:41 -06:00
Masayuki Ishikawa 255f3008cf arch: k210: Applied changes doned for fe310 recently.
NOTE: In the future, these code should be moved under common code
once they support both RV32 & RV64 architectures.
2020-01-09 09:33:10 -03:00
Masayuki Ishikawa d76ba14d58 arch: fe310: Fix mstatus handling
In previous commit, mstatus.mie was set when creating a new task
    but this change was incorrect and had a side effect such that
    a machine interrupt would be enabled just before returning from
    interrupt handling routine to switch context.

    Also, mstatus.mpp is set to machine mode in up_get_newintctx()
    instead of fe310_dispatch_irq().
2020-01-08 10:39:00 -03:00
Masayuki Ishikawa 4ea49c5691 Fix issues on fe310 including interrupt handling (#46)
* arch: fe310: Fix comments

* arch: fe310: Improve irq handling in fe310_serial.c

* arch: fe310: Fix initial interrupt status (mstatus)

Also, removed unnecessary up_enable_irq(FE310_IRQ_ECALLM)
2020-01-07 07:17:39 -03: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