
What is Micro-Lab?
Micro-Lab is arguably the best embedded debugging tool to date. It addresses all the pain points encountered during debugging and introduces many new features, such as a brand new serial/network debugging service and associated modules, permanent storage of sending history with alias support, dynamic instruction programming for serial/network, virtual oscilloscopes for serial/network, super calculators, ModBus RTU calculators, DTUs, serial-network splitters, application shadowing, numerous development assistive tools and materials, and the revolutionary event-driven upper computer programming tool – VanGogh configuration canvas, among dozens of features.








Micro-Lab Graphical Interface Design and Usage

Switch to the configuration canvas page, then manually drag the relevant controls from the left to the central control placement area. When one of the controls is selected, you can change its properties on the right, similar to operating a serial screen. Even if you have never used it before, you can quickly get started without looking at the documentation. Once the controls are laid out, right-click in the control placement area and select Run. The interface you just designed will pop up, as shown below:

This way, when we are debugging the board, we can operate the interface in a very convenient and more visual manner, sending the corresponding instructions. Isn’t that very convenient? Doesn’t it have a bit of GUI feel?
Porting the SDK to STM32






int main(void)
{
delay_init();
uart_init();
LED_Init();
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
initCanvas(events);
while (1)
{
for(char i=0;i<CANVASEVENTLIST_SIZE;++i)
{
if(events[i].componenttype!=NONE_COMPONENT)
{
switch(events[i].componenttype)
{
case SWITCHBUTTON:
{
if(events[i].componentnumer==0)
{
if(events[i].componentmsgtype==SWITCH_ON)
{
LED=0;
printf("SWITCHBUTTON ON, ");
printf("MSG : ");
for(unsigned short j=0;j<events[i].msglen;++j)
{
printf("%2X ", events[i].msg[j]);
}
printf("\r\n");
}else if(events[i].componentmsgtype==SWITCH_OFF)
{
LED=1;
printf("SWITCHBUTTON OFF, ");
printf("MSG : ");
for(unsigned short j=0;j<events[i].msglen;++j)
{
printf("%2X ", events[i].msg[j]);
}
printf("\r\n");
}else
{
}
}
}
break;
default:
break;
}
events[i].componenttype = NONE_COMPONENT;
events[i].componentnumer = 0;
events[i].componentmsgtype = NONE_MSG;
events[i].msglen = 0;
}else
{
}
}
}
}
}


———— END ————
● Column “Embedded Tools”
● Column “Embedded Development”
● Column “Keil Tutorial”
● Selected Tutorials from the Embedded Column
Follow the official account reply “Join Group” to join the technical exchange group according to the rules, reply “1024” to see more content.
