Commit Graph

15220 Commits

Author SHA1 Message Date
jturnsek
081b04f05e iMXRT MCUboot support 2023-03-02 22:40:44 +08:00
Jari Nippula
ab5d6d759a arch/arm/src/stm32f7/stm32_i2c.c: Driver cleanup
Remove unnecessary heap allocation by relocating ops inside priv data
2023-03-02 21:46:44 +08:00
Michal Lenc
93097be705 samv7: add support for PWM fault protection
This commit adds configurable fault protection to SAMv7 PWM driver.
The fault input can be used from peripherals as ADC or GPIO inputs.
Inputs from GPIO have configurable polarity (high or low). The PWM output
is automatically set to zero if fault input is active and restored
if fault input is not actived.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-03-02 11:08:25 +08:00
huxiandong
266455f01c mtd: Extend isbad and markbad func for mtd_dev_s
Signed-off-by: huxiandong <huxiandong@xiaomi.com>
2023-03-01 10:06:56 -03:00
SPRESENSE
b576a26d51 arch: cxd56xx: Fix emmc pin control on initialization error
Fix emmc pin control on initialization error.
2023-03-01 12:29:23 +08:00
SPRESENSE
57ca5c0401 arch: cxd56xx: Disable SubCore to use DMA
Disable SubCore to use SPI transfer with DMA because it may be used
by MainCore.
2023-03-01 12:29:23 +08:00
SPRESENSE
134424da18 arch: cxd56xx: Fix a warning in cxd56_serial.c
Fix a warning by -Wunused-function when CONFIG_UART2_SERIAL_CONSOLE=y.
2023-03-01 12:29:23 +08:00
SPRESENSE
700610e625 arch: cxd56xx: Fix eMMC uninitialize function
- Fix prototype function with prefix of cxd56.
- Add logic to unregister blockdriver.
- Minor fix nxstyle.
2023-03-01 12:29:23 +08:00
SPRESENSE
d643fb8511 arch: cxd56xx: Fix gnss poll when an event has already occurred
Fix an issue that poll with timeout=0 cannot detect events that have
already occurred.
2023-03-01 12:26:06 +08:00
SPRESENSE
1877be8ce9 arch: cxd56xx: Fix a freezing issue caused by power control
- Add retry timeout to prevent inifinite loop
- Change the register operation of power control
- Add exclusive control by semaphore into some functions
- Add short delay until power control is reflected
2023-03-01 12:17:29 +08:00
Huang Qi
8a389a06e1 Don't download tarball if a local git repo found
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-27 23:55:23 +08:00
Xiang Xiao
2c5f653bfd Remove the tail spaces from all files except Documentation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
Michal Lenc
49ce1c5df7 samv7: add support for ADC conversion triggering with PWM
This commit enhances ADC and PWM drivers with option to trigger ADC
conversion with events generated by PWM comparison units.

The generation of PWM events is handled by comparison units set up from
Kconfig option SAMV7_PWMx_TRIGn. ADC triggering from PWM can be selected
by AFECn_PWMTRIG option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-26 10:47:12 +08:00
lilei19
38f64f559d change strcpy to strlcpy
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-24 12:15:40 +08:00
Xiang Xiao
8b4ecac6c2 libc: Move math library from libs/libc/math to libs/libm/libm
to prepare the support of other implementation e.g.:
https://github.com/JuliaMath/openlibm
https://gitlab.com/gtd-gmbh/libmcs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-23 10:40:07 +02:00
chao an
0e873b51c6 arm/backtrace/unwind: skip unaligned instruction
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-23 14:06:52 +08:00
Michal Lenc
db6919648b samv7: add support for complementary PWM output
SAMv7 PWM driver supports complementary PWM output if both pins (H and L)
are defined and configured. This commit adds a configuration option to
configure the complementary L pin.

The pin definition has to be provided by board level support.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-22 02:22:10 +08:00
Karel Kočí
60bd4ac13d samv7: fix printf warnings in QSPI 2023-02-22 01:42:49 +08:00
Masayuki Ishikawa
69e6e17407 arch: imxrt: Enable IMXRT_ENET_ENHANCEDBD if !ARMV7M_DCACHE_WRITETHROUGH
Summary:
- I noticed that there are two kinds of descriptors for imxrt_enet.c
- The first one is the legacy descriptor and its size is 8bytes.
- The second one is the enhanced descriptor and its size is 32bytes.
- In both cases, we can not use a descriptor chain like stm32.
- Considering cache line alignment, the second one is perfect because
  one descriptor fits the Cortex-M7 cache line which would fix networking
  stability issues in d-cache write-back mode.

Impact:
- imxrt ethernet in d-cache write-back mode

Testing:
- Tested with ixmrt1060-evk:netnsh_dcache_wb (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-02-22 01:27:54 +08:00
Masayuki Ishikawa
3a4542f3c4 arch: imxrt: Fix CONFIG_IMXRT_ENET_ENHANCEDBD
Summary:
- I noticed that CONFIG_IMXRT_ENET_ENHANCEDBD is not correctly
  used though it is defined in Kconfig.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with imxrt1060-evk:netnsh_dcache_wb (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-02-22 01:27:54 +08:00
chao an
60a0c2ed87 tools/ci: skip -Warray-bounds check due to bug of GCC-12.2
Wrong warning array subscript [0] is outside array bounds:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-21 09:28:57 +08:00
Xiang Xiao
7d3a9b1cbc Revert "STM32 Nucleo: warning: #warning "Default Flash Configuration Used""
This reverts commit 62c15c03d3.

Fix warning: the choice symbol STM32_FLASH_CONFIG_G (defined at arch/arm/src/stm32/Kconfig:1275) is selected by the following symbols, but select/imply has no effect on choice symbols
 - ARCH_CHIP_STM32F412ZG (defined at arch/arm/src/stm32/Kconfig:1014)
2023-02-20 00:02:36 +02:00
Michal Lenc
333707e101 pwm: add PWM overwrite under CONFIG_PWM_OVERWRITE option
Generic drivers shoud not use architecture related config options like
CONFIG_SAMV7_PWM. This commit adds PWM pin overwrite under generic
configuration option CONFIG_PWM_OVERWRITE.

Now the overwrite can be used on other architectures as well or can be
completely disabled for SAMv7.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-19 00:16:41 +08:00
dirksavage88
02fc698e75 Add UART4 & UART5 to high density stm32f103 chips
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
2023-02-18 13:32:52 +08:00
Fotis Panagiotopoulos
9bfa9a0b49 stm32_eth: Enabled store-end-forward. 2023-02-18 11:08:46 +08:00
Fotis Panagiotopoulos
87a23f8e38 stm32_eth: Fixed alignment of Ethernet descriptors & buffers. 2023-02-18 11:06:59 +08:00
Michal Lenc
d52e875a99 samv7: fix build error in sam_mcan.c file
Commit d07792a caused a build error in sam_mcan.c file. This commit fixes
the build. The file now succesfully compiles and CAN works.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-17 14:58:37 -03:00
Jackson R
62c15c03d3 STM32 Nucleo: warning: #warning "Default Flash Configuration Used"
https://cwiki.apache.org/confluence/display/NUTTX/Configuration+Variables
Fixed the Warning F412ZG has 1028 KB Flash.
2023-02-17 23:22:32 +08:00
Fotis Panagiotopoulos
85ceb7920e Typo fixes. 2023-02-17 11:17:11 -03:00
David Sidrane
c6d3e7e087 stm32:dma v2 Remove CPU lock on HW fail 2023-02-17 14:23:27 +08:00
David Sidrane
d2ea49109a stm32h7:dma Remove CPU lock on HW fail 2023-02-17 14:23:27 +08:00
David Sidrane
8064f60a9e stm32f7:dma Remove CPU lock on HW fail 2023-02-17 14:23:27 +08:00
Fotis Panagiotopoulos
f78bdd3978 stm32_eth: Busy bit is cleared before accessing the MACMIIAR register. 2023-02-17 09:56:35 +08:00
Julian Oes
4f30c298bf stm32h7: reduce the extended filter size to 64
When I checked how this register was set I discovered that 128 was not
accepted by the H7 but 64 was ok. Looking at the STM32Cube's HAL it
seems to be only 64 words long, however, the reference manual claims
otherwise.

I have opened a discussion on the ST community forum
https://community.st.com/s/question/0D73W000001nzqFSAQ
but unfortunately not received an answer yet.

In the meantime, I think, we should update this to what I found to be
working though.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-02-15 19:06:54 +08:00
Julian Oes
a59e65db3f stm32h7: fix comment
This was likely just a copy-paste error.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-02-15 19:06:54 +08:00
Fotis Panagiotopoulos
1b372a55cc stm32_sdio: Fix in SDIO clocking configuration. 2023-02-11 23:29:11 +08:00
Michal Lenc
00e87962fd imxrt: add option to select PWM trigger source value from configuration
Current implementation supports the trigger generation only from timer
capture on period value. This is sufficient for PWM synchronization but
may not be enough for other purposes as ADC triggering for example.

This change adds an option to generate the trigger based on a duty
cycle value.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-11 20:07:28 +08:00
Masayuki Ishikawa
777c6c4aad arch: imxrt: Fix imxrt for CONFIG_BUILD_PROTECTED=y
Summary:
- Fix imxrt_allocateheap.c for CONFIG_BUILD_PROTECTED=y
- Call mpu_reset() in imxrt_mpuinit.c

Impact:
- CONFIG_BUILD_PROTECTED=y only

Testing:
- Tested with imxrt1060-evk:knsh (will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-02-09 23:30:50 -08:00
Janne Rosberg
739688f6c6 sama5/twi: add support for flexcom twi 2023-02-10 10:56:56 +08:00
Michal Lenc
725dfd5db9 samv7: fix compilation error when only DAC1 is configured
The function call dac_txdone(&g_dac1dev) was not contained in ifdef
section. This was cousing compilation error if only DAC1 was configured
as the structure g_dac1dev is defined only if DAC0 is used.

This commit fixes the error and ensures the function is called only if
corresponding DAC is configured.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-10 02:33:30 +08:00
TimJTi
becaf3bf9d Correct SAMA5_USBA_DRP to be SAMA5_USB_DRP 2023-02-10 01:01:03 +08:00
TimJTi
b3365858ee Fix sam_udphs to allow RNDIS to work
Update sam_udphs.c
2023-02-10 00:55:59 +08:00
Peter Bee
2ebccd82b6 drivers/video: add timestamp support
Add support for timestamp and change in related drivers

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2023-02-09 23:27:15 +08:00
chao an
e942a7c55e build/Kconfig: fix warnings detected by kconfiglib
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:07:46 +08:00
chao an
3a0fdb019d nuttx: replace all ARRAY_SIZE()/ARRAYSIZE() to nitems()
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:05:44 +08:00
TimJTi
4aada75249 Changes to allow board-specific DRP/OTG support
Update sam_udphs.c
2023-02-09 03:42:55 +08:00
Ville Juven
9ac3e841da group_addrenv: Fix call to group_addrenv for targets that don't need it 2023-02-09 00:14:52 +08:00
Nathan Hartman
8b2c8c73e8 arch/tiva: Serial TIOCxBRK BSD-compatible BREAK support
In the lower half UART driver for Tiva architecture (TM4C12x), adding
the TIOCxBRK ioctl calls, which allow an application to transmit a BSD
compatible line BREAK. TIOCSBRK starts the BREAK and TIOCCBRK ends it.

This architecture supports BSD-style BREAK in hardware. We write to
the BRK bit (bit 0) of the UART Line Control register (UARTLCRH) to
start the BREAK, which begins after the UART finishes shifting out the
current character in progress, if any, including its stop bit(s), and
continues indefinitely until we write to the BRK bit again to stop the
BREAK.

* arch/arm/src/tiva/Kconfig
  (config TIVA_UART_BREAKS): New. Appears as CONFIG_TIVA_UART_BREAKS
   in code.

* arch/arm/src/tiva/common/tiva_serial.c
  (struct up_dev_s): Add new field 'brk' to indicate line break in
   progress when built with CONFIG_TIVA_UART_BREAKS.
  (up_ioctl): Add cases for TIOCSBRK to turn BSD-compatible break on
   unconditionally and TIOCCBRK to turn break off unconditionally.
  (up_txint): Block enabling TX interrupt if line break in progress.
   This is similar to the STM32F7 implementation.
2023-02-08 23:55:28 +08:00
Nathan Hartman
5d2e1d40dc arch/tiva: Fix inability to control serial CTS/RTS via termios
* arch/arm/src/tiva/common/tiva_serial.c:
  (up_ioctl): PR #8406 (commit 1edec0aaa1) added support for
   configuring the serial port's CTS/RTS flow control at runtime using
   termios when built with CONFIG_SERIAL_TERMIOS and either or both of
   CONFIG_SERIAL_OFLOWCONTROL and CONFIG_SERIAL_IFLOWCONTROL. However,
   a runtime sanity check left over from before prevented this from
   working: When processing ioctl TCSETS, we would return -EINVAL if
   one or both of CCTS_OFLOW and CRTS_IFLOW were requested, which was
   not deserved if the requested features were in fact supported.
   Fixing the sanity check so it depends on features actually
   configured.
2023-02-08 10:31:11 +08:00
Nathan Hartman
1b3cac19a0 serial: Fix typo in comments (s/besued/because/) 2023-02-08 10:05:27 +08:00
Ville Juven
f4b82b6405 sched/addrenv: Remove up_addrenv_restore
The function is not relevant any longer, remove it. Also remove
save_addrenv_t, the parameter taken by up_addrenv_restore.

Implement addrenv_select() / addrenv_restore() to handle the temporary
instantiation of address environments, e.g. when a process is being
created.
2023-02-08 02:51:23 +08:00
Ville Juven
5713d85df0 group/group_addrenv: Move address environment from group -> tcb
Detach the address environment handling from the group structure to the
tcb. This is preparation to fix rare cases where the system (MMU) is left
without a valid page directory, e.g. when a process exits.
2023-02-08 02:51:23 +08:00
Nathan Hartman
5f9cb6faf4 drivers/serial: Fix docstrings on UART interrupt handlers 2023-02-07 04:41:36 +08:00
chao an
1b245664ad arm/rp2040: fix compile warning on boot2 build
ld: warning: boards/arm/rp2040/raspberrypi-pico-w/scripts/raspberrypi-pico-flash.ld contains output sections; did you forget -T?
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-07 04:40:38 +08:00
chao an
5ac638944b arm/backtrace: fix compile warning
common/arm_backtrace_unwind.c: In function 'up_backtrace':
common/arm_backtrace_unwind.c:626:27:
warning: assignment to 'long unsigned int' from 'uint8_t (*)[]'\
{aka 'unsigned char (*)[]'} makes integer from pointer without a cast [-Wint-conversion]

  626 |           frame.stack_top = &g_intstacktop;
      |
2023-02-07 04:40:38 +08:00
wangbowen6
a11cb59af6 tc32/Make.defs: fix build break after merge unblock/block_task
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-04 18:25:58 -03:00
wangbowen6
f925e17f18 tlsr82/backtrace: tc32 backtrace bug fix
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-04 18:25:58 -03:00
chao an
7625126c91 Remove the remain MIN/MAX like macro
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-03 23:22:41 +08:00
chao an
eca4951021 nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 22:16:04 +08:00
Xiang Xiao
df102d1f06 Remove OK macro from the code base
let's use OK from sys/types.h instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-02 13:58:16 +01:00
chao an
4c8d244fae sched/getpid: replace syscall getpid/tid/ppid() to kernel version
NuttX kernel should not use the syscall functions, especially after
enabling CONFIG_SCHED_INSTRUMENTATION_SYSCALL, all system functions
will be traced to backend, which will impact system performance.

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-02 10:33:01 +08:00
Nathan Hartman
5651940d02 tiva/serial: Allow changing CTS/RTS with termios
This is a follow-up to PR #6548, which added UART CTS/RTS support for
Tiva (TI TM4C12x) microcontrollers. This follow-up makes it possible,
when termios support is enabled with CONFIG_SERIAL_TERMIOS and CTS/RTS
support is enabled with CONFIG_SERIAL_OFLOWCONTROL and/or
CONFIG_SERIAL_IFLOWCONTROL, to query whether CTS/RTS are on/off at
runtime by utilizing ioctl TCGETS and to turn CTS/RTS on/off at runtime
by utilizing ioctl TCSETS.

* arch/arm/src/tiva/common/tiva_serial.c
  (up_set_format): Because this function is called from ioctl TCSETS to
   modify UART settings, and that IOCTL now respects CCTS_OFLOW and
   CRTS_IFLOW, move setting/clearing of Tiva UART's CTL register's RTSEN
   and CTSEN bits here...
  (up_setup): ...from here.
  (up_ioctl): For TCGETS, populate CCTS_OFLOW and CRTS_IFLOW bits as
   appropriate. For TCSETS, populate priv's oflow and iflow from
   supplied CCTS_OFLOW and CRTS_IFLOW bits.

Thanks to Petro Karashchenko for review and suggested fixes.

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-02-02 09:44:07 +08:00
Nathan Hartman
f2e15b431c Support termios for Tiva
The lower-half serial driver for Tiva (TI TM4C12x) microcontrollers supports
termios, but Kconfig never enabled this support because we were missing the
ARCH_HAVE_SERIAL_TERMIOS configs. This is now enabled, allowing termios support
to be enabled with CONFIG_SERIAL_TERMIOS.

* arch/arm/src/tiva/Kconfig
  (config TIVA_UART0 thru TIVA_UART7): Select ARCH_HAVE_SERIAL_TERMIOS.
2023-02-02 09:43:09 +08:00
Nathan Hartman
78154f12ff Serial: Fix wrong identifier name in comments 2023-02-02 09:42:34 +08:00
Gustavo Henrique Nihei
e6b204f438 nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
Huang Qi
8b27d60bcd tools: Make zig available for arm/riscv/sim
Add essential compile flags to make zig available out of box.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-01 11:12:44 +08:00
Nathan Hartman
fdb149ddb0 Kconfig: Improve help text related to *_SERIALBRK_BSDCOMPAT
* arch/arm/src/gd32f4/Kconfig
  (GD32F4_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32/Kconfig
  (STM32_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32f7/Kconfig
  (STM32F7_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32h7/Kconfig
  (STM32H7_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32l4/Kconfig
  (STM32L4_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32l5/Kconfig
  (STM32L5_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32u5/Kconfig
  (STM32U5_SERIALBRK_BSDCOMPAT): Improve help text.

* arch/arm/src/stm32wb/Kconfig
  (STM32WB_SERIALBRK_BSDCOMPAT): Improve help text.
2023-02-01 10:58:34 +08:00
Xiang Xiao
9f027208d4 fs: Add model field to geometry and mtd_geometry_s
the model is very useful to track the device info

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 11:50:28 -03:00
Jukka Laitinen
4f957f8031 arch/arm/src/lc823450/lc823450_i2c.c: Remove extra rounding after MSEC2TIC change to round up
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-31 22:42:29 +08:00
Jukka Laitinen
05eb8541d1 Revert "arch/arm/src/stm32f7/stm32_i2c.c: Round up stm32_i2c_toticks return value"
This reverts commit fe6f6870dcc431cecf0fa94187cff05ec040cf47.
2023-01-31 22:42:29 +08:00
Xiang Xiao
55679aec5f drivers/camera: Support the private data for imgsensor and imgdata
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 08:04:39 +01:00
David Vosahlik
372fee9412 Added SocketCAN driver implementation to the tiva chip, modified the EK-TC1294XL launchpad board to use the new SocketCAN API 2023-01-31 14:07:23 +08:00
yinshengkai
3f97a87162 tools: add separate flags parameter for COMPILE/COMPILEXX
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-31 13:42:33 +08:00
Nathan Hartman
6b89b6f945 Remove executable permissions from source files
* arch/arm/src/sama5/sam_flexcom_spi.h,
  arch/risc-v/src/mpfs/mpfs_ihc_sbi.c,
  drivers/usbdev/adb.c,
  libs/libc/math/lib_scalbn.c,
  libs/libc/math/lib_scalbnf.c,
  net/ipfrag/Make.defs,
  net/ipfrag/ipfrag.c,
  net/ipfrag/ipfrag.h,
  net/ipfrag/ipv4_frag.c,
  net/ipfrag/ipv6_frag.c: Remove executable permission.
2023-01-30 20:34:51 -03:00
Nathan Hartman
f63754c4c0 arch/tiva: Remove dead store
* arch/arm/src/tiva/common/tiva_can.c:
  (tiva_can_initialize): Remove the local variable 'canmod', which was
   assigned but never used.
2023-01-31 01:36:09 +08:00
chao an
0f35ad29a8 arm/unwinder: set default unwinder type to arm exidx/extab
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-31 00:38:42 +08:00
rajvinder kaur
2b30f17607 stm32h7: socket CAN error handling. 2023-01-30 11:22:49 +08:00
chao an
82520c0006 arm/itm_syslog: remove invaild select config
1. CONFIG_SYSLOG has been removed by Nutt on below commit:

| commit c5ac473bc0
| Author: Gregory Nutt <gnutt@nuttx.org>
| Date:   Tue Jun 21 07:58:42 2016 -0600
|
|     SYSLOG: Remove an obsolete, unused configuration item from Kconfig file

2. Fix comile warning

| armv7-m/arm_itm_syslog.c: In function 'itm_syslog_initialize':
| armv7-m/arm_itm_syslog.c:183:18: warning: passing argument 1 of 'syslog_channel' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   183 |   syslog_channel(&g_itm_channel);
|       |                  ^~~~~~~~~~~~~~
| In file included from armv7-m/arm_itm_syslog.c:29:
| nuttx/syslog/syslog.h:155:49: note: expected 'struct syslog_channel_s *' but argument is of type 'const struct syslog_channel_s *'
|   155 | int syslog_channel(FAR struct syslog_channel_s *channel);
|       |

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 19:54:55 +08:00
zhangyuan21
e6d2f0623a backtrace: use CURRENT_REGS when in interrupt context
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-29 02:48:00 -08:00
Jukka Laitinen
7d54d04613 arch/arm/src/stm32f7/stm32_i2c.c: Round up stm32_i2c_toticks return value
When sending small number of bytes with larger CONFIG_USEC_PER_TICK
this function should return at least 1. Solve this by rounding
up the result.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-28 12:11:33 -03:00
Xiang Xiao
964a41283c arm/tlsr82: Fix warning: "IC_TAG_CACHE_ADDR_EQU_EN" is not defined
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-28 11:30:33 -03:00
Ville Juven
42d0e356c2 arch/addrenv: Change group_addrenv_t to arch_addrenv_t
This is preparation for moving address environments out of the group
structure into the tcb.

Why move ? Because the group is destroyed very early in the exit phase,
but the MMU mappings are needed until the context switch to the next
process is complete. Otherwise the MMU will lose its mappings and the
system will crash.
2023-01-27 23:17:01 +08:00
Max Kriegleder
8c465a64b9 stm32h7: add lower half timer driver 2023-01-27 13:29:10 +08:00
chao an
931a4f6969 arch/EXTRA_LIBS: link all staging library
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-27 01:08:26 +02:00
chao an
d031989e0e arch/arm: make DSP arch extension configurable
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-26 22:39:30 +02:00
Ville Juven
686b990a85 arch/ARCH_KERNEL_STACK: Fix signal handling with kernel stack
There were two issues with signal handling:
- With a kernel stack the "info" parameter was passed from kernel memory.
  This is fixed by making a stack frame to the user stack and copying it
  there.
- If the signal handler uses a system call, the kernel stack was completely
  and unconditionally destroyed, resulting in a crash in the user application

There is also no need to check ustkptr, it is always NULL. Why ? Because
signal delivery is deferred when a system call is being executed.
2023-01-26 20:41:42 +08:00
Petro Karashchenko
a58e73add8 arch/arm/tiva: simplify TIVA_CAN option usage
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-26 10:26:09 +08:00
Petro Karashchenko
bd7cb522a1 nuttx: use TABs instead of spaces in Kconfig files
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-26 10:26:09 +08:00
Petro Karashchenko
f952b8456c assert: switch from ASSERT(0/false) to PANIC
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-26 10:15:34 +08:00
Michael Jung
eaea60a575 armv8-m: Fix pthread_start syscall
The 'arg' parameter is in R3, not in R2.

Signed-off-by: Michael Jung <michael.jung@secore.ly>
2023-01-26 04:02:19 +08:00
Petro Karashchenko
be10056702 arch/arm/samv7: fix issue when AFEC1 driver failed to open second time
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-26 01:26:41 +08:00
Xiang Xiao
43e7b13697 assert: Log the assertion expression in case of fail
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-24 15:00:19 -03:00
David Sidrane
15462f3e7a s32k1xx:serial Do not use TC use TDRE & TIE 2023-01-24 06:47:21 +08:00
raiden00pl
aa7d4b40c1 stm32/foc: move the warning in the right place - should be in stm32f7 2023-01-24 00:44:41 +08:00
raiden00pl
bfdb7f8909 stm32f7,stm32/foc: support for BEMF sensing
stm32 version tested with b-g431b-esc1
stm32f7 version not tested on HW
2023-01-22 12:58:04 -03:00
raiden00pl
01d84408e6 stm32,stm32f7/adc: add interface to configure multi mode ADC 2023-01-22 12:58:04 -03:00
raiden00pl
f3fde0e9a8 stm32,stm32f7/foc: improve pwm_off 2023-01-22 12:58:04 -03:00
raiden00pl
bd6a0b08db stm32,stm32f7/foc: support for pwm_off() 2023-01-21 12:28:16 +08:00
raiden00pl
91d43edffd drivers/foc: support for BEMF sensing 2023-01-20 21:26:27 +02:00
Xiang Xiao
fd64e38072 build: Add STACK_USAGE(-fstack-usage) to assist the stack analysis
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-19 10:35:20 -03:00
David
5dbd082fad Bugfix of typo in tiva_can.c 2023-01-18 12:15:53 +01:00
Ville Juven
201a55c7cb arm/addrenv_utils: Don't touch L1 mappings in addrenv_destroy()
This is unnecessary, the address environment is getting wiped anyway,
there is no need to remove the L1 references because they will get
wiped when the page directory is changed
2023-01-18 11:02:19 +08:00
luoyong1
a32124879d arch/arm/src/armv7-a/r: fix kconfig error of l2 cache latency
fix the error of the config name and set latency config param bool to int

Signed-off-by: luoyong1 <luoyong1@xiaomi.com>
2023-01-17 12:45:42 +09:00
Xiang Xiao
62c5afe655 Fix warning in file included from chip/sam_clockconfig.c:34:
chip/sam_clockconfig.c: In function 'sam_usbclockconfig':
Error: /github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:135:51: error: 'regval' is used uninitialized [-Werror=uninitialized]
  135 | #define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
      |                                                   ^
chip/sam_clockconfig.c:422:12: note: 'regval' was declared here
  422 |   uint32_t regval;
      |            ^~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 18:59:44 -03:00
Xiang Xiao
f64da13e9b libxx: Add CXX_STANDARD to select -std=c++??
and default to "c++17"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 15:41:57 +02:00
TimJTi
6b4da4ad6e Ensure SFR CKTRIM register correctly set, SAMA5D2/D3 only 2023-01-16 21:40:00 +08:00
zhangyuan21
806a2a8b8d arch/armv7-ar: flush dcache when addr is not aligned with cache line
When invalidate address is not aligned with cache line,
must align address and flush the cache line.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-16 16:14:32 +08:00
zhangyuan21
4bb155db64 arch/arm: add barrier instruction for cache ops
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-16 16:14:32 +08:00
Xiang Xiao
f783f5c384 arch/arm: Fix typo error in cp15_cacheops.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 16:14:32 +08:00
Xiang Xiao
1ea9db4ebe Fix error: implicit declaration of function 'cp15_invalidate_icache'; did you mean 'cp15_invalidate_dcache'?
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 16:14:32 +08:00
chenrun1
c61195bcc9 arch/armv7-a & armv7-r:Add invalidate icache behavior
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-01-16 16:14:32 +08:00
ligd
7e4c5d3daa armv7a/r: cache function should depends on CONFIG_ARCH_XCACHE
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-16 16:14:32 +08:00
Julian Oes
22fa59074f stm32h7: add SMPS PWR option for STM32H7X7
The dual core STM32H747 / STM32H757 there is an additional option to
select SMPS rather than LDO as the power selection.

This commit adds this option to the STM32H747 config and the
stm32h7x7xx source.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-16 13:31:23 +08:00
zhangyuan21
fc623949a3 arch/arm: move hard code macro to kconfig
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-16 13:31:04 +08:00
luoyong1
6975bbb38d arch/arm/src: add pl310 l2cache's kconfig for latency
Signed-off-by: luoyong1 <luoyong1@xiaomi.com>
2023-01-16 13:31:04 +08:00
Jukka Laitinen
f9c8b4015f Revert "arch: Don't free the context if the reference doesn't equal zero"
struct stm32_i2c_inst_s instance is allocated on every call to
stm32_i2cbus_initialize, and that instance is supposed to be deleted on every
call to stm32_i2cbus_uninitialize.

The "refs" counter just keeps track on when the last one is deleted, and
everything is unregisterd/disabled.

This reverts commit 8098c80338.
2023-01-15 19:52:05 +08:00
Janne Rosberg
246a677045 sama5/sam_flexcom_spi: enable DMA support 2023-01-14 13:40:14 +08:00
Janne Rosberg
f6d164bf9d sama5/dmac: add defines for ATSAMA5D2
This allows xdma to be used on SAMA5D2x chips
2023-01-14 13:40:14 +08:00
Petro Karashchenko
45ed6f657c arch/arm/cxd56xx: do not clear enabled callback event on card insertion
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-13 12:18:36 +08:00
Jukka Laitinen
70de321de3 arch/Kconfig: remove virtual memory allocator dependency from MM_SHM
The dependency should be vice versa; the MM_SHM should depend on the
existence of the virtual memory range allocator.

Create a new CONFIG flag CONFIG_ARCH_VMA_MAPPING, which will define that
there is a virtual memory range allocator. Make MM_SHM select that flag

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-13 02:20:13 +08:00
raiden00pl
88dd705d27 stm32/stm32f7 CANv1: protect TX buffer during CAN error frame generation
Follow up to eb240e0 (PR #8060)
2023-01-11 01:53:49 +08:00
Carlos Sanchez
eb240e014c stm32: protect TX buffer during CAN error frame generation. 2023-01-10 13:33:35 +08:00
Petro Karashchenko
5f92c62874 boards/cxd56xx/spresense: add fs automount driver for SD Card
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-10 10:39:23 +09:00
Carlos Sanchez
78248183aa s32k1xx: reserve MSG_DATA extra space only when needed by config. 2023-01-09 21:06:56 +02:00
Carlos Sanchez
3c6d45fa99 s32k1xx: avoid buffer overflow when CAN time is used for non-FD CAN.
s32k1xx: fix initialization of MAXMB field in MCR.
2023-01-09 21:06:56 +02:00
Sergey Nikitenko
e0f99d93ac stm32wb: add i2c driver 2023-01-09 09:27:17 +08:00
yinshengkai
4752dcd12a arch/stm32: Initialize up_perf after system boot
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-06 13:32:12 +08:00
anjiahao
172d467c26 arch:add faultmask register operation to armv7-m & armv8-m
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-05 23:17:43 +02:00
anjiahao
c02fea36d8 arch:change tcbinfo regs num
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-05 23:36:12 +08:00
Xiang Xiao
b0a0ba3ad7 fs: Move mmap callback before truncate in [file|mountpt]_operations
since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
Xiang Xiao
779a610ca3 Remove the unnecessary NULL fields in global instance definition of file_operations
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 00:32:13 +02:00
Jukka Laitinen
f33dc4df3f Change FIOC_MMAP into file operation call
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
41e9df2f3e Add ftruncate into file operation calls
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Peter van der Perk
75631e6169 S32K3XX Progmem fixes and size config 2022-12-29 22:12:19 +02:00
Xiang Xiao
b9d7d00943 arch: Remove the unused arch color function variant
up_check_tcbstack_remain, up_check_stack, up_check_stack_remain and up_check_intstack_remain

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-24 22:40:52 +02:00
zhangyuan21
45394eb6dc arch: save user context in assert common code
This is the work continue with #7875

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-24 13:02:56 +08:00
Peter van der Perk
aac9eb57e8 S32K3XX Progmem dataflash with littlefs support 2022-12-24 12:03:56 +08:00
rajvinder kaur
3fd10fd504 s32k1xx\Kconfig: Add config option to enable UART invert setting. 2022-12-23 10:46:27 +08:00
Peter van der Perk
371f81d157 S32K3XX FlexCAN kconfig fix to work in conjunction with EMAC ioctl 2022-12-23 00:32:59 +08:00
Peter van der Perk
7f3cd2d3e8 S32K3XX EMAC MII PHY implementation 2022-12-23 00:32:59 +08:00
Peter van der Perk
7c8f3b4916 LPC17_40 CAN driver SocketCAN enforce TX fifo behaviour
Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-22 11:55:59 +08:00
TimJTi
e1b8c02f96 Add SAMA5D2 MCAN support
Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 14:51:57 -03:00
Petro Karashchenko
b107e4f417 nuttx: unify MIN, MAX and ABS macro definition across the code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 09:31:28 +08:00
Xiang Xiao
fd0d6a9bf5 compiler.h: Add _ between format|printf|syslog|scanf|strftime and like
align with other macro naming style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-21 01:05:19 +02:00
TimJTi
bc9b476d55 Update sam_mcan.c 2022-12-20 19:49:13 -03:00
David Sidrane
4fa163ade7 s32k3xx:EDMA fix git count 2022-12-20 18:01:21 +08:00
David Sidrane
d33475d2d4 s32k3xx:Serial add DMA 2022-12-20 13:28:54 +08:00
TimJTi
e6bfaa14ee SAMA5D2 add Flexcom SPI
Flexcom working, DMA not looked at for SAMA5D2

Update sam_flexcom_spi.c

Update sam_flexcom_spi.h

Update sam_config.h

Update hardware/sam_flexcom_spi.h

pkarashchenko reviews

SAMA5 serial and flexcom serial corrections
2022-12-20 12:20:28 +08:00
David Sidrane
e89e7eab8d s32k1xx:serial:Fix selection of RTS to iflow 2022-12-20 01:51:10 +08:00
David Sidrane
033adeced4 imxrt:serial:Fix selection of RTS to iflow 2022-12-20 01:50:57 +08:00
Peter van der Perk
b5fd0b2381 S32K3XX MR-CANHUBK3 Add protected knsh support 2022-12-19 20:10:34 +08:00
GD32-MCU
659bd495b0 Add i2c driver for gd32f450 MCU 2022-12-17 17:12:26 +08:00
Petro Karashchenko
cc0ee12092 arch/arm/samv7: add ARCH_RAMVECTORS support
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-17 13:57:03 +08:00
Petro Karashchenko
e28e4fd320 arch/arm: fix typos in start files
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-17 13:56:17 +08:00
TimJTi
ad33ccfa53 SAMA5 serial and flexcom serial corrections 2022-12-17 01:09:43 +02:00
Xiang Xiao
d5689e070b net/arp: Remove nuttx/net/arp.h
1.move ARPHRD_ETHER to netinet/arp.h
1.move arp_entry_s to net/arp/arp.h
2.move arp_input to nuttx/net/netdev.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 22:10:59 +02:00
zhangyuan21
453a1a7332 arch: move stack and task dump to common code
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-17 01:59:35 +08:00
zhangyuan21
632d87ee71 arch: remove up_release_pending function
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-16 21:29:57 +08:00
Peter van der Perk
19ca5ecbb0 Fix S32K1XX PM which was broken by #7869 2022-12-16 20:37:47 +08:00
Peter Bee
aeed8f5d26 include/nuttx/video: remove validate_buf
Removing validate_buf since it's only locally called in driver

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-16 17:03:35 +08:00
David Sidrane
707ac4b8f6 s32k1xx:Apply style changes from code review
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-16 01:06:12 +08:00
David Sidrane
75baa5b932 s32k1xx:LPSPI use DMA 2022-12-16 01:06:12 +08:00
David Sidrane
89f99dceed s32ke3xx:EDMA Usage Clean up 2022-12-15 22:21:32 +08:00
David Sidrane
df4eb4896d s32k3xx:LPSPI register usage cleanup 2022-12-15 22:21:32 +08:00
Petro Karashchenko
949a0d6032 arch/arm: remove FAR from ARM files
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-15 11:38:17 +08:00
Peter van der Perk
d172d8cd0f S32K FlexCAN don't use a blocking wait in tx avail 2022-12-14 10:45:43 -05:00
David Sidrane
1760057e29 s32k1xx:Apply Style Changes from code review
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-14 21:03:31 +08:00
David Sidrane
592e946bdf 32k1xx:serial:Support GPIO (buffler level) Flow control 2022-12-14 21:03:31 +08:00
David Sidrane
5a948ed3dd 32k1xx:serial fix HW Handshaking 2022-12-14 21:03:31 +08:00
David Sidrane
9bb1226b04 s32k1xx:serial Add EDMA 2022-12-14 21:03:31 +08:00
David Sidrane
8a412ba59b s32k1xx:Refactor DMAMUX for s32k11x, s32k14x 2022-12-14 21:03:31 +08:00
anjiahao
bc0fe0ea16 crypto:add some hardware support
esp32c3: aes hmac-sha1 hmac-sha256
stm32f0l0g0 stm32l1 : aes
sam34: aes
lpc43: aes
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-12-14 02:33:56 +08:00
anjiahao
2b071b7a42 arch/armv8m:support pmu api
The register definition comes from CMSIS
https: //github.com/ARM-software/CMSIS_5
commit id:10bf763a82318c0c852ff9ecc2d5cd8cebe7d761
file: Core/Include/pmu_armv8.h
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-12-14 00:27:02 +08:00
David Sidrane
4284d0398b imxrt:Serial LPUART_STAT_PF s/b LPUART_STAT_NF
as a result of a typo LPUART_STAT_NF was not checked and
   cleared on LPUART_STAT_PF.
2022-12-14 00:26:42 +08:00
Peter van der Perk
6b3b5751c1 S32K automatically calculate size of periphclocks array 2022-12-13 19:50:01 +08:00
chao an
47fbfa215e fs/hostfs: mode_t of mkdir(2) should use the nuttx prototype
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-13 18:16:20 +08:00
田昕
0382b63f5d move common assert logic together.
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-12 17:05:02 +08:00
zhangyuan21
ffd2eb5b14 arch/arm: only compare callee-saved registers for fpu
Registers S0-S15 (D0-D7, Q0-Q3) do not need to be preserved. They can be used for passing
arguments or returning results in standard procedure-call variants.
Registers D16-D31 (Q8-Q15), do not need to be preserved.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-09 11:00:38 +08:00
wangbowen6
27ea9f7625 arm/Kconfig: add cortex-m85 config
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-12-09 01:53:10 +08:00
wangbowen6
c44f87eb1a arm: add syscall SYS_save_context support for old arm and armv7-r
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-12-08 12:37:29 +08:00
TimJTi
18482efc39 SAMA5D2 fix printf formatter
Update sam_adc.c

Update sam_adc.c

%08x -> PRIx32

More %08x

Revert incorrect change (PRIx32)

Update sam_tc.c

Update sam_tc.c

more style corrections/typos

Update arch/arm/src/sama5/sam_adc.c

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2022-12-07 21:33:17 +01:00
Peter van der Perk
9c27d96b8a s32k3xx:LPSPI Check for TX complete before RX
Co-authored-by: David Sidrane <david.sidrane@nscdg.com>
2022-12-05 22:35:21 +08:00
Peter van der Perk
e7449cf97a S32K3XX EDMA Set Backdoor for DTCM memory map 2022-12-05 22:35:21 +08:00
chao an
d12ddf56df arm/arm: sync ARM_THUMB support from cortex-a
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-05 01:09:31 +08:00
Xiang Xiao
c6e9edcbb6 net: Rename arp_arpin to arp_input
align with other similar function(e.g. ipv4_input and ipv6_input)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-04 20:39:21 +08:00
chao an
62004a28a6 net/d_buf: remove d_buf reference from l3/l4
l3/l4 stack will decouple the reference of d_buf gradually, Only legacy
devices still retain d_buf support, new net devices will use d_iob

Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-04 20:37:14 +08:00
chao an
4b70e4ff77 arm/cortex-r: sync ARM_THUMB support from cortex-a
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-04 20:12:31 +08:00
wangbowen6
4859d40a51 arm_syscall: add SYS_save_context for armv7-a
I noticed that there is not register information in the crash log
when DEBUGASSERT failed, the reason is that the arm_dumpstate()
call up_saveusercontext() to get the context of current task but
armv7-a do not support syscall SYS_save_context.

crash log:
[48/12/ 7 16:14:03] [CPU1] [10] [a7] up_assert: Assertion failed CPU1 at file:mm_heap/mm_free.c line: 115 task: panel_apps
[48/12/ 7 16:14:03] [CPU1] [10] [a7] backtrace|10: 0x38443440 0x38081f30 0x38002888 0x3802cb7c 0x38036e34 0x38037978 0x380386f0 0x38037e64
[48/12/ 7 16:14:03] [CPU1] [10] [a7] backtrace|10: 0x38036edc 0x380376a0 0x38035a2c 0x380070d0 0x3804eae4 0x3802abd0 0x3802277c 0x3804b998
[48/12/ 7 16:14:03] [CPU1] [10] [a7] backtrace|10: 0x38091be8 0x38099250 0x38096adc 0x3808f134 0x3802d5d8 0x380191a4
[48/12/ 7 16:14:03] [CPU1] [10] [a7] arm_registerdump: R0: 00000000 R1: 00000000 R2: 00000000  R3: 00000000
[48/12/ 7 16:14:03] [CPU1] [10] [a7] arm_registerdump: R4: 00000000 R5: 00000000 R6: 00000000  R7: 00000000
[48/12/ 7 16:14:03] [CPU1] [10] [a7] arm_registerdump: R8: 00000000 SB: 00000000 SL: 00000000  FP: 00000000
[48/12/ 7 16:14:03] [CPU1] [10] [a7] arm_registerdump: IP: 00000000 SP: 00000000 LR: 00000000  PC: 00000000
[48/12/ 7 16:14:03] [CPU1] [10] [a7] arm_registerdump: CPSR: 00000000

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-12-04 01:52:49 +08:00
okayserh
0dafa5f921 Added initial USB support for stm32f746g discovery. 2022-12-03 20:06:47 +08:00
David Sidrane
da7fe760e8 s32k1xx:LPI2C Add DMA support
s32k3xx:LPI2C fix RESET so it compiles
2022-12-03 13:54:34 +08:00
David Sidrane
ddc178122e s32k3xx:EDMA Add Error handeling 2022-12-03 02:47:42 +08:00
David Sidrane
1d84656f79 s32k3xx:EDMA Add Looping and Cleanup 2022-12-03 02:47:42 +08:00
David Sidrane
22390df92d s32k3xx:EDMA fix DMAMUX1 access violation 2022-12-02 22:56:07 +08:00
chao an
c1c17794f9 arm/arm: generating assemble code in ARM states by default
The following changes omit the arm version:

| commit d321080351
| Author: chao an <anchao@xiaomi.com>
| Date:   Fri Dec 2 02:52:18 2022 +0800
|
|     arm/cortex-[a|r]: generating assemble code in ARM states by default
|
|     Signed-off-by: chao an <anchao@xiaomi.com>

Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-02 13:54:17 +08:00
TimJTi
b6c148e763 Style changes for sam_adc.c and sam_tsd.c 2022-12-02 01:09:25 +01:00
chao an
77aede7c87 arm/thumb: outputs an implicit IT block to avoid build break
Fix build break on thumb2 mode:
opus/celt/arm/celt_pitch_xcorr_arm-gnu.S: Assembler messages:
opus/celt/arm/celt_pitch_xcorr_arm-gnu.S:146: Error: thumb conditional instruction should be in IT block -- `movle pc,lr'

Reference:
https://developer.arm.com/documentation/100067/0612/armclang-Command-line-Options/-mimplicit-it

In A32 code, the integrated assembler accepts all conditional instructions
without giving an error or warning. In T32 code, the integrated assembler
outputs an implicit IT block when there is a conditional instruction
without an enclosing IT block. The integrated assembler does not give an
error or warning about this.

Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-01 22:14:34 +01:00
chao an
9ab97df0a5 arm/cortex-[a|r]/thumb: force assembler files to be interpreted as Thumb code
The option '-mthumb' is only valid for C source files and it is not passed to the assembler.

If 'thumb' is not considered in some assembly projects, the system will generate
'undefined instructions' when running incompatible instruction:

arm_undefinedinsn: Undefined instruction at 0x380cfc98

This assembly file should be compiled with .thumb but it doesn't:

380cfc90 <hobot_i8_i32_gemm_nn_m4_n8_neon>:
380cfc90: e92d4ff0  push  {r4, r5, r6, r7, r8, r9, sl, fp, lr}
380cfc94: ed2d8b10  vpush {d8-d15}
380cfc98: e59d4064  ldr r4, [sp, #100]  ; 0x64   <-- Undefined instruction
380cfc9c: e59d5068  ldr r5, [sp, #104]  ; 0x68
380cfca0: e59d606c  ldr r6, [sp, #108]  ; 0x6c
380cfca4: e59d7070  ldr r7, [sp, #112]  ; 0x70
380cfca8: e1a08120  lsr r8, r0, #2
380cfcac: e1a091a1  lsr r9, r1, #3
380cfcb0: e1a0a122  lsr sl, r2, #2

After enable thumb:
  .syntax unified
  .thumb
or
  -Wa,-mthumb

.Lhobot_i8_i32_gemm_nn_m4_n8_neon:
38001100: e92d 4ff0   stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr}
38001104: ed2d 8b10   vpush {d8-d15}
38001108: 9c19        ldr r4, [sp, #100]  ; 0x64
3800110a: 9d1a        ldr r5, [sp, #104]  ; 0x68
3800110c: 9e1b        ldr r6, [sp, #108]  ; 0x6c
3800110e: 9f1c        ldr r7, [sp, #112]  ; 0x70
38001110: ea4f 0890   mov.w r8, r0, lsr #2
38001114: ea4f 09d1   mov.w r9, r1, lsr #3
38001118: ea4f 0a92   mov.w sl, r2, lsr #2

This commit will enable the thumb option of the assembly file by default,
so that when compiling the assembly file, the machine code and the system will be in a consistent state.

----------------------------------------------------------------
https://gcc.gnu.org/onlinedocs/gcc-4.5.2/gcc/ARM-Options.html

GCC Manual:
-mthumb
  Generate code for the Thumb instruction set. The default is to use the 32-bit ARM
  instruction set. This option automatically enables either 16-bit Thumb-1 or mixed 16/32-bit
  Thumb-2 instructions based on the -mcpu=name and -march=name options.

  ** This option is not passed to the assembler. **
  ** If you want to force assembler files to be interpreted as Thumb code,
     either add a `.thumb' directive to the source or pass the -mthumb option
     directly to the assembler by prefixing it with -Wa. **

Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-01 22:14:34 +01:00
chao an
d321080351 arm/cortex-[a|r]: generating assemble code in ARM states by default
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-01 22:14:34 +01:00
Peter van der Perk
90472785d3 S32K3XX QSPI No need to check TX FIFO buffer when MPU is correctly configured 2022-12-01 08:00:32 -05:00
Peter van der Perk
ec5030ebe6 S32K3XX RAM fixes MPU Dcache ECC 2022-12-01 08:00:32 -05:00