Skip to content

Support build on Linux target (DSP-159) #103

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

Closed
wants to merge 1 commit into from

Conversation

howard0su
Copy link
Contributor

@howard0su howard0su commented Apr 2, 2025

  1. Avoid include esp_cpu on Linux target
  2. Fix warnings regarding size_t v.s. int on Log

Description

Build support on Linux target.

Fix #85

Testing

Verified via test_app.
All cases passed except

  1. matrix reverse test failed due to a slight large calculation error (0.000145 > 1e-4).
Error at[3] = 0.000145, expected= -38.000000, calculated = -38.000145
/home/howardsu/esp-dsp/modules/matrix/mul/test/test_mat_sub_f32.cpp:826:Matrix subset methods check:FAIL:Function [dspm].  Error in inverse() operation!\n
  1. Time Error in 10 cases, which I believe it is due to the difference of cycle tracking. On Linux, I uses rdtsc.
Error at[3] = 0.000145, expected= -38.000000, calculated = -38.000145
/home/howardsu/esp-dsp/modules/matrix/mul/test/test_mat_sub_f32.cpp:826:Matrix subset methods check:FAIL:Function [dspm].  Error in inverse() operation!\n

Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

1. Avoid include esp_cpu on Linux target
2. Fix warnings regarding size_t v.s. int on Log
@github-actions github-actions bot changed the title Support build on Linux target Support build on Linux target (DSP-159) Apr 2, 2025
@dmitry1945
Copy link
Collaborator

Hi @howard0su
I will add this into the master this week.

Thank you very much!

@howard0su
Copy link
Contributor Author

Thanks. Please note, This change only supports Linux target of x86/x86_64 because I am using rdtsc to get the CPU cycles.

@dmitry1945
Copy link
Collaborator

@howard0su
I have taken the commit from your fork. I think we can close this MR.
Are you agree?

@howard0su
Copy link
Contributor Author

yes, please

@dmitry1945 dmitry1945 closed this Apr 8, 2025
@morgana2313
Copy link

Thanks. Please note, This change only supports Linux target of x86/x86_64 because I am using rdtsc to get the CPU cycles.

So this commit won't work on Mac with Apple silicon (AArch64)?

@howard0su
Copy link
Contributor Author

No. it needs additional changes to OSX as it miss some APIs like align_malloc.

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

Successfully merging this pull request may close these issues.

Compile esp-dsp for IDF_TARGET=linux (DSP-136)
4 participants