Welcome to the Software
The Telink IoT studio installer will create 2 shortcuts on the desktop:
Telink IoT studio
: used to launch the IoT Studio.Telink TC32 console
: used to launch the development console for TLSR8, users can input commands like tc32-elf-gcc
and make
in it.The following 3 different IDEs will be referred to in this user guide:
Telink IoT studio
: the IDE contains this document.Telink old IDE
: the IDE list on this wiki page (IDE for TLSR8 Chips) for TLSR8 chips.Telink RDS IDE
: the IDE list on this wiki page (IDE for TLSR9 Chips) for TLSR9 chips.The above 3 IDEs have the following different desktop shortcut icons:
Telink IoT studio:
Telink old IDE:
Telink RDS IDE:
This option is used to configure whether to use the DSP and its libraries:
This option would add -mext-dsp
flag to cc
and ld
, and also it would add -lm
and -ldsp
flags to linker in Telink RDS IDE. While the Telink IoT studio would only add -mext-dsp
flag to cc
and ld
without the -lm
and -ldsp
extra libraries flags. This makes the configuration more flexible.
Users can add the math
and dsp
libraries to linker specifically on the linker library setting page:
-msave-restore
and -msmall-data-limit
The Telink RDS IDE
uses the IoT Studio built-in (default) value for both -msave-restore
and -msmall-data-limit
without options on configuration page, while the Telink IoT studio
has a more flexible configuration for these options.
Right now, users should use the Use toolchain default value
option for TLSR9 chips.
The Telink IoT studio contains several toolchains for TLSR8 and TLSR9:
We assume that the Telink IoT studio is installed at location $IoTStudio
:
$IoTStudio/opt/tc32/bin
$IoTStudio/RDS/V3.2.3/toolchains/nds32le-elf-mculib-v5
$IoTStudio/RDS/V3.2.3/toolchains/nds32le-elf-mculib-v5f
$IoTStudio/RDS/V5.1.1/toolchains/nds32le-elf-mculib-v5
$IoTStudio/RDS/V5.1.1/toolchains/nds32le-elf-mculib-v5f
As only one toolchain is included for TLSR8, this section is only applied to TLSR9 chips.
To change the toolchain of a project, open the project properties, navigate to C/C++ Build
--> Settings
--> Toolchains
tab, and select the different one from the drop-down list:
The listed toolchains are:
Telink TLSR9 D25F GCC
: for D25F architecture chips, from RDS V3.2.3Telink TLSR9 D25F GCC 7
: same as Telink TLSR9 D25F GCC
Telink TLSR9 D25F GCC 10
: for D25F architecture chips, from RDS V5.1.1Telink TLSR9 N22 GCC
: for N22 architecture chips, from RDS V3.2.3Telink TLSR9 N22 GCC 7
: same as Telink TLSR9 N22 GCC
Telink TLSR9 D25F GCC 10
: for N22 architecture chips, from RDS V5.1.1Normally, users shouldn't set the toolchain by changing toolchain path. Instead, a toolchain should be set with the method mentioned in the previous section: Select a different toolchain for TLSR9 projects
.
This section is for advanced users with special requirements.
Open the project property dialog by clicking the Property menu item on right and click the pop-up menu on the project:
Switch to the C/C++ Build
--> Settings
--> Toolchains
tab:
Click the global
link text which is surrounded in red square block.
Set the path string in the line edit.
Normally, users would only be required to change the version and the suffix which are marked with red lines.
The first red line marks the toolchain base version string (in the image it is V3.2.3
) of the toolchain, users can change it to one of the following items:
V3.2.3
: from Telink RDS IDE V3.2.3V5.1.1
: from Telink RDS IDE V5.1.1The second red line indicates the version of the toolchain variants string (in the image it is nds32le-elf-mculib-v5f
) of the toolchain, users can change it to one of the following items:
nds32le-elf-mculib-v5f
: for Telink TLSR9 D25F chipsnds32le-elf-mculib-v5
: for Telink TLSR9 N22 chipsOnce the toolchain path variable has been changed, click the apply and close
button to save it.
The build tool version and toolchain base version (the V3.2.3 or V5.1.1 string on the path of tools in above image) must be the same. Refer to the following section to verify and change the make tool version after you have changed the toolchain version.
You can check the currently project used toolchain version from the project property.
Right click on the project, select the Property
on the pop-up menu:
In the tab, we can get the build tool
version and toolchain
version:
From the build tool and toolchain path string, we can find the version sub-string which begins from V
after the RDS
, in the above /uploads/zip/2023061910182731KDJ/picture, both the build tool
version and toolchain
version are V3.2.3
.
Make tool version should be set in global scope.
Users can set the build tool version according to the chip type from the group Set Build tool according to Chip type for TLSR9
:
After changing the chip type, it's required to click the Save and Set
button to make the change into effect, a restart of IoT Studio is required.
To see the current global make tool version, you can click the menu item Settings and Log
from the Telink
menu.
The group Set build Tool(make) Version
would show the make tool version.
The make tool version in the above section image is V5.1.1
.
To change it to another version, select the target version from the combo list. Right now, only V3.2.3
and V5.1.1
are available. Then, click the Save selected version
, a restart of IoT Studio is required. You can choose to restart it manually or automatically as the message box hint:
Telink IoT studio supports SDK or projects import function like the Telink old IDE.
Users can use the File
-> Import...
to import SDK or projects:
Users can refer to this Telink wiki page.
For Telink RDS IDE
format projects( for example, the SDKs for TLSR9 chips at Telink official wiki page), it must be converted to Telink IoT studio
format before importing it into the workspace.
Users can refer to the following RDS to IDE converter
section on Telink menu
chapter to view how to do it.
If you get the SDK or projects for TLSR9 chip B91
from Telink official wiki page, they are in Telink RDS IDE
format, you can use this function to convert it to Telink IoT studio
format before importing it into Telink IoT studio, and SDK or projects of B92
do not require conversion.
Click the Telink RDS to IDE Converter
in Telink
menu:
Click the Select .cproject file
button in the dialog to choose the Telink RDS IDE format .cproject
file.
In Linux OS, users can use Ctrl + h
or other shortcut keys to show the hide files (.cproject
), and the filter should be changed to *
:
If a .cproject
file has been selected, it will display the file path:
Then click the convert
button, the result would show on the large text block:
If it is fails, the background of log text block would be set to red. Users can copy and send the log to Telink IoT studio
developer/FAE to get support.
The converter can be used as a standalone utility, users can use it in command line.
The converter is installed at:
To convert a .cproject
file from command line in Windows OS, users can use following the command:
$IoTStudio_PATH/tools/Converter/TelinkRDS2IDE.exe Path/To/.cproject
In Linux OS:
$IoTStudio_PATH/tools/Converter/TelinkRDS2IDE Path/To/.cproject
The converted project (.cproject
) would set the toolchain to Telink TLSR9 D25F GCC
by default, which will use the Telink RDS IDE
7.4 GCC Cross compiler for D25F.
The Jtag_Burn
function is similar to the Telink RDS IDE
Jtag_Burn function, both use the JTAG to burn the image to TLSR9X chips.
Except for the Jtag_Burn
, TLSR9 can be burned with Windows BDT
software through SWS
protocol with Burning EVK
, which is the recommended option.
The SWS
protocol requires only one GPIO to flash the binary image to TLSR8 and TLSR9 chips, while the JTAG uses 2 or 4 GPIO pins for TLSR9 chips.
Once the Jtag_Burn dialog has been opened, users can fill or set parameters for Jtag_Burn and ICEMan:
Parameters for Jtag_Burn
can be set in Jtag_Burn driver Arguments
.
ICEMan is a tool to manage the TLSR9 JTAG ICE (support 4-wire and 2-wire mode).
Users can refer to the document files in the doc
directory to get more information.
Users can set the other ICEMan and Jtag_Burn ELF from Flashing Drivers and ICEMan
section, the set/selected value will be saved and reused in next re-opening the dialog.
The normal ELF files' names are listed for reference:
ICEMan.exe
in Windows, and ICEMan
on Linux OSJtag_Burn.exe
in Windows, and Jtag_Burn
on Linux OSWhen burning the program, pay attention to burner's path and chip type, and then click Start ICEman. After ICEman is ready, the telnet_port and burner_port should be consistent with ICEman's, then click Burn, as shown below:
Jtag_ Burn is located in the $IoTStudio_PATH/RDS/V3.2.3/flash/directory, and its help documents are also in the same directory.
If you need to use the security download function of Jtag_Burn, enter the option --encrypt
in the Misc Arguments input box
Users can click the button Open/Show Log file info
to view the workspace log file content and the path will be set.
Users should attach this log file when submitting feedback problems or issues to Telink.
Users can set the Windows BDT
exe path at Windows BDT section, the set one will be saved and reused in Windows BDT (SWS and JTAG)
menu.
In this sub-menu, users can quickly visit Telink websites for development resources or information:
This menu entry would start the Telink tools launcher
, if the following dialog shows, it means the this version of IoT Studio hasn't shipped the Telink tools
, so users cannot use it.
The libusb version BDT
is a new burning tool which is similar to Windows BDT
for Windows OS and Linux OS, but this tool requires Burning EVK with new firmware. This tool can be used to flash the image to TLSR8 and TLSR9 chips through SWS. This tool is still in the beta phase. If this tool is not working on some Windows OS, use the Windows BDT
(mentioned in the following Windows BDT
section) instead.
Users can launch this tool and click the help on libUSB BDT menu to learn how to use it.
Clicking this menu entry would open the libusb version of BDT and pass the artifact bin path to it if a project has been selected and the artifact has been found, so users do not require to copy the artifact path manually:
If no project is selected, a error dialog would show, users can close it, the libusb BDT program would be started normally as well:
This is a submenu, it has several menu entries to start the toolchain console or ICEMan console, users can input commands (for example: riscv-elf-gcc
or ICEMan
) in these shells.
The Windows BDT (SWS and JTAG)
menu item would open the standalone program Windows BDT
. Users can use this tool to flash or debug the TLSR8 and TLSR9 chips.
Refer to this wiki page on how to use it.
The Linux tcdb for TLSR8
menu entry has 2 sub-menu items, the tcdb
would open the gnome-terminal
for tcdb using. Users can use tcdb
utility to flash the TLSR8 chips:
While the tcdb user guide
would open the PDF format user guide for reference.
There's an icon on the toolbar used to open the artifact directory:
It wouldn't work if the project was not properly configured (the .cproject
file), this occurs in many old TLSR8 SDKs.
While most TLSR9 SDK projects work as expected.
The project or project file must be selected before clicking the icon, otherwise it will not work.
The Telink IoT studio added a handy menu entry to help users copy the artifact path:
Users can click this icon to copy the artifact path to the system clipboard.
The project or project file must be selected before clicking the icon, otherwise it will not work.
The Copy artifact path
menu entry also shows at toolbar and right-click the pop-up menu:
This tool can be used to search for specific keywords in the Telink Document Center website. Double click a keyword in the project file and click 'Search on DocSite' to jump to the Document Center search page.
This type of error would occur when link script file path is in relative format. This wouldn't be an issue in Telink RDS IDE
, but there will be an error in Telink IoT studio
.
The error log would hint like the following:
To resolve this problem, users can open the project property, then navigate to linker's General
page of Tool Settings
tab as following image, then double click the link script file:
On opened dialog, select it from workspace
:
Click OK
and apply and close
button, and rebuild the project to check the results.
This plugin allows to open a shell window or file manager from the pop-up menu in the navigation tree or editor view. Additionally, it is possible to run selected files in the shell, copy file or directory path or run user defined external tools.
A calculator with lots of functions, including:
Users can open it from the menu: Window
--> Show view
--> other...
, then input Ecalculator
to search and open it:
The terminal can be used for inputting git commands and serial debugging.
Users can open it from the menu Window
--> Show View
--> Terminal
:
If your serial debugging log output frequency is very fast, use other dedicated tools instead.
This plugin is used to open the binary files:
Users can double-click a binary file to open and view it in IoT Studio.
Error 127
when compiling the codeThis error would give the Error 127
at console window:
This issue is caused by the incorrect setting of the build tool version, setting the correct build tool version would fix this problem.
These problems are normally caused by importing the Telink RDS IDE format projects to Telink IoT studio directly without converting.
To resolve this problem, remove the project and convert it to Telink IoT studio before importing.
When this occurs, the properties of the project would be like the following:
This problem is caused by the same reason as previous FAQ, converting Telink RDS format project before importing it.
Users can set the following command to post command in project properties:
Then build the project, the console will output the GCC version:
make tools
Users can set following command (echo "${PATH}"
) to post command in project properties:
Then build the project, the console will output the path that the first one is the make tool path:
In the above example result, the make tool
path is C:\TelinkIDE\RDS\V3.2.3\cygwin\bin
with base version V3.2.3
.
The user should open Telink TC32 console
with the privileges of administrator
.
Open artifact path
multiple timesThis occurs in that the IoT Studio cannot find the artifact path. Users should avoid clicking the toolbar icon Open artifact path
multiple times in a short time.
This is a normal case as the IoT Studio would take a while to do the code indexing
and scan compiler files (for example the toolchain system header files and directories).
This procedure would take a few seconds. Users should wait for this job done before other operations (eg: building). This is a one-shot action, it will happen on toolchain changing settings or importing projects.
This issue will occur if users start to build a configuration when the project is just imported and the makefile hasn't been generated fully.
When this happens, a log similar to the following example would display on the console log window:
To resolve this problem, users should wait a few seconds then build the configuration again.
To avoid this issue, users should wait for the makefiles to be generated and the indexing to be finished. The process can be viewed at the right bottom of the IoT Studio:
This issue will occur if users do not select any project. To avoid this issue, select a project before clicking the telink drop-down menu.
The print margin will show in default, which is a vertical line in the code editor:
If you want to hide it, you can uncheck the Show print margin
option on the Text Editors
page of preferences.
Note: This jtag debug tool is only used for TLSR9 series chips
To use the debugging function, when building an executable file, add the -g option to the compilation options, and pay attention to check the compiler and linker parameters, and delete all the -O options.
And the optimization option should be selected as -Og, and cannot be set to -O0, because in the test, it is found that the program compiled with the -O0 option cannot run normally after downloading, and the following error will occur when trying to download again:
In the process of building the program, you may encounter syntax errors like the one shown in the figure below. The solution is to delete options such as -Wall -Werror of the compiler (also pay attention to checking the parameters of assembler and linker):
One thing to note is that when building the V5.1.1 N22 program, because of the tool chain, when using the GCC 10 version of the N22 tool chain, delete the -mabi=ilp32f option (also pay attention to check the parameters of assembler and linker).
When burning the program, pay attention to burner's path and chip type, and then click Start ICEman. After ICEman is ready, the telnet_port and burner_port should be consistent with ICEman's, then click Burn, as shown below:
Jtag_ Burn is located in the $IoTStudio_PATH/RDS/V3.2.3/flash/directory, and its help documents are also in the same directory.
Before debugging, you need to execute ICEman. ICEman is used to configure a gdbserver and obtain the TCP port number for remote debugging.
Click the toolbar Telink --> Toolchain Shell or ICEman Shell --> Open ICEman(RDS V5.1.1) shell.
Enter the command at the terminal:
sudo ./ICEman -Z v5
The execution results are as follows:
1111 is the TCP port number that we need to monitor. During debugging, we need to ensure that ICEman is running and the terminal cannot be closed.
ICEman is located in the $IoTStudio_PATH/RDS/V5.1.1/ice/directory, you can also open ICEman by yourself.
After ICEman, click the drop-down arrow of the Debug icon on the toolbar and select Debug Configuration.
Select C/C++Remote Application
, configure the main tab, and select the compiled elf file as the input file of gdb, and select Disable auto build.
Then click Select other below. The default is Automatic, and select Manual
.
Click the Debugger tab to configure the corresponding debugger. Here is riscv32-elf-gdb
, Be careful not to check Stop on startup at.
Click the Connect sub tab and fill in the TCP port number as 1111 obtained by ICEman.
After configuration, click the Debug button to add breakpoints to start debugging. The interface is as follows:
At present, TLSR9 series SoC supports up to two hardware breakpoints. When you find that the starting address of your program is 0x20000000, it means that it is running in flash and needs to use hardware breakpoints. Commands such as step in
or step over
will use a breakpoint, so users can only customize one breakpoint when debugging, otherwise an exception will occur. This is why it is not recommended to check Stop on startup at, because this option actually works by inserting a breakpoint.
When a cannot access memory at address xx exception occurs during debugging, you can use the info br
command to check the number of breakpoints.
In the process of breakpoint debugging, there may be an error that the source file cannot be found. At this time, click Edit Source Path... , as shown below:
Click Add, select Path Mapping, and edit as follows:
The left side needs to be input by hand, and the right side is to select the path.
The principle of this problem is that the path in the IoT Studio is correctly mapped to the local path, so the simplest mapping method can also be to map /cygdrive/c/ directly to C:\ (because in this example our SDK is placed on the C drive).
After the above configuration is completed, you can debug normally.
The purpose of this tool is to convert the project file format of the original Telink RDS IDE to the current Telink IoT Studio project format.
To use it on the command line, you should switch to the directory of the .cproject
file that needs to be converted, and executing $(converter_path)/TelinkRDS2IDE in this directory.
The directory where the converter is located is the $IoTStudio_PATH/tools/Converter/.
For example:
The function of this tool is to burn and write binary files into the TLSR9 chip. Before using it, you need to first use ICEman. The Jtag Burn tool is located in the $IoTStudio_PATH/RDS/V3.2.3/flash/, and the user manual is also in this directory. The following is a example of usage:
./Jtag_Burn --chip B92 --reset-and-run --verify --addr 0 --image /home/wang/UART_Demo.bin --port 2354 --telnet_port 4444 --unlock
The parameter of --port and --telnet_port should be same with the parameter of ICEman's Burner port and telnet port. If you see the running results of ICEman indicating its Burner Port is 2354 and its telnet port is 4444 (as shown in the following figure):
In this case, you can run the Jtag_Burn without --port and --telnet_port.
Published by
Telink Semiconductor
Bldg 3, 1500 Zuchongzhi Rd,
Zhangjiang Hi-Tech Park, Shanghai, China
© Telink Semiconductor
All Rights Reserved
Legal Disclaimer
This document is provided as-is. Telink Semiconductor reserves the right to make improvements without further notice to this document or any products herein. This document may contain technical inaccuracies or typographical errors. Telink Semiconductor disclaims any and all liability for any errors, inaccuracies or incompleteness contained herein.
Copyright © 2023 Telink Semiconductor (Shanghai) Co., Ltd.
Information
For further information on the technology, product and business term, please contact Telink Semiconductor Company www.telink-semi.com
For sales or technical support, please send email to the address of:
Revision Date Author Change log
V1.0.0 2022-06 Xiongjun.He First release
V1.0.1 2022-07 Xiongjun.He Add more known issues
Add IDE setting chapter
V1.0.2 2022-09 Xiongjun.He Select version with chip type
V1.0.3 2022-11 H.X.J,W.F Add Jtag debugging section
V1.0.4 2023-03 H.X.J,W.F Telink IDE is renamed to Telink IoT Studio
Add usage of some tools
Login (Email)
Password
The new password
Confirm password