Migration Guide#
Connect Stack 4.2.0#
Connect Stack 4.2.0 integrates RAIL 3.0.0 and updates memory management. This section covers the changes you need to make when upgrading from 4.1.0.
Header File Changes#
Update the deprecated em_chip.h include to em_system.h:
Version 4.1.0 (Old) | Version 4.2.0 (New) |
|---|---|
|
|
Example:
// Version 4.1.0 (Old)
#include "em_chip.h"
// Version 4.2.0 (New)
#include "em_system.h"
Memory Management Changes (NCP Applications)#
If you have custom NCP code using standard library memory allocation, update to use sl_memory_manager:
Version 4.1.0 (Old) | Version 4.2.0 (New) |
|---|---|
|
|
|
|
|
|
Example:
// Version 4.1.0 (Old)
#include <stdlib.h>
uint8_t *buffer = (uint8_t *)malloc(MAX_BUFFER_SIZE);
free(buffer);
// Version 4.2.0 (New)
#include "sl_memory_manager.h"
uint8_t *buffer = (uint8_t *)sl_malloc(MAX_BUFFER_SIZE);
sl_free(buffer);
RAIL 3.0.0 Integration#
Connect Stack 4.2.0 uses RAIL 3.0.0 library. No application-level changes are required for this update as the stack handles the RAIL integration internally.
Connect Stack 4.1.0#
Connect Stack 4.1.0 introduces a key change: projects now use sl_main instead of sl_system for initialization and main loop control. This section will help you update your project quickly and with confidence.
Detailed API Change#
Upgrade to sl_main#
Migrating to the new sl_main APIs is the best way to ensure long-term support and access to new features.
How to Upgrade#
Update your project In Simplicity Studio, switch your project to the
sisdk-2025.6version.Replace API calls and headers Change all
sl_systemAPI calls and header includes to theirsl_mainequivalents (see below).Update initialization and main loop Follow the migration examples to update your main loop and initialization code.
Upgrading keeps your project compatible with future releases and lets you benefit from the latest improvements.
Header File Changes#
Update your includes as follows:
Version 4.0.0 (Old) | Version 4.1.0 (New) |
|---|---|
|
|
|
|
Example of include changes::
// Version 4.0.0 (Old)
#include "sl_system_init.h"
#if defined(SL_CATALOG_KERNEL_PRESENT)
#include "sl_system_kernel.h"
#else
#include "sl_system_process_action.h"
#endif
// Version 4.1.0 (New)
#include "sl_main_init.h"
#if defined(SL_CATALOG_KERNEL_PRESENT)
#include "sl_main_kernel.h"
#else
#include "sl_main_process_action.h"
#endif
Initialization and Main Loop Changes#
Update your main loop depending on whether your project uses an RTOS kernel or is bare metal:
Table of API Changes#
Version 4.0.0 ( | Version 4.1.0 ( |
|---|---|
|
|
| (see new kernel loop below) |
|
|
If Kernel is Present#
// Version 4.0.0 (Old)
sl_system_init();
app_init();
sl_system_kernel_start();
// Version 4.1.0 (New)
sl_main_second_stage_init();
app_init();
while (sl_main_start_task_should_continue()) {
app_process_action();
}
If Kernel is NOT Present#
// Version 4.0.0 (Old)
sl_system_init();
app_init();
while (1) {
sl_system_process_action();
app_process_action();
}
// Version 4.1.0 (New)
sl_main_init();
app_init();
while (1) {
sl_main_process_action();
app_process_action();
}