The above file operations cannot be compiled in the CCES environment. Attempted to use "fopen" but did not seem to be able to generate files in the project area.
Want to know how to operate files in CCES is legal
The above file operations cannot be compiled in the CCES environment. Attempted to use "fopen" but did not seem to be able to generate files in the project area.
Want to know how to operate files in CCES is legal
Moved to CCES Community.
Hi ,
Could you please let us know whether you are facing any compiler error while building your project. If so, please share us the error details along with the complete project to look further on this.
If you can build the project and unable to find the output file, please check the corresponding file is created inside of the "debug" folder in the project directory.
Regards,
Nishanthi.V
I want to read and write the wav file. But I don't know how to include it in the working directory, because when I select "new file", I get a garbled file.
I don't know whether the "rb" operation is illegal in CCES or the import method is wrong
And no corresponding files are generated in the debug folder
while building the project 0 error
Hi ,
Apologies for the delay in response.
You can use fopen() to open a file and "rb" & "wb" modes to read and write the files respectively.
The red line under the 'rb' and 'wb', might be the string spell error. This will not cause any issues.
Regarding including the '.wav' file and '.dat', can you please build your project first and then just copy the input files(.wav/.dat) into your project 'Debug' directory instead of src directory. Now, build and run the project.
We are able to read and write the .wav file and output file writes with the simple example from google. Please refer to the attached screenshot of the generated output.wav file.
Also, reading and writing the .dat files also working fine for us in CCES.
Please refer to the below help page for more information on fopen().
CrossCore® Embedded Studio 2.11.0 > SHARC® Development Tools Documentation > C/C++ Library Manual for SHARC® Processors > C/C++ Run-Time Library > fopen
The icon shown as " " in CCES, is for the Files with an unknown content type.
You can try with the example provided here(public example) to ensure CCES is supported fopen() and "rb" and "wb".
https://www.ee.iitb.ac.in/course/~daplab/resources/wav_read_write.cpp
Regards,
Nishanthi.V