Originally from ticket #7668.
This is a standard peripheral library file that compiles fine in Rowley cross studio under the debug mode, but it fails under the release. I'm perplexed as to what might be going on. It appears some type of evaluation of thumb commands is going on 'strexb r0,r0,[r1]' because it complains and says : registers may not be the same! What exactly is going on here on the release configuration? Do I need to remove some flag somewhere? Some kind of thumb syntax checking going on ?
I also simultaneously get a : Can't open c:\my_file_path\thumb release\tmpa04836 for reading. I get this every time I click on the assembler complaint.
I have also found this solution to my issue at the following link: I hope this helps folks that stumble upon this similar problem I'm having!
The solution is to modify core_cm3.c to look as follows:
uint32_t __STREXB(uint8_t value, uint8_t *addr)
__ASM volatile ("strexb %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) );
* @brief STR Exclusive (16 bit)
* @param value value to store
* @param *addr address pointer
* @return successful / failed
* Exclusive STR command for 16 bit values
uint32_t __STREXH(uint16_t value, uint16_t *addr)
__ASM volatile ("strexh %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) );
This is an old version of CMSIS - can you upgrade to a newer one?
I wasn't aware that it was old, because I downloaded it from ST
website...I corrected core_m3.c and it worked just fine! I only needed
the __set_MSP intrinsic to jump into FLASH to application address
inside a DFU bootloader as in the following example:
__set_MSP(*((__IO uint32_t*) ApplicationAddress));
Other than that, those fixes did not pertain much to my requirement,
unless I ever run across a case that I need those specific intrinsics
from this fix...What is the latest version I should download for
STM32L151x ? I thought the one I have is the latest ? Maybe ST should
apply a fix ?
Perhaps you should contact ST about this?
Michael Johnson wrote "Perhaps you should contact ST about this?"
Michael, I find your reply not only amateurish and unprofessional, but
also tasteless! If you do not have anything good to add to this
conversation, that obviously I've been having with myself, then don't
reply at all! I have just recommended Rowley Crossworks to my company
and it is up for purchase per my recommendation! Honestly, I find you
are shooting yourself in the foot with such comments, especially after
I have provided a brief workaround that might help others with similar
issues...My company is probably monitoring this thread, so perhaps we
should go to a different "Toolkit" all together? They have no problem
going to Keil or Iar...I was just trying to be friendly to Rowley, a
smaller toolkit provider...One word solutions don't impress me and
telling me to look elsewhere is not a good solution considering you
port all the ST libraries to your toolkit! I would rethink my strategy
if I was you! ;)
Sorry for offense caused - it wasn't intended.
I understand that...But do you see my point? In this world there are many careless and ignorant people...Our job is to make the world better if it is within our power to do so! I just wish that we can all pitch in to help others instead of making it more of a chore! I feel it is my duty to share a bit of knowledge that could cost somebody an hour or a week of research! Some issues in these compilers are not an easy fix! I can give you a good example! On the STM32L, ST provides a VCP example that did not work on my SPIRIT board...I could not get it to work for three days! Some good Samaritan put a piece of code that is called VCP modified that worked through very slight declaration modifications for my SPIRIT board! I am so elated about this! Three days and all weekend to figure out a complex USB issue I was having! So much so, I almost bought USBEE today! lol But I hope we can all share our frustrations and share our knowledge and recommend Rowley, because I believe they are well intended folks! I love my Rowley CrossWorks and wish to support you because you are part of our community more than the other guys that I've seen and always willing to give us a helping hand when we need it! ;) m
Please sign in to leave a comment.