Commit Graph

40694 Commits

Author SHA1 Message Date
Alin Jerpelea
c798076084 drivers: Author Sebastien Lorquet: update licenses to Apache
Sebastien Lorquet has submitted the ICL and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-20 19:22:58 -07:00
Alin Jerpelea
bdd2ce7ade include: Author Sebastien Lorquet: update licenses to Apache
Sebastien Lorquet has submitted the ICL and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-20 19:22:58 -07:00
Alin Jerpelea
ba9865bfc8 libs: Author Sebastien Lorquet: update licenses to Apache
Sebastien Lorquet has submitted the ICL and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-20 19:22:58 -07:00
Alin Jerpelea
8843d0f55b boards: Author Sebastien Lorquet: update licenses to Apache
Sebastien Lorquet has submitted the ICL and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-20 19:22:58 -07:00
Alin Jerpelea
e8e2a0875a boards: Alan Carvalho de Assis: update licenses to Apache
Alan Carvalho de Assis has submitted the ICL and we can migrate the licenses
 to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-20 19:22:58 -07:00
Alin Jerpelea
1ad3a22ad5 board: stm32: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-20 19:22:58 -07:00
raiden00pl
8bf3c5efb9 boards/stm32: add initial support for b-g431b-esc1 board 2021-03-20 21:07:20 -03:00
chao.an
a5613e6008 net/tcp: correct the port byte order
1. unify the byte order to network
2. Do not re-select the port if the local port has been bind()

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-20 09:13:18 -07:00
Abdelatif Guettouche
51283bd99a arch/risc-v/syscall.h: Fix syscall function names in comments.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-20 13:02:54 -03:00
Abdelatif Guettouche
fb0fd36a5c arch/risc-v: Internal functions should be prefixed by "riscv_" instead
of "up_"

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-20 13:02:54 -03:00
Xiang Xiao
a0fae8c4d6 boards/arm/stm32l4: Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-20 09:58:01 +01:00
Gregory Nutt
2775cadcd2 Increase the system timer rate:
-CONFIG_USEC_PER_TICK=10000
+CONFIG_USEC_PER_TICK=1000

A system timer with a 10 MS period is not sufficient to run the dual thread sporadic scheduler test since the timings in that test are also around 10 MS.  Apparently there is a race condition when both sporadic thread's budgets complete on the same clock time.  This change does not eliminate the race, but reduces its effect greatly.
2021-03-19 23:18:28 -07:00
Gregory Nutt
2208aabbc6 Correct elapsed time calculation
Elapsed time calculation must always be be the current time minus a time in the past.  Not vice versa.

Also corrects and improves some comments.
2021-03-19 23:18:28 -07:00
Gregory Nutt
5b7dfa0213 Sporadic scheduler: Fix compile errors when assertions are enabled:
Fix missing semicolon at the end of a DEBUGASSERT statement:

sched/sched_sporadic.c: In function 'sporadic_budget_expire':
sched/sched_sporadic.c:512:15: error: expected ';' before 'period'
  512 |               period = (sporadic->repl_period >> 1) - unrealized;
      |               ^~~~~~
sched/sched_sporadic.c: In function 'nxsched_resume_sporadic':
sched/sched_sporadic.c:1078:19: error: expected ';' before 'period'
 1078 |                   period = (sporadic->repl_period >> 1) - unrealized;
      |                   ^~~~~~

Fix use of uninitialized variable in DEBUGASSERT statement:

sched/sched_sporadic.c:466:27: warning: 'sporadic' may be used uninitialized in this function [-Wmaybe-uninitialized]
  466 |                   sporadic->nrepls > 0);

Also fixes some typos.

There should be no unexpected side-effects of this changed.

Tested with the stm32f4discovery:sporadic configuration (see PR #3097
2021-03-19 23:18:28 -07:00
Gustavo Henrique Nihei
dc7a0b0a5c xtensa/esp32: Use Polling instead of DMA for transfers below threshold
Also refactored code to remove a confusing duplicate "dma_chan" field
which had the same purpose of the "use_dma" boolean.
2021-03-19 23:13:32 -07:00
Michael Jung
d397e90b9d stm32l5: Enable SPI support and license clearing
Since the original stm32l4 version of this code already has an ASF
license header do that for stm32l5, too.

Apply latest changes to stm32l4_spi.c to stm32l5_spi.c as well.

Update stm32l5/Kconfig to allow selection of SPI1/2/3.

Signed-off-by: Michael Jung <mijung@gmx.net>
2021-03-19 23:02:37 -07:00
Alin Jerpelea
aa66d91604 boards: nxstyle fixes
nxstyle fixes to pass CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-19 23:01:46 -07:00
Alin Jerpelea
a255a2794b boards: Alan Carvalho de Assis: update licenses to Apache
Alan Carvalho de Assis has submitted the SGA and we can migrate the
 licenses to Apache.

Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-19 23:01:46 -07:00
Alin Jerpelea
b8b7144041 boards: stm32f7: fix Mixed case identifier errors
Fix the Mixed case identifier errors found on stm32f7 family

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-19 23:01:46 -07:00
Alin Jerpelea
66d312985c boards: sama5: fix Mixed case identifier errors
Fix the Mixed case identifier errors found on sama5 family

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-19 23:01:46 -07:00
Alin Jerpelea
3ce3b1e1c5 boards: lpc54xx: fix Mixed case identifier error
Fix the Mixed case identifier errors found on lpc54xx family

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-19 23:01:46 -07:00
Alin Jerpelea
c2dd3832b3 boards: lpc31xx: fix Mixed case identifier error
Fix the Mixed case identifier errors found on lpc31xx family

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-19 23:01:46 -07:00
Masayuki Ishikawa
2976bb212e sched: pthread: Remove a redundant critical section in pthread_condclockwsait.c
Summary:
- This commit removes a redundant critical section in pthread_condclockwait.c

Impact:
- None

Testing:
- Tested with ostest with the following configs
  - maix-bit:smp, esp32-devkitc:smp, sabre-6quad:smp
  - spresense:smp, sim:smp
  - maix-bit:nsh, sabre-6quad:nsh
  - sprsesnse:wifi, sim:ostest
- Tested with nxplayer with the folowing configs
  - spresense:wifi_smp, spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-03-19 23:01:20 -07:00
Nathan Hartman
9eca886f26 drivers/sensors/qencoder.c - Remove bad sninfo() format string
drivers/sensors/qencoder.c:

    * qe_close(): Call to sninfo() contained extraneous "%d"
      format specifier. Removing it, as it appears there was
      never a matching argument.
2021-03-19 23:00:37 -07:00
Jaroslav Beran
7c96a25ec1 can: prevent integer overflow in can_write
Because buflen is size_t (unsigned) and nsent is ssize_t (signed)
of the same size, (buflen - nsent) results in unsigned and
overflows if nsent > buflen.

This happens when sending CAN FD frame with DLC > 8 and a user
gets the buflen parameter as a result of CAN_MSGLEN(len)
where `len' is the size of data which is less then a size
for some extended DLC  (e.g. 26 bytes is sent in a message with
DLC 0xD, which has 32 bytes of data).

The correct buflen value should be rather
  CAN_MSGLEN(can_dlc2bytes(can_bytes2dlc(len)))

Signed-off-by: Jaroslav Beran <jara.beran@gmail.com>
2021-03-19 23:00:07 -07:00
Jaroslav Beran
a0f5892be9 can: Add CAN FD flags to CAN message header
EDL, BRS and ESI bits added to struct can_hdr_s.

The `ch_unused' field is useless (adjacent fields in
packed structs are aligned to the next byte), but some
drivers explicitly set this field to zero, so it is kept there
for API backward compatibility.

Signed-off-by: Jaroslav Beran <jara.beran@gmail.com>
2021-03-19 23:00:07 -07:00
Nathan Hartman
4de28efbcb arch/stm32h7: Fix nxstyle errors
arch/arm/src/stm32h7/hardware/stm32_bdma.h:

    * Fix nxstyle errors.
2021-03-19 22:48:35 -07:00
mage1
874ecbe2f3 mm: add kconfig option to control the memory manger strategy choice.
since will will porvide more the one  strategy in future.

Change-Id: I73b900c6571f9b71b8239dd72006bdd0a68ee64d
2021-03-19 09:56:39 -07:00
mage1
635cfadc25 mm: Move mm_heap_s related stuff to private header file
since it will improve the modularity and reduce the inforamtion explosion

Change-Id: I085b36adb38993a979625a1f4c252d364a15afa1
2021-03-19 09:56:39 -07:00
Xiang Xiao
2e887a1c22 board/arm/mbed: Fix the typo error
regression by:
commit 6f14299dd0
Author: Alin Jerpelea <alin.jerpelea@sony.com>
Date:   Thu Mar 18 09:57:48 2021 +0100

    boards: nxstyle fixes

    nxstyle fixes to pass the CI check

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-19 08:49:59 -07:00
Gregory Nutt
ca3925e531 Add configuration for testing the Sporadic Scheduler.
This PR is the companion to #apache/incubator_nuttx_apps/620 .  See that PR for further information.

No impact is anticipated

Tested using the (new) stm32f4discovery:sporadic configuration.
2021-03-19 16:31:35 +01:00
chao.an
60407c8c8a net/tcp: do not start the tcp monitor if unestablished
Add more sanity checks to avoid TCP moniter start fail if the
TCP handle unestablished, the dup(2) operation should work at any time

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-19 17:23:18 +09:00
Alin Jerpelea
6f14299dd0 boards: nxstyle fixes
nxstyle fixes to pass the CI check

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-18 22:58:27 -07:00
Alin Jerpelea
40cd67eee6 boards: arm: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-18 22:58:27 -07:00
hotislandn
e452b667ef arch:rv64:fix 64bit data type and insn for FPU handlers.
Signed-off-by: hotislandn <hotislandn@hotmail.com>
2021-03-18 22:53:03 -07:00
Michael Jung
a1d0360e5e stm32l5_lse: Drive reduction after start-up
The LSE crystal oscillator driving strength can only be decreased to the
lower drive capability (LSEDRV = 00b) once the LSE is running, but not
to any other drive capability.  Instead of letting the user select a
value between 0 and 3 and then failing the build if the selected value
was not 0, make it a boolean option.

Signed-off-by: Michael Jung <mijung@gmx.net>
2021-03-18 19:59:41 -07:00
Michael Jung
a0ca686490 stm32l5: Rename up_waste to stm32l5_waste
To comply to NuttX naming conventions.

Signed-off-by: Michael Jung <mijung@gmx.net>
2021-03-18 19:59:41 -07:00
Michael Jung
2dbfa54150 stm32l5: Optional LSE xtal drive strength ramp-up
Ported from stm32f7/h7: If configured this way, ramp-up the LSE crystal
oscillator driving strength until the LSE starts up.

Signed-off-by: Michael Jung <mijung@gmx.net>
2021-03-18 19:59:41 -07:00
Matheus Castello
738034e2eb toos/version.sh: Fix PATCH including extra version
VERSION is also used to get MAJOR, MINOR and PATCH configs. The commit
85edf0f added the remaining of the tag as an extra version and this is
being added erroneously to the PATCH variable. This commit excludes the
extra version from PATCH variable keeping only the number.

Fixes: 85edf0f (tools/version.sh: Add the remaining cut to VERSION)
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
2021-03-18 19:47:56 -07:00
Nathan Hartman
cbb8a542e5 arch/stm32f0l0g0: Fix nxstyle errors
arch/arm/include/stm32f0l0g0/chip.h:
arch/arm/include/stm32f0l0g0/irq.h:
arch/arm/include/stm32f0l0g0/stm32f0_irq.h:
arch/arm/include/stm32f0l0g0/stm32g0_irq.h:

    * Fix nxstyle errors.
2021-03-18 22:55:51 +01:00
Alan C. Assis
be572c11b6 lcd/hd4478ou: Fix MIxED case 2021-03-17 19:51:11 -07:00
hotislandn
f16a0a7380 arch:rv64:keep the stack to be 16bytes aligned.
Signed-off-by: hotislandn <hotislandn@hotmail.com>
2021-03-17 19:50:35 -07:00
Abdelatif Guettouche
27d5c9340a esp32_allocateheap.c: Don't allocate the ROM CPU regions the same way in
QEMU, the image is different.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-18 11:28:36 +09:00
Matheus Castello
85edf0f49d tools/version.sh: Add the remaining cut to VERSION
The idea is to have something like EXTRAVERSION. This is useful for
getting RC tags, development tags and for customizing the version. For
example using the tag `nuttx-10.0.0-RC0` the VERSION will be
`10.0.0-RC0`

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
2021-03-17 19:19:58 -03:00
Nathan Hartman
5b813f0c14 arch/stm32l4: Fix nxstyle errors
arch/arm/include/stm32l4/stm32l4x3xx_irq.h:
arch/arm/include/stm32l4/stm32l4xrxx_irq.h:

    * Fix nxstyle errors.
2021-03-17 21:49:30 +01:00
Xiang Xiao
335ba21657 arch/arm: Fix syscall number out of swi range in thumb mode
The immediate number is 8bits in thumb mode:
+---------------------+---------------+
|15 14 13 12 11 10 9 8|7 6 5 4 3 2 1 0|
+---------------------+---------------+
| 1  1  0  1  1  1 1 1|      imm8     |
+---------------------+---------------+

The immediate number is 24bits in arm mode:
+-----------+-------------------------------------------------------------------------+
|31 30 29 28|27 26 25 24|23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0|
+-----------+-----------+-------------------------------------------------------------+
|   cond    | 1  1  1  1|                                imm24                        |
+-----------+-----------+-------------------------------------------------------------+

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62503cdc377fcee81864e88e981d389bce2e1b45
2021-03-17 14:52:58 -03:00
Alin Jerpelea
02f6b80336 boards: mips: pic32mx_lcd1602.c: fix Mixed case identifier
Fix nxstyle compain about Mixed case identifier

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-17 08:40:08 -07:00
Alin Jerpelea
a26faec2ec boards: z80: ez80_leds.c: fix Mixed case identifier
Fix nxstyle compain about Mixed case identifier

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-17 08:40:08 -07:00
Alin Jerpelea
9d708917bb boards: z80: nxstyle fixes
Fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-17 08:40:08 -07:00
Alin Jerpelea
9dd7f90e0e boards: z16: nxstyle fixes
Fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-17 08:40:08 -07:00