diff options
author | Andrew Waterman <andrew@sifive.com> | 2016-11-28 18:56:57 -0800 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2016-12-20 19:15:39 -0800 |
commit | 15ea618a79886024f50cabac19d7f91811dec5fb (patch) | |
tree | 1f1fb4656c68414b40bc95d3868ccc1b91fd719d | |
parent | fb9d92d4bcfae53f60d82c1bd2ca270e67e312e7 (diff) |
Pass argc and argv to main()
-rw-r--r-- | bsp/env/freedom-e300-arty/init.c | 2 | ||||
-rw-r--r-- | bsp/env/freedom-e300-hifive1/init.c | 2 | ||||
-rw-r--r-- | bsp/env/start.S | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/bsp/env/freedom-e300-arty/init.c b/bsp/env/freedom-e300-arty/init.c index c766e98..0a80cbb 100644 --- a/bsp/env/freedom-e300-arty/init.c +++ b/bsp/env/freedom-e300-arty/init.c @@ -59,8 +59,6 @@ void _init() printf("core freq at %d Hz\n", get_cpu_freq()); write_csr(mtvec, &trap_entry); - - // _exit(main(0, NULL)); } diff --git a/bsp/env/freedom-e300-hifive1/init.c b/bsp/env/freedom-e300-hifive1/init.c index c088079..167d652 100644 --- a/bsp/env/freedom-e300-hifive1/init.c +++ b/bsp/env/freedom-e300-hifive1/init.c @@ -188,8 +188,6 @@ void _init() write_csr(mstatus, MSTATUS_FS); // allow FPU instructions without trapping write_csr(fcsr, 0); // initialize rounding mode, undefined at reset } - - //_exit(main(0, NULL)); } void _fini() diff --git a/bsp/env/start.S b/bsp/env/start.S index 77e223d..b526411 100644 --- a/bsp/env/start.S +++ b/bsp/env/start.S @@ -47,5 +47,8 @@ _start: 1: #endif + /* argc = argv = 0 */ + li a0, 0 + li a1, 0 call main tail exit |