Dear all
I would like to avoid generation on "_ARM_common_switch8" in switch case / MDK ARM.
I cannot change the source code because of its porting past product.
it may be difficult to use compiler optimization without impact other part.
Could you let me know any good way to solve ?
Any information much appreciated.
Best regards
Rename the sequence in the startup linker and set the command line switch to disable the deobfustication option in generated forum comments
Hello
Thank you for your kind help.
but I'm not familiar with the feature and I see the option for the first time.
Could you let me know more detail - which file and where should be modified .. - ?
Best Regards,
You're building a new product, you should modify the code to make it more portable if necessary.
Optimization should do away with this code, what code isn't optimizing well? Do you need to use volatile for things that are changed outside program flow?
Why is having this routine an issue if the code functions as designed?
You can enable optimization on a per file basis, and use #pragma's at a function level.
someone wrote
When you use more than 7 switch-cases, compile would call this library function-'ARM_COMMON_SWITCH8' to help compute the address that program would switch to.
There are two known methods to solve this problem. One is dividing your switch structure into several smaller 'condition structure' such as 'if and else' and switch structure with less than 6 cases. The second method is using optimization options such as '-O1,-O2,-O3,-Os'.
Hello.
Thank you for your comment.
I know the information from an thread and I tried but it didn't solve.
I want to delete it without modifying the source code as possible, because of specific reason.
Best Regards
Thank you for your advise.
As further investigation,
I find that compile option, "--no_branch_tables" seems to be compile without "_ARM_common_switch8".
That will be the solution ? or any unexpected behavior occur ?
>>or any unexpected behavior occur ?
Unexpected behaviour by it's nature is not expected..
Run the unit tests or regression tests to confirm your product is functioning as expected.
depends on how good your expectations are ...