Commit Graph

41855 Commits

Author SHA1 Message Date
Michal Lenc
6e2db9bed1 boards/arm/imxrt/teensy-4.x: added board level support for FlexPWM driver
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-06-26 09:58:52 -05:00
Michal Lenc
addfe182ae arch/arm/src/imxrt: added support for FlexPWM driver
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-06-26 09:58:52 -05:00
Abdelatif Guettouche
e401aa17f6 boards/xtensa/esp32: Update the defconfigs to account for the changes in
TEXT_HEAP and the introduction of ESP32_IRAM_HEAP and ARCH_HAVE_EXTRA_HEAPS

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-26 09:52:43 -05:00
Abdelatif Guettouche
553f070357 arch/xtensa/esp32: Remove up_textheap_init function since it's not
needed anymore.

Decouple the IRAM heap from the text allocator since that heap can
still be used as a generic pool of memory.

Implement the up_extraheaps_init function to initialize all of the
additional heaps.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-26 09:52:43 -05:00
Abdelatif Guettouche
add18b9592 arch/risc-v/esp32c3: Remove the up_textheap_init function since it's not
needed anymore.

Implement the up_extraheaps_init function to initialize all separate
heaps.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-26 09:52:43 -05:00
Abdelatif Guettouche
fc9c320bd8 arch/arm/cxd56xx: Remove the up_textheap_init function since it's not
needed anymore.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-26 09:52:43 -05:00
Abdelatif Guettouche
0a4982a80e Introduce ARCH_HAVE_EXTRA_HEAPS, this config is going to be used for
chips that have multiple separate heaps.
For now it's used to enable APIs to initialize the different heaps
during the start sequence but can be extended for other purposes that
manage those heaps.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-26 09:52:43 -05:00
Gustavo Henrique Nihei
db18a12844 xtensa/esp32: Move RTC WDT deinit after initial setup
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-06-25 10:58:39 -03:00
Gustavo Henrique Nihei
8c70e4f1c1 xtensa/esp32: Fix RTC watchdog timer deinit at startup
Write protection must be disabled before performing changes to the WDT
registers. Furthermore, the routine was resetting the wrong field from
the RTC WDT register.
The RTC_CNTL_WDT_FLASHBOOT_MOD_EN field relates to Flash Boot Protection
and it is enabled by the 1st stage bootloader. The 2nd stage bootloader
takes care of disabling it.
Then the 2nd stage bootloader enables the RTC WDT for checking the
startup sequence of the application image.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-06-25 10:58:39 -03:00
Masayuki Ishikawa
e890e2e45c boards: spresense: Update rndis and rndis_smp for workaround
Summary:
- I noticed that Telnet session is sometimes not closed
  when tested with nxplayer + command stress test
- The symptom relates to the change of IOB throttling in TCP
  but we are still finding the root cause.
- This commit is just a workaround to avoid the issue by
  disabling telnet character mode.

Impact:
- spresense:rndis, spresense:rndis_smp only

Testing:
- Tested with nxplayer (HTTP audio streaming) + command stress test

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-25 00:58:27 -05:00
Abdelatif Guettouche
11ed8575cd boards/rsic-v/esp32c3: Use the common gnu-elf.ld file from binfmt/libelf
instead of keeping the same file for each board.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-24 08:04:14 -05:00
Abdelatif Guettouche
03d38166c0 boards/xtensa/esp32: Use the common gnu-elf.ld file from binfmt/libelf
instead of keeping the same file for each board.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-24 08:04:14 -05:00
Xiang Xiao
6d8d5af345 libc/dirname: Handle the consecutive '/' correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8387aca067e91724fb4656cd7af59bbd626ceffa
2021-06-24 13:21:00 +01:00
Xiang Xiao
5a6e08e281 lic/libgen: Remove g_retchar from basename/dirname
to avoid the race condtion

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If55fba8eca7b98d6a8f0fb44393cf4858b9e9ae4
2021-06-24 13:21:00 +01:00
Abdelatif Guettouche
eb403bc996 boards/riscv/esp32c3: Rename the iram_0_2 segment to irom_0_0 to avoid
confusions.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-24 07:00:51 -05:00
Xiang Xiao
9cc41f44f0 libc/sched: Implement nice API
Specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/nice.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib25be28c8dc1c9288e8c78ad756c91ec6ef325a7
2021-06-24 08:50:48 -03:00
Xiang Xiao
3d0320f891 libc/sched: Map the nice value more correctly
from https://pubs.opengroup.org/onlinepubs/007904875/functions/setpriority.html:
1.The nice value shall in the range [-{NZERO},{NZERO} -1]
2.Lower nice value shall cause more favorable scheduling

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5ad60d92abc3b69fbaa406da68cec2e40ca3fa6d
2021-06-24 08:50:48 -03:00
Huang Qi
fe992a5b6c libc: Implement fesetround & fegetround for arm
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-06-24 08:47:34 -03:00
Abdelatif Guettouche
c4b0a85841 boards/xtensa/esp32: Change the name of the flash segment to irom_0_0
instead of iram_0_2.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 12:14:34 -05:00
Abdelatif Guettouche
4c559c8324 boards/xtensa/esp32: Use REGION_ALIAS to choose from IRAM and FLASH
regions.

With this we also don't need two separate linker scripts (one for IRAM
and another one for FLASH).  Only one linker script (now called
esp32.ld) is now present.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 12:14:34 -05:00
Abdelatif Guettouche
556321b9e2 boards/esp32: Move the ROM linker script to the common directory.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 12:14:34 -05:00
Abdelatif Guettouche
40d7bbb231 boards/esp32: Remove the peripherals' linker script since it's not
needed.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 12:14:34 -05:00
Abdelatif Guettouche
a920009102 boards/xtensa/esp32: Delete OpenOCD scripts. The documentation part
explains how to use those shipped with OpenOCD.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 12:14:34 -05:00
Xiang Xiao
ae9b5fd306 Replace mktime with timegm in rtc and fs driver
since kernel component should use UTC instead local time

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf939e1ab0af8e577105f539d2553bc67b3b3d10
2021-06-23 13:43:32 -03:00
Xiang Xiao
b1cd825cac libc/time: Implement timegm function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id988ae077cf54597b2522546c4309b66416b8b0e
2021-06-23 13:43:32 -03:00
Xiang Xiao
55312052a7 sys/select.h: Should include sys/time.h instead of time.h
because struct timeval is defined in sys/time.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I767347fc3e0a4cdb3280307c7dfcac53fbddd24e
2021-06-23 17:35:53 +01:00
Juha Niskanen
2f15fd2464 drivers/ioexpander/gpio_lower_half.c: add missing debug.h
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-06-23 11:07:47 -05:00
Xiang Xiao
232d65c232 net: Fix: left shift of 1 by 31 places cannot be represented in type 'long int'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id2daa60834f7b1917b15bbad89b091b59311e988
2021-06-23 05:24:15 -07:00
Abdelatif Guettouche
60da4317b9 arch/risc-v/esp32c3: Use the same naming for the RTC heap as ESP32 for
consistency.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 08:37:01 +09:00
Abdelatif Guettouche
bdbc9ef04f arch/risc-v/esp32c3_rtc_heap.c: Correct the name of the procfs info
variable.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 08:37:01 +09:00
Abdelatif Guettouche
55a210d305 arch/xtensa/esp32_textheap.c: When allocating text prioritize alloacting
from the RTC heap.  If that's not available fall back to the IRAM heap.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 08:37:01 +09:00
Abdelatif Guettouche
1e49f2929f arch/xtensa/src/esp32: Extract the IRAM region as a separate heap.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 08:37:01 +09:00
Abdelatif Guettouche
1719e9df94 arch/xtensa/esp32: Add the RTC Slow memory as a separate heap.
This memory region can be accessed by both I & D buses, so the heap can
be used for data storage and code execution.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 08:37:01 +09:00
Abdelatif Guettouche
6582c19904 arch/xtensa/src/esp32/hardware/esp32_soc.h: Add a function to check if a
buffer comes from the RTC Slow memory.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-23 08:37:01 +09:00
Juha Niskanen
ea1144630d sched/task/task_spawn.c: initialize variables explicitly
'pid' cannot really be used uninitialized, but Clang analyzer does not
see it.  Add initializer to silence it and also make debugging slightly
easier.

Explicitly set pid's address to NULL to fix this complaint:

  "Address of stack memory associated with local variable 'pid' is still
   referred to by the global variable 'g_spawn_parms' upon returning to
   the caller."

No functional change.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-06-22 03:44:02 -05:00
Abdelatif Guettouche
a4289c4f84 xtensa/esp32_aes.c: Use the same output when testing the AES driver.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-21 06:23:55 -05:00
Masayuki Ishikawa
841fb02ac0 arch: esp32: Replace getcoreid with the latest esp-idf's
Summary:
- I noticed that the getcoreid macro in the latest esp-idf
  is much simpler than the current NuttX's.
- This commit replaces the macro with the latest esp-idf's

Impact:
- SMP only

Testing:
- Tested with esp32-devkitc:wapi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-21 06:21:39 -05:00
Alexander Lunev
f7c8875fd7 sdio,stm32h7: fixed an issue with not starting IDMA data transfer in case of IO_RW_EXTENDED command (CMD53);
corrected setting SDMMC_DCTRL.DTMODE field for block data transfers ending on block count
and for block data transfers ending with STOP_TRANSMISSION command;
stm32_sdio: added more debug messages
2021-06-21 02:47:46 -05:00
Liu Han
2dd081ed7d risc-v/esp32c3: Support ESP32-C3 SHA accelerator 2021-06-21 02:41:53 -05:00
Alan C. Assis
d7d3f87f55 stm32f103-minimum/sensors: Remove DS28E17 that is not used and add SENSORTEST 2021-06-20 22:10:31 -05:00
chenwen
8648970994 esp32&esp32c3/wifi: Fix the issues of Wi-Fi configuration being overwritten 2021-06-19 08:00:35 -03:00
chenwen
ee3350ed1d risc-v/esp32c3: Disable Wi-Fi reconnect by default 2021-06-19 08:00:35 -03:00
chenwen
c3792f0aae xtensa/esp32: Support ESP32 RTC driver 2021-06-18 22:01:34 -05:00
Nathan Hartman
4258190477 drivers/motor/foq: Remove forward declaration for nonexistent type
include/nuttx/motor/foc/foc.h:

    * Remove forward declaration for struct foc_typespec_s, which
      does not exist anywhere in the NuttX tree.
2021-06-18 14:11:05 -03:00
Masanari Iida
91d53bc7fe boards/arm/stm32l4/b-l475e-iot01a/src/stm32_timer.c: Fix missing closing bracket
Add missing ret and closing bracket for 2 syslog messages.
It was found by cppcheck.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
2021-06-18 14:10:40 -03:00
Xiang Xiao
ab974edc84 sched: Identify the stack need to free by TCB_FLAG_FREE_STACK
instead calling kmm_heapmember or umm_heapmember because:
1.The stack supplied by caller may allocate from heap too
2.It's hard to implement these two function in ASan case

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I196377822b7c4643ab4f29b7c1dc41dcd7c4dab1
2021-06-18 05:44:41 -07:00
Abdelatif Guettouche
af5e0c620f Rename MODULE_TEXT to TEXT_HEAP as the latter is more generic.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-18 07:14:17 -05:00
Abdelatif Guettouche
79e9347551 arch/risc-v/esp32c3/esp32c3_modtext.c: Prioritise allocation from the
RTC heap when available.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-18 00:53:42 -05:00
Abdelatif Guettouche
f54804bafc arch/risc-v/esp32c3: Create a separate heap for the RTC memory.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-18 00:53:42 -05:00
Abdelatif Guettouche
965a39a76d boards/risc-v/esp32c3-devkit: Include "config.h" in esp32c3_boot.c
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-18 00:53:42 -05:00