Commit Graph

19824 Commits

Author SHA1 Message Date
Xiang Xiao
69f8ac8ed0 Revert "arm/lc823450: Fix error: unknown pragma ignored"
This reverts commit 206e2a8eec.
2022-11-08 00:03:54 +09:00
Tiago Medicci Serrano
6317f6d597 esp32s2/i2s: use internal buffer to handle multiple audio formats 2022-11-07 13:46:44 +08:00
Tiago Medicci Serrano
d98df37f35 xtensa/esp32s2: add i2s_mclkfrequency to set master clock on I2S 2022-11-07 13:46:44 +08:00
Fotis Panagiotopoulos
60933f5a94 stm32_eth: Fix in assertion parameters. 2022-11-07 09:51:13 +08:00
Xiang Xiao
d5fe952b17 Fix Error: chip/lpc54_emc.c:421:12: error: explicitly assigning value of variable of type 'uint32_t' (aka 'unsigned int') to itself
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-06 21:18:31 +01:00
Xiang Xiao
27a7ff41b5 Fix Error: chip/lpc54_serial.c:1199:24: error: use of logical '&&' with constant operand
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-06 21:18:31 +01:00
Xiang Xiao
69dea8d329 Fix Error: chip/lpc43_usb0dev.c:905:20: error: unused function 'lpc43_abortrequest'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-06 21:18:31 +01:00
Xiang Xiao
6063749a3c Fix Error: chip/lpc43_usb0dev.c:905:20: error: unused function 'lpc43_abortrequest'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-06 21:18:31 +01:00
Xiang Xiao
7c88ef1e6a Fix lc823450_i2s.c:277:7: error: variable 'n' is used uninitialized whenever switch default is taken
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-06 21:18:31 +01:00
Xiang Xiao
bc04edecc1 Fix undefined reference to tmp' in function load_kernel.constprop.0':
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-06 21:18:31 +01:00
Xiang Xiao
206e2a8eec arm/lc823450: Fix error: unknown pragma ignored
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-06 21:18:31 +01:00
Xiang Xiao
819eeefc60 Fix chip/lc823450_sdc.c:282:33: error: format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int')
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-06 21:18:31 +01:00
Xiang Xiao
fbd886deb5 arch/arm: Fix types.h:61:9: error: unknown type name '__UINT32_TYPE__'
regressed by: https://github.com/apache/incubator-nuttx/pull/7476

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-06 07:14:39 +01:00
Eero Nurkkala
b7d2b38700 risc-v/mpfs: opensbi: fix random boot failures
After the commit b8b541f, the system would not start up properly
with certain coldboot conditions. For example, if the OpenSBI picked
hart4 as the coldboot hart in preference to hart3, the system would
get stuck due to stack corruption. OpenSBI uses a lottery mechanism
to pick the coldboot hart.

Also fix g_scratches area in such a manner than it will not get
initialized to zero. If several harts initialize the area to zero, there's
danger the stack pointer gets wiped out.

Now any coldboot hart works.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-11-05 00:37:51 +08:00
Tiago Medicci Serrano
20d8a55181 esp32/i2s: replace nxsem when used as a lock to nxmutex 2022-11-05 00:37:00 +08:00
Tiago Medicci Serrano
9ecc345c02 esp32/i2s: use internal buffer to handle multiple audio formats 2022-11-05 00:37:00 +08:00
Ville Juven
e239cd942e mpfs/mpfs_mm_init: Fix the section align mask checks
The boundary-1 mask needs to be tested, not the alignment boundary
2022-11-04 23:03:10 +08:00
anjiahao
be670c40d6 fix a mistake about nxmutex & sem
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-11-03 23:42:55 +08:00
chao an
b8d7194e66 renesas/rx65n: ram lock should in pair
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-03 14:43:12 +01:00
Xiang Xiao
116ba80ad5 Fix lpc17_40_spi.c:341:12: error: variable 'regval' set but not use
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-03 14:41:14 +01:00
Xiang Xiao
923c779c83 Fix lpc17_40_serial.c:935:20: error: unused function 'lpc17_40_uart3config'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-03 14:41:14 +01:00
raiden00pl
ef517ed05c stm32/stm32_adc.c fix clang warning
chip/stm32_adc.c:2529:32: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
setbits = ADC_CCR_DUAL_IND | ADC_CCR_DELAY(0) | ADC_CCR_MDMA_DISABLED |
^~~~~~~~~~~~~~~~
2022-11-03 10:15:39 -03:00
yinshengkai
85f727f232 tools: replace INCDIR to Makefile variable
In the past, header file paths were generated by the incdir command
Now they are generated by concatenating environment variables

