Topics

FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

Bo.Kragelund@...
 

Hi Carles,

Manually adding your new code lines to my jlink.py works.

Regards,
Bo

Cufi, Carles
 

Thanks.

 

I’ve sent a PR to the west repo to fix this. If you could test it (simply get the file and overwrite your local jlink.py) and approve it it would be most helpful.

https://github.com/zephyrproject-rtos/west/pull/145

 

Thanks,

 

Carles

 

From: devel@... <devel@...> On Behalf Of Bo.Kragelund@...
Sent: 03 January 2019 12:42
To: devel@...
Subject: Re: [Zephyr-devel] FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

 

Hi Carles,

Number 2 works fine.
Thanks a lot.

Regards,
Bo

Bo.Kragelund@...
 

Hi Carles,

Number 2 works fine.
Thanks a lot.

Regards,
Bo

Cufi, Carles
 

Right, I think I know what is going on, the default value in the constructor is not being used.

 

I believe there are 2 ways to try and fix the issue until we submit a patch:

 

  1. Add a line  board_runner_args(jlink "--commander=JLink.exe") in your board.cmake in the boards/arm/<board name> folder
  2. Replace JLinkExe with JLink.exe in https://github.com/zephyrproject-rtos/zephyr/blob/master/scripts/meta/west/runners/jlink.py#L65

 

Carles

 

From: devel@... <devel@...> On Behalf Of Bo.Kragelund@...
Sent: 03 January 2019 11:13
To: devel@...
Subject: Re: [Zephyr-devel] FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

 

Hi Carles,

And thank you very much for your quick response.

I have renamed 'JLinkExe' to 'JLink.exe' in line 20 of my local jlink.py.
I also renamed  'JLinkGDBServer' to 'JLinkGDBServer.exe' in line 23 of my local jlink.py.

I then updated the PATH environment variable with "c:\Program Files (x86)\SEGGER\JLink_V640\", where the exe files are located.

After this I can type both JLink.exe and JLinkGDBServer.exe on the command line of the cmd window from the build directory of the "hello_world" sample, and both programs starts.

But if I type ninja flash, I still get the same error.

I hope this feedback can help fixing this Windows issue.

Best regards,
Bo

Bo.Kragelund@...
 

Hi Carles,

And thank you very much for your quick response.

I have renamed 'JLinkExe' to 'JLink.exe' in line 20 of my local jlink.py.
I also renamed  'JLinkGDBServer' to 'JLinkGDBServer.exe' in line 23 of my local jlink.py.

I then updated the PATH environment variable with "c:\Program Files (x86)\SEGGER\JLink_V640\", where the exe files are located.

After this I can type both JLink.exe and JLinkGDBServer.exe on the command line of the cmd window from the build directory of the "hello_world" sample, and both programs starts.

But if I type ninja flash, I still get the same error.

I hope this feedback can help fixing this Windows issue.

Best regards,
Bo

Marcio Montenegro
 

The same problem occurs using the nxp kw41z board and windows 10

On Wed, Jan 2, 2019 at 10:31 AM <Bo.Kragelund@...> wrote:
Hi,

I have followed the getting started guide and installed zephyr, GNU, and tools on a Windows 7 machine and now trying to build and flash the "hello_world" sample.

I'm following the guidelines for the supported NXP FRDM-K64F board.
Since I'm using jlink for flashing, which is not default, I use below cmake command:
cmake -GNinja -DOPENSDA_FW=jlink -DBOARD=frdm_k64f ..
This command executes without any errors.

Then I use below command for making the elf file and flash the board.
ninja flash
This also runs without errors until the actual flashing. See output from cmd window below:
[103/109] Linking C executable zephyr\zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       12676 B         1 MB      1.21%
            SRAM:        4012 B       192 KB      2.04%
        IDT_LIST:          88 B         2 KB      4.30%
[108/109] Flashing frdm_k64f
Using runner: jlink
Flashing Target Device
FATAL ERROR: 2 The system cannot find the file specified None 2 None
run as "west -v ... flash ..." for a stack trace

I believe all my environment variables are set correct for using GNU compiler:
GNUARMEMB_TOOLCHAIN_PATH=C:\gnu_arm_embedded
ZEPHYR_BASE=c:\zephyr\zephyr\
ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb

I can flash the elf file using the J-Flash Lite without any problems, so I beleive hardware and windows drivers are fine.

I hope somebody can help me fix this basic issue.

Best regards,
Bo

Cufi, Carles
 

Hi there,

 

The jlink runner will try to execute a file named “JLinkExe”. This exists on Linux but I just checked my Windows machine and it is named differently, namely “JLink.exe”’.

I think we need a patch in the runner to execute a different filename based on the platform.

 

Could you try renaming “JLinkExe” to “JLink.exe” here:

https://github.com/zephyrproject-rtos/zephyr/blob/master/scripts/meta/west/runners/jlink.py#L20

 

and see if that works.

 

Thanks,

 

Carles

 

From: devel@... <devel@...> On Behalf Of Bo.Kragelund@...
Sent: 02 January 2019 14:31
To: devel@...
Subject: [Zephyr-devel] FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

 

Hi,

I have followed the getting started guide and installed zephyr, GNU, and tools on a Windows 7 machine and now trying to build and flash the "hello_world" sample.

I'm following the guidelines for the supported NXP FRDM-K64F board.
Since I'm using jlink for flashing, which is not default, I use below cmake command:

cmake -GNinja -DOPENSDA_FW=jlink -DBOARD=frdm_k64f ..
This command executes without any errors.

Then I use below command for making the elf file and flash the board.
ninja flash
This also runs without errors until the actual flashing. See output from cmd window below:

[103/109] Linking C executable zephyr\zephyr_prebuilt.elf

Memory region         Used Size  Region Size  %age Used

           FLASH:       12676 B         1 MB      1.21%

            SRAM:        4012 B       192 KB      2.04%

        IDT_LIST:          88 B         2 KB      4.30%

[108/109] Flashing frdm_k64f

Using runner: jlink

Flashing Target Device

FATAL ERROR: 2 The system cannot find the file specified None 2 None

run as "west -v ... flash ..." for a stack trace


I believe all my environment variables are set correct for using GNU compiler:
GNUARMEMB_TOOLCHAIN_PATH=C:\gnu_arm_embedded

ZEPHYR_BASE=c:\zephyr\zephyr\

ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb


I can flash the elf file using the J-Flash Lite without any problems, so I beleive hardware and windows drivers are fine.

I hope somebody can help me fix this basic issue.

Best regards,
Bo

Bo.Kragelund@...
 

Hi,

I have followed the getting started guide and installed zephyr, GNU, and tools on a Windows 7 machine and now trying to build and flash the "hello_world" sample.

I'm following the guidelines for the supported NXP FRDM-K64F board.
Since I'm using jlink for flashing, which is not default, I use below cmake command:
cmake -GNinja -DOPENSDA_FW=jlink -DBOARD=frdm_k64f ..
This command executes without any errors.

Then I use below command for making the elf file and flash the board.
ninja flash
This also runs without errors until the actual flashing. See output from cmd window below:
[103/109] Linking C executable zephyr\zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       12676 B         1 MB      1.21%
            SRAM:        4012 B       192 KB      2.04%
        IDT_LIST:          88 B         2 KB      4.30%
[108/109] Flashing frdm_k64f
Using runner: jlink
Flashing Target Device
FATAL ERROR: 2 The system cannot find the file specified None 2 None
run as "west -v ... flash ..." for a stack trace

I believe all my environment variables are set correct for using GNU compiler:
GNUARMEMB_TOOLCHAIN_PATH=C:\gnu_arm_embedded
ZEPHYR_BASE=c:\zephyr\zephyr\
ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb

I can flash the elf file using the J-Flash Lite without any problems, so I beleive hardware and windows drivers are fine.

I hope somebody can help me fix this basic issue.

Best regards,
Bo