wr-sw flashing trouble

Ok, let’s try this new forum!

I’m having trouble flashing one of our wr-sws (Seven Solutions, v3.4-H (LX240T FPGA)). Following the instructions in 5.0.1 Developer’s manual, flashing procedure is stuck after running flash-wrs. Output from the script is:

Initializing DDR...
loading applet isp-extram-at91sam9g45 at 0x00300000
Initializing DDR > Done
Initializing DataFlash...
loading applet isp-dataflash-at91sam9g45 at 0x00300000

After printing out the lines above, the script freezes forever. Any ideas what might cause this? USB communication problems? I used a USB 2.0 port, since I couldn’t get the programming interface to work with USB 3 ports. Any way to recover the switch, except using the JTAG interface?

Output from the ARM test port is:

-I- Startup: PMC_MCKR 1202 MCK = 100000000 command = 0
-I- -- EXTRAM ISP Applet 2.9 --
-I- -- AT91SAM9G45-EK
-I- -- Compiled: Jun 20 2012 18:43:16 f708d96+ --
-I- INIT command:
-I-     Communication link type : 0
-I-     Data bus width : 16 bits
-I-     External RAM type : DDRAM
-I-     Init EBI Vdd : 1.8V
-I-     Init DDRAM ... (model : 0)
-I-     DDR2 Config: 0x39 (NC=10, NR=13, CAS=3, ba_offset=24) 
-I-     Init successful.
-I-     End of applet (command : 0 --- status : 0)

Thanks in advance!

With regards,
Kalle Hanhijärvi

Hi Kalle,

Have you had a problem with firmware that you decided to flash via USB?
Does it stop always at the same place?
Which OS and version do you use?
I know that there was a series of switches that required a 1.X USB HUB. However, If I remember correctly for these switches the flashing device was not detected by the host system.


Hi Adam,

Thanks for the reply.

Well, actually I tried to flash the official 5.0.1 firmware. I tried installing it the usual way by uploading wrs-firmware.tar to the update partition. However, after the upgrade HAL service failed to initialize, and the following error was present during boot:

Booting FPGA: .........................................
Writing memory (0x01c8 bytes at 0x0000): .
Verifing memory: . OK.
Writing memory (0x4108 bytes at 0x01c8): ..
Verifing memory: .. OK.
Writing memory (0x0c5c bytes at 0x42d0): .
Verifing memory: . OK.
Writing memory (0x0540 bytes at 0x4f30): .
Verifing memory: . OK.
Writing memory (0x0074 bytes at 0x6800): .
Verifing memory: . OK.
The bitstream /wr/lib/firmware/18p_mb-LX240T.bin is not correct or there something is not working with the FPGA
Expected: [0x10030034] = 0xcafebabe
Current: [0x10030034] = 0x00000000
LM32 program and drivers for the bitstream components will not be loaded

So I (unwisely) tried the flashing approach. The switch was previously running 4.2 firmware.

Flashing usually stops in the same place, but not always. Occasionally it gets stuck at the first “Initializing DDR…” output. Once it even erased DataFlash before stopping.

I tried flasing with Ubuntu 18.04 LTS and Debian 9.5. Flashing scripts are cloned from the git repository.

AFAIK ttyACM0 gets detected correctly every time by the OS (as long as I don’t use USB 3 ports, that is).


Ok, so some updates on the progress:

Using an old USB 2.0 hub, I was able to flash 5.0.1 firmware to the switch. However the switch is still unable to load HAL service.

wrs_version gives:

PCB:3.30, FPGA:UNKNOWN; version: v5.0.1 (Grzegorz Daniluk); compiled at Aug 25 2017 12:15:26

So apparently bitstream is still not loaded correctly.

Trying to open wr_mon complains about HAL:

wr_mon: Error: Unable to open HAL's shm !

And ifconfig only shows eth0 (management) and lo interfaces.

  • Kalle


I do not know if it really helps :

we had some WRS switche with a similar message :

Unable to open HAL’s shmem
Unable to open shm for RTUd

Flashing the WRS not help. We had a problem on the SCB boards.
We send the WRS back to the manufacturer.
He repair/change the SCB board and the error was gone



Ok, thanks for the info. Actually we were able to solve the problem with some help from Seven Solutions. Apparently, hwinfo for the FPGA board was lost during one of my flash attempts. Manufacturer provided us with the correct hwinfo and now the switch works fine.

  • Kalle