I'd like to reinstall my Jlink driver for Simplicity Studio. Where can I get the installer for just the driver?
Simplicity Studio has the Jlink installer as well as installers for other software you might have installed in the Simplicity Studio folder under:
How do I create or rename a filename like ".cproject" in Windows? I get an error saying "You must type a file name"
To create or rename a file beginning with a period in windows explorer, type a period, the filename, then another period. For example ".cproject." Windows will rename this to ".cproject"
You can also use a command prompt, such as git-bash, or cmd.exe to rename the file
How to get rid of the syntax error flagged by Simplicity Studio for ISR function definitions?
While including ISR function definitions, Simplicity Studio can show squiggly lines and this syntax error - "Multiple markers at this line" (see figure below)
This does not cause any build errors but is just not a very appealing sight during the development phase.
Why is this happening?
The Eclipse CDT parser (which parses the code to build an index) does not like that syntax even though the Silicon Labs C compiler accepts it.
How to fix this?
Since the compiler itself does not generate any errors, you could ignore the CDT syntax error. You can also turn off syntax error reporting in the editor by going to
Also in many cases, the error is due to 8051 compiler extensions that are not ANSI C compliant. For example, the interrupt and using keywords are 8051 extensions. To have the CDT parser automatically ignore these keywords, instead use the SI_INTERRUPT() or SI_INTERRUPT_USING() macros from si_toolchain.h.
si_toolchain.h uses conditional compilation to automatically remove unrecognized keywords from the CDT parser to prevent syntax errors.
#else // __SLS_IDE__ : Macros defined to remove syntax errors within Simplicity Studio #define SI_INTERRUPT(name, vector) void name (void) #define SI_INTERRUPT_USING(name, vector, regnum) void name (void) #define SI_INTERRUPT_PROTO(name, vector) void name (void) #define SI_INTERRUPT_PROTO_USING(name, vector, regnum) void name (void)
To enable the debug console window in studio, add the following flag to the top of your studio.ini file, or call studio.exe with the following parameter:
This displays a debug console window that shows the real-time output of Studio's status messages. Most of this information is also displayed in the Error Log view.
I have an existing C project in the Simplicity Studio IDE. How do I convert this to a C++ project?
Using Simplicity Studio V4, there is an RTX51.LIB error after building after adding Keil RTX51 Tiny code into my 8051 project.
How can I fix this problem?
The Keil RTX51 Tiny Real-Time kernel is included in the PK51 Professional Developer's Kit.
Using the LX51 linker, add the RTX51TINY directive to specify that the project being linked is a real-time application that uses the RTX51 Tiny Real-Time Operating System. This can be done in the Properties of the current project in Simplicity IDE: Settings > Keil 8051 Linker > Miscellaneous > Additional Flags. Finally re-build the project again.
An unlimited Keil PK51 license is provided for 8-bit Silicon Labs MCUs. Register your product and received the key to unlock your PK51 tools from Simplicity Studio > Help > Licensing or from here.
How do I setup a breakpoint to suspend program execution when a specific variable is read or written?
Simplicity Studio v4 supports a feature called watchpoints. Watchpoints are similar to breakpoints in that program execution is suspended when certain conditions occurs. Breakpoints halt once the program counter (PC) matches a specified value. Watchpoints can be configured to halt once an expression is read or written or a specified condition is true.
To configure a watchpoint for EFM32 products, perform the following steps:
1. Develop a firmware project or use an existing code example.
2. Download the firmware and start a debug session.
3. Once the debug session has connected, select the Breakpoints view.
4. To add a new watchpoint, click the down arrow on the top right side of the Breakpoints view.
5. In the Properties for C/C++ Watchpoint dialog, enter a valid expression, such as the name of a variable you wish to watch.
6. Check Read if you want to break when the expression is read by the CPU. Check Write if you want to break when the expression is written by the CPU.
7. Check Enabled to enable the watchpoint.
8. Condition can be used in addition to Read/Write to halt the CPU only when all specified conditions are true. A condition can be an expression such as "msTicks > 1000".
9. Click OK to apply the watchpoint settings.
The following examples describe how to enable simple watchpoints using the SLSTK3401A_blink example for the Pearl Gecko STK.
To halt the CPU when the msTicks variable is read by the CPU, choose the following settings:
Expression to watch: msTicks
After enabling the watchpoint and running, the CPU will halt at the first instruction after the expression is read. In this case, msTicks is read when it is assigned to curTicks and again each time in the while loop while waiting for the delay to complete.
To halt the CPU when the msTicks variable is written by the CPU, choose the following settings:
Expression to watch: msTicks
After enabling the watchpoint and running, the CPU will halt at the first instruction after the expression is written. In this case, msTicks is written when it is incremented by SysTick_Handler().
Adding a condition to the watchpoint will only break when the read/write condition is true as well as the expression in the Condition text box also evaluates to true.
Note that adding an expression to Condition will greatly reduce the running speed of the firmware as the debugger must constantly run/halt the CPU to evaluate the expression.
To break when msTicks is written to a value greater than 1000, choose the following settings:
Expression to watch: msTicks
Condition: msTicks > 1000
Note that since the debugger will run/halt the CPU rapidly, it may be difficult to manually suspend the CPU. To do so, uncheck the watchpoint enable checkbox on the Breakpoints view and then click the suspend button as normal.
If repeated network errors are seen when trying to update Simplicity Studio, the underlying internet connection might require changing the java file streaming configuration so that Simplicity Studio updates reliably. If Simplicity Studio always reports a network error occurred while doing an update and expanding the Error Details shows “Truncated chunk...” or “Read timed out” errors, then adjusting the underlying Eclipse timeout and threading parameters may eliminate or reduce the errors.
Please use a text editor to edit the studio.ini file after exiting Simplicity Studio. The file is located in the base directory where Simplicity Studio was installed (default location SiliconLabs/SimplicityStudio/v4). In the file, add these lines after the last “-D” argument:
Then, save the file and the settings will be in effect the next time Simplicity Studio is started.
Note: If a “Connection Error” is reported instead of a network error, the above wouldn’t apply, and the most likely cause is that the computer is behind a corporate firewall. In that case please refer to “Simplicity Studio v4 installation error – download error” Knowledge Base article: http://community.silabs.com/t5/Simplicity-Studio-and-Software/Simplicity-Studio-v4-installation-error-download-error/ta-p/181331
How to unlock EFR32 adapter in Simplicity Studio?
User may have the adapter locked issue when using Simplicity Studio V4 with EFR32 STKs, the error in the Device view looks like as below:
To fix this, in Simplicity Studio, click Window menu > Preferences > Simplicity Studio > Adapter Packs > Device Locks, choose target boards and press "Unlock All" button. Then restart the Simplicity Studio to detect the board gain.
What is Checksum? Why use it?
Checksum is one of the oldest methods of ensuring that data has not been corrupted during transmission or encryption. Checksum also provides a form of authentication because an invalid checksum suggests that data has been compromised in some fashion.
Let's say a transmission packet has 1,100 bytes and the checksum of a packet is 1 byte long. This means that there is a total of 256 possible combinations. If the sum of the other bytes in the packet is 255 or less, then the checksum will contain that exact value. If the sum of the other bytes is more than 255, then the checksum is the remainder of the total value after it has been divided by 256.
So, in case of a packet with 1100 bytes:
Okay, great! How do I enable checksum?
How to enable checksum to a project using the IAR toolchain WITH build errors
The build fails.
The ielftool executable that is called requires the ";" character to denote the range the checksum will be calculated from, but due to the fact that the makefile commands are called through a bash script, the ";" acts as an command separator and the command falls apart.
One of the ways to ensure the ";" is treated as a range instead of a command separator is to use the escape character. In bash scripts, the escape character is "\". There is some back and forth that needs to be done to fix this, so make sure you follow the instructions carefully.
Steps to be followed to enable checksum without build errors:
Adding escape characters
The text copied from Step 8 will be longer than Step 4. Copy the text in Step 8 that is different from Step 4. It will usually begin with --fill.
This is the default IAR Linker settings
--config "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.5/arm/config/generic_cortex.icf" --no_wrap_diagnostics --semihosting --ihex --bin
When the checksum is added (with the check boxes shown in the figure above), the settings change to this
--config "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.5/arm/config/generic_cortex.icf" --no_wrap_diagnostics --semihosting --ihex --bin --fill 0xFF;0x0-0x0 --checksum __checksum:2,crc16,0x0;0x0-0x0 --place_holder __checksum,2,.checksum,1 --define_symbol __checksum_begin=0x0 --define_symbol __checksum_end=0x0
The text that is different between the two:
--fill 0xFF;0x0-0x0 --checksum __checksum:2,crc16,0x0;0x0-0x0 --place_holder __checksum,2,.checksum,1 --define_symbol __checksum_begin=0x0 --define_symbol __checksum_end=0x0
Now, the "/" escape character needs to be added.
--fill 0xFF\;0x0-0x0 --checksum __checksum:2,crc16,0x0\;0x0-0x0 --place_holder __checksum,2,.checksum,1 --define_symbol __checksum_begin=0x0 --define_symbol __checksum_end=0x0
If one tries to build the project now, the following error message will be seen:
IELFTOOL: "The string '__checksum' was not found in the string table".
This happens becasue our source doesn't use the symbol __checksum. to be able to link anyway, the command line option "--keep __checksum" needs to be added.
Hence the modified setting would be:
--keep __checksum --fill 0xFF\;0x0-0x0 --checksum __checksum:2,crc16,0x0\;0x0-0x0 --place_holder __checksum,2,.checksum,1 --define_symbol __checksum_begin=0x0 --define_symbol __checksum_end=0x0
Where is this modification supposed to be added?
This should be pasted AFTER step 10, by navigating to Project Properties >> C/C++ Build >> Settings >> IAR Linker for ARM >> Extra Options. Paste the text above in the extra options text box:
Build the project once these changes have been made. This will be a one time fix for the project and subsequently checksum can be used for authentication/data corruption checks.