0

Is my bootloader faulty?
Moderators: altitude, adafruit_support_bill, adafruit, phono, hamburgers

Please be positive and constructive with your questions and comments.

Is my bootloader faulty?

by Oortone on Tue Dec 05, 2017 7:58 pm

I've trouble getting bootloader mode to work.

According to what I've read some leds are supposed to blink when starting in Booltloader mode.
Which ones?

When I start I mostly get no leds, sometimes I get all (or almost all) leds. This is less often.

x0xbox seems to be working otherwise.
USB communication with c0ntr0l seems to work but not firmware upgrade.

Since I don't know which OS is on the CPU I'm guessing the only option for me is to buy a new CPU with a modern OS?
Or could I initialize it somehow?

Oortone
 
Posts: 2
Joined: Tue Dec 05, 2017 7:54 pm

Re: Is my bootloader faulty?

by Nordcore on Wed Dec 06, 2017 2:44 pm

No, the default Bootloader does NOT SET the LED properly. It leaves them in the (more or less) random(!) boot up state.

My bootloader changed that. But a new bootloader can only be programmed with a programmer (hardware device), so nobody has that.
The Bootloader of the x0xLarge also changes that. (See x0xLarge documentation if you have that. )


So:

If your x0x is working OK in the other modes and shows a (more or less) random pattern if powered up in BOOTLOAD, and this does not change if you turn the mode knob, than it seems that the boot loader code is in fact OK! (= the boot loader inhibits the normal x0x program start successfully. )

Windows only:
Power up the x0x, connect it to your computer by USB and see if there is a "USB Serial Port (COMx)" (x=2..99) device in device manager. (see: https://www.drivereasy.com/knowledge/a- ... n-windows/ ) You need this number for setting up c0nb0x!
If you see this COMx port, than a)the FTDI chip inside your x0x works and b)your Windows has the proper drivers.
If you don't see it, you have to solve that first. There is absolutely no use messing around with c0nb0x if you don't have that COM display in the device manager.

Nordcore
 
Posts: 93
Joined: Sat May 23, 2015 3:14 pm

Re: Is my bootloader faulty?

by antto on Wed Dec 06, 2017 4:52 pm

as Nordcore said, the "normal" x0xb0x bootloader doesn't blink any LEDs

what you've read about blinking LEDs was probably about the x0xb00t2.x bootloader, which is available on the cpu-upgrade adapter (x0xlarge)
if your x0xb0x is a "normal" one, then you would have the original cpu (atmega162) and the normal bootloader, which doesn't initialize the LEDs at all, so they end up in a quasi-random state (some may be on, others off, or all could be on/off, but definately no blinking ones!)

so, in your situation (assuming that you are indeed running the normal cpu), check whether you have a working bootloader (because there have been circulating some badly programmed atmega162s with a firmware flashed on, but no bootloader at all)
..do this by turning the x0xb0x ON in "bootload" mode, and then turn the MODE/FUNC selector knob to any other mode (like pattern play, keyboard mode)
- if the x0xb0x responds to that (by changing the LEDs, responding to button presses, playing notes, etc) then it seems that you don't have a working bootloader
- if the x0xb0x doesn't respond to that, then chances are high that you have the bootloader working and waiting for commands

and just for your information, if you'd be buying a new cpu (atmega162) for some reason, buy it from one of the respected x0xb0x sellers, or ask the seller whether he's sure that the chip has a working x0xb0x bootloader on it, and not just a firmware

antto
 
Posts: 1615
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: Is my bootloader faulty?

by Oortone on Sat Dec 09, 2017 6:09 am

Thanks for the help. I can confirm it seems like my bootloader is ok, I did the test starting in bootloader and then turn to other mode and it doesn't change.

Thing is, I only have some Macs, no Windows.

So I have tried Virtual Box/Windows XP and since I can make c0ntr0l talk with the x0xbox in the other modes I'm pretty sure the COM-port and driver things are working properly. USB almost always work extremely well with VirtualBox I use it a lot.

I've also tried c0nb0x for MacOS with th X11 stuff but I can't manage to make it communicate properly although I managed to start the c0nb0x program and wander through it's options. But no proper contact with the machine.

At least now I know the situation. Since I'm not planning to experiment with different OS I guess I might buy the latest non-experimental one on chip so I know what's inside my box.

Is SokkOS 1.9.1 considered the latest stable (non beta) version? That's what these guys offer anyway:
https://sound-imperium.de/gb/electronic ... miert.html

Oortone
 
Posts: 2
Joined: Tue Dec 05, 2017 7:54 pm

Re: Is my bootloader faulty?

by antto on Sat Dec 09, 2017 7:05 am

no, i wouldn't call sokkos 1.9.1 "latest" or even "stable"
there are, probably, bugs in all firmwares
in your situation i'd try at least sokkos 2
but that's still old, so go for MarOS (check the thread in this subforum)

what you really need is a manual, and there is no decent/complete manual that i know of for sokkos, but there might be for MarOS

antto
 
Posts: 1615
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: Is my bootloader faulty?

by tetrabrik on Mon Jun 25, 2018 12:13 pm

Hello x0xb0xers

I'm new here, and a perfect rookie regarding AVR programmation!
To summarize: I built a x0xb0x last month (see https://plus.google.com/u/0/collection/U1pGLF, post of the 25th of June). The analogue part is ok, except low signal from the headphone amp. Maybe the amp op LA... is not a good part, I have to investigate but it is not serious.
However: I have troubles with bootloading the ATmega162. I bought it blank in an elctronic components supplier, since there is apparently no more supplier of pre-burnt AVR for x0x.
Thus, I tried via the UART plug/FTDI converter inside the x0x. I carried out the methodology as described in http://www.ladyada.net/wiki/x0x/bootloader, using CommAPi etc.
Unfortunately, this method works with Windows x32 (more than 10 years ago?) and my PC OS is W7 x64. There are troubles with drivers while running CommAPI. Thus forget it, it appears to be "obsolete". I can specify that I soldered the FTDI microship, and the PC downloaded automatically the driver, attributing a new COM port. It is ok, but this bootloading route is not "direct".
With Arduino, you can find forums but it is confusing. i tried by adding the ATmega162 in the "Boards" file, then Pin assigment and Optiboot files. I plugged the x0x, IDE recognized the serial port, I used "USB AVR" as programmer but it failed due to troubles: "avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'." I read somewhere that there was troubles between AVRdude and Windows, but forums are confusing...
Thus, Forget methodologies above. Windows and programmers are apparently not the best friends in the World, due to hard communication.
Thus I bought a programmer AVR ISP from DIamex (https://www.reichelt.com/de/en/Programm ... CLE=110344). I removed the ATmega from the socket, I placed it on a breadboard, and connected the 6 pins (Miso, Mosi, Reset, SCK V+5v and GND) to the right ATmega's pins (see image 2, https://plus.google.com/u/0/photos/1146 ... _urIrOHkdQ).
After watching a bunch of tutorials with similar programmer (like AVR ISP Mk2...) I used "Burn-O-Mat", a simple interface window using AVRdude. A good Tuto (I thought that It would safe my new programmer's life) is available at: https://www.youtube.com/watch?v=jcDS8iaYS_Q
I followed the procedure (required: WinAVR, Java, programmer's driver, Burn O Mat), without modifying the fuses, as in the tuto. My programmer's name is for B-O-M software "stk500v2". I did not try with "USB AVR", as I found in the long list. I obtained a reassuring message as in Image 1 (https://plus.google.com/u/0/photos/1146 ... _urIrOHkdQ, sorry for the poor quality). It was fine, I managed to flash the f* ATmega with x0xb0x-1_03.hex! Then I replaced it in the x0x... It's time to Switch on the bass synth!
All leds are on, then off, except tempo which blinks very slowly. I can't modify the speed by turning the encoder. The bank encoder is ok: Led's sequencer are on one by one while I'm turning the "Bank" Grayhill. If I turned it too quickly in the same sense, Leds are not lighting in the same sense (i. e. the one before the one on while I'm turning quickly clockwise). Random mode produces notes, but the melody is always the same, whereas it is played very very slowly. I could check that the analogue section was okay!
And other positions of the Grayhill selector could lit up some leds, but keyboard mode doesn't work.
Half success, thus no success. Press any key to restart.
I checked soldering quality, components orientation, I don't think problem is from the hardware. Something's wrong with the Bootloader. I tried c0ntr0l but the soft failed to connect to the x0x. I tried c0nb0x but It bugged... maybe the reason is: c0nb0x was designed for windows 32.
I'm damned! x0x is an obsolete technology, 12 years after its birth???
Go back to x0x forums. (1) I think the problem comes from the fuses. I noticed on burn O mat that the box "divide clock by 8 was quoted. Could it explain the low speed of the tempo led? Another related question (2) : do I have to add a 16 MHz-crystall and 2 12-22 pF caps on the breadboard (as It is in the x0x close to µC position, please see the board conf in https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard). ANother problem is that I can't change on Burn O Mat "fuses' window" the "clock/oscillator Options (it is said "not supported by the MCU). These are my two hypothesis,the selected clock speed is too slow, I did not add an external crystall. Howeve, to modify fuses of an AVR is very risky, like "open-heart surgery" and a lot of people are complainning about "burnt" (i.e. more than toasted, "charred") ATmegas after the operation....
Any help/suggestion? Many thanks...
My last thinking (3) is: Bootloading is not sufficient to run the µC properly. DO I have to put also an updated firmware .hex file? Where can I find it, something working in 2018? C0ntr0l seems old-school and full of errors, according to previous users...
Well, I'm waiting for yours kind "debugging" tips. In parallel, I am busy with another project: a 808-like modular (with external seq) DIY drum machine. I will show it soon!
ATmegaly yours.

tetrabrik
 
Posts: 1
Joined: Tue Apr 10, 2018 4:56 pm

Please be positive and constructive with your questions and comments.