Forum : ARM
Post Information | Post |
---|---|
March 16, 2007 - 9:58am
|
I am using the evaluation version of RIDE with the following settings. With Options-->TarGet During the compilation of the C codes, only the option of -mthumb-interwork is used. During the linking process, the options of both -mthumb-interwork and -mthumb are used. When I debug the generated .elf file, I choose Data dump-->Disassembly code and notice that all of the instructions are still in 32-bit addresses. I thought if I turned on the thumb code options, they should be 16 bits address. Can you tell me what I have done wrong here? Many Thanks, Jim |
Hi,
I checked here and it works fine: If I select thumb mode, then the compilation is done using "-mthumb" option. (even with interwork enabled)
Please check that you are not using some local options (red dot on the file in the project view) which could force the ARM mode for some files.
If not, then please try this: (which is what I just did here)
1. Open the test example in "c:\RIDE\examples\STRx\test"
2. Change the target option for using your STR9, thumb mode and interwork.
3. Compile and link.
4. Look at the file "main.o.log" that has been generated in the project's directory, and tell me if it's been compiled using Thumb or ARM mode.
If this doesn't help, then please send us your project or any sample project that shows the problem. (we need a complete compiled project with sources, includes, listings, logs, etc.)
Note: I don't expect the "-mthumb" option to the linker to have much effect. It's when compiling that it makes a difference...
Note2: If you are not using any local options, then interwork is useless, because all your files will be in the same mode, except the startup which is always in ARM mode but doesn't need interwork to call a "main" in Thumb mode...
Best Regards,
Vincent
Hello vincent,
Thanks for your quick reply.
After read your post, I tried with the test project and my own project again, both of them are compiled with -mthumb option.
However, when I debug both version and enable data dump-->disassembly code, what I see is still the 32 bit wide instructions, the ARM code. Not the 16 bit wide thumb code. Is that the same in your debug screen too?
Many Thanks,
Jim
Hi,
It looks like there is a problem in the STR9 startup. Please try to copy, in "c:\RIDE\lib\STRx", the two files from this folder:
"ftp://www.raisonance.com/pub/forum/STR9_Startup_thumb/..."
And then build the project again.
Best Regards,
Vincent
Hi,
Sorry, it seems that the problem is in the simulator, not in the startup. I'll need a little time to understand it better.
Are you debugging using the simulator or RLink?
Best Regards,
Vincent
Hello vincent,
I am using simulator to debug. my starter kit should arrive next monday.
The insider's guide to the STR91x ARM 9 from Hitex gives me an example about what the interworking should be. In this manual, it explains the concept at chapter 2 and shows a code example and debuggin session in its chapter 5.
I download the document from http://mcu.st.com/mcu/modules.php?name=mcu&file=familiesdocs&FAM=101 However, the link seems broken now.
Many Thanks for looking into the issue.
Jim