Getting started on OSX?

Apple Mac OSX
User avatar
mrburnette
Posts: 1889
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Getting started on OSX?

Post by mrburnette » Tue Jun 23, 2015 11:48 am

RogerClark wrote:Ray and Victor

I've taken Ray's version and combined it into one file and included the bootloader data inside the sketch so that its self contained.
Victor's version that Ray had previously downloaded before Victor's site went dark... :D
Remarkable piece of handiwork, all hail Victor the master codesmith.

Ray

User avatar
RogerClark
Posts: 7485
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Getting started on OSX?

Post by RogerClark » Tue Jun 23, 2015 9:59 pm

Victor and Ray,

I used the version that Ray uploaded as it had all the files in the zip, and was easier to get to work before i started to hack it.

I think some of the code could do with cleaning up, as the for loop that calls the chunk writing code, looks unnecessarily complicated, and seems to have a mixture of pointers and array indexing.

But it does work as it stands, and its quite time consuming to modify and test, especially if i keep having to reflash back to the original maple mini bootloader ( from leaflabs) using a usb to serial adaptor, just to confirm it will update from the old bootloader.

I think my time is probably better spent on helping people install the generic bootloader using a Uno as a programmer. it would be great if we could write an AVR sketch that could act like stm32flash.exe and communicate directly with the STM32 is on board serial bootloader.
It may just be possible to squeeze it into a Uno.

victor_pv
Posts: 1750
Joined: Mon Apr 27, 2015 12:12 pm

Re: Getting started on OSX?

Post by victor_pv » Thu Jul 02, 2015 5:26 am

RogerClark wrote:Ray and Victor

I've taken Ray's version and combined it into one file and included the bootloader data inside the sketch so that its self contained.

I've cleaned up the messages and the comments etc

I've tested on an original a Maple mini running the original maple bootloader (downloaded from leaflabs site), and also with updating its self !


Edit.

I've just updated the code a bit, so it verifies if the version of the bootloader it had installed is the version in the sketch.
If so, it displays a message and stops.
I thought I had sent you the latest copy I had on a PM, I guess I hit something else than send, sorry.
Nice that you added an option to check if it's installed, that will be great help whenever we update versions.
In my latest version I had set it to retry if the flash process failed, but looks like this one is different, and I suspect that may not work if I am reading it right.
Looks like all the code is in setup(), so it will run only once. I may have missed and for or while loop enclosing it all, but have a look just to confirm, because I can't find any loop enclosing it that would allow for retry, and if it fails once some pages are cleared, the bootloader will not work again to load the sketch...

User avatar
RogerClark
Posts: 7485
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Getting started on OSX?

Post by RogerClark » Thu Jul 02, 2015 5:50 am

Hi Victor

I reworked the code a lot.

Its all in setup() now, as I couldn't seem any point in it being in loop() as it only runs once.

It seems quite stable and several people have used it to update. So I should put the file into my repo , possibly in the binaries folder

aramperez
Posts: 11
Joined: Thu May 12, 2016 1:34 am

Re: Getting started on OSX?

Post by aramperez » Thu May 12, 2016 12:13 pm

The last post on getting started on OS X is from July 2015. Any update so that this works with the Arduino IDE v1.6.8?

TIA,
Aram

User avatar
sheepdoll
Posts: 238
Joined: Fri May 22, 2015 12:58 am
Location: Silicon Valley Vortex
Contact:

Re: Getting started on OSX?

Post by sheepdoll » Thu May 12, 2016 6:12 pm

aramperez wrote:The last post on getting started on OS X is from July 2015. Any update so that this works with the Arduino IDE v1.6.8?

TIA,
Aram
As soon as I can find the time, I was going to update the new wiki stub. With a handful of people working on this, there is not much critical mass or inertia to keep things moving.

I am still using Arduino IDE 1.6.4. Most of my work as been with 10.7.5, I also prefer mac ports to homebrew. All this works and has for the last year. There is not much point in upgrading or adding information when the system is stable. I do have a laptop with 10.10.5 and I think Arduino IDE 1.6.5. This is also stable.

From other threads here Arduino IDE 1.6.8 may not be stable. There are threads that Ardiuin IDE 1.6.9 is stable. I have not verified any of this.

Macports and homebrew, do not get along. One has to go with one or the other. Like any other Unix inspired system this affects how the user paths and environment variables are setup. Something most OS X users do not know even exist. Under OS X stuff is split into 3 different folders. The /Applicatons/Arduino.app contents, ~/Libraries/Arduino15 and ~/Documents/Arduino.

In my case I use Nucleo boards with a built in STLink. These rely on a third party tool from texane that is on github. Third party tools and libraries then use folders like ~/opt/local or ~/usr/shared. With Unix there are several ways to point these paths to make the tools work. A few weeks back I (and others) ran into a situation where some of these paths are case sensitive.

To fully exploit these tools, especially with tools like GDB, Environment variables need to be set. Some of this is done in platforms.txt. Other times one sets paths ane environment variables into the hidden shell startup script which may or may not be a hidden file called .profile depending what shell you use.

Notice I have not said anything about DFU or direct serial upload such as done with AVRDude on the Atmel based hardware. Do we even now still say Atmel or is it Microchip? While this makes Arduino simple to use, I do not know anything about it. Others seem to feel the same way so nothing gets updated once we have a working system, or the person gives up and finds other ways to enjoy life.

User avatar
RogerClark
Posts: 7485
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Getting started on OSX?

Post by RogerClark » Thu May 12, 2016 7:12 pm

1.6.9 is now officially available.

Please try using that version.

I updated by Mac to 1.6.9 and it worked fine, albeit I had 1.6.5 working on the Mac already.

And I have Dfu-util installed via Homebrew

Post Reply