Skip to content

Add flashpack to IDE #269

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

Merged
merged 1 commit into from
Aug 22, 2016
Merged

Add flashpack to IDE #269

merged 1 commit into from
Aug 22, 2016

Conversation

calvinatintel
Copy link
Contributor

Needs to be paired with a json which installs flashpack.

@calvinatintel
Copy link
Contributor Author

calvinatintel commented Aug 17, 2016

My first attempt at the json

  1. Installs the factory recovery flashpack
  2. Populates Programmer entry
  3. Triggers flash_dfu.sh upon clicking Burn Bootloader button

screen shot 2016-08-17 at 11 36 27 am

However, the flashpack hangs after the board is reset, and does not initiate flashing.
screen shot 2016-08-17 at 11 39 40 am

Considering that the board reappears on Tools > Port menu within 5 seconds, it seems that flash_dfu.sh script didn't catch the board in DFU mode. Running the script manually from within .arduino15 directory correctly executed the script. Perhaps we need the baudrate reset mechanism built into the flashpack.

@calvinatintel
Copy link
Contributor Author

calvinatintel commented Aug 17, 2016

A couple tasks left:

  1. Reduce flashpack to BLE only. Maybe we can attach the arduino101-factory_ble-flashpack.tar.bz2 to Castor release and link it back to json? So meta.
  2. Try to fix the hanging issue
    • Test on other OSes to see if this is an OSX quirk wrt quanrantine bit
    • Add the baudrate reset script into the flashpack
    • Make a wrapper script which calls the baudrate reset script, followed by flash_dfu.sh

@calvinatintel
Copy link
Contributor Author

calvinatintel commented Aug 17, 2016

First attempt at arduino101-factory_ble-flashpack.tar.bz2.
Verified that it works on all four OSes.

@eriknyquist
Copy link
Contributor

Nice. will verify after kanban.

@bbaltz505
Copy link
Contributor

Tested programmer on Windows. I had to add a Windows-specific instruction in platform.txt:
tools.arduino101load.bootloader.pattern.windows=cmd /C {runtime.tools.flashpack.path}/flash_dfu.bat
but it also seemed to hang

@noelpaz
Copy link
Contributor

noelpaz commented Aug 17, 2016

You verify this by using a BLE Central corelibs . we need to be testing the Central Examples. Scanning should scan for available BLE devices

@noelpaz
Copy link
Contributor

noelpaz commented Aug 17, 2016

Will test with Brian's fixes on windows and Ubuntu

tools.arduino101load.erase.pattern=
tools.arduino101load.bootloader.params.verbose=
tools.arduino101load.bootloader.params.quiet=
tools.arduino101load.bootloader.pattern=/bin/bash {runtime.tools.flashpack.path}/flash_dfu.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make a version of this which works for both Linux, OSX, and Windows. Currently only works in Linux and OSX.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at how we did it in Edison you should see how we used a different method for each OS

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a fix for Windows. The other OSes should support bash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Can you guys please test it?

@@ -28,6 +28,9 @@ arduino_101.build.variant_system_lib=arc32drv_arduino101
arduino_101.build.vid=0x8087
arduino_101.build.pid=0x0AB6

arduino_101.bootloader.tool=arduino101load
arduino_101.bootloader.file=""
Copy link
Contributor

@bbaltz505 bbaltz505 Aug 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes the IDE to give a warning when uploading a sketch:
Bootloader file specified but missing: /home/babaltz/.arduino15/packages/Intel-Test/hardware/arc32/0.0.49/bootloaders/""

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that too. Since that file isn't used, perhaps we can point that to the actual image.bin to suppress the error?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing that line seems to resolve the warning

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, let's go with that

@calvinatintel
Copy link
Contributor Author

I think we have a working solution. I'll publish a new json in 10 min.

@calvinatintel
Copy link
Contributor Author

http://mkfs.ndg.intel.com/precommit/json/package_0.0.50_index.json

Works on OSX. Please verify on Linux and Windows.
If this works on all OSes, we're ready for 1.0.7.

@calvinatintel
Copy link
Contributor Author

Verified on Linux 64 and Linux 32.

@bbaltz505 bbaltz505 merged commit 0d86ead into master Aug 22, 2016
@bbaltz505 bbaltz505 deleted the ble-flasher branch August 23, 2016 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants