When using MQX 3.8 to create a partition with _partition_create_at, a few issues appear to be present:
Both of the issues appear to be the result of the following:
Here are a couple questions that the documentation doesn't clarify:
The only example I could find within MQX was in mqx\examples\benchmrk\timing\test.c which uses magic numbers when calling the function.
已解决! 转到解答。
Here is the response from Freescale Support:
------------------------------------------------------------
In reply to your message regarding Service Request SR 1-852766775:
I just received the answer from the dev team. Please take a look:
====================================
The customer is correct. The partitions use some helper structures for each block and also at the beginning of the partition area. And he is correct the structures are internal so he cannot do the calculation himself.
We will not solve the root cause, but we can add API to make the calculations for the user. I would see two API functions are needed:
-partition_at_calc_size(block_size, block_count) ... will calculate how much memory is needed for given number of blocks
-partition_at_calc_blocks(block_size, memory_size) ... will calculate how many blocks will fit into given memory area
I’m afraid there is no solution for the block alignment requirement.
====================================
The ticket with the dev team was just opened for the creation of the new API. We will have to wait until next release to see the API added. Could you please wait until the next release is done (estimated to the end of 2012Q2)?
Have a nice day!
Should you need to contact us with regard to this message, please see the notes below.
Best Regards,
Luis
Technical Information & Commercial Support
Freescale Semiconductor
------------------------------------------------------------
Now these two functions will not make for a very graceful solution to issue #1, but it will suffice if that is all that is available. The main issue I see is that the SW will have to be executed and the returns of the new functions checked for the memory map used to be certain that the number of blocks within a partition is as expected.
As far as the alignment is concerned, this creates an issue that limits use of the partition system for certain applications and optimization techniques. A cumbersome and overly complex workaround would be to use the partition system to just contain pointers to aligned memory blocks that the user would have to initialize and then use via pointers to pointers.
Here is the response from Freescale Support:
------------------------------------------------------------
In reply to your message regarding Service Request SR 1-852766775:
I just received the answer from the dev team. Please take a look:
====================================
The customer is correct. The partitions use some helper structures for each block and also at the beginning of the partition area. And he is correct the structures are internal so he cannot do the calculation himself.
We will not solve the root cause, but we can add API to make the calculations for the user. I would see two API functions are needed:
-partition_at_calc_size(block_size, block_count) ... will calculate how much memory is needed for given number of blocks
-partition_at_calc_blocks(block_size, memory_size) ... will calculate how many blocks will fit into given memory area
I’m afraid there is no solution for the block alignment requirement.
====================================
The ticket with the dev team was just opened for the creation of the new API. We will have to wait until next release to see the API added. Could you please wait until the next release is done (estimated to the end of 2012Q2)?
Have a nice day!
Should you need to contact us with regard to this message, please see the notes below.
Best Regards,
Luis
Technical Information & Commercial Support
Freescale Semiconductor
------------------------------------------------------------
Now these two functions will not make for a very graceful solution to issue #1, but it will suffice if that is all that is available. The main issue I see is that the SW will have to be executed and the returns of the new functions checked for the memory map used to be certain that the number of blocks within a partition is as expected.
As far as the alignment is concerned, this creates an issue that limits use of the partition system for certain applications and optimization techniques. A cumbersome and overly complex workaround would be to use the partition system to just contain pointers to aligned memory blocks that the user would have to initialize and then use via pointers to pointers.