In this way, when executing makefile, no shell command will be executed,
it will improve the speed of executing makfile
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-03 19:59:55 +08:00
zhangyuan21
cdeddcb028 arch/armv7-ar: add isb after CACHE and TLB operations. 2022-11-03 19:49:24 +08:00
Eero Nurkkala
3afc83abc7 risc-v/mpfs: ihc: reorganize ihc
Currently the IHC (Inter Hart Communication) depends on OpenAMP and
rptun.  However, the bootloader portion of the IHC doesn't need
either of them.  Now they are wasting a lot of bootloader space.

Reorganize the bootloader portion into a separate file 'mpfs_ihc_sbi.c'.
This file contains the OpenSBI vendor extensions, or the only required
functionalities for the bootloader.  On the other hand, 'mpfs_ihc.c'
contains the non-bootloader code.

This patch also makes it possible to utilize 2 RPMSG channels.  This
has been tested so that 2 separate NuttXs on harts 1 and 2 communicate
with Linux kernel that runs on harts 3 and 4.

New configuration files are added as well:
  - rpmsg-ch1:  sample config for RPMSG
  - rpmsg-ch2:  sample config for another RPMSG channel
  - rpmsg-sbi:  sample bootloader config for RPMSG/OpenSBI

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-11-02 21:44:52 +08:00
Eero Nurkkala
e50db35dc4 Revert "mpfs/mpfs_ddr.c: Stop the DDR training once it is completed"
This reverts commit ea9144bda8.

The commit made Icicle MPFS DDR useless. Revert the change for now.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-11-02 21:44:52 +08:00
Gustavo Henrique Nihei
f5c77933cb arch: Fix linking of multiple preprocessed linker script files
Only the last item from the ARCHSCRIPT list was being suffixed with
".tmp".

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-11-02 09:15:27 +08:00
Xiang Xiao
12926ee864 arch/arm: Document the clever trick of PRI?32 macros
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 23:11:16 +01:00
Xiang Xiao
93895c42a7 arch/arm: Typedef _[u]int32_t to __[U]INT32_TYPE__
if __INT32_TYPE__ is defined

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 19:58:20 +01:00
Xiang Xiao
4578df5cbb Fix lpc17_40_serial.c:705:24: error: unused function 'lpc17_40_uartcclkdiv'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 17:12:42 +01:00
Xiang Xiao
7daacec1fa Fix lpc17_40_serial.c:510:20: error: unused function 'up_restoreuartint'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 17:12:42 +01:00
Xiang Xiao
5948dc8c8f Fix lpc17_40_sdcard.c:614:24: error: unused function 'lpc17_40_getpwrctrl'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 17:12:42 +01:00
Xiang Xiao
09997c6546 Fix lpc17_40_serial.c:814:20: error: unused function 'lpc17_40_uart0config'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 17:12:42 +01:00
Xiang Xiao
ae9ff3bc67 Fix lpc176x_clockconfig.c:213:16: error: variable 'regval' set but not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 17:12:42 +01:00
zhangyuan21
b118083c35 arch_timer: adjust timer/arch_timer to support tick
Enable CONFIG_SCHED_TICKLESS_TICK_ARGUMENT in tickless mode
to improve the performance.
2022-11-01 21:53:08 +08:00
Fotis Panagiotopoulos
189aa0292f arm: Added breakpoint in stack overflow trap. 2022-11-01 21:42:25 +08:00
SPRESENSE
3379fc96fc arm/backtrace_sp: fix build warning
common/arm_backtrace_sp.c: In function 'up_backtrace':
common/arm_backtrace_sp.c:253:15: warning: assignment to 'long unsigned int' from 'uint8_t *' {aka 'unsigned char *'} makes integer from pointer without a cast [-Wint-conversion]
  253 |           top = g_intstacktop;
      |
2022-11-01 13:49:56 +01:00
Fotis Panagiotopoulos
e89432b563 Added DHCSR definitions for ARMv7 & ARMv8. 2022-11-01 09:22:07 +08:00
Xiang Xiao
3e3364d1a9 Fix the format string mismatch warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-31 11:20:56 +01:00
zhangyuan21
18266c1012 nuttx/sched: use pid to check idle task
Pid is more appropriate than the flink pointer to determine idle task,
when we want to use other data structure to optimize the task list.
2022-10-31 17:53:08 +09:00
Julian Oes
227218659b stm32h7: Add missing time.h include
This is required for me when building within CLion.

Without it, I get the error:

error: field 'lastwrite' has incomplete type
2022-10-31 10:22:27 +08:00
Xiang Xiao
5d7f1d5020 Fix chip/stm32_sdio.c:749:24: error: unused function 'stm32_getpwrctrl' [-Werror,-Wunused-function]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
Xiang Xiao
940ee2c8b1 Fix Error: chip/efm32_clockconfig.c:109:20: error: unused function 'efm32_synchronize' [-Werror,-Wunused-function]
static inline void efm32_synchronize(uint32_t bitset)
                   ^
Error: chip/efm32_clockconfig.c:185:20: error: unused function 'efm32_enable_auxhfrco' [-Werror,-Wunused-function]
static inline void efm32_enable_auxhfrco(void)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
Xiang Xiao
c6ae5e42c0 Fix chip/cxd56_farapi.c:285:14: error: format specifies type 'int' but the argument has type 'unsigned long' [-Werror,-Wformat]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
Xiang Xiao
7ad74c413a Fix chip/cxd56_icc.c:498:18: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
Xiang Xiao
eeefc4a516 Fix chip/cxd56_usbdev.c:675:20: error: unused function 'cxd56_iscableconnected' [-Werror,-Wunused-function]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
Xiang Xiao
c701d1c6ec Fix error: variable 'lfbclk' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
Xiang Xiao
d1a3f5e47f arch/arm: Replace xxx_[bus|usage]fault with arm_[bus|usage]fault
to fix the following clang warning:
Error: chip/eoss3_irq.c:138:47: error: format specifies type 'unsigned int' but the argument has type 'uint32_t' (aka 'unsigned long') [-Werror,-Wformat]
  _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
                                     ~~~~     ^~~~~~~~~~~~~~~~~~~~~~
                                     %08lx
/github/workspace/sources/nuttx/include/debug.h:126:57: note: expanded from macro '_err'
   __arch_syslog(LOG_ERR, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
                                    ~~~~~~              ^~~~~~~~~~~
/github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:134:24: note: expanded from macro 'getreg32'
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: chip/eoss3_irq.c:146:49: error: format specifies type 'unsigned int' but the argument has type 'uint32_t' (aka 'unsigned long') [-Werror,-Wformat]
  _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
                                       ~~~~     ^~~~~~~~~~~~~~~~~~~~~~
                                       %08lx

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
Xiang Xiao
ad35572751 Fix Error: chip/gd32f4xx_spi.c:924:20: error: unused function 'spi_putreg16' [-Werror,-Wunused-function]
static inline void spi_putreg16(struct gd32_spidev_s *priv,
                   ^
Error: chip/gd32f4xx_spi.c:945:23: error: unused function 'spi_getreg8' [-Werror,-Wunused-function]
static inline uint8_t spi_getreg8(struct gd32_spidev_s *priv,
                      ^
Error: chip/gd32f4xx_spi.c:967:20: error: unused function 'spi_putreg8' [-Werror,-Wunused-function]
static inline void spi_putreg8(struct gd32_spidev_s *priv,

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00
Xiang Xiao
202408c6e7 Fix gd32f4xx_syscfg.c:137:5: error: variable 'regaddr' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-30 16:03:35 +01:00