mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-06 17:35:57 +02:00
* Xtensa FreeRTOS: unified haltproc
git-svn-id: trunk@46679 -
This commit is contained in:
parent
03a0e6e82f
commit
c73c98d995
@ -75,11 +75,16 @@ unit esp32;
|
|||||||
|
|
||||||
procedure _FPC_haltproc; public name '_haltproc';noreturn;
|
procedure _FPC_haltproc; public name '_haltproc';noreturn;
|
||||||
begin
|
begin
|
||||||
printpchar('_haltproc called, going to deep sleep, exit code: $');
|
if operatingsystem_result <> 0 then
|
||||||
printdword(operatingsystem_result);
|
writeln('Runtime error ', operatingsystem_result);
|
||||||
printpchar(#10);
|
|
||||||
while true do
|
writeln('_haltproc called, exit code: ',operatingsystem_result);
|
||||||
esp_deep_sleep_start;
|
flushOutput(TextRec(Output));
|
||||||
|
repeat
|
||||||
|
// Allow other tasks to run
|
||||||
|
// Do not enter deep sleep, can lead to problems with flashing
|
||||||
|
vTaskDelay(1000);
|
||||||
|
until false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ unit esp8266;
|
|||||||
if operatingsystem_result <> 0 then
|
if operatingsystem_result <> 0 then
|
||||||
writeln('Runtime error ', operatingsystem_result);
|
writeln('Runtime error ', operatingsystem_result);
|
||||||
|
|
||||||
writeln('_haltproc called...');
|
writeln('_haltproc called, exit code: ',operatingsystem_result);
|
||||||
flushOutput(TextRec(Output));
|
flushOutput(TextRec(Output));
|
||||||
repeat
|
repeat
|
||||||
// Allow other tasks to run
|
// Allow other tasks to run
|
||||||
|
Loading…
Reference in New Issue
Block a user