Stuck Trying to flash the matrix creator

Hi, I am unsure on what command to run for this line in the documentation

Then flash the firmware using the openocd program that should be installed on the Raspberry (with the package matrix-creator-openocd).

I am currently trying to get the sensors to give me something other than non-zero values.

HI @UltimateKnight,

You are right, the text seems to be a little misleading. This line, “Then flash the firm…” is just telling you that the next steps are related to that. You should go to the next steps on the document.

Also I wanted to point out the porpuse of this guide is to show you haw to do the flashing by yourself. But if you already install MALOS or already install MALOS following instructions in https://github.com/matrix-io/matrix-creator-malos, the flashing is done automatically when the Raspberry Pi is rebooted.

Hope this help,
Keep us updated about your progress.

Yoel

Did you have any luck with sensors?
I can get a temp, but only 0 from humidity, pressure, UV and the IMU.

If you’ve any tips, I’d appreciate your input.

Hi @bryce,

Probably you already tried some of this:

  • Reboot your Rasp Pi (unplug and plug again )
  • Test with a second SD Card or just start installation form scratch.
  • If you’ve tried all this then try
sudo /usr/share/admobilize/matrix-creator/creator-init.bash

This is the script that runs after boot that programs the FPGA and the MCU if needed.

Please, get back to us with the results

Yoel

Thanks a lot Yoel. I appreciate your help. Here is the output of the command.

XC3SPROG © 2004-2011 xc3sprog project $Rev: 774 $ OS: Linux
Free software: If you contribute nothing, expect nothing!
Feedback on success/failure/enhancement requests:
http://sourceforge.net/mail/?group_id=170565
Check Sourceforge for updates:
http://sourceforge.net/projects/xc3sprog/develop

DNA is 0x79e97e9776d5b3fd
**** FPGA programmed!
Open On-Chip Debugger 0.10.0-dev-00290-g09c0d1b-dirty (2016-12-07-14:19)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO config: tck = 17, tms = 4, tdi = 22, tdo = 27
BCM2835 GPIO config: trst = 18
trst_only separate trst_push_pull
adapter speed: 200 kHz
Warn : em357.bs.bs: nonstandard IR value
Warn : Specify TAP ‘em357.cpu.cpu’ by name, not number 0
cortex_m reset_config vectreset
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : clock speed 200 kHz
Info : JTAG tap: em357.cpu.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: em357.bs.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corporation), part: 0x69aa, ver: 0x0)
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x24000093 (mfg: 0x049 (Xilinx), part: 0x4000, ver: 0x2)
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : em357.cpu: hardware has 6 breakpoints, 4 watchpoints
em357.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x080803f6 msp: 0x200000f8
Info : flash size = 192kbytes
#0 : em357 at 0x08000000, size 0x00030000, buswidth 0, chipwidth 0

0: 0x00000000 (0x800 2kB) not protected

1: 0x00000800 (0x800 2kB) not protected

2: 0x00001000 (0x800 2kB) not protected

3: 0x00001800 (0x800 2kB) not protected

4: 0x00002000 (0x800 2kB) not protected

5: 0x00002800 (0x800 2kB) not protected

6: 0x00003000 (0x800 2kB) not protected

7: 0x00003800 (0x800 2kB) not protected

8: 0x00004000 (0x800 2kB) not protected

9: 0x00004800 (0x800 2kB) not protected

10: 0x00005000 (0x800 2kB) not protected

11: 0x00005800 (0x800 2kB) not protected

12: 0x00006000 (0x800 2kB) not protected

13: 0x00006800 (0x800 2kB) not protected

14: 0x00007000 (0x800 2kB) not protected

15: 0x00007800 (0x800 2kB) not protected

16: 0x00008000 (0x800 2kB) not protected

17: 0x00008800 (0x800 2kB) not protected

18: 0x00009000 (0x800 2kB) not protected

19: 0x00009800 (0x800 2kB) not protected

20: 0x0000a000 (0x800 2kB) not protected

21: 0x0000a800 (0x800 2kB) not protected

22: 0x0000b000 (0x800 2kB) not protected

23: 0x0000b800 (0x800 2kB) not protected

24: 0x0000c000 (0x800 2kB) not protected

25: 0x0000c800 (0x800 2kB) not protected

26: 0x0000d000 (0x800 2kB) not protected

27: 0x0000d800 (0x800 2kB) not protected

28: 0x0000e000 (0x800 2kB) not protected

29: 0x0000e800 (0x800 2kB) not protected

30: 0x0000f000 (0x800 2kB) not protected

31: 0x0000f800 (0x800 2kB) not protected

32: 0x00010000 (0x800 2kB) not protected

33: 0x00010800 (0x800 2kB) not protected

34: 0x00011000 (0x800 2kB) not protected

35: 0x00011800 (0x800 2kB) not protected

36: 0x00012000 (0x800 2kB) not protected

37: 0x00012800 (0x800 2kB) not protected

38: 0x00013000 (0x800 2kB) not protected

39: 0x00013800 (0x800 2kB) not protected

40: 0x00014000 (0x800 2kB) not protected

41: 0x00014800 (0x800 2kB) not protected

42: 0x00015000 (0x800 2kB) not protected

43: 0x00015800 (0x800 2kB) not protected

44: 0x00016000 (0x800 2kB) not protected

45: 0x00016800 (0x800 2kB) not protected

46: 0x00017000 (0x800 2kB) not protected

47: 0x00017800 (0x800 2kB) not protected

48: 0x00018000 (0x800 2kB) not protected

49: 0x00018800 (0x800 2kB) not protected

50: 0x00019000 (0x800 2kB) not protected

51: 0x00019800 (0x800 2kB) not protected

52: 0x0001a000 (0x800 2kB) not protected

53: 0x0001a800 (0x800 2kB) not protected

54: 0x0001b000 (0x800 2kB) not protected

55: 0x0001b800 (0x800 2kB) not protected

56: 0x0001c000 (0x800 2kB) not protected

57: 0x0001c800 (0x800 2kB) not protected

58: 0x0001d000 (0x800 2kB) not protected

59: 0x0001d800 (0x800 2kB) not protected

60: 0x0001e000 (0x800 2kB) not protected

61: 0x0001e800 (0x800 2kB) not protected

62: 0x0001f000 (0x800 2kB) not protected

63: 0x0001f800 (0x800 2kB) not protected

64: 0x00020000 (0x800 2kB) not protected

65: 0x00020800 (0x800 2kB) not protected

66: 0x00021000 (0x800 2kB) not protected

67: 0x00021800 (0x800 2kB) not protected

68: 0x00022000 (0x800 2kB) not protected

69: 0x00022800 (0x800 2kB) not protected

70: 0x00023000 (0x800 2kB) not protected

71: 0x00023800 (0x800 2kB) not protected

72: 0x00024000 (0x800 2kB) not protected

73: 0x00024800 (0x800 2kB) not protected

74: 0x00025000 (0x800 2kB) not protected

75: 0x00025800 (0x800 2kB) not protected

76: 0x00026000 (0x800 2kB) not protected

77: 0x00026800 (0x800 2kB) not protected

78: 0x00027000 (0x800 2kB) not protected

79: 0x00027800 (0x800 2kB) not protected

80: 0x00028000 (0x800 2kB) not protected

81: 0x00028800 (0x800 2kB) not protected

82: 0x00029000 (0x800 2kB) not protected

83: 0x00029800 (0x800 2kB) not protected

84: 0x0002a000 (0x800 2kB) not protected

85: 0x0002a800 (0x800 2kB) not protected

86: 0x0002b000 (0x800 2kB) not protected

87: 0x0002b800 (0x800 2kB) not protected

88: 0x0002c000 (0x800 2kB) not protected

89: 0x0002c800 (0x800 2kB) not protected

90: 0x0002d000 (0x800 2kB) not protected

91: 0x0002d800 (0x800 2kB) not protected

92: 0x0002e000 (0x800 2kB) not protected

93: 0x0002e800 (0x800 2kB) not protected

94: 0x0002f000 (0x800 2kB) not protected

95: 0x0002f800 (0x800 2kB) not protected

Info : flash size = 192kbytes
flash ‘em357’ found at 0x08000000
Info : JTAG tap: em357.cpu.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: em357.bs.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corporation), part: 0x69aa, ver: 0x0)
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x24000093 (mfg: 0x049 (Xilinx), part: 0x4000, ver: 0x2)
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
wrote 50000 bytes to file /tmp/em358_dump from flash bank 0 at offset 0x00000000 in 1.695485s (28.799 KiB/s)
shutdown command invoked
Running the program instead of the bootloader
EM358 MCU was programmed before. Not programming it again.
Running the program instead of the bootloader
**** Could not program SAM3 MCU, you must be check the logfile /tmp/sam3-program.log

And the logfile /tmp/sam3-program.log

Open On-Chip Debugger 0.10.0-dev-00290-g09c0d1b-dirty (2016-12-07-14:19)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
SysfsGPIO nums: tck = 17, tms = 4, tdi = 22, tdo = 27
SysfsGPIO num: trst = 18
trst_only separate trst_push_pull
adapter speed: 128 kHz
Warn : em357.bs: nonstandard IR value
Warn : Specify TAP ‘sam3n.cpu.cpu’ by name, not number 3
Info : SysfsGPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Warn : gpio 18 is already exported
Info : This adapter doesn’t support configurable speed
Info : JTAG tap: em358.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: em357.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corporation), part: 0x69aa, ver: 0x0)
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x24000093 (mfg: 0x049 (Xilinx), part: 0x4000, ver: 0x2)
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Info : sam3n.cpu: hardware has 6 breakpoints, 4 watchpoints
sam3n.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x00403aa6 psp: 0x200015e0
#0 : at91sam3 at 0x00400000, size 0x00020000, buswidth 0, chipwidth 0

0: 0x00000000 (0x4000 16kB) not protected

1: 0x00004000 (0x4000 16kB) not protected

2: 0x00008000 (0x4000 16kB) not protected

3: 0x0000c000 (0x4000 16kB) not protected

4: 0x00010000 (0x4000 16kB) not protected

5: 0x00014000 (0x4000 16kB) not protected

6: 0x00018000 (0x4000 16kB) not protected

7: 0x0001c000 (0x4000 16kB) not protected

flash ‘at91sam3’ found at 0x00400000
wrote 35220 bytes from file blob/ch.bin to flash bank 0 at offset 0x00000000 in 4.562173s (7.539 KiB/s)
Info : JTAG tap: em358.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: em357.bs tap/device found: 0x069aa62b (mfg: 0x315 (Ember Corporation), part: 0x69aa, ver: 0x0)
Info : JTAG tap: xc6sxl4.fpga.fpga tap/device found: 0x24000093 (mfg: 0x049 (Xilinx), part: 0x4000, ver: 0x2)
Info : JTAG tap: sam3n.cpu.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x4)
Warn : Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support.
shutdown command invoked

Can you show me the content of the matrix-creator folder:

cd /usr/share/admobilize/matrix-creator/
ls -l

Also , are you using Raspbian Jessie LITE or PIXEL ?

-rwxr-xr-x 1 root root 2106 Jul 26 2016 admobilize_edit_setting.py
-rwxr-xr-x 1 root root 286 Jan 24 04:14 admobilize_remove_console.py
drwxr-xr-x 2 root root 4096 Feb 24 01:29 blob
drwxr-xr-x 2 root root 4096 Feb 24 01:29 cfg
drwxr-xr-x 2 root root 4096 Feb 24 01:29 config
-rwxr-xr-x 1 root root 132 Jan 17 07:25 creator-init.bash
-rwxr-xr-x 1 root root 1966 Jan 24 04:14 em358-program.bash
-rwxr-xr-x 1 root root 12916 Jan 31 05:10 firmware_info
-rwxr-xr-x 1 root root 553 Jul 23 2016 fpga-program.bash
-rw-r–r-- 1 root root 723 Jul 27 2016 lirc_hardware.conf
-rw-r–r-- 1 root root 37 Oct 28 07:55 mcu_firmware.version
-rwxr-xr-x 1 root root 288 Jan 17 07:25 radio-init.bash
-rwxr-xr-x 1 root root 2478 Jan 24 04:14 sam3-program.bash

I’m on LITE

Are you using JS in MOS to get this values? Or you are running the examples in MALOS or HAL ?
Can you me the output when you run your app ?

root@bob:~# cd matrix-creator-malos/src/js_test/
root@bob:~/matrix-creator-malos/src/js_test# node test_imu.js
Sending pings every 5 seconds{ yaw: 0,
pitch: 0,
roll: 0,
accel_x: 0,
accel_y: 0,
accel_z: 0,
gyro_x: 0,
gyro_y: 0,
gyro_z: 0,
mag_x: 0,
mag_y: 0,
mag_z: 0 }
{ yaw: 0,
pitch: 0,
roll: 0,
accel_x: 0,
accel_y: 0,
accel_z: 0,
gyro_x: 0,
gyro_y: 0,
gyro_z: 0,
mag_x: 0,
mag_y: 0,
mag_z: 0 }

Hey I’ve just noticed. There used to be a LED constantly on, on the top of the board. It’s off now. What do the top LEDs indicate? I couldn’t find anything in the documentation.

Hey Yoel. I did a fresh install on a different SD, and things are working.
Most likely I just screwed something up on the last one.

Thanks for your help mate!!!

1 Like

Glad to help and you have everything up and running !