Hi Giovanni,
I'd be happy to test, it will be at least mid next week before I'll be near that hardware. Should I be testing off the trunk, or 19.x maintenance branch, or both?
Dave
C++ exceptions in cortex-m7 vs. cortex-m4
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: C++ exceptions in cortex-m7 vs. cortex-m4
Hi,
Both should be OK.
It was a misalignment caused by the linker.
Giovanni
Both should be OK.
It was a misalignment caused by the linker.
Giovanni
Re: C++ exceptions in cortex-m7 vs. cortex-m4
Be aware that if using 19.1.x, you need to use the latest from trunk; the bug is present in the 19.1.3 distribution zip file
(Problem is in ChibiOS_19.1.3.7z\ChibiOS_19.1.3\os\common\startup\ARMCMx\compilers\GCC\ld\rules_code.ld line 38; needs to say:
)
(Problem is in ChibiOS_19.1.3.7z\ChibiOS_19.1.3\os\common\startup\ARMCMx\compilers\GCC\ld\rules_code.ld line 38; needs to say:
Code: Select all
.text : ALIGN_WITH_INPUT
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: C++ exceptions in cortex-m7 vs. cortex-m4
Ah right, it is not yet released in 19.1.x... please try trunk. I hope to release a 19.1.4 next week.
Giovanni
Giovanni
Re: C++ exceptions in cortex-m7 vs. cortex-m4
Unfortunately, those changes do not seem to fix my original issue.
I tried both trunk (r13183), as well as stable_19.1.x branch (r13176) from SVN. I verified both had the line steved mentioned in the corresponding rules_code.ld.
I tried with both gcc-arm-none-eabi-7-2017-q4-major and gcc-arm-none-eabi-9-2019-q4-major compilers.
As before, I can hide the problem by moving the VARIOUS_FLASH section from flash1 (ITCM flash) to flash0 (AXIM). Something about when the stack unwinding functions are in ITCM flash, it does not work properly.
I went a little further, and left the VARIOUS section in flash1, but altered the just the .ARM.extab and .ARM.exidx sections (in rules_code.ld) to go into RODATA instead of VARIOUS, and this also works around the problem. I didn't move eh_frame_hdr/eh_frame from VARIOUS but that may not be correct.
Again, I don't fully understand what I'm doing, just reporting what I see changing the outcome.
I tried both trunk (r13183), as well as stable_19.1.x branch (r13176) from SVN. I verified both had the line steved mentioned in the corresponding rules_code.ld.
I tried with both gcc-arm-none-eabi-7-2017-q4-major and gcc-arm-none-eabi-9-2019-q4-major compilers.
As before, I can hide the problem by moving the VARIOUS_FLASH section from flash1 (ITCM flash) to flash0 (AXIM). Something about when the stack unwinding functions are in ITCM flash, it does not work properly.
I went a little further, and left the VARIOUS section in flash1, but altered the just the .ARM.extab and .ARM.exidx sections (in rules_code.ld) to go into RODATA instead of VARIOUS, and this also works around the problem. I didn't move eh_frame_hdr/eh_frame from VARIOUS but that may not be correct.
Again, I don't fully understand what I'm doing, just reporting what I see changing the outcome.