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] [July 2011 Threads] V7.01 task create problemPosted by skidev on July 27, 2011 New processor, new environment, and a new version of FreeRTOS...
Using an LPCXpresso LPC1769 with the Code Red LPCXpresso 4 gcc compiler and CMSISv2p00. Compiled (clean) the Example01 project modified to use the new CMSIS and FreeRTOS ports. When running, only Task 1 is created; Task 2 never sees the light of day. Pushing into vTaskCreate for Task 2, it seems neither sufficient heap or stack space can be created... odd.
Old version (older gcc, v6.01 of FreeRTOS worked fine. Any clues to what to investigate?
Thanks,
Mike
RE: V7.01 task create problemPosted by skidev on July 27, 2011 To be more specific, it's Example01 from the FreeRTOS book, creating 2 tasks that merely advertise their presence. The only includes and libraries referenced are from the latest CMSISv2p00_LPC17xx and FreeRTOS libraries (CMSIS first in the paths) fresh from ARM and Richard.
Mike
RE: V7.01 task create problemPosted by Richard on July 27, 2011 What does the second call to xTaskCreate() return? Have you installed the FreeRTOS interrupt handlers? What happens when you step into the second call to xTaskCreate(). How far does it get?
Regards.
RE: V7.01 task create problemPosted by skidev on July 27, 2011 Hi Richard,
The second xTaskCreate() call returns -1.
Not sure about the interrupt handlers; I installed all the FreeRTOS v7.01 code for the Source and portable ARM_CM3_MPU code - the library builds fine
The second xTaskCreate runs all the way through, but neither the stack or heap create succeeded due to inability to allocate space.
Regards,
Mike
RE: V7.01 task create problemPosted by Richard on July 27, 2011 I have to assume you have set the heap size large enough to create both tasks - if you are running the book code unmodified it will be. In which case, my guess is that the start up code is not correctly initialising the variables, so variables are starting with random values, and hence the memory allocation is failing. You will have to step through the code, where the failure to allocate memory occurs, and find the reason - i.e. is there genuinely no memory, or does a variable contain a bum value, or maybe even the flash memory has not been programmed correctly.
Regards.
RE: V7.01 task create problemPosted by skidev on July 29, 2011 I rebuilt the Example01 by creating a FreeRTOS project with the LPCXpresso 4 tools, and tweaking the demo main.c to provide the same task function.
Inserting printfs (using Code Red consoleprint.c), the default min stack size of 80 allows 21 iterations of the scheduler loop before regurgitating an error at iteration 21. A fresh minimum of 100 seems to do the trick, has run for a day+ with no errors.
Moving on... thanks for the suggestions.
Mike
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|