我在 github 下载 V5.1.0 的代码,在 gd32f450 的 bsp 中通过命令 scons --dist-ide
生成能够在 RT-Thread Studio 下运行的工程。在编译时会爆出大量告警:
14:52:09 **** Build of configuration Debug for project rt-studio-project ****
make -j8 all
arm-none-eabi-gcc "../rt-thread/src/klibc/kstdio.c"
arm-none-eabi-gcc "../rt-thread/src/klibc/kstring.c"
arm-none-eabi-gcc "../rt-thread/src/clock.c"
arm-none-eabi-gcc "../rt-thread/src/components.c"
arm-none-eabi-gcc "../rt-thread/src/idle.c"
arm-none-eabi-gcc "../rt-thread/src/ipc.c"
arm-none-eabi-gcc "../rt-thread/src/irq.c"
arm-none-eabi-gcc "../rt-thread/src/kservice.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
../rt-thread/src/klibc/kstdio.c:294:9: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas]
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
^
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
../rt-thread/src/clock.c: In function 'rt_tick_increase':
../rt-thread/src/clock.c:100:5: warning: implicit declaration of function 'rt_sched_tick_increase' [-Wimplicit-function-declaration]
rt_sched_tick_increase();
^
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
../rt-thread/src/ipc.c: In function 'rt_susp_list_dequeue':
../rt-thread/src/ipc.c:118:17: warning: implicit declaration of function 'rt_sched_thread_ready' [-Wimplicit-function-declaration]
error = rt_sched_thread_ready(thread);
^
../rt-thread/src/ipc.c: In function 'rt_susp_list_enqueue':
../rt-thread/src/ipc.c:262:21: warning: implicit declaration of function 'rt_sched_thread_get_curr_prio' [-Wimplicit-function-declaration]
if (rt_sched_thread_get_curr_prio(thread) < rt_sched_thread_get_curr_prio(sthread))
^
../rt-thread/src/ipc.c: In function '_thread_get_mutex_priority':
../rt-thread/src/ipc.c:849:27: warning: implicit declaration of function 'rt_sched_thread_get_init_prio' [-Wimplicit-function-declaration]
rt_uint8_t priority = rt_sched_thread_get_init_prio(thread);
^
../rt-thread/src/ipc.c: In function '_thread_update_priority':
../rt-thread/src/ipc.c:876:11: warning: implicit declaration of function 'rt_sched_thread_change_priority' [-Wimplicit-function-declaration]
ret = rt_sched_thread_change_priority(thread, priority);
^
../rt-thread/src/ipc.c:878:31: warning: implicit declaration of function 'rt_sched_thread_is_suspended' [-Wimplicit-function-declaration]
while ((ret == RT_EOK) && rt_sched_thread_is_suspended(thread))
^
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/src/mem.c"
arm-none-eabi-gcc "../rt-thread/src/mempool.c"
arm-none-eabi-gcc "../rt-thread/src/object.c"
arm-none-eabi-gcc "../rt-thread/src/scheduler_comm.c"
arm-none-eabi-gcc "../rt-thread/src/scheduler_up.c"
arm-none-eabi-gcc "../rt-thread/src/thread.c"
arm-none-eabi-gcc "../rt-thread/src/timer.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/libcpu/arm/cortex-m4/context_gcc.S"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
../rt-thread/src/scheduler_comm.c: In function 'rt_sched_thread_init_ctx':
../rt-thread/src/scheduler_comm.c:30:5: warning: implicit declaration of function 'rt_sched_thread_init_priv' [-Wimplicit-function-declaration]
rt_sched_thread_init_priv(thread, tick, priority);
^
../rt-thread/src/scheduler_comm.c: In function 'rt_sched_thread_ready':
../rt-thread/src/scheduler_comm.c:140:13: warning: implicit declaration of function 'rt_sched_insert_thread' [-Wimplicit-function-declaration]
rt_sched_insert_thread(thread);
^
../rt-thread/src/scheduler_comm.c: In function 'rt_sched_thread_change_priority':
../rt-thread/src/scheduler_comm.c:184:9: warning: implicit declaration of function 'rt_sched_remove_thread' [-Wimplicit-function-declaration]
rt_sched_remove_thread(thread);
^
../rt-thread/src/scheduler_up.c: In function 'rt_system_scheduler_start':
../rt-thread/src/scheduler_up.c:180:5: warning: implicit declaration of function 'rt_sched_remove_thread' [-Wimplicit-function-declaration]
rt_sched_remove_thread(to_thread);
^
../rt-thread/src/scheduler_up.c: In function 'rt_schedule':
../rt-thread/src/scheduler_up.c:249:21: warning: implicit declaration of function 'rt_sched_insert_thread' [-Wimplicit-function-declaration]
rt_sched_insert_thread(from_thread);
^
../rt-thread/src/scheduler_up.c: At top level:
../rt-thread/src/scheduler_up.c:370:6: warning: conflicting types for 'rt_sched_insert_thread'
void rt_sched_insert_thread(struct rt_thread *thread)
^
../rt-thread/src/scheduler_up.c:249:21: note: previous implicit declaration of 'rt_sched_insert_thread' was here
rt_sched_insert_thread(from_thread);
^
../rt-thread/src/scheduler_up.c:422:6: warning: conflicting types for 'rt_sched_remove_thread'
void rt_sched_remove_thread(struct rt_thread *thread)
^
../rt-thread/src/scheduler_up.c:180:5: note: previous implicit declaration of 'rt_sched_remove_thread' was here
rt_sched_remove_thread(to_thread);
^
../rt-thread/src/thread.c: In function '_thread_exit':
../rt-thread/src/thread.c:92:5: warning: implicit declaration of function 'rt_sched_remove_thread' [-Wimplicit-function-declaration]
rt_sched_remove_thread(thread);
^
../rt-thread/src/thread.c:98:5: warning: implicit declaration of function 'rt_sched_thread_close' [-Wimplicit-function-declaration]
rt_sched_thread_close(thread);
^
In file included from ../rt-thread/src/thread.c:41:0:
../rt-thread/src/thread.c: In function '_thread_timeout':
../rt-thread/src/thread.c:134:15: warning: implicit declaration of function 'rt_sched_thread_is_suspended' [-Wimplicit-function-declaration]
RT_ASSERT(rt_sched_thread_is_suspended(thread));
^
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rt-thread\include/rtthread.h:782:7: note: in definition of macro 'RT_ASSERT'
if (!(EX)) \
^
../rt-thread/src/thread.c:142:5: warning: implicit declaration of function 'rt_sched_insert_thread' [-Wimplicit-function-declaration]
rt_sched_insert_thread(thread);
^
../rt-thread/src/thread.c: In function '_thread_init':
../rt-thread/src/thread.c:193:5: warning: implicit declaration of function 'rt_sched_thread_init_ctx' [-Wimplicit-function-declaration]
rt_sched_thread_init_ctx(thread, tick, priority);
^
../rt-thread/src/thread.c: In function 'rt_thread_startup':
../rt-thread/src/thread.c:404:5: warning: implicit declaration of function 'rt_sched_thread_startup' [-Wimplicit-function-declaration]
rt_sched_thread_startup(thread);
^
arm-none-eabi-gcc "../rt-thread/libcpu/arm/cortex-m4/cpuport.c"
../rt-thread/src/thread.c: In function '_thread_detach':
../rt-thread/src/thread.c:452:21: warning: implicit declaration of function 'rt_sched_thread_get_stat' [-Wimplicit-function-declaration]
thread_status = rt_sched_thread_get_stat(thread);
^
../rt-thread/src/thread.c: In function 'rt_thread_yield':
../rt-thread/src/thread.c:583:5: warning: implicit declaration of function 'rt_sched_thread_yield' [-Wimplicit-function-declaration]
rt_sched_thread_yield(rt_thread_self());
^
../rt-thread/src/thread.c: In function 'rt_thread_control':
../rt-thread/src/thread.c:786:21: warning: implicit declaration of function 'rt_sched_thread_change_priority' [-Wimplicit-function-declaration]
error = rt_sched_thread_change_priority(thread, *(rt_uint8_t *)arg);
^
../rt-thread/src/thread.c:819:20: warning: implicit declaration of function 'rt_sched_thread_bind_cpu' [-Wimplicit-function-declaration]
return rt_sched_thread_bind_cpu(thread, cpu);
^
../rt-thread/src/thread.c: In function 'rt_thread_suspend_to_list':
../rt-thread/src/thread.c:949:5: warning: implicit declaration of function 'rt_sched_thread_timer_stop' [-Wimplicit-function-declaration]
rt_sched_thread_timer_stop(thread);
^
../rt-thread/src/thread.c: In function 'rt_thread_resume':
../rt-thread/src/thread.c:1007:13: warning: implicit declaration of function 'rt_sched_thread_ready' [-Wimplicit-function-declaration]
error = rt_sched_thread_ready(thread);
^
arm-none-eabi-gcc "../rt-thread/libcpu/arm/common/div0.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/libcpu/arm/common/showmem.c"
arm-none-eabi-gcc "../rt-thread/components/libc/compilers/newlib/syscalls.c"
../rt-thread/src/timer.c: In function 'rt_timer_start':
../rt-thread/src/timer.c:516:9: warning: implicit declaration of function 'rt_sched_thread_timer_start' [-Wimplicit-function-declaration]
rt_sched_thread_timer_start(thread);
^
arm-none-eabi-gcc "../rt-thread/components/libc/compilers/common/cctype.c"
arm-none-eabi-gcc "../rt-thread/components/libc/compilers/common/cstdlib.c"
arm-none-eabi-gcc "../rt-thread/components/libc/compilers/common/cstring.c"
arm-none-eabi-gcc "../rt-thread/components/libc/compilers/common/ctime.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/libc/compilers/common/cunistd.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/libc/compilers/common/cwchar.c"
arm-none-eabi-gcc "../rt-thread/components/finsh/cmd.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/finsh/msh.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/finsh/msh_file.c"
arm-none-eabi-gcc "../rt-thread/components/finsh/msh_parse.c"
arm-none-eabi-gcc "../rt-thread/components/finsh/shell.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/drivers/serial/serial.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/drivers/pin/pin.c"
arm-none-eabi-gcc "../rt-thread/components/drivers/ipc/completion.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/drivers/ipc/condvar.c"
arm-none-eabi-gcc "../rt-thread/components/drivers/ipc/dataqueue.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/drivers/ipc/pipe.c"
arm-none-eabi-gcc "../rt-thread/components/drivers/ipc/ringblk_buf.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/drivers/ipc/ringbuffer.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/drivers/ipc/waitqueue.c"
arm-none-eabi-gcc "../rt-thread/components/drivers/ipc/workqueue.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
arm-none-eabi-gcc "../rt-thread/components/drivers/core/device.c"
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/dfs/dfs_v1/src/dfs.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/dfs/dfs_v1/src/dfs_file.c"
arm-none-eabi-gcc "../rt-thread/components/dfs/dfs_v1/src/dfs_fs.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/dfs/dfs_v1/src/dfs_posix.c"
arm-none-eabi-gcc "../rt-thread/components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c"
arm-none-eabi-gcc "../rt-thread/components/dfs/dfs_v1/filesystems/elmfat/ff.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../rt-thread/components/dfs/dfs_v1/filesystems/elmfat/ffunicode.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../libraries/gd32_drivers/drv_gpio.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../libraries/gd32_drivers/drv_usart.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_dma.c"
arm-none-eabi-gcc "../libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_exti.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_gpio.c"
arm-none-eabi-gcc "../libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_misc.c"
arm-none-eabi-gcc "../libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_rcu.c"
arm-none-eabi-gcc "../libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_syscfg.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../libraries/GD32F4xx_Firmware_Library/GD32F4xx_standard_peripheral/Source/gd32f4xx_usart.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../libraries/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/GCC/startup_gd32f4xx.s"
arm-none-eabi-gcc "../libraries/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/system_gd32f4xx.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
arm-none-eabi-gcc "../board/board.c"
arm-none-eabi-gcc "../applications/main.c"
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from <command-line>:0:0:
D:\Software\RT-ThreadStudio\LMM_discharge\rt-studio-project\rtconfig_preinc.h:8:0: warning: "GD32F450" redefined
#define GD32F450
^
<command-line>:0:0: note: this is the location of the previous definition
linking...
arm-none-eabi-objcopy -O binary "rtthread.elf" "rtthread.bin"
arm-none-eabi-size --format=berkeley "rtthread.elf"
text data bss dec hex filename
116848 2472 4756 124076 1e4ac rtthread.elf
Used Size(B) Used Size(KB)
Flash: 119320 B 116.52 KB
RAM: 7228 B 7.06 KB
14:52:12 Build Finished. 0 errors, 87 warnings. (took 2s.786ms)
求助各位大佬,该问题是如何产生的呢?
大佬,类似于 -DGD32F450 这样的配置项是在 RT-Studio 的哪里设置的啊otz
@抬头看见柠檬树
@抬头看见柠檬树
check this
@KunYi

大佬,我这里是空的qwq
@抬头看见柠檬树
看看 Misc 那邊
或是更簡單的方法 .cproject 本身應該是 xml 裡面有-DGD32F450 看看他是那個項目然後看IDE對應的項目
或是直接用編輯移除
@KunYi
我删除掉了 .cproject 文件中的所有 -DGD32F450 ,编译后会报其他的告警,但是重新再编译一次就好了,不知道为什么会这样,感觉很奇怪qwq
@抬头看见柠檬树不知道是不是我手头这版 v5.1.0 的代码的问题,目前我发现了两个已经确定的bug,一个是少写了分号,一个是使用了不存在的宏定义。