From ad3f16358e072db138777aa711295b1074be7687 Mon Sep 17 00:00:00 2001 From: zouboan Date: Thu, 3 Feb 2022 14:36:42 +0800 Subject: [PATCH] enable sparc's daily ci and eliminate some warnings --- arch/sparc/include/.gitignore | 2 ++ arch/sparc/include/inttypes.h | 26 +++++++++---------- arch/sparc/src/.gitignore | 3 +++ arch/sparc/src/bm3803/bm3803_freerun.c | 2 +- arch/sparc/src/bm3803/bm3803_wdg.c | 2 +- arch/sparc/src/sparc_v8/up_systemreset.c | 4 +++ .../sparc/bm3803/xx3803/configs/nsh/defconfig | 1 - tools/ci/testlist/other.dat | 4 +++ 8 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 arch/sparc/include/.gitignore create mode 100644 arch/sparc/src/.gitignore diff --git a/arch/sparc/include/.gitignore b/arch/sparc/include/.gitignore new file mode 100644 index 0000000000..af8911db06 --- /dev/null +++ b/arch/sparc/include/.gitignore @@ -0,0 +1,2 @@ +/board +/chip diff --git a/arch/sparc/include/inttypes.h b/arch/sparc/include/inttypes.h index f70b064890..a685a49752 100644 --- a/arch/sparc/include/inttypes.h +++ b/arch/sparc/include/inttypes.h @@ -31,89 +31,89 @@ #define PRId8 "d" #define PRId16 "d" -#define PRId32 "ld" +#define PRId32 "d" #define PRId64 "lld" #define PRIdPTR "d" #define PRIi8 "i" #define PRIi16 "i" -#define PRIi32 "li" +#define PRIi32 "i" #define PRIi64 "lli" #define PRIiPTR "i" #define PRIo8 "o" #define PRIo16 "o" -#define PRIo32 "lo" +#define PRIo32 "o" #define PRIo64 "llo" #define PRIoPTR "o" #define PRIu8 "u" #define PRIu16 "u" -#define PRIu32 "lu" +#define PRIu32 "u" #define PRIu64 "llu" #define PRIuPTR "u" #define PRIx8 "x" #define PRIx16 "x" -#define PRIx32 "lx" +#define PRIx32 "x" #define PRIx64 "llx" #define PRIxPTR "x" #define PRIX8 "X" #define PRIX16 "X" -#define PRIX32 "lX" +#define PRIX32 "X" #define PRIX64 "llX" #define PRIXPTR "X" #define SCNd8 "hhd" #define SCNd16 "hd" -#define SCNd32 "ld" +#define SCNd32 "d" #define SCNd64 "lld" #define SCNdPTR "d" #define SCNi8 "hhi" #define SCNi16 "hi" -#define SCNi32 "li" +#define SCNi32 "i" #define SCNi64 "lli" #define SCNiPTR "i" #define SCNo8 "hho" #define SCNo16 "ho" -#define SCNo32 "lo" +#define SCNo32 "o" #define SCNo64 "llo" #define SCNoPTR "o" #define SCNu8 "hhu" #define SCNu16 "hu" -#define SCNu32 "lu" +#define SCNu32 "u" #define SCNu64 "llu" #define SCNuPTR "u" #define SCNx8 "hhx" #define SCNx16 "hx" -#define SCNx32 "lx" +#define SCNx32 "x" #define SCNx64 "llx" #define SCNxPTR "x" #define INT8_C(x) x #define INT16_C(x) x -#define INT32_C(x) x ## l +#define INT32_C(x) x #define INT64_C(x) x ## ll #define UINT8_C(x) x #define UINT16_C(x) x -#define UINT32_C(x) x ## ul +#define UINT32_C(x) x ## u #define UINT64_C(x) x ## ull #endif /* __ARCH_SPARC_INCLUDE_INTTYPES_H */ diff --git a/arch/sparc/src/.gitignore b/arch/sparc/src/.gitignore new file mode 100644 index 0000000000..ebbb8c670f --- /dev/null +++ b/arch/sparc/src/.gitignore @@ -0,0 +1,3 @@ +/locked.r +/board +/chip diff --git a/arch/sparc/src/bm3803/bm3803_freerun.c b/arch/sparc/src/bm3803/bm3803_freerun.c index a6011b3576..a5db2d0260 100644 --- a/arch/sparc/src/bm3803/bm3803_freerun.c +++ b/arch/sparc/src/bm3803/bm3803_freerun.c @@ -231,7 +231,7 @@ int bm3803_freerun_counter(FAR struct bm3803_freerun_s *freerun, ts->tv_nsec = (usec - (sec * USEC_PER_SEC)) * NSEC_PER_USEC; tmrinfo("usec=%llu ts=(%u, %lu)\n", - usec, (unsigned long)ts->tv_sec, (unsigned long)ts->tv_nsec); + usec, ts->tv_sec, (unsigned long)ts->tv_nsec); return OK; } diff --git a/arch/sparc/src/bm3803/bm3803_wdg.c b/arch/sparc/src/bm3803/bm3803_wdg.c index 615eec7b74..eaefa5c589 100644 --- a/arch/sparc/src/bm3803/bm3803_wdg.c +++ b/arch/sparc/src/bm3803/bm3803_wdg.c @@ -159,7 +159,7 @@ static int bm3803_start(FAR struct watchdog_lowerhalf_s *lower) uint32_t val = bm3803_getreg(BM3803_TIM1_BASE + BM3803_TIM_CR_OFFSET); val |= TIMER_WDG; - wdinfo("Entry: started=%d\n"); + wdinfo("Entry: started\n"); DEBUGASSERT(priv); /* Have we already been started? */ diff --git a/arch/sparc/src/sparc_v8/up_systemreset.c b/arch/sparc/src/sparc_v8/up_systemreset.c index e703b98902..c27c821d41 100644 --- a/arch/sparc/src/sparc_v8/up_systemreset.c +++ b/arch/sparc/src/sparc_v8/up_systemreset.c @@ -62,4 +62,8 @@ void up_systemreset(void) asm("jmp %l4"); asm("nop"); asm("nop"); + + /* Wait for the reset */ + + for (; ; ); } diff --git a/boards/sparc/bm3803/xx3803/configs/nsh/defconfig b/boards/sparc/bm3803/xx3803/configs/nsh/defconfig index 7e6ece2b33..3cca985c4c 100644 --- a/boards/sparc/bm3803/xx3803/configs/nsh/defconfig +++ b/boards/sparc/bm3803/xx3803/configs/nsh/defconfig @@ -118,7 +118,6 @@ CONFIG_SCHED_LPWORK=y CONFIG_SCHED_LPWORKPRIORITY=120 CONFIG_SCHED_TICKLESS=y CONFIG_SCHED_WAITPID=y -CONFIG_SDCLONE_DISABLE=y CONFIG_SIG_PREALLOC_IRQ_ACTIONS=4 CONFIG_SPECIFIC_DRIVERS=y CONFIG_STACK_COLORATION=y diff --git a/tools/ci/testlist/other.dat b/tools/ci/testlist/other.dat index fea100e57b..50d32bf5ef 100644 --- a/tools/ci/testlist/other.dat +++ b/tools/ci/testlist/other.dat @@ -16,3 +16,7 @@ # x86_64-elf-gcc from homebrew doesn't seem to # provide __udivdi3 etc for -m32 /x86_64 + +# Sparc-gaisler-elf toolchain doesn't provide macOS binaries +/sparc +-xx3823:nsh