We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我的定义如下: void func(int i, char ch, char *str) { printf("input int: %d, char: %c, string: %s\r\n", i, ch, str); }
SHELL_CommandTypeDef test = { "test", func, "test com", "test help" }; SHELL_EXPORT_CMD(func, func, test); 但是报错:Error section attribute cannot be specified for local variables
The text was updated successfully, but these errors were encountered:
尝试一下 SHELL_CommandTypeDef test = { "test", (int (*)())func, "test com", "test help" };
Sorry, something went wrong.
已解决,非常感谢
No branches or pull requests
我的定义如下:
void func(int i, char ch, char *str)
{
printf("input int: %d, char: %c, string: %s\r\n", i, ch, str);
}
SHELL_CommandTypeDef test = {
"test",
func,
"test com",
"test help"
};
SHELL_EXPORT_CMD(func, func, test);
但是报错:Error section attribute cannot be specified for local variables
The text was updated successfully, but these errors were encountered: