FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2013 Threads] Porting FreeRTOS on ML605Posted by roberto-plus on December 9, 2013 Hi guys,
I have a project with soft core Microblaze and I would like to use FreeRTOS on it.
I'm using a specific Hardware and BSP.
I tried to add the follow sources files FreeRTOS into project:
-list.c
-queue.c
-task.c
-timers.c
and heap3.c
Then, I added (then to execute reateProjectDirectoryStructure.bat) the follow paths into my include path:
MicroBlazeSpartan-6EthernetLiteSDKProjectsRTOSDemoFreeRTOSSourceinclude
MicroBlazeSpartan-6EthernetLiteSDKProjectsRTOSDemoFreeRTOSSourceportableGCCMicroBlazeV8
In include path i putted also the FreeRTOSConfig.h.
I included these paths in all configuration and languages.
When i try to compile i have the follow erros:
C:/R/MicroBlazeSpartan-6EthernetLite/SDKProjects/RTOSDemo/FreeRTOSSource/include/FreeRTOSConfig.h:73:2: error: #error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
make: *** [src/heap_3.o] Error 1
Are there other steps that I have to do?
Thanks.
Porting FreeRTOS on ML605Posted by roberto-plus on December 9, 2013 ok I removed the error line in FreeRTOSConfig.h but I have a lot of errors in FreeRTOS c files.
Porting FreeRTOS on ML605Posted by davedoors on December 9, 2013 If you can't clear the errors post the output generated by the compiler.
Porting FreeRTOS on ML605Posted by roberto-plus on December 9, 2013 No, I can't.
The output is here https://gist.github.com/anonymous/7872068
And I have posted also an image with the directory structure.
Thanks for answare.
Attachmentssnapshot.bmp (3148854 bytes)
Porting FreeRTOS on ML605Posted by davedoors on December 9, 2013 Looks like you didn't include port.c in your build. freertos/source/portable/gcc/[chip]/port.c.
Porting FreeRTOS on ML605Posted by roberto-plus on December 9, 2013 Yes, I did.
I included all the follow directory
MicroBlazeSpartan-6EthernetLiteSDKProjectsRTOSDemoFreeRTOS_Source
portableGCCMicroBlazeV8
Porting FreeRTOS on ML605Posted by roberto-plus on December 9, 2013
Porting FreeRTOS on ML605Posted by rtel on December 9, 2013 Is the image you posted a clean build? If so, it does not appear to be building port.c as already mentioned, so I'm not sure what else I can add.
If that is not a clean build please post an image of a clean build so we can see port.c too. If it is a clean build, then please ensure port.c is getting built as you expect it to be, then post the errors that are generated once you are 100% sure it is being built.
Regards.
Porting FreeRTOS on ML605Posted by roberto-plus on December 9, 2013 Sorry, I don't understand where I must put port.c.
I inculded path in "Includes" (in path and symbols) and now I included port.c also in src.
Where is my fault?
Here there is a build.
https://gist.github.com/anonymous/7874243
Thanks a lot
Attachmentssnapshot2.bmp (228202 bytes)
Porting FreeRTOS on ML605Posted by rtel on December 9, 2013 That looks better. See my comments below:
C:RworkspaceDaUDPaRTOSlwipechoserver0Debug/../src/heap3.c:105: undefined
reference to `vApplicationMallocFailedHook'
This is complaining that you have configUSEMALLOCFAILED_HOOK set to 1 in FreeRTOSConfig.h, but have not defined a function called vApplicationMallocFailedHook() in your code.
http://www.freertos.org/a00016.html
./src/port.o: In function xPortStartScheduler':
C:\R\workspace\DaUDPaRTOS\lwip_echo_server_0\Debug/../src/port.c:277: undefined reference
to vApplicationSetupTimerInterrupt'
Search for vApplicationSetupTimerInterrupt() on the documentation page for your port:
http://www.freertos.org/Free-RTOS-for-Xilinx-MicroBlaze-on-Spartan-6-FPGA.html
C:RworkspaceDaUDPaRTOSlwipechoserver_0Debug/../src/port.c:288: undefined reference
to `vPortStartFirstTask'
vPortStartFirstTask() is defined in port.S, which is in the same directory and port.c, and must also be included in your build.
./src/port.o: In function vPortYield':
C:\R\workspace\DaUDPaRTOS\lwip_echo_server_0\Debug/../src/port.c:315: undefined reference
to VPortYieldASM'
vPortYieldASM is also in Port.S
./src/port.o: In function vPortTickISR':
C:\R\workspace\DaUDPaRTOS\lwip_echo_server_0\Debug/../src/port.c:424: undefined reference
to vApplicationClearTimerInterrupt'
Refer to port documentation page - link provided already above.
./src/port.o: In function prvInitialiseInterruptController':
C:\R\workspace\DaUDPaRTOS\lwip_echo_server_0\Debug/../src/port.c:447: undefined reference
to vPortExceptionsInstallHandlers'
Refer to port documentation page - link provided already above.
./src/tasks.o: In function vTaskStartScheduler':
C:\R\workspace\DaUDPaRTOS\lwip_echo_server_0\Debug/../src/tasks.c:1239: undefined
reference to vMainConfigureTimerForRunTimeStats'
./src/tasks.o: In function uxTaskGetSystemState':
C:\R\workspace\DaUDPaRTOS\lwip_echo_server_0\Debug/../src/tasks.c:1510: undefined
reference to ulMainGetRunTimeCounterValue'
./src/tasks.o: In function xTaskIncrementTick':
C:\R\workspace\DaUDPaRTOS\lwip_echo_server_0\Debug/../src/tasks.c:1683: undefined
reference to ulMainGetRunTimeCounterValue'
These three are complaining that you have your FreeRTOSConfig.h header file set to use run time stats gathering, but have not provided the kernel with the source of the run time counter.
http://www.freertos.org/rtos-run-time-stats.html
./src/tasks.o: In function vTaskSwitchContext':
C:\R\workspace\DaUDPaRTOS\lwip_echo_server_0\Debug/../src/tasks.c:1842: undefined
reference to vApplicationStackOverflowHook'
This is complaining that you have configCHECKFORSTACK_OVERFLOW set to a non-zero value, but you have not provided the vApplicationStackOverflowHook() function.
http://www.freertos.org/Stacks-and-stack-overflow-checking.html
C:RworkspaceDaUDPaRTOSlwipechoserver_0Debug/../src/tasks.c:2088: undefined
reference to `vApplicationIdleHook'
This is complaining that you have configUSEIDLEHOOK set to a non-zero value in FreeRTOSConfig.h, but have not provided the vApplicationIdleHook() function - see the same link already provided somewhere above to the kernel hook functions documentation page.
A lot of these look like you have taken a FreeRTOSConfig.h header file from an application that defined quite a rich set of functionality, but your current application does not currently provide the same hooks into that functionality.
Regards.
Porting FreeRTOS on ML605Posted by roberto-plus on December 10, 2013 Thanks a lot.
I cleaned errors outputs. Now the error is one and it refers to interrupthendler.
It says there is a multiple definition of `interrupthandler'.
In fact There are two errors in the project, one in portasm.c and one in BSP-->libsrcstandalonev301a-->src-->microblazeinterrupthandler.c
C:RworkspaceDaUDPaRTOSlwipechoserverbsp0microblaze0libsrcstandalonev301asrc/microblazeinterrupthandler.c:79: multiple definition of `interrupthandler'
./src/portasm.o:C:RworkspaceDaUDPaRTOSlwipechoserver0Debug/../src/portasm.S:272: first defined here
c:xilinx13.2isedsedkgnumicroblazentbin..libgccmicroblaze-xilinx-elf4.1.2........microblaze-xilinx-elfbinld.exe: Disabling relaxation: it will not work with multiple definitions
collect2: ld returned 1 exit status
make: *** [lwipechoserver_0.elf] Error 1
What can I do?
Regards.
Porting FreeRTOS on ML605Posted by rtel on December 10, 2013 You need to use the one defined in port.S - so presumably need to exclude the file that contains the other implementation from the build - but check what the official demo project does in this respect.
Regards.
Porting FreeRTOS on ML605Posted by roberto-plus on December 11, 2013 sorry, maybe I resolved some error.
Now, only the port.c has error.
The error is show below.
C:RworkspaceDaUDPaRTOSlwipechoserver0Debug/../src/port.c:284: undefined reference to vPortStartFirstTask'
./src/port.o: In function vPortYield':
C:RworkspaceDaUDPaRTOSlwipechoserver0Debug/../src/port.c:311: undefined reference to `VPortYieldASM'
collect2: ld returned 1 exit status
make: *** [lwipechoserver_0.elf] Error 1
What can I do?
Sorry I'm e new user and I don't Know how I can resolve alone.
Thanks
Porting FreeRTOS on ML605Posted by rtel on December 11, 2013 Both these functions are defined in port.S - are you building port.S?
Regards.
Porting FreeRTOS on ML605Posted by roberto-plus on December 12, 2013 No, I don't have this file. I searched into previous (correct) projects but it is missing.
In all project I've only portasm.S
Regards
Porting FreeRTOS on ML605Posted by rtel on December 12, 2013 Sorry - I meant portasm.S. Have you included that file. If you look in the file you will see it implements the functions the linker is complaining are missing.
Regards.
Porting FreeRTOS on ML605Posted by roberto-plus on December 12, 2013 Yes, I included portasm.S and I find the implementation as above:
.text
.align 2
vPortStartFirstTask:
portRESTORE_CONTEXT
You can see my portasm.S at link above:
https://gist.github.com/anonymous/7925419
Regards.
Porting FreeRTOS on ML605Posted by roberto-plus on December 13, 2013 Sorry, I think that I resolved somethings.
Now i have only a problem with interrupthendler, because maybe both portasm.c and microblazeinterrupt_hendler.c want to handle interrupt.
Is it correct?
How can i resolve?
C:RworkspacePORTRTOS2lwipechoserverbsp0microblaze0libsrcstandalonev301asrc/microblazeinterrupthandler.c:79: multiple definition of `interrupthandler'
./src/portasm.o:C:RworkspacePORTRTOS2lwipechoserver0Debug/../src/portasm.S:272: first defined here
c:xilinx13.2isedsedkgnumicroblazentbin..libgccmicroblaze-xilinx-elf4.1.2........microblaze-xilinx-elfbinld.exe: Disabling relaxation: it will not work with multiple definitions
collect2: ld returned 1 exit status
make: *** [lwipechoserver_0.elf] Error 1
Regards
regards
Porting FreeRTOS on ML605Posted by rtel on December 13, 2013 Circle back in the thread - you have already asked this and it has already been answered
http://sourceforge.net/p/freertos/discussion/382005/thread/57a9ea8f/#f754
Regards.
Porting FreeRTOS on ML605Posted by roberto-plus on December 13, 2013 Sorry, I can't understand.
In a correct project I see that in a portasm.S the handler of interrupt is MICROBLAZE, because in above line configINTERRUPTCONTROLLERTOUSE is a deviceID of Microblaze
/* The parameter to the interrupt handler. */
ori r5, r0, configINTERRUPTCONTROLLERTOUSE
so the different with this project is in platform_config.h that is not blank but contains the above lines.
define PLATFORMEMACBASEADDR XPARETHERNETLITE_BASEADDR
define PLATFORMTIMERBASEADDR XPARAXITIMER0BASEADDR
define PLATFORMTIMERINTERRUPTINTR XPARMICROBLAZE0INTCAXITIMER0INTERRUPT_INTR
define PLATFORMTIMERINTERRUPTMASK (1 << XPARMICROBLAZE0INTCAXITIMER0INTERRUPT_INTR)
so the error is with timer_interrupt
You can see my portasm.S at :
https://gist.github.com/anonymous/7946037
I have this file microblazeinterrupthandler.c that contains a
void interrupt_handler (void) __attribute ((interrupt_handler));
but I don't know how to risolve.
If you prefer i can attach enteire preject :)
Regards
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|