flash on windows 64 bits

29 posts / 0 new
Last post
Jérém
Offline
Last seen: 1 year 7 months ago
Joined: 2016-12-07 14:09
flash on windows 64 bits

Hello,
I am trying to flash my DA1468x Development Kit Basic with SmartSnippets Studio (v1.2.3.588) but it doesn"t work.
I select my project, then I click on "program_qspi_jtag_win" and I get this message :
.......................................................................................................................
..
.. QSPI PROGRAMMING
..
.......................................................................................................................

JlinkGDBServer path used: "C:\Program Files (x86)\SEGGER\JLink_V512f"
cli_programmer 1.23
Copyright (c) 2016 Dialog Semiconductor

Configuration saved to C:\XXX\AppData\Local\Temp\cfg_15226.ini file.

C:\XXX\Documents\DA1468x_SDK_BTLE_v_1.0.8.1050.1\utilities\scripts\qspi>"..\..\..\binaries\cli_programmer.exe" --cfg "C:\XXX\AppData\Local\Temp\cfg_15226.ini" --prod-id DA14681-01 gdbserver write_qspi_exec "C:\XXX\Documents\DA1468x_SDK_BTLE_v_1.0.8.1050.1\projects\dk_apps\ble_profiles\ancs\DA14681-01-Release_QSPI\ancs.bin"
cli_programmer 1.23
Copyright (c) 2016 Dialog Semiconductor

cannot open gdb interface

.......................................................................................................................
..
.. FINISHED
..
.......................................................................................................................

I working on windows 10 64bits, is that an issue ?

Thanks,

Jérémy

Device: 
MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi Jerem,

Hi Jerem,

I am not aware if there are tests on a windows 10 machine, but i dont think that this might have any difference over windows 7 or has to do anything with the issue that you are facing. I can replicate your issue if i allready have a gdb server session open, so can you check if when programming you have an instance of the gdb server allready running ?

Thanks MT_dialog

Jérém
Offline
Last seen: 1 year 7 months ago
Joined: 2016-12-07 14:09
I check and there is no other

I check and there is no other gdb start on my pc.
If I start gdbserver with the same arguments on powershell, it seem works.
If I call cli_programmer with the same arguments on powershell, it doesn't work.
Do you have any other idea ?
thanks,
Jérémy

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Have you tried running the

Have you tried running the script for erasing the flash erase_qspi_jtag_win, if something changes ? Also have you tried to program the kit via UART ?

Thanks MT_dialog

Jérém
Offline
Last seen: 1 year 7 months ago
Joined: 2016-12-07 14:09
I got the same error with

I got the same error with erase_qspi_jtag_win.
I didn't try to program with UART, I prefer use jtag.
I try to program on an other pc running on linux and it work.
I need to work on windows, so I need to understand why it doesn't work on my pc

Thanks for your help,
Jérémy

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi Jerem,

Hi Jerem,

Check in the /utilities/scripts/qspi and check if there is a file called cli_programmer.ini, if that file is located there try to check that the gdb_server_path is valid or delete the file and try to erase or program your device again.

Thanks MT_dialog

Jérém
Offline
Last seen: 1 year 7 months ago
Joined: 2016-12-07 14:09
Hello,

Hello,

I don't have file /utilities/scripts/qspi/cli_programmer.ini.
I create one with command "cli_programmer.exe --save-ini".
I complete the path of "gdb_server_path".
I try to run launcher "program_qspi_jtag_win" but I get the same issue.
One strange point is that the command line call use a temporary file named "cfg_XXXXX.ini" and not file "cli_programmer.ini".
I check the path of gdb_server in file "cfg_XXXXX.ini" and it is the good one ("C:\Program Files (x86)\SEGGER\JLink_V512f\JLinkGDBServerCL.exe" -if SWD -device Cortex-M0 -singlerun -silent -speed 4000 -select usb=480058854 -port 2331 -swoport 2332 -telnetport 2333 -log jlink.log)
If I call the command in "cfg_XXXXX.ini" in a shell, gdb_server start without trouble.

Thanks for your help,
Jérémy

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi Jerem,

Hi Jerem,

As far as i can tell when the temporary file gets generated it immidiatelly erases, so when the cfg_XXXX.ini file you got and worked should be different from what it is generated, it seems that temporary cfg file that its been generated is using either a wrong path or its passing wrong parameters, try to take the valid cfg file (the one that it works) rename it in cli_programmer.ini and place it in the directory that i ve mentioned above, that should prevent the temporary file of being generated and the valid file should be used instead.

Thanks MT_dialog

Jérém
Offline
Last seen: 1 year 7 months ago
Joined: 2016-12-07 14:09
cmd1 = "C:\Program Files (x86

cmd1 = "C:\Program Files (x86)\SEGGER\JLink_V512f\JLinkGDBServerCL.exe" -if SWD -device Cortex-M0 -singlerun -silent -speed 4000 -select usb=480058854 -port 2331 -swoport 2332 -telnetport 2333 -log jlink.log

cmd2 = "cli_programmer.exe" --cfg "cfg_15226.ini" --prod-id DA14681-01 gdbserver write_qspi_exec "C:\XXX\Documents\DA1468x_SDK_BTLE_v_1.0.8.1050.1\projects\dk_apps\ble_profiles\ancs\DA14681-01-Release_QSPI\ancs.bin"

regarding command cmd1:
- when I use this command in shell, it works,
- Indeed, the file "cfg_XXXX.ini" is a temporary file and it is deleted quickly. But I had enough time to open it. The command is good (it is exactly cmd1),

regarding command cmd2:
- when I use this command in shell, it does not work,
- when the launcher use this command, it does not work neither.

I don't think that the issue came from "cfg_XXXX.ini" file.
I allready try to put a file "cli_programmer.ini" in the path you mention above, but in the console, I saw that launcher use a temporary file and not the provide file.

Thanks for your help,
Jérémy

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi Jerem,

Hi Jerem,

Thats strange at least on my side when i provide a the cli_programmer.ini the temp file is not getting generated and the cli_programmer.ini is getting used, but since the command is correct and the path that the cfg file is using is valid and the command that passes from the configuration file runs only if it is typed directly on the command line and fails from the configuration file (are you sure that this is the case since the way that you typed the command implies that the .ini file is at the same directory with the cli_prgrammer.exe) i am not able to see any other that might be wrong. I ve attached my cfg_configuration.ini (try to change the ) file and a command line that demonstrates the command, hope that it will help.

Thanks MT_dialog

Attachment: 
Jérém
Offline
Last seen: 1 year 7 months ago
Joined: 2016-12-07 14:09
About cli_programer.ini, my

About cli_programer.ini, my mistake, "program_qspi_jtag_win" launcher load file "cli_programer.ini" and make a copy in temporary file.
But I still have a issue, not exactly the same as before :
"Fail to bind to socket
cannot open gdb interface"

Thanks for your help,
Jérémy

Attachment: 
MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi Jerem,

Hi Jerem,

I ve run the Smart Snippets tool (the latest version - there is the 1.3.3 Smart Snippets available on the portal) on two windows 10 PC and i didn't see any issues, i was able to erase and burn the flash without problems. So i would suggest in moving to the latest version. The ports that the configuration file that i have uploaded are proper, try to use the windows command line instead of the bash, and also since you get that error, perhaps the TCP port that the gdb server requires (2331) is occupied by something else, perhaps this is what causes the issue you are seeing, also your firewall settings might be responsible for your issue. 

Thanks MT_dialog

Jérém
Offline
Last seen: 1 year 7 months ago
Joined: 2016-12-07 14:09
Hello,

Hello,
I upgrade with the last version,
I check port of my pc with netstat port 2331 is not use
I disable my firewall but it doesn't work too.
I try with windows command line but it doesn't work too.

I really don"t understand why it doesn't work ...

Thanks for your help,
Jérémy

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi Jerem,

Hi Jerem,

Check if the the J14 header is indeed populated with the appropriate jumpers (this is the Jtag connection to the PC), also if the 68x has power (in case you removed any of the jumpers) there should be a blue LED that lights up constantly (right next to the J14 header), is this LED active ? In case its not, then the 68x isn't powered at all, and the most probable cause is that either you 've removed any of the power supplying jumpers or the switch of your board is in COIN with no battery on the daughterboard. 

Also what you can also try is to download fw using the UART (perhaps the debugger module in the 68x is disabled, any of the example fw will enable it), and then try to use the JTAG interface. 

Thanks MT_dialog

Jérém
Offline
Last seen: 1 year 7 months ago
Joined: 2016-12-07 14:09
Hello,

Hello,
My hardware configuration seems good, it works on linux computer.
Downloading with uart works and jtag debug works too.
I do not understand why jtag programming doesn't work because debug use also gdb
Thanks for your help,
Jérémy

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi Jerem,

Hi Jerem,

I am sorry but i am not able to replicate what you are experiencing, i suppose that the issue is related to your PC since i am not able to see what you are mentioning on any windows 10 setup i ve tried, i would suggest testing the Smart Snippets suite on a different windows PC.

Thanks MT_dialog

tralamazza
Offline
Last seen: 1 year 2 months ago
Joined: 2017-08-30 21:59
Hi,

Hi,

I had this issue on my archlinux, what fixed my problem was to run JLinkGDBServer manually (in a separate terminal) and remove the gdb_server_path from ever being generated in the temporary config file. I've edited the prepare_local_ini_file.sh for that, on windows you probably need the .bat.

cheers,
Daniel

Chui
Offline
Last seen: 1 year 2 months ago
Joined: 2015-12-08 16:57
Hello,

Hello,
I have a similar issue, running SmartSnippet 1.6.3.918 on Windows 7 64b

When trying to flash a 14681-01 with script "program_qspi_jtag.bat" from the script menu, it says also "cannot open gdb interface"

When I dig further, I found that I can connect to the device with Jlink Commander (Commander.log)

And when I launch manually cli_programmer with the arguments found in the script, it fails (cli_gdb_server.log, jlink.log):
"..\..\..\binaries\cli_programmer.exe" --cfg "C:\Users\CHRIST~1.HUI\AppDat
a\Local\Temp\cfg_10335.ini" --prod-id DA14681-01 gdbserver write_qspi_exec "test.bin"

cli_programmer is 1.24.
Apparently, the JLink gdb server does its job, but the client cannot connect, as said.
I also tried with the firewall disabled, unsuccessfully.

Help!!

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi Chui,

Hi Chui,

Please make sure that the JTAG jumper pins are placed on the motherboard (J14 header on the pro kit) also please make sure that the daughterboard is powered, check the power jumpers on the board and that all are in the default state additionally make sure that the daughterboard has the switch pointing to VBAT and not in COIN. After you have verified the above open the J-Link GDB server and check if you are able to connect to to that. Additionally please try to install the sw and download fw using another PC.

Thanks MT_dialog

Chui
Offline
Last seen: 1 year 2 months ago
Joined: 2015-12-08 16:57
Thanks, but I forgot to

Thanks, but I forgot to mention that it happens on our own board, and that it was working with the previous SDK (1.0.8).
BTW, the fact that I can connect directly with commander shows that the hardware is correctly setup, no? Or I am missing something?

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi Chui,

Hi Chui,

Let me recap in order to check if i get this straight, the problem occurs only with a custom board and not with the dev kit and only on SDK 1.0.10, you were able to program the qspi flash or execute any of the JTAG scripts succesfully using the scripts from the SDK 1.0.8 on the dev kit and on the development board. Is my understanding correct ? If there any other interesting points about your setup it could help solving that, different flash, or anything. What i can advice you at the moment is to check which version of the jlink the Smart Snippets its using and if it used a different version between different SDKs. You will be able to check the version of the jlink that the tool uses in the Window -> Preferences -> Run / Debug in the Segger J-Link option. Also please check what i ve mentioned above regarding the power since i am not aware of any compatibility issues between the jlink and the SDK. Also you might want to run the cli_programmer directly instead of using the scripts and check if that is working.

Thanks MT_dialog

POMIN
Offline
Last seen: 2 months 3 weeks ago
Joined: 2017-08-30 14:13
Hi there,

Hi there,
I am writing to ask about a solution to fix a software development problem. I bought a DA14681 Development Kit Pro one week ago. I followed the instructions to set up the software environment on Windows Operating System(Windows 8.1 64 bit) which is Smart Snippets Studio. But I bumped into a problem when I prompted JTAG interface connecting to the DA14681 Hardware target board and Smart Snippets Studio keeps showing that it cannot open gdb interface in the Console.

First of all, I read many documents form your support forums even the FAQ. Maybe, the JTAG wasn’t installed correctly. So, I sought out the Device Manager; it shows that the JTAG was installed correctly. After confirmed JTAG installation, I thought that the Root directory might cause this problem. I tried to put the project files to the different roots, but it didn't work. Then, I saw the other issue showing on the Console of Smart Snippets Studio which was the "netstat". The interesting thing is the Smart Snippets Studio allowed using program_qspi_serial_win connect and download programming into the DA14681.

All in all, this is the situation I am struggling with when I use Smart Snippets Studio with JTAG. Could someone help me to solve this problem? If it is available, please give me detailed instructions. I look forward to hearing from you.

Thanks,
Po-Min

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi POMIN,

Hi POMIN,

So, in order to understand this correctly, when using the cli_programmer via console you are able to program and erase the dev kit, but when using the scripts directly from the eclipse enviroment the eclipse prompts you with "cannot open gdb interface" ? Is that correct (i am not sure what you mean with the "The interesting thing is the Smart Snippets Studio allowed using program_qspi_serial_win connect and download programming into the DA14681." sentence) ? The entire Smart Snippets setup is configured to work out of the box, so please make sure that the device is powered (the switch on the board is in VBAT and that the board is properly powered), the jumpers are placed on the J14 header and that the there is no other application running the GDB server.

Also please try to follow the guidelines below in case this is caused by a directories issue:

  1. Move the SDK out the C:/Users location. You can try moving the SDK somewhere in you C:/folder.
  2. Delete any metadata that was created within the project directory and start a new workspace.
  3. Open up the SS Studio again an select as a workspace, the C drive location, and make sure that you are picking the workspace to be the level that is the one above your projects, binaries, doc directory.
  4. Import the projects for a test and then build and try again to download an image using the scripts. 

Thanks MT_dialog

POMIN
Offline
Last seen: 2 months 3 weeks ago
Joined: 2017-08-30 14:13
Hi MT_dialog,

Hi MT_dialog,
I'm sorry about that I didn't describe well of the situation I get right now. The major problem was that Smart Snippets Studio didn't allow to program through program_qspi_jtag_win, which is showing cannot open gdb interface in the Console window.

First of all, I worked with Smart Snippets Studio to conduct the pxp_reporter on a DA14681 Development Kit Pro. According to the UM-B-056 document on page nine, I followed the instructions to run the pxp_reporter was programmed via program_qspi_serial_win. I had the same result as the document presented. Secondly, to answer your question, your guess was correct. I was surprised that program_qspi_jtag_win didn't work. Thirdly, I'm pretty sure that the jumper J14 are placed. Also, the power is on. Fourthly, I already did the same thing before you gave me the guidelines. Unfortunately, program_qspi_jtag_win doesn't work, and shows "cannot open gdb interface" in the Console window.

Recently, I followed a video called DA1468x SDK Create Custom Profile, which was published on 28 Nov 2017 on Dialog Semiconductor Youtube channel. I still have this problem when I did the same steps as the video showed. No matter what versions of the SDK I used, it doesn't work. In fact, I use JATG interface right now. I chose to build the project using the Debug_QSPI. Then, click on Run Debug configuration, and create a new one under the GDB SEGGER J-Link Debugging.
I would like to know why program_qspi_jtag_win doesn't work. Please help me.

Thanks,
Po-Min

MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi POMIN,

Hi POMIN,

Since the script operates from the cli_programmer console and not when invoking the command from eclipse i suppose that the issue has to do with the eclipse setup, check in the preferences -> Run/Debug -> SEGGER J-LInk and verify that the path the eclipse is pointing at is proper.

Thanks MT_dialog 

s.julien
Offline
Last seen: 8 months 4 days ago
Joined: 2018-01-22 12:09
Hello,

Hello,

we found a bug in the libprogrammer\gdb_server_cmds.c file.

The problem comes from the netstat which does not return the same things (depends on windows language, in our case "French").

The function static bool check_gdb_server_port(int pid, int port) is looking for "PID" but this pattern does not appers on our Windows.

We changed the function as followins and rebuild the cli_programmer and now it works and should works for any windows language revision.


#ifdef WIN32
static bool check_gdb_server_port(int pid, int port)
{
FILE *fp;
char buf[50];
int cnt = 0;
int netstat_port = -1;
int netstat_pid = -1;

fp = _popen("netstat -nao | more /E +4", "r");

while (fscanf(fp, "%s", buf) == 1) {

switch (cnt) {
case 1:
/* local address - get port */
netstat_port = atoi(strchr(buf, ':') + 1);
break;
case 2:
/*
* The '*:*' value of foreign address is appearing in case of UDP protocol.
* In this protocol the state value doesn't exist - state column should be
* skipped.
*/
if (!strcmp(buf, "*:*")) {
++cnt;
}
break;
case 4:
/* pid */
netstat_pid = atoi(buf);

if (netstat_port == port && netstat_pid == pid) {
_pclose(fp);
return true;
}
break;
}

cnt = (cnt + 1) % 5;
}

_pclose(fp);
return false;
}
#endif

Attachment: 
MT_dialog
Offline
Last seen: 6 hours 34 min ago
Staff
Joined: 2015-06-08 11:34
Hi s.julien,

Hi s.julien,

Thanks for the indication, i will let the team know about this.

Best Regards MT_dialog

bobspam@free.fr
Offline
Last seen: 2 weeks 5 hours ago
Joined: 2018-06-20 08:07
Hello

Hello

I have similar problems using DA1468x_DA15xxx_SDK_1.0.14.1081 on a french windows 64 bit computer together with jlink v6.34e.
I am using the Dialog DA14683 USB hardware.

Can you confirm to me that this bug has been taken into account in this version ?

Thank you in advance

PM_Dialog
Offline
Last seen: 6 hours 46 min ago
Staff
Joined: 2018-02-08 11:03
Hi bobspam@free.fr,

Hi bobspam@free.fr,

This bug has been fixed int the latest version of SDK. Please check the libprogrammer\gdb_server_cmds.c file.

Thanks, PM_DIalog