Commit Graph

20541 Commits

Author SHA1 Message Date
Masayuki Ishikawa
fb6bef2c2d arch: imx6: Add support for AR8031 gigabit ethernet phy
Summary:
- This commit adds AR8031 gigabit ethernet phy for the
  sabre-6quad board.

Impact:
- None

Testing:
- Tested with sabre-6quad:netnsh_ar8031 (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-04-25 11:45:19 +08:00
Masayuki Ishikawa
dc914f43ea arch: imx6: Fix CONFIG_IMX_ENET_ENHANCEDBD related code
Summary:
- This commit applies the changes from imxrt
- See 3a4542f3c4

Impact:
- imx6 ethernet with d-cache

Testing:
- Tested with imx6_with_ar8031 (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-04-25 11:45:19 +08:00
Petro Karashchenko
3e3670af77 arch/xtensa/esp32: fix wrong enabled BLE interrupts
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-24 09:35:58 -07:00
Petro Karashchenko
0c28094059 arch/xtensa/esp32: fix crash in BLE startup
ROM symbols provided by linker are placeholders for addresses
and not a pure addresses, so we need to read data pointed by
ROM symbols instead of using those as pure addresses.

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-24 09:35:58 -07:00
Petro Karashchenko
d50ec662be arch/risc-v/esp32c3: Change the linker generated symbols from uint32_t to uint8_t *
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-24 09:35:58 -07:00
chao an
b8780fe906 arch/arm: relax compiler check for workaround with "GCC 12.2"
1. relax compiler check for workaround with "GCC 12.2"
2. export GCCVER to environment

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-24 19:00:52 +03:00
zhangyuan21
d7de93f906 arch/arm: Resolving warnings for assembly instructions
arm/arm_saveusercontext.S:61: Warning: duplicated register (r14) in register list

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-24 23:49:33 +08:00
Xiang Xiao
51dc67ad5f fs: Add g_ prefix for all global file_operations instances
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-24 16:13:29 +02:00
Huang Qi
3d3a86ae53 arch/sim: Move up_textheap_xxx to common place
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-24 19:37:15 +08:00
Huang Qi
97f8817d6b arch/sim: Implement host_freeheap for windows
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-24 19:37:15 +08:00
Huang Qi
70395f49b2 arch/sim: Implement text heap
If CONFIG_MM_CUSTOMIZE_MANAGER enabled on sim, malloc/mmap is bypassed to glibc, so the memory allocated without execution permisson.

For this case, CONFIG_ARCH_USE_TEXT_HEAP can be used.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-24 10:29:20 +08:00
YAMAMOTO Takashi
0066bf80d2 esp32: enable LIBC_ARCH_ATOMIC
fixes a build issue in https://github.com/apache/nuttx-apps/pull/1723
2023-04-24 10:12:57 +08:00
hujun5
6063c0516e cpu: in SMP pthread_cancel occasionally deadlock
In smp when cpu0 calls up_cpu_resume to release the cpu1 lock, another locked cpu1 did not execute immediately,
and soon cpu0 called up_cpu_resume again, now cpu1 unable to respond to the interrupt at this time, resulting in a deadlock.
Our solution is to restore cpu1 execution from asynchronous to synchronous to ensure that cpu1 is restored.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-04-23 23:33:09 +08:00
zhanghongyu
50488ac8f3 sim: multi netdevice forward issue when ll_guardsize not 14
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-23 10:37:50 +03:00
zhanghongyu
37644c8818 Revert "sim: multi netdevice forward issue when ll_guardsize not 14"
This reverts commit a69c6c1dac.
2023-04-23 10:37:50 +03:00
raiden00pl
d416ead27c arch/nrf52: reimplement I-Cache control operations in nrf52_start.c 2023-04-22 01:42:01 +08:00
raiden00pl
c70c178a7d arch/nrf52: nvmc and flash should depends on ALLOW_BSD_COMPONENTS=y 2023-04-22 01:42:01 +08:00
zhanghongyu
a69c6c1dac sim: multi netdevice forward issue when ll_guardsize not 14
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-04-22 01:41:01 +08:00
Zhe Weng
f21742899f net/netdev: Use upper half of netdev to simplify sim driver
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:41:01 +08:00
Stuart Ianna
4cae98674d litex: Support for kernel build with vexriscv-smp. 2023-04-22 01:40:32 +08:00
qinwei1
c4f3f8801f arm64: Support for FPU profiling with procfs
Summary:

   To reduce the count of FPU context switching will result at a
performance improve with system. it need to balance between
the using of FPU and counts of FPU trap
   the PR submit a base method to see performance counts for
the FPU with NuttX procfs
   Please read README.txt at chapter of FPU Support and Performance
for more information

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-04-22 01:38:21 +08:00
raiden00pl
bd9bfa9302 arch/nrf53: add RPMSG HCI controller support 2023-04-22 01:37:24 +08:00
Fotis Panagiotopoulos
873abcb9ab stm32_eth: Added error handling for abnormal interrupts. 2023-04-22 01:30:48 +08:00
Lucas Saavedra Vaz
bdfe31e850 boards/xtensa/esp32: Add ESP32-PICO-KIT support 2023-04-22 01:23:13 +08:00
zhangyuan21
dfcba925e7 arch/arm64: add cache enable and disable function
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-22 01:22:04 +08:00
zhangyuan21
652fc7648e arch/arm64: Fixed error in getting cache size when there was no mmu
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-22 01:22:04 +08:00
raiden00pl
cc7826df4d arch/nrf52: add QSPI support 2023-04-22 01:12:27 +08:00
zhangyuan21
41f83a0271 arch/arm64: change up_saveusercontext to assembly code
minidump will backtrace failure when use C code to save user context,
because the stack push operation in C code can disrupt the stack information.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-22 01:11:00 +08:00
zhangyuan21
1e726a914a arch/arm: change up_saveusercontext to assembly code
minidump will backtrace failure when use C code to save user context,
because the stack push operation in C code can disrupt the stack information.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-22 01:11:00 +08:00
hujun5
ab0b3336c4 arch/arm64:Suppot tickless mode
1 Similar to Linux and zephyr, all implementations are in arm64_arch_timer.c

2 Arm64 tickless is turned off by default. If it needs to be turned on, you need to configure the switch CONFIG_SCHED_TICKLESS ON

3 The implementation strategy for tick/tickless is to use the timer inside the CPU and implement the timer driver based on the ARCH_TIMER framework.

4 We implemented tick_* Callback functions to adapt to the driven interface to avoid time format conversion overhead

5 In arm64_tick_cancel func,The remaining time that is not used, so this value can be ignored without reading the corresponding register to obtain the remaining cycles

6 Currently, tick/tickless can takes effect in SMP and non SMP mode, ostest can pass.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-04-22 01:08:04 +08:00
David Sidrane
ac6ad45045 stm32l5:pinmap Add suffix to all pins and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings and
   all pins should have had suffixes to allow any pins attributes to
   be set. This is board dependent.

   This change adds CONFIG_STM32L5_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps with suffixes.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, CONFIG_STM32L5_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set CONFIG_STM32L5_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
7e48b58993 stm32wb:pinmap Add suffix to all pins and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings and
   all pins should have had suffixes to allow any pins attributes to
   be set. This is board dependent.

   This change adds CONFIG_STM32WB_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps with suffixes.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, CONFIG_STM32WB_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set CONFIG_STM32WB_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
a8093281c4 stm32f0l0g0:stm32f0{3|5|7|9}x_pinmap & stm32g0_pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings.
   This is board dependent.

   This change adds CONFIG_STM32F0G0L0_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps without speeds.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, CONFIG_STM32F0G0L0_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set CONFIG_STM32F0G0L0_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
77cf6ce273 stm32l4:stm32l4x{3|4|5|6|r}xx_pinmap pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings.
   This is board dependent.

   This change adds CONFIG_STM32L4_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps without speeds.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, CONFIG_STM32L4_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set CONFIG_STM32L4_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
1ece250b18 stm32:stm32f10{0|2|3{c|r|v|z}|5{r|v}|7v}_pinmap refactor
replace all GPIO_MODE_xxMHz with GPIO_MODE_2MHz provide GPIO_ADJUST_MODE
    and add legacy pinmap

    For the stm32F1 pinmaps should not have contained GPIO_MODE_50MHz settings
    on all pins. Speed is board dependent.

    This change adds CONFIG_STM32_USE_LEGACY_PINMAP to allow for
    lazy migration to using pinmaps that can have the GPIO_MODE_xxMHz set.

    The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
    The tools will take a board.h, and use all the defconfigs with the legacy
    pinmap and output the required changes that one needs to make to a board.h
    file.

    Eventually, CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated and the legacy
    pinmaps removed from NuttX.

    Any new boards added should set CONFIG_STM32_USE_LEGACY_PINMAP=n and
    fully define the pins in board.hf1
2023-04-19 09:58:11 +02:00
David Sidrane
ee6fb7880b stm32:stm32l15xxx pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings.
   This is board dependent.

   This change adds CONFIG_STM32_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps without speeds.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, STM32_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set STM32_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
5d025d5d50 stm32:stm32g4xx{c|k|r|m|v|q} pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings.
   This is board dependent.

   This change adds CONFIG_STM32_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps without speeds.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, STM32_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set STM32_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
98cd82f905 stm32:stm32f3{0|3|7}xxx pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings.
   This is board dependent.

   This change adds CONFIG_STM32_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps without speeds.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, STM32_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set STM32_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
35258a26c0 stm32:stm32f20xxx pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings.
   This is board dependent.

   This change adds CONFIG_STM32_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps without speeds.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, STM32_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set STM32_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
39c5931462 stm32:f4/f412 pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings.
   This is board dependent.

   This change adds CONFIG_STM32_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps without speeds.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, STM32_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set STM32_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
1ce84fff01 stm32f7:pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings.
   This is board dependent.

   This change adds CONFIG_STM32F7_USE_LEGACY_PINMAP to allow for
   lazy migration to using pinmaps without speeds.

   The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
   The tools will take a board.h file and a legacy pinmap and outut the required
   changes that one needs to make to a board.h file.

   Eventually, STM32F7_USE_LEGACY_PINMAP will be deprecated and the legacy
   pinmaps removed from NuttX.

   Any new boards added should set STM32F7_USE_LEGACY_PINMAP=n and
   fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
14a0e08386 stm32h7:pinmap Remove GPIO_SPEED_xxx and add legacy pinmap
Pinmaps should not have contained GPIO_SPEED_xxx settings.
  This is board dependent.

  This change adds CONFIG_STM32H7_USE_LEGACY_PINMAP to allow for
  lazy migration to using pinmaps without speeds.

  The work required to do this can be aided by running tools/stm32_pinmap_tool.py.
  The tools will take a board.h file and a legacy pinmap and outut the required
  changes that one needs to make to a board.h file.

  Eventually, STM32H7_USE_LEGACY_PINMAP will be deprecated and the legacy
  pinmaps removed from NuttX.

  Any new boards added should set STM32H7_USE_LEGACY_PINMAP=n and
  fully define the pins in board.h
2023-04-19 09:58:11 +02:00
David Sidrane
c5f7620c42 stm32u5:stm32u585xx_pinmap Fix typo 2023-04-19 09:58:11 +02:00
David Sidrane
7e171da63f stm32wl5:pinmap Fix typo 2023-04-19 09:58:11 +02:00
zhangyuan21
c00498c164 arch/arm: update running task when context switch occurred
The text describes an issue related to the running task in code.
The running task is only used when calling the _assert function
to indicate the task that was running before an exception occurred.
However, the current code only updates the running task during
irq_dispatch, which is suitable for ARM-M architecture but not
for ARM-A or ARM-R architecture, because their context switches
are not done through irq handler. Therefore, if the following
process is followed, the value of the running task will be incorrect:

1. task1 is running, this_task()=task1
2. do_irq is executed, setting running task()=task1
3. task1 switches to task2
4. task2 is running and generates a data abort
5. In the data abort, the _assert function is called,
   and the running task obtained is still task1, but
   the actual task that generated the exception is task2.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-19 10:14:05 +09:00
chao an
899be58905 sim/win/hostfs: set O_BINARY for windows hostfs as default
Since the initial default setting in MSVC is text mode ( O_TEXT ):

https://learn.microsoft.com/en-us/cpp/c-runtime-library/text-and-binary-mode-file-i-o?view=msvc-170

In order to unify the translation behavior with unix,
1. set O_BINARY for hostfs as default
2. enable default text mode if the application specifies flag O_TEXT

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-19 02:55:15 +08:00
zhangyuan21
f5f0af4f9c arch/arm64: fixed backtrace skip calc error
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-19 02:53:02 +08:00
zhangyuan21
2c599bb9e6 arch/arm64: call PANIC in arm64_fatal_error
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-19 02:53:02 +08:00
zhangyuan21
e4ae2b48b8 arch/arm64: Obtaining the correct fp pointer
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-19 02:53:02 +08:00
chao an
49c863f238 sim/win/hostuart: only read key event from console
This commit will detect input events and filter out events(mouse/window/etc) other than key

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-19 02:52:16 +08:00