Browse Source

* StackTop must be OS specific (and not CPU specific)

git-svn-id: trunk@46474 -
florian 5 years ago
parent
commit
7e8a50452b
2 changed files with 7 additions and 15 deletions
  1. 7 5
      rtl/freertos/system.pp
  2. 0 10
      rtl/xtensa/xtensa.inc

+ 7 - 5
rtl/freertos/system.pp

@@ -208,15 +208,17 @@ const calculated_cmdline:Pchar=nil;
 {*****************************************************************************
                        Misc. System Dependent Functions
 *****************************************************************************}
-{$ifndef FPC_SYSTEM_HAS_STACKTOP}
 var
  _stack_top: record end; external name '_stack_top';
 
+{ Interim fix for now, set to large address
+  TODO: provide more realistic value, possibly by inspecting stack pointer
+  when main or task is started
+}
 function StackTop: pointer;
-begin
-  StackTop:=@_stack_top;
-end;
-{$endif FPC_SYSTEM_HAS_STACKTOP}
+  begin
+    StackTop:=pointer($3fffffff);
+  end;
 
 
 procedure haltproc;cdecl;external name '_haltproc';

+ 0 - 10
rtl/xtensa/xtensa.inc

@@ -146,16 +146,6 @@ Function Sptr : pointer;assembler;
   end;
 
 
-{$define FPC_SYSTEM_HAS_STACKTOP}
-// Interim fix for now, set to large address
-// TODO: provide more realistic value, possibly by inspecting stack pointer
-// when main or task is started
-function StackTop: pointer;
-  begin
-    StackTop:=pointer($3fffffff);
-  end;
-
-
 function InterLockedDecrement (var Target: longint) : longint;
   var
     temp_sreg : byte;