-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix crashes on boot on some Kinetis devices #4939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@maclobdell can you verify this patch on the KL27Z, KL43Z, KL82Z and KL41Z? |
@c1728p9 yes - will test asap. cc @mmahadevan108 - this seems like the fix for the issues we have been having with KL27 |
@c1728p9 Thank you. |
Hi @mmahadevan108, my intent here was only to track down the reason some devices were crashing. I light of this bug I would recommend NXP does a review of all Kinetis devices to ensure the vector table and vector count are sized accordingly. |
/morph test |
0xc0170. Please let me know if this change was made as an error? |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputTest failed! |
@@ -51,7 +51,7 @@ | |||
#define __ram_vector_table__ 1 | |||
|
|||
#if (defined(__ram_vector_table__)) | |||
#define __ram_vector_table_size__ 0x00000200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change required? The issue seems to be the large value for the number of NVIC_VECTORS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It used tobe large, 0x200, with this patch it would be now 0xc0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, that change is not required. It just saves space. The commit "Update ram vector size to save space" just saves space and could be removed entirely. Let me know if you want me to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been reduced to match the number of NVIC_VECTORS, we had reserved a fixed space as this varies by platform. My request was to go back to the original value as it helps minimize changes in this file. I can check with the internal SDK team if this space can be adjusted per platform.
/morph test |
1 similar comment
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
OutputBuild failed! |
@maclobdell @c1728p9 Can this fix be integrated into the mainline. |
Waiting for CI to complete, then shall go in |
If NVIC_NUM_VECTORS is larger than the space allocated by the vector table in ram (__ram_vector_table_size__) then the call to mbed_cpy_nvic during boot will corrupt valid data, which can lead to a crash. This patch fixes the declared number of vectors on the KL27Z, KL43Z and KL82Z to fix this crash.
35c12c8
to
b402b7a
Compare
Rebased to master so testing can be re-triggered. Also removed the space saving patch at the request of @mmahadevan108. |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Fix a crash on boot due to incorrectly size vector count. This patch also reduces the ram vector size for devices which reserved too much space.