Skip to content

IceStorm flow does not execute post_build / post_run hooks #796

Description

@nmcp88

I'm using the Flow API with the icestorm backend (Fusesoc v2.4.5) and noticed that post_build hooks are never executed.

I'm setting the hooks in the core file as such:

 # some stuff omitted
  picoice:
    <<: *synth
    filesets_append: [picoice]
    hooks:
      post_build: [test_hook]
    flow_options:    
      pnr: next
      nextpnr_options : [--up5k]

scripts:
  test_hook:
    cmd: [/bin/bash, -c, 'echo "DEADBEEF"']

The generated makefile when running "fusesoc run --target=picoice counter" seems correct:

 # some stuff omitted
all: post_build

test_hook: bitstream
   
post_build: test_hook

So basically the target is generated, and I can invoke it manually which generates the test output.
However, fusesoc run invokes:

make bitstream

instead of make (or make post_build), so the hook is skipped entirely. Running make post_build manually executes it as expected.
I traced this back to Edalize, where the IceStorm flow explicitly sets the build goal to bitstream (when "pnr" is set to "next").
Is this intended behavior, or should the icestorm flow invoke the "all" Make target so that post_build hooks are executed?

As is, I can't seem to get the hooks to invoke any scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions