Skip to content

Commit 88b2b03

Browse files
committed
sw: change success exit code to 0
1 parent 9f3e3ac commit 88b2b03

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

rtl/tb_croc_soc.sv

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,11 @@ module tb_croc_soc #(
294294
jtag_dbg.wait_idle(20);
295295
jtag_dbg.read_dmi_exp_backoff(dm::SBData0, exit_code);
296296
end while (exit_code == 0);
297-
$display("@%t | [JTAG] Simulation finished: return code 0x%0h", $time, exit_code);
297+
exit_code >>= 1;
298+
if (exit_code)
299+
$display("@%t | [JTAG] Simulation finished: FAIL (return code 0x%0h)", $time, exit_code);
300+
else
301+
$display("@%t | [JTAG] Simulation finished: SUCCESS", $time);
298302
$finish();
299303
endtask
300304

sw/crt0.S

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ _start:
3232
li x15, 0
3333
call main
3434
_eoc:
35-
la t0, status
36-
sw a0, 0(t0)
35+
slli t0, a0, 1
36+
ori t0, t0, 1
37+
la t1, status
38+
sw t0, 0(t1)
3739
wfi

sw/helloworld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ int main() {
8282
sleep_ms(10);
8383
printf("Tock\n");
8484
uart_write_flush();
85-
return 1;
85+
return 0;
8686
}

0 commit comments

Comments
 (0)