On 13 Jul 2010, at 12:24, Jeppe Johansen wrote:
The bit names are a bit hard, since there aren't any parsing
facilities in place for them, to my knowledge. I think they would
need a special syntax to not be seen as symbols by the assembler
reader
It'll take some work on the assembler reader and writer to get those
special instructions to work
The special registers should be added to armreg.dat(and then run
mkarmreg). I didn't add all the cortex registers.
ok, I have done that, 'msr primask,r0' compiles ok. I will disassemble
and compare with the C code examples, if I can understand them :-)
Is primask a real register btw? It just assembles to cpsr
cpsr should not exist in cortexm3 according to ARM (see www.arm.com/files/pdf/Cortex-M3_programming_for_ARM7_developers.pdf
eg. page 10 ) It is not in either the v7m archictecture or cortex_m3
tech ref manuals.
primask is a (real as far as I can see) one bit register. I will try
flipping it on the hardware debugger and see if it changes anywhere
else...
rgds
Geoffrey
Geoffrey Barton skrev:
On 12 Jul 2010, at 19:06, Jeppe Johansen wrote:
Add the missing instructions to the bottom of armins.dat, run
mkarmins in the same directory.
It now recognises the mnemonic 'cpsie' but not the following 'i'.
The 'msr' instruction should also allow the interrupts to be
enabled/disabled as
msr primask,r0
but msr gives an unknown identifier error for 'primask' and all the
other 'special' register names ('apsr' etc.) Perhaps they have been
given different names, but I cannot find them listed anywhere in
the FPC source.
(and then submit patch) :-)
well, once I have some code which works on the chip, I will ask
someone where to put it :-)
Geoffrey
Geoffrey Barton skrev:
I wrote a procedure to turn on interrupts:-
procedure intenable;nostackframe;
begin
asm
cpsie i
end;
end;
The compilation fails with 'Error: Unrecognized opcode cpsie'
The compiler also does not recognise 'cpsid' and also 'primask'
as in 'mrs r0,primask'
any ideas/workarounds?
Geoffrey
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel