Skip to content

Conversation

@Muqeet-Salam
Copy link

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes. (no changes to api)
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description

Integrated rz-svd into subprojects, removed the hardcoded values from librz/bin/p/bin_avr.c and used the rz-svd plugin to detect the AVR device names.

...

Test plan

Build and compile the project to ensure rz-svd is added as a subproject, and then test an AVR ELF binary to ensure AVR plugin loads correctly, device detection works, hardcoded tables are no longer required

rz-bin -i path/to/.elf/file
rz-bin -s path/to/.elf/file

Closing issues

closes #5229

...

Copy link
Member

Choose a reason for hiding this comment

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

this file needs a copyright header

Copy link
Member

Choose a reason for hiding this comment

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

Same here, this file needs a copyright header

Copy link
Member

Choose a reason for hiding this comment

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

remove this

Comment on lines 22 to 25
rz_svd_proj = subproject(
'rz-svd',
default_options: ['default_library=static', 'werror=false']
)
Copy link
Member

Choose a reason for hiding this comment

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

this is not the right place.

Copy link
Member

@wargio wargio left a comment

Choose a reason for hiding this comment

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

The removed hardcoded boards needs to be replaced with svd files, i think.

@notxvilka @Rot127

Copy link
Contributor

@notxvilka notxvilka left a comment

Choose a reason for hiding this comment

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

Just reuse existing yxml subproject instead of adding one more copy

/**
* Helper: Extract basename from filepath
*/
static const char *avr_path_basename(const char *path) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We have functions for that in librz/util

/**
* Helper: Convert string to lowercase in place
*/
static void avr_str_tolower(char *str) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same, there is a function for that

/**
* Helper: Allocate and copy n bytes of a string
*/
static char *avr_str_ndup(const char *str, size_t n) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a function for that

@Rot127 Rot127 marked this pull request as draft January 30, 2026 16:40
@Rot127 Rot127 added the Requirements not met The PR doesn't meet the minimum contribution requirements. See CONTRIBUTING.md for details. label Jan 30, 2026
@Muqeet-Salam
Copy link
Author

Hey, I made all the requested changes. The rz-svd build moving from librz/meson.build to meson.build is causing some dependency issues. To fix those I referenced librz/util directly which is why the compiling is showing 2 warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Requirements not met The PR doesn't meet the minimum contribution requirements. See CONTRIBUTING.md for details. RzBin RzCore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate rz-svd into the Rizin in general and RzBin AVR plugin in particular

4 participants