Skip to content

Commit

Permalink
Merge branch 'open-vela:dev' into pr5
Browse files Browse the repository at this point in the history
  • Loading branch information
guohao15 authored Jan 11, 2025
2 parents 2839a7b + aaea4e0 commit 314365a
Show file tree
Hide file tree
Showing 1,265 changed files with 6,983 additions and 2,830 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: CI

# Controls when the workflow will run
on:
pull_request:
pull_request_target:
types: [opened, reopened, synchronize]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,3 +783,20 @@ To test the XTWDT(/dev/watchdog3) an interrupt handler needs to be
implemented because XTWDT does not have system reset feature. To implement
an interrupt handler `WDIOC_CAPTURE` command can be used. When interrupt
rises, XTAL32K clock can be restored with `WDIOC_RSTCLK` command.

adb
---

Basic NuttShell configuration console enabled over USB Device (USB ADB).

You can run the configuration and compilation procedure::

$ ./tools/configure.sh esp32s3-devkit:adb
$ make -j16
$ make flash ESPTOOL_PORT=/dev/ttyACMx

Then run the adb command::

$ adb -s 1234 shell
nsh> uname -a
NuttX 0.0.0 Nov 22 2024 11:41:43 xtensa esp32s3-devkit
6 changes: 6 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ config ARCH_X86_64
select ARCH_HAVE_FORK
select ARCH_HAVE_SETJMP
select ARCH_HAVE_PERF_EVENTS
select ARCH_HAVE_POWEROFF
---help---
x86-64 architectures.

Expand Down Expand Up @@ -489,6 +490,11 @@ config ARCH_HAVE_TESTSET
bool
default n

config ARCH_HAVE_CUSTOM_TESTSET
bool
default n
select ARCH_HAVE_TESTSET

config ARCH_HAVE_THREAD_LOCAL
bool
default n
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ config ARCH_CHIP_LC823450
select ARCH_HAVE_HEAPCHECK
select ARCH_HAVE_MULTICPU
select ARCH_HAVE_I2CRESET
select ARCH_HAVE_CUSTOM_TESTSET
select ARCH_HAVE_CUSTOM_VECTORS
---help---
ON Semiconductor LC823450 architectures (ARM dual Cortex-M3)
Expand Down Expand Up @@ -344,11 +345,11 @@ config ARCH_CHIP_RP2040
select ARCH_CORTEXM0
select ARCH_HAVE_RAMVECTORS
select ARCH_HAVE_MULTICPU
select ARCH_HAVE_TESTSET
select ARCH_HAVE_I2CRESET
select ARM_HAVE_WFE_SEV
select ARCH_HAVE_PWM_MULTICHAN
select ARCH_BOARD_COMMON
select ARCH_HAVE_CUSTOM_TESTSET
select ARCH_HAVE_CUSTOM_VECTORS
---help---
Raspberry Pi RP2040 architectures (ARM dual Cortex-M0+).
Expand Down Expand Up @@ -655,6 +656,7 @@ config ARCH_CHIP_CXD56XX
select ARCH_HAVE_SDIO if MMCSD
select ARCH_HAVE_MATH_H
select ARCH_HAVE_I2CRESET
select ARCH_HAVE_CUSTOM_TESTSET
select ARCH_HAVE_CUSTOM_VECTORS
---help---
Sony CXD56XX (ARM Cortex-M4) architectures
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/include/armv6-m/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@

#ifdef __ghs__
# define __ARM_ARCH 6
# ifdef __ARM_DSP__
# define __ARM_FEATURE_DSP 1
# endif
#endif

/* Configuration ************************************************************/
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/include/armv7-a/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@

#ifdef __ghs__
# define __ARM_ARCH 7
# ifdef __ARM_DSP__
# define __ARM_FEATURE_DSP 1
# endif
#endif

/* IRQ Stack Frame Format:
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/include/armv7-m/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@

#ifdef __ghs__
# define __ARM_ARCH 7
# ifdef __ARM_DSP__
# define __ARM_FEATURE_DSP 1
# endif
#endif

/* Configuration ************************************************************/
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/include/armv7-r/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@

#ifdef __ghs__
# define __ARM_ARCH 7
# ifdef __ARM_DSP__
# define __ARM_FEATURE_DSP 1
# endif
#endif

/* IRQ Stack Frame Format:
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/include/armv8-m/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@

#ifdef __ghs__
# define __ARM_ARCH 8
# ifdef __ARM_DSP__
# define __ARM_FEATURE_DSP 1
# endif
#endif

/* Configuration ************************************************************/
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/include/armv8-r/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@

#ifdef __ghs__
# define __ARM_ARCH 8
# ifdef __ARM_DSP__
# define __ARM_FEATURE_DSP 1
# endif
#endif

/* IRQ Stack Frame Format:
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/include/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
* Pre-processor Prototypes
****************************************************************************/

#if defined(__ghs__) && defined(__ARM_DSP__)
# define __ARM_FEATURE_DSP 1
#endif

#ifndef __ASSEMBLY__

#ifndef up_switch_context
Expand Down
5 changes: 1 addition & 4 deletions arch/arm/include/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,7 @@ typedef uint8_t spinlock_t;
*
****************************************************************************/

#if defined(CONFIG_ARCH_HAVE_TESTSET) \
&& !defined(CONFIG_ARCH_CHIP_LC823450) \
&& !defined(CONFIG_ARCH_CHIP_CXD56XX) \
&& !defined(CONFIG_ARCH_CHIP_RP2040)
#if defined(CONFIG_ARCH_HAVE_TESTSET) && !defined(CONFIG_ARCH_HAVE_CUSTOM_TESTSET)
static inline_function spinlock_t up_testset(volatile spinlock_t *lock)
{
spinlock_t ret = SP_UNLOCKED;
Expand Down
32 changes: 16 additions & 16 deletions arch/arm/src/armv6-m/arm_svcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,22 @@ static void dispatch_syscall(void)
{
__asm__ __volatile__
(
" push {r4, r5}\n" /* Save R4 and R5 */
" sub sp, sp, #12\n" /* Create a stack frame to hold 3 parms */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" mov r5, lr\n" /* Save lr in R5 */
" ldr r4, =g_stublookup\n" /* R4=The base of the stub lookup table */
" lsl r0, r0, #2\n" /* R0=Offset of the stub for this syscall */
" ldr r4, [r4, r0]\n" /* R4=Address of the stub for this syscall */
" blx r5\n" /* Call the stub (modifies lr) */
" mov lr, r5\n" /* Restore lr */
" add sp, sp, #12\n" /* Destroy the stack frame */
" pop {r4, r5}\n" /* Recover R4 and R5 */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, " STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc " STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
" push {r4, r5}\n" /* Save R4 and R5 */
" sub sp, sp, #12\n" /* Create a stack frame to hold 3 parms */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" mov r5, lr\n" /* Save lr in R5 */
" ldr r4, =g_stublookup\n" /* R4=The base of the stub lookup table */
" lsl r0, r0, #2\n" /* R0=Offset of the stub for this syscall */
" ldr r4, [r4, r0]\n" /* R4=Address of the stub for this syscall */
" blx r4\n" /* Call the stub (modifies lr) */
" mov lr, r5\n" /* Restore lr */
" add sp, sp, #12\n" /* Destroy the stack frame */
" pop {r4, r5}\n" /* Recover R4 and R5 */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, #" STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc #" STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
);
}
#endif
Expand Down
26 changes: 13 additions & 13 deletions arch/arm/src/armv7-a/arm_syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,19 @@ static void dispatch_syscall(void)
{
__asm__ __volatile__
(
" sub sp, sp, #16\n" /* Create a stack frame to hold 3 parms + lr */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this SYSCALL */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" add sp, sp, #16\n" /* Destroy the stack frame */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, " STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc " STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
" sub sp, sp, #16\n" /* Create a stack frame to hold 3 parms + lr */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this SYSCALL */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" add sp, sp, #16\n" /* Destroy the stack frame */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, #" STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc #" STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
);
}
#endif
Expand Down
30 changes: 15 additions & 15 deletions arch/arm/src/armv7-m/arm_svcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,25 @@ static void dispatch_syscall(void)
* = orig_SP - 20 - ((orig_SP - 20) & ~7)
*/

" mov ip, sp\n" /* Calculate (orig_SP - new_SP) */
" mov ip, sp\n" /* Calculate (orig_SP - new_SP) */
" sub ip, ip, #20\n"
" and ip, ip, #7\n"
" add ip, ip, #20\n"
" sub sp, sp, ip\n"
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" str ip, [sp, #16]\n" /* Save (orig_SP - new_SP) value */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this syscall */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" ldr r2, [sp, #16]\n" /* Restore (orig_SP - new_SP) value */
" add sp, sp, r2\n" /* Restore SP */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, " STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc " STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" str ip, [sp, #16]\n" /* Save (orig_SP - new_SP) value */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this syscall */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" ldr r2, [sp, #16]\n" /* Restore (orig_SP - new_SP) value */
" add sp, sp, r2\n" /* Restore SP */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, #" STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc #" STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
);
}
#endif
Expand Down
26 changes: 13 additions & 13 deletions arch/arm/src/armv7-r/arm_syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,19 @@ static void dispatch_syscall(void)
{
__asm__ __volatile__
(
" sub sp, sp, #16\n" /* Create a stack frame to hold 3 parms + lr */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this SYSCALL */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" add sp, sp, #16\n" /* Destroy the stack frame */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, " STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc " STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
" sub sp, sp, #16\n" /* Create a stack frame to hold 3 parms + lr */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this SYSCALL */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" add sp, sp, #16\n" /* Destroy the stack frame */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, #" STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc #" STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
);
}
#endif
Expand Down
30 changes: 15 additions & 15 deletions arch/arm/src/armv8-m/arm_svcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,25 @@ static void dispatch_syscall(void)
* = orig_SP - 20 - ((orig_SP - 20) & ~7)
*/

