Trying to build with Ninja results nrfjprog.py in an AttributeError.

I am able to build my project, but when I try to flash it to the board via ninja flash_<target> I can select the device in nrfjprog.py, I know, that I have to use "'0'" as input, so that the script doesn't result in an error, but then I get the following error:

nrf5_SDK_for_Mesh_v4.0.0_src/CMake/nrfjprog.py", line 93, in main
with multiprocessing.Pool(len(devices)) as p:
AttributeError: __exit__

Is there a way to fix this?

Parents
No Data
Reply
  • So I fixed it for one device, but only for single processor by just falling back to calling the flash-Function itself, but there should this is only a workaround I guess.

        if (len(devices)==1):
            flash((devices[0],hexfile))
        else:
            with multiprocessing.Pool(len(devices)) as p:
                p.map(flash, [(d, hexfile) for d in devices])

Children
No Data
Related