2326 views|1 replies

71

Posts

0

Resources
The OP
 

RISC-V MCU IDE MRS (MounRiver Studio) development: Setting the optimization level of the function [Copy link]

In the process of embedded development, sometimes in order to debug the code, we need to set a separate optimization level for a single function or multiple functions. The following takes RISC-V MCU IDE MounRiver Studio (MRS) as an example to introduce two methods of adding function optimization levels:

1.__attribute__((optimize(“string”)))

Applicable to setting the optimization level for a single function. Usage: Add it when declaring the function. Note that when using this method, the declaration and definition code of the target function must be separated, otherwise it will cause compilation errors.

2.#pragma GCC optimize (“string”)

Applicable to setting optimization levels for multiple functions . Usage : Add before the function definition . All functions after this statement will use the optimization level specified by this statement.

This post is from MCU

Latest reply

Very detailed, thanks for sharing!   Details Published on 2021-12-13 15:50
 

7422

Posts

2

Resources
2
 

Very detailed, thanks for sharing!

This post is from MCU
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
One week's evaluation information, delivered on time!

Hello, everyone~ My computer crashed this weekend, and I finally fixed it before Monday. ε=(ο`*))) Alas~ But because ...

Relationship between PN conduction voltage drop and current and temperature

*) , the E junction is affected by temperature, and the change in on-state voltage drop is related to Is and Ic The cond ...

[Development and application based on NUCLEO-F746ZG motor] 12. Parameter configuration - timer TIM1 configuration

In the process of controlling the servo motor, in order to make the motor rotate as you want, PWM output control must b ...

【i.MX6ULL】Driver Development 7——Key Input Capture

This post was last edited by DDZZ669 on 2021-11-9 00:04 In the previous articles, we have gradually learned about the ...

【Topmicro Intelligent Display Module】V. Interact with the screen via the network

This post was last edited by Digital Leaf on 2021-11-21 13:31 Topmicro intelligent display module supports network func ...

Embedded Qt-Realize switching between two windows

In the previous article, we introduced how to use Qt program to realize a clock and a stopwatch. In this article, we w ...

Help the national competition, read good books for free! The basic knowledge that must be mastered in preparation for the national competition is in these books~

Attention! To help the national competition, EEWorld is giving away good books for free! The basic knowledge you must ma ...

How to measure current during the SOC chip verification phase?

I used to work on ARM projects such as Rockchip and Xilinx. These solutions were all reference solutions provided by chi ...

Tesla's inventory backlog is revealed: the parking lot is full of new cars, which can be seen from space!

I just saw a piece of news saying that Tesla has a serious inventory backlog. Below are the details. What do you think a ...

Does anyone know the error problem of Pspice for ti?

I want to simulate TI's power supply, but the following error is reported. I can't find it online. Has anyone used TI's ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list