soc-hub-fi / headsail-vp

Headsail - Virtual Platform
0 stars 2 forks source link

Headsail-FFI-bsp broken #26

Closed vilukissa68 closed 2 months ago

vilukissa68 commented 2 months ago

C binaries using the headsail-ffi-bsp seem to be broken. I guess that something in the BSP is trying to write debug information to debug peripheral. Might something done in https://github.com/soc-hub-fi/headsail-vp/commit/8e4f05b184971835619d24ea7b28bb6f6e84236c or https://github.com/soc-hub-fi/headsail-vp/commit/6716fac0d2b8f2b24156184a7175c607b9ccffc7, since compiler weakening feature was tested rebased on earlier branch than those and there C binaries still worked fine.

How to reproduce the issue:

cd examples/c-bsp-test
mkdir build
cd build
cmake ..
make
cd ../../../scripts
./run_on_hpc.sh ../examples/c-bsp-test/build/main

Expected output:

Hello world!

Output observed:

(headsail) 13:13:30.5321 [WARNING] sysbus: [cpu_hpc0: 0x0] (tag: 'debug') ReadByte from non existing peripheral at 0x0, returning 0x00.
13:13:30.5334 [ERROR] cpu_hpc0: CPU abort [PC=0x0]: Trying to execute code outside RAM or ROM at 0x0000000000000000.
hegza commented 2 months ago

Fixed by #28