" mov ip, sp\n" /* Calculate (orig_SP - new_SP) */
" mov ip, sp\n" /* Calculate (orig_SP - new_SP) */
" sub ip, ip, #20\n"
" and ip, ip, #7\n"
" add ip, ip, #20\n"
" sub sp, sp, ip\n"
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" str ip, [sp, #16]\n" /* Save (orig_SP - new_SP) value */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this syscall */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" ldr r2, [sp, #16]\n" /* Restore (orig_SP - new_SP) value */
" add sp, sp, r2\n" /* Restore SP */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, " STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc " STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" str ip, [sp, #16]\n" /* Save (orig_SP - new_SP) value */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this syscall */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" ldr r2, [sp, #16]\n" /* Restore (orig_SP - new_SP) value */
" add sp, sp, r2\n" /* Restore SP */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, #" STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc #" STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
);
}
#endif
Expand Down
26 changes: 13 additions & 13 deletions arch/arm/src/armv8-r/arm_syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,19 @@ static void dispatch_syscall(void)
{
__asm__ __volatile__
(
" sub sp, sp, #16\n" /* Create a stack frame to hold 3 parms + lr */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this SYSCALL */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" add sp, sp, #16\n" /* Destroy the stack frame */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, " STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc " STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
" sub sp, sp, #16\n" /* Create a stack frame to hold 3 parms + lr */
" str r4, [sp, #0]\n" /* Move parameter 4 (if any) into position */
" str r5, [sp, #4]\n" /* Move parameter 5 (if any) into position */
" str r6, [sp, #8]\n" /* Move parameter 6 (if any) into position */
" str lr, [sp, #12]\n" /* Save lr in the stack frame */
" ldr ip, =g_stublookup\n" /* R12=The base of the stub lookup table */
" ldr ip, [ip, r0, lsl #2]\n" /* R12=The address of the stub for this SYSCALL */
" blx ip\n" /* Call the stub (modifies lr) */
" ldr lr, [sp, #12]\n" /* Restore lr */
" add sp, sp, #16\n" /* Destroy the stack frame */
" mov r2, r0\n" /* R2=Save return value in R2 */
" mov r0, #" STRINGIFY(SYS_syscall_return) "\n" /* R0=SYS_syscall_return */
" svc #" STRINGIFY(SYS_syscall) "\n" /* Return from the SYSCALL */
);
}
#endif
Expand Down
Loading

0 comments on commit 314365a

Please sign in to comment.