FreeRTOS for microBlaze

Hi,
I follow the instructions: http://www.freertos.org/Free-RTOS-for-Xilinx-MicroBlaze-on-Spartan-6-FPGA.html. But an error occurred: Importing the demo application project into the SDK Eclipse workspace

Can you help me?
God bless for you,
Mr.Blue

FreeRTOS for microBlaze

link picture: http://s1081.beta.photobucket.com/user/hoang_tu_du_muc29/media/11_zps603e92bb.jpg.html?sort=3&o=0
Thank you.

FreeRTOS for microBlaze

Please post the errors that are generated, rather than a picture of the IDE.  Just cut and paste them in.  Thanks. Regards.

FreeRTOS for microBlaze

Hi Regards,
There are many such errors
../main-blinky.c:355: error: ‘XPAR_LEDS_4BITS_DEVICE_ID’ undeclared (first use in this function)
this is the first time I used the SDK, limited knowledge, would you sympathize?
God bless for you,
Mr.Blue

FreeRTOS for microBlaze

That looks like a header file is not found, but unless you post the errors as already requested nobody will know. Is there a messages saying “can’t open header file”?

FreeRTOS for microBlaze

Hi edwards3,
in the Console (SDK):
**** Build of configuration Blilnky for project RTOSDemo **** make all
Building file: ../main-blinky.c
Invoking: MicroBlaze gcc compiler
mb-gcc -Wall -O0 -g3 -I”C:UsersVuong ManhDesktopFreeRTOSV7.3.0FreeRTOSV7.3.0FreeRTOSDemoMicroBlaze_Spartan-6_EthernetLiteSDKProjectsRTOSDemo” -I”C:UsersVuong ManhDesktopFreeRTOSV7.3.0FreeRTOSV7.3.0FreeRTOSDemoMicroBlaze_Spartan-6_EthernetLiteSDKProjectsRTOSDemolwIPnetifinclude” -I”C:UsersVuong ManhDesktopFreeRTOSV7.3.0FreeRTOSV7.3.0FreeRTOSDemoMicroBlaze_Spartan-6_EthernetLiteSDKProjectsRTOSDemolwIPinclude” -I”C:UsersVuong ManhDesktopFreeRTOSV7.3.0FreeRTOSV7.3.0FreeRTOSDemoMicroBlaze_Spartan-6_EthernetLiteSDKProjectsRTOSDemolwIPlwIP_Appsappshttpserver_raw” -I”C:UsersVuong ManhDesktopFreeRTOSV7.3.0FreeRTOSV7.3.0FreeRTOSDemoMicroBlaze_Spartan-6_EthernetLiteSDKProjectsRTOSDemolwIPlwIP_Apps” -I”C:UsersVuong ManhDesktopFreeRTOSV7.3.0FreeRTOSV7.3.0FreeRTOSDemoMicroBlaze_Spartan-6_EthernetLiteSDKProjectsRTOSDemolwIPincludeipv4″ -I”C:UsersVuong ManhDesktopFreeRTOSV7.3.0FreeRTOSV7.3.0FreeRTOSDemoMicroBlaze_Spartan-6_EthernetLiteSDKProjectsRTOSDemoDemo_Sourceinclude” -I”C:UsersVuong ManhDesktopFreeRTOSV7.3.0FreeRTOSV7.3.0FreeRTOSDemoMicroBlaze_Spartan-6_EthernetLiteSDKProjectsRTOSDemoFreeRTOS_Sourceinclude” -I”C:UsersVuong ManhDesktopFreeRTOSV7.3.0FreeRTOSV7.3.0FreeRTOSDemoMicroBlaze_Spartan-6_EthernetLiteSDKProjectsRTOSDemoFreeRTOS_SourceportableGCCMicroBlazeV8″ -c -fmessage-length=0 -I../../StandAloneBSP/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-div -mcpu=v8.10.a -mno-xl-soft-mul -mhard-float -MMD -MP -MF”main-blinky.d” -MT”main-blinky.d” -o”main-blinky.o” “../main-blinky.c”
In file included from C:/Users/Vuong Manh/Desktop/FreeRTOSV7.3.0/FreeRTOSV7.3.0/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOS_Source/include/FreeRTOS.h:82,
                 from ../main-blinky.c:120:
