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

Zephyr 2.5 upgrade #736

Merged
merged 13 commits into from
Jul 17, 2021
Merged

Conversation

petejohanson
Copy link
Contributor

The start of the Zephyr 2.5.0 upgrade. I need to do more real world testing, so far it works for basics on my Zaphod prototype, but I am having some issue w/ deadlocks w/ the display enabled, which may or may not be Zaphod specific.

@petejohanson petejohanson added core Core functionality/behavior of ZMK dependencies Pull requests that update a dependency file labels Mar 22, 2021
@petejohanson petejohanson self-assigned this Mar 22, 2021
@petejohanson petejohanson force-pushed the zephyr-2.5-upgrade branch 4 times, most recently from ae7e4d3 to d96e6a8 Compare March 24, 2021 15:39
@petejohanson petejohanson marked this pull request as ready for review March 26, 2021 15:14
@innovaker
Copy link
Contributor

My end-2-end tests are passing on both BLE and USB 🥳

@innovaker
Copy link
Contributor

We should upgrade https://github.com/zmkfirmware/zmk-docker as a corequisite to this PR.

Copy link
Contributor

@innovaker innovaker left a comment

Choose a reason for hiding this comment

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

Thanks @petejohanson! I've been through the PR in detail. Generally looks fine 👍


zephyrproject-rtos/zephyr@de5aa40

power: standarize PM Kconfigs and cleanup

1e9662b

refactor: Upgrade to Zephyr 2.5.0.

Confirmed, looks OK.


zephyrproject-rtos/zephyr@51dba7a

power: Move pm subsystem to new power states

1e9662b

refactor: Upgrade to Zephyr 2.5.0.

Confirmed, looks OK.


https://docs.zephyrproject.org/2.5.0/releases/release-notes-2.5.html

DEVICE_AND_API_INIT was deprecated in favor of DEVICE_DT_INST_DEFINE and DEVICE_DEFINE.

58cff59

Confirmed, looks OK.


https://discord.com/channels/719497620560543766/719544230497878116/778662581123416135

SYS_PM_POLICY

petejohanson/zephyr@7b06338

They've still not given Idle State Power Management Policy a name? o_O


The power changes should probably be in a separate commit to the west.yml changes.


https://docs.zephyrproject.org/2.5.0/releases/release-notes-2.5.html

Made these global changes in STM32 boards and SoC series:
Pin control configuration is now done through devicetree and existing macros to configure pins in pinmux.c files are tagged as deprecated. The new pin settings are provided thanks to .dtsi files distributed in hal_stm32 module.

91bc402
97b93aa

Which I think covers these?

  • bdn9_rev2
  • dz60rgb_rev1
  • planck_rev6
  • proton_c

My interpretations of the changes are:

  • bdn9_rev2 already had it enabled but didn't include the now deprecated pinmux.c?
  • dz60rgb_rev1 is now enabled?
  • planck_rev6 is still running on the old system? What's the plan?
  • proton_c has been converted (I guess you own one)?

I'd suggest reordering the commits so that the PINMUX related commits are sequential.


https://docs.zephyrproject.org/2.5.0/releases/release-notes-2.5.html

LVGL
Library has been updated to minor release v7.6.1

fecfad7

fix(display): Avoid fault w/ LVGL API usage.

I skipped this one :)


https://docs.zephyrproject.org/2.5.0/releases/release-notes-2.5.html

The deprecated BT_LE_ADV_* macros have been removed, use the BT_GAP_ADV_* enums instead.

Do you know which macros were removed? The release notes state they were deprecated in 2.3.0 and removed in 2.5.0, but I only found these ...

zephyr/include/bluetooth/bluetooth.h
  596,1: #define BT_LE_ADV_PARAM_INIT(_options, _int_min, _int_max, _peer) \
  616,1: #define BT_LE_ADV_PARAM(_options, _int_min, _int_max, _peer) \
  621,1: #define BT_LE_ADV_CONN_DIR(_peer) BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE |  \
  626,1: #define BT_LE_ADV_CONN BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, \
  630,1: #define BT_LE_ADV_CONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | \
  635,1: #define BT_LE_ADV_CONN_DIR_LOW_DUTY(_peer) \
  642,1: #define BT_LE_ADV_NCONN BT_LE_ADV_PARAM(0, BT_GAP_ADV_FAST_INT_MIN_2, \
  646,1: #define BT_LE_ADV_NCONN_NAME BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_NAME, \
  651,1: #define BT_LE_ADV_NCONN_IDENTITY BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_IDENTITY, \

zephyr/include/bluetooth/hci.h
  813,1: #define BT_LE_ADV_FP_NO_WHITELIST               0x00
  814,1: #define BT_LE_ADV_FP_WHITELIST_SCAN_REQ         0x01
  815,1: #define BT_LE_ADV_FP_WHITELIST_CONN_IND         0x02
  816,1: #define BT_LE_ADV_FP_WHITELIST_BOTH             0x03

which still exist in 2.5.0.
ZMK still uses the BT_LE_ADV_PARAM macro. Should it?


https://github.com/petejohanson/zephyr/commits/v2.5.0-zmk-fixes

I noticed we've never tidied up the hotfix commit messages on ZMK's fork of zephyr. Each of the 3 commits currently follows a different convention (I'm also at fault here). This release might be a good opportunity to align them one way or another as they seem determined to outstay their welcome.


Generally speaking, it's much easier to validate/verify Zephyr upgrade PRs if relevant references are included in the commit messages (as footers?). Such as:

  • a link to the relevant release note (if the change is listed)
  • GitHub issue or PR #
  • commit hashes

In this instance, the power changes weren't trivial to trace and doing so probably duplicated your own efforts.


Will approve after we complete the container upgrades.

app/west.yml Show resolved Hide resolved
app/west.yml Outdated Show resolved Hide resolved
app/src/behaviors/behavior_bt.c Show resolved Hide resolved
app/src/behaviors/behavior_hold_tap.c Show resolved Hide resolved
app/src/behaviors/behavior_mod_morph.c Show resolved Hide resolved
app/src/behaviors/behavior_none.c Show resolved Hide resolved
app/src/behaviors/behavior_transparent.c Show resolved Hide resolved
app/Kconfig Show resolved Hide resolved
@innovaker
Copy link
Contributor

Should the commits in the Zephyr fixes branch(es) contain notices that The ZMK Contributors modified them? They're Apache 2.0 files. If so, we should add this retrospectively to the old branches too.

@innovaker innovaker mentioned this pull request May 6, 2021
17 tasks
@innovaker
Copy link
Contributor

innovaker commented May 6, 2021

@schengnz
Copy link

Is there any chance we could roll in the J-Link thread awareness support recently added to Zephyr (#788)? Thanks!

@petejohanson petejohanson force-pushed the zephyr-2.5-upgrade branch 3 times, most recently from 95fffcb to a2c0ab7 Compare June 10, 2021 03:39
@petejohanson
Copy link
Contributor Author

@innovaker Fixed up the commit messages w/ "See" trailers with some relevant links.

@innovaker
Copy link
Contributor

Documentation!

Has anyone compared Zephyr 2.4.0 vs. Zephyr 2.5.0 vs. ZMK Basic Setup

* https://docs.zephyrproject.org/2.4.0/getting_started/index.html

* https://docs.zephyrproject.org/2.4.0/getting_started/installation_linux.html

* https://docs.zephyrproject.org/2.4.0/guides/beyond-GSG.html

* https://docs.zephyrproject.org/2.5.0/getting_started/index.html

* https://docs.zephyrproject.org/2.5.0/getting_started/installation_linux.html

* https://docs.zephyrproject.org/2.5.0/guides/beyond-GSG.html

* https://zmkfirmware.dev/docs/development/setup

and/or updated the ZMK documentation accordingly for this PR (or any prerequisite syncing!)?

Has this been done? A quick looks suggests the Zephyr SDK needs boosting.

@innovaker innovaker self-requested a review June 14, 2021 14:26
@petejohanson petejohanson force-pushed the zephyr-2.5-upgrade branch 4 times, most recently from acdc997 to 58695a2 Compare June 18, 2021 03:16
NikolaRavic pushed a commit to NikolaRavic/zmk-firmware that referenced this pull request Feb 27, 2023
NikolaRavic pushed a commit to NikolaRavic/zmk-firmware that referenced this pull request Feb 27, 2023
NikolaRavic pushed a commit to NikolaRavic/zmk-firmware that referenced this pull request Feb 27, 2023
NikolaRavic pushed a commit to NikolaRavic/zmk-firmware that referenced this pull request Feb 27, 2023
yuanbin pushed a commit to yuanbin/zmk that referenced this pull request Jun 14, 2023
yuanbin pushed a commit to yuanbin/zmk that referenced this pull request Jun 14, 2023
yuanbin pushed a commit to yuanbin/zmk that referenced this pull request Jun 14, 2023
* new cbprintf formatter causes issues for our use of string formatting.

See: zephyrproject-rtos/zephyr#29876
PR: zmkfirmware#736
yuanbin pushed a commit to yuanbin/zmk that referenced this pull request Jun 14, 2023
* Increment the tick from within the ISR itself.
* Don't call task handler until in the display callback.

PR: zmkfirmware#736
yuanbin pushed a commit to yuanbin/zmk that referenced this pull request Jun 14, 2023
yuanbin pushed a commit to yuanbin/zmk that referenced this pull request Jun 14, 2023
yuanbin pushed a commit to yuanbin/zmk that referenced this pull request Jun 14, 2023
yuanbin pushed a commit to yuanbin/zmk that referenced this pull request Jun 14, 2023
infused-kim pushed a commit to infused-kim/kb_zmk_ps2_mouse_trackpoint_driver that referenced this pull request Apr 14, 2024
infused-kim pushed a commit to infused-kim/kb_zmk_ps2_mouse_trackpoint_driver that referenced this pull request Apr 14, 2024
* new cbprintf formatter causes issues for our use of string formatting.

See: zephyrproject-rtos/zephyr#29876
PR: zmkfirmware/zmk#736
think4tomorrow added a commit to think4tomorrow/zhc that referenced this pull request Dec 18, 2024
think4tomorrow added a commit to think4tomorrow/zhc that referenced this pull request Dec 18, 2024
think4tomorrow added a commit to think4tomorrow/zhc that referenced this pull request Dec 18, 2024
* new cbprintf formatter causes issues for our use of string formatting.

See: zephyrproject-rtos/zephyr#29876
PR: zmkfirmware/zmk#736
think4tomorrow added a commit to think4tomorrow/zhc that referenced this pull request Dec 18, 2024
* Increment the tick from within the ISR itself.
* Don't call task handler until in the display callback.

PR: zmkfirmware/zmk#736
think4tomorrow added a commit to think4tomorrow/zhc that referenced this pull request Dec 18, 2024
think4tomorrow added a commit to think4tomorrow/zhc that referenced this pull request Dec 18, 2024
think4tomorrow added a commit to think4tomorrow/zhc that referenced this pull request Dec 18, 2024
think4tomorrow added a commit to think4tomorrow/zhc that referenced this pull request Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core functionality/behavior of ZMK dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants