Commit Graph

14878 Commits

Author SHA1 Message Date
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
chao an
12b0fa9ec3 arm/sama5: fix recursive dependency
arch/arm/src/sama5/Kconfig:819:error: recursive dependency detected!
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
arch/arm/src/sama5/Kconfig:819:	choice <choice> contains symbol SAMA5_FLEXCOM0_USART
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
arch/arm/src/sama5/Kconfig:824:	symbol SAMA5_FLEXCOM0_USART is part of choice SAMA5_FLEXCOM0_USART
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
arch/arm/src/sama5/Kconfig:824:	symbol SAMA5_FLEXCOM0_USART is part of choice <choice>

Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-01 09:45:09 +08:00
TimJTi
a634da9a30 Fix SAMA5D2 ADC and TSD problems
SAMA5Dx ADC and TSD fixes

Ensures ADC and TSD work together. TSD now works on SAMA5D2 and should be OK, still, for other SAMA5D familiy members

Fix CI error

checkpatch error

Update arch/arm/src/sama5/sam_tsd.h

Squash commits to arch/arm/src/sama5/hardware/sam_adc.h

Update arch/arm/src/sama5/hardware/sam_adc.h

Update arch/arm/src/sama5/hardware/sam_adc.h

Update arch/arm/src/sama5/hardware/sam_adc.h

Update arch/arm/src/sama5/hardware/sam_adc.h

Update arch/arm/src/sama5/hardware/sam_adc.h

Update arch/arm/src/sama5/hardware/sam_adc.h

Update arch/arm/src/sama5/hardware/sam_adc.h

Squash commits to arch/arm/src/sama5/sam_tsd.c

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

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

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

Update sam_tsd.c

Fixes after feedback from PR and additional testing

Update sam_tc.c

checkpatch.sh error was missed when fixing someone else's error...

feedback corrections missed

Co-Authored-By: Xiang Xiao <xiaoxiang781216@gmail.com>
Co-Authored-By: Petro Karashchenko <petro.karashchenko@gmail.com>

squashed everything after 248072e02C
2022-12-01 01:51:12 +08:00
TimJTi
57a21fbe1a Fixes for SAMA5D2 Flexcom USART
squashed everything after 8f8b8f5e05

Update Kconfig

Update Kconfig
2022-11-30 23:14:17 +08:00
ligd
b71f124b7b armv7-r: correct the wrong usage of ARMV7A_XX marco
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-11-28 12:21:32 +01:00
TimJTi
578f7783c6 Corrects PIO errors and omissions for SAMA5D2
Changes and corrections after review

Correct slow clock config
2022-11-28 16:37:44 +08:00
Xiang Xiao
6d30726a1b Remove the unnecessary "return;" at the end of function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 22:23:50 +01:00
chao an
6fa60627eb net/devif/ip: build l2 header on the IP layer
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:13:45 +08:00
chao an
8850dee746 net/devif: move preprocess of txpoll into common code
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-27 12:11:12 +08:00
Nathan Hartman
03802dad13 NuttX graduated the Incubator; update repository links 2022-11-26 11:58:15 -08:00
Ville Juven
52228fd222 stm32f7: Fix compliation of stm32_flash.c (add stm32_waste.c)
/arch/arm/src/libarch.a(stm32_flash.o): in function `up_progmem_write':
/arch/arm/src/chip/stm32_flash.c:419: undefined reference to `stm32_waste'

Seems like the symbol definition + declaration were completely missing
2022-11-23 20:30:26 +08:00
Ville Juven
321b9ea732 stm32f7/stm32_bbsram.c: Fix build error due to changed include path
Use correct path to include mutex.h

Fixes:

chip/stm32_bbsram.c:42:10: fatal error: mutex.h: No such file or directory
   42 | #include <mutex.h>
      |          ^~~~~~~~~
2022-11-23 18:20:29 +08:00
Xiang Xiao
04f887b56d Fix Error: chip/stm32_eth.c:1892:7: error: variable 'i' set but not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-23 07:27:48 +01:00
chao an
f23ec0f995 Revert "tools/ci/arm/llvm/clang: bump up LLVMEmbeddedToolchainForArm to release-15.0.2"
This reverts commit b4bab51e86.

Issue:
Builtin math symbols are missing on llvm 15.0.2(libm.a):
https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/issues/158

Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-22 07:43:02 -08:00
zhangyuan21
d8051ba979 nuttx/sched: merge up_block_task and up_unblock_task 2022-11-22 22:59:08 +08:00
zhangyuan21
a8fa51e6bf arch: rename arch special function name 2022-11-22 16:27:56 +08:00
chao an
fc65e6969d arm/llvm/clang: add support for LLVMEmbeddedToolchainForArm release-15.0.2
Upstream:
https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/tag/release-15.0.2

Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-22 08:56:20 +01:00
zhangyuan21
5c1b518314 nuttx/sched: move reprioritize process to public function 2022-11-22 15:29:00 +09:00
zhangyuan21
08f7152d9f nuttx/sched: remove nxsched_remove_readytorun from up_block_task
It takes about 10 cycles to obtain the task list according to the task
status. In most cases, we know the task status, so we can directly
add the task from the specified task list to reduce time consuming.
2022-11-22 15:29:00 +09:00
zhangyuan21
e54b602208 nuttx/sched: remove nxsched_remove_blocked from up_unblock_task
It takes about 10 cycles to obtain the task list according to the task
status. In most cases, we know the task status, so we can directly
delete the task from the specified task list to reduce time consuming.
2022-11-22 15:29:00 +09:00
chao an
624d69ee05 boards: enter/leave critical section should in pairs
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-22 08:19:24 +09:00
Karel Kočí
f0321d6bae arch/arm/src/samv7: fix missing sam_pendsv
The commit d1a3f5e47f invalidly removed
`sam_pendsv` instead of `sam_busfault`.
2022-11-21 23:45:24 +08:00
Xiang Xiao
ab31236905 Fix Error: chip/stm32_tim_lowerhalf.c:479:54: error: format specifies type 'unsigned long' but the argument has type 'uint32_t'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
ea171d6e5d Fix Error: chip/stm32_spi.c:571:23: error: unused function 'spi_getreg8'
and unused function 'spi_putreg8'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
6386596731 Fix Error: chip/stm32_qencoder.c:989:46: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
27629b74c9 Fix Error: chip/stm32_serial.c:1542:20: error: unused function 'up_serialmod'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
4e6568c29a Fix Error: chip/stm32l4_dfumode.c:45:20: error: unused function 'rcc_reset'
and unused function 'apb_reset'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
4cc52f277b Fix Error: chip/stm32l4_pwr.c:50:20: error: unused function 'stm32l4_pwr_modifyreg'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
30a153d2a0 Fix chip/stm32l562xx_rcc.c:78:20: error: unused function 'rcc_reset'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
59a747ee36 Fix error: chip/stm32l5_pwr.c:50:20: error: unused function 'stm32l5_pwr_modifyreg'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 17:39:04 +08:00
Xiang Xiao
f28cfbf2f3 Fix chip/stm32_eth.c:3358:20: error: unused function 'stm32_selectrmii'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
720acac6af Fix chip/stm32_usbdev.c:929:20: error: unused function 'stm32_setstatusout'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
6af9afaa60 Fix error: more '%' conversions than data arguments
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
22768ede17 Fix chip/sam_tc.c:682:24: error: unused function 'sam_tc_getreg'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
d01fbf77d0 Fix chip/sam4l_clockconfig.c:923:20: error: unused function 'sam_enable_fastwakeup'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
d3e282e561 Fix chip/s32k3xx_qspi.c:925:44: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
d8e53d7b4f Fix error: format specifies type 'unsigned long' but the argument has type 'unsigned int'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
670c3e0e35 Fix chip/s32k3xx_lpi2c.c:624:3: error: unused function 's32k3xx_lpi2c_sem_waitstop'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
987d2561c0 Fix chip/s32k3xx_fs26.c:249:31: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
e18d5870db Fix chip/s32k3xx_lpspi.c:719:23: error: unused function 's32k3xx_lpspi_readbyte'
and chip/s32k3xx_lpspi.c:748:20: error: unused function 's32k3xx_lpspi_writebyte'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
658dfeaf40 Fix chip/kinetis_spi.c:473:23: error: unused function 'spi_getreg8'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
6fd08787b6 Fix chip/kinetis_usbdev.c:3317:1: error: unused function 'khci_epreserved'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00
Xiang Xiao
232360cbd0 Fix chip/kinetis_enet.c:875:59: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 14:34:44 +01:00