Starting RT-Thread for RPi Pico, Confusion with scons

Created at 2021-06-10 06:11:52

I am attempting to learn rt-thread using the raspberry pi pico. I am running into numerous issues, and I am frankly confused about the entire build process.

I've cloned the rt-thread git repo, navigated to the pico bsp and tried running scons and received the following errors:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build
CC build/applications/main.o
In file included from /usr/arm-none-eabi/include/signal.h:6,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/libc/libc_signal.h:72,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtlibc.h:21,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtdef.h:1146,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtthread.h:25,
                 from applications/main.c:11:
/usr/arm-none-eabi/include/sys/signal.h:42:7: error: redefinition of 'union sigval'
   42 | union sigval {
      |       ^~~~~~
In file included from /storage/Shared/Documents/rtthread/rt-thread/include/rtlibc.h:21,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtdef.h:1146,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtthread.h:25,
                 from applications/main.c:11:
/storage/Shared/Documents/rtthread/rt-thread/include/libc/libc_signal.h:28:7: note: originally defined here
   28 | union sigval
      |       ^~~~~~
In file included from /usr/arm-none-eabi/include/signal.h:6,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/libc/libc_signal.h:72,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtlibc.h:21,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtdef.h:1146,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtthread.h:25,
                 from applications/main.c:11:
/usr/arm-none-eabi/include/sys/signal.h:47:8: error: redefinition of 'struct sigevent'
   47 | struct sigevent {
      |        ^~~~~~~~
In file included from /storage/Shared/Documents/rtthread/rt-thread/include/rtlibc.h:21,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtdef.h:1146,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtthread.h:25,
                 from applications/main.c:11:
/storage/Shared/Documents/rtthread/rt-thread/include/libc/libc_signal.h:36:8: note: originally defined here
   36 | struct sigevent
      |        ^~~~~~~~
In file included from /usr/arm-none-eabi/include/signal.h:6,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/libc/libc_signal.h:72,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtlibc.h:21,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtdef.h:1146,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtthread.h:25,
                 from applications/main.c:11:
/usr/arm-none-eabi/include/sys/signal.h:72:3: error: conflicting types for 'siginfo_t'; have 'struct <anonymous>'
   72 | } siginfo_t;
      |   ^~~~~~~~~
In file included from /storage/Shared/Documents/rtthread/rt-thread/include/rtlibc.h:21,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtdef.h:1146,
                 from /storage/Shared/Documents/rtthread/rt-thread/include/rtthread.h:25,
                 from applications/main.c:11:
/storage/Shared/Documents/rtthread/rt-thread/include/libc/libc_signal.h:55:24: note: previous declaration of 'siginfo_t' with type 'siginfo_t' {aka 'struct siginfo'}
   55 | typedef struct siginfo siginfo_t;
      |                        ^~~~~~~~~

More on this, reading through the readme, it seems like I am supposed to specify a target IDE (i.e. keil, mdk, ...) but I just want to use gcc and a makefile. I don't see the actual options for target listed so I am unsure of how to say "just build for gcc". Any help would be appreciated.

更多

Follower
0
View
1k
1 Answer
flyboy
flyboy 2021-06-10

This is a common problem, you can use scons -c to clear the previous cache file cconfig.h, and then execute the scons command.

If the problem is not resolved, you can check the version number of the gcc toolchain, which needs to be greater than 10. You can download Arm ToolChains 10-2020-q4 from here.

https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2

Write Your Answer

Log in to publish your answer,Click here to log in.

Create
Post

Share