In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to optimize and troubleshoot FreeRTOS". In daily operation, I believe many people have doubts about how to optimize and troubleshoot FreeRTOS. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to optimize and troubleshoot FreeRTOS". Next, please follow the editor to study!
Write at the front
The main purpose is to point out the problems that beginners usually encounter for users who are new to FreeRTOS. Here the main space is put on stack overflow and stack overflow j detection, because stack-related problems are the most common problems encountered by beginners.
Printf-stdarg.c
Stack space usage may rise sharply when calling functions from the C standard library, especially IO and string processing functions such as sprintf (), printf (), and so on. There is a file called printf-stdarg.c in the FreeRTOS source package. This file implements a stack efficiency-optimized version of mini sprintf (), printf (), which can be used to replace the standard C library function version. In most cases, this makes the task of calling sprintf () and related functions much less demanding for stack space. Many people may not know that there is such a file in freertos, which is placed in third-party materials with the path "FreeRTOSv9.0.0\ FreeRTOS-Plus\ Demo\ FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC". When we publish the project, we do not have to rely on the C standard library, so we can reduce the use of stack and optimize a lot of space. The file source code (part):
Static int print (char * * out, const char * format, va_list args) {register int width, pad; register int pc = 0; char scr [2]; for (; * format! = 0; + + format) {if (* format = ='%') {+ + format; width = pad = 0 If (* format = ='\ 0') break; if (* format = ='%') goto out; if (* format = ='-') {+ + format; pad = PAD_RIGHT } while (* format = ='0') {+ + format; pad | = PAD_ZERO;} for (; * format > ='0' & & * format
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.