753 views|8 replies

6841

Posts

11

Resources
The OP
 

[ACM32G103RCT6 development board review] Transplanting TobudOS [Copy link]

 

Recently, TobudOS was donated to the Open Source Atomic Foundation. After experiencing its system, I felt it was easy to use and the porting was also very easy. Here I would like to share with you the porting process.

¡¾Source code download¡¿

Website: https://atomgit.com/OpenAtomFoundation/TobudOS

The internet speed is still very fast.

¡¾Project Template¡¿

I downloaded the software package provided by the forum, unzipped it, found the template and named it.

2. Compile the engineering version to ensure that the compilation can pass, and the flashing light and printf can print normally.

3. After unzipping the TobudOS source, create a new os folder in the project directory and copy the arch and kernel in the source code to the folder.

3. According to the official information, the core of the ACM32G103 chip is based on the ARMv8-M architecture and supports Cortex-M33 and Cortex-M4F, so I choose the Cortex-M33 core to port here.

4. In the project, I created three new project groups, namely kernel, arc, and config:

5. Add all the .c files under \os\kernel\core to the os/kernel project, add port_c.c and port_s.S under the \os\arch\arm\arm-v8m\cortex-m33\armcc directory to os/arch, and add the directory \os\arch\arm\arm-v8m\common to the arch project group.

6. Copy a copy of tos_config.h from the \TobudOS-master\board\BearPi_STM32L431RC\TOS-CONFIG folder of the source code to the project and add it to the os/config group.

7. Add the header files required by the project into the project, as follows:

7. Add main.h to the tos_config.h file, find the bus clock of the project, and add it to config.h.

8. Comment out the PenSV_handle function in acm32g103_it.c, because this interrupt function is defined in tobudos, otherwise it will be reported as a duplicate definition, or you can add back __weak.

9. Redefine the SysTick_handle function to provide heartbeat for tobudOS. Of course, you can also define a 1ms timer to provide heartbeat packets for the system.

/******************************************************************************
*[url=home.php?mod=space&uid=159083]@brief[/url] : System tick handler
*@param : none
*@return: none
******************************************************************************/
void SysTick_Handler(void)
{
 //HAL_IncTick();
 if(tos_knl_is_running())
 {
  tos_knl_irq_enter();
  tos_tick_handler();
  tos_knl_irq_leave();
 }
}


10. Create two tasks in main.c. The code is as follows:


#include "main.h"   
#include "tos_k.h"

k_task_t task, led_task;

k_stack_t task_stack[1024], task_stack_led[1024];

void test_task(void *Parameter)
{
	while(1)
	{
		printf("hello tobuandOS\r\n");
		tos_task_delay(1000);
	}
}

void led_task_entry(void *Parameter)
{
	while(1)
	{
		BSP_LED_Toggle();
		tos_task_delay(500);
	}
}
/******************************************************************************
*@brief : main program
*@param : none
*@return: none
******************************************************************************/
int main(void)
{
    uint32_t count=0;
	k_err_t err;
	
	HAL_Init();
    SystemClock_Config();
	
    BSP_UART_Init();  	
	BSP_LED_Init();
	
	tos_knl_init();
	err = tos_task_create(&task, "task1",test_task,NULL, 2, task_stack,1024,20);
	err = tos_task_create(&led_task, "task_led",led_task_entry,NULL, 2, task_stack_led,1024,20);
	tos_knl_start();
//	BSP_LED_On();
//	HAL_Delay(500);
//	BSP_LED_Off();
//	
//    while(1)
//    {
//		BSP_LED_Toggle();
//		HAL_Delay(500);
//        printfS("%d\r\n",count++);
//        
//    };
}

¡¾Effect¡¿

After compiling and downloading to the development board, you can see the onboard LED light flashing regularly, and the serial port assistant also prints:

[Experience] Hangxin Technology provides very good project templates, making it very easy to get started. I saw that they don't have a template for the operating system, so I'll add it here. If they need it, they can add it to the project in the future. The official can contact me. Here is the transplanted project:

Projects_tobudOS.zip (734.07 KB, downloads: 3)
This post is from Domestic Chip Exchange

Latest reply

What do you think are the advantages of TobudOS compared to other RTOS systems?   Details Published on 2023-12-31 20:56
 
 

410

Posts

3

Resources
2
 

TobudOS is a new system or the original Tencent Internet of Things system. It is very good.

This post is from Domestic Chip Exchange

Comments

It should be similar, but after they donated to the Atomic Foundation, they seemed to have changed the name. I also had experience with Qinheng's boards before, but not in depth.  Details Published on 2023-12-29 16:15
 
 
 

6841

Posts

11

Resources
3
 
TL-LED posted on 2023-12-29 15:30 Is TobudOS a new system or the original Tencent IoT system? It is very good.

It should be similar, but after they donated to the Atomic Foundation, they seemed to have changed the name. I also had experience with Qinheng's boards before, but not in depth.

This post is from Domestic Chip Exchange
 
 
 

224

Posts

0

Resources
4
 

I will also publish a FreeRTOS port in the next issue.

This post is from Domestic Chip Exchange

Comments

OK, OK, this development board has enough memory, and it is very easy to run FreeRTOS.  Details Published on 2023-12-29 17:50
 
 
 

6841

Posts

11

Resources
5
 
qiao--- Published on 2023-12-29 17:41 I will also publish a FreeRTOS port in the next issue

OK, OK, this development board has enough memory, and it is very easy to run FreeRTOS.

This post is from Domestic Chip Exchange
 
 
 

41

Posts

0

Resources
6
 
Support the boss, I will also transplant it next time
This post is from Domestic Chip Exchange

Comments

It's very easy and simple, but I haven't looked at the semaphores and mailboxes inside. Take a look at these functions when you have time.  Details Published on 2023-12-31 19:45
 
 
 

6841

Posts

11

Resources
7
 
¤ß¤º¤¸ posted on 2023-12-31 10:59 I support you, I will also try porting it next time

It's very easy and simple, but I haven't looked at the semaphores and mailboxes inside. Take a look at these functions when you have time.

This post is from Domestic Chip Exchange
 
 
 

6773

Posts

2

Resources
8
 

What do you think are the advantages of TobudOS compared to other RTOS systems?

This post is from Domestic Chip Exchange

Comments

There is no comparison yet, but I feel that the porting is simpler than RTT and freertos.  Details Published on 2024-1-1 07:43
 
 
 

6841

Posts

11

Resources
9
 
wangerxian posted on 2023-12-31 20:56 What do you think are the advantages of TobudOS compared to other RTOS systems?

There is no comparison yet, but I feel that the porting is simpler than RTT and freertos.

This post is from Domestic Chip Exchange
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
WAN Acceleration - Wide Area Network Optimization Technology and Application Analysis

Wide Area Network ( WAN ) bandwidth is expensive, so most users can only have limited WAN bandwidth. On the contrary ...

High-quality electronic product design solutions (classic)

Comprehensive electronic information High-quality electronic product design solutions (classic)

Design of Power Amplifier Circuit for MSP430F449 Single Chip Microcomputer

According to the design requirements, the biggest difficulty and one of the key points of the design is to achieve a max ...

I'm looking for two books. I searched all over the Internet and only found them in the library. Can anyone provide me with a pdf or second-hand book? I'll give you 20 yuan. Thanks.

One is the third edition of "Electronic Circuits Discrete and Integrated" (936 pages), author Donald L. Schilling / Char ...

Portable LED Light Retrofit

592276 This is actually the lamp head of a foldable LED desk lamp. One day, I accidentally dropped the desk lamp on the ...

[Flower carving hands-on] Interesting and fun music visualization series of small projects (22) - LED infinite cube

I suddenly had the urge to do a series of topics on music visualization. This topic is a bit difficult and covers a wide ...

MOS tube selection problem

I want to use a SOT23 MOS tube to drive a 24V/180MA solenoid valve. The maximum power dissipation here is 2.5W, but 24*0 ...

Free simulation software SimulIDE version 1.1.0 download

SimulIDE is a free circuit simulation software that can simulate microcontrollers (8051, AVR, PIC, etc.) and common elec ...

STM32 Online Technology Day will start at 2 pm today [Send a new product development board worth 1,000 yuan] | Interpretation of multiple new product technologies and applications

The STM32 Online Technology Day will start at 2:00 pm today, with many new MCUs and MPUs! Including STM32H5, STM32U0, ST ...

Let you know several different power electric vehicle charging pile design solutions

With the transformation of the global energy structure and the improvement of environmental awareness, new energy veh ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode£º100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved ¾©B2-20211791 ¾©ICP±¸10001474ºÅ-1 µçÐÅÒµÎñÉóÅú[2006]×ÖµÚ258ºÅº¯ ¾©¹«Íø°²±¸ 11010802033920ºÅ
¿ìËٻظ´ ·µ»Ø¶¥²¿ Return list