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

Initial support for STM32 L5 & U5 devices and minor changes #1300

Merged
merged 12 commits into from
Apr 6, 2023

Conversation

Nightwalker-87
Copy link
Member

@Nightwalker-87 Nightwalker-87 commented Feb 14, 2023

@Nightwalker-87
Copy link
Member Author

Nightwalker-87 commented Feb 14, 2023

@Ant-ON Could you give some remarks on this, tell what is still missing and give an overview on what remains to be addressed? This should include the previous attempt of @Evidlo from #1247, but should remain as a draft until tested with real hardware.

- Corrected flash_pagesize for STM32U5
- Updated STM32 core IDs
- Added chip-id file for STM32H5 devices
- [doc] Update on OS version support
- Minor fixes for G0-series from #1293
- [doc] Added core-IDs for WB/WL-series
- [doc] Correction for G0/L0-series core-IDs
- Set option_size to 128 B for G0-series (#1194)
- Corrected install path for gui executable
- Changed directory for chip-id files
@Nightwalker-87
Copy link
Member Author

We need someone with L5 hardware here for final testing.

inc/stm32.h Outdated Show resolved Hide resolved
src/stlink-lib/common_flash.c Outdated Show resolved Hide resolved
@Ant-ON
Copy link
Collaborator

Ant-ON commented Mar 28, 2023

@Nightwalker-87 I think L5 support also works like U5. And the problems with the previous PR were due to the fact that the dual bank mode was enabled on the board. To solve the problem of the previous PR, you need to add code below to the common.c file after similar code for STM32_CHIPID_G4_CAT3.

  if (sl->chip_id == STM32_CHIPID_L5x2) {
    uint32_t flash_optr;
    stlink_read_debug32(sl, STM32L5_FLASH_OPTR, &flash_optr);

    if (sl->flash_size == 512*1024 && (flash_optr & (1 << 22)) != 0) {
      sl->flash_pgsz = 0x800;
    }
  }

@Nightwalker-87
Copy link
Member Author

ok, I entered these lines there.

- Simplified listing of supported devices
- Corrected #define STM32L5_PWR_CR1_VOS
- Check the return code of stlink_read_debug32
- Fix for flash register reading on L5x2 devices
- Updated pkg-version requirements
- Updated version_support.md
- Removed Ubuntu 18.04 from GH workflow
@slyshykO
Copy link
Collaborator

slyshykO commented Apr 5, 2023

In this PR there is a removed build for Ubuntu 18. The minimum version remaining is Ubuntu 20.04 with libusb 1.0.23.
So I suggest increasing requirements to libusb according to CI in https://github.com/stlink-org/stlink/blob/f2023_1/src/stlink-lib/libusb_settings.h#L37.

@Nightwalker-87
Copy link
Member Author

In this PR there is a removed build for Ubuntu 18. The minimum version remaining is Ubuntu 20.04 with libusb 1.0.23. So I suggest increasing requirements to libusb according to CI in https://github.com/stlink-org/stlink/blob/f2023_1/src/stlink-lib/libusb_settings.h#L37.

I forgot about that ... 😥

- Updated version_support.md
- Updated version requirements for libusb
@Nightwalker-87 Nightwalker-87 merged commit 8da1ae8 into develop Apr 6, 2023
@Nightwalker-87 Nightwalker-87 deleted the f2023_1 branch April 6, 2023 18:14
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 6, 2023
@Nightwalker-87 Nightwalker-87 linked an issue Apr 6, 2023 that may be closed by this pull request
@Nightwalker-87 Nightwalker-87 restored the f2023_1 branch April 6, 2023 18:44
@Nightwalker-87 Nightwalker-87 deleted the f2023_1 branch April 6, 2023 18:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.