Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--config-file option does not seem to be implemented in pistorm32 branch #66

Open
TonyHoyle opened this issue Mar 18, 2023 · 2 comments

Comments

@TonyHoyle
Copy link

--config-file option does not work.

in boot_scripts/README.md the documentation states:

If you wish to boot using a custom configuration file change ExecStart to:

ExecStart=/home/pi/pistorm/emulator --config-file myconfig.cfg

This does not seem to be implemented currently in the pistorm32 branch.. instead it tries to open a file called '--config-file' instead and crashes.

root@pistorm:/opt/pistorm# /opt/pistorm/emulator --config-file config/pistorm.cfg
FPGA Firmware : --config-file
Segmentation fault

Or, via strace:

fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0), ...}) = 0
write(1, "FPGA Firmware : --config-file\n", 30FPGA Firmware : --config-file
) = 30
openat(AT_FDCWD, "--config-file", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV +++
Segmentation fault

It's possible the documentation is out of date and there is a different command?

@LemaruX
Copy link
Collaborator

LemaruX commented Mar 18, 2023 via email

@Guddler
Copy link

Guddler commented Apr 6, 2023

@TonyHoyle I don't know what the official answer is but I suspect someone modified emulator and didn't update the documentation? It seems to want the name of the firmware as the 1st parameter when supplying options. Since the default firmware appears to be 'bitstream.bin', the following worked for me

./emulator bitstream.bin --config ../amiga.cfg

[EDIT]

Yep, emulator.c in main:

  if (argc < 2)
   {
        printf("Loading default FPGA Firmware file bitstream.bin\n");
        filename = "bitstream.bin";
        //return(1);
   }
   else
  {
        filename = argv[1];
        printf("FPGA Firmware : %s\n", filename);
   }

This is different to main branch, so it's a difference in documentation between main and PiStorm32 Lite. Lite always needs the bitstream as the 1st command line argument, unless running with no command line options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants