AMU compile errors
Jon Abbott (1421) 2651 posts |
How do you get AMU to display the line a compile error occurred on? I can’t see any setting for it in the setup or options. I guess I’m just missing something blindingly obvious! |
Chris Johnson (125) 825 posts |
Do you not simply add the switch -throwback to the CC (or ASM or CPP) flags? |
Jon Abbott (1421) 2651 posts |
Figured it out, you need an editor loaded that supports throwback – knew it was something obvious. |
Steve Pampling (1551) 8172 posts |
There’s one in the DDE, and at the risk of a small outbreak of Zap vs. StrongED they support throwback too. |
Jon Abbott (1421) 2651 posts |
I just happened to have StrongED loaded when I was trying to compile, which is how I discovered what “throwback” was. Just need to figure out how to set 32bit and CPU flags now. Major uphill learning curve ahead of me I think. It doesn’t seem to warn about LDM^, so it must be defaulting to 26bit. I had a look at the manual, which didn’t seem to help much, I couldn’t see any mention of what CPU values you could use. |
Rick Murray (539) 13851 posts |
As you are using AMU, you will be using a MakeFile. Here’s the one I use to build my OLED module. Feel free to steal ideas. ;-)
|
Jon Abbott (1421) 2651 posts |
I can’t find half those options in the ASM manual, so have no idea what they all do. Are the manuals that come with DDE up to date? For example, I’m looking at the “Assembly language interface” example in C_C++.PDF (p294) and it shows the exit back to C as “LDMEA fp, {v1, fp, sp, pc}^” which clearly isn’t correct on modern CPU’s/APCS. I presume you simply drop the ^ or have other things changed with the current APCS standard? I’m also seeing a lot of “Deprecated instruction (STM with SP in register list)” – Can I safely ignore those when interfacing C with ASM? |
Steve Pampling (1551) 8172 posts |
I think some of those options aren’t up to date. For starters “stamp” has no effect on current releases of objasm.
This is where I’m coming from when I speak about needing simple guidelines for 26 —> 32 bit changes. You might get a few useful clues by taking an item compiled for 26 bit and doing a reverse engineering job with an intelligent tool. |
Jeffrey Lee (213) 6048 posts |
Dropping the ^ should be all that’s needed for that case. There’s an overview of APCS-32 here, and IIRC there’s also a doc about it in the CodeStds (?) folder in the C tools.
Yes, those can be ignored. IIRC that’s an instruction type which ARM deprecated in rev B of the ARMv7 ARM, but then went back on that decision in rev C of the document – and objasm hasn’t yet been updated to reflect that. Either way, it’s fine on the current generation of chips, and we’d have major issues with all compiled C if we had to port the OS to a chip where it didn’t work! |
Jon Abbott (1421) 2651 posts |
I’ve got the ASM side compiling okay now, thanks for the help so far. Now that I’ve added one C file into the project and tried to compile it, AMU is crashing, any ideas what the problem might be?: Norcroft RISC OS ARM C vsn 5.70 [12 Oct 2012] EDIT: Its throwback from CC under AMU that’s generating this error as it compiles the C file in CC okay and shows the throwback errors. When the error occurs under AMU, a blank Throwback window appears and then AMU crashes |