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

Change name of custom_functions.h #6

Open
audiologic-vannoy opened this issue Jan 29, 2020 · 7 comments
Open

Change name of custom_functions.h #6

audiologic-vannoy opened this issue Jan 29, 2020 · 7 comments
Assignees

Comments

@audiologic-vannoy
Copy link
Member

The file is really just fixed point to string and vice versa conversion funcitons. There is probably a name that better describes what the file is actually doing.

Changing the file name will necessitate changing the device driver autogen to reflect the new file name.

@tvannoy
Copy link
Member

tvannoy commented Mar 11, 2020

There's also the question of whether we want these functions to be defined in the header file like they are now, or if we want to put them in a c file instead.

@tvannoy
Copy link
Member

tvannoy commented Mar 11, 2020

custom_functions.h lives in the component_library now. The #include in the device driver codegen will need to be changed to reflect the new name. The include path in the autogenerated makefile shouldn't need to change.

@fe-wickham fe-wickham transferred this issue from fpga-open-speech-tools/simulink_codegen Jun 8, 2020
@fe-wickham
Copy link
Member

Is there a reason we have the strcat2 function instead of just using strcat?

@tvannoy
Copy link
Member

tvannoy commented Jun 8, 2020

Unfortunately, yes. Kernel source code can't use the std library functions since they are written for user space. https://kernelnewbies.org/FAQ/LibraryFunctionsInKernel

However, it's entirely possible that there is already a kernel version of strcat available for use in the kernel source tree. If that's the case, it would be better to use that version instead of our (probably buggy) version.

@fe-wickham
Copy link
Member

Given it is in string.h though shouldn't we be able to use it that way?

@tvannoy
Copy link
Member

tvannoy commented Jun 8, 2020

Yes, you are correct. Whoever implemented the driver did not know that there is a kernel version of string.h that implements many of the functions in the user space string.h (located at /usr/include/string.h)

Let's use include/linux/string.h

@tvannoy
Copy link
Member

tvannoy commented Jun 8, 2020

There are probably other functions, such as strcpy, we could replace that I believe we are duplicating in our drivers.

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

No branches or pull requests

3 participants