Skip to content

RT_CPUS_NR is undeclared error during compile #8249

@riegaz

Description

@riegaz

I downloaded the latest windows env and checked out the latest rt-thread. When I simply want to compile a BSP I get the following error.

Could someone tell me how to solve this issue?

`TAARIMI7@TAARIMI7775B C:\Users\TAARIMI7\Downloads\f1c100s\rt-thread\bsp\allwinner_tina

scons
scons: Reading SConscript files ...
Newlib version: 4.1.0
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build
CC build\kernel\src\idle.o
C:\Users\TAARIMI7\Downloads\f1c100s\rt-thread\src\idle.c:43:33: error: 'RT_CPUS_NR' undeclared here (not in a function
)
43 | #define _CPUS_NR RT_CPUS_NR
| ^~~~~~~~~~
C:\Users\TAARIMI7\Downloads\f1c100s\rt-thread\src\idle.c:48:37: note: in expansion of macro '_CPUS_NR'
48 | static struct rt_thread idle_thread[_CPUS_NR];
| ^~~~~~~~
C:\Users\TAARIMI7\Downloads\f1c100s\rt-thread\src\idle.c: In function 'rt_thread_idle_gethandler':
C:\Users\TAARIMI7\Downloads\f1c100s\rt-thread\src\idle.c:379:9: warning: variable 'id' set but not used [-Wunused-but-
set-variable]
379 | int id = 0;
| ^~
C:\Users\TAARIMI7\Downloads\f1c100s\rt-thread\src\idle.c:383:1: warning: control reaches end of non-void function [-Wr
eturn-type]
383 | }
| ^
At top level:
C:\Users\TAARIMI7\Downloads\f1c100s\rt-thread\src\idle.c:50:19: warning: 'idle_thread_stack' defined but not used [-Wu
nused-variable]
50 | static rt_uint8_t idle_thread_stack[_CPUS_NR][IDLE_THREAD_STACK_SIZE];
| ^~~~~~~~~~~~~~~~~
C:\Users\TAARIMI7\Downloads\f1c100s\rt-thread\src\idle.c:48:25: warning: 'idle_thread' defined but not used [-Wunused-
variable]
48 | static struct rt_thread idle_thread[_CPUS_NR];
| ^~~~~~~~~~~
scons: *** [build\kernel\src\idle.o] Error 1
scons: building terminated because of errors.
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions