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] [May 2011 Threads] The same example doesn't work on diff CW verPosted by Mohamed Shedeed on May 22, 2011 Hello,
I'm Using the freeRTOS V.7.0.1, and have updated the LED Demo example which works under "HCS12_CodeWarrior_banked".
Here is the updated main:
xTaskCreate( myTask1, "LED1", configMINIMAL_STACK_SIZE, NULL, 1, NULL ); xTaskCreate( myTask2, "LED2", configMINIMAL_STACK_SIZE, NULL, 1, NULL ); xTaskCreate( myTask3, "LED3", configMINIMAL_STACK_SIZE, NULL, 1, NULL ); xTaskCreate( myTask4, "LED4", configMINIMAL_STACK_SIZE, NULL, 1, NULL );
/* Must be the last demo created. */ vCreateSuicidalTasks( mainDEATH_PRIORITY );
/* All the tasks have been created - start the scheduler. */ vTaskStartScheduler();
And each Task is simply implemented as:
static void myTask1( void *pvParameters ) { for( ;; ) { //My Code } }
The problem here that I can run this example using CodeWarrior V 4.5, but it I can't do that using CodeWarrior V 4.6 or 4.7...
The OS sucks at only one task and there is no switching between the tasks...
Could anyone have an explanation for that?
RE: The same example doesn't work on diff CW verPosted by Richard on May 22, 2011 Sorry - I have only tested the provided examples with one version of the CodeWarrier tools. However, one thing from memory is, if you are using the Processor Expert to generate "beans", then these can auto generate code that overwrites manually edited drivers (in exactly the way nobody would ever want them to). That meant that the code that implements the tick interrupt handler can get overwritten, and therefore break the tick handler code. The only way I found around the problem was to make the .c file in which the tick interrupt was defined read only - thus preventing the dumb code generator overwriting my code without warning. Is it possible that could be happening to you?
Regards.
RE: The same example doesn't work on diff CW verPosted by Mohamed Shedeed on May 23, 2011 I have re-generated the code from PE and the problem is persist. So, what do you suggest to change before generating the code?
RE: The same example doesn't work on diff CW verPosted by Richard on May 23, 2011 It is generating the code from PE that causes the problem. It is fine to generate the code originally, but then you have to edit it to get the saving and restoring of the context correct. If you then keep the project connected to PE, the modifications get overwritten. At least, that is how it used to work.
Take a look at a clean download of the port/demo. In that port, find the file that contains the tick interrupt handler, and see the modifications that have been made. Then ensure the same mods, or an unmodified file (not overwritten by PE) is used. Ideally, take the existing unmodified demo from the download, and just never connect it to PE, but that might not be possible if you are updating the version of CodeWarrier used.
Sorry not to be more specific, but right now I am just working from memory and don't have the project in front of me.
Regards.
RE: The same example doesn't work on diff CW verPosted by Mohamed Shedeed on May 24, 2011 I used the unmodified demo and the PE is frozen, but the same problem is persist. there is only one task was running. So, do think I should modify something in the linker script or the PRM file,...? “but that might not be possible if you are updating the version of CodeWarrier used. ” Why?! thanks
RE: The same example doesn't work on diff CW verPosted by Mohamed Shedeed on May 26, 2011 So, anyone have a proposal?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|