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

[refactoring] General maintenance for code structure #1216

Merged
merged 16 commits into from
Jan 28, 2022

Conversation

Nightwalker-87
Copy link
Member

@Nightwalker-87 Nightwalker-87 commented Jan 16, 2022

List of changes and improvements:

  • Revised device-specific parametres in the .chip files
  • Aligned naming for .chip files and defines
  • Unified formatting for .chip files
  • Removed function dump_a_chip and old device database from common.c
  • Moved-out STM32-specific defines to stm32.h
  • Updated MCU core-ids
  • Removed additional extern "C" linkage specs

(Closes #903) (Closes #1090) (Closes #1199) (Closes #1212) (Closes #1228)

- Spelling fix in tutorial.md
- REN param description --> dev_type
- ADD param ref_manual_id
- CHNG stlink_chipid_params
- MV old chipids to chipid_db_old.h
- Updated chipid files (F1, F2, WB, WLE)
- F0, F1, F2, F3, F4, F7
- G0, G4
- H7
- L0, L5, U5
- WB, WL
- Moved enum stlink_stm32_chipids to stm32.h
- Moved additional MCU defines to stlink.h
- Minor formatting improvements
- Commented comparison for old/new chipid db
- Removed additional extern "C" linkage specs
- Removed commented sections
- Moved out further device specific defines
- Renamed defines STM32_CHIP_ID_*
hydroconstructor added a commit to hydroconstructor/stlink that referenced this pull request Jan 20, 2022
File divided to some parts. Functions with "flash" in names extracted to common_flash.c, with "option" extracted to option.c etc.
Removed unnecessary headers.
Removed one single function which was used nowhere.
And so on.
Project built under Windows and seems to be working.
hydroconstructor added a commit to hydroconstructor/stlink that referenced this pull request Jan 20, 2022
File divided to some parts. Functions with "flash" in names extracted to common_flash.c, with "option" extracted to option.c etc.
Removed unnecessary headers.
Removed one single function which was used nowhere.
And so on.
Project built under Windows and seems to be working.
- Human-readable  FLASH_TYPE in .chip files
- Added enum for STM32_CORE_IDs
Copy link
Collaborator

@gszy gszy left a comment

Choose a reason for hiding this comment

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

Looks good, though I don’t have the time to review it really carefully.

src/win32/mmap.h Outdated Show resolved Hide resolved
src/win32/mmap.h Outdated Show resolved Hide resolved
src/win32/sys_time.h Outdated Show resolved Hide resolved
src/stlink-lib/usb.h Outdated Show resolved Hide resolved
src/stlink-lib/usb.h Outdated Show resolved Hide resolved
src/stlink-lib/sg.h Outdated Show resolved Hide resolved
src/stlink-lib/sg.h Outdated Show resolved Hide resolved
src/stlink-lib/flash_loader.h Outdated Show resolved Hide resolved
src/stlink-lib/flash_loader.h Outdated Show resolved Hide resolved
@Nightwalker-87
Copy link
Member Author

@gszy I'll clean-up the white space stuff in a separate commit.

- Fixed wrong chip id for F42x_F43x boards.
- Added support note for STM32 clones.
- Minor formatting improvements.
- Updated libusb API_VERSION list.
@Nightwalker-87
Copy link
Member Author

This PR will be merged by Friday. Please consider this if you intend to review.

@Nightwalker-87 Nightwalker-87 merged commit e5cc884 into develop Jan 28, 2022
@Nightwalker-87 Nightwalker-87 deleted the chipid_cleanup branch January 28, 2022 20:42
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Jan 28, 2022
@Nightwalker-87 Nightwalker-87 linked an issue Dec 29, 2022 that may be closed by this pull request
6 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.