Commit Graph

38554 Commits

Author SHA1 Message Date
saramonteiro
8c4553693b Documentation for the Timer Driver 2020-10-15 19:09:26 -03:00
Philippe Coval
35fa8bdfca freedom-k64f: Add I2C initial support
It was checked using i2c tool and onboard sensor:

    nsh> i2c bus
    Bus 0: YES

    nsh> i2c dev 1 0x7F
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- 1d -- --

    nsh> i2c get -a 1d -r 0d
    #| READ Bus: 0 Addr: 1d Subaddr: 0d Value: c7

Sensor driver to come next.

Feature should be enabled using:

    CONFIG_SYSTEM_I2CTOOL=y
    CONFIG_KINETIS_I2C0=y

Change-Id: I4f3ff16fae994250f62537cd0c3021465db1189c
Forwarded: https://github.com/apache/incubator-nuttx/pull/1982/
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-10-14 15:02:14 -03:00
Nathan Hartman
90476c9895 tiva/cc13xx: Fix nxstyle errors
arch/arm/src/tiva/cc13xx/cc13x2_aux_sysif.c:

    * Fix nxstyle errors.

arch/arm/src/tiva/cc13xx/cc13x2_aux_sysif.h:

    * Fix nxstyle errors.

arch/arm/src/tiva/cc13xx/cc13xx_enablepwr.c:

    * Fix nxstyle errors.
2020-10-14 17:03:23 +02:00
Nathan Hartman
66c8d77dd9 tiva/cc13xx: Fix syntax error and nxstyle error
arch/arm/src/tiva/cc13xx/cc13xx_gpioirq.c:

    * Fix syntax error: stray closing parenthesis in function
      cc13xx_gpio_interrupt().
    * Fix nxstyle error.
2020-10-14 17:03:23 +02:00
David Sidrane
a907e2ad63 kinetis:flexcan fixed compile error clock_systimespec->clock_systime_timespec 2020-10-14 21:14:55 +08:00
Philippe Coval
8f9cd8832d freedom-k64f: Add renew DHCP client for netnsh
Also enable ifup, use USB console and create raw image.

Windows is not mandatory, I use linux as host
so defconfig can rely on defaults.

Change-Id: Ic0e5f79f28facb6eff1d9831bcb31e1ff329a5aa
Forwarded: https://github.com/apache/incubator-nuttx/pulls/rzr
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-10-14 07:31:09 +02:00
Nathan Hartman
9e70e3580f tiva: Fix nxstyle warnings
arch/arm/src/tiva/cc13xx/cc13xx_prcm.c:

    * Fix nxstyle warnings. No functional changes.
2020-10-13 16:24:20 +01:00
Philippe Coval
fff15f1b93 freedom-k64f: Support raw binary firmware format
Then it can easly deployed using USB masstorage
(same as on embed)

Forwarded: https://github.com/apache/incubator-nuttx/pulls/rzr
Change-Id: I62381d3f571fbc6e4716fa01d6974954f9193075
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-10-13 15:30:50 +08:00
YAMAMOTO Takashi
f9475df13d include/nuttx/lib/math.h: Add signbit 2020-10-13 08:09:30 +02:00
Nathan Hartman
78049d4081 tiva: Fix nxstyle warnings
arch/arm/src/tiva/cc13xx/cc13xx_prcm.h:

    * Fix nxstyle warnings. No functional changes.
2020-10-13 10:06:22 +08:00
Xiang Xiao
c67da1d2b5 libxx: Switch the package downloading from 11.0.0.rc1 to 11.0.0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-12 20:33:55 +01:00
Philippe Coval
b76b3b6f3d freedom-k64f: Include kinetis.h for resources macros
Change-Id: I37560525678b820668abcb6e4aae93b978797066
Forwarded: https://github.com/apache/incubator-nuttx/pulls/rzr
Signed-off-by: Philippe Coval rzr@users.sf.net
2020-10-13 02:34:51 +08:00
Philippe Coval
cabaa10428 freedom-k64f: Init PWM only if enabled
Aligned to k28f.

Change-Id: I1b384ee69dd1b87268545ef6343acc63f29b2ae6
Forwarded: https://github.com/apache/incubator-nuttx/pull/1969
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-10-13 01:52:40 +08:00
Johannes Schock
dd7b5cb228 ARM stack fix: Same boundary calculation in do_stackcheck and stack_color.
Use additional space from 8 byte aligning for stack in up_create_stack().
Moved arm_stack_color to arm_checkstack.c.
2020-10-12 10:52:33 -07:00
Philippe Coval
a377c742a6 freedom-k64f: Lint code for checkpatch
Change-Id: Ie44b199af21e7a483c5b07539db9537e8bcb9b51
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-10-13 00:39:44 +08:00
Philippe Coval
0081b75d20 freedom-k64f: Declare missing NUM_BUTTONS
Change-Id: I99429d0e6d8bccc18358465eb192e739bf82881a
Forwarded: https://github.com/apache/incubator-nuttx/pull/1968
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-10-13 00:39:44 +08:00
Philippe Coval
718d928342 freedom-k64f: Close statement with semicolon in board_buttons
More changes to come

Change-Id: Ie60fd97083c4bc1b5b631d2e812b93bff304760a
Forwarded: https://github.com/apache/incubator-nuttx/pull/1967
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-10-13 00:18:40 +08:00
Masayuki Ishikawa
7be1739b41 boards: spresense: Add graphics demos to wifi and wifi_smp
Summary:
- This commit enables LCD for spresense and adds graphics demos

Impact:
- Affects wifi and wifi_smp configurations

Testing:
- Tested with nx, nxdemo, nxhello and nxlines

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-12 09:37:29 +02:00
Masayuki Ishikawa
b592228cea boards: spresense: Add CONFIG_ARCH_INTERRUPTSTACK=2048 to wifi and wifi_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-12 09:37:29 +02:00
Nathan Hartman
55b9f046c9 tiva: Fix nxstyle warnings
arch/arm/src/tiva/common/lm4xx_tm3c_sysctrl.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/lmxx_tm4c_enableclks.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/lmxx_tm4c_enablepwr.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/lmxx_tm4c_gpioirq.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/lmxx_tm4c_start.c:

    * Fix nxstyle warnings. No functional changes.
2020-10-11 20:36:47 +01:00
Yoshinori Sugino
5a1788822d libs/libc/signal/sig_wait.c: Fix a typo 2020-10-11 13:00:25 +08:00
Masayuki Ishikawa
35c8da34a8 sched: task: Fix nxtask_exit() for SMP
Summary:
- During Wi-Fi audio streaming test, I found a deadlock in nxtask_exit()
- Actually, nxtask_exit() was called and tried to enter critical section
- In enter_critical_section(), there is a deadlock avoidance logic
- However, if switched to a new rtcb with irqcount=0, the logic did not work
- Because the 2nd critical section was treated as if it were the 1st one
- Actually, it tried to run the deadlock avoidance logic
- But nxtask_exit() was called with critical section (i.e. IRQ already disabled)
- So the logic did not work as expected because up_irq_restore() did not enable the IRQ.
- This commit fixes this issue by incrementing irqcount before calling nxtask_terminate()
- Also it adjusts g_cpu_irqlock and g_cpu_lockset

Impact:
- Affects SMP only

Testing:
- Tested with spresense:wifi_smp (smp, ostest, nxplayer, telnetd)
- Tested with sabre-6quad:smp with QEMU (smp, ostest)
- Tested with maix-bit:smp with QEMU (smp, ostest)
- Tested with esp32-core:smp with QEMU (smp, ostest)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-10 13:01:01 -06:00
raiden00pl
650997e1f6 Fix nxstyle warnings 2020-10-10 12:24:28 -06:00
raiden00pl
17255414b5 stm32: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
raiden00pl
29541e59e0 stm32h7: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
raiden00pl
33901969fe Fix nxstyle warnings 2020-10-10 12:24:28 -06:00
raiden00pl
24e17910b2 libdsp: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
raiden00pl
25c58f2a32 stm32f0l0g0: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
raiden00pl
1621305e79 drivers: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
raiden00pl
478de48bc7 nrf52: Changed headers for apache 2.0 license 2020-10-10 12:24:28 -06:00
Abdelatif Guettouche
286d947caf arch/xtensa: Fix some alingments and typos in assembly code.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-11 00:53:38 +08:00
Yoshinori Sugino
444a05131c arch/risc-v/include: Fix nxstyle warnings
No functional changes
2020-10-10 14:24:52 +01:00
Yoshinori Sugino
aae4e15d9b arch/risc-v/src: Fix nxstyle warnings
No functional changes
2020-10-10 11:44:26 +01:00
Abdelatif Guettouche
20f701f2ec arch/xtensa/src/common/xtensa.h: Include sys/types.h to have a size_t
definition.  Otherwise the build would fail ifSTACK_COLORATION is
enabled.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-10 00:01:17 +08:00
Nathan Hartman
18edab3ad2 tiva: Fix nxstyle warnings
arch/arm/include/tiva/cc13x0_irq.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/cc13x2_cc26x2_irq.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/chip.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/irq.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/lm3s_irq.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/lm4f_irq.h:

    * Fix nxstyle warnings. No functional changes.

arch/arm/include/tiva/tm4c_irq.h:

    * Fix nxstyle warnings. No functional changes.
2020-10-09 15:35:38 +01:00
Xiang Xiao
c59fcd3a53 sched: nxtask_start should call entry point directly for kernel thread
since nxtask_startup will initialize c++ global variables which shouldn't
be done inside the kernel thread

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-08 09:14:33 +02:00
Masayuki Ishikawa
cb6dd70082 boards: cxd56xx: Fix a deadlock in cxd56_gs2200m.c
Summary:
- During streaming test, I noticed a dealock when controlling IRQ
- Actually, it will send an IPI when the cpu index is not 0
- However, up_cpu_pause() also sends IPI with critical section
- So the IRQ control must follow the same rule

Impact:
- Affects SMP only

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-08 09:02:17 +02:00
Masayuki Ishikawa
bebc2d2405 arch: cxd56xx: Fix IRQ request handling in cxd56_cpupause.c
Summary:
- During Wi-Fi audio streaming test, I noticed data corruption in tcb
- Finally, I found an issue in IRQ request handing with IPI
- This commit fixes this issue

Impact:
- Affects SMP only

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-08 09:02:17 +02:00
YAMAMOTO Takashi
c7865ddca3 sim: Fix make export
Namely, don't forget to generate nuttx-names.dat.
2020-10-08 14:03:20 +08:00
Abdelatif Guettouche
605a49e9af arch/xtensa/src/esp/esp32/esp32_gpio.c: Fix the function's mask test
condition and the functions' values.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-08 09:28:53 +09:00
Abdelatif Guettouche
0fdf9c7368 arch/xtensa/src/esp32/esp32_psram.c: Adapt configgpio to the latest
change.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-08 09:28:53 +09:00
Masayuki Ishikawa
6232e7f84e arch: esp32: Fix crash on startup
Summary:
- This commit fixes crash on startup introduced by commit 232aa62f03

Impact:
- Affects all use cases for esp32

Testing:
- Tested with esp32-core:smp with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-07 18:43:13 -03:00
Sara Souza
0faf861256 xtensa/esp32: Added Timer Support 2020-10-07 14:12:22 -03:00
Alan C. Assis
232aa62f03 Add support to PSRAM using SPIRAM interface 2020-10-07 16:55:34 +01:00
Abdelatif Guettouche
d1225f3110 arch/xtensa/src/esp32: Use the same function numbering as the TRM.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:52:04 -03:00
Abdelatif Guettouche
5593683552 arch/xtensa/src/esp32/esp32_gpio.c: When configuring a pin pad, set the
function first, if no function was assigned, fall back to the GPIO
function.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:52:04 -03:00
Abdelatif Guettouche
564237a602 arch/xtensa/src/esp32/esp32_gpio: Function "SPECIAL" doesn't exist. All
pads go through the same GPIO matrix to select one of the 6 possible functions.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:52:04 -03:00
Abdelatif Guettouche
efb2fd5e4b arch/xtensa/src/esp32/esp32_gpio.c: GPIO20 is not available.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:52:04 -03:00
Abdelatif Guettouche
caa945cb24 arch/xtensa/src/esp32: Add a way to retrieve reset cause.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:51:47 -03:00
Abdelatif Guettouche
c20c8c6dd5 arch/xtensa/esp32: Implement system reset.
Both CPUs are soft-reset with a call to board_reset.  This is actually a
Core Reset, so both cores and all registers are reset.  The only
exception is RTC.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-07 11:51:47 -03:00