We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I discovered this problem yesterday as well. There are a couple other solutions that may be easier than recompiling the library. The biggest problem with recompiling it is that you must then maintain it. When a new version comes out you can't just use it. You must recompile it as well, unless the bug gets fixed in the next release.
1. You can fix the error in arm_bitreversal2.S as described in your post and include that file as part of your project. As long as it gets linked in prior to the library, the version inside the library gets ignored.
2. An even less intrusive method is to add the section text to the linker script. My addition is highlighted in red below.
... /* The program code and other data goes into FLASH */ .text : { . = ALIGN(4); *(.text) /* .text sections (code) */ *(.text*) /* .text* sections (code) */ *(text) /* workaround for CMSIS library bug */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ ...
...
/* The program code and other data goes into FLASH */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(text) /* workaround for CMSIS library bug */
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
I believe this is the best workaround until the bug is fixed in the CMSIS distribution. Is ARM aware of the problem?
- Greg