Skip to content

Commit 25f84a6

Browse files
authored
Merge branch 'master' into master
2 parents 71f4fe3 + 8d175ab commit 25f84a6

File tree

1,811 files changed

+918652
-282669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,811 files changed

+918652
-282669
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ The following content must not be changed in the submitted PR message. Otherwise
3131
- [ ] 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
3232
- [ ] 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
3333
- [ ] 本拉取/合并请求代码是高质量的 Code in this PR is of high quality
34-
- [ ] 本拉取/合并符合[RT-Thread代码规范](../documentation/coding_style_cn.md) This PR complies with [RT-Thread code specification](../documentation/coding_style_en.txt)
34+
- [ ] 本拉取/合并使用[formatting](https://github.com/mysterywolf/formatting)等源码格式化工具确保格式符合[RT-Thread代码规范](../documentation/coding_style_cn.md) This PR complies with [RT-Thread code specification](../documentation/coding_style_en.txt)

.github/workflows/action_utest.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
legs:
1414
- {UTEST: "kernel/mem", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/mem.conf", SD_FILE: "sd.bin"}
1515
- {UTEST: "kernel/ipc", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/ipc.conf", SD_FILE: "sd.bin"}
16+
- {UTEST: "kernel/irq", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/irq.conf", SD_FILE: "sd.bin"}
17+
- {UTEST: "kernel/timer", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "kernel/timer.conf", SD_FILE: "sd.bin"}
1618
- {UTEST: "components/utest", RTT_BSP: "bsp/qemu-vexpress-a9", QEMU_ARCH: "arm", QEMU_MACHINE: "vexpress-a9", CONFIG_FILE: "utest_self/self.conf", SD_FILE: "sd.bin"}
1719
- {UTEST: "kernel/mem/riscv64", RTT_BSP: "bsp/qemu-riscv-virt64", QEMU_ARCH: "riscv64", QEMU_MACHINE: "virt", CONFIG_FILE: "kernel/mem.conf", SD_FILE: "None"}
1820
env:

.ignore_format.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,13 @@ dir_path:
1313
- components/net/lwip-2.1.2
1414
- bsp/mm32f327x/Libraries
1515
- bsp/fm33lc026/libraries
16+
- bsp/stm32/libraries/STM32F0xx_HAL
17+
- bsp/stm32/libraries/STM32F2xx_HAL
18+
- bsp/stm32/libraries/STM32F4xx_HAL
19+
- bsp/stm32/libraries/STM32F7xx_HAL
20+
- bsp/stm32/libraries/STM32G0xx_HAL
21+
- bsp/stm32/libraries/STM32G4xx_HAL
22+
- bsp/stm32/libraries/STM32L4xx_HAL
23+
- bsp/stm32/libraries/STM32MPxx_HAL
24+
- bsp/stm32/libraries/STM32WBxx_HAL
25+
- bsp/stm32/libraries/STM32H7xx_HAL

bsp/allwinner_tina/libcpu/trap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define INT_FIQ 0x01
1616

1717
extern struct rt_thread *rt_current_thread;
18-
#ifdef RT_USING_FINSH
18+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
1919
extern long list_thread(void);
2020
#endif
2121

@@ -89,7 +89,7 @@ void rt_hw_trap_udef(struct rt_hw_register *regs)
8989
rt_kprintf("undefined instruction\n");
9090
rt_kprintf("thread - %s stack:\n", rt_current_thread->name);
9191

92-
#ifdef RT_USING_FINSH
92+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
9393
list_thread();
9494
#endif
9595
rt_hw_cpu_shutdown();
@@ -141,7 +141,7 @@ void rt_hw_trap_pabt(struct rt_hw_register *regs)
141141
rt_kprintf("prefetch abort\n");
142142
rt_kprintf("thread - %s stack:\n", RT_NAME_MAX, rt_current_thread->name);
143143

144-
#ifdef RT_USING_FINSH
144+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
145145
list_thread();
146146
#endif
147147
rt_hw_cpu_shutdown();
@@ -169,7 +169,7 @@ void rt_hw_trap_dabt(struct rt_hw_register *regs)
169169
rt_kprintf("data abort\n");
170170
rt_kprintf("thread - %s stack:\n", RT_NAME_MAX, rt_current_thread->name);
171171

172-
#ifdef RT_USING_FINSH
172+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
173173
list_thread();
174174
#endif
175175
rt_hw_cpu_shutdown();

bsp/bluetrum/ab32vg1-ab-prougen/board/board.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ void rt_hw_console_output(const char *str)
209209
RT_SECTION(".irq.err")
210210
void exception_isr(void)
211211
{
212+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
212213
extern long list_thread(void);
214+
#endif
213215
sys_error_hook(1);
214216

215217
#ifdef RT_USING_CONSOLE

bsp/dm365/platform/trap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/*@{*/
2121

2222
extern struct rt_thread *rt_current_thread;
23-
#ifdef RT_USING_FINSH
23+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
2424
extern long list_thread(void);
2525
#endif
2626

@@ -56,7 +56,7 @@ void rt_hw_trap_udef(struct rt_hw_register *regs)
5656
rt_kprintf("undefined instruction\n");
5757
rt_kprintf("thread - %s stack:\n", rt_current_thread->name);
5858

59-
#ifdef RT_USING_FINSH
59+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
6060
list_thread();
6161
#endif
6262
rt_hw_cpu_shutdown();
@@ -94,7 +94,7 @@ void rt_hw_trap_pabt(struct rt_hw_register *regs)
9494
rt_kprintf("prefetch abort\n");
9595
rt_kprintf("thread - %s stack:\n", rt_current_thread->name);
9696

97-
#ifdef RT_USING_FINSH
97+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
9898
list_thread();
9999
#endif
100100
rt_hw_cpu_shutdown();
@@ -130,7 +130,7 @@ void rt_hw_trap_dabt(struct rt_hw_register *regs)
130130
rt_kprintf("data abort\n");
131131
rt_kprintf("thread - %s stack:\n", rt_current_thread->name);
132132

133-
#ifdef RT_USING_FINSH
133+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
134134
list_thread();
135135
#endif
136136
rt_hw_cpu_shutdown();

bsp/ft2004/drivers/ft2004_cpu.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ rt_hw_cpu_id:
2020
cmp r0, #1
2121
beq core1
2222
cmp r0, #256
23-
beq core2
24-
mov r1 ,#257
23+
beq core2
24+
ldr r1,= #257
2525
cmp r0, r1
2626
beq core3
2727
b default

bsp/imx6sx/cortex-a9/cpu/trap.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "gic.h"
1818

1919
extern struct rt_thread *rt_current_thread;
20-
#ifdef RT_USING_FINSH
20+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
2121
extern long list_thread(void);
2222
#endif
2323

@@ -49,7 +49,7 @@ void rt_hw_trap_undef(struct rt_hw_exp_stack *regs)
4949
{
5050
rt_kprintf("undefined instruction:\n");
5151
rt_hw_show_register(regs);
52-
#ifdef RT_USING_FINSH
52+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
5353
list_thread();
5454
#endif
5555
rt_hw_cpu_shutdown();
@@ -68,7 +68,7 @@ void rt_hw_trap_swi(struct rt_hw_exp_stack *regs)
6868
{
6969
rt_kprintf("software interrupt:\n");
7070
rt_hw_show_register(regs);
71-
#ifdef RT_USING_FINSH
71+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
7272
list_thread();
7373
#endif
7474
rt_hw_cpu_shutdown();
@@ -86,7 +86,7 @@ void rt_hw_trap_pabt(struct rt_hw_exp_stack *regs)
8686
{
8787
rt_kprintf("prefetch abort:\n");
8888
rt_hw_show_register(regs);
89-
#ifdef RT_USING_FINSH
89+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
9090
list_thread();
9191
#endif
9292
rt_hw_cpu_shutdown();
@@ -104,7 +104,7 @@ void rt_hw_trap_dabt(struct rt_hw_exp_stack *regs)
104104
{
105105
rt_kprintf("data abort:");
106106
rt_hw_show_register(regs);
107-
#ifdef RT_USING_FINSH
107+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
108108
list_thread();
109109
#endif
110110
rt_hw_cpu_shutdown();
@@ -121,7 +121,7 @@ void rt_hw_trap_resv(struct rt_hw_exp_stack *regs)
121121
{
122122
rt_kprintf("reserved trap:\n");
123123
rt_hw_show_register(regs);
124-
#ifdef RT_USING_FINSH
124+
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
125125
list_thread();
126126
#endif
127127
rt_hw_cpu_shutdown();

bsp/k210/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,22 @@ Kendryte中文含义为勘智,而勘智取自勘物探智。这颗芯片主要
3131

3232
## 2. 编译说明
3333

34-
编译K210,需要有RT-Thread的代码,因为K210的sdk是以软件包方式,所以需要在bsp/k210下做软件包更新。Windows下推进使用[env工具][1],然后在console下进入bsp/k210目录中,运行:
34+
编译 K210,需要有 RT-Thread 的代码,因为 K210 的 sdk 是以软件包方式,所以需要在 bsp/k210 下做软件包更新。注意,需要使用 latest 的 RT-Thread 源码和 Latest 的软件包,软件包在menuconfig中的配置路径如下:
35+
36+
```
37+
RT-Thread online packages ---> peripheral libraries and drivers ---> kendryte K210 SDK package for rt-thread
38+
```
39+
40+
最新的 k210 SDK 使用了 C++17 编写了部分代码,因此需要打开 C++ 组件,C++组件在menuconfig中的配置路径如下:
41+
42+
```
43+
RT-Thread Components ---> C++ features
44+
```
45+
46+
Windows下推荐使用[env工具][1],然后在console下进入bsp/k210目录中,运行:
3547

3648
cd bsp/k210
49+
menuconfig # 在软件包中选择最新的 k210 SDK
3750
pkgs --update
3851

3952
如果在Linux平台下,可以先执行

bsp/k210/link.lds

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ SECTIONS
4444
*(.glue_7)
4545
*(.glue_7t)
4646
*(.gnu.linkonce.t*)
47+
48+
. = ALIGN(8);
49+
50+
PROVIDE(__ctors_start__ = .);
51+
/* old GCC version uses .ctors */
52+
KEEP(*(SORT(.ctors.*)))
53+
KEEP(*(.ctors))
54+
/* new GCC version uses .init_array */
55+
KEEP (*(SORT(.init_array.*)))
56+
KEEP (*(.init_array))
57+
PROVIDE(__ctors_end__ = .);
58+
4759

4860
/* section information for finsh shell */
4961
. = ALIGN(8);
@@ -63,6 +75,13 @@ SECTIONS
6375
__rt_init_end = .;
6476
. = ALIGN(8);
6577

78+
79+
__spi_func_start = .;
80+
KEEP(*(.spi_call))
81+
__spi_func_end = .;
82+
83+
. = ALIGN(8);
84+
6685
__rt_utest_tc_tab_start = .;
6786
KEEP(*(UtestTcTab))
6887
__rt_utest_tc_tab_end = .;
@@ -93,6 +112,12 @@ SECTIONS
93112

94113
*(.sdata)
95114
*(.sdata.*)
115+
116+
PROVIDE(__dtors_start__ = .);
117+
KEEP(*(SORT(.dtors.*)))
118+
KEEP(*(.dtors))
119+
PROVIDE(__dtors_end__ = .);
120+
96121
} > SRAM
97122

98123
/* stack for dual core */

0 commit comments

Comments
 (0)