Commit Graph

14957 Commits

Author SHA1 Message Date
raiden00pl
91be7781f5 arch/armv8-m/arm_secure_irq.c: fix writing to the NVIC_AIRCR register
Register key (VECTKEY) must be written, otherwise the write is ignored.

Reference:
https://developer.arm.com/documentation/100235/0004/the-cortex-m33-peripherals/system-control-block/application-interrupt-and-reset-control-register
2023-07-05 00:02:42 +08:00
SPRESENSE
a03b09c34d arch: cxd56xx: Fix bug when watchdog restart
Fix a bug that watchdog is expired in less time than the specified time
when restarting without clearing interrupt.
2023-07-04 10:37:17 -03:00
Michal Lenc
d470c3f268 samv7/sam_serial.c: reset all DMA pointers on DMA setup
This small fix ensures all DMA pointers are correctly reseted during
DMA setup (when the driver is opened). Without this there could be rare
occurrence of driver pointer to incorrect (invalidate) DMA buffer and thus
saving incorrect characters to upper layer.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-07-03 17:09:20 +03:00
Michal Lenc
49f153abb1 samv7/sam_xdmac.c: use sam_freelinklist only if circular buffer not used
Circular buffer does not use DMA linked list therefore function
sam_freelinklist() cannot be called as it would fail on assertion (csa
not defined). Peripheral that calls DMA should care of buffer invalidation
instead.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-07-03 17:09:20 +03:00
raiden00pl
76cf66165a arch/nrf91: simplyfy modem option names 2023-07-03 00:52:01 +08:00
raiden00pl
1a6d507422 arch/{nrf52|nrf53|nrf91}: rename NRFxx to nRFxx to be compatible with the manufacturer's nomenclature 2023-07-03 00:52:01 +08:00
raiden00pl
56961d9f34 arch/arm: initial support for NRF91
Port based on arch/arm/nrf53.

Modem not fully supported yet. At the moment, initialization and AT interface work.
Sockets and GNSS interface will be added later.
2023-07-02 10:10:35 -03:00
ThomasNS
f51d6b8c72 add userled driver initialization 2023-06-30 10:29:33 -03:00
ThomasNS
7864bf4870 spi4 working xmc4700-relax 2023-06-30 10:29:33 -03:00
Jorge Rodriguez Herranz
a40f07640f Fix gpio outputs from being configured as interrupts in stm32f0l0g0 gpio driver 2023-06-30 02:28:37 +08:00
Alexander Lunev
7af151aa51 arch/arm: move -mthumb option back to ARCHCPUFLAGS
CONFIG_ARM_TOOLCHAIN_GNU_EABI build got broken when -mthumb option was moved
from ARCHCPUFLAGS to ARCHOPTIMIZATION variable:

arm-none-eabi-ld: error: .../build/nuttx/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/5.4.1/libgcc.a(_fixunsdfdi.o) does not
arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/5.4.1/libgcc.a(_fixunsdfdi.o)
arm-none-eabi-ld: error: .../build/nuttx/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/5.4.1/libgcc.a(_udivmoddi4.o) does not
arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/5.4.1/libgcc.a(_udivmoddi4.o)
2023-06-29 18:18:23 +08:00
Mingjie Shen
1d6e51220d cxd56_dmac, lcd_dev: fix null pointer dereference
Check return values of following functions for null:
   - board_lcd_getdev
   - get_device

Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2023-06-28 10:16:38 +03:00
Michal Lenc
9a9c35fa45 samv7: fix compile warnings for sam_wdt.c
Incorrect types in wdinfo and wderr functions were fixed to PRIu32 and
PRIx32.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-06-27 10:03:25 -03:00
GD32-MCU
ec2a62c397 add gd32f470 support 2023-06-27 14:59:33 +08:00
Xiang Xiao
7f80b4aeba clock: Move the content of include/nuttx/time.h to include/nuttx/clock.h
and remove include/nuttx/time.h to reduce the nuttx specific header files

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-26 19:14:08 +03:00
Xiang Xiao
b5c48f3ed8 binfmt: Always include arch/elf.h in include/nuttx/elf.h
since symbols defined in arch/elf.h is also used in other case, for example:
CC:  pthread/pthread_testcancel.c machine/arm/gnu_unwind_find_exidx.c:32:8: error: unknown type name '__EIT_entry'
   32 | static __EIT_entry *__exidx_start_elf;
      |        ^~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-25 19:02:53 -03:00
Mingjie Shen
cbe4edd479 arch/arm/imxrt: Fix implicit function declaration
The function 'imxrt_config_gpio' was implicitly declared.
Fix by include the header 'imxrt_gpio.h'.

Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2023-06-25 11:29:42 -03:00
Mingjie Shen
49afeb4d63 arch/arm/stm: Fix duplicate include guard
The following macros
  __ARCH_ARM_SRC_STM32F7_HARDWARE_STM32F74XX75XX_FLASH_H
  __ARCH_ARM_SRC_STM32L4_HARDWARE_STM32L4X6XX_RCC_H
are used in other header files.

Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2023-06-25 12:23:23 +03:00
Xiang Xiao
0eeca0f375 build: Replace "$(shell $(INCDIR) $(CC) ...)" with $(INCDIR_PREFIX)
to unify the way to get include directories

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-23 00:11:25 +03:00
simbit18
f0a74eb492 Fix Kconfig style
Remove spaces from Kconfig files
2023-06-22 11:46:09 +09:00
simbit18
f930b4f6f5 Fix Kconfig style
Remove TABs from Kconfig files
Replace help => ---help---
Add comments
2023-06-20 12:54:50 -03:00
simbit18
3f4151525d Fix Kconfig style
Remove TABs from Kconfig files
Add comments
2023-06-19 20:05:57 +03:00
Richard Tucker
225d347306 stm32 tickless: stop assertion when calling up_timer_gettime before initialised
up_timer_gettime can be called before module is initialised when
CONFIG_SCHED_IRQMONITOR is enabled.

This fix aligns with stm32f7 implementation.
2023-06-17 11:05:40 -03:00
raiden00pl
2f58b55b4d arch/{nrf52|nrf53}/usbd: various fixes to improve USB stability
USBD has many limitation that make it hard to work properly:
- only one EasyDMA channel which must be shared for all EPs
- only one DMA transfer can take place at a time
- some registers are unavailable during DMA transfer
- in case of any problems, the peripheral silently blocks,
  or lose the transmitted bytes without information for the user

This commit is trying to fix these problem and makes the USBS stack more reliable.

Tested with high-speed CDCACM data transfers and that's the best I've been able to get in terms of stability.
2023-06-14 16:23:25 -03:00
SPRESENSE
b1f3d5e573 arm/cxd56xx: Fix build error in CONFIG_PM=y 2023-06-14 08:49:19 +02:00
chao an
2369e3cbc8 arm/dataabort: fix compile warning
Error: arm/arm_dataabort.c:146:10: error: format '%x' expects argument of type 'unsigned int',
                                          but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  146 |   _alert("Data abort. PC: %08x FAR: %08x FSR: %08x\n",
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  147 |          regs[REG_PC], far, fsr);

Signed-off-by: chao an <anchao@xiaomi.com>
2023-06-12 13:36:08 +08:00
Xiang Xiao
d920bfba10 mm: include malloc.h in mm/mm.h
to remove the forward declaration of mallinfo and mallinfo_task

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-11 19:37:04 +03:00
Petro Karashchenko
509a808e84 arch/arm/stm32f7: fix typo
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 12:55:29 +08:00
Petro Karashchenko
1b801a5bbc style: remove extra spaces and align parameters
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 12:55:29 +08:00
Petro Karashchenko
2a38c38b03 style: fix style issues found during code review
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 12:54:52 +08:00
Ville Juven
a636edcbe4 addrenv/kstack: Allocate the kernel stack before initializing tcb
This is preparation to use kernel stack for everything when the user
process enters the kernel. Now the user stack is in use when the user
process runs a system call, which might not be the safest option.
2023-06-09 13:53:27 +08:00
Fotis Panagiotopoulos
b89215a11f Fixed Kconfig options for the obsolete GD32F4_TICKLESS_SYSTICK & STM32WB_TICKLESS_SYSTICK options. 2023-06-07 11:10:34 -06:00
Fotis Panagiotopoulos
a57cd563d5 stm32: Removed unused Kconfig option.
The option STM32_TICKLESS_SYSTICK is not used anywhere and the
stm32 arch does not have the capability to use systick as a
tickless timer.
2023-06-07 09:40:55 -03:00
GD32-MCU
fdfc25cf56 add sdio driver for GD32F4 2023-06-07 16:43:55 +08:00
chao an
b7b3c3c550 arm/backtrace: validate PC register before process unwind
Signed-off-by: chao an <anchao@xiaomi.com>
2023-06-07 01:40:30 +08:00
Alexander Merkle
961a68b4cf arch/arm: initial FPU support for armv8r aarch32
CortexR52 can have a optional FPU.
- VFPv3 with FP16
- Option 1: 16 x double-prevision registers - -mfpu=vfpv3-d16-fp16
- Option 1: 32 x double-prevision registers - -mfpu=vfpv3-fp16
2023-06-04 16:49:34 -03:00
Alexander Merkle
2b6209147e arch/arm: cleanup arm_head.S for armv8-r aarch32 2023-06-04 16:49:34 -03:00
simbit18
7f551aa33f Fix Kconfig style
Remove TABs from Kconfig files
2023-06-01 23:45:42 +08:00
Alexander Merkle
c661e26e86 board: add CortexR52 FVP AEMv8R platform
see board/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/scripts/readme.txt

Port is highly based on fvp-v8r AARCH32 port.
2023-06-01 09:51:03 -03:00
Alexander Merkle
f6695738e1 arch/arm: add ARMv8-r(Cortex-R52) support
Basic work required for uniprocessor CortexR52 (ARMv8R AARCH32) using
GICv3 and CP15 mapped arch timer.

Tested on ARM FVP 11.20.

Port is based on ARMv8R AARCH64 and ARMv7R code. Excuse possible copy-paste leftovers.
2023-06-01 09:51:03 -03:00
raiden00pl
66c2d2ecc4 arch/nrf53/Kconfig: move GPIO configuration menu to match nrf52 2023-05-31 22:28:50 +03:00
raiden00pl
5f814b1da8 arch/{nrf52|nrf53}/Kconfig: hide SPI_MASTER options if SPI_MASTER not enabled 2023-05-31 22:28:50 +03:00
raiden00pl
81b0ae064c arch/{nrf52|nrf53}/Kconfig: hide I2C_MASTER options if I2C_MASTER not enabled 2023-05-31 22:28:50 +03:00
raiden00pl
a3b91bc183 arch/{nrf52|nrf53}/Kconfig: hide PWM options if PWM not enabled 2023-05-31 22:28:50 +03:00
raiden00pl
2d56197792 arch/{nrf52|nrf53}: validate if EasyDMA transfer is possible
Add an interface that validate if EasyDMA transfer is possible.
EasyDMA cannot access flash memory which can cause hard to detect silent bugs.
This feature is enabled if CONFIG_DEBUG_FEATURES=y and CONFIG_DEBUG_ASSERTIONS=y.
2023-06-01 00:40:17 +08:00
raiden00pl
b98acb9a44 arch/nrf53: add progmem support 2023-05-31 23:12:21 +08:00
Filipe Cavalcanti
3fea2923d7 arch/arm/src/tiva: start FPU before gpio config 2023-05-31 22:47:55 +08:00
raiden00pl
1facea635b nrf52: add MCUboot support 2023-05-31 10:44:08 +08:00
raiden00pl
20af03b31e arch/{nrf52|nrf53}/usbd: fix IN endpoint completion logic
Confirmation of the IN request must be done immediately after all data has been transferred,
otherwise sending data when more than one request has been added to the queue will
not work properly.
2023-05-27 18:52:16 +08:00
TimJTi
27fb0c76c9 SAMA5D2, improve LCD support 2023-05-27 14:03:51 +08:00