Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
d2d56eb
0.15.0-rc1
netmindz Nov 15, 2024
568d2ed
Remove TOSTRING for releaseString and add quotes to WLED_RELEASE_NAME
netmindz Nov 23, 2024
1082c85
Fix WLED_RELEASE_NAME=ESP32-S3_WROOM-2
netmindz Nov 23, 2024
7a58c69
Stip \" from WLED_RELEASE_NAME
netmindz Nov 23, 2024
beb709d
Merge pull request #4312 from willmmiles/mixed-led-crash
netmindz Nov 24, 2024
8a18555
Merge pull request #4243 from MoonModules/AC_0_15_S3-WROOM2
softhack007 Nov 1, 2024
e607fcb
Merge branch '0_15_0' into v0.15.0-rcX
netmindz Nov 24, 2024
5d38acd
Update CHANGELOG
netmindz Nov 24, 2024
2f6fa66
Merge pull request #4309 from netmindz/release-name-fix
netmindz Nov 25, 2024
2bee279
Merge pull request #4309 from netmindz/release-name-fix
netmindz Nov 25, 2024
b98a8a1
improved FPS calc resolution, added averaging & multiplier compileflags
DedeHai Nov 4, 2024
5fd3a51
bugfix
DedeHai Nov 4, 2024
b28add3
Added define for bitshift, removed dithering
DedeHai Nov 4, 2024
86d7c24
rename delay -> frameDelay
softhack007 Nov 2, 2024
a1b332f
handleSet: Fix incorrect response generation
willmmiles Nov 10, 2024
37cddca
specified required nodejs ver
maxi4329 Oct 26, 2024
ae97e38
indened formating
maxi4329 Oct 26, 2024
5c5b70f
version changed to 20
maxi4329 Oct 27, 2024
a5693fb
Merge branch '0_15_0' into v0.15.0-rcX
netmindz Nov 25, 2024
0b36431
Update to 2411250
netmindz Nov 25, 2024
7ece14f
rename workflow ready for workflow refactor
netmindz Nov 27, 2024
bc79f44
workflow refactor to used shared build file
netmindz Nov 27, 2024
c89e457
Dedicated release workflow
netmindz Nov 27, 2024
d26b310
Fix for #4300
blazoncek Nov 26, 2024
6a12378
Fix for #4321
blazoncek Nov 27, 2024
62ddb18
BusDigital::begin: Pass clock rate argument
willmmiles Nov 27, 2024
685ad83
PolyBus: Clarify use of clock_kHz
willmmiles Nov 27, 2024
3e22f9c
Merge branch '0_15' into 0_15_0
netmindz Nov 30, 2024
bbacc2d
Merge pull request #4287 from netmindz/v0.15.0-rcX
netmindz Nov 30, 2024
9328e6f
Merge branch '0_15_0' of https://github.com/Aircoookie/WLED into 0_15_0
netmindz Nov 30, 2024
71b2428
Fix for #4193 (twinkle fox & cat)
DedeHai Dec 4, 2024
b78229d
Fix update for #4193 (twinkle fox & cat)
DedeHai Dec 5, 2024
9a4073e
Fix "Unit of Measurement" for BME280 temperature
euphi Dec 7, 2024
1891cc8
Merge branch '0_15_0' of https://github.com/Aircoookie/WLED into 0_15_0
netmindz Dec 9, 2024
af410ae
WiFi reconnect bugfix
blazoncek Dec 7, 2024
d7bebc2
Merge pull request #4360 from euphi/patch-1
netmindz Dec 10, 2024
32864d8
update version to 0.15.0
netmindz Dec 10, 2024
a111a2e
update version to 0.15.0
netmindz Dec 10, 2024
faadb67
update changelog for 2412100
netmindz Dec 10, 2024
9dc1022
palette effect overflow fix
TripleWhy Dec 27, 2024
866a4c8
fix for repeating glitch
DedeHai Dec 19, 2024
a265318
fixed CIE brightness calculation for PWM outputs
DedeHai Dec 23, 2024
c9b95e2
Fix output glitches when playlist changes preset (#4442)
DedeHai Dec 30, 2024
5fc2175
Playlist output glitchfix update: found it also happens on S3 (#4462)
DedeHai Jan 6, 2025
700a707
added a delay after switching relay (#4474)
DedeHai Jan 9, 2025
012143b
BUGFIX in oscillate FX
DedeHai Jan 14, 2025
0d5a0fb
Merge pull request #4386 from DedeHai/ESPNow_glitchfix
netmindz Jan 16, 2025
473700e
Merge pull request #4018 from Brandon502/main
netmindz Jan 16, 2025
4e11ecd
Set version to 0.15.1.beta1
Jan 16, 2025
cc4a4c4
Merge pull request #4428 from blazoncek/waterfall-fix
netmindz Jan 16, 2025
2ac4d03
Fixes first pixel not being set in Stream FX (#4542)
DedeHai Feb 8, 2025
edc6022
Fix for #4153 (#4253)
maxi4329 Feb 15, 2025
1bf13ea
BUGFIX in oscillate FX (#4494)
DedeHai Jan 15, 2025
fa2f831
fix for incorrect hardware timing
DedeHai Feb 15, 2025
c46e328
Merge pull request #4556 from spiro-c/npm-check
netmindz Feb 15, 2025
e96fd8a
Merge pull request #4511 from mlichvar/main
willmmiles Jan 22, 2025
1fc3cc8
Merge pull request #4450 from adafruit/main
softhack007 Jan 6, 2025
f490908
Merge pull request #4439 from dosipod/Upstream_PRs
softhack007 Jan 4, 2025
85d3f6f
Merge pull request #4398 from Aircoookie/4395-platformio_override
softhack007 Dec 16, 2024
642a9e3
Idle current bugfix (#4402)
blazoncek Dec 17, 2024
b75a2de
Merge pull request #4356 from blazoncek/json-cycle
netmindz Dec 12, 2024
f593d40
Merge pull request #4244 from MoonModules/framerate_ac015
netmindz Dec 4, 2024
dc3d463
Merge pull request #4428 from blazoncek/waterfall-fix
netmindz Jan 16, 2025
dbe7647
Merge pull request #4484 from blazoncek/parallel-I2S
blazoncek Feb 13, 2025
6572efb
Update version to 0.15.1.beta2
netmindz Feb 22, 2025
0a28acf
Generate changelog
netmindz Feb 22, 2025
d962903
add warning about unconfigurable outputs
PaoloTK Mar 8, 2025
ddec6fb
swap tags
PaoloTK Mar 8, 2025
4c01893
fix indentation
PaoloTK Mar 10, 2025
7b521c7
Merge pull request #4589 from PaoloTK/add_last_output_warning
netmindz Mar 11, 2025
e16c4b8
UI info
blazoncek Dec 29, 2024
249c124
Clear spaced segment
blazoncek Dec 31, 2024
47a9e4a
Shifting bugfix & size tuning in fade_out
blazoncek Jan 7, 2025
b008a64
W Hex entry bugfix & optiisation
blazoncek Jan 8, 2025
7626791
Replace magic with cosntant
blazoncek Jan 17, 2025
a38d607
Bugfix in settings
blazoncek Jan 19, 2025
bbc9b9c
Use constant CALL_MODE_INIT
blazoncek Jan 27, 2025
741bdf0
Clarify use of index counter
blazoncek Feb 4, 2025
7455ea7
Avoid shadowing global col[]
blazoncek Feb 6, 2025
9bddfb1
Cherry-pick fix
blazoncek Feb 19, 2025
8654c2e
Bugfix for #4590
blazoncek Mar 9, 2025
22eee96
Cherry pick fixes
blazoncek Mar 13, 2025
3830d49
Additional fix
blazoncek Mar 13, 2025
5cac18f
Update map1D2D
blazoncek Mar 13, 2025
a353a64
Fix wipe effect smoothness
Dschogo Mar 15, 2025
6e7fffe
Merge pull request #4596 from Dschogo/patch-1
blazoncek Mar 15, 2025
0597102
fix timer overflow bug in handleRandomPalette()
DedeHai Mar 29, 2025
2e4f3f8
Merge pull request #4624 from DedeHai/0_15_x_randompalette_timing_fix
DedeHai Apr 13, 2025
ecfe6e6
Merge pull request #4595 from wled/cherry-pick-mulifix
netmindz Apr 15, 2025
5ec39f7
bugfix in enumerating buttons and busses (#4657)
DedeHai Apr 23, 2025
2f31ff0
Fix missing "adPal" ID
blazoncek May 29, 2025
00ab1da
Fix for #4752
blazoncek Jul 1, 2025
a25fc6e
Cherry pick fix
blazoncek Jul 1, 2025
232dc04
Fix color conversion bug for parallel I2S output
blazoncek Jul 5, 2025
1808fa7
Prevent parallel I2S use if different LED types are used.
blazoncek Jun 29, 2025
cfa8b73
bus_wrapper: Use parallel I2S first when enabled
willmmiles Jul 9, 2025
e428e80
bus_wrapper: Update comments to reflect RMT usage
willmmiles Jul 9, 2025
39f3c99
Merge pull request #4763 from wled/fix-parallel-i2s-selection
blazoncek Jul 16, 2025
6fa2f48
Merge pull request #4766 from Arcitec/backport-i2s-bus-selection
willmmiles Jul 21, 2025
b27541e
Set parallel I2S on by default
blazoncek Jul 26, 2025
4b42f6b
update to 0.15.1-rc1
netmindz Jul 26, 2025
83ae6d0
Filter release notes for releaseBranch: 0_15_x
netmindz Jul 27, 2025
ec51804
0.15.1-rc2
netmindz Jul 27, 2025
ab2c975
Add esp32dev_V4 to default build
netmindz Jul 27, 2025
9dc7e81
Add DMX Input support to builds
Jan 16, 2025
78252c6
Add esp32dev_v4 env
netmindz Jan 13, 2025
4f3992b
0.15.1
netmindz Jul 30, 2025
b6d9aad
Revert NeoPixelBus back to 2.8.0 due to flicker issues
netmindz Aug 2, 2025
26080b2
0.15.2-beta1
netmindz Aug 2, 2025
a24d4bc
Revert "Revert NeoPixelBus back to 2.8.0 due to flicker issues"
netmindz Aug 2, 2025
0ecae7e
Bugfix for brightness factor upon save: fixes #4824 (#4827)
DedeHai Aug 9, 2025
a9f52a1
Update AsyncWebServer and AsyncTCP
willmmiles Jul 31, 2025
4e1ca9b
Update to AsyncTCP 3.4.7
willmmiles Aug 2, 2025
9c82add
Downtune AsyncTCP stack size
willmmiles Aug 4, 2025
7a52144
Merge pull request #4834 from willmmiles/0_15_x_wsonly
netmindz Aug 13, 2025
f6d1f3b
Bootloop detection & recovery (#4793)
DedeHai Aug 15, 2025
693f3b0
add IDF V3 support for bootloop detection
DedeHai Aug 16, 2025
501b6e7
fix compile error brought in from upstream
DedeHai Aug 16, 2025
dba31cb
Fix broken Sync button after 0.15 refactor
Arcitec Aug 17, 2025
2df536c
0.15.x: Make version information consistent across update interfaces
Arcitec Aug 17, 2025
b155f80
Merge pull request #4849 from Arcitec/0_15_x-improve-version-info
netmindz Aug 20, 2025
d176302
Merge pull request #4845 from Arcitec/0_15_x-fix-sync
netmindz Aug 31, 2025
c24f67c
fix ancient bug in percent FX
DedeHai Sep 5, 2025
68a8534
Merge pull request #4914 from DedeHai/percentFX_UI_fix_015
DedeHai Sep 7, 2025
fc35f0a
Bugfix for FX: Tri Fade
blazoncek Sep 8, 2025
79762f4
Fix bootloop if config missing/reset
willmmiles Aug 19, 2025
4cdaa57
ESP8266: Commit ACTIONT_TRACKER
willmmiles Aug 19, 2025
66573be
Use consistent naming for backups and reset cfgs
willmmiles Aug 19, 2025
ed496fb
Add a little more PSTR to bootloop handling
willmmiles Aug 19, 2025
e82b519
Use direct references to RTC RAM on ESP8266
willmmiles Aug 20, 2025
69263c1
Isolate platform differences in bootloop check
willmmiles Aug 20, 2025
430a82a
Bootloop: Include soft wdt on ESP8266
willmmiles Aug 27, 2025
ce5f6d7
Reset crash counter after long interval
willmmiles Aug 29, 2025
d935975
Increase boot loop timeout
willmmiles Aug 29, 2025
5a52f4a
do not mark for reset if boundsUnchanged.
DedeHai Sep 28, 2025
0516dfe
bugfix: do not reset segments if unchanged #4969
DedeHai Sep 28, 2025
a50f12d
Merge pull request #4918 from wled/tricolor-fix-015
DedeHai Sep 28, 2025
37612e5
Import RmtHI driver
willmmiles Aug 27, 2025
b762704
RmtHI: Remove incorrect default selection block
willmmiles Sep 2, 2025
139f4d9
RmtHI: Fix incorrect method typedefs
willmmiles Sep 2, 2025
32fccb6
Undo RMTHi change to platformio.ini
willmmiles Sep 2, 2025
3e80c2c
RmtHI: Add missing includes
willmmiles Sep 2, 2025
4cee975
Merge pull request #4980 from willmmiles/0_15_x_rmthi
willmmiles Oct 5, 2025
d12bf77
add out of bound check for action tracker
DedeHai Oct 9, 2025
c756a12
fix buffer size calculation for ESP8266 (0.15 edition) (#4951)
DedeHai Oct 10, 2025
3029a4e
Implement OTA release compatibility checking system
Copilot Sep 14, 2025
b552744
Process metadata only in metadata.cpp
willmmiles Oct 6, 2025
7e8bb20
Fix blank area issue with Twinkle
benjamw Oct 17, 2025
7b872bf
Fix metadata includes
willmmiles Oct 25, 2025
d37cae8
Fix set_metadata script
willmmiles Oct 25, 2025
114f85f
set_metadata: Apply code fixes from @coderabbit
willmmiles Oct 25, 2025
14ffde4
Fix bad backport merge on update.htm
willmmiles Oct 25, 2025
ab3cf4a
Merge pull request #4999 from willmmiles/0_15_x-fix-4929
netmindz Oct 25, 2025
9a32fea
Always use package.json for WLED_VERSION
willmmiles Oct 26, 2025
90b1912
Merge pull request #5034 from willmmiles/0_15_x-fix-4929
netmindz Nov 7, 2025
319edc7
Merge branch '0_15_x' into 0_15_x_bootloopdetect
DedeHai Nov 8, 2025
7d0a338
re-adding bootloop handling to ota_update
DedeHai Nov 8, 2025
1706fdc
Merge pull request #5007 from benjamw/twinkle_fixes_15_x
netmindz Nov 8, 2025
2d0771f
Merge pull request #4840 from DedeHai/0_15_x_bootloopdetect
willmmiles Nov 8, 2025
0bc64b4
Fix unaligned reads during metadata search
willmmiles Oct 25, 2025
4750ac5
Add source version check to OTA update
willmmiles Nov 8, 2025
379f9c9
Implement correct update version check
willmmiles Nov 9, 2025
5a9bdad
Relax self update requirements
willmmiles Nov 9, 2025
0d911e9
Merge pull request #5058 from willmmiles/0_15_x-update-source-version…
netmindz Nov 9, 2025
c8bda1a
Bump version from 0.15.2-beta1 to 0.15.2-beta2
netmindz Nov 9, 2025
e357c8a
dynamic LED type selection, backport
DedeHai Nov 13, 2025
bdddca0
fix for #4298 - no conflict with DMX output
netmindz Nov 17, 2025
d85ef56
AR: handle stupid build flag SR_DMTYPE=-1
softhack007 Nov 22, 2025
799f065
Initial plan
Copilot Nov 27, 2025
fea140e
Backport version reporting from PR #5093 and #5111
Copilot Nov 27, 2025
3738bf7
Add #undef BIT_WIDTH after use
Copilot Nov 27, 2025
17cdca2
Add codeql artifact to gitignore
Copilot Nov 27, 2025
bb3ee7c
Add bootloader SHA256 hash to JSON info (cherry-pick from main)
Copilot Nov 27, 2025
7a8f5d5
Merge pull request #5116 from wled/add-report-version-feature
netmindz Nov 27, 2025
bc41b38
Convert PSRAM to MB in usage reporting (#5130)
Copilot Nov 28, 2025
c64c94d
avoid #define in generateDeviceFingerprint()
softhack007 Nov 28, 2025
77e3c4d
add bootloader offsets for -C3, S3, and some future MCU's
softhack007 Nov 29, 2025
7a5c6f9
use esp_flash_read for S3, S2, C3
softhack007 Nov 29, 2025
f9e72f9
fix over-protective ESP_IDF_VERSION check
softhack007 Nov 29, 2025
1531776
allow different bootloader sizes for each MCU
softhack007 Nov 29, 2025
a374165
Fix version checking for chip_info.full_revision
netmindz Nov 29, 2025
53b88ca
Merge pull request #5126 from wled/copilot/backport-version-reporting…
netmindz Nov 29, 2025
da2547e
Merge pull request #5084 from DedeHai/fix_LEDtype_selection_015
netmindz Nov 29, 2025
071622c
Merge pull request #5097 from netmindz/no-dmx-ar-conflict_0_15
netmindz Nov 29, 2025
d43e056
fix loading version-info to use older edit api
netmindz Nov 29, 2025
fe14816
0.15.2
netmindz Nov 29, 2025
a9a2b83
0.15.3-beta
netmindz Nov 29, 2025
4995f05
Fix ESP8266 DMA off-by-one
willmmiles Dec 1, 2025
95849e9
Merge pull request #5139 from willmmiles/0_15_esp8266-dma-fix
netmindz Dec 1, 2025
6d6cd60
Revert "Fix ESP8266 DMA off-by-one"
willmmiles Dec 2, 2025
5e92d23
Update NeoPixelBus with DMA fix
willmmiles Dec 2, 2025
8ac5b44
Merge pull request #5148 from willmmiles/0_15-npb-894
netmindz Dec 2, 2025
d9831f6
AR bugfix
softhack007 Dec 2, 2025
58a84b6
0.15.3
netmindz Dec 4, 2025
dbbc8de
HSV und Deutschland Live Ticker integriert
KimMitLahmeHacke May 16, 2026
b2b57e7
Major Update
KimMitLahmeHacke May 24, 2026
6d6a005
Update
KimMitLahmeHacke May 24, 2026
0b8f94d
Now with internet connection working
KimMitLahmeHacke Jun 14, 2026
813c54e
Update
KimMitLahmeHacke Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,17 @@ jobs:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: "✏️ Generate release changelog"
id: changelog
uses: janheinrichmerker/action-github-changelog-generator@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
sinceTag: v0.15.0
releaseBranch: 0_15_x
- name: Create draft release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changelog.outputs.changelog }}
draft: True
files: |
*.bin
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ wled-update.sh

/build_output/
/node_modules/
/logs/

/wled00/extLibs
/wled00/LittleFS
/wled00/my_config.h
/wled00/Release
/wled00/wled00.ino.cpp
/wled00/html_*.h
_codeql_detected_source_root
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
## WLED changelog

#### Build 2412100
- WLED 0.15.0 release
- Usermod BME280: Fix "Unit of Measurement" for temperature
- WiFi reconnect bugfix (@blazoncek)

#### Build 2411250
- WLED 0.15.0-rc1 release
- Add support for esp32S3_wroom2 (#4243 by @softhack007)
- Fix mixed LED SK6812 and ws2812b booloop (#4301 by @willmmiles)
- Improved FPS calculation (by DedeHai)
- Fix crashes when using HTTP API within MQTT (#4269 by @willmmiles)
- Fix array overflow in exploding_fireworks (#4120 by @willmmiles)
- Fix MQTT topic buffer length (#4293 by @WouterGritter)
- Fix SparkFunDMX fix for possible array bounds violation in DMX.write (by @softhack007)
- Allow TV Simulator on single LED segments (by @softhack007)
- Fix WLED_RELEASE_NAME (by @netmindz)


#### Build 2410270
- WLED 0.15.0-b7 release
- Re-license the WLED project from MIT to EUPL (#4194 by @Aircoookie)
Expand Down
Binary file added HSVTicker_Dokumentation_1.pdf
Binary file not shown.
469 changes: 469 additions & 0 deletions lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions lib/NeoESP32RmtHI/library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "NeoESP32RmtHI",
"build": { "libArchive": false },
"platforms": ["espressif32"],
"dependencies": [
{
"owner": "makuna",
"name": "NeoPixelBus",
"version": "^2.8.3"
}
]
}
263 changes: 263 additions & 0 deletions lib/NeoESP32RmtHI/src/NeoEsp32RmtHI.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
/* RMT ISR shim
* Bridges from a high-level interrupt to the C++ code.
*
* This code is largely derived from Espressif's 'hli_vector.S' Bluetooth ISR.
*
*/

#if defined(__XTENSA__) && defined(ESP32) && !defined(CONFIG_BTDM_CTRL_HLI)

#include <freertos/xtensa_context.h>
#include "sdkconfig.h"
#include "soc/soc.h"

/* If the Bluetooth driver has hooked the high-priority interrupt, we piggyback on it and don't need this. */
#ifndef CONFIG_BTDM_CTRL_HLI

/*
Select interrupt based on system check level
- Base ESP32: could be 4 or 5, depends on platform config
- S2: 5
- S3: 5
*/

#if CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5
/* Use level 4 */
#define RFI_X 4
#define xt_highintx xt_highint4
#else /* !CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 */
/* Use level 5 */
#define RFI_X 5
#define xt_highintx xt_highint5
#endif /* CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 */

// Register map, based on interrupt level
#define EPC_X (EPC + RFI_X)
#define EXCSAVE_X (EXCSAVE + RFI_X)

// The sp mnemonic is used all over in ESP's assembly, though I'm not sure where it's expected to be defined?
#define sp a1

/* Interrupt stack size, for C code. */
#define RMT_INTR_STACK_SIZE 512

/* Save area for the CPU state:
* - 64 words for the general purpose registers
* - 7 words for some of the special registers:
* - WINDOWBASE, WINDOWSTART — only WINDOWSTART is truly needed
* - SAR, LBEG, LEND, LCOUNT — since the C code might use these
* - EPC1 — since the C code might cause window overflow exceptions
* This is not laid out as standard exception frame structure
* for simplicity of the save/restore code.
*/
#define REG_FILE_SIZE (64 * 4)
#define SPECREG_OFFSET REG_FILE_SIZE
#define SPECREG_SIZE (7 * 4)
#define REG_SAVE_AREA_SIZE (SPECREG_OFFSET + SPECREG_SIZE)

.data
_rmt_intr_stack:
.space RMT_INTR_STACK_SIZE
_rmt_save_ctx:
.space REG_SAVE_AREA_SIZE

.section .iram1,"ax"
.global xt_highintx
.type xt_highintx,@function
.align 4

xt_highintx:

movi a0, _rmt_save_ctx
/* save 4 lower registers */
s32i a1, a0, 4
s32i a2, a0, 8
s32i a3, a0, 12
rsr a2, EXCSAVE_X /* holds the value of a0 */
s32i a2, a0, 0

/* Save special registers */
addi a0, a0, SPECREG_OFFSET
rsr a2, WINDOWBASE
s32i a2, a0, 0
rsr a2, WINDOWSTART
s32i a2, a0, 4
rsr a2, SAR
s32i a2, a0, 8
#if XCHAL_HAVE_LOOPS
rsr a2, LBEG
s32i a2, a0, 12
rsr a2, LEND
s32i a2, a0, 16
rsr a2, LCOUNT
s32i a2, a0, 20
#endif
rsr a2, EPC1
s32i a2, a0, 24

/* disable exception mode, window overflow */
movi a0, PS_INTLEVEL(RFI_X+1) | PS_EXCM
wsr a0, PS
rsync

/* Save the remaining physical registers.
* 4 registers are already saved, which leaves 60 registers to save.
* (FIXME: consider the case when the CPU is configured with physical 32 registers)
* These 60 registers are saved in 5 iterations, 12 registers at a time.
*/
movi a1, 5
movi a3, _rmt_save_ctx + 4 * 4

/* This is repeated 5 times, each time the window is shifted by 12 registers.
* We come here with a1 = downcounter, a3 = save pointer, a2 and a0 unused.
*/
1:
s32i a4, a3, 0
s32i a5, a3, 4
s32i a6, a3, 8
s32i a7, a3, 12
s32i a8, a3, 16
s32i a9, a3, 20
s32i a10, a3, 24
s32i a11, a3, 28
s32i a12, a3, 32
s32i a13, a3, 36
s32i a14, a3, 40
s32i a15, a3, 44

/* We are about to rotate the window, so that a12-a15 will become the new a0-a3.
* Copy a0-a3 to a12-15 to still have access to these values.
* At the same time we can decrement the counter and adjust the save area pointer
*/

/* a0 is constant (_rmt_save_ctx), no need to copy */
addi a13, a1, -1 /* copy and decrement the downcounter */
/* a2 is scratch so no need to copy */
addi a15, a3, 48 /* copy and adjust the save area pointer */
beqz a13, 2f /* have saved all registers ? */
rotw 3 /* rotate the window and go back */
j 1b

/* the loop is complete */
2:
rotw 4 /* this brings us back to the original window */
/* a0 still points to _rmt_save_ctx */

/* Can clear WINDOWSTART now, all registers are saved */
rsr a2, WINDOWBASE
/* WINDOWSTART = (1 << WINDOWBASE) */
movi a3, 1
ssl a2
sll a3, a3
wsr a3, WINDOWSTART

_highint_stack_switch:
movi a0, 0
movi sp, _rmt_intr_stack + RMT_INTR_STACK_SIZE - 16
s32e a0, sp, -12 /* For GDB: set null SP */
s32e a0, sp, -16 /* For GDB: set null PC */
movi a0, _highint_stack_switch /* For GDB: cosmetics, for the frame where stack switch happened */

/* Set up PS for C, disable all interrupts except NMI and debug, and clear EXCM. */
movi a6, PS_INTLEVEL(RFI_X) | PS_UM | PS_WOE
wsr a6, PS
rsync

/* Call C handler */
mov a6, sp
call4 NeoEsp32RmtMethodIsr

l32e sp, sp, -12 /* switch back to the original stack */

/* Done with C handler; re-enable exception mode, disabling window overflow */
movi a2, PS_INTLEVEL(RFI_X+1) | PS_EXCM /* TOCHECK */
wsr a2, PS
rsync

/* Restore the special registers.
* WINDOWSTART will be restored near the end.
*/
movi a0, _rmt_save_ctx + SPECREG_OFFSET
l32i a2, a0, 8
wsr a2, SAR
#if XCHAL_HAVE_LOOPS
l32i a2, a0, 12
wsr a2, LBEG
l32i a2, a0, 16
wsr a2, LEND
l32i a2, a0, 20
wsr a2, LCOUNT
#endif
l32i a2, a0, 24
wsr a2, EPC1

/* Restoring the physical registers.
* This is the reverse to the saving process above.
*/

/* Rotate back to the final window, then start loading 12 registers at a time,
* in 5 iterations.
* Again, a1 is the downcounter and a3 is the save area pointer.
* After each rotation, a1 and a3 are copied from a13 and a15.
* To simplify the loop, we put the initial values into a13 and a15.
*/
rotw -4
movi a15, _rmt_save_ctx + 64 * 4 /* point to the end of the save area */
movi a13, 5

1:
/* Copy a1 and a3 from their previous location,
* at the same time decrementing and adjusting the save area pointer.
*/
addi a1, a13, -1
addi a3, a15, -48

/* Load 12 registers */
l32i a4, a3, 0
l32i a5, a3, 4
l32i a6, a3, 8
l32i a7, a3, 12
l32i a8, a3, 16
l32i a9, a3, 20
l32i a10, a3, 24
l32i a11, a3, 28 /* ensure PS and EPC written */
l32i a12, a3, 32
l32i a13, a3, 36
l32i a14, a3, 40
l32i a15, a3, 44

/* Done with the loop? */
beqz a1, 2f
/* If no, rotate the window and repeat */
rotw -3
j 1b

2:
/* Done with the loop. Only 4 registers (a0-a3 in the original window) remain
* to be restored. Also need to restore WINDOWSTART, since all the general
* registers are now in place.
*/
movi a0, _rmt_save_ctx

l32i a2, a0, SPECREG_OFFSET + 4
wsr a2, WINDOWSTART

l32i a1, a0, 4
l32i a2, a0, 8
l32i a3, a0, 12
rsr a0, EXCSAVE_X /* holds the value of a0 before the interrupt handler */

/* Return from the interrupt, restoring PS from EPS_X */
rfi RFI_X


/* The linker has no reason to link in this file; all symbols it exports are already defined
(weakly!) in the default int handler. Define a symbol here so we can use it to have the
linker inspect this anyway. */

.global ld_include_hli_vectors_rmt
ld_include_hli_vectors_rmt:


#endif // CONFIG_BTDM_CTRL_HLI
#endif // XTensa
Loading