Page 2 of 2
Re: C++ exceptions in cortex-m7 vs. cortex-m4
Posted: Sun Nov 10, 2019 12:50 pm
by dflogeras
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
Re: C++ exceptions in cortex-m7 vs. cortex-m4
Posted: Sun Nov 10, 2019 12:52 pm
by Giovanni
Hi,
Both should be OK.
It was a misalignment caused by the linker.
Giovanni
Re: C++ exceptions in cortex-m7 vs. cortex-m4
Posted: Sun Nov 10, 2019 6:02 pm
by steved
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:
)
Re: C++ exceptions in cortex-m7 vs. cortex-m4
Posted: Sun Nov 10, 2019 6:05 pm
by Giovanni
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
Re: C++ exceptions in cortex-m7 vs. cortex-m4
Posted: Tue Nov 12, 2019 9:11 pm
by dflogeras
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.