Page 1 of 1

Running AN10122 Example

Posted: Wed Feb 13, 2019 1:59 am
by stnschrdr
I'm trying to run the 'AN10122_xtimecoposer_reading_from_a_file' project, associated with the application note AN10122.
I get error 'Error: _open failed' and am not sure why.

- I was able to Build the project without any problems; I only had problems running it.
- I'm using xTIMEcomposer ver 14.3.3 on Windows 10.
- I've created a .txt file called 'test.txt' and written inside it ten decimal numbers separated by spaces (I also tried a couple of sentences). It wasn't clear where exactly to save
this file. My project is in /workspace/AN10122_xtimecomposer_reading_from_a_file/. I tried saving test.txt in /workspace/ as well as /workspace/AN10122_xtimecomposer_reading_from_a_file/ , but both gave me the same error. Not sure, which is my 'current directory' or 'raw system call functions directory'. I've been able to run other applications in my /workspace/ , which also contains library folder, without any problems.

Not sure what I am doing wrong.

Re: Running AN10122 Example

Posted: Wed Feb 13, 2019 5:25 am
by mon2
Hi. View the project tree structure and specifically the location (properties) of the executable with the .xe suffix.

For my box:

Code: Select all

AN10122_xtimecomposer_reading_from_a_file\bin
so the executable resides inside the bin folder. Try and drop your text file inside that sub-folder, try again and post your results.

Re: Running AN10122 Example

Posted: Wed Feb 13, 2019 7:48 pm
by stnschrdr
Hi. Strange, even when I place the test.txt file in \AN10122_xtimecomposer_reading_from_a_file\bin\ I get the same 'Error: _open failed' error. I see that the .xe is also in \bin\.

Re: Running AN10122 Example

Posted: Wed Feb 13, 2019 9:14 pm
by stnschrdr
OK, I got it working. Weird, I tried placing the 'test.txt' file back in \AN10122_stimecomposer_reading_from_a_file\ and it successfully opened and printed to the Console. This was after I successfully ran the opposite AN10123 application, which WRITES to 'test.txt' file defaulted to location \AN10121_xtimecomposer_writing_to_a_file\ . I noticed the similarities in the code of the two applications. I guess the first time I thought I tested this test.txt file locations I didn't actually place it in that location. Sorry for wasting your time. :)

Re: Running AN10122 Example

Posted: Thu Feb 14, 2019 11:15 pm
by mon2
Excellent! Thanks for the update for closure.