Hi,
I am working with CodeWarrior v10.6 and of MQX v4.0. In my project there are there are 12 tasks running.
My project is under development,so each time even I am modifying a little bit in code within a single task then I need to download the whole code of all task in my tower kit. This is not good thing. It takes 49 to 50 secs to download code.
What I want to do is, I only want to erase and download that task which is modified??Is it possible??
I also go through CodeWarrior Common features guide, in which Program/verify features is there to put the task at some specific location as per my knowledge. But question is how I come to know that there is no other task lying within this rang?? How I come to know the starting and ending address of the multiple task?? How memory is allocated for the task??
How can I see what is the code size of each task?
I also attached Image to explain my query in detail.
Can anybody give me step by step solution to do this???
Please help me
Solved! Go to Solution.
Hi Utsavi Bharuchwala,
You are getting the unsupported attribute warning because your project is using the Freescale ARM compiler, not the ARM GCC compiler. You could use MQX 4.1 or 4.2, these versions use the ARM GCC compiler or you could take a look to the attached document that explains how to port Freescale ARM Compiler based Projects to use ARM GCC.
Regarding the target task, the task is only used to flash your application to the MCU or to erase the flash, it is not part of the application.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Utsavi Kalpesh Bharuchwala,
I'm afraid it is not possible to download just an specific task to the MCU, this is because the code inside the task or the task itself may end-up in a new flash address which will cause linking issues with the rest of the program,.
Regarding your question about the location and size of the tasks, you can find this information on the *.map file. Here is an example:
.text.Main_task
0x000006c8 0x24 ./Sources/main.o
0x000006c8 Main_task
Here you can see that the Main_task starts on the address 0x000006c8 and has a length of 0x24.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Carlos,
By seeing How to relocate memory library function using #pragma? I tried to write as per syntex of #pragma like #pragma CODE_SEG 0x0001 give in this discussion.But showing me error like:
" Multiple markers at this line
- illegal #pragma
- illegal section
definition "
how to write specific address in pragma syntex.
How to write specific code on specific address in code memory using #pragma??
Is there any other way to do this with pragma or without pragma??
Hi Utsavi Kalpesh Bharuchwala,
Please take a look to the following document.
Relocating Code and Data Using the CW GCC Linker File for Kinetis
It explains how to relocate code and data in Flash and RAM.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Carlos,
Thanks a lot for providing me information.
I tried to locate my function at specific ROM address by following the
steps from PDF you sent, but dont get any result as per desire and showing
me warning of "illegal or unsupported __attribute__". I dont know why it
is not working??
Here I have attached my linker file and snapshot of Task file as well as
my .MAP file.
My linker location is
"C:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\twrk60d100m\cw\intflash.lcf"
Please note that I also tried to put "#pragma location = 0x1000" before
Demo_Test() but showing me warning of "illegal pragma"
I also tried to put .org 0x0100 in __asm but cant help.
Can you please tell me what I need to do for this??
One more thing, you have sent me a video of Target Task but can you tell me
how to use this all features. I mean If i have created a target task then
how can I able to see the output?? Where I can see output like Task one
start from this address and all??
I have never done flash programming so It would be great if I get help.
Regards,
Utsavi Bharuchwala
On Wed, May 27, 2015 at 6:54 AM, Carlos_Mendoza <
Hi Utsavi Bharuchwala,
You are getting the unsupported attribute warning because your project is using the Freescale ARM compiler, not the ARM GCC compiler. You could use MQX 4.1 or 4.2, these versions use the ARM GCC compiler or you could take a look to the attached document that explains how to port Freescale ARM Compiler based Projects to use ARM GCC.
Regarding the target task, the task is only used to flash your application to the MCU or to erase the flash, it is not part of the application.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
I stuck at a point that I am writing:
my .c file contain:
main_task();
{
//my stuff
while(1)
{
Demo_Test();
Demo_Test1();
}
}
Demo_Test() //Placed this function in Specific Flash section (Linker file is attached with this mail that is creating particular section in Flash )
{
//my stuff ..
if( (WaterLevel > 6000) && ((WaterLevel < 8000) ) )
pritnf("Medium level-->> Green Color indication");
else if (WaterLevel > 8000)
pritnf("Medium level-->> Red Color indication");
//my stuff ..
}
Demo_Test1()
{
//my stuff
}
uptill now what i did:
1. Create Section in Linker file:
2. Create Target Task
3. Mass Erase of all Flash Block and Blank Check.
4. Program/verify (By, Use File From launch Config)
5. Execute Target Task.
Now, I am changing my Demo_Test() function like, (basically I am changing Reference Values and writing some other codes in Demo_Test funtion)
Demo_Test()
{
int a, b;
//my stuff ..
if( (WaterLevel > 4000) && ((WaterLevel < 7000) ) )
pritnf("Medium level-->> Green Color indication");
else if (WaterLevel > 7000)
pritnf("Medium level-->> Red Color indication");
else
printf("Under Level --> Yellow Color indication ");
//my stuff ..
}
As I have changed Demo_Test() function so .afx file changed and again I need to execute all function just because some variable values changed and extra stuff added in Demo_Test().
Instead of doing this I want to generate .afx of only Demo_Test() function and want to put this function ( using "Program/Verify" in target task ) in specific section I have created (starting from 0x00070000),
So by placing at correct address and executing only Demo_Test function I can run the whole code without executing main_task and Demo_Test1 functios .
I am stuck at how to generate .afx file of only Demo_test() function??
Regards,
Utsavi Bharuchwala
Hi Carlos,
Thanx for information.
The problem was due to edit in different linker file and use gcc compiler "__attribute__" instead of "__declspec".
I did it.
Thanx again.
Hi Carlos,
Thanks for the information.
Actually there is some concept I want to learn which I am writing below.
As you have mentioned that I am not able to download a single task,then
suppose in my code if I am changing or adding a single line in one of my
tasks then also I need to download the whole 12 tasks code right??
Actually I tried to follow Code Warrior Common Features Guide, in which
"Configure flash programmer target task" is written.
I tried to follow steps but cant get any output. Should I know what is the
meaning of that configuration?? What is the purpose of Erasing a flash
blocks?? What is the purpose of target task??
Can you please explain this??
I am attaching image of Kinetic Flash Programmer Task Image.
Again, thanks for providing me information.
Regards,
Utsavi Bharuchwala
On Tue, May 26, 2015 at 7:01 AM, Carlos_Mendoza <
Hi Utsavi Kalpesh Bharuchwala,
You are right, you need to download the 12 tasks to your MCU.
Regarding the target tasks, you can have the debugger flash the target using a target task (the flash programming target tasks are small application applets, which are downloaded to the target by the debugger). However, you can also perform flash programming as a standalone task (without the debugger).
Here is a description of the actions available when creating a target task:
Erase / Blank Check: Lets you add erase or blank check actions for flash devices.
Program / Verify: Lets you add program or verify flash actions for flash devices.
Checksum: Lets you add checksum actions for flash devices.
Diagnostics: Lets you add a diagnostics action to the actions table.
Dump Flash: Lets you dump a portion of the flash or the entire flash.
Protect/Unprotect: Lets you modify the protection of a sector.
Secure/Unsecure: Lets you add secure or unsecure actions.
Attached is a video that shows how to create a new target task in CodeWarrior, let me know if you run into any issue.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------