From 7e8a50452b06928db65533720819a259caa877ef Mon Sep 17 00:00:00 2001 From: florian Date: Mon, 17 Aug 2020 17:50:43 +0000 Subject: [PATCH] * StackTop must be OS specific (and not CPU specific) git-svn-id: trunk@46474 - --- rtl/freertos/system.pp | 12 +++++++----- rtl/xtensa/xtensa.inc | 10 ---------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/rtl/freertos/system.pp b/rtl/freertos/system.pp index 07681b7418..ca7b729828 100644 --- a/rtl/freertos/system.pp +++ b/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'; diff --git a/rtl/xtensa/xtensa.inc b/rtl/xtensa/xtensa.inc index f9dfce89e4..f315ee0f61 100644 --- a/rtl/xtensa/xtensa.inc +++ b/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;