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

Make possible to upload on esp8266 #1462

Merged
merged 11 commits into from
Oct 12, 2018
Merged

Make possible to upload on esp8266 #1462

merged 11 commits into from
Oct 12, 2018

Conversation

brusherru
Copy link
Contributor

It completely closes #1206.
Now you can choose board options in the upload dialog and upload even on ESP8266 boards! 🙌

@brusherru brusherru self-assigned this Oct 9, 2018
@brusherru brusherru requested a review from a team October 9, 2018 13:50
@nkrkv
Copy link
Member

nkrkv commented Oct 9, 2018

PR title?

@brusherru brusherru changed the title Feat 1206 upload on esp Make possible to upload on esp8266 Oct 9, 2018
@brusherru brusherru force-pushed the feat-1206-extensible-board-packages branch from 21056fa to 9593b0f Compare October 9, 2018 16:30
@brusherru brusherru force-pushed the feat-1206-extensible-board-packages branch from 9593b0f to 4aa7e7e Compare October 10, 2018 09:21
@brusherru brusherru force-pushed the feat-1206-extensible-board-packages branch from 4aa7e7e to f2ecaaa Compare October 10, 2018 10:12
@brusherru brusherru changed the base branch from feat-1206-extensible-board-packages to master October 10, 2018 17:40
@evgenykochetkov
Copy link
Contributor

  • Select ESP8266 board from upload menu
  • Set CPU Frequency to 160MHz (instead of default 80MHz)
  • Upload to ESP everything is fine so far
  • Now select Arduino Mega
  • Try to upload:
    Error resolving FQBN: getting build properties for board arduino:avr:mega: invalid option 'CpuFrequency'

@brusherru
Copy link
Contributor Author

brusherru commented Oct 11, 2018

@evgenykochetkov already fixed at yesterday evening.
You can see it in the latest fixup commit.

@nkrkv
Copy link
Member

nkrkv commented Oct 11, 2018

🐛

Steps to reproduce

On a fresh workspace:

  1. Hit Deploy → Upload to Arduino
  2. Select “Amperka WiFi Slot (not installed)”
  3. Confirm and wait for download
  4. Hit Deploy → Upload to Arduino again

Expected behavior

I should be able to select the “Amperka WiFi Slot” board

Actual behavior

“Loading list of supported boards...” forever

Console output

code
:
"ENOENT"
errno
:
-2
message
:
"ENOENT: no such file or directory, open '/home/nailxx/devel/xod-workspace/__packages__/packages/esp8266/hardware/esp8266@2.4.2/2.4.2/boards.txt'"
path
:
"/home/nailxx/devel/xod-workspace/__packages__/packages/esp8266/hardware/esp8266@2.4.2/2.4.2/boards.txt"
stack
:
"Error: ENOENT: no such file or directory, open '/home/nailxx/devel/xod-workspace/__packages__/packages/esp8266/hardware/esp8266@2.4.2/2.4.2/boards.txt'"
syscall
:
"open"

Note the esp8266@2.4.2 part.

Here’s what actually on FS:

~/devel/xod-workspace
$ tree -d -L 4 __packages__/packages/esp8266/hardware
__packages__/packages/esp8266/hardware
└── esp8266
    └── 2.4.2
        ├── bootloaders
        │   └── eboot
        ├── cores
        │   └── esp8266
        ├── libraries
        │   ├── ArduinoOTA
        │   ├── DNSServer
        │   ├── EEPROM
        │   ├── esp8266
        │   ├── ESP8266AVRISP
        │   ├── ESP8266HTTPClient
        │   ├── ESP8266httpUpdate
        │   ├── ESP8266HTTPUpdateServer
        │   ├── ESP8266LLMNR
        │   ├── ESP8266mDNS
        │   ├── ESP8266NetBIOS
        │   ├── ESP8266SSDP
        │   ├── ESP8266WebServer
        │   ├── ESP8266WiFi
        │   ├── ESP8266WiFiMesh
        │   ├── Ethernet
        │   ├── GDBStub
        │   ├── Hash
        │   ├── SD
        │   ├── Servo
        │   ├── SoftwareSerial
        │   ├── SPI
        │   ├── SPISlave
        │   ├── TFT_Touch_Shield_V2
        │   ├── Ticker
        │   └── Wire
        ├── tests
        │   ├── device
        │   └── host
        ├── tools
        │   └── sdk
        └── variants
            ├── adafruit
            ├── arduino_spi
            ├── arduino_uart
            ├── d1
            ├── d1_mini
            ├── ESPDuino
            ├── espino
            ├── espinotee
            ├── espresso_lite_v1
            ├── espresso_lite_v2
            ├── generic
            ├── modwifi
            ├── nodemcu
            ├── oak
            ├── phoenix_v1
            ├── phoenix_v2
            ├── thing
            ├── wifiduino
            ├── wifinfo
            ├── wifio
            ├── wifi_slot
            ├── wiolink
            └── xinabox

62 directories

@nkrkv
Copy link
Member

nkrkv commented Oct 11, 2018

Error
`/usr/bin/arduino-cli --config-file=/tmp/arduino-cliz3iTY1/.cli-config.yml upload --fqbn esp8266:esp8266:wifi_slot --port /dev/ttyUSB0 -t /tmp/xod_temp_sketchbook9WAhh5/xod_1539275390503_sketch` failed with code 1
The error has no formatter, which is a bug. Report the issue to XOD developers.

Formatting uploader failures as-is is OK. That should not be a bug

@@ -31,6 +35,7 @@ export default {
note: [librariesInstalled(libraryNames), packagesInstalled(packageNames)]
.filter(a => !!a)
.join('\r\n'),
solution: 'Now you are able to upload the code',
Copy link
Member

Choose a reason for hiding this comment

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

Now you are able to upload the program

@@ -28,6 +28,9 @@ export const DEBUG_SESSION_STOPPED_ON_TAB_CLOSE = {
};
export const DEBUG_LOST_CONNECTION = 'Lost connection with the device.';

export const UPLOAD_PROCESS_BEGINS =
'Begin uploading compiled code onto the board...';
Copy link
Member

Choose a reason for hiding this comment

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

Uploading compiled code to the board...

@@ -4,4 +4,8 @@ export default {
note: `Cloud compilation does not support ${boardName} yet.`,
solution: 'Try to compile it on your own computer',
}),
UPLOAD_TOOL_ERROR: ({ message }) => ({
title: 'Error ocured in the Upload process',
Copy link
Member

Choose a reason for hiding this comment

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

Upload tool exited with error

return switchUploadBlock(action, state);

case UPLOAD:
return switchUploadBlock(action, state);
Copy link
Member

Choose a reason for hiding this comment

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

A potential race condition is here. Suggest tracking independently: instead of single blocked use isInstallingArduinoDependencies and isUploading.

@brusherru
Copy link
Contributor Author

brusherru commented Oct 12, 2018

@nkrkv can I squash fixup commits?

@nkrkv
Copy link
Member

nkrkv commented Oct 12, 2018

Of course

Copy link
Member

@nkrkv nkrkv left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extensible board packages
3 participants