File tree Expand file tree Collapse file tree 3 files changed +40
-2
lines changed
Expand file tree Collapse file tree 3 files changed +40
-2
lines changed Original file line number Diff line number Diff 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平台下,可以先执行
Original file line number Diff line number Diff 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 */
Original file line number Diff line number Diff line change 5151 else :
5252 CFLAGS += ' -O2 -Os'
5353
54- CXXFLAGS = CFLAGS
54+ CXXFLAGS = CFLAGS + ' -std=gnu++17 -Wno-multichar'
5555
5656DUMP_ACTION = OBJDUMP + ' -D -S $TARGET > rtt.asm\n '
5757POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n ' + SIZE + ' $TARGET \n '
You can’t perform that action at this time.
0 commit comments