Skip to content

Commit

Permalink
PIO: fix git, bump versions (#2298)
Browse files Browse the repository at this point in the history
- bump to espressif8266@2.5.3 (but, 2.5.4 will be here soon...)
- pwm asm -> __asm__
- re-shuffle dependencies a bit, remove brzo from -git and -latest, ref pasko-zh/brzo_i2c#40
  • Loading branch information
mcspr authored Jul 8, 2020
1 parent 009bdf0 commit 2be8d10
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 27 deletions.
4 changes: 2 additions & 2 deletions code/espurna/pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pwm_intr_handler(void)

do {
// force write to GPIO registers on each loop
asm volatile ("" : : : "memory");
__asm__ volatile ("" : : : "memory");

gpio->out_w1ts = (uint32_t)(pwm_state.current_set[pwm_state.current_phase].on_mask);
gpio->out_w1tc = (uint32_t)(pwm_state.current_set[pwm_state.current_phase].off_mask);
Expand All @@ -144,7 +144,7 @@ pwm_intr_handler(void)
do {
ticks -= 1;
// stop compiler from optimizing delay loop to noop
asm volatile ("" : : : "memory");
__asm__ volatile ("" : : : "memory");
} while (ticks > 0);
}

Expand Down
84 changes: 59 additions & 25 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ extra_configs =
# arduino core 2.6.1 = platformIO 2.3.0 (not supported)
# arduino core 2.6.2 = platformIO 2.3.1 (not supported)
# arduino core 2.6.3 = platformIO 2.4.0
# arduino core 2.7.1 = platformIO 2.5.1
# arduino core 2.7.1 = platformIO 2.5.3
# ------------------------------------------------------------------------------
platform_2_3_0 = espressif8266@1.5.0
platform_latest = espressif8266@2.5.1
platform_latest = espressif8266@2.5.3

# ------------------------------------------------------------------------------
# FLASH SIZE:
Expand Down Expand Up @@ -118,28 +118,19 @@ debug_flags =

shared_libdeps_dir = libraries/

# ------------------------------------------------------------------------------
# COMMON ENVIRONMENT SETTINGS:
# ------------------------------------------------------------------------------
[env]
platform = ${common.platform_2_3_0}
framework = arduino
board_build.flash_mode = dout
build_flags = ${common.build_flags}
monitor_speed = 115200
upload_speed = 115200
extra_scripts = pre:scripts/pio_pre.py, scripts/pio_main.py
lib_extra_dirs =
${common.shared_libdeps_dir}
# TODO: right now we depend on external toolchain url b/c toolchain version is hard-coded into the platform
git_platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
toolchain-xtensa @ https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-linux-gnu.xtensa-lx106-elf-0474ae9.200706.tar.gz

# XXX: 2.3.0 depends on these
legacy_lib_deps =
https://github.com/xoseperez/Time
https://github.com/xoseperez/NtpClient.git#0942ebc

# ------------------------------------------------------------------------------
# LIBRARIES: required dependencies
# Please note that we don't always use the latest version of a library.
# ------------------------------------------------------------------------------
lib_deps =
ArduinoJson@5.13.4
https://github.com/marvinroger/async-mqtt-client#v0.8.1
Brzo I2C
https://github.com/xoseperez/eeprom_rotate#0.9.2
https://github.com/plerup/espsoftwareserial#3.4.1
https://github.com/me-no-dev/ESPAsyncTCP#7e9ed22
Expand All @@ -152,22 +143,45 @@ lib_deps =
https://github.com/xoseperez/my92xx#3.0.1
https://github.com/256dpi/arduino-mqtt#196556b6
https://bitbucket.org/xoseperez/nofuss.git#0.3.0
https://github.com/xoseperez/NtpClient.git#0942ebc
OneWire
PZEM004T
PubSubClient
rc-switch
https://github.com/LowPowerLab/RFM69#7008d57a
https://github.com/xoseperez/rpnlib.git#0.3.0
https://github.com/xoseperez/Time
NewPing
https://github.com/sparkfun/SparkFun_VEML6075_Arduino_Library#V_1.0.3
https://github.com/pololu/vl53l1x-arduino#1.0.1
https://github.com/mcleng/MAX6675-Library#2.0.1
https://github.com/ThingPulse/esp8266-oled-ssd1306#3398c97
Adafruit SI1145 Library@~1.1.1

# ------------------------------------------------------------------------------
# COMMON ENVIRONMENT SETTINGS:
# ------------------------------------------------------------------------------
[env]
platform = ${common.platform_2_3_0}
framework = arduino
board_build.flash_mode = dout
build_flags = ${common.build_flags}
monitor_speed = 115200
upload_speed = 115200
extra_scripts = pre:scripts/pio_pre.py, scripts/pio_main.py
lib_extra_dirs =
${common.shared_libdeps_dir}

# ------------------------------------------------------------------------------
# LIBRARIES: required dependencies
# Please note that we don't always use the latest version of a library.
# ------------------------------------------------------------------------------
lib_deps =
${common.lib_deps}

lib_ignore =
AsyncTCP
Brzo I2C
Time
NtpClientLib

# ------------------------------------------------------------------------------
# Base enrivonments, -DMANUFACTURER=..., -DDEVICE=... must be set:
Expand All @@ -179,18 +193,38 @@ lib_ignore =
[env:esp8266-512k-base]
board = ${common.board_512k}
board_build.ldscript = ${common.ldscript_512k}
lib_deps =
${common.legacy_lib_deps}
${common.lib_deps}
lib_ignore =
AsyncTCP

[env:esp8266-1m-base]
board = ${common.board_1m}
board_build.ldscript = ${common.ldscript_1m}
lib_deps =
${common.legacy_lib_deps}
${common.lib_deps}
lib_ignore =
AsyncTCP

[env:esp8266-2m-base]
board = ${common.board_2m}
board_build.ldscript = ${common.ldscript_2m}
lib_deps =
${common.legacy_lib_deps}
${common.lib_deps}
lib_ignore =
AsyncTCP

[env:esp8266-4m-base]
board = ${common.board_4m}
board_build.ldscript = ${common.ldscript_4m}
lib_deps =
${common.legacy_lib_deps}
${common.lib_deps}
lib_ignore =
AsyncTCP

[env:esp8266-1m-latest-base]
platform = ${common.platform_latest}
Expand All @@ -211,21 +245,21 @@ board_build.ldscript = ${common.ldscript_4m}
platform = ${common.platform_latest}
board = ${common.board_1m}
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
${common.git_platform_packages}
board_build.ldscript = ${common.ldscript_1m}

[env:esp8266-2m-git-base]
platform = ${common.platform_latest}
board = ${common.board_2m}
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
${common.git_platform_packages}
board_build.ldscript = ${common.ldscript_2m}

[env:esp8266-4m-git-base]
platform = ${common.platform_latest}
board = ${common.board_4m}
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
${common.git_platform_packages}
board_build.ldscript = ${common.ldscript_4m}

# ------------------------------------------------------------------------------
Expand Down

0 comments on commit 2be8d10

Please sign in to comment.