Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino 1.5.5 Compatability issues #4

Closed
KurtE opened this issue Dec 21, 2013 · 4 comments
Closed

Arduino 1.5.5 Compatability issues #4

KurtE opened this issue Dec 21, 2013 · 4 comments

Comments

@KurtE
Copy link

KurtE commented Dec 21, 2013

First simple things:

There are some new lines that I believe need to be added to the boards.txt and programmers.txt. You need to define what tool you are using.

First for the Avrisp Serial programmer, mine now looks like:

avrispmkii.name=AVRISP mkII (serial)
avrispmkii.communication=serial
avrispmkii.protocol=stk500v2
avrispmkii.program.tool=avrdude
avrispmkii.program.extra_params=-P{serial.port}

Likewise I believe you need to define at least one more new line in boards.txt for upload tool, something like:


arbotix.name=ArbotiX
arbotix.upload.tool=avrdude
arbotix.upload.protocol=arduino
arbotix.upload.maximum_size=65536
arbotix.upload.speed=38400
arbotix.bootloader.low_fuses=0xFF
arbotix.bootloader.high_fuses=0xDC
arbotix.bootloader.extended_fuses=0xFD
arbotix.bootloader.file=atmega644p/ATmegaBOOT_644P.hex
arbotix.bootloader.unlock_bits=0x3F
arbotix.bootloader.lock_bits=0x0F
arbotix.build.mcu=atmega644p
arbotix.build.f_cpu=16000000L
arbotix.build.core=arbotix
arbotix.build.variant=standard

Need to do for each section. Note: did not test this part as I was using programmer. Also in the section I was doing, I also defined:
arbotixAd.upload.maximum_data_size=4096

Later may want to talk about using the main core code base and only define a new variant. I believe we can either use the main Hardware Serial code or can get away with hacking up our own write function and use their receiver... Have a version hacked up and testing now... My section in the boards.txt looks like:

arbotixAd.name=ArbotiX Std

arbotixAd.upload.tool=avrdude
arbotixAd.upload.protocol=arduino
arbotixAd.upload.maximum_size=65536
arbotixAd.upload.maximum_data_size=4096
arbotixAd.upload.speed=38400

arbotixAd.bootloader.low_fuses=0xFF
arbotixAd.bootloader.high_fuses=0xDC
arbotixAd.bootloader.extended_fuses=0xFD
arbotixAd.bootloader.file=atmega644p/ATmegaBOOT_644P.hex
arbotixAd.bootloader.unlock_bits=0x3F
arbotixAd.bootloader.lock_bits=0x0F

arbotixAd.build.mcu=atmega644p
arbotixAd.build.f_cpu=16000000L
arbotixAd.build.core=arduino:arduino
arbotixAd.build.variant=serial1

Kurt

@mikeferguson
Copy link
Member

Kurt, good to know. Are you currently working off the arduino-1.5.2 branch?

@KurtE
Copy link
Author

KurtE commented Dec 21, 2013

Yes I am working with your 1.5.2 branch, and on Arduino running with build 1.5.5 and daily builds. I am also enlisted in one of the Arduino contributors branches: matthijskooijman/Arduino. Found issues with using straight HardwareSerial code at 1mbs for AX12. I debugged and reworked the ::write method to avoid the lock up in flush method. I submitted an Issue on the main Arduino github account and found that it was a duplicate of one of Mattijs issues which he has a pull request in for.

Have started doing some testing with my Phoenix code base using the HardwareSerial code and appears to work, Will put up a version of my Phantom_Phoenix code up on my github account that uses this or conditionally simply implements my own write function and sync function.

Note: I think the more recent changes to programmers.txt and boards.txt are a result of changes due to the support for Arduino Yun.

@mikeferguson
Copy link
Member

@KurtE
Copy link
Author

KurtE commented Dec 22, 2013

Quick update: I will also post on Trossen forum thread as well.

Decided to try doing an upload using the serial port on the Arbotix instead of ISP, ran into a few more problems that I think I have working on my system. Note: I have only mode the changes to the section of boards.txt for my logical board type that uses the default Arduino 1.5.x code base.

First I had to burn a bootloader on to the board. Ran into issues. Needed to define bootloader tool in boards.txt, like:

arbotixAd.bootloader.tool=avrdude

Then ran into issue that system was hard coding trying to load the bootloader from the Arduino install point not our hardware folder. Found issue up on Arduino Issues: arduino/Arduino#1176

So I updated platform.txt to the version out of Arduino 1.5.5 avr section. I then changed this line from:

tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m

To:

tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{sketchbook.path}/hardware/arbotix/avr/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m

After restarting IDE I was able to burn the bootloader.

I then connected up the comm port to the Arbotix and was able to download the program over it. But again you must define the upload tool in boards.txt like:

arbotixAd.upload.tool=avrdude

KurtE added a commit to KurtE/Phantom_Phoenix that referenced this issue Dec 22, 2013
Warning: WIP - I am using 1.5.5 and/or Daily Build.  Also working on
fixes to Hardware Serial on Arduino.

This is a work in progress.  Requires changes to Arbotix files.
Information in issues:
vanadiumlabs/arbotix#4
Also more information up on TrossenRobotics Forum:

http://forums.trossenrobotics.com/showthread.php?5786-Arbotix-on-Arduino-1.5(will-be-1.0.2)-IDE/page2

More Information about Hardware Serial issues on 1.5.5 are up on their
github:
arduino/Arduino#1742

Also in this first pass, added the ability to define for Quad instead of
Hex.

Note: Has code to bypass HardwareSerial write method which I am testing
currently.  Later if Arduino fixes issue can turn off and use ::write
and ::flush methods.
@KurtE KurtE closed this as completed Jan 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants