简体   繁体   English

使用WinAVR在atmega2560上使用freeRTOS编译Megablink演示时出错

[英]Error during compile of Megablink demo using freeRTOS for atmega2560 using WinAVR

The following RTOS .c files compile fine during 'make': 下列RTOS .c文件在“ make”期间可以正常编译:

task.c, queue.c, tasks.c, croutines.c, list.c

Then I get the following error: 然后我得到以下错误:

serial.c: In function 'xSerialPortReInit' serial.c:在函数“ xSerialPortReInit”中

serial.c: 665:error: 'ulWantedBaud' undeclared (first use in this function) serial.c:665:错误:未声明“ ulWantedBaud”(此功能中的首次使用)

serial.c: 665:error: (Each undeclared identifier is reported only once for each function it appears in) serial.c:665:错误:(每个未声明的标识符仅针对其出现的每个功能报告一次)

make: ***[serial.o]Error 1 制作:*** [serial.o]错误1


I have checked that all include files identified in serial.c are available 我检查了serial.c中标识的所有包含文件是否可用

Why do you think it is an include file problem? 您为什么认为这是一个包含文件问题? ulWantedBaud is more likely to be a function parameter, or file scope variable, that is misspelled. ulWantedBaud更有可能是错误拼写的函数参数或文件范围变量。 The AVR demo in the official FreeRTOS download (whic is very old and probably not the best reference) contains a serial port init function with such a parameter, although not a re-init function as per your post: FreeRTOS官方下载中的AVR演示(这是非常古老的,可能不是最佳参考)包含带有此类参数的串行端口初始化函数,尽管不是按照您的帖子所述的重新初始化函数:

xComPortHandle xSerialPortInitMinimal( uint32_t ulWantedBaud, uint8_t uxQueueLength ); xComPortHandle xSerialPortInitMinimal(uint32_t ulWantedBaud,uint8_t uxQueueLength);

(This snippet is from http://www.freertos.org/a00098.html ) (此代码段来自http://www.freertos.org/a00098.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM