Project

General

Profile

On going: Issues with Programming a Jeenode Micro

Added by henry over 5 years ago

Hi,
I have a big problem with program a Jeenode Micro v3. I prepared all like discribed here:[[[http://jeelabs.org/2013/03/21/programming-the-jn%C2%B5-at-last/]]]. I use the Arduino IDE 1.5.4 on Windows and a Jeelabs Flashboard.
But the step ‘burning bootloader’ doesn’t work. The Arduino IDE shows this error: Error while burning bootloader: missig ‘erase.params.verbose’ configuration parameter.
Can anybody help me?
Many thanks and kind regards
Henry from Germany


Replies (72)

RE: problem with program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

I am having this same problem on my brand new JeeNode Micro (purchased from Modern Device, since I live in the USA.)

I think there must be an issue with the Github clone of the bootloader files. Specifically, I am wondering if the file hierarchy that leads the Arduino 1.5.4 IDE to “see” the bootloader files and the avrdude options are correct. Has anyone out there successfully programmed a JeeNode Micro? If so, can you please tell me the steps you took exactly to make Arduino 1.5.4 on Mac OS X Mavericks successfully program the JeeNode Micro?

My thanks as well, and kind regards

Bob Cochran
Maryland, USA

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

henry &BoBCochran13 are you guys having the same problems? With the Micro the process of burning the bootloader only sets the fuses as typically a bootloader isn’t used with the Tiny processors.
It sounds like Henry is using a JeeNode flashboard, what are you using Bob?

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

henry if you take a look in your equivalent of my “C:–1.5.4r2\sketchbook\hardware\jeelabs\avr\platforms.txt” do you have a line looking like this:

tools.avrdude.erase.params.verbose=-v -v -v -v

Also, while in the Arduino IDE, if you click on Tools is the correct board “JeeNode Micro” selected?

Finally, again in the Arduino IDE, click on Tools again then click on Programmer what do you have selected here? I think it needs to be one of either “Arduino as ISP” or “ArduinoISP” please let us know the results of your efforts with both.

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

One last thought, I had to adjust the boards.txt file to allow selection of the programmer from the IDE. I needed this because of my eclectic group of programmers:

@ -1,6 +1,6@
jnmicro.name=JeeNode Micro
jnmicro.upload.tool=avrdude
-jnmicro.upload.protocol=arduino
+# jnmicro.upload.protocol=arduino // to permit programmer selection using Arduino IDE
jnmicro.upload.maximum_size=8192
jnmicro.upload.speed=9600

I haven’t been able to check this in with @jcw.

RE: problem with program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

@JohnO, I’m using a JeeNode Flash Board as well, set up according to this (and related) postings: http://jeelabs.org/2013/03/21/programming-the-jn%C2%B5-at-last/. In your posting above, you mention this folder structure:

[…]Documents\arduino-1.5.4r2\sketchbook[…]

and I didn’t follow that. I am using a Mac and I will have to look about for my sketchbook folder. It could be I need to move the jeelabs folder into that that for things to work. Thank you very much, you probably pointed me to the fix for this!

One note:

I actually didn’t think to put female headers on the programming pins (MOSI/MISO/SCK) of the Micro, so the male pins are actually connected to the flash board with a breadboard in between. I can post pictures if those are allowed.

Kind regards

Bob Cochran
Maryland, USA

RE: problem with program a Jeenode Micro (please help) - Added by martynj over 5 years ago

As long as you are careful to match the pinouts, the extra cable path through the breadboard should not matter - the signals are relatively slow.
You can attach .jpg’s to your reply.

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

I am using Win7x64 at the moment and the paths relate to my environment. I believe paths are similar once you are past the “c: stuff. When I talk about sketchbook I am assuming that your ATTiny environment was set up as per: http://jeelabs.net/projects/hardware/wiki/JeeNode\_Micro see the sections on ”Setting Up The Tool Chain".

The ATTiny libraries live under the sketchbook directory, when using the IDE and selecting file there is a preferences section and within that the directory path you wish to use. This needs to match up to your tool chain setup procedure.

RE: problem with program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

Thank you for getting back to me. I am on MacOS and I think I did the toolchain setup for my platform. However you made a comment that caused me to look more carefully in my preferences.txt file. That is in ~/Library/Arduino/Arduino15/preferences.txt file and I found this particular setting:

last.ide.1.5.4.hardwarepath=/Users/bobc/Downloads/Arduino.app/Contents/Resources/Java/hardware

Do you think I need to change this to this path:

/Users/bobc/Documents/Arduino/hardware

…which has:

g33:hardware bobc\$ ls -al
total 0
drwxr-xr-x 3 bobc staff 102 Nov 11 14:51 .
drwxr-xr-x 6 bobc staff 204 Nov 16 15:01 ..
drwxr-xr-x 5 bobc staff 170 Nov 11 14:50 jeelabs

under it?

I’ve uploaded the error message that the Arduino IDE is giving me.

The error message that the Arduino IDE 1.5.4 is showing.

I’ve also added a photo showing my hardware.

My hardware setup.

Thanks a lot!

Bob Cochran
Maryland, USA

RE: problem with program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

I tried changing

last.ide.1.5.4.hardwarepath=/Users/bobc/Downloads/Arduino.app/Contents/Resources/Java/hardware

to

last.ide.1.5.4.hardwarepath=/Users/bobc/Documents/Arduino/hardware

however Arduino 1.5.4 the application force-changes that back to the original setting of last.ide.1.5.4.hardwarepath=/Users/bobc/Downloads/Arduino.app/Contents/Resources/Java/hardware.

Maybe I need to change my sketchbook.path in preferences.txt to point to /Users/bobc/Documents/Arduino/hardware instead of /Users/bobc/Documents/Arduino?

With the sketchbook path in its present setting, the Arduino IDE does list a “JeeNode Micro” as a board option to select. So perhaps the IDE is able to “drill down” to the new boards.txt file supplied in the hardware/jeelabs/avr folder.

Some notes: The USB BUB shown in the photo I supplied is only giving 3.3v to the JeeNode v6 and Flash board. Perhaps I should be using 5v?

Likewise, the blue wire shown in the photo is connected to the +3v pin of the JeeNode Micro. Perhaps this is the wrong pin?

Thanks a lot!

Bob Cochran
Maryland, USA

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

Hi Bob, I’ struggling here as I don’t have a Flashboard and I don’t use MAC.

The fact that you are seeing the JeeNode Micro option is good and the path to “…” to pointing to the correct place. I have seen the burn bootloader error message before and it was resolved by adding a line in the platforms.txt file.

tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avrdude
tools.avrdude.config.path={runtime.ide.path}/hardware/tools/avrdude.conf

tools.avrdude.program.params.verbose=-v -v -v -v
tools.avrdude.program.params.quiet=-q -q
tools.avrdude.program.pattern=“{cmd.path}” “-C{config.path}” {program.verbose} -p{build.mcu} -c{program.protocol} -P{serial.port} -b{program.speed} “-Uflash:w:{build.path}/{build.project_name}.hex:i”

tools.avrdude.erase.params.verbose=-v -v -v -v
tools.avrdude.erase.params.quiet=-q -q
tools.avrdude.erase.pattern=“{cmd.path}” “-C{config.path}” {erase.verbose} -p{build.mcu} -c{erase.protocol} -P{serial.port} -b{erase.speed} -e -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m

tools.avrdude.bootloader.params.verbose=-v -v -v -v
tools.avrdude.bootloader.params.quiet=-q -q
tools.avrdude.bootloader.pattern=“{cmd.path}” “-C{config.path}” {bootloader.verbose} -p{build.mcu} -c{protocol} -P{serial.port} -b{bootloader.speed} “-Uflash:w:{bootloader.file}:i”

I don’t think we have a wiring or voltage problem at this point. I think there is a problem in what commands are being built or passed to avrdude.

Are you able to run avrdude as a stand alone program, outside the Arduino IDE?

John, signing off for tonight.

RE: problem with program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

Hi John,

I hope you had a nice evening. Your advice is very helpful to me! Things are starting to work! My own platform.txt file which I downloaded from github is missing the 3 lines of parameters starting with tools.avrdude.erase.[…] quoted above, so I copied the block you posted to my own platform.txt file. Tbat got rid of the erase.params.verbose error message. However, the Arduino IDE complained about missing bootloader.params.[…] values, so I went ahead and copied the 3 lines of parameters starting with tools.avrdude.bootloader.[…] that you also posted above. This helped! I got a new error message complaining about erase.speed. I’ve uploaded it for viewing.

I think I need to add a line in the boards.txt file that is something like:

jnmicro.bootloader.erase.speed=

and very likely also something on the order of

jnmicro.bootloader.erase.protocol=

Do you happen to know what these values would be?

I have used avrdude in the past several times, but it was a long time ago, so I’m very rusty — very out of practice and unskilled. I didn’t consistently and regularly work at improving my avrdude skills. This is my first experience of trying to burn a bootloader on an Atmel part using the Arduino IDE.

Thanks a lot!

Bob

RE: problem with program a Jeenode Micro (please help) - Added by martynj over 5 years ago

@Bob,

When you get the software setup cleaned up, the BUB should be set for 3.3V Logic level and 5V power output (the default settings out of the box IIRC). Using 3.3V Power input to the Jeenode is not enough headroom for the onboard 3.3V LDO regulator.

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

@Bob, I am now wondering if your avrdude.conf file is different to mine. Unfortunately I seem to have lots of versions of that particular file-name around. So, considering your posted error message it seems to need an erase speed and an erase protocol. In my boards file I have entries for a T84 bootloader I have been playing with. The section for this device uses the two parameters you appear to be missing and so I guess we can use that format, I think the absolute values used are not significant but as a first pass use the values used in the t84db section.

 "jnmicro.erase.speed=19200"
 "jnmicro.erase.protocol=arduinoisp"


//####### Boards.txt file ###### "...\hardware\jeelabs\avr\"
jnmicro.name=JeeNode Micro
#jnmicro.upload.tool=avrdude
#jnmicro.upload.protocol=usbasp
jnmicro.upload.maximum_size=8192
#jnmicro.upload.speed=9600

jnmicro.bootloader.tool=avrdude
jnmicro.bootloader.low_fuses=0xC2
jnmicro.bootloader.high_fuses=0xD7
jnmicro.bootloader.extended_fuses=0xFF
jnmicro.bootloader.unlock_bits=0xFF
jnmicro.bootloader.lock_bits=0xFF
//# FIXME this boot loader is bogus, IDE 1.5.x does not look in the right place?
jnmicro.bootloader.file=atmega8/ATmegaBOOT.hex

jnmicro.build.mcu=attiny84
jnmicro.build.f_cpu=8000000L
jnmicro.build.core=tiny
jnmicro.build.variant=standard

t84db.name=ATtiny84(tsb)
t84db.build.mcu=attiny84
t84db.build.f_cpu=8000000L
t84db.build.core=tiny
t84db.build.variant=standard

t84db.upload.tool=tsb
t84db.upload.protocol=arduinoisp
t84db.upload.maximum_size=7552
t84db.upload.speed=38400

t84db.program.tool=avrdude
t84db.program.protocol=arduinoisp
t84db.program.maximum_size=8192
t84db.program.speed=19200

t84db.erase.tool=avrdude
t84db.erase.protocol=arduinoisp
t84db.erase.maximum_size=8192
t84db.erase.speed=19200

t84db.bootloader.tool=avrdude
t84db.bootloader.protocol=arduinoisp
t84db.bootloader.speed=19200
t84db.bootloader.low_fuses=0xe2
t84db.bootloader.high_fuses=0xdf
t84db.bootloader.extended_fuses=0xfe
t84db.bootloader.file={sketchbook.path}/hardware/attiny/avr/bootloaders/tsb/tsb_tn84_b1b0_20131023.hex

Starting to feel like something of a lash up but I am interested to see if it works.

RE: problem with program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

martynj, thank you — I will check the Modern Device page on the USB BUB to confirm logic and voltage levels. This isn’t the “BUB II” device but one of the original USB BUBs. I used it to program my JeeNode v6.

@JohnO, thank you for your help! Again you have helped me. I adapted your boards.txt file so that mine looks like this:

jnmicro.name=JeeNode Micro
jnmicro.upload.tool=avrdude
jnmicro.upload.protocol=arduino
jnmicro.upload.maximum_size=8192
jnmicro.upload.speed=9600
# Added erase.speed and erase.protocol parameters with help from
# JohnO on the JeeLabs Forums. See thread at http://jeelabs.net/boards/7/topics/2986
# A further avrdude error caused me to change erase.protocol to arduino
jnmicro.erase.speed=19200
jnmicro.erase.protocol=arduino

jnmicro.bootloader.tool=avrdude
jnmicro.bootloader.low_fuses=0xC2
jnmicro.bootloader.high_fuses=0xD7
jnmicro.bootloader.extended_fuses=0xFF
jnmicro.bootloader.unlock_bits=0xFF
jnmicro.bootloader.lock_bits=0xFF
# FIXME this boot loader is bogus, IDE 1.5.x does not look in the right place?
# jnmicro.bootloader.file=atmega8/ATmegaBOOT.hex
# Bootloader file "guessed at" by BobCochran after looking at JohnO's
# t84db entries posted to http://jeelabs.net/boards/7/topics/2986
jnmicro.bootloader.file={sketchbook.path}/hardware/jeelabs/avr/bootloaders/empty/empty84at8.hex

jnmicro.build.mcu=attiny84
jnmicro.build.f_cpu=8000000L
jnmicro.build.core=tiny
jnmicro.build.variant=standard

With the result that I got a new error message from avrdude. I’ve shown it in the attached image.

avrdude says the programmer is not responding.

I think my problem is this: I have to set up my JeeNode V6 device so that the “ArduinoISP” sketch (located in the Arduino IDE’s list of Examples) is uploaded to it. It seems obvious now, but I completely missed this step. I have to compile that sketch successfully into the JeeNode V6 device first, right? To do that, I will have to add the correct settings for the JeeNode V6 to the existing boards.txt file and/or download the most recent version of the JeeLabs files for the V6 from GitHub. It does not appear that the JeeNode Micro and JeeNode V6 boards have been merged into a single boards.txt file.

Notice the bootloader file path and file name I’ve specified in boards.txt. I hope that is the right path and bootloader file to use! I think that one is for the ATTiny 84 at 8 MHz. The existing documentation for the JeeNode Micro doesn’t appear to specify a good default bootloader to use.

I have promised my wife I will take care of some other things today, so I will need to come back to this later this week.

I’m definitely planning to fork https://github.com/jcw/ide-hardware and then do a pull request with corrections and enhanced instructions in the README.md file. If it is all right with you I would like to give you full credit for all your help with this.

Thanks a lot for all your help and I will come back to this challenging JeeNode Micro board and try to get it running. I’m attracted to the small package size even with the radio installed.

Bob

programmer_not_responding.png (208 KB) programmer_not_responding.png avrdude says the programmer is not responding.
1566

RE: problem with program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

I’m now thoroughly confused! In the Arduino UDE, How do I switch my hardware selection from

Tools —> Board —> JeeNode Micro

to

Tools —> Board —> JeeNode v6

?

I’m supposed to have a custom boards.txt entry for the JeeNode V6, right?

I wonder if I overwrote that somehow.

Many thanks!

Bob

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

Well done, I’ve had another thought perhaps jnmicro.erase.speed=9600 is correct, I’m not sure what the Flash board actually runs at - probably the same speed as jnmicro.upload.speed=9600.

Also, the whole section “C:1.5.4r2\sketchbook\hardware\jeelabs\avr" is a ’FIX’ to make Arduino work for the Tiny processors. When compiling for the ATMEGA328 JeeNode V6 the standard part of Arduino is used NOT ”C:–1.5.4r2\sketchbook\hardware\jeelabs\avr“.
The standard part of Arduino is done here: ”C:–1.5.4r2\hardware\arduino\avr" and should work without any tweaks if you select within the IDE, Tools then Board, selecting Arduino Uno.

Fingers crossed.

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

There is a sketch in the Jeelabs examples which may be the recommended route to program your Jeenode V6 for programmer operation:
“C:–1.5.4r2\libraries\jeelib\examples\Ports\isp_flash\isp_flash.ino”

I suspect the ArduinoISP sketch will be using different pins/ports.

RE: problem with program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

JohnO,

Thanks a ton! I think I succeeded! I’m so excited! Later this week, I will try to upload a “blink” sketch (and set up the JeeNode Micro physically to blink an LED) to test out my uploading. Your advice made a world of difference. The isp_flash.ino sketch is exactly what I needed and selecting the “Arduino Duanilueve or Diecmila” as the board type started pushing things in the right direction. From that point forward, things began progressively working. There were still errors as listed below, but I was able to solve them.

First, the isp_flash.ino sketch has to be uploaded to the JeeNode V6 which will do the programming.

Second, I set the erase.speed to 9600 as you suggested.

Third, I added these lines in boards.txt:

# Next line jnmicro.bootloader.speed set by Bob Cochran
jnmicro.bootloader.speed=9600
# Next line sets the programmer for the bootloader -- added by Bob Cochran
jnmicro.bootloader.protocol=arduino

The bootloader entry in platform.txt turned out to be wrong, also. Can’t remember if I changed the -b option, perhaps I did that earlier. I definitely needed to change the -c option like so:

 tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{bootloader.protocol} -P{serial.port} -b{bootloader.speed} "-Uflash:w:{bootloader.file}:i"

I think that is what finally got things running properly for avrdude. I am attaching a screen shot of my output from my attempt to burn the 8 MHz bootloader to the ATTiny84. If I understand things properly, I should now be able to upload a sketch to the ATTiny84, and it should (hopefully) run. I will test this out later on this week. This stuff is very addictive for me. However, if I don’t attend to the honey do list, I will get in a touch of trouble…

Thanks again, John! I’m definitely going to fork the ide-hardware repository as I mentioned and do a pull request to see if the library can get updated. I’ll give you full credit for the fixes. I just need a couple weeks.

Bob

syccess_burning_bootloader.png (240 KB) syccess_burning_bootloader.png Success burning the bootloader!
1568

RE: problem with program a Jeenode Micro (please help) - Added by henry over 5 years ago

@JohnO
Many thanks for your help! Now with changing the platform.txt and the boards.txt I’ve solved the first bootloader problem. At the moment the bootloader burning beginns and interrupt with the error : stk500_getsync(): not in sync: resp=0x32.

Maybe it’s a problem with the voltage/wireing. I use the USB BUB II from Modern Device an at the JNµ (Boost Power) the pin PWR for the 5V from the BUB.
That’s correct?

Thanks a lot!
Kind regards
Henry

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

henry great - well done.

@Bob “Arduino Duanilueve or Diecmila” it looks like you have an ‘old’ bootloader on your Jeenode V6 - no big issue until you get a larger family.

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

@Henry “I use the USB BUB II from Modern Device an at the JNµ (Boost Power) the pin PWR for the 5V from the BUB.
That’s correct?”

I don’t have a flashboard but I would expect the flashboard to take care of powering the JNµ via it’s ISP pins.

RE: problem with program a Jeenode Micro (please help) - Added by JohnO over 5 years ago

Bob &Henry

It is probably me being superstitious but I always begin the setup process in sketches for the JNµ with a delay(5000);
In the past I have been locked out after the first sketch burn because of an interaction between the RFM12B and the ISP - they share pins.

RE: problem with program a Jeenode Micro (please help) - Added by henry over 5 years ago

John
From the Flashboard comes 3.3V. Can I put it into the pin +3V?
Bob
Which voltage have you from the Flashboard to the JNµ?

Kid regards
Henry

RE: problem with program a Jeenode Micro (please help) - Added by BobCochran13 over 5 years ago

@Henry,
I do not know the exact voltage from the VCC pin of the header that is on the JeeNode Flash Board to the +3V pin of the JeeNode Micro. However the JeeNode Micro seems quite happy to date. I have not tried to upload a sketch yet, however, AVRDUDE is giving me a good ending status and I’m very encouraged by this. I believe that when I do upload a sketch, it should execute properly.

I had the very same error message you recieved. Let me quote part of your post above:

stk500_getsync(): not in sync: resp=0x32.
^^^^^^

That ‘stk500’ is the problem. avrdude thinks you are using the stk500v1 programmer device!

To fix it, you have to make two changes:

First, in platform.txt code this:

tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{bootloader.protocol} -P{serial.port} -b{bootloader.speed} "-Uflash:w:{bootloader.file}:i"
                                                                                                   ^^^^^^^^^^^^^^^^^^^^^^^
(Change -c to point to using "arduino" as the bootloader.protocol)

Next, in boards.txt code this:

# Next line sets the programmer for the bootloader
jnmicro.bootloader.protocol=arduino

You might also have an error related to the bootloader.speed. Look at how the -b option is coded in the above snippet for platform.txt. You might need to add one more line to boards.txt:

jnmicro.bootloader.speed=9600

I hope this helps you.

Bob

RE: problem with program a Jeenode Micro (please help) - Added by henry over 5 years ago

@Bob
Many thanks for your help! I’ve changed all lines as you described.
Unfortunately I have the same error: stk500_getsync(): not in sync: resp=0x32. :-(

I’ve loaded the files up.

I hope anyone find the mistake.

Kind regards
Henry

(1-25/72)