SDCard Problem

Ok, in order to bring these windows issues to an end, I will integrate a new bootloader option into MIOS32 which enforces the usage of a special descriptor which only specifies a single USB port.

 

This should allow to enable the workaround without the need to recompile the application.

 

Best Regards, Thorsten.

That sounds good to me.

 

And just to support the impression that something is wrong on the Windows side of things: I am having issues with my Win7 32bit system not recognizing different cores as well. I installed the GM5 drivers long ago, because I have one GM5x5, one LPC17-based and one STM32-based experimental system, and one LPC17-based SEQV4. I have never gotten around to look into when exactly communication starts to fail, I cannot see any pattern. This is mainly a problem with the experimental systems, when the cores will just not be recognized after the upload of a new software. I then have to reboot the core, quit MIOS Studio (sometimes just rescanning for MIDI devices works) and start over again. I am never having issues with the SD card, though.

Just for more infos, on my side about this issue : on my first laptop (Dell D630, WinXP 32 SP2) I basically have the problems described by Duggle .

-Barely no way to load any “big” NGC file in the file broser like default.ngc (the file opens in the editor once over 20 times) loading stays stuck at 98-99%. With a powered hub, it gets even worst, as it barely loads 6/7% of any file before it says “no response from mios32 core during reading operation”.

 

-when testing config files (copy/paste of the “getting started” examples from user manual) nothing involving banks works properly : bank is allways 0 in the debug window when pushing the bank select buttons.

 

-The weirdest, With simple example files like “hello.ngc” : let’s say I’ve got two files “hello1.ngc” and “hello2.ngc” with two different text strings just to differenciate them. I can manage to do :

 

load hello1

save hello2

and it works as it should. but after that, sometimes, when loading “hello2.ngc” in the editor, I get the surprise that the content of default.ngc has overwritten the original content of the file ! I’ve checked many times: it’s not a mistake on my side…

 

load hello2

save default

doesn’t work. It says that default.ngc is saved but when loading it, it simply loads the original default file.

 

after that, sometimes, when loading “hello2.ngc” in the editor, I get the surprise that the content of default.ngc has overwritten the original content of the file ! I’ve checked many times: it’s not a mistake on my side…

 

More revelant (maybe) : I just changed the “READY” message at startup in the default.ngc for “HELLO”, just for testing purpose. So, when power cycling the NG, it says “HELLO”, and not “READY”. now, imagine me doing the dance of the victory on my couch, because it works ! So, lets go back to the “rotate me!” experiment on the getting started page, click, click, in my hello.ngc config, no problems. So, encoders are basically working, now let’s load the default.ngc file again… Wich says “READY” instead of “HELLO”!!!  from what I understand, the NG just acted as if there wasn’t any default file on the SDcard and recreated one new, erasing the previous one with “HELLO” as starting message.

 

By the way, on my other laptop, (an almost dead Dell D620, with no cpu cooling, very slow, that barely works 15 minutes before it freezes completly, with WinXP 32 SP1) I don’t have any of those issues, file editing, bank creation, loading, saving, everything, so far, from what I can check in less than 15 minutes, works flawlessly… too bad it olny last so little time on a laptop with yoghurt and chocolate all over the screen and keyboard, so many missing keys, and a not working trackpad and buttons : My only midibox compatible computer is my 2 years old daughter’s toy . Damn…

 

Laurent.

 

Alright, try again with the Bootloader Update package V1.012 (to enable the single_usb option) and with MBNG V1.021

 

Don’t use the GM5 driver anymore, the windows legacy USB MIDI driver works fine with a single USB port.

 

Something came in my mind while reading your report: is the SD Card still working reliable after all the experiments? E.g. if the directory wasn’t updated correctly - maybe even unrelated to the USB issues - maybe due to a power issue - then corrupted filepointers could lead to the effect that two directory entries point to the same (physical) file.

 

Therefore I would propose to format the SD Card again after the application updates to ensure that a corrupted filesystem won’t lead to wrong assumptions at your side

 

Best Regards, Thorsten.

Hello, more on this topic :

 

first, last ng version in conjunction with the new beta version of mios studio seems to have corrected some issues I had:

my midibox is now able to handle conditional events (with exact same ngc file used without modifications).

 

Now:

here is the simple TEST.NGC file I was trying to get working (and which works now as it should):

RESET_HW

LCD "%C"

ENC n=1 sr=1 pins=0:1 type=detented2

EVENT_BUTTON id=5 type=meta meta=UpdateLcd range=0:1 button_mode=Toggle lcd_pos=1:1:1 label="Mode #%d"

EVENT_ENC id=1 if_equal=button:5:0 type=CC cc=16 lcd_pos=1:1:2 label="Enc %3d"

now, in order to make it my default config when powering my midibox, I type the folowing in the command line of mios studio:

 

load test

 

save default

 

then, when I power cycle my midibox, I get a “READY” message at power on (like if “factory default” DEFAULT.NGC was loaded again".

BUT: operating button #5 and encoder #1 make the unit working like it should in my TEST example.

here is then how my DEFAULT.NGC looks like :

# Reset to default
RESET_HW


# LCD message after load
LCD "%C@(1:1:1)READY."


# EVENTs
EVENT_BUTTON id= 5 type=Meta meta=UpdateLcd range= 0:1 offset= 0 ports=1000100000001000 button_mode=Toggle lcd_pos=1:1:1 label="Mode #%d"
EVENT_ENC id= 1 if_equal=BUTTON:5:0 type=CC chn= 1 cc= 16 range= 0:127 offset= 0 ports=1000100000001000 lcd_pos=1:1:2 label="Enc %3d"


# SysEx variables
SYSEX_VAR dev=0 pat=0 bnk=0 ins=0 chn=0


# ENC hardware
ENC n= 1 sr= 1 pins=0:1 type=detented2


# DIN_MATRIX hardware
DIN_MATRIX n= 1 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_din1= 0 sr_din2= 0
DIN_MATRIX n= 2 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_din1= 0 sr_din2= 0
DIN_MATRIX n= 3 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_din1= 0 sr_din2= 0
DIN_MATRIX n= 4 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_din1= 0 sr_din2= 0
DIN_MATRIX n= 5 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_din1= 0 sr_din2= 0
DIN_MATRIX n= 6 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_din1= 0 sr_din2= 0
DIN_MATRIX n= 7 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_din1= 0 sr_din2= 0
DIN_MATRIX n= 8 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_din1= 0 sr_din2= 0


# DOUT_MATRIX hardware
DOUT_MATRIX n=1 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_dout_r1= 0 sr_dout_r2= 0 sr_dout_g1= 0 sr_dout_g2= 0 sr_dout_b1= 0 sr_dout_b2= 0
DOUT_MATRIX n=2 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_dout_r1= 0 sr_dout_r2= 0 sr_dout_g1= 0 sr_dout_g2= 0 sr_dout_b1= 0 sr_dout_b2= 0
DOUT_MATRIX n=3 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_dout_r1= 0 sr_dout_r2= 0 sr_dout_g1= 0 sr_dout_g2= 0 sr_dout_b1= 0 sr_dout_b2= 0
DOUT_MATRIX n=4 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_dout_r1= 0 sr_dout_r2= 0 sr_dout_g1= 0 sr_dout_g2= 0 sr_dout_b1= 0 sr_dout_b2= 0
DOUT_MATRIX n=5 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_dout_r1= 0 sr_dout_r2= 0 sr_dout_g1= 0 sr_dout_g2= 0 sr_dout_b1= 0 sr_dout_b2= 0
DOUT_MATRIX n=6 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_dout_r1= 0 sr_dout_r2= 0 sr_dout_g1= 0 sr_dout_g2= 0 sr_dout_b1= 0 sr_dout_b2= 0
DOUT_MATRIX n=7 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_dout_r1= 0 sr_dout_r2= 0 sr_dout_g1= 0 sr_dout_g2= 0 sr_dout_b1= 0 sr_dout_b2= 0
DOUT_MATRIX n=8 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1= 0 sr_dout_sel2= 0 sr_dout_r1= 0 sr_dout_r2= 0 sr_dout_g1= 0 sr_dout_g2= 0 sr_dout_b1= 0 sr_dout_b2= 0


# LED_MATRIX_PATTERNs
LED_MATRIX_PATTERN n=1 pos= 0 pattern=1000000000000000
LED_MATRIX_PATTERN n=1 pos= 1 pattern=1100000000000000
LED_MATRIX_PATTERN n=1 pos= 2 pattern=1100000000000000
LED_MATRIX_PATTERN n=1 pos= 3 pattern=1110000000000000
LED_MATRIX_PATTERN n=1 pos= 4 pattern=1110000000000000
LED_MATRIX_PATTERN n=1 pos= 5 pattern=1111000000000000
LED_MATRIX_PATTERN n=1 pos= 6 pattern=1111000000000000
LED_MATRIX_PATTERN n=1 pos= 7 pattern=1111100000000000
LED_MATRIX_PATTERN n=1 pos= M pattern=1111110000010000
LED_MATRIX_PATTERN n=1 pos= 8 pattern=1111111000000000
LED_MATRIX_PATTERN n=1 pos= 9 pattern=1111111100000000
LED_MATRIX_PATTERN n=1 pos=10 pattern=1111111100000000
LED_MATRIX_PATTERN n=1 pos=11 pattern=1111111110000000
LED_MATRIX_PATTERN n=1 pos=12 pattern=1111111110000000
LED_MATRIX_PATTERN n=1 pos=13 pattern=1111111111000000
LED_MATRIX_PATTERN n=1 pos=14 pattern=1111111111000000
LED_MATRIX_PATTERN n=1 pos=15 pattern=1111111111100000

LED_MATRIX_PATTERN n=2 pos= 0 pattern=1111110000000000
LED_MATRIX_PATTERN n=2 pos= 1 pattern=0111110000000000
LED_MATRIX_PATTERN n=2 pos= 2 pattern=0111110000000000
LED_MATRIX_PATTERN n=2 pos= 3 pattern=0011110000000000
LED_MATRIX_PATTERN n=2 pos= 4 pattern=0001110000000000
LED_MATRIX_PATTERN n=2 pos= 5 pattern=0001110000000000
LED_MATRIX_PATTERN n=2 pos= 6 pattern=0000110000000000
LED_MATRIX_PATTERN n=2 pos= 7 pattern=0000010000000000
LED_MATRIX_PATTERN n=2 pos= M pattern=0000111000010000
LED_MATRIX_PATTERN n=2 pos= 8 pattern=0000010000000000
LED_MATRIX_PATTERN n=2 pos= 9 pattern=0000011000000000
LED_MATRIX_PATTERN n=2 pos=10 pattern=0000011000000000
LED_MATRIX_PATTERN n=2 pos=11 pattern=0000011100000000
LED_MATRIX_PATTERN n=2 pos=12 pattern=0000011110000000
LED_MATRIX_PATTERN n=2 pos=13 pattern=0000011110000000
LED_MATRIX_PATTERN n=2 pos=14 pattern=0000011111000000
LED_MATRIX_PATTERN n=2 pos=15 pattern=0000011111100000

LED_MATRIX_PATTERN n=3 pos= 0 pattern=1000000000000000
LED_MATRIX_PATTERN n=3 pos= 1 pattern=0100000000000000
LED_MATRIX_PATTERN n=3 pos= 2 pattern=0100000000000000
LED_MATRIX_PATTERN n=3 pos= 3 pattern=0010000000000000
LED_MATRIX_PATTERN n=3 pos= 4 pattern=0010000000000000
LED_MATRIX_PATTERN n=3 pos= 5 pattern=0001000000000000
LED_MATRIX_PATTERN n=3 pos= 6 pattern=0000100000000000
LED_MATRIX_PATTERN n=3 pos= 7 pattern=0000010000000000
LED_MATRIX_PATTERN n=3 pos= M pattern=0000111000010000
LED_MATRIX_PATTERN n=3 pos= 8 pattern=0000010000000000
LED_MATRIX_PATTERN n=3 pos= 9 pattern=0000001000000000
LED_MATRIX_PATTERN n=3 pos=10 pattern=0000000100000000
LED_MATRIX_PATTERN n=3 pos=11 pattern=0000000100000000
LED_MATRIX_PATTERN n=3 pos=12 pattern=0000000010000000
LED_MATRIX_PATTERN n=3 pos=13 pattern=0000000001000000
LED_MATRIX_PATTERN n=3 pos=14 pattern=0000000001000000
LED_MATRIX_PATTERN n=3 pos=15 pattern=0000000000100000

LED_MATRIX_PATTERN n=4 pos= 0 pattern=0000010000000000
LED_MATRIX_PATTERN n=4 pos= 1 pattern=0000010000000000
LED_MATRIX_PATTERN n=4 pos= 2 pattern=0000111000000000
LED_MATRIX_PATTERN n=4 pos= 3 pattern=0000111000000000
LED_MATRIX_PATTERN n=4 pos= 4 pattern=0000111000000000
LED_MATRIX_PATTERN n=4 pos= 5 pattern=0001111100000000
LED_MATRIX_PATTERN n=4 pos= 6 pattern=0001111100000000
LED_MATRIX_PATTERN n=4 pos= 7 pattern=0001111100000000
LED_MATRIX_PATTERN n=4 pos= M pattern=0011111110010000
LED_MATRIX_PATTERN n=4 pos= 8 pattern=0011111110000000
LED_MATRIX_PATTERN n=4 pos= 9 pattern=0011111110000000
LED_MATRIX_PATTERN n=4 pos=10 pattern=0011111110000000
LED_MATRIX_PATTERN n=4 pos=11 pattern=0111111111000000
LED_MATRIX_PATTERN n=4 pos=12 pattern=0111111111000000
LED_MATRIX_PATTERN n=4 pos=13 pattern=0111111111000000
LED_MATRIX_PATTERN n=4 pos=14 pattern=1111111111100000
LED_MATRIX_PATTERN n=4 pos=15 pattern=1111111111100000



# AIN hardware
AIN enable_mask=000000


# AINSER hardware
AINSER n=1 enabled=0 cs=0 num_pins=64 resolution=7bit
AINSER n=2 enabled=0 cs=1 num_pins=64 resolution=7bit


# KEYBOARD hardware
KEYBOARD n=1 rows=0 dout_sr1=0 dout_sr2=0 din_sr1=0 din_sr2=0 din_inverted=0 break_inverted=0 din_key_offset=32 \
               scan_velocity=1 scan_optimized=0 note_offset=36 \
               delay_fastest=5 delay_fastest_black_keys=0 delay_slowest=100
KEYBOARD n=2 rows=0 dout_sr1=0 dout_sr2=0 din_sr1=0 din_sr2=0 din_inverted=0 break_inverted=0 din_key_offset=32 \
               scan_velocity=1 scan_optimized=0 note_offset=36 \
               delay_fastest=5 delay_fastest_black_keys=0 delay_slowest=100


# MF hardware (has to be configured for Motormix protocol!)
MF n=1 enabled=0 midi_in_port=0x00 midi_out_port=0x00 chn=1 ts_first_button_id=0 config_port=0x00
MF n=2 enabled=0 midi_in_port=0x00 midi_out_port=0x00 chn=1 ts_first_button_id=0 config_port=0x00
MF n=3 enabled=0 midi_in_port=0x00 midi_out_port=0x00 chn=1 ts_first_button_id=0 config_port=0x00
MF n=4 enabled=0 midi_in_port=0x00 midi_out_port=0x00 chn=1 ts_first_button_id=0 config_port=0x00


# AOUT hardware
AOUT type=none cs=0 num_channels=8


# ROUTER definitions (Note: chn=0 disables, chn=17 selects all channels)
ROUTER n= 1 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n= 2 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n= 3 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n= 4 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n= 5 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n= 6 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n= 7 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n= 8 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n= 9 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n=10 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n=11 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n=12 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n=13 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n=14 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n=15 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17
ROUTER n=16 src_port=USB1 src_chn= 0 dst_port=OUT1 dst_chn=17


# Ethernet Setup
ETH dhcp=1 local_ip=192.168.1.180 netmask=255.255.255.0 gateway=192.168.1.1


# OSC Configuration
OSC n=1 remote_ip=192.168.1.101 remote_port=8001 local_port=8000 transfer_mode=MIDI
OSC n=2 remote_ip=192.168.1.101 remote_port=8001 local_port=8000 transfer_mode=MIDI
OSC n=3 remote_ip=192.168.1.101 remote_port=8001 local_port=8000 transfer_mode=MIDI
OSC n=4 remote_ip=192.168.1.101 remote_port=8001 local_port=8000 transfer_mode=MIDI


# Misc. Configuration
DebounceCtr 20
GlobalChannel 0
AllNotesOffChannel 0
ConvertNoteOffToOn0 1

It seems that the events and hardware definitions of my TEST config have been “merged” into the initial default.ngc . Isn’t the new ngc file supposed to replace

the former one when I save it under “default” name ? Am I missing something ?

 

anyway, this is now way more manageable, and VERY BIG THANKS to you, TK, for such a powerful and inspiring tool ! I have to think to “buy TK a beer” or several…

 

Laurent.

first, last ng version in conjunction with the new beta version of mios studio seems to have corrected some issues I had:

my midibox is now able to handle conditional events (with exact same ngc file used without modifications).

 

cool! :slight_smile:

 

 

 

then, when I power cycle my midibox, I get a “READY” message at power on (like if “factory default” DEFAULT.NGC was loaded again".

 

“save default” will generate a DEFAULT.NGC file from values stored in RAM (also the ones which you haven’t specified, but which are active - such as LED_MATRIX_PATTERNs)

Since the “LCD” command is directly processed from SD Card, and not stored in RAM (would be a waste of memory), it will get lost and therefore won’t be stored.

 

There are two alternatives:

  • either directly upload the DEFAULT.NGC file without using the “store” function

  • or write the LCD command into the DEFAULT.NGR file:

 

if ^section == 0
  LCD "%C"
endif

 

 

 

 

Best Regards, Thorsten.