<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Den 21-08-2011 17:06, Geoffrey Barton skrev:
<blockquote
cite="mid:1C9E8FC9-2B1A-41F1-91E3-20E1C9137F6B@periphon.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<base href="x-msg://50/"><br>
<div>
<div>On 21 Aug 2011, at 15:33, John Clymer wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><span class="Apple-style-span"
style="border-collapse: separate; font-family: Verdana;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; font-size: medium; ">
<div>
<div style="margin-top: 0px; margin-right: 0px;
margin-bottom: 0px; margin-left: 0px; font-family:
'times new roman', 'new york', times, serif; font-size:
12pt; ">
<div style="margin-top: 0px; margin-right: 0px;
margin-bottom: 0px; margin-left: 0px; ">As part of my
table-ization of cpuinfo.pas, I am including a generic
part for each (no code published for this yet.) The
caveat to this is that FLASH size and SRAM sizes are
just set to extremely large (1 MB each for now).
Which means if the code size exceeds the space of the
device - the compiler/linker will not catch the
overflow of the available resource. (Running objsize
on the ELF file will display the sizes - so I just run
that after every successful compile.)<br>
</div>
</div>
</div>
</span></blockquote>
<div><br>
</div>
As I pointed out, this will always fail because the stacktop is
set beyond the available ram. It will cause an exception I
think. How do you propose to be able to set the actual ram top
for the generic part, or am I missing something?</div>
<div><br>
<blockquote type="cite"><span class="Apple-style-span"
style="border-collapse: separate; font-family: Verdana;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; font-size: medium; ">
<div>
<div style="margin-top: 0px; margin-right: 0px;
margin-bottom: 0px; margin-left: 0px; font-family:
'times new roman', 'new york', times, serif; font-size:
12pt; ">
<div style="margin-top: 0px; margin-right: 0px;
margin-bottom: 0px; margin-left: 0px; "><br>
Also, still testing, but I have the "<span
style="font-weight: bold; ">interrupt"<span
class="Apple-converted-space"> </span></span>reserved
word working (more or less, more testing needed.)
This takes the interrupt codeword with an integer.
The integer is the offset into the vectors table. If
no interrupt is provided for the given address, it
defaults to DefaultHandler in the startup file - which
is just a continual loop - so one can breakpoint on
it. (This can be enabled / disabled via a define in
the source.) This is should only be enabled for the
embedded target - but I need to double check to ensure
that is the case.<br>
</div>
</div>
</div>
</span></blockquote>
<div><br>
</div>
This is a useful development; ideally the integer would be
backed by an enumeration as it is a big table. One thing which I
did find missing was the interrupt enable and disable assembler
codes, so I patched them with data bytes hidden in functions.
The keil C compiler does not like these if you link to units
doing this (throws a data/code wobbly). See the file attached to
bug tracker ID<span class="Apple-style-span" style="color:
rgb(17, 17, 17); font-family: 'Trebuchet
MS',Arial,Verdana,sans-serif;">0017365 for how I hacked
interrupts.</span></div>
</blockquote>
The CPS* instruction with the correct operand syntax was added in
#18334<br>
<br>
SVN trunk already has experimental support for the interrupt
keyword. It's enabled with FPC_HAS_SYSTEMS_INTERRUPT_TABLE in
fpcdefs.inc. I discovered a small bug with the current
implementation which is fixed with the attached patch(which also
includes some other stuff... the bugfix is in ncgutil. It didn't
search the program file for interrupt handlers before)<br>
</body>
</html>