C:/Users/Vuong Manh/Desktop/FreeRTOSV7.3.0/FreeRTOSV7.3.0/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOSConfig.h:76:2: error: #error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
In file included from C:/Users/Vuong Manh/Desktop/FreeRTOSV7.3.0/FreeRTOSV7.3.0/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOS_Source/include/portable.h:322,
                 from C:/Users/Vuong Manh/Desktop/FreeRTOSV7.3.0/FreeRTOSV7.3.0/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOS_Source/include/FreeRTOS.h:91,
                 from ../main-blinky.c:120:
C:/Users/Vuong Manh/Desktop/FreeRTOSV7.3.0/FreeRTOSV7.3.0/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOS_Source/portable/GCC/MicroBlazeV8/portmacro.h:77:26: warning: mb_interface.h: No such file or directory
C:/Users/Vuong Manh/Desktop/FreeRTOSV7.3.0/FreeRTOSV7.3.0/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOS_Source/portable/GCC/MicroBlazeV8/portmacro.h:78:25: warning: xparameters.h: No such file or directory
In file included from C:/Users/Vuong Manh/Desktop/FreeRTOSV7.3.0/FreeRTOSV7.3.0/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOS_Source/include/portable.h:322,
                 from C:/Users/Vuong Manh/Desktop/FreeRTOSV7.3.0/FreeRTOSV7.3.0/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOS_Source/include/FreeRTOS.h:91,
                 from ../main-blinky.c:120:
C:/Users/Vuong Manh/Desktop/FreeRTOSV7.3.0/FreeRTOSV7.3.0/FreeRTOS/Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemo/FreeRTOS_Source/portable/GCC/MicroBlazeV8/portmacro.h:263: error: expected declaration specifiers or ‘…’ before ‘XInterruptHandler’
../main-blinky.c:126:21: error: xtmrctr.h: No such file or directory
../main-blinky.c:127:19: error: xgpio.h: No such file or directory
../main-blinky.c:194: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘xTimer0Instance’
../main-blinky.c:195: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘xOutputGPIOInstance’
../main-blinky.c: In function ‘vLEDTimerCallback’:
../main-blinky.c:259: warning: implicit declaration of function ‘XGpio_DiscreteWrite’
../main-blinky.c:259: error: ‘xOutputGPIOInstance’ undeclared (first use in this function)
../main-blinky.c:259: error: (Each undeclared identifier is reported only once
../main-blinky.c:259: error: for each function it appears in.)
../main-blinky.c: In function ‘prvButtonInputInterruptHandler’:
../main-blinky.c:272: error: ‘xOutputGPIOInstance’ undeclared (first use in this function)
../main-blinky.c:279: warning: implicit declaration of function ‘XGpio_InterruptClear’
../main-blinky.c:279: error: ‘xInputGPIOInstance’ undeclared (first use in this function)
../main-blinky.c: In function ‘prvQueueReceiveTask’:
../main-blinky.c:343: error: ‘xOutputGPIOInstance’ undeclared (first use in this function)
../main-blinky.c: In function ‘prvSetupHardware’:
../main-blinky.c:355: warning: implicit declaration of function ‘XGpio_Initialize’
../main-blinky.c:355: error: ‘xOutputGPIOInstance’ undeclared (first use in this function)
../main-blinky.c:355: error: ‘XPAR_LEDS_4BITS_DEVICE_ID’ undeclared (first use in this function)
../main-blinky.c:356: error: ‘XST_SUCCESS’ undeclared (first use in this function)
../main-blinky.c:359: warning: implicit declaration of function ‘XGpio_SetDataDirection’
../main-blinky.c:369: error: ‘xInputGPIOInstance’ undeclared (first use in this function)
../main-blinky.c:369: error: ‘XPAR_PUSH_BUTTONS_4BITS_DEVICE_ID’ undeclared (first use in this function)
../main-blinky.c:377: error: ‘XPAR_MICROBLAZE_0_INTC_PUSH_BUTTONS_4BITS_IP2INTC_IRPT_INTR’ undeclared (first use in this function)
../main-blinky.c:377: error: too many arguments to function ‘xPortInstallInterruptHandler’
../main-blinky.c:390: warning: implicit declaration of function ‘XGpio_InterruptEnable’
../main-blinky.c:391: warning: implicit declaration of function ‘XGpio_InterruptGlobalEnable’
../main-blinky.c: In function ‘vApplicationSetupTimerInterrupt’:
../main-blinky.c:480: error: ‘XPAR_AXI_TIMER_0_CLOCK_FREQ_HZ’ undeclared (first use in this function)
../main-blinky.c:484: warning: implicit declaration of function ‘XTmrCtr_Initialize’
../main-blinky.c:484: error: ‘xTimer0Instance’ undeclared (first use in this function)
../main-blinky.c:484: error: ‘XPAR_AXI_TIMER_0_DEVICE_ID’ undeclared (first use in this function)
../main-blinky.c:486: error: ‘XST_SUCCESS’ undeclared (first use in this function)
../main-blinky.c:491: error: ‘XPAR_INTC_0_TMRCTR_0_VEC_ID’ undeclared (first use in this function)
../main-blinky.c:491: error: too many arguments to function ‘xPortInstallInterruptHandler’
../main-blinky.c:502: warning: implicit declaration of function ‘XTmrCtr_SetHandler’
../main-blinky.c:505: warning: implicit declaration of function ‘XTmrCtr_SetResetValue’
../main-blinky.c:511: warning: implicit declaration of function ‘XTmrCtr_SetOptions’
../main-blinky.c:511: error: ‘XTC_INT_MODE_OPTION’ undeclared (first use in this function)
../main-blinky.c:511: error: ‘XTC_AUTO_RELOAD_OPTION’ undeclared (first use in this function)
../main-blinky.c:511: error: ‘XTC_DOWN_COUNT_OPTION’ undeclared (first use in this function)
../main-blinky.c:514: warning: implicit declaration of function ‘XTmrCtr_Start’
../main-blinky.c: In function ‘vApplicationClearTimerInterrupt’:
../main-blinky.c:536: warning: implicit declaration of function ‘XTmrCtr_GetControlStatusReg’
../main-blinky.c:536: error: ‘XPAR_AXI_TIMER_0_BASEADDR’ undeclared (first use in this function)
../main-blinky.c:537: warning: implicit declaration of function ‘XTmrCtr_SetControlStatusReg’
make: ***  Error 1 I think the error in the SDK.
FreeRTOS V7.3.0 folder, I do not edit anything
Thanks
Mr.Blue

FreeRTOS for microBlaze

Well the first error is this:
FreeRTOSConfig.h:76:2: error: #error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
Have you executed the batch file?  If so, you need to remove the #error statement. Then you have:
warning: mb_interface.h: No such file or directory
and
portmacro.h:78:25: warning: xparameters.h: No such file or directory
which account for the most of if not all the rest of the warnings.  The two missing header files are part of the Xilinx configuration. Regards.

FreeRTOS for microBlaze

Hi,
I executed the batch file.
How do i can to fix all error?
with error:
../main-blinky.c:194: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘xTimer0Instance’
I need help from you! Thanks
God bless for you,
Mr.Blue

FreeRTOS for microBlaze

I presume xTimer0Instance is a variable, and the type of the variable is defined in one of the many header files that the error output says cannot be found. You need to fix the errors relating to missing header files before doing anything.

FreeRTOS for microBlaze

Hi davedoors,
I think the header file in FreeRTOS7.3.0.zip.
What can I do to retrieve the header file.
Regards,
Mr.Blue

FreeRTOS for microBlaze

Unzipping the files and doing a directory search shows the files are not in the zip file.  The files describe the hardware on which you are going to run the code.  This is necessary because the hardware is configurable.  First you generate the hardware, the generation process outputs header files that describe the hardware to the software, the software includes the header files to access the hardware. The web page you link to says
There are two ways of using FreeRTOS in the Xilinx SDK environment
then describes
Using a stand-alone BSP
and
Using a FreeRTOS BSP
.  These are the two methods that link the software project to the hardware description. Regards.

FreeRTOS for microBlaze

Hi
excuse me, in the main-blinky.c:
# define mainTASK_CONTROLLED_LED 0x01UL
What is 0x01UL
Thanks,
Mr.Blue

FreeRTOS for microBlaze

If you look where the constant is used:
if( ( ucGPIOState & mainTASK_CONTROLLED_LED ) != 0 )
{
    ucGPIOState &= ~mainTASK_CONTROLLED_LED;
}
else
{
   ucGPIOState |= mainTASK_CONTROLLED_LED;
}
XGpio_DiscreteWrite( &xOutputGPIOInstance, ulGPIOOutputChannel, ucGPIOState );
you will see it is used to set and clear a general purpose IO bit that is then written out each time data is received form the queue.  The comments at the top of the file, which describe the functionality of the demo, tells you this is toggling an LED. Regards.

FreeRTOS for microBlaze

Hi
Difficult.I can not learn. : (
